uinix-ui
uinix-ui copied to clipboard
V1 Release
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-uiwhile offering dynamic/friendly hooks) - Improve docs
- Improve tests and coverage
New Features
- [x] New
configuration (enableCssVariables,namespace). - [x]
loadAPI now returns a cleanup function (i.e. "unload").
Breaking Changes
Removed
- [x] Remove
styles.typography(also removes rendering font support).- Rendering
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.
- Rendering
- [x] Remove default theme spec (consumers must explicitly provide one).
- [x] Remove unvaluable
create*methods (e.g.createStyles,createTheme,createIcons,createConfig). - [x]
mergeutil removed, install or import fromuinix-fpinstead. - [x] Remove all
use*hooks (it's better for consumers to directly access theirsystemstatically).
Changed
- [x]
styles.breakpointsis now moved toconfig.responsiveBreakpoints. - [x]
styles.globalis renamed toglobalStyles. - [x]
Iconno longer conditionally renders asbuttonordiv(consumers now control this). - [x]
createSystemis removed andloadis renamed tocreateSystem. - [x]
useVarianthook is renamed touseStyleVariant. - [x]
styles.variantsis removed.useStyleVarianthook directly accessesstylesrules. - [x] Components
-
variantprop is renamed tostyleVariant(interoperable withstyles,stylePropsprops). - Style prop precedence now follows with the following importance:
style < styleVariant < styles < shorthandProp
-
[email protected] has been released, which can further narrow the responsibility of uinix-ui to simply integrate against the system of four components.
V1's API has been reduced and finalized in https://github.com/uinix-js/uinix-ui/blob/c2d7f40076f2764d14830d57b3161ed71e710634/index.js.
This greatly minimized API facilitates upcoming internal tasks:
- [ ] Update types
- [ ] Update tests
- [ ] Update docs
- [ ] Draft migration guide to
@1in Github release notes.