- Chore: Forked stitches packages to improve typing and class generation.
Feat: Added a new flexible and custom theme system. Read the RFC for all details and check out an example of usage.
Feat: Updated
Flex,BoxCentered,Grid, andStackcomponents to be used withinBoxas namespaced components [BREAKING CHANGE]:Feat: Introduced a new polymorphic components system where as props automatically adjust prop typings. Any HTML element can be used in the component prop. For example, using an a tag will render an anchor:import { Box } from '@fuel-ui/react'; function App() { return <Box.Flex>Hello world</Box.Flex>; }
Feat: Refined the default light theme for better clarity and simplicity:import { Button } from '@fuel-ui/react'; import { IconExternalLink } from '@tabler/icons-react'; function Demo() { return ( <Button component="a" href="#" variant="outlined" leftIcon={<IconExternalLink size={18} />} > Open in new tab </Button> ); }
Feat: Added new design tokens in this release. All color tokens are now auto-generated using theimport { ThemeProvider, darkTheme, lightTheme, useFuelTheme, } from '@fuel-ui/react'; function ThemeWrapper(props: any) { const isDark = useSomeHookToDetectIsDark(); const { setTheme } = useFuelTheme(); useEffect(() => { setTheme(isDark ? darkTheme : lightTheme); }, [isDark]); return <ThemeProvider>{props.children}</ThemeProvider>; }
design-system/tokensproject, based on the Stitches design tokens pattern and Radix Colors. Important notes about the new tokens:- Always reference the semantic value of a token when using a color, e.g., use
$intentsPrimary9instead of$green9. - Semantic colors are available for all necessary layer styles and inputs. A
layermixin has been introduced to simplify token usage (seeButton/styles.tsimplementation for more details). - New tokens are generated in the
design-tokens/tokens/build/tokens-raw.tsfile after runningpnpm buildinside the package. - Understanding and following the new token system is crucial for easy light/dark theme switching.
- The number of colors and variations in
Button,Tag, andBadgehas been reduced to only include design system intents. Chore: Removedcolorprop fromButtonand all derived/related components. Useintentinstead.
import { Button } from '@fuel-ui/react' function Demo() { return <Button intent='base'>Cancel</Button> } ```, by [@pedronauck](https://github.com/pedronauck) (See [#228](https://github.com/FuelLabs/fuel-ui/pull/228))
- Always reference the semantic value of a token when using a color, e.g., use
- ✨ Feat: minimal set of adjustments to have a new brand look, by @pedronauck (See #219)
- ✨ Feat: add new component. Check inside then
Pagination.stories.tsxto see how to use it, by @pedronauck (See #189)
- 🐞 Fix(react):
<InputAmount>now discount fee when hit max button and also format balance units to don't break layout, by @pedronauck (See #184)
- 🐞 Fix: Drawer required props and update dependencies, by @pedronauck (See #175)
- 🐞 Fix: Drawer required props and update dependencies, by @pedronauck (See #168)
- Add changesets to monorepo, by @pedronauck (See #46)