## 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 - [x] New `config`uration (`enableCssVariables`, `namespace`). - [x] `load` API now returns a cleanup function (i.e. "unload"). ## Breaking Changes ### Removed - [x] 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`. - [x] Remove default theme spec (consumers must explicitly provide one). - [x] Remove unvaluable `create*` methods (e.g. `createStyles`, `createTheme`, `createIcons`, `createConfig`). - [x] `merge` util removed, install or import from `uinix-fp` instead. - [x] Remove all `use*` hooks (it's better for consumers to directly access their `system` statically). ### Changed - [x] `styles.breakpoints` is now moved to `config.responsiveBreakpoints`. - [x] `styles.global` is renamed to `globalStyles`. - [x] `Icon` no longer conditionally renders as `button` or `div` (consumers now control this). - [x] `createSystem` is removed and `load` is renamed to `createSystem`. - [x] `useVariant` hook is renamed to `useStyleVariant`. - [x] `styles.variants` is removed. `useStyleVariant` hook directly accesses `styles` rules. - [x] 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`
Goals
uinix-uiwhile offering dynamic/friendly hooks)New Features
configuration (enableCssVariables,namespace).loadAPI now returns a cleanup function (i.e. "unload").Breaking Changes
Removed
styles.typography(also removes rendering font support).styles.typography.fontFacesis naturally removed (consumers should handle rendering/loading fonts).styles.typography.global is naturally removed (just useglobalStyles`).useTypographyVarianthook is naturally removed.Text.variantno longer reads fromstyles.typography.variantsand simply reads fromstyles.variants.create*methods (e.g.createStyles,createTheme,createIcons,createConfig).mergeutil removed, install or import fromuinix-fpinstead.use*hooks (it's better for consumers to directly access theirsystemstatically).Changed
styles.breakpointsis now moved toconfig.responsiveBreakpoints.styles.globalis renamed toglobalStyles.Iconno longer conditionally renders asbuttonordiv(consumers now control this).createSystemis removed andloadis renamed tocreateSystem.useVarianthook is renamed touseStyleVariant.styles.variantsis removed.useStyleVarianthook directly accessesstylesrules.variantprop is renamed tostyleVariant(interoperable withstyles,stylePropsprops).style < styleVariant < styles < shorthandProp