diff --git a/.changeset/config.json b/.changeset/config.json
index a4ba8a296..6f539e3e3 100644
--- a/.changeset/config.json
+++ b/.changeset/config.json
@@ -7,5 +7,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
- "ignore": ["storybook", "web"]
+ "ignore": ["@/storybook", "@/web"]
}
diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml
index 00926bafa..f2e06d8cc 100644
--- a/.github/actions/setup/action.yml
+++ b/.github/actions/setup/action.yml
@@ -5,9 +5,9 @@ runs:
using: composite
steps:
- name: Setup Bun
- uses: oven-sh/setup-bun@v1
+ uses: oven-sh/setup-bun@v2
with:
- bun-version: 1.1.21
+ bun-version: 1.1.43
- name: Setup Node
uses: actions/setup-node@v4
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
index 7ceb3b627..24b72a549 100644
--- a/.vscode/extensions.json
+++ b/.vscode/extensions.json
@@ -1,11 +1,11 @@
{
"recommendations": [
- "oven.bun-vscode",
- "esbenp.prettier-vscode",
- "dbaeumer.vscode-eslint",
- "yoavbls.pretty-ts-errors",
"bradlc.vscode-tailwindcss",
+ "DavidAnson.vscode-markdownlint",
+ "dbaeumer.vscode-eslint",
+ "esbenp.prettier-vscode",
+ "oven.bun-vscode",
"unifiedjs.vscode-mdx",
- "DavidAnson.vscode-markdownlint"
+ "yoavbls.pretty-ts-errors"
]
}
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 8dbffc577..9d57ae826 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -4,15 +4,23 @@
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
- "eslint.workingDirectories": ["apps/web", "packages/ui"],
+ "editor.quickSuggestions": {
+ "strings": "on"
+ },
+ "eslint.workingDirectories": [{ "mode": "auto" }],
+ "files.associations": {
+ "*.css": "tailwindcss"
+ },
"tailwindCSS.classAttributes": ["class", "className", "theme"],
"tailwindCSS.experimental.classRegex": [
["twMerge\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
- ["createTheme\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
+ ["createTheme(?:<\\w+>)?\\s*\\(([^)]*)\\)", "{?\\s?[\\w].*:\\s*?[\"'`]([^\"'`]*).*?,?\\s?}?"]
],
"tailwindCSS.experimental.configFile": {
+ "apps/storybook/tailwind.config.cjs": "apps/storybook/**",
"apps/web/tailwind.config.cjs": "apps/web/**",
"packages/ui/tailwind.config.cjs": "packages/ui/**"
},
+ "typescript.preferences.preferTypeOnlyAutoImports": true,
"typescript.tsdk": "node_modules/typescript/lib"
}
diff --git a/apps/storybook/.eslintrc.cjs b/apps/storybook/.eslintrc.cjs
new file mode 100644
index 000000000..5ffe5a97c
--- /dev/null
+++ b/apps/storybook/.eslintrc.cjs
@@ -0,0 +1,44 @@
+/** @type {import("eslint").Linter.Config} */
+module.exports = {
+ root: true,
+ env: {
+ browser: true,
+ commonjs: true,
+ es2021: true,
+ },
+ extends: [
+ "eslint:recommended",
+ "plugin:react/recommended",
+ "plugin:react/jsx-runtime",
+ "plugin:tailwindcss/recommended",
+ "prettier",
+ ],
+ overrides: [
+ {
+ files: ["**/*.{ts,tsx}"],
+ plugins: ["@typescript-eslint"],
+ parser: "@typescript-eslint/parser",
+ extends: ["plugin:@typescript-eslint/recommended"],
+ },
+ ],
+ parserOptions: {
+ ecmaVersion: "latest",
+ sourceType: "module",
+ },
+ plugins: ["react-refresh"],
+ settings: {
+ react: {
+ version: "detect",
+ },
+ tailwindcss: {
+ callees: ["twMerge", "createTheme"],
+ classRegex: "^(class(Name)|theme)?$",
+ },
+ },
+ ignorePatterns: ["storybook-static"],
+ rules: {
+ "react-refresh/only-export-components": ["warn", { allowConstantExport: true }],
+ "react/no-unescaped-entities": "off",
+ "react/prop-types": "off",
+ },
+};
diff --git a/apps/storybook/.storybook/main.ts b/apps/storybook/.storybook/main.ts
index 2daa674b2..b049fa05f 100644
--- a/apps/storybook/.storybook/main.ts
+++ b/apps/storybook/.storybook/main.ts
@@ -10,7 +10,7 @@ function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, "package.json")));
}
const config: StorybookConfig = {
- stories: ["../../../packages/ui/**/*.stories.@(ts|tsx)"],
+ stories: ["../src/**/*.stories.{ts,tsx}"],
addons: [
getAbsolutePath("@storybook/addon-links"),
getAbsolutePath("@storybook/addon-essentials"),
diff --git a/apps/storybook/package.json b/apps/storybook/package.json
index 09201890d..891a9484a 100644
--- a/apps/storybook/package.json
+++ b/apps/storybook/package.json
@@ -1,5 +1,5 @@
{
- "name": "storybook",
+ "name": "@/storybook",
"version": "0.0.0",
"private": true,
"scripts": {
@@ -8,11 +8,15 @@
"dev": "storybook dev -p 6006",
"format": "prettier . --write",
"format:check": "prettier . --check",
+ "lint": "eslint .",
+ "lint:fix": "eslint . --fix",
"typecheck": "tsc --noEmit"
},
"dependencies": {
+ "flowbite-react": "workspace:*",
"react": "18.3.1",
- "react-dom": "18.3.1"
+ "react-dom": "18.3.1",
+ "react-icons": "5.2.1"
},
"devDependencies": {
"@storybook/addon-essentials": "8.1.10",
@@ -25,12 +29,18 @@
"@storybook/test": "8.1.10",
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
- "@vitejs/plugin-react": "4.3.1",
+ "@typescript-eslint/eslint-plugin": "8.19.1",
+ "@typescript-eslint/parser": "8.19.1",
+ "@vitejs/plugin-react": "4.3.4",
"autoprefixer": "10.4.20",
- "postcss": "8.4.41",
+ "eslint-plugin-react": "7.37.3",
+ "eslint-plugin-react-refresh": "0.4.16",
+ "eslint-plugin-storybook": "0.11.1",
+ "eslint-plugin-vitest": "0.5.4",
+ "postcss": "8.4.49",
"storybook": "8.1.10",
- "tailwindcss": "3.4.7",
- "typescript": "5.5.4",
- "vite": "5.3.5"
+ "tailwindcss": "3.4.17",
+ "typescript": "5.6.3",
+ "vite": "6.0.7"
}
}
diff --git a/apps/storybook/postcss.config.cjs b/apps/storybook/postcss.config.cjs
index 12a703d90..1719dfd25 100644
--- a/apps/storybook/postcss.config.cjs
+++ b/apps/storybook/postcss.config.cjs
@@ -1,3 +1,4 @@
+/** @type {import('postcss-load-config').Config} */
module.exports = {
plugins: {
tailwindcss: {},
diff --git a/apps/storybook/prettier.config.cjs b/apps/storybook/prettier.config.cjs
new file mode 100644
index 000000000..e9e08307f
--- /dev/null
+++ b/apps/storybook/prettier.config.cjs
@@ -0,0 +1,10 @@
+const rootPrettier = require("../../prettier.config.cjs");
+
+/** @type {import('prettier').Config} */
+module.exports = {
+ ...rootPrettier,
+ plugins: [...rootPrettier.plugins, "prettier-plugin-tailwindcss"],
+ // tailwindcss
+ tailwindAttributes: ["theme"],
+ tailwindFunctions: ["twMerge", "createTheme"],
+};
diff --git a/packages/ui/src/components/Accordion/Accordion.stories.tsx b/apps/storybook/src/Accordion.stories.tsx
similarity index 81%
rename from packages/ui/src/components/Accordion/Accordion.stories.tsx
rename to apps/storybook/src/Accordion.stories.tsx
index 2a7a37e77..26bdbc550 100644
--- a/packages/ui/src/components/Accordion/Accordion.stories.tsx
+++ b/apps/storybook/src/Accordion.stories.tsx
@@ -1,8 +1,6 @@
import type { Meta, StoryFn } from "@storybook/react";
-import type { ComponentProps, FC } from "react";
+import { Accordion, AccordionContent, AccordionPanel, AccordionTitle, type AccordionProps } from "flowbite-react";
import { HiChevronDown, HiOutlineArrowCircleDown } from "react-icons/hi";
-import type { AccordionProps } from "./Accordion";
-import { Accordion } from "./Accordion";
export default {
title: "Components/Accordion",
@@ -13,13 +11,11 @@ export default {
},
} as Meta;
-const icon: FC
Flowbite is an open-source library of interactive components built on top of Tailwind CSS including buttons,
dropdowns, modals, navbars, and more.
@@ -34,11 +30,11 @@ const Template: StoryFn
Flowbite is first conceptualized and designed using the Figma software so everything you see in the library
has a design equivalent in our Figma file.
@@ -50,11 +46,11 @@ const Template: StoryFn
The main difference is that the core components from Flowbite are open source under the MIT license, whereas
Tailwind UI is a paid product. Another difference is that Flowbite relies on smaller and standalone
@@ -81,8 +77,8 @@ const Template: StoryFn