diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 000000000..e5b6d8d6a --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 000000000..a4ba8a296 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", + "changelog": ["@changesets/changelog-github", { "repo": "themesberg/flowbite-react" }], + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": ["storybook", "web"] +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..ae10a5cce --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +# editorconfig.org +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index b359e94e0..000000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -storybook-static -cypress.config.ts \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md similarity index 100% rename from CODE_OF_CONDUCT.md rename to .github/CODE_OF_CONDUCT.md diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 86% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md index 8a4071b79..edd224e21 100644 --- a/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -11,18 +11,6 @@ And if you like the project, but just don't have time to contribute, that's fine - Refer this project in your project's readme - Mention the project at local meetups and tell your friends/colleagues -## Table of Contents - -- [Code of Conduct](#code-of-conduct) -- [I Have a Question](#i-have-a-question) -- [I Want To Contribute](#i-want-to-contribute) -- [Reporting Bugs](#reporting-bugs) -- [Suggesting Enhancements](#suggesting-enhancements) -- [Your First Code Contribution](#your-first-code-contribution) -- [Improving The Documentation](#improving-the-documentation) -- [Styleguides](#styleguides) -- [Commit Messages](#commit-messages) - ## Code of Conduct This project has adopted the [Contributor Covenant](https://www.contributor-covenant.org/) as its Code of Conduct. Everyone is expected to adhere to these rules, so please read the [full text](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). Thank you. @@ -108,11 +96,11 @@ Don't forget to: #### Prerequisites -- You need to understand how to use a terminal, Git, Node.js, and Yarn -- You should be able to write Markdown and React TypeScript -- You should be familiar with Tailwind CSS, ESLint, and Prettier +- You need to understand how to use a terminal, `Git`, `Node.js`, and `Bun` +- You should be able to write `Markdown` and `React TypeScript` +- You should be familiar with `Tailwind` `CSS`, `ESLint`, and `Prettier` - You should understand what [vitest](https://vitest.dev/) is, and be able to write tests if your contribution changes the behavior of the library in some way -- You should strongly consider using [Visual Studio Code](https://code.visualstudio.com/) as your editor, as it has plugins for Tailwind CSS, ESLint, and Prettier which will automatically fix most style issues for you, and offer suggestions for how to fix the rest +- You should strongly consider using [Visual Studio Code](https://code.visualstudio.com/) as your editor, as it has plugins for `Tailwind CSS`, `ESLint`, and `Prettier` which will automatically fix most style issues for you, and offer suggestions for how to fix the rest #### Creating a Pull Request @@ -131,39 +119,33 @@ git remote add upstream https://github.com/themesberg/flowbite-react.git git checkout -b fix/accordion-alwaysopen ``` -4. Install dependencies with [`yarn`](https://classic.yarnpkg.com/en/docs/install#debian-stable): +4. Install dependencies with [`bun`](https://bun.sh/): ```bash -yarn install +bun install ``` 5. Start a development server on your machine: ```bash -yarn dev +bun run dev ``` -6. Commit changes with `yarn commit` to follow the required [commitizen](https://github.com/commitizen/cz-cli) format: +6. Make sure your changes work and don't break anything else: ```bash -yarn commit +bun run format && bun run lint:fix && bun run test && bun run build ``` -7. Make sure your changes work and don't break anything else: - -```bash -yarn prettier:fix && yarn lint && yarn test && yarn build -``` - -8. Push to your forked repository +7. Push to your forked repository ```bash git push -u origin fix/accordion-alwaysopen ``` -9. Go to [the repository](https://github.com/themesberg/flowbite-react) and [create a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) +8. Go to [the repository](https://github.com/themesberg/flowbite-react) and [create a Pull Request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) -10. Fill out the Pull Request template, which will be available automatically +9. Fill out the Pull Request template, which will be available automatically #### What Happens Next? @@ -179,14 +161,10 @@ The [documentation at flowbite-react.com](https://flowbite-react.com/docs/gettin ### Files -We use [Prettier](https://prettier.io/) to format all of our code. Please make sure to run `yarn format` before committing any changes. You can also use VS Code as your editor, and install the Prettier and Tailwind CSS IntelliSense plugins to automatically format your code each time you save. +We use [Prettier](https://prettier.io/) to format all of our code. Please make sure to run `bun run format` before committing any changes. You can also use VS Code as your editor, and install the Prettier and Tailwind CSS IntelliSense plugins to automatically format your code each time you save. Please refer to the code written already in the project to see how we format our code, what naming conventions we use, and so on. The more consistent your code is with the rest of the project, the easier it will be to review and merge your Pull Request. -### Commits - -We use [commitizen](https://github.com/commitizen/cz-cli) to format commit messages. Please use `yarn commit` instead of `git commit` when committing changes. - ### Branches & Pull Requests Please follow the same guidelines published by [commitizen](https://github.com/commitizen/cz-cli) when you name a branch that will be used for a Pull Request. The branch name should be prefixed with the most significant change that will be introduced in the Pull Request. diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 1ea10939a..2e357e5f1 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,3 @@ # These are supported funding model platforms -github: [rluders, tulup-conner] +github: [rluders, tulup-conner, SutuSebastian] diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 000000000..2b8d831d8 --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,19 @@ +name: Setup +description: Setup Bun, Node and install packages + +runs: + using: composite + steps: + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + with: + bun-version: 1.0.31 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 20 + + - name: Install packages + shell: bash + run: bun install diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 052ebe4d1..b2d9e2e24 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,52 +5,68 @@ on: branches: - main -concurrency: ${{ github.ref }} - jobs: + format: + name: πŸ’… Format + runs-on: ubuntu-latest + steps: + - name: Checkout branch + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup + + - name: Run format + run: bun run format:check + + lint: + name: πŸ•΅ Lint + runs-on: ubuntu-latest + steps: + - name: Checkout branch + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup + + - name: Run lint + run: bun run lint + + typecheck: + name: βœ… Typecheck + runs-on: ubuntu-latest + steps: + - name: Checkout branch + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup + + - name: Run typecheck + run: bun run typecheck + + test: + name: πŸ”¬ Test + runs-on: ubuntu-latest + steps: + - name: Checkout branch + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup + + - name: Run unit tests + run: bun run test:coverage + build: + name: 🧰 Build runs-on: ubuntu-latest steps: - - name: πŸ“₯ Check out the code - uses: actions/checkout@v3 - with: - fetch-depth: 2 - - - name: πŸ’Ώ Setup NodeJS 20 - uses: actions/setup-node@v3 - with: - node-version: 20 - - - name: ⏳ Setup Cache - uses: actions/cache@v3 - with: - path: '**/node_modules' - key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-modules- - - - name: 🏭 Install packages - run: yarn install - - - name: πŸ•΅ Lint the code - run: yarn lint - - - name: πŸ’… Run Prettier - run: yarn prettier - - - name: πŸ”¬ Run unit tests - run: yarn test:coverage - - - name: πŸ“Š Upload coverage to Codecov - uses: codecov/codecov-action@v3 - with: - fail_ci_if_error: true - files: coverage/coverage-final.json - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true - - - name: 🧰 Build Library - run: yarn build:lib - - - name: 🧰 Build NextJS - run: yarn build + - name: Checkout branch + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup + + - name: Run build + run: bun run build diff --git a/.github/workflows/storybook.yml b/.github/workflows/storybook.yml deleted file mode 100644 index b0ecd8483..000000000 --- a/.github/workflows/storybook.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Deploy Storybook - -on: - push: - branches: - - main - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: πŸ“₯ Checkout - uses: actions/checkout@v2.3.1 - - - name: πŸš€ Merge main -> storybook - uses: devmasx/merge-branch@1.4.0 - with: - type: now - from_branch: main - target_branch: storybook - github_token: ${{ github.token }} diff --git a/.gitignore b/.gitignore index 386ee0621..69e98146a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,12 @@ -.next -.vercel -build -coverage -cypress/screenshots -cypress/videos -lib +# dependencies node_modules -storybook-static + +# misc .DS_Store -npm-debug.log* +*.pem + +# typescript tsconfig.tsbuildinfo -yarn-debug.log* -yarn-error.log* -dist -.contentlayer \ No newline at end of file + +# turbo +.turbo diff --git a/.idea/.gitignore b/.idea/.gitignore deleted file mode 100644 index 13566b81b..000000000 --- a/.idea/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Editor-based HTTP Client requests -/httpRequests/ -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 0e74707b2..000000000 --- a/.npmignore +++ /dev/null @@ -1,22 +0,0 @@ -.github -.vercel -.vscode -build -pages -public -storybook-static -styles -.gitignore -.prettierrc -CNAME -CODE_OF_CONDUCT.md -codecov.yaml -cypress.json -LICENSE -next-env.d.ts -next.config.mjs -node_modules -README.md -tsconfig.json -tsconfig.tsbuildinfo -vite.config.ts \ No newline at end of file diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 2928ece4b..000000000 --- a/.prettierignore +++ /dev/null @@ -1,19 +0,0 @@ -# Changelog is autogenerate, doesn't make sense to prettier it. -CHANGELOG.md - -# Ignore the same files from .gitignore as well -.next -.vercel -build -coverage -cypress/screenshots -cypress/videos -lib -node_modules -storybook-static -.DS_Store -npm-debug.log* -tsconfig.tsbuildinfo -yarn-debug.log* -yarn-error.log* -.contentlayer \ No newline at end of file diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 25b2b2f47..000000000 --- a/.prettierrc +++ /dev/null @@ -1,6 +0,0 @@ -{ - "plugins": ["prettier-plugin-tailwindcss"], - "printWidth": 120, - "singleQuote": true, - "trailingComma": "all" -} diff --git a/.storybook/main.ts b/.storybook/main.ts deleted file mode 100644 index 72d42b0c5..000000000 --- a/.storybook/main.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { StorybookConfig } from '@storybook/nextjs'; -import TsconfigPathsPlugin from 'tsconfig-paths-webpack-plugin'; - -const config: StorybookConfig = { - stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], - addons: [ - '@storybook/addon-links', - '@storybook/addon-essentials', - '@storybook/addon-interactions', - { - name: '@storybook/addon-styling', - options: { - postCss: true, - }, - }, - ], - framework: { - name: '@storybook/nextjs', - options: {}, - }, - docs: { - autodocs: 'tag', - }, - webpackFinal: (config) => { - config.resolve!.plugins = [new TsconfigPathsPlugin()]; - return config; - }, -}; - -export default config; diff --git a/.storybook/preview.ts b/.storybook/preview.ts deleted file mode 100644 index 14646bac3..000000000 --- a/.storybook/preview.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { Preview } from '@storybook/react'; -import './style.css'; - -const preview: Preview = { - parameters: { - actions: { argTypesRegex: '^on[A-Z].*' }, - controls: { - matchers: { - color: /(background|color)$/i, - date: /Date$/, - }, - }, - }, -}; - -export default preview; diff --git a/.storybook/style.css b/.storybook/style.css deleted file mode 100644 index 63b75a58b..000000000 --- a/.storybook/style.css +++ /dev/null @@ -1,16 +0,0 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; - -@layer base { - @font-face { - font-family: 'Inter'; - src: url(inter.woff2) format('woff2'); - font-weight: 100 200 300 400 500 600 700 800 900; - font-display: swap; - } - - html { - font-family: 'Inter', sans-serif; - } -} diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 000000000..7ceb3b627 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,11 @@ +{ + "recommendations": [ + "oven.bun-vscode", + "esbenp.prettier-vscode", + "dbaeumer.vscode-eslint", + "yoavbls.pretty-ts-errors", + "bradlc.vscode-tailwindcss", + "unifiedjs.vscode-mdx", + "DavidAnson.vscode-markdownlint" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index f08d92a02..12188d7e0 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,27 +1,18 @@ { "editor.codeActionsOnSave": { - "source.fixAll": "explicit" + "source.fixAll.eslint": "explicit" }, "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.formatOnPaste": false, "editor.formatOnSave": true, - "editor.tabSize": 2, - "eslint.enable": true, - "eslint.format.enable": true, - "files.exclude": { - ".next/": true, - ".vercel/": true, - "build/": true, - "coverage/": true, - "lib/": true, - "node_modules": true, - "storybook-static/": true, - "tsconfig.tsbuildinfo": true, - "yarn-error.log": true, - "yarn.lock": true + "eslint.workingDirectories": ["apps/web", "packages/ui"], + "tailwindCSS.classAttributes": ["class", "className", "theme"], + "tailwindCSS.experimental.classRegex": [ + ["twMerge\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"], + ["createTheme\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"] + ], + "tailwindCSS.experimental.configFile": { + "apps/web/tailwind.config.js": "apps/web/**", + "packages/ui/tailwind.config.js": "packages/ui/**" }, - "javascript.updateImportsOnFileMove.enabled": "always", - "typescript.enablePromptUseWorkspaceTsdk": true, - "typescript.tsdk": "node_modules/typescript/lib", - "typescript.updateImportsOnFileMove.enabled": "always" + "typescript.tsdk": "node_modules/typescript/lib" } diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index a05ba4ce8..000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,953 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. - -### [0.7.5](https://github.com/themesberg/flowbite-react/compare/v0.7.4...v0.7.5) (2024-03-20) - -Re-publish, broken build in `0.7.4`. - -### [0.7.4](https://github.com/themesberg/flowbite-react/compare/v0.7.3...v0.7.4) (2024-03-20) - -### Bug Fixes - -* **button:** fix: polymorphic component return types [button, dropdown item] ([#1308](https://github.com/themesberg/flowbite-react/issues/1308)) ([f8775d8](https://github.com/themesberg/flowbite-react/commit/a6698d48474595f2ee05a3f817ecbdb322aa7807)), closes [#962](https://github.com/themesberg/flowbite-react/issues/962) - -### [0.7.3](https://github.com/themesberg/flowbite-react/compare/v0.7.2...v0.7.3) (2024-03-12) - - -### Features - -* **component:** default to `type="text"` on `` ([#1206](https://github.com/themesberg/flowbite-react/issues/1206)) ([fbd57c8](https://github.com/themesberg/flowbite-react/commit/fbd57c85906d31b47911910330b51656c546f2e1)) -* Popover component ([#1237](https://github.com/themesberg/flowbite-react/issues/1237)) ([dc48f2e](https://github.com/themesberg/flowbite-react/commit/dc48f2ee3edac79aae9399c22385b81f4cb683fa)), closes [#916](https://github.com/themesberg/flowbite-react/issues/916) [#878](https://github.com/themesberg/flowbite-react/issues/878) -* **table:** Wrap table components with forwardRef ([#1239](https://github.com/themesberg/flowbite-react/issues/1239)) ([4a26a50](https://github.com/themesberg/flowbite-react/commit/4a26a504a9589415735251e4076a9e15d4ee9dce)) - - -### Bug Fixes - -* **alert:** blue color on alert is cyan ([#1282](https://github.com/themesberg/flowbite-react/issues/1282)) ([c52184e](https://github.com/themesberg/flowbite-react/commit/c52184e7bb706b9393f6ae93fbd73162547d8b98)) -* **badge:** blue color on badge is cyan ([#1227](https://github.com/themesberg/flowbite-react/issues/1227)) ([ee3749f](https://github.com/themesberg/flowbite-react/commit/ee3749f4173d99b15bcbd6a312ddc5da69ba6fcf)) -* **button:** Button ring on focus ([#1238](https://github.com/themesberg/flowbite-react/issues/1238)) ([406ebe5](https://github.com/themesberg/flowbite-react/commit/406ebe53228871cc0ef89282919e314414e7ad94)) -* **button:** Fixed Typescript error when using Next.js Link in the button `as` prop ([#1244](https://github.com/themesberg/flowbite-react/issues/1244)) ([a6698d4](https://github.com/themesberg/flowbite-react/commit/a6698d48474595f2ee05a3f817ecbdb322aa7807)), closes [#1002](https://github.com/themesberg/flowbite-react/issues/1002) [#1107](https://github.com/themesberg/flowbite-react/issues/1107) -* **ButtonGroup:** dynamic generated button with group wasn't styled properly ([#1273](https://github.com/themesberg/flowbite-react/issues/1273)) ([d0dc810](https://github.com/themesberg/flowbite-react/commit/d0dc81073eb14f5620c70e4f4bd6e9216a7b1272)), closes [#1269](https://github.com/themesberg/flowbite-react/issues/1269) [#1269](https://github.com/themesberg/flowbite-react/issues/1269) -* homepage - use Link for internal links ([#1246](https://github.com/themesberg/flowbite-react/issues/1246)) ([4fd01e5](https://github.com/themesberg/flowbite-react/commit/4fd01e5a5631c30ea65f90fd23856eae8014ccad)) -* **modal:** modal overflowing bottom in chrome on ios ([#1270](https://github.com/themesberg/flowbite-react/issues/1270)) ([3671ced](https://github.com/themesberg/flowbite-react/commit/3671ced4564a5aa7d823d8c09756bb455d2969c1)) -* **navbar:** on Mobile Screen Navbar remains open even page is changed ([#1247](https://github.com/themesberg/flowbite-react/issues/1247)) ([ce25791](https://github.com/themesberg/flowbite-react/commit/ce257913c9ee3c6d52b6acf829d5b4688f0a6fc4)) -* **storybook:** fix the `argTypes.weekStart.mapping` on `Datepicker.stories.tsx` ([#1254](https://github.com/themesberg/flowbite-react/issues/1254)) ([79f6316](https://github.com/themesberg/flowbite-react/commit/79f631634c528a4b06b80a027a463d82c72697eb)), closes [#1167](https://github.com/themesberg/flowbite-react/issues/1167) -* **toggleswitch component:** added forwardRef to ToggleSwitch component ([#1198](https://github.com/themesberg/flowbite-react/issues/1198)) ([8e0b658](https://github.com/themesberg/flowbite-react/commit/8e0b658625cc29d729ce8ea19ee8afb6893c7f73)), closes [#1078](https://github.com/themesberg/flowbite-react/issues/1078) -* typo in fileInput.dropzone.tsx ([#1291](https://github.com/themesberg/flowbite-react/issues/1291)) ([2c2fa52](https://github.com/themesberg/flowbite-react/commit/2c2fa52b5c2e76f3e2e73309c14d453753c0fe7b)) - -### [0.7.2](https://github.com/themesberg/flowbite-react/compare/v0.7.1...v0.7.2) (2023-12-12) - - -### Bug Fixes - -* absolute to relative import ([#1183](https://github.com/themesberg/flowbite-react/issues/1183)) ([3f0bebb](https://github.com/themesberg/flowbite-react/commit/3f0bebbdc863552a5d31c080c1d129a450870cc0)) - -### [0.7.1](https://github.com/themesberg/flowbite-react/compare/v0.7.0...v0.7.1) (2023-12-12) - - -### ⚠ BREAKING CHANGES - -* **datepicker:** As the WeekStart enum changed order to be aligned with Javascript Date object, now -you have to change your weekStart attribute to be -1, so for Monday you should put 1, instead of 2. -But it wasn't working before as the values were incorrectly rendered in the first place. - -### Features - -* **list component:** develop new horizontal state of list component ([#1178](https://github.com/themesberg/flowbite-react/issues/1178)) ([1fbe6ca](https://github.com/themesberg/flowbite-react/commit/1fbe6ca69346b090f9007e0ae904213977ad6d6e)) -* **list.stories.tsx:** add horizontal stories ([#1180](https://github.com/themesberg/flowbite-react/issues/1180)) ([7db683d](https://github.com/themesberg/flowbite-react/commit/7db683d939d08a465df6fbb1dc7cbfc5b7396bf4)) - - -### Bug Fixes - -* add empty space to `` ring in dark mode ([#1160](https://github.com/themesberg/flowbite-react/issues/1160)) ([d0ccfde](https://github.com/themesberg/flowbite-react/commit/d0ccfde319642a9c62fcff8c04470e744d7ab7a7)) -* **component:** fix `` console warning ([#1172](https://github.com/themesberg/flowbite-react/issues/1172)) ([bdd7cdf](https://github.com/themesberg/flowbite-react/commit/bdd7cdfadd33ce39408cf50cbc42b199e7469457)) -* **datepicker:** fix the inconsistent weekday labels ([#1173](https://github.com/themesberg/flowbite-react/issues/1173)) ([770ab9d](https://github.com/themesberg/flowbite-react/commit/770ab9db7fde1aca8c68a1c0e196841a3510039f)), closes [#1044](https://github.com/themesberg/flowbite-react/issues/1044) -* **footer>theme.ts:** adding margin to right in footer links ([#1153](https://github.com/themesberg/flowbite-react/issues/1153)) ([7c1275e](https://github.com/themesberg/flowbite-react/commit/7c1275e255f8dcbefcd73a7acec21b17e043273f)), closes [#1085](https://github.com/themesberg/flowbite-react/issues/1085) -* **pagination:** updating lastPage variable correctly for table layout ([#1151](https://github.com/themesberg/flowbite-react/issues/1151)) ([2259bf5](https://github.com/themesberg/flowbite-react/commit/2259bf55c720495ae72bb055f2fca8c3633e006c)), closes [#1150](https://github.com/themesberg/flowbite-react/issues/1150) - -## [0.7.0](https://github.com/themesberg/flowbite-react/compare/v0.6.4...v0.7.0) (2023-11-24) - - -### Features - -* `ThemeModeScript` - avoid page flicker on reload on SSR application (NextJS, Remix) ([#1056](https://github.com/themesberg/flowbite-react/issues/1056)) ([4f0399b](https://github.com/themesberg/flowbite-react/commit/4f0399b50b23ec24ded67681f3290a8fbf653920)) -* **progress:** add missing colors for Progress component ([#1129](https://github.com/themesberg/flowbite-react/issues/1129)) ([f8853af](https://github.com/themesberg/flowbite-react/commit/f8853afb1cf404a0a07e446890bea92aa9ce22fb)) - - -### Bug Fixes - -* **button/theme.ts:** add the missing dark modifier for Button bg color ([#1047](https://github.com/themesberg/flowbite-react/issues/1047)) ([0050aef](https://github.com/themesberg/flowbite-react/commit/0050aef25e93bd38bd517b5da54344099f7eb4bf)), closes [#1045](https://github.com/themesberg/flowbite-react/issues/1045) -* docs dropdown - incorrect code preview ([#1059](https://github.com/themesberg/flowbite-react/issues/1059)) ([624932a](https://github.com/themesberg/flowbite-react/commit/624932a8ca34c74dba068415c6ccdbd695c77100)) -* docs forms toggle switch - incorrect code preview ([#1061](https://github.com/themesberg/flowbite-react/issues/1061)) ([5733b12](https://github.com/themesberg/flowbite-react/commit/5733b12796ae75cfd9ae29200c2a710e2405d199)) -* docs navbar - incorrect code preview ([#1062](https://github.com/themesberg/flowbite-react/issues/1062)) ([8c5bd0b](https://github.com/themesberg/flowbite-react/commit/8c5bd0bdceb466a4ac8b36b96e6a91b9c1fce83a)) -* docs/getting started/contributing - invalid "bug tracker" url ([#1073](https://github.com/themesberg/flowbite-react/issues/1073)) ([c357c4f](https://github.com/themesberg/flowbite-react/commit/c357c4f0d9d83c8f4b728f24a026eaed19c97a4a)) -* dropdown theme - granular control ([#1066](https://github.com/themesberg/flowbite-react/issues/1066)) ([cac6148](https://github.com/themesberg/flowbite-react/commit/cac614889e27ee95313dbe5a8af807eca6976649)) -* homepage dark mode `Floating Label` - missing svg ([#1074](https://github.com/themesberg/flowbite-react/issues/1074)) ([df71241](https://github.com/themesberg/flowbite-react/commit/df71241cc26fca900014fd163370bb680bc4e3d6)) -* layout overflow ([#1054](https://github.com/themesberg/flowbite-react/issues/1054)) ([7c5f136](https://github.com/themesberg/flowbite-react/commit/7c5f136035f20050fb14f97627b65fb86046873a)) -* listItem disabled property ([#1126](https://github.com/themesberg/flowbite-react/issues/1126)) ([0f274d6](https://github.com/themesberg/flowbite-react/commit/0f274d6318b7693ae79bb8ced2483e82085c9ed4)) -* remove alias import ([#1058](https://github.com/themesberg/flowbite-react/issues/1058)) ([bb60b18](https://github.com/themesberg/flowbite-react/commit/bb60b183b60e63f38eab7c711c0c775cd0739c55)) - -### [0.6.4](https://github.com/themesberg/flowbite-react/compare/v0.6.3...v0.6.4) (2023-10-03) - - -### Features - -* Blockquote Component ([#997](https://github.com/themesberg/flowbite-react/issues/997)) ([9b91c29](https://github.com/themesberg/flowbite-react/commit/9b91c299dbf4ea22dc3b1617633cdb837552776d)) -* checkbox colors ([#1032](https://github.com/themesberg/flowbite-react/issues/1032)) ([8ae697e](https://github.com/themesberg/flowbite-react/commit/8ae697ea50f8c35da4c3f746f8e2fa19bb78b249)) - - -### Bug Fixes - -* fix getWeekDays function ([#1040](https://github.com/themesberg/flowbite-react/issues/1040)) ([8822223](https://github.com/themesberg/flowbite-react/commit/8822223eb7417f34dbbe18d561858591cfaf420f)) - -### [0.6.3](https://github.com/themesberg/flowbite-react/compare/v0.6.2...v0.6.3) (2023-09-30) - - -### Bug Fixes - -* Button color blue theme ([#1024](https://github.com/themesberg/flowbite-react/issues/1024)) ([11d8510](https://github.com/themesberg/flowbite-react/commit/11d8510875c0285e7634185ae05555ef64da3dcd)) -* Floating Label theme import ([#1023](https://github.com/themesberg/flowbite-react/issues/1023)) ([160c24e](https://github.com/themesberg/flowbite-react/commit/160c24e0004b0c430a60493620c1dec4cdbdfedc)) - -### [0.6.2](https://github.com/themesberg/flowbite-react/compare/v0.6.1...v0.6.2) (2023-09-29) - - -### Features - -* adds floating label ([#955](https://github.com/themesberg/flowbite-react/issues/955)) ([3fc7b88](https://github.com/themesberg/flowbite-react/commit/3fc7b88d8633977b4e1d5c9eadcb4ed25116d86f)) -* **component:** toggleSwitch add sizing prop (sm|md|lg) ([#1009](https://github.com/themesberg/flowbite-react/issues/1009)) ([c3bf704](https://github.com/themesberg/flowbite-react/commit/c3bf704dd9775390a5efac638d84192b588fcbbd)) - - -### Bug Fixes - -* docs - avatar - render properly code example ([#1006](https://github.com/themesberg/flowbite-react/issues/1006)) ([48ce786](https://github.com/themesberg/flowbite-react/commit/48ce7863fcbc7d98b29c80b1c95c7f99a377ab95)) -* documentation regressions ([#1021](https://github.com/themesberg/flowbite-react/issues/1021)) ([dbfb019](https://github.com/themesberg/flowbite-react/commit/dbfb01958e47b04de08b9c88a259bc54f0eb1b36)) -* homepage - missing dark mode section functionality ([#989](https://github.com/themesberg/flowbite-react/issues/989)) ([63e04e2](https://github.com/themesberg/flowbite-react/commit/63e04e2ae52248adc86ead5298f11161af563cc9)) -* issue [#846](https://github.com/themesberg/flowbite-react/issues/846) - docs dropdown - `custom trigger` section not render… ([#1005](https://github.com/themesberg/flowbite-react/issues/1005)) ([409c01c](https://github.com/themesberg/flowbite-react/commit/409c01c9a5831b444702c252cd6086c7caaddfe8)) -* **toggleswitch:** disable + checked state and deprecated html event replacement ([#987](https://github.com/themesberg/flowbite-react/issues/987)) ([ce55df1](https://github.com/themesberg/flowbite-react/commit/ce55df1fc4b7a4c20a12957b052d8f359e8234a7)), closes [#986](https://github.com/themesberg/flowbite-react/issues/986) - -### [0.6.1](https://github.com/themesberg/flowbite-react/compare/v0.6.0...v0.6.1) (2023-09-23) - - -### Bug Fixes - -* `CodePreview` - show explicit false props ([#985](https://github.com/themesberg/flowbite-react/issues/985)) ([b1357c6](https://github.com/themesberg/flowbite-react/commit/b1357c6e44607fb1383393ec54ad37bd98712879)) -* **button:** allow height of buttons stretch ([#906](https://github.com/themesberg/flowbite-react/issues/906)) ([10b54e3](https://github.com/themesberg/flowbite-react/commit/10b54e345b355201405bf948eae943b5cca94354)) -* **button:** fix error Button cannot be used as a JSX component ([#974](https://github.com/themesberg/flowbite-react/issues/974)) ([b621601](https://github.com/themesberg/flowbite-react/commit/b62160116b26180023f15ed07804e9a48600180b)), closes [#962](https://github.com/themesberg/flowbite-react/issues/962) -* **component:** add custom theme to the carousel's default left and r… ([#910](https://github.com/themesberg/flowbite-react/issues/910)) ([ddff0e5](https://github.com/themesberg/flowbite-react/commit/ddff0e5e4353dbbeaba0312a317fe40e777b79f9)) -* **datepicker.tsx:** fix theme and add onSelectedDate callback ([#970](https://github.com/themesberg/flowbite-react/issues/970)) ([fe9f63f](https://github.com/themesberg/flowbite-react/commit/fe9f63f0cdb04f5ed64baa9ff8755182ef6c8fce)), closes [#968](https://github.com/themesberg/flowbite-react/issues/968) [#964](https://github.com/themesberg/flowbite-react/issues/964) -* **datepicker:** button type ([#984](https://github.com/themesberg/flowbite-react/issues/984)) ([496ed1e](https://github.com/themesberg/flowbite-react/commit/496ed1e9e066edae1eec021d0f7a042a82467c55)) -* **datepiker:** incorrect names of days of the week in the datepicker ([#963](https://github.com/themesberg/flowbite-react/issues/963)) ([e09a22a](https://github.com/themesberg/flowbite-react/commit/e09a22a4dc28aecefe7e09a2b6ac78a775083a9b)), closes [#960](https://github.com/themesberg/flowbite-react/issues/960) -* **labels:** default dark color of the input labels should be white ([#978](https://github.com/themesberg/flowbite-react/issues/978)) ([3d1d62e](https://github.com/themesberg/flowbite-react/commit/3d1d62eb80fa9475e0db70f05e8670bd8a6a9c9b)) -* scroll to section blocking above content ([#983](https://github.com/themesberg/flowbite-react/issues/983)) ([5a9589b](https://github.com/themesberg/flowbite-react/commit/5a9589bd39dd39cfddc149ae509c1caa98a4ee24)) -* **tabs:** added tabs container div style and theme ([#929](https://github.com/themesberg/flowbite-react/issues/929)) ([c0e9d66](https://github.com/themesberg/flowbite-react/commit/c0e9d66b88c259ef7cebfb67b44705aee7491fbc)), closes [#924](https://github.com/themesberg/flowbite-react/issues/924) -* **textarea:** default font size should be `text-sm` ([#958](https://github.com/themesberg/flowbite-react/issues/958)) ([ecf271a](https://github.com/themesberg/flowbite-react/commit/ecf271a8dcb64c7c25e24ad1cfb7c33b8ea3d3bd)) - -### [0.6.0](https://github.com/themesberg/flowbite-react/compare/v0.5.0...v0.6.0) (2023-09-09) - -### Features - -* add `` component ([#949](https://github.com/themesberg/flowbite-react/issues/949)) ([ce05949](https://github.com/themesberg/flowbite-react/commit/ce059497cc8512db841fae4fdda82857c3b92911)) -* add `` component ([#835](https://github.com/themesberg/flowbite-react/issues/835)) ([ff12d41](https://github.com/themesberg/flowbite-react/commit/ff12d41e7f940ac2033f38df7951d1352933c3a0)), closes [#626](https://github.com/themesberg/flowbite-react/issues/626) -* **component:** new pauseOnHover prop to , provide quick information with chance to pause ([#918](https://github.com/themesberg/flowbite-react/issues/918)) ([f69e1a4](https://github.com/themesberg/flowbite-react/commit/f69e1a4e13047a552e31281fb9faadd956e899d8)) -* **sidebar:** add custom chevron icon to collapse ([#891](https://github.com/themesberg/flowbite-react/issues/891)) ([d92c2cc](https://github.com/themesberg/flowbite-react/commit/d92c2cc690dd8f6886e35de84e6c1e3b93ef96ee)) - - -### Bug Fixes - -* **button.tsx:** Adding back displayName ([#890](https://github.com/themesberg/flowbite-react/issues/890)) ([8e24575](https://github.com/themesberg/flowbite-react/commit/8e245754b5057eb0b7cd27d95814f695c708a3de)) -* **button.tsx:** Button `as` prop internal logic + TS props ([#885](https://github.com/themesberg/flowbite-react/issues/885)) ([942735e](https://github.com/themesberg/flowbite-react/commit/942735e7dcd2ceea00927a0420c9e92a6998926c)), closes [#865](https://github.com/themesberg/flowbite-react/issues/865) -* **pagination:** center selected page ([#931](https://github.com/themesberg/flowbite-react/issues/931)) ([cc1292d](https://github.com/themesberg/flowbite-react/commit/cc1292d1dc4aeb39b3e91b1243944121f456f49f)), closes [#908](https://github.com/themesberg/flowbite-react/issues/908) -* **select.tsx/badge.tsx:** With icon classes preference ([#877](https://github.com/themesberg/flowbite-react/issues/877)) ([ebe605e](https://github.com/themesberg/flowbite-react/commit/ebe605edd2a541ab542a45c51d776a3dd92b9c00)), closes [#869](https://github.com/themesberg/flowbite-react/issues/869) - -## [0.5.0](https://github.com/themesberg/flowbite-react/compare/v0.4.11...v0.5.0) (2023-07-21) - - -### ⚠ BREAKING CHANGES - -* **toast.tsx:** Removing "removed" theme support - -### Features - -* **card:** support custom renderImage functions for Card ([#730](https://github.com/themesberg/flowbite-react/issues/730)) ([594f187](https://github.com/themesberg/flowbite-react/commit/594f1870d7fc964521e8e9b56c1e64f39124248e)), closes [#706](https://github.com/themesberg/flowbite-react/issues/706) -* **modal.tsx:** Modal Accessibility ([#858](https://github.com/themesberg/flowbite-react/issues/858)) ([2b4a3ec](https://github.com/themesberg/flowbite-react/commit/2b4a3ec8b1243bde08a1211d5c48126f68fedf4a)), closes [#647](https://github.com/themesberg/flowbite-react/issues/647) [#701](https://github.com/themesberg/flowbite-react/issues/701) -* **toast.tsx:** Stateless Toast ([#860](https://github.com/themesberg/flowbite-react/issues/860)) ([bd4ad89](https://github.com/themesberg/flowbite-react/commit/bd4ad890c23c1c4446a2d8962ad3f694cc3dbb7a)), closes [#848](https://github.com/themesberg/flowbite-react/issues/848) - - -### Bug Fixes - -* **button.tsx:** Relative Spinner size ([#868](https://github.com/themesberg/flowbite-react/issues/868)) ([3662d5e](https://github.com/themesberg/flowbite-react/commit/3662d5ec0f6318773524ddb8c2a55702574d1963)), closes [#850](https://github.com/themesberg/flowbite-react/issues/850) -* **modal.mdx:** fix spelling in modal documentation ([#862](https://github.com/themesberg/flowbite-react/issues/862)) ([380aa63](https://github.com/themesberg/flowbite-react/commit/380aa63752050858062cc61bd91bc4f6b691671c)) -* **pagination theme file:** added enabled attribute for pagination ba… ([#856](https://github.com/themesberg/flowbite-react/issues/856)) ([ecc3f6e](https://github.com/themesberg/flowbite-react/commit/ecc3f6ef0156533f2eeb337aad913e0a8182b58d)), closes [#849](https://github.com/themesberg/flowbite-react/issues/849) - -### [0.4.11](https://github.com/themesberg/flowbite-react/compare/v0.4.10...v0.4.11) (2023-07-10) - - -### Features - -* **dropdown.tsx:** Dropdown Accessibility ([#840](https://github.com/themesberg/flowbite-react/issues/840)) ([65b13e7](https://github.com/themesberg/flowbite-react/commit/65b13e7dd5def51076348bd9e06b6505419167cd)), closes [#648](https://github.com/themesberg/flowbite-react/issues/648) [#793](https://github.com/themesberg/flowbite-react/issues/793) - - -### Bug Fixes - -* **dropdown:** fix build ([2c0f9e5](https://github.com/themesberg/flowbite-react/commit/2c0f9e55b2210a4b4b28237fa25193580521e7f9)) -* **modal:** backdrop height ([#839](https://github.com/themesberg/flowbite-react/issues/839)) ([e6e1b83](https://github.com/themesberg/flowbite-react/commit/e6e1b834ccd87b32f685c8e1c4f268f75274e1a7)) - -### [0.4.10](https://github.com/themesberg/flowbite-react/compare/v0.4.9...v0.4.10) (2023-07-03) - - -### Features - -* **button.tsx:** Added as prop to button component ([#826](https://github.com/themesberg/flowbite-react/issues/826)) ([6384882](https://github.com/themesberg/flowbite-react/commit/6384882b754465aac2829dc9e634b0c30efce621)), closes [#655](https://github.com/themesberg/flowbite-react/issues/655) -* **carousel:** adds onSlideChange property ([#833](https://github.com/themesberg/flowbite-react/issues/833)) ([c80fb37](https://github.com/themesberg/flowbite-react/commit/c80fb37ca59d1a7ceff3fef978bea934baf43c46)) -* **components/darkthemetoggle:** supports custom icons ([1d615c0](https://github.com/themesberg/flowbite-react/commit/1d615c0bfbef4fdc48d9f19c18c069a15c74e228)) -* **components/sidebar:** theme access to list item element ([d7262ba](https://github.com/themesberg/flowbite-react/commit/d7262bab7c97c6e215431ff7d6ca6711e23570de)) -* **dropdown:** adding custom trigger ([#834](https://github.com/themesberg/flowbite-react/issues/834)) ([70c7aec](https://github.com/themesberg/flowbite-react/commit/70c7aec813f208c179a74b6b49343faf18369964)), closes [#624](https://github.com/themesberg/flowbite-react/issues/624) - - -### Bug Fixes - -* **button.tsx:** Disable Button hover state when button is disabled ([#830](https://github.com/themesberg/flowbite-react/issues/830)) ([2b45084](https://github.com/themesberg/flowbite-react/commit/2b45084a82851d7e96e21cf75a2c8a1d1fa94e10)), closes [#827](https://github.com/themesberg/flowbite-react/issues/827) -* **components/navbar:** fix theme interface ([bc280fc](https://github.com/themesberg/flowbite-react/commit/bc280fc4fc380ec61aa67b57090a1d8bed43a488)) -* **textinput.tsx:** TextInput padding when having right/left icons ([#832](https://github.com/themesberg/flowbite-react/issues/832)) ([d616e66](https://github.com/themesberg/flowbite-react/commit/d616e66e894bd80d5c95965047ea5c67ba45df91)), closes [#828](https://github.com/themesberg/flowbite-react/issues/828) - -### [0.4.9](https://github.com/themesberg/flowbite-react/compare/v0.4.7...v0.4.9) (2023-06-22) - - -### Features - -* replace `classnames` by `tailwind-merge` ([#816](https://github.com/themesberg/flowbite-react/issues/816)) ([7461173](https://github.com/themesberg/flowbite-react/commit/7461173ddb2afae9f66b9a4475b4333adef1e163)) - - -### Bug Fixes - -* **paginationbutton.tsx:** button now has type button ([#811](https://github.com/themesberg/flowbite-react/issues/811)) ([470c359](https://github.com/themesberg/flowbite-react/commit/470c3594c26706fff17a4e9932850e51d6e3e4a5)), closes [#809](https://github.com/themesberg/flowbite-react/issues/809) -* **src/components/navbar:** change default `` icon ([#819](https://github.com/themesberg/flowbite-react/issues/819)) ([6bc0de9](https://github.com/themesberg/flowbite-react/commit/6bc0de946c093863eab6386c26efc38779cb48fe)), closes [#818](https://github.com/themesberg/flowbite-react/issues/818) [/stackoverflow.com/questions/72146352/vitest-defineconfig-test-does-not-exist-in-type-userconfigexport/73106019#73106019](https://github.com/themesberg//stackoverflow.com/questions/72146352/vitest-defineconfig-test-does-not-exist-in-type-userconfigexport/73106019/issues/73106019) - -### [0.4.8](https://github.com/themesberg/flowbite-react/compare/v0.4.7...v0.4.8) (2023-06-22) - - -### Features - -* replace `classnames` by `tailwind-merge` ([#816](https://github.com/themesberg/flowbite-react/issues/816)) ([7461173](https://github.com/themesberg/flowbite-react/commit/7461173ddb2afae9f66b9a4475b4333adef1e163)) - - -### Bug Fixes - -* **paginationbutton.tsx:** button now has type button ([#811](https://github.com/themesberg/flowbite-react/issues/811)) ([470c359](https://github.com/themesberg/flowbite-react/commit/470c3594c26706fff17a4e9932850e51d6e3e4a5)), closes [#809](https://github.com/themesberg/flowbite-react/issues/809) - -### [0.4.7](https://github.com/themesberg/flowbite-react/compare/v0.4.4...v0.4.7) (2023-06-01) - - -### Features - -* **pagination.tsx:** next and previous buttons should disable when on 1 and last page respectively ([#731](https://github.com/themesberg/flowbite-react/issues/731)) ([8e8531b](https://github.com/themesberg/flowbite-react/commit/8e8531b2a1dfefcf7c9871dfa8fd441337baae6e)), closes [#726](https://github.com/themesberg/flowbite-react/issues/726) [#726](https://github.com/themesberg/flowbite-react/issues/726) - - -### Bug Fixes - -* **button.tsx:** make prop theme work ([#746](https://github.com/themesberg/flowbite-react/issues/746)) ([1b07a76](https://github.com/themesberg/flowbite-react/commit/1b07a760e5b1394c036ae212403f49d2a631d4fb)) -* **component:** fix Label component disabled property not applying theme styles ([#763](https://github.com/themesberg/flowbite-react/issues/763)) ([8d6d79e](https://github.com/themesberg/flowbite-react/commit/8d6d79ef92ff4b3482151c5428ea3b4aa0b7e637)), closes [#762](https://github.com/themesberg/flowbite-react/issues/762) -* **dropdown:** add type button in dropdown ([#757](https://github.com/themesberg/flowbite-react/issues/757)) ([974c126](https://github.com/themesberg/flowbite-react/commit/974c126e7e72833e2fde1bb9a631e4fcea6aa7af)), closes [#756](https://github.com/themesberg/flowbite-react/issues/756) -* **dropdown:** fix dropdown menu items container width ([#714](https://github.com/themesberg/flowbite-react/issues/714)) ([d13c77c](https://github.com/themesberg/flowbite-react/commit/d13c77c68960ed97828b5f9592fdb6d870a8a74d)), closes [#575](https://github.com/themesberg/flowbite-react/issues/575) [#575](https://github.com/themesberg/flowbite-react/issues/575) [#575](https://github.com/themesberg/flowbite-react/issues/575) [#575](https://github.com/themesberg/flowbite-react/issues/575) [#575](https://github.com/themesberg/flowbite-react/issues/575) -* making ToggleSwitch color prop as keyof FlowbiteColors ([#741](https://github.com/themesberg/flowbite-react/issues/741)) ([e3e2112](https://github.com/themesberg/flowbite-react/commit/e3e21126a4e38576c347f2815fb4ee51f1b1266b)) -* **modal:** fixed a bug that disallowed users to set the position of a modal ([#766](https://github.com/themesberg/flowbite-react/issues/766)) ([5200ecd](https://github.com/themesberg/flowbite-react/commit/5200ecd9df760012eedb05cbe51359db2c60c8d1)), closes [#760](https://github.com/themesberg/flowbite-react/issues/760) -* **Modal:** modal scrollbar overflow style issue fixed ([#769](https://github.com/themesberg/flowbite-react/issues/769)) ([746098d](https://github.com/themesberg/flowbite-react/commit/746098d26dd3da47982e43e7e6d27044dde4a05a)) -* **modal:** overflow bug fix ([#718](https://github.com/themesberg/flowbite-react/issues/718)) ([9e4e43a](https://github.com/themesberg/flowbite-react/commit/9e4e43abe17c7ea0d24b891003f41d11241f546f)), closes [#537](https://github.com/themesberg/flowbite-react/issues/537) -* pagination button not being highlighted correctly ([#725](https://github.com/themesberg/flowbite-react/issues/725)) ([53c1280](https://github.com/themesberg/flowbite-react/commit/53c1280f7b93c91413f0fb9fc2992e184591c6b3)) -* **src/components/*:** replace `tsconfig.json` `paths` by relative paths ([6efd448](https://github.com/themesberg/flowbite-react/commit/6efd448ddfa647e52c3bb0927285006ba06cffc8)), closes [#772](https://github.com/themesberg/flowbite-react/issues/772) -* **theme:** typo in bottom-center ([#717](https://github.com/themesberg/flowbite-react/issues/717)) ([89d58dc](https://github.com/themesberg/flowbite-react/commit/89d58dc03727d150e73ec753748eb98640bc84a3)) -* **tsconfig.lib:** compile to react-jsx for npm ([389dd1d](https://github.com/themesberg/flowbite-react/commit/389dd1d414feb7f96c28cfd8fb6b00efc55355a9)) - -### [0.4.6](https://github.com/themesberg/flowbite-react/compare/v0.4.6-beta.1...v0.4.6) (2023-05-26) - -### [0.4.5](https://github.com/themesberg/flowbite-react/compare/v0.4.4...v0.4.5) (2023-05-26) - -### Features - -- **pagination.tsx:** next and previous buttons should disable when on 1 and last page respectively ([#731](https://github.com/themesberg/flowbite-react/issues/731)) ([8e8531b](https://github.com/themesberg/flowbite-react/commit/8e8531b2a1dfefcf7c9871dfa8fd441337baae6e)), closes [#726](https://github.com/themesberg/flowbite-react/issues/726) [#726](https://github.com/themesberg/flowbite-react/issues/726) - -### Bug Fixes - -- **button.tsx:** make prop theme work ([#746](https://github.com/themesberg/flowbite-react/issues/746)) ([1b07a76](https://github.com/themesberg/flowbite-react/commit/1b07a760e5b1394c036ae212403f49d2a631d4fb)) -- **component:** fix Label component disabled property not applying theme styles ([#763](https://github.com/themesberg/flowbite-react/issues/763)) ([8d6d79e](https://github.com/themesberg/flowbite-react/commit/8d6d79ef92ff4b3482151c5428ea3b4aa0b7e637)), closes [#762](https://github.com/themesberg/flowbite-react/issues/762) -- **dropdown:** add type button in dropdown ([#757](https://github.com/themesberg/flowbite-react/issues/757)) ([974c126](https://github.com/themesberg/flowbite-react/commit/974c126e7e72833e2fde1bb9a631e4fcea6aa7af)), closes [#756](https://github.com/themesberg/flowbite-react/issues/756) -- **dropdown:** fix dropdown menu items container width ([#714](https://github.com/themesberg/flowbite-react/issues/714)) ([d13c77c](https://github.com/themesberg/flowbite-react/commit/d13c77c68960ed97828b5f9592fdb6d870a8a74d)), closes [#575](https://github.com/themesberg/flowbite-react/issues/575) [#575](https://github.com/themesberg/flowbite-react/issues/575) [#575](https://github.com/themesberg/flowbite-react/issues/575) [#575](https://github.com/themesberg/flowbite-react/issues/575) [#575](https://github.com/themesberg/flowbite-react/issues/575) -- making ToggleSwitch color prop as keyof FlowbiteColors ([#741](https://github.com/themesberg/flowbite-react/issues/741)) ([e3e2112](https://github.com/themesberg/flowbite-react/commit/e3e21126a4e38576c347f2815fb4ee51f1b1266b)) -- **Modal:** modal scrollbar overflow style issue fixed ([#769](https://github.com/themesberg/flowbite-react/issues/769)) ([746098d](https://github.com/themesberg/flowbite-react/commit/746098d26dd3da47982e43e7e6d27044dde4a05a)) -- **modal:** overflow bug fix ([#718](https://github.com/themesberg/flowbite-react/issues/718)) ([9e4e43a](https://github.com/themesberg/flowbite-react/commit/9e4e43abe17c7ea0d24b891003f41d11241f546f)), closes [#537](https://github.com/themesberg/flowbite-react/issues/537) -- pagination button not being highlighted correctly ([#725](https://github.com/themesberg/flowbite-react/issues/725)) ([53c1280](https://github.com/themesberg/flowbite-react/commit/53c1280f7b93c91413f0fb9fc2992e184591c6b3)) -- **theme:** typo in bottom-center ([#717](https://github.com/themesberg/flowbite-react/issues/717)) ([89d58dc](https://github.com/themesberg/flowbite-react/commit/89d58dc03727d150e73ec753748eb98640bc84a3)) - -### [0.4.4](https://github.com/themesberg/flowbite-react/compare/v0.4.1...v0.4.4) (2023-04-24) - -### Features - -- **/src/components/avatar:** allow custom sizes for `placeholderInitials` ([#659](https://github.com/themesberg/flowbite-react/issues/659)) ([#660](https://github.com/themesberg/flowbite-react/issues/660)) ([525b90d](https://github.com/themesberg/flowbite-react/commit/525b90dfd374f38e1c0a8527fcb92eabc849c186)) -- **/src/components/progress:** fix unclear label usage ([#468](https://github.com/themesberg/flowbite-react/issues/468)) ([#547](https://github.com/themesberg/flowbite-react/issues/547)) ([f9cad02](https://github.com/themesberg/flowbite-react/commit/f9cad02d6d9b0f699c420167ccb0e373913ef1ce)) -- **sidebar:** Allow to customize the Sidebar component with 'as' ([#703](https://github.com/themesberg/flowbite-react/issues/703)) ([54fc3c2](https://github.com/themesberg/flowbite-react/commit/54fc3c2046f45698542bb14fb95af467eafffa99)) -- **Toast:** add onClick prop to Toast.Toggle ([#607](https://github.com/themesberg/flowbite-react/issues/607)) ([#666](https://github.com/themesberg/flowbite-react/issues/666)) ([9be39d0](https://github.com/themesberg/flowbite-react/commit/9be39d0f4c2f8da9bdd54003d9a6f2d983d16345)) - -### Bug Fixes - -- **/lib/components/table:** prevent scrollbars around ``s ([#608](https://github.com/themesberg/flowbite-react/issues/608)) ([6f1869b](https://github.com/themesberg/flowbite-react/commit/6f1869bac86c1dcbda622413a197f67536803f53)) -- **/src/lib/components/\*:** add `displayName` to Forms components ([#656](https://github.com/themesberg/flowbite-react/issues/656)) ([329cb5a](https://github.com/themesberg/flowbite-react/commit/329cb5ad6383244f38e11cac57050dc684d6c3c5)), closes [#641](https://github.com/themesberg/flowbite-react/issues/641) -- **/src/lib/components/\*:** allow `theme={}` to contain partials ([#649](https://github.com/themesberg/flowbite-react/issues/649)) ([863a789](https://github.com/themesberg/flowbite-react/commit/863a789ed169cbfcbe05d5de7e9021a074872063)), closes [#646](https://github.com/themesberg/flowbite-react/issues/646) -- **/src/lib/components/Flowbite:** fix `window is not defined` in `next.js` ([#652](https://github.com/themesberg/flowbite-react/issues/652)) ([8fd9ddc](https://github.com/themesberg/flowbite-react/commit/8fd9ddcc5fcd8d5926c0e871dd25493d5d2c255f)) -- **/src/theme:** fix `` vertical positioning ([#658](https://github.com/themesberg/flowbite-react/issues/658)) ([5fec3ca](https://github.com/themesberg/flowbite-react/commit/5fec3ca0710b1883a4de622453c896346c8ab8c0)), closes [#601](https://github.com/themesberg/flowbite-react/issues/601) -- added aria-label to solve Buttons do not have an accessible name… ([#711](https://github.com/themesberg/flowbite-react/issues/711)) ([65b0aef](https://github.com/themesberg/flowbite-react/commit/65b0aef13143d5efc0bb00bd2ab221573ec4c2ef)) -- **button:** fixes outline button ([#654](https://github.com/themesberg/flowbite-react/issues/654)) ([eab6bbb](https://github.com/themesberg/flowbite-react/commit/eab6bbb6f78b46fb298e75344442b75f028d5cff)) -- **component/models:** prevent scrolling of body when modal is shown ([#700](https://github.com/themesberg/flowbite-react/issues/700)) ([ab6e96a](https://github.com/themesberg/flowbite-react/commit/ab6e96a58bc5b39b0b80cdc898c634f9fbab7462)), closes [#604](https://github.com/themesberg/flowbite-react/issues/604) -- **component/progressbar:** fix progressbar showing label when progress == 0 ([#698](https://github.com/themesberg/flowbite-react/issues/698)) ([1fa7542](https://github.com/themesberg/flowbite-react/commit/1fa7542c687fc164f1cdbd6362fd35ac978942f1)), closes [#668](https://github.com/themesberg/flowbite-react/issues/668) -- **components/accordion:** allow opened panel to be closed [#684](https://github.com/themesberg/flowbite-react/issues/684) - add accordion tests ([#705](https://github.com/themesberg/flowbite-react/issues/705)) ([7de751e](https://github.com/themesberg/flowbite-react/commit/7de751e4a80b144edd7f3fdc7eaa4ca2ea655dad)), closes [#618](https://github.com/themesberg/flowbite-react/issues/618) -- group list styling ([#668](https://github.com/themesberg/flowbite-react/issues/668)) ([a4f39f5](https://github.com/themesberg/flowbite-react/commit/a4f39f5608a46f6c0d4661fa383e70583ab7d592)) -- **lib/components/buttons:** Add `target` to `Button` props to open a link in new tab ([#631](https://github.com/themesberg/flowbite-react/issues/631)) ([ed74d13](https://github.com/themesberg/flowbite-react/commit/ed74d1361d03fd01f5eac2b3ca8faa382718afba)) -- **sidebar:** adds missing className ([#657](https://github.com/themesberg/flowbite-react/issues/657)) ([12fce11](https://github.com/themesberg/flowbite-react/commit/12fce11aad6bb0d2ca5058ce9fffee629038e542)) -- **tabs:** remove tab auto focus ([#712](https://github.com/themesberg/flowbite-react/issues/712)) ([6942943](https://github.com/themesberg/flowbite-react/commit/6942943639025a7310606af7fa6c2ffa68755d84)), closes [#612](https://github.com/themesberg/flowbite-react/issues/612) [#612](https://github.com/themesberg/flowbite-react/issues/612) - -### [0.4.3](https://github.com/themesberg/flowbite-react/compare/v0.4.2...v0.4.3) (2023-04-05) - -### Features - -- **Toast:** add onClick prop to Toast.Toggle ([#607](https://github.com/themesberg/flowbite-react/issues/607)) ([#666](https://github.com/themesberg/flowbite-react/issues/666)) ([9be39d0](https://github.com/themesberg/flowbite-react/commit/9be39d0f4c2f8da9bdd54003d9a6f2d983d16345)) - -### [0.4.2](https://github.com/themesberg/flowbite-react/compare/v0.4.1...v0.4.2) (2023-03-08) - -### Features - -- **/src/components/avatar:** allow custom sizes for `placeholderInitials` ([#659](https://github.com/themesberg/flowbite-react/issues/659)) ([#660](https://github.com/themesberg/flowbite-react/issues/660)) ([525b90d](https://github.com/themesberg/flowbite-react/commit/525b90dfd374f38e1c0a8527fcb92eabc849c186)) -- **/src/components/progress:** fix unclear label usage ([#468](https://github.com/themesberg/flowbite-react/issues/468)) ([#547](https://github.com/themesberg/flowbite-react/issues/547)) ([f9cad02](https://github.com/themesberg/flowbite-react/commit/f9cad02d6d9b0f699c420167ccb0e373913ef1ce)) - -### Bug Fixes - -- **/src/lib/components/\*:** add `displayName` to Forms components ([#656](https://github.com/themesberg/flowbite-react/issues/656)) ([329cb5a](https://github.com/themesberg/flowbite-react/commit/329cb5ad6383244f38e11cac57050dc684d6c3c5)), closes [#641](https://github.com/themesberg/flowbite-react/issues/641) -- **/src/lib/components/\*:** allow `theme={}` to contain partials ([#649](https://github.com/themesberg/flowbite-react/issues/649)) ([863a789](https://github.com/themesberg/flowbite-react/commit/863a789ed169cbfcbe05d5de7e9021a074872063)), closes [#646](https://github.com/themesberg/flowbite-react/issues/646) -- **/src/lib/components/Flowbite:** fix `window is not defined` in `next.js` ([#652](https://github.com/themesberg/flowbite-react/issues/652)) ([8fd9ddc](https://github.com/themesberg/flowbite-react/commit/8fd9ddcc5fcd8d5926c0e871dd25493d5d2c255f)) -- **/src/theme:** fix `` vertical positioning ([#658](https://github.com/themesberg/flowbite-react/issues/658)) ([5fec3ca](https://github.com/themesberg/flowbite-react/commit/5fec3ca0710b1883a4de622453c896346c8ab8c0)), closes [#601](https://github.com/themesberg/flowbite-react/issues/601) -- **button:** fixes outline button ([#654](https://github.com/themesberg/flowbite-react/issues/654)) ([eab6bbb](https://github.com/themesberg/flowbite-react/commit/eab6bbb6f78b46fb298e75344442b75f028d5cff)) -- **lib/components/buttons:** Add `target` to `Button` props to open a link in new tab ([#631](https://github.com/themesberg/flowbite-react/issues/631)) ([ed74d13](https://github.com/themesberg/flowbite-react/commit/ed74d1361d03fd01f5eac2b3ca8faa382718afba)) -- **sidebar:** adds missing className ([#657](https://github.com/themesberg/flowbite-react/issues/657)) ([12fce11](https://github.com/themesberg/flowbite-react/commit/12fce11aad6bb0d2ca5058ce9fffee629038e542)) - -### [0.4.1](https://github.com/themesberg/flowbite-react/compare/v0.3.8...v0.4.1) (2023-03-03) - -### ⚠ BREAKING CHANGES - -- **/lib/components/flowbite:** ThemeProps no longer includes usePreferences -- **theme:** Like in #500, this version permanently changes the `FlowbiteTheme` for numerous - components. - -The philosophy is that themes will more clearly reflect the component's structure. - -For example, an `` can contain any number of `` or `` -sections. The theme used to look like: - -```js -accordion: { - base: "..", - content: "..", - flush: "..", - title: "..", -} -``` - -And now, the theme for an `` looks like: - -``` -js -accordion: { - root: { - base: "..", - flush: "..", - }, - content: "..", - title: "..", -} -``` - -So now the options in the theme which apply to the `` itself will always be found under -`root`. Likewise, `` can be themed via the `content` subsection. - -This ultimately will apply to all components. - -- ci(eslint): remove `prettier` plugins for `eslint` - -Instead, use `prettier-plugin-tailwindcss`, which is sufficient. - -- refactor(/lib/\*): use `yarn prettier` with `prettier-plugin-tailwindcss` - -- fix(/lib/components/\*.spec): resolve test errors caused by migrating theme - -- feat(/lib/components/\*): add `theme={}` attribute to components that need it - -### Features - -- **/lib/components/flowbite:** remove `usePreferences` ([#582](https://github.com/themesberg/flowbite-react/issues/582)) ([77cbc27](https://github.com/themesberg/flowbite-react/commit/77cbc27aa5d42bcff1bdd54c3b5c35e37ff039a0)), closes [#581](https://github.com/themesberg/flowbite-react/issues/581) [#565](https://github.com/themesberg/flowbite-react/issues/565) [#581](https://github.com/themesberg/flowbite-react/issues/581) [#565](https://github.com/themesberg/flowbite-react/issues/565) -- **/lib/components/timeline:** change `` to a `
` ([#603](https://github.com/themesberg/flowbite-react/issues/603)) ([720c8ef](https://github.com/themesberg/flowbite-react/commit/720c8ef6c707837372dddf33e9e4a73d42caea1e)), closes [#602](https://github.com/themesberg/flowbite-react/issues/602) -- **/lib/theme:** add Tailwind CSS colors to ``s ([#586](https://github.com/themesberg/flowbite-react/issues/586)) ([05bde49](https://github.com/themesberg/flowbite-react/commit/05bde49a7fe27e456b7e3da631424705beeaabb8)), closes [#473](https://github.com/themesberg/flowbite-react/issues/473) [#473](https://github.com/themesberg/flowbite-react/issues/473) [#473](https://github.com/themesberg/flowbite-react/issues/473) -- **/lib/theme:** add Tailwind CSS colors to ``s ([#617](https://github.com/themesberg/flowbite-react/issues/617)) ([f00628f](https://github.com/themesberg/flowbite-react/commit/f00628f95059f7e4e18bbe069ceb5573471dc36d)) -- **/lib/theme:** add Tailwind CSS colors to ` -
- ); -} -``` - -### Next steps - -#### Next.js - -If you're using Next.js, you can follow the [Next.js install guide](https://flowbite.com/docs/guides/next-js/), which includes a [Next.js starter project](https://github.com/tulupinc/flowbite-next-starter) with Flowbite React already set up. - -#### Dark mode - -If you want to add a dark mode switcher to your app, you can follow the [dark mode guide](https://flowbite.com/docs/customize/dark-mode/). - -#### Customization - -If you want to customize Flowbite React component, you can follow the [theme guide](https://flowbite.com/docs/customize/theming/). - -#### Contributing - -If you want to contribute to Flowbite React, you can follow the [contributing guide](https://github.com/themesberg/flowbite-react/blob/main/CONTRIBUTING.md). - -## Components - -**Please note that some components in the vanilla Flowbite library are not yet available in Flowbite React.** - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AccordionAlertAvatar
- - React Accordion - - - - React Alert - - - - React Avatar - -
BannerBadgeBreadcrumb
- - React Banner - - - - React Badge - - - - React Breadcrumb - -
ButtonButton groupCard
- - React Button - - - - React Button group - - - - React Card - -
CarouselDatepickerDropdown
- - React Carousel - - - - React Datepicker - - - - React Dropdown - -
FooterFormsList group
- - React Footer - - - - React Forms - - - - React List group - -
ModalNavbarPagination
- - React Modal - - - - React Navbar - - - - React Pagination - -
Progress barRatingSidebar
- - React Progress bar - - - - React Rating - - - - React Sidebar - -
SpinnerTableTabs
- - React Spinner - - - - React Table - - - - React Tabs - -
TooltipTimelineToast
- - React Tooltip - - - - React Timeline - - - - React Toast - -
Sticky Banner
- - React Banner - -
- -## Community - -If you need help or just want to discuss about the library join the community on Github: - -⌨️ [Discuss about Flowbite on GitHub](https://github.com/themesberg/flowbite/discussions) - -For casual chatting with others using the library: - -πŸ’¬ [Join the Flowbite Discord Server](https://discord.gg/4eeurUVvTy) - -## Contributing - -Thank you for your interest in helping! Visit our [guide on contributing](https://github.com/themesberg/flowbite-react/blob/main/CONTRIBUTING.md) to get started. - -## Figma - -If you need the Figma files for the components you can check out our website for more information: - -🎨 [Get access to the Figma design files](https://flowbite.com/figma/) - -## Copyright and license - -The Flowbite name and logos are trademarks of Bergside Srl. - -πŸ“ [Read about the licensing terms](https://flowbite.com/docs/getting-started/license/) -πŸ“€ [Brand guideline and trademark usage agreement](https://flowbite.com/brand/) diff --git a/README.md b/README.md new file mode 120000 index 000000000..2624f461c --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +packages/ui/README.md \ No newline at end of file diff --git a/app/docs/[[...slug]]/page.tsx b/app/docs/[[...slug]]/page.tsx deleted file mode 100644 index e438de167..000000000 --- a/app/docs/[[...slug]]/page.tsx +++ /dev/null @@ -1,265 +0,0 @@ -import { allDocs, type Doc } from 'contentlayer/generated'; -import type { Metadata } from 'next'; -import Image from 'next/image'; -import Link from 'next/link'; -import { notFound } from 'next/navigation'; -import Markdown from 'react-markdown'; -import { CarbonAds } from '~/components/carbon-ads'; -import { Mdx } from '~/components/mdx'; -import { DOCS_SIDEBAR } from '~/data/docs-sidebar'; -import { Footer } from '~/src'; - -interface Props { - params: { - slug: string[]; - }; -} - -function getDoc({ params }: Props) { - const slug = params.slug?.join('/') || ''; - - return allDocs.find((doc) => doc.url === slug); -} - -export function generateMetadata({ params }: Props): Metadata { - const doc = getDoc({ params }); - - if (!doc) return {}; - - return { - title: doc.title, - description: doc.description, - openGraph: { - type: 'article', - title: doc.title, - description: doc.description, - images: 'https://flowbite.s3.amazonaws.com/github/flowbite-react.png', - }, - twitter: { - card: 'summary_large_image', - title: doc.title, - description: doc.description, - images: ['https://flowbite.s3.amazonaws.com/github/flowbite-react.png'], - }, - }; -} - -export function generateStaticParams() { - return allDocs.map((doc) => ({ slug: doc.url.split('/') })); -} - -export default function DocPage({ params }: Props) { - const doc = getDoc({ params }); - - if (!doc) notFound(); - - return ( -
-
-
- - - -
- - - -
- -
- ); -} - -interface ContentLayoutProps { - title: string; - description: string; - children: React.ReactNode; -} - -function ContentLayout({ title, description, children }: ContentLayoutProps) { - return ( -
-
-

- {title} -

-

{description}

-
-
- {children} -
-
- ); -} - -function DocsPager({ doc }: { doc: Doc }) { - const DOCS_SIDEBAR_ITEMS = DOCS_SIDEBAR.flatMap((section) => section.items); - const currentDocIndex = DOCS_SIDEBAR_ITEMS.findIndex((item) => item.href === `/${doc._raw.flattenedPath}`); - const prevDoc = DOCS_SIDEBAR_ITEMS[currentDocIndex - 1]; - const nextDoc = DOCS_SIDEBAR_ITEMS[currentDocIndex + 1]; - - return ( - - ); -} - -function DocFooter() { - return ( -
-
-
-
- - - Flowbite React - -

- Flowbite is an ecosystem built on top of Tailwind CSS including a component library, block sections, a - Figma design system and other resources. -

-

- Code licensed{' '} - - MIT - - , docs{' '} - - CC BY 3.0 - -

-
-
-
- - - - GitHub - - - Flowbite - - - Tailwind CSS - - - Figma - - -
-
- - - - Discord - - - Github Discussions - - -
-
- - - - License - - - Brand guideline - - -
-
-
- -
- -
-
-
- ); -} - -function ToC({ doc }: { doc: Doc }) { - return ( -
-
-
-

- On this page -

- -
-
-
- ); -} diff --git a/app/docs/layout.tsx b/app/docs/layout.tsx deleted file mode 100644 index 1fd965024..000000000 --- a/app/docs/layout.tsx +++ /dev/null @@ -1,216 +0,0 @@ -'use client'; - -import Image from 'next/image'; -import Link from 'next/link'; -import { usePathname } from 'next/navigation'; -import type { PropsWithChildren } from 'react'; -import { useEffect, useState } from 'react'; -import { HiMenuAlt1, HiX } from 'react-icons/hi'; -import { twMerge } from 'tailwind-merge'; -import { Banner } from '~/components/banner'; -import { DocSearchInput } from '~/components/docsearch-input'; -import { NavbarIcons, NavbarLinks } from '~/components/navbar'; -import { DOCS_SIDEBAR, type DocsSidebarItem } from '~/data/docs-sidebar'; -import { Accordion, Badge, Navbar, Sidebar } from '~/src'; -import { isClient } from '~/src/helpers/is-client'; - -import '~/styles/docs.css'; - -interface DocsLayoutState { - isCollapsed: boolean; - setCollapsed: (collapsed: boolean) => void; -} - -export default function DocsLayout({ children }: PropsWithChildren) { - const [isCollapsed, setCollapsed] = useState(true); - - const state: DocsLayoutState = { - isCollapsed, - setCollapsed, - }; - - return ( -
-
- - -
- -
{children}
-
-
-
- ); -} - -function DocsNavbar({ isCollapsed, setCollapsed }: DocsLayoutState) { - return ( - -
- {isCollapsed ? ( - - ) : ( - - )} - - Flowbite React - - - - Flowbite React - -
- -
-
-
- - -
-
- ); -} - -function DocsSidebar({ isCollapsed, setCollapsed }: DocsLayoutState) { - const pathname = usePathname(); - - // collapse sidebar on small screens when navigating to a new page - useEffect(() => { - if (isClient() && window.innerWidth < 768) { - setCollapsed(true); - } - }, [pathname, setCollapsed]); - - return ( - <> -
- - - {DOCS_SIDEBAR.map((section) => ( - - {section.items.map((item) => ( - - ))} - - ))} - - -
- {!isCollapsed && ( - // eslint-disable-next-line jsx-a11y/no-static-element-interactions -
setCollapsed(true)} - onKeyUp={(key) => key.code === 'Escape' && setCollapsed(true)} - className="fixed inset-0 z-40 bg-gray-900/50 dark:bg-gray-900/60 lg:hidden" - /> - )} - - ); -} - -function SidebarSection({ title, href, children }: PropsWithChildren<{ title: string; href: string }>) { - const pathname = usePathname(); - - return ( - - - - {title} - - - {children} - - - - ); -} - -function SidebarItem({ title, href, isNew, isExternal }: DocsSidebarItem) { - return ( - - {isNew ? {title} : title} - - ); -} - -function SidebarLink({ children, href, isExternal }: PropsWithChildren<{ href: string; isExternal?: boolean }>) { - const pathname = usePathname(); - - return ( - *]:px-0', - pathname === href - ? 'text-primary-700 hover:text-primary-700 dark:text-primary-500' - : 'text-gray-500 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white', - )} - > - {children} - - ); -} - -function NewBadge({ children }: PropsWithChildren) { - return ( - - {children} - - New - - - ); -} diff --git a/app/layout.tsx b/app/layout.tsx deleted file mode 100644 index fccffdca4..000000000 --- a/app/layout.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import { Inter as InterFont } from 'next/font/google'; -import type { Metadata, NextPage, Viewport } from 'next/types'; -import type { FC, PropsWithChildren } from 'react'; -import { ThemeModeScript } from '~/src'; - -import '~/styles/globals.css'; - -const interFont = InterFont({ - subsets: ['latin'], - variable: '--font-inter', -}); - -export const metadata: Metadata = { - description: - 'Flowbite React is an open-source UI component library built with React components, Tailwind CSS utility classes and based on the Flowbite design system and components.', - icons: { - icon: [ - { url: '/favicon-32x32.png', type: 'image/png', sizes: '32x32' }, - { url: '/favicon-16x16.png', type: 'image/png', sizes: '16x16' }, - ], - shortcut: '/favicon.ico', - apple: [{ url: '/apple-touch-icon.png', sizes: '180x180' }], - }, - manifest: '/site.webmanifest', - other: { - charSet: 'utf-8', - lang: 'en', - }, - title: 'Flowbite React - UI Component Library', - openGraph: { - description: - 'Flowbite React is an open-source UI component library built with React components, Tailwind CSS utility classes and based on the Flowbite design system and components.', - images: 'https://flowbite.s3.amazonaws.com/github/flowbite-react.png', - title: 'Flowbite React - UI Component Library', - }, - twitter: { - card: 'summary_large_image', - title: 'Flowbite React - UI component library', - description: - 'Flowbite React is an open-source UI component library built with React components, Tailwind CSS utility classes and based on the Flowbite design system and components.', - creator: '@zoltanszogyenyi', - images: ['https://flowbite.s3.amazonaws.com/github/flowbite-react.png'], - }, -}; - -export const viewport: Viewport = { - width: 'device-width', - initialScale: 1, - maximumScale: 1, - themeColor: [ - { media: '(prefers-color-scheme: light)', color: '#ffffff' }, - { media: '(prefers-color-scheme: dark)', color: '#1f2937' }, - ], -}; - -const RootLayout: NextPage = ({ children }) => { - return ( - - - - - - {children} - - - - ); -}; - -const FathomScript: FC = () => { - return