Releases: WTTJ/welcome-ui
9.0.0
Version 9: Migrate to tailwindcss
Hi, today we are releasing version 9 of Welcome UI. This new version includes the migration to tailwindcss and the removal of xstyled and styled-components. It's a big change, but it will allow us to simplify design system and better performance.
Upgrade steps
1. Remove styled
- Remove dependencies
yarn remove @xstyled/styled-components styled-components- Remove provider
- <WuiProvider>- Remove styled types
Remove file styled.d.ts
1. Upgrade your dependencies and add style files
2. Script to migrate
In welcome-ui repository, run this script to change styled props to tailwind classes in your project, and apply other breaking changes from components listed below.
yarn migrate:v9 '../your_project_path'Options for this CLI:
Usage: yarn migrate:v9 <directory> [options]
Arguments:
<directory> Path to the component directory to migrate
Options:
--copy Create a backup copy before migration (adds -Migrated suffix)
Default: Migrate files in place
--interactive Enable interactive prompts to review each change
Default: Non-interactive mode
--verbose Show detailed output during migration
Default: Show minimal output
--no-format Skip final Prettier, ESLint, and Stylelint formatting
Default: Formatting enabled
--no-recursive Only migrate files in target directory, not subdirectories
Default: Recursively scan all subdirectories
What gets migrated:
• External styled components: <S.Menu /> → <div className={cx("menu")} />
• Inline styled components: <Box mt="sm" /> → <div className="mt-sm" />
• CSS files: styles.ts → styles.module.scss
Examples:
# Basic migration (in place, with formatting)
node index.mjs ./src/components/MyComponent
# Create backup copy before migrating
node index.mjs ./src/components/MyComponent --copy
# Review each change interactively
node index.mjs ./src/components/MyComponent --interactive
# Only migrate root directory files
node index.mjs ./src/components/MyComponent --no-recursive
# Combine multiple options
node index.mjs ./src/components/MyComponent --copy --verbose --interactive
Example of changes
-<Box backgroundColor="neutral-10" p="md" rounded="md" />
+<div className="bg-neutral-10 p-md rounded-md" />3. Fix remaining issues
We cannot cover all cases, so you may have to fix some issues manually. Check _CSS_TO_EDIT comments in your code to find them, and check the list of components changes below.
Components changes
Deprecated components
With the removed of styled-components some components are not needed anymore and have been removed:
- Box
- Flex
- Grid
- Stack
Please use div with tailwind classes instead. To help you with the migration, we provide a script to convert Box, Flex, Grid and Stack components to div with tailwind classes. See step 2 above.
Alert
To hide and icon you need now to use hideIcon prop instead of passing null to icon prop.
-<Alert icon={null} />
+<Alert hideIcon />You cannot pass a custom icon anymore.
Card
The Card.Cover component no longer accepts the shape prop.
ClearButton
the ClearButton component has been removed. You can use the CloseButton component with animatePresence prop instead.
-import { ClearButton } from '@welcome-ui/clear-button'
+import { CloseButton } from '@welcome-ui/close-button'
-<ClearButton />
+<CloseButton animatePresence />DropdownMenu
The DropdownMenu component no longer accepts the gutter prop. This value is set to 4px by default. If you want to remove the gutter, you can use withGutter prop.
-<DropdownMenu gutter={0} />
+<DropdownMenu withGutter={false} />Field
The Field component has been updated to improve accessibility.
The label and hint elements now have unique IDs that are linked to the input element using aria-labelledby and aria-describedby attributes. The automatic passing of props to the child input element has been removed. You can now use the useField hook to get the necessary props for your input element.
FileUpload
The FileUpload component no longer accepts the maxSize prop. If needed, you can add a custom behavior in the handleAddFile callback.
-<FileUpload maxSize={200000} />
+<FileUpload handleAddFile={(file) => /* do something if file is too big */ } />Icon
We removed the IconFont component and replaced it with a new Icon component that uses SVG icons. If you already use Icon component, you don't need to change anything (except if you use color or size props, see below).
-import { IconFont } from '@welcome-ui/icon-font'
+import { NameIcon } from '@welcome-ui/icon'We also remove color props, you can now use tailwind text class to change the color of the icon.
-<CheckIcon color="neutral-60" />
+<CheckIcon className="text-neutral-60" />Size props are only for intern values (xs, sm, ...), you can now use tailwind size class to change the size of the icon if is custom.
-<CheckIcon size="24" />
+<CheckIcon className="size-(--spacing-xl)" />alt prop has been removed, you can now use aria-label if your icon is not decorative.
-<CheckIcon alt="Check icon" />
+<CheckIcon aria-label="Check icon" />Modal
The Modal.Content component has been updated to improve its internal styling logic. The props store is no longer necessary and has been removed. The CloseButton no longer needs the props isOnHeader to adjust its styling, it's all done in CSS.
Popover
The animated prop in usePopover and usePopoverHover hooks is no longer supported. If you want to customize the animation duration, you can use hideTimeout and showTimeout props.
-const popover = usePopover({ animated: 200 })
+const popover = usePopover({ hideTimeout: 200, showTimeout: 200 })Toast
Change import for Toast:
-import { Notifications } from '@welcome-ui/toast'
+import { Toast } from '@welcome-ui/toast'To not showing icon use hideIcon property:
-<Growl icon={null} />
+<Growl hideIcon />
We also removed `onPauseOver` options.New props
To display a label, use the label prop.
To hide it visually but keep it accessible for screen readers, use the hideLabel prop.
To display the label next to the input, use the inline prop.
FieldGroup
The label prop is now mandatory.
To hide it visually but keep it accessible for screen readers, use the hideLabel prop.
Utils
useScreens
To get the screens values from the theme, you need to use useScreens hook instead of useTheme.
-import { useTheme } from '@styled/styled-components'
+ import { useScreens } from '@welcome-ui/utils'
- const theme = useTheme()
- const screens = theme.screens
+ const screens = useScreens()Release 9.0.0-alpha.4
- Merge pull request #2960 from WTTJ/fix-release (3d06213)
- ci: remove script check on pre-push (559c9cc)
- Merge pull request #2957 from WTTJ/dependabot-npm_and_yarn-eslint-js-9.37.0 (aa2f13a)
- Merge pull request #2951 from WTTJ/docs-clean-styled (c7ff924)
- docs: rework stackblitz (79a468b)
- chore(deps-dev): bump @eslint/js from 9.36.0 to 9.37.0 (2693223)
- docs: change how to install (a67f491)
- fix: stylelint and website (bf3a35b)
- feat: remove styled libraries and fix docs (cfcf202)
- Merge pull request #2955 from WTTJ/fix-texts-naming (0e560f5)
- fix: text default naming (7d2ba79)
- Merge pull request #2954 from WTTJ/fix-text (cfb729e)
- fix: font familty for default text (17cd7d7)
- Merge pull request #2950 from WTTJ/chore-wui-styles-improvements (24aed11)
- chore: remove alt value for decorative img element (0d5a4c6)
- Merge pull request #2948 from WTTJ/dependabot-npm_and_yarn-typescript-eslint-utils-8.45.0 (1773943)
- chore: handle supresseed lint warning (2e96184)
- chore: use class and css for filedrop components (5730355)
- chore: enfore alt props on card cover (cc3d2b9)
- chore: strongly type maxWidth on drawer and override height with pure css (e101c43)
- chore(deps-dev): bump @typescript-eslint/utils from 8.44.1 to 8.45.0 (03fe647)
Release 9.0.0-alpha.1
v9.0.0-alpha.0
What's Changed
- Fix: use a contrast compliant color for texts by @Isaacmaamouche in #2806
- chore(yarn audit): fix vulnerabilities by @cnairi in #2810
- Tailwind migration by @wttj-deployer in #2790
- Chore: add classnames test by @Leiksa in #2809
- chore(deps): bump form-data from 4.0.2 to 4.0.4 by @dependabot[bot] in #2786
- chore(deps-dev): bump vite-plugin-static-copy from 2.3.0 to 2.3.2 by @dependabot[bot] in #2795
- chore(config): move all former components in a old repo + rm storybook by @cnairi in #2813
- chore: move old code and change aliases by @theo-mesnil in #2817
- chore: move old utils to prefixed old folder by @P1X3L in #2819
- chore: upgrade website dependencies by @theo-mesnil in #2820
- chore: update aliases config by @Leiksa in #2821
- fix: use inline-flex on button by default by @P1X3L in #2822
- Fix button documentation by @P1X3L in #2826
- fix: allow tailwind css class overrides and add according doc by @P1X3L in #2827
- fix: export properties crash by @theo-mesnil in #2829
- feat: add VariantIcon component by @theo-mesnil in #2828
- [WUI-211] Chore: migrate button group by @Leiksa in #2818
- chore(deps-dev): bump vitest from 3.1.4 to 3.2.4 by @dependabot[bot] in #2823
- docs: add upgrade page for v9 by @theo-mesnil in #2839
- docs: add migration warning and v8 branch reference by @theo-mesnil in #2838
- feat: add svg icons by @theo-mesnil in #2837
- chore(deps-dev): bump typescript-eslint from 8.43.0 to 8.44.0 by @dependabot[bot] in #2841
- fix: export properties crash by @theo-mesnil in #2846
- chore(deps-dev): bump eslint-plugin-prettier from 5.5.3 to 5.5.4 by @dependabot[bot] in #2842
- docs: fix exports of components in docs files by @theo-mesnil in #2847
- fix(button-group): missing layer component to override with tailwind by @Leiksa in #2848
- Chore: migrate toggle to tailwind [WUI-167] by @Isaacmaamouche in #2831
- chore: migrate input text to tailwind by @jeromeraffin in #2834
- chore: migrate textarea to tailwind by @jeromeraffin in #2835
- feat: migrate Label by @theo-mesnil in #2850
- [WUI-213] Chore: add forwardRefWithAs to handle polymorphism by @Leiksa in #2836
- feat: migrate Hint by @theo-mesnil in #2854
- feat(text): add new text component by @cnairi in #2849
- chore: add tests for new button by @P1X3L in #2840
- chore: migrate the Avatar component to be tailwind-compatible by @anucreative in #2851
- Chore: migrate welcome loader to tailwind [WUI-163] by @Isaacmaamouche in #2861
- chore: migrate Pagination by @anucreative in #2860
- chore: migrate Tooltip by @RobelTekle in #2853
- chore(deps): bump @tailwindcss/vite from 4.1.11 to 4.1.13 by @dependabot[bot] in #2855
- chore: migrate PasswordInput by @anucreative in #2863
- Chore(Toggle): wrap toggle css with layer by @Isaacmaamouche in #2869
- chore: migrate AspectRatio by @anucreative in #2862
- chore: migrate Badge by @stevenpersia in #2870
- chore: migrate Tabs by @anucreative in #2858
- fix: variantIcon size by @theo-mesnil in #2871
- chore(tag): migrate tag component to scss by @Leiksa in #2844
- Chore migrate Loader to tailwind [WUI-136] by @diez-wttj in #2832
- chore: migrate Popover by @RobelTekle in #2864
- Chore: migrate select component to tailwind [WUI-171] by @Isaacmaamouche in #2859
- ci: fix generate docs and add on prepush by @theo-mesnil in #2873
- feat: migrate close button by @StephaneRob in #2875
- Chore: migrate import to use and namespaced include by @Isaacmaamouche in #2882
- chore migrate accordion by @diez-wttj in #2877
- Chore migrate Logo by @diez-wttj in #2866
- chore(deps): bump @emotion/is-prop-valid from 1.3.1 to 1.4.0 by @dependabot[bot] in #2879
- fix remove unused css rules by @diez-wttj in #2884
- fix(button): props order (rest overrides the component props) by @cnairi in #2867
- feat: migrate Alert by @theo-mesnil in #2872
- feat: migrate Table by @theo-mesnil in #2885
- feat: add animation to close button (cf clear button) by @StephaneRob in #2878
- chore: migrate DropdownMenu by @RobelTekle in #2883
- chore: migrate Breadcrumb component by @SimonDegraeve in #2876
- chore(link): optimize & migrate component by @Leiksa in #2888
- fix: tailwind spacing-0 based utility classes by @P1X3L in #2893
- ci: migration script for Box and replace on website by @theo-mesnil in #2889
- ci: add migration script to v9 for Flex component by @theo-mesnil in #2891
- ci: add migration script to v9 for Grid component by @theo-mesnil in #2894
- chore: migrate Toast by @diez-wttj in #2865
- chore(deps-dev): bump typescript-eslint from 8.44.0 to 8.44.1 by @dependabot[bot] in #2899
- chore(deps-dev): bump vite-plugin-dts from 4.5.3 to 4.5.4 by @dependabot[bot] in #2898
- ci: add migration script to v9 for Stack component by @theo-mesnil in #2901
- [WUI-224] fix(icon): a11y, remove alt & add aria-hidden by default by @Leiksa in #2890
- ci: fix migration script for Stack by @theo-mesnil in #2902
- chore: migrate Card component by @stevenpersia in #2904
- chore: migrate checkbox to tailwind by @jeromeraffin in #2845
- chore: improve textarea and input text type and style by @jeromeraffin in #2909
- chore: migrate drawer by @anucreative in #2895
- Fix example.js by @diez-wttj in #2913
- feat: migrate Swiper omg by @theo-mesnil in #2910
- chore migrate FileDrop + Files by @diez-wttj in #2892
- Chore: migrate modal and asset modal to tailwind [WUI-150] by @Isaacmaamouche in #2887
- Feat: add codegeneration for breakpoints utils by @Isaacmaamouche in #2911
- fix(imports): fix theme utils import paths by @cnairi in #2914
- chore(deps-dev): bump @testing-library/dom from 10.4.0 to 10.4.1 by @dependabot[bot] in #2907
- chore: migrating radiotab by @quaresc in #2903
- chore(deps-dev): bump eslint from 9.35.0 to 9.36.0 by @dependabot[bot] in #2906
- chore(deps-dev): bump @testing-library/jest-dom from 6.6.3 to 6.8.0 by @dependabot[bot] in #2905
- chore: migrate FileUpload & Files by @baptistetruchet in #2886
- chore: use component based css instead of tailwind classes by @Isaacmaamouche in #2915
- Chore: infer screen hook keys from theme by @Isaacmaamouche in #2916
- chore: pass through all css module files for uniformization by @P1X3L in #2912
- chore: add resets to new theme.css by @P1X3L in #2923
- feat: migrate radio by @StephaneRob in #2908
- docs: remove o...
Release 8.4.0
- Merge pull request #2781 from WTTJ/fix-asset-drawer-hide-on-click (c2553d1)
- fix: remove persistent elements boolean assertion (a177ff6)
- Merge pull request #2780 from WTTJ/chore-pckg-brace-expansion-low-vulnerability (188b14d)
- chore: add version resolution for brace-expansion (a68a928)
- Merge pull request #2771 from WTTJ/chore-update-datepicker-version (6ed144b)
- Merge pull request #2770 from WTTJ/chore-update-next-version (f4c8731)
- chore: add utils file and add test for locale getter (2f413ff)
- chore: update date picker and internal locale management (0139514)
- chore: suppress next themes hydration error (1f6bba8)
- fix: filter page without parent in getStaticParamsSubPage (b0376d5)
- chore: update params types (c2df687)
- chore: bump react version (ece916d)
Release 8.3.0
What's Changed
- fix: remove quote marks from css value by @anucreative in #2760
- fix: toggle size with a long hint and label by @theo-mesnil in #2766
- fix: wrong responsiveness on screens by @theo-mesnil in #2773
- Fix(AlertTitle): the close button goes over title [TAL-119] by @Isaacmaamouche in #2769
Full Changelog: v8.2.1...v8.3.0
Release 8.2.1
What's Changed
- fix: change priority order of exports by @guillaumewttj in #2757
Full Changelog: v8.2.0...v8.2.1
Release 8.2.0
What's Changed
- chore: upgrade linters dependencies and files by @theo-mesnil in #2743
Full Changelog: v8.1.3...v8.2.0
Release 8.2.0-alpha.1
Full Changelog: v8.1.3...v8.2.0-alpha.1
