Skip to content

V1 Release #11

@chrisrzhou

Description

@chrisrzhou

Goals

  • Significantly simplify and streamline APIs and concepts (remove unimportant methods, improve names/interfaces)
  • Remove opinionated defaults (e.g. default theme spec).
  • Improve types (promote static usage of uinix-ui while offering dynamic/friendly hooks)
  • Improve docs
  • Improve tests and coverage

New Features

  • New configuration (enableCssVariables, namespace).
  • load API now returns a cleanup function (i.e. "unload").

Breaking Changes

Removed

  • Remove styles.typography (also removes rendering font support).
    • Rendering styles.typography.fontFaces is naturally removed (consumers should handle rendering/loading fonts).
    • styles.typography.global is naturally removed (just use globalStyles`).
    • useTypographyVariant hook is naturally removed.
    • Text.variant no longer reads from styles.typography.variants and simply reads from styles.variants.
  • Remove default theme spec (consumers must explicitly provide one).
  • Remove unvaluable create* methods (e.g. createStyles, createTheme, createIcons, createConfig).
  • merge util removed, install or import from uinix-fp instead.
  • Remove all use* hooks (it's better for consumers to directly access their system statically).

Changed

  • styles.breakpoints is now moved to config.responsiveBreakpoints.
  • styles.global is renamed to globalStyles.
  • Icon no longer conditionally renders as button or div (consumers now control this).
  • createSystem is removed and load is renamed to createSystem.
  • useVariant hook is renamed to useStyleVariant.
  • styles.variants is removed. useStyleVariant hook directly accesses styles rules.
  • Components
    • variant prop is renamed to styleVariant (interoperable with styles, styleProps props).
    • Style prop precedence now follows with the following importance: style < styleVariant < styles < shorthandProp

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions