You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* refactor: remove `patch` command from CLI and related setup processes
- Add `version` field to configuration schema and documentation, specifying the Tailwind CSS version to use (default: 4)
* chore: update Flowbite React config to include Tailwind CSS version
- more robust .json import
* chore: improve JSDoc
* chore: fix tests
- add `ThemeConfig` in apps/[storybook, web]
- enforce schema `version` to [3,4]
* feat(cli): add syncTailwindVersion utility and integrate into build and dev commands
* feat(docs): add dark mode option to configuration examples in customization documentation
* fix(Datepicker): switch hardcoded color `cyan` -> `primary`
* fix(modal): update button color from `failure` to `red`
* regen lock file
* up bun version
* regen lock file
* feat(install): enhance package installation logic to upgrade to latest version if below 0.11.x
* refactor(cli): replace getPackageJson with getModulePackageJson
* chore(install): remove redundant comment
* chore: improve DX and cleanup:
- repair `.flowbite-react/config.json` config file on save/read
- check if `flowbite-react` is installed when `npx flowbite-react@latest init`
- bump the version to latest if below `0.11.x`
- remove redundant `{ flag: "w" }` in `fs.writeFile`
* refactor(cli): auto generate the `ThemeInit` component in `.flwobite-react/init.tsx`
- improve `flowbite-react dev` performance by running once then listening for changes
- check and regen `.gitignore` file if content integrity is not according to latest changes
- expose `flowbite-react/store` import paths
* fix: typecheck
* fix: typecheck $2
- do not ignore `.flowbite-react/init.tsx` file
* format code
* refactor(cli): update `setup-init` parsing:
- remove typescript related content and make it portable (jsx/tsx)
- adjust init file path handling to support both .tsx and .jsx extensions
- compare AST nodes for content changes
* fix lint
* feat(cli): add warning for custom config values in setupConfig function
- notify users to include <ThemeInit /> at the root level if custom dark, prefix, or version values are detected in the configuration file
* add changeset
* update dark mode and prefix documentation:
- replace ThemeConfig with ThemeInit component for syncing runtime with custom configuration
- clarify steps for disabling dark mode and using custom prefixes
* update changelog
* feat(theme): add Tailwind CSS version support in theme mode handling and fix dark theme toggle class in Tailwind CSS v4
- Introduced `version` parameter to `buildClassList` and `ThemeModeScript` for Tailwind CSS versioning.
- Updated dark mode class handling based on the specified version in `setModeInDOM` and related functions.
- Adjusted tests to verify prefix behavior according to the Tailwind CSS version.
* fix(config): update schema path and export config in `.flowbite-react/init.(jsx|tsx)`
* update changelog
* fix(getThemeModeScript): wrap classsName in proper string tags
* test(theme): add tests for `getThemeModeScript` function
* expose all `/store` import paths
-`flowbite-react/.gitignore`, `flowbite-react/config.json` self manages, regenerates and repairs
12
+
- new generated file `init.(jsx|tsx)` in `.flowbite-react/` directory that syncs up values from `config.json` that also are needed in React app runtime (similar to how a React context works)
13
+
- synced on CLI commands: `init`, `build`, `dev`, `register`
14
+
- If you have custom configuration in `.flowbite-react/config.json` (different `dark`/`prefix`/`version` values), you must render `<ThemeInit />` at the root level of your app to sync runtime with node config values
15
+
- notify users to include `<ThemeInit />` at the root level if custom `dark`, `prefix`, or `version` values are detected in the configuration file
16
+
- expose `flowbite-react/store` import path
17
+
- check if `flowbite-react` is installed when `npx flowbite-react@latest init`
18
+
- bump the version to latest if below `0.11.x`
19
+
- remove redundant `{ flag: "w" }` in `fs.writeFile`
20
+
- update `dark-mode.md` and `prefix.md` documentation to reflect the `<ThemeInit />` changes
21
+
- add Tailwind CSS version support in theme mode handling and fix dark theme toggle class in Tailwind CSS v4
22
+
23
+
## Migration Guide
24
+
25
+
1. Remove `flowbite-react patch` from your `package.json`
26
+
27
+
```diff
28
+
{
29
+
"scripts": {
30
+
- "postinstall": "flowbite-react patch"
31
+
}
32
+
}
33
+
```
34
+
35
+
2. Add `<ThemeInit />` (import from `.flowbite-react/init.(jsx|tsx)`) at the root level of your app if you have custom configuration in `.flowbite-react/config.json` (different `dark`/`prefix`/`version` values).
@@ -101,6 +108,13 @@ For detailed instructions on configuring and using prefixes, see the [Prefix](/d
101
108
- Default: `true`
102
109
- Description: Whether to use TypeScript (.tsx) or JavaScript (.jsx) for component creation. When set to `false`, components will be created with .jsx extension.
103
110
111
+
#### `version`
112
+
113
+
- Type: `number`
114
+
- Options: `3`, `4`
115
+
- Default: `4`
116
+
- Description: The version of Tailwind CSS to use.
117
+
104
118
## Automatic Class Generation
105
119
106
120
The automatic class generation system works in two modes:
@@ -120,10 +134,12 @@ Example config for automatic mode:
0 commit comments