diff --git a/.gitignore b/.gitignore index 69368fbb..f76bb847 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ dist dist-ssr *.local .history -.env \ No newline at end of file +.env +*storybook.log +storybook-static diff --git a/.storybook/.babelrc b/.storybook/.babelrc deleted file mode 100644 index c1ee5e3c..00000000 --- a/.storybook/.babelrc +++ /dev/null @@ -1,10 +0,0 @@ -{ - "presets": [ - ["@babel/preset-env", { "modules": false }], - "@babel/preset-react", - "@babel/preset-typescript" - ], - "plugins": [ - "styled-jsx/babel" - ] - } \ No newline at end of file diff --git a/.storybook/StoryLayout.tsx b/.storybook/StoryLayout.tsx deleted file mode 100644 index 159c13a9..00000000 --- a/.storybook/StoryLayout.tsx +++ /dev/null @@ -1,107 +0,0 @@ -import React, { ReactNode, useEffect, useMemo, useState } from 'react' -import Highlight, { defaultProps } from 'prism-react-renderer' -import theme from 'prism-react-renderer/themes/vsDark' - -import { useGlobalTheme } from './theming' - -import CodeMockup from '../src/CodeMockup' -import Navbar from '../src/Navbar' -import Tabs from '../src/Tabs' -import Theme from '../src/Theme' - -type Props = { - children: ReactNode | ReactNode[] - title: string - description: string - source: string -} - -const StoryLayout = ({ children, title, description, source }: Props) => { - const globalTheme = useGlobalTheme() - - useEffect(() => { - document - .getElementsByTagName('html')[0] - .setAttribute('data-theme', globalTheme) - }, [globalTheme]) - - const Code = () => - useMemo( - () => ( - - {({ tokens, getLineProps, getTokenProps }) => ( -
-              {tokens.map((line, i) => (
-                
- {line.map((token, key) => ( - - ))} -
- ))} -
- )} -
- ), - [theme, source] - ) - - return ( - - - - react-daisyui - - - -
-

{title}

-

{description}

-
- {/* Mobile view */} -
- {children} - - - -
- - {/* Desktop view */} -
- - -
- {children} -
-
- - - - - -
-
-
-
-
- ) -} - -export default StoryLayout diff --git a/.storybook/docs/DocsWrapper.tsx b/.storybook/docs/DocsWrapper.tsx deleted file mode 100644 index 0da222a7..00000000 --- a/.storybook/docs/DocsWrapper.tsx +++ /dev/null @@ -1,9 +0,0 @@ -import React from 'react' - -import Theme from '../../src/Theme' -import { useGlobalTheme } from '../../.storybook/theming/useGlobalTheme' - -export const DocsWrapper = ({ children }: { children: React.ReactNode }) => { - const theme = useGlobalTheme() - return {children} -} diff --git a/.storybook/docs/components/CopyButton.tsx b/.storybook/docs/components/CopyButton.tsx deleted file mode 100644 index f26c1e28..00000000 --- a/.storybook/docs/components/CopyButton.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import React, { useEffect, useState } from 'react' -import { ButtonProps } from '../../../src/Button' -import Button from '../../../src/Button' - -export type CopyButtonProps = ButtonProps & { - text?: string -} - -export const CopyButton = ({ text = '', ...props }: CopyButtonProps) => { - const [isCopied, setIsCopied] = useState(false) - - const copy = async () => { - navigator.clipboard - .writeText(text) - .then(() => setIsCopied(true)) - .catch(() => setIsCopied(false)) - } - - const handleClick: React.MouseEventHandler = () => { - copy() - } - - return ( - - ) -} diff --git a/.storybook/docs/pages/Welcome.mdx b/.storybook/docs/pages/Welcome.mdx deleted file mode 100644 index 4cbb9a6c..00000000 --- a/.storybook/docs/pages/Welcome.mdx +++ /dev/null @@ -1,9 +0,0 @@ -import { Meta } from '@storybook/blocks' - -import { HomePage } from './Welcome' - - - -
- -
diff --git a/.storybook/docs/pages/Welcome.tsx b/.storybook/docs/pages/Welcome.tsx deleted file mode 100644 index 48257c91..00000000 --- a/.storybook/docs/pages/Welcome.tsx +++ /dev/null @@ -1,131 +0,0 @@ -import React from 'react' - -import Button from '../../../src/Button' -import CodeMockup from '../../../src/CodeMockup' -import Hero from '../../../src/Hero' -import Link from '../../../src/Link' -import Tooltip from '../../../src/Tooltip' - -import { DocsWrapper } from '../DocsWrapper' -import { CopyButton } from '../components/CopyButton' - -import '../styles/welcome.css' - -const githubMark = ( - -) - -const checkMark = ( - - - -) - -export const HomePage = () => { - const bulletPoints = [ - 'React components', - 'Faster development', - 'Cleaner JSX/TSX', - 'Customizable and themeable', - ] - - return ( - -
- - - - -
-

-
react-daisyUI
-
- A React component library for{' '} - - daisyUI - - ,
- the most popular, free and open-source
- Tailwind CSS component library -
-

-
-
- {bulletPoints.map((point, index) => ( -
- {checkMark} {point} -
- ))} -
- - - - npm i daisyui react-daisyui{' '} - - - - - -
-
- - -
-
-
-
-
- ) -} diff --git a/.storybook/docs/styles/welcome.css b/.storybook/docs/styles/welcome.css deleted file mode 100644 index bea20af3..00000000 --- a/.storybook/docs/styles/welcome.css +++ /dev/null @@ -1,21 +0,0 @@ -@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); - -body { - font-family: 'Montserrat', sans-serif !important; -} - -#docs-root, -#story-root, -.sbdocs, -.sbdocs-wrapper, -.sbdocs-content { - width: 100% !important; - height: 100% !important; - padding: 0 !important; - margin: 0 !important; - max-width: none !important; -} - -:focus { - outline: none; -} diff --git a/.storybook/main.ts b/.storybook/main.ts index c42a9af9..8b12236c 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -1,22 +1,24 @@ -import { StorybookConfig } from '@storybook/react-vite'; +import type { StorybookConfig } from '@storybook/react-vite'; const config: StorybookConfig = { - stories: ['./docs/pages/Welcome.mdx', "../src/**/*.stories.@(js|jsx|ts|tsx)"], - addons: [{ - name: '@storybook/addon-styling', - options: { - implementation: require("postcss"), - }, - }, { - name: '@storybook/addon-essentials', - options: { - backgrounds: false - } - }], - framework: '@storybook/react-vite', - docs: { - autodocs: false - } + stories: [ + '../src/**/*.mdx', + '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)', + ], + addons: [ + '@storybook/addon-docs', + ], + core: { + builder: '@storybook/builder-vite', + }, + framework: { + name: '@storybook/react-vite', + options: {}, + }, + typescript: { + check: false, + reactDocgen: 'react-docgen-typescript', + }, }; -export default config; +export default config; \ No newline at end of file diff --git a/.storybook/manager.ts b/.storybook/manager.ts deleted file mode 100644 index d2a2be8b..00000000 --- a/.storybook/manager.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { addons } from '@storybook/manager-api' -import theme from './theme' - -addons.setConfig({ - theme: theme, -}) diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html deleted file mode 100644 index 7d02d222..00000000 --- a/.storybook/preview-head.html +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/.storybook/preview.ts b/.storybook/preview.ts new file mode 100644 index 00000000..49f343d1 --- /dev/null +++ b/.storybook/preview.ts @@ -0,0 +1,15 @@ +import '../src/styles.css'; + +const preview = { + parameters: { + actions: { argTypesRegex: '^on[A-Z].*' }, + controls: { + matchers: { + color: /(background|color)$/i, + date: /Date$/, + }, + }, + }, +}; + +export default preview; diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx deleted file mode 100644 index d0a05ac2..00000000 --- a/.storybook/preview.tsx +++ /dev/null @@ -1,82 +0,0 @@ -import React from 'react' -import type { Preview } from '@storybook/react' - -import StoryLayout from './StoryLayout' - -import '../src/styles.css' -import { DEFAULT_THEME, STORAGE_KEY, THEME_PICKER_LIST } from './theming' -import theme from './theme' - -const preview: Preview = { - parameters: { - actions: { argTypesRegex: '^on[A-Z].*' }, - previewTabs: { - 'storybook/docs/panel': { hidden: true }, - }, - controls: { - matchers: { - date: /Date$/, - }, - }, - layout: 'fullscreen', - options: { - storySort: { - order: [ - 'Welcome', - 'Utils', - 'Actions', - 'Data Display', - 'Navigation', - 'Feedback', - 'Data Input', - 'Layout', - 'Mockup', - ], - }, - }, - themes: { - default: window.localStorage.getItem(STORAGE_KEY) || DEFAULT_THEME, - onChange: (theme) => { - // STORAGE_KEY does not work in onChange... not sure why - if (theme) { - window.localStorage.setItem( - 'sb-react-daisyui-preview-theme', - theme.class - ) - } else { - window.localStorage.removeItem('sb-react-daisyui-preview-theme') - } - }, - list: THEME_PICKER_LIST, - }, - docs: { - theme: theme, - options: { - layout: 'fullscreen', - }, - }, - }, - decorators: [ - (Story, options) => ( - \s*\{\s*/, ' ') - .replace(/\(.*args.*\)\s*=>\s*\{\s*\n/, ' ') - .replace(/^(\s*)return\s+/, '$1') - .replace(/_s\(\);/, '') - /* Removes the last occurence of a closing bracket (from the lambda) */ - .replace(/}([^}]*)$/, '$1') - /* Removes the last occurence of a semicolon */ - .replace(/;(?=[^;]*$)/, '')} - > - - - ), - ], -} - -export default preview diff --git a/.storybook/theme.ts b/.storybook/theme.ts deleted file mode 100644 index 39e22363..00000000 --- a/.storybook/theme.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { create, ThemeVars } from '@storybook/theming' - -const baseTheme: ThemeVars = { - base: 'dark', - brandTitle: 'react-daisyUI', - brandUrl: 'https://github.com/daisyui/react-daisyui', - brandImage: - 'https://raw.githubusercontent.com/saadeghi/files/main/daisyui/logo-4.svg', - - colorPrimary: '#3ABFF8', - colorSecondary: '#6419E6', - - // UI - appBg: '#222630', - appContentBg: '#191D24', - appBorderColor: '#323945', - - // Text Colors - textColor: '#A6ADBA', - - // Toolbar default and active colors - barTextColor: '#A6ADBA', - barSelectedColor: '#C3D0EA', - barBg: '#191D24', -} - -export default create(baseTheme) diff --git a/.storybook/theming/consts.ts b/.storybook/theming/consts.ts deleted file mode 100644 index 16cdc53e..00000000 --- a/.storybook/theming/consts.ts +++ /dev/null @@ -1,34 +0,0 @@ -export const DEFAULT_THEME = 'dark' -export const STORAGE_KEY = 'sb-react-daisyui-preview-theme' - -export const THEME_PICKER_LIST = [ - { name: 'light', class: 'light', color: '#570df8' }, - { name: 'dark', class: 'dark', color: '#793ef9' }, - { name: 'cupcake', class: 'cupcake', color: '#65c3c8' }, - { name: 'bumblebee', class: 'bumblebee', color: '#e0a82e' }, - { name: 'emerald', class: 'emerald', color: '#66cc8a' }, - { name: 'corporate', class: 'corporate', color: '#4b6bfb' }, - { name: 'synthwave', class: 'synthwave', color: '#e779c1' }, - { name: 'retro', class: 'retro', color: '#ef9995' }, - { name: 'cyberpunk', class: 'cyberpunk', color: '#ff7598' }, - { name: 'cmyk', class: 'cmyk', color: '#45AEEE' }, - { name: 'valentine', class: 'valentine', color: '#e96d7b' }, - { name: 'halloween', class: 'halloween', color: '#f28c18' }, - { name: 'garden', class: 'garden', color: '#5c7f67' }, - { name: 'forest', class: 'forest', color: '#1eb854' }, - { name: 'aqua', class: 'aqua', color: '#09ecf3' }, - { name: 'lofi', class: 'lofi', color: '#808080' }, - { name: 'pastel', class: 'pastel', color: '#d1c1d7' }, - { name: 'fantasy', class: 'fantasy', color: '#6e0b75' }, - { name: 'wireframe', class: 'wireframe', color: '#b8b8b8' }, - { name: 'black', class: 'black', color: '#333333' }, - { name: 'luxury', class: 'luxury', color: '#ffffff' }, - { name: 'dracula', class: 'dracula', color: '#ff79c6' }, - { name: 'autumn', class: 'autumn', color: '#8C0327' }, - { name: 'business', class: 'business', color: '#1C4E80' }, - { name: 'acid', class: 'acid', color: '#FF00F4' }, - { name: 'lemonade', class: 'lemonade', color: '#519903' }, - { name: 'night', class: 'night', color: '#3BBEF8' }, - { name: 'coffee', class: 'coffee', color: '#DD944C' }, - { name: 'winter', class: 'winter', color: '#067AFF' }, -] diff --git a/.storybook/theming/index.ts b/.storybook/theming/index.ts deleted file mode 100644 index 56759938..00000000 --- a/.storybook/theming/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './consts' -export * from './useGlobalTheme' diff --git a/.storybook/theming/useGlobalTheme.ts b/.storybook/theming/useGlobalTheme.ts deleted file mode 100644 index c2254878..00000000 --- a/.storybook/theming/useGlobalTheme.ts +++ /dev/null @@ -1,31 +0,0 @@ -import React, { useEffect, useState } from 'react' - -import { STORAGE_KEY, DEFAULT_THEME } from '.' - -export const useGlobalTheme = () => { - const [theme, setTheme] = useState( - window.localStorage.getItem(STORAGE_KEY) || DEFAULT_THEME - ) - - useEffect(() => { - const handleLocalStorageChange = () => { - let storageTheme = window.localStorage.getItem(STORAGE_KEY) - - if (!storageTheme) { - setTheme(DEFAULT_THEME) - } else { - setTheme(storageTheme) - } - } - - // Add listener - window.addEventListener('storage', handleLocalStorageChange) - - // Destory listener when unmounting - return () => { - window.removeEventListener('storage', handleLocalStorageChange) - } - }, []) - - return theme -} diff --git a/debug-storybook.log b/debug-storybook.log new file mode 100644 index 00000000..db305eb5 --- /dev/null +++ b/debug-storybook.log @@ -0,0 +1,138 @@ +[20:29:08.831] [INFO] Storybook Upgrade - v9.0.13 +[20:29:08.839] [INFO] detect-projects-spinner-start: Detecting projects... +[20:29:08.840] [DEBUG] Finding Storybook projects... +[20:29:08.974] [DEBUG] Found 1 Storybook projects +[20:29:08.974] [INFO] detect-projects-spinner: Detecting projects: 1 projects +[20:29:08.975] [DEBUG] Getting Storybook data... +[20:29:08.975] [DEBUG] Getting Storybook info... +[20:29:08.975] [DEBUG] Loading main config... +[20:29:09.002] [DEBUG] Getting stories paths... +[20:29:09.012] [DEBUG] Getting package manager... +[20:29:09.218] [DEBUG] Getting Storybook version... +[20:29:09.219] [DEBUG] /.storybook - Validating before version... 8.6.14 +[20:29:09.219] [DEBUG] /.storybook - Validating upgrade compatibility... +[20:29:09.219] [DEBUG] /.storybook - Fetching NPM version information... +[20:29:09.219] [DEBUG] Getting CLI versions from NPM for storybook... +[20:29:09.220] [DEBUG] Getting CLI versions from NPM for storybook@next... +[20:29:09.786] [DEBUG] /.storybook - Evaluating blockers... +[20:29:09.788] [DEBUG] Getting installed version for @storybook/experimental-addon-test... +[20:29:10.444] [INFO] detect-projects-spinner-stop: 1 project detected +[20:29:10.445] [DEBUG] Found 1 valid projects and 0 error projects +[20:29:10.445] [INFO] Upgrading from 8.6.14 to 9.0.13 +[20:29:10.451] [INFO] upgrade-dependencies-task-start: Fetching versions to update package.json files.. +[20:29:10.451] [DEBUG] Updating dependencies in /.storybook... +[20:29:10.456] [INFO] upgrade-dependencies-task: /package.json +[20:29:10.457] [DEBUG] { + "upgradedDependencies": [] +} +[20:29:10.457] [DEBUG] { + "upgradedDevDependencies": [ + "@storybook/addon-links@^9.0.13", + "@storybook/react@^9.0.13", + "@storybook/react-vite@^9.0.13", + "storybook@^9.0.13" + ] +} +[20:29:10.457] [DEBUG] { + "upgradedPeerDependencies": [] +} +[20:29:10.459] [DEBUG] Getting CLI versions from NPM for @storybook/addon-links... +[20:29:11.161] [DEBUG] Getting CLI versions from NPM for @storybook/react... +[20:29:12.955] [DEBUG] Getting CLI versions from NPM for @storybook/react-vite... +[20:29:14.686] [DEBUG] Using cached version for storybook... +[20:29:14.689] [INFO] upgrade-dependencies-task-success: Updated package versions in package.json files +[20:29:14.689] [INFO] detect-automigrations-task-start: Detecting automigrations... +[20:29:14.689] [DEBUG] Starting automigration collection across 1 projects and 15 fixes... +[20:29:14.695] [INFO] detect-automigrations-task: Checking automigrations for /.storybook... +[20:29:14.695] [DEBUG] Processing project: /.storybook +[20:29:14.695] [DEBUG] Checking fix eslintPlugin for project /.storybook... +[20:29:14.698] [DEBUG] Checking fix addon-mdx-gfm-remove for project /.storybook... +[20:29:14.698] [DEBUG] Checking fix addon-storysource-code-panel for project /.storybook... +[20:29:14.698] [DEBUG] Checking fix upgrade-storybook-related-dependencies for project /.storybook... +[20:29:14.698] [DEBUG] Checking for incompatible storybook packages... +[20:29:14.699] [DEBUG] Getting installed version for @storybook/addon-essentials... +[20:29:15.881] [DEBUG] An issue occurred while trying to find dependencies metadata using npm. +[20:29:15.881] [DEBUG] Getting CLI versions from NPM for @storybook/addon-essentials... +[20:29:17.620] [DEBUG] Checking fix initial-globals for project /.storybook... +[20:29:17.635] [DEBUG] Checking fix addon-a11y-addon-test for project /.storybook... +[20:29:17.636] [DEBUG] Checking fix consolidated-imports for project /.storybook... +[20:29:17.636] [DEBUG] Checking fix addon-experimental-test for project /.storybook... +[20:29:17.636] [DEBUG] Using cached installed version for @storybook/experimental-addon-test... +[20:29:17.636] [DEBUG] Checking fix rnstorybook-config for project /.storybook... +[20:29:17.636] [DEBUG] Checking fix remove-addon-interactions for project /.storybook... +[20:29:17.636] [DEBUG] Checking fix renderer-to-framework for project /.storybook... +[20:29:17.636] [DEBUG] Checking fix remove-essential-addons for project /.storybook... +[20:29:17.637] [DEBUG] Checking fix addon-a11y-parameters for project /.storybook... +[20:29:17.637] [DEBUG] Checking fix remove-docs-autodocs for project /.storybook... +[20:29:17.639] [DEBUG] Checking fix wrap-require for project /.storybook... +[20:29:17.648] [INFO] detect-automigrations-task: +Automigrations detected: +[20:29:17.653] [INFO] detect-automigrations-task: ✔ renderer-to-framework +[20:29:17.660] [INFO] detect-automigrations-task: ✔ remove-essential-addons +[20:29:17.664] [INFO] detect-automigrations-task: ✔ remove-docs-autodocs +[20:29:17.664] [INFO] detect-automigrations-task-success: 3 automigration(s) detected +[20:30:31.194] [PROMPT] Select automigrations to run {"choice":["renderer-to-framework","remove-essential-addons","remove-docs-autodocs"]} +[20:30:31.195] [INFO] automigrate-/.storybook-task-start: Running automigrations for /.storybook +[20:30:31.195] [DEBUG] +Migrating @storybook/react to @storybook/react-vite +[20:30:31.248] [DEBUG] Updating package.json files... +[20:30:31.258] [INFO] automigrate-/.storybook-task: ✔ renderer-to-framework +[20:30:31.260] [DEBUG] Uninstalling @storybook/addon-essentials +[20:30:31.261] [DEBUG] Removing '@storybook/addon-essentials' from main.js addons field. +[20:30:31.272] [DEBUG] Getting Storybook info... +[20:30:31.273] [DEBUG] Loading main config... +[20:30:31.275] [DEBUG] Getting stories paths... +[20:30:31.276] [DEBUG] Getting package manager... +[20:30:31.294] [DEBUG] Getting Storybook version... +[20:30:31.307] [INFO] automigrate-/.storybook-task: Verifying @storybook/addon-docs +[20:30:31.315] [INFO] automigrate-/.storybook-task: Installing @storybook/addon-docs@^9.0.13 +[20:30:31.315] [DEBUG] Getting CLI versions from NPM for @storybook/addon-docs... +[20:30:32.143] [INFO] automigrate-/.storybook-task: Adding '@storybook/addon-docs' to the "addons" field in +/Users/ankit/projects/per/react-daisyui/.storybook/main.ts +[20:30:32.160] [INFO] automigrate-/.storybook-task: ✔ remove-essential-addons +[20:30:32.167] [INFO] automigrate-/.storybook-task: 🔄 Updating docs parameter in main config file... +[20:30:32.177] [INFO] automigrate-/.storybook-task: ✔ remove-docs-autodocs +[20:30:32.177] [INFO] automigrate-/.storybook-task-success: Completed automigrations for /.storybook +[20:30:32.177] [INFO] Installing dependencies... +[20:30:32.177] [INFO] install-dependencies-task-start: Installing dependencies... +[20:30:39.847] [INFO] added 108 packages, removed 27 packages, changed 10 packages, and audited 1312 packages in 8s +[20:30:39.855] [INFO] install-dependencies-task: added 108 packages, removed 27 packages, changed 10 packages, and audited 1312 +packages in 8s +[20:30:39.855] [INFO] 309 packages are looking for funding + run `npm fund` for details + +2 moderate severity vulnerabilities + +To address all issues (including breaking changes), run: + npm audit fix --force + +Run `npm audit` for details. +[20:30:39.861] [INFO] install-dependencies-task: 309 packages are looking for funding +run `npm fund` for details + +2 moderate severity vulnerabilities + +To address all issues (including breaking changes), run: +npm audit fix --force + +Run `npm audit` for details. +[20:30:39.865] [INFO] Dependencies installed +[20:30:39.865] [INFO] install-dependencies-task-success: Dependencies installed +[20:30:39.865] [INFO] Checking the health of your project(s).. +[20:30:39.872] [ERROR] Failed to run doctor checks for project ./.storybook: +Error: No Storybook dependencies found in the package.json +[20:30:39.877] [ERROR] /.storybook: 1 problem found +[20:30:39.882] [INFO] Failed to run doctor checks: No Storybook dependencies found in the package.json +[20:30:39.882] [INFO] Configuration Error +[20:30:39.888] [INFO] Failed to run doctor checks: No Storybook dependencies found in the package.json +[20:30:39.893] [INFO] Storybook doctor is complete! +[20:30:39.898] [INFO] You can always recheck the health of your project(s) by running: +npx storybook doctor +[20:30:39.903] [INFO] The upgrade is complete! +[20:30:39.909] [INFO] Your project(s) have been upgraded successfully, but some issues were found which need your attention, please check Storybook doctor logs above. +[20:30:39.929] [INFO] If you want to learn more about the automigrations that executed in your project(s), please check the following links: + +• renderer-to-framework +• remove-essential-addons +• remove-docs-autodocs +[20:30:39.935] [INFO] For a full list of changes, please check our migration guide: https://storybook.js.org/docs/migration-guide \ No newline at end of file diff --git a/docs/assets/Accordion.stories-4961aa02.js b/docs/assets/Accordion.stories-4961aa02.js deleted file mode 100644 index 378622c9..00000000 --- a/docs/assets/Accordion.stories-4961aa02.js +++ /dev/null @@ -1,164 +0,0 @@ -import{t as M,a as o,j as e,F as S}from"./tw-merge-4486aaf0.js";import{r as D}from"./index-f46741a2.js";import{c as W}from"./clsx.m-1229b3e0.js";import{C as q,a as V}from"./CollapseContent-4c7c3cf3.js";import{J as E}from"./Join-455a80a9.js";const a=D.forwardRef(({name:c="accordion",icon:s,dataTheme:B,className:G,children:_,...y},J)=>{const j=M("collapse",W({"collapse-arrow":s==="arrow","collapse-plus":s==="plus"}),G);return o("div",{"data-theme":B,className:j,children:[e("input",{...y,ref:J,type:"radio",name:c}),_]})});a.displayName="Accordion";const n=Object.assign(a,{Title:q,Content:V});try{a.displayName="Accordion",a.__docgenInfo={description:"",displayName:"Accordion",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},name:{defaultValue:{value:"accordion"},description:"",name:"name",required:!1,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"enum",value:[{value:'"arrow"'},{value:'"plus"'}]}}}}}catch{}const $={title:"Data Display/Accordion",component:n},t=c=>o("div",{className:"flex flex-wrap gap-2",children:[o(n,{...c,defaultChecked:!0,children:[e(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e(n.Content,{children:e("p",{children:"hello"})})]}),o(n,{...c,children:[e(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e(n.Content,{children:e("p",{children:"hello"})})]}),o(n,{...c,children:[e(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e(n.Content,{children:e("p",{children:"hello"})})]})]});t.args={className:"bg-base-200"};const l=c=>o("div",{className:"flex flex-wrap gap-2",children:[o(n,{...c,defaultChecked:!0,children:[e(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e(n.Content,{children:e("p",{children:"hello"})})]}),o(n,{...c,children:[e(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e(n.Content,{children:e("p",{children:"hello"})})]}),o(n,{...c,children:[e(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e(n.Content,{children:e("p",{children:"hello"})})]})]});l.args={className:"bg-base-200",icon:"arrow"};const r=c=>o("div",{className:"flex flex-wrap gap-2",children:[o(n,{...c,defaultChecked:!0,children:[e(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e(n.Content,{children:e("p",{children:"hello"})})]}),o(n,{...c,children:[e(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e(n.Content,{children:e("p",{children:"hello"})})]}),o(n,{...c,children:[e(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e(n.Content,{children:e("p",{children:"hello"})})]})]});r.args={className:"bg-base-200",icon:"plus"};const i=c=>o(E,{className:"w-full",vertical:!0,children:[o(n,{...c,defaultChecked:!0,children:[e(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e(n.Content,{children:e("p",{children:"hello"})})]}),o(n,{...c,children:[e(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e(n.Content,{children:e("p",{children:"hello"})})]}),o(n,{...c,children:[e(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e(n.Content,{children:e("p",{children:"hello"})})]})]});i.args={className:"border border-base-300 join-item",icon:"arrow"};const d=c=>o(S,{children:[o("div",{className:"flex flex-wrap gap-2",children:[o(n,{...c,defaultChecked:!0,name:"groupA",children:[e(n.Title,{className:"text-xl font-medium",children:"Group A"}),e(n.Content,{children:e("p",{children:"hello"})})]}),o(n,{...c,name:"groupA",children:[e(n.Title,{className:"text-xl font-medium",children:"Group A"}),e(n.Content,{children:e("p",{children:"hello"})})]}),o(n,{...c,name:"groupA",children:[e(n.Title,{className:"text-xl font-medium",children:"Group A"}),e(n.Content,{children:e("p",{children:"hello"})})]})]}),o("div",{className:"flex flex-wrap gap-2",children:[o(n,{...c,defaultChecked:!0,name:"groupB",children:[e(n.Title,{className:"text-xl font-medium",children:"Group B"}),e(n.Content,{children:e("p",{children:"hello"})})]}),o(n,{...c,name:"groupB",children:[e(n.Title,{className:"text-xl font-medium",children:"Group B"}),e(n.Content,{children:e("p",{children:"hello"})})]}),o(n,{...c,name:"groupB",children:[e(n.Title,{className:"text-xl font-medium",children:"Group B"}),e(n.Content,{children:e("p",{children:"hello"})})]})]})]});d.args={className:"bg-base-200"};var m,h,p;t.parameters={...t.parameters,docs:{...(m=t.parameters)==null?void 0:m.docs,source:{originalSource:`args => { - return
- - - Click to open this one and close others - - -

hello

-
-
- - - Click to open this one and close others - - -

hello

-
-
- - - Click to open this one and close others - - -

hello

-
-
-
; -}`,...(p=(h=t.parameters)==null?void 0:h.docs)==null?void 0:p.source}}};var u,A,x;l.parameters={...l.parameters,docs:{...(u=l.parameters)==null?void 0:u.docs,source:{originalSource:`args => { - return
- - - Click to open this one and close others - - -

hello

-
-
- - - Click to open this one and close others - - -

hello

-
-
- - - Click to open this one and close others - - -

hello

-
-
-
; -}`,...(x=(A=l.parameters)==null?void 0:A.docs)==null?void 0:x.source}}};var C,f,T;r.parameters={...r.parameters,docs:{...(C=r.parameters)==null?void 0:C.docs,source:{originalSource:`args => { - return
- - - Click to open this one and close others - - -

hello

-
-
- - - Click to open this one and close others - - -

hello

-
-
- - - Click to open this one and close others - - -

hello

-
-
-
; -}`,...(T=(f=r.parameters)==null?void 0:f.docs)==null?void 0:T.source}}};var N,g,k;i.parameters={...i.parameters,docs:{...(N=i.parameters)==null?void 0:N.docs,source:{originalSource:`args => { - return - - - Click to open this one and close others - - -

hello

-
-
- - - Click to open this one and close others - - -

hello

-
-
- - - Click to open this one and close others - - -

hello

-
-
-
; -}`,...(k=(g=i.parameters)==null?void 0:g.docs)==null?void 0:k.source}}};var v,w,b;d.parameters={...d.parameters,docs:{...(v=d.parameters)==null?void 0:v.docs,source:{originalSource:`args => { - return <> -
- - - Group A - - -

hello

-
-
- - - Group A - - -

hello

-
-
- - - Group A - - -

hello

-
-
-
-
- - - Group B - - -

hello

-
-
- - - Group B - - -

hello

-
-
- - - Group B - - -

hello

-
-
-
- ; -}`,...(b=(w=d.parameters)==null?void 0:w.docs)==null?void 0:b.source}}};const z=["Default","WithArrow","WithPlusMinus","AndJoinTogether","Multiple"];export{i as AndJoinTogether,t as Default,d as Multiple,l as WithArrow,r as WithPlusMinus,z as __namedExportsOrder,$ as default}; diff --git a/docs/assets/Accordion.stories-DWx5hyEA.js b/docs/assets/Accordion.stories-DWx5hyEA.js new file mode 100644 index 00000000..409e95ca --- /dev/null +++ b/docs/assets/Accordion.stories-DWx5hyEA.js @@ -0,0 +1,164 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{r as J}from"./iframe-DDnXVYpC.js";import{c as M}from"./clsx-B-dksMZM.js";import{t as S}from"./bundle-mjs-yGZq-iow.js";import{C as D,a as W}from"./CollapseContent-CGPqZTWi.js";import{J as q}from"./Join-C8mVsF_m.js";const s=J.forwardRef(({name:o="accordion",icon:d,dataTheme:w,className:b,children:B,...G},_)=>{const y=S("collapse",M({"collapse-arrow":d==="arrow","collapse-plus":d==="plus"}),b);return e.jsxs("div",{"data-theme":w,className:y,children:[e.jsx("input",{...G,ref:_,type:"radio",name:o}),B]})});s.displayName="Accordion";const n=Object.assign(s,{Title:W,Content:D});try{s.displayName="Accordion",s.__docgenInfo={description:"",displayName:"Accordion",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},name:{defaultValue:{value:"accordion"},description:"",name:"name",required:!1,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"enum",value:[{value:'"arrow"'},{value:'"plus"'}]}}}}}catch{}const I={title:"Data Display/Accordion",component:n},c=o=>e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(n,{...o,defaultChecked:!0,children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]}),e.jsxs(n,{...o,children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]}),e.jsxs(n,{...o,children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]})]});c.args={className:"bg-base-200"};const t=o=>e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(n,{...o,defaultChecked:!0,children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]}),e.jsxs(n,{...o,children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]}),e.jsxs(n,{...o,children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]})]});t.args={className:"bg-base-200",icon:"arrow"};const l=o=>e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(n,{...o,defaultChecked:!0,children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]}),e.jsxs(n,{...o,children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]}),e.jsxs(n,{...o,children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]})]});l.args={className:"bg-base-200",icon:"plus"};const r=o=>e.jsxs(q,{className:"w-full",vertical:!0,children:[e.jsxs(n,{...o,defaultChecked:!0,children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]}),e.jsxs(n,{...o,children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]}),e.jsxs(n,{...o,children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Click to open this one and close others"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]})]});r.args={className:"border border-base-300 join-item",icon:"arrow"};const i=o=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(n,{...o,defaultChecked:!0,name:"groupA",children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Group A"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]}),e.jsxs(n,{...o,name:"groupA",children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Group A"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]}),e.jsxs(n,{...o,name:"groupA",children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Group A"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(n,{...o,defaultChecked:!0,name:"groupB",children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Group B"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]}),e.jsxs(n,{...o,name:"groupB",children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Group B"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]}),e.jsxs(n,{...o,name:"groupB",children:[e.jsx(n.Title,{className:"text-xl font-medium",children:"Group B"}),e.jsx(n.Content,{children:e.jsx("p",{children:"hello"})})]})]})]});i.args={className:"bg-base-200"};var a,m,h;c.parameters={...c.parameters,docs:{...(a=c.parameters)==null?void 0:a.docs,source:{originalSource:`args => { + return
+ + + Click to open this one and close others + + +

hello

+
+
+ + + Click to open this one and close others + + +

hello

+
+
+ + + Click to open this one and close others + + +

hello

+
+
+
; +}`,...(h=(m=c.parameters)==null?void 0:m.docs)==null?void 0:h.source}}};var p,x,u;t.parameters={...t.parameters,docs:{...(p=t.parameters)==null?void 0:p.docs,source:{originalSource:`args => { + return
+ + + Click to open this one and close others + + +

hello

+
+
+ + + Click to open this one and close others + + +

hello

+
+
+ + + Click to open this one and close others + + +

hello

+
+
+
; +}`,...(u=(x=t.parameters)==null?void 0:x.docs)==null?void 0:u.source}}};var A,C,f;l.parameters={...l.parameters,docs:{...(A=l.parameters)==null?void 0:A.docs,source:{originalSource:`args => { + return
+ + + Click to open this one and close others + + +

hello

+
+
+ + + Click to open this one and close others + + +

hello

+
+
+ + + Click to open this one and close others + + +

hello

+
+
+
; +}`,...(f=(C=l.parameters)==null?void 0:C.docs)==null?void 0:f.source}}};var j,T,N;r.parameters={...r.parameters,docs:{...(j=r.parameters)==null?void 0:j.docs,source:{originalSource:`args => { + return + + + Click to open this one and close others + + +

hello

+
+
+ + + Click to open this one and close others + + +

hello

+
+
+ + + Click to open this one and close others + + +

hello

+
+
+
; +}`,...(N=(T=r.parameters)==null?void 0:T.docs)==null?void 0:N.source}}};var g,k,v;i.parameters={...i.parameters,docs:{...(g=i.parameters)==null?void 0:g.docs,source:{originalSource:`args => { + return <> +
+ + + Group A + + +

hello

+
+
+ + + Group A + + +

hello

+
+
+ + + Group A + + +

hello

+
+
+
+
+ + + Group B + + +

hello

+
+
+ + + Group B + + +

hello

+
+
+ + + Group B + + +

hello

+
+
+
+ ; +}`,...(v=(k=i.parameters)==null?void 0:k.docs)==null?void 0:v.source}}};const $=["Default","WithArrow","WithPlusMinus","AndJoinTogether","Multiple"];export{r as AndJoinTogether,c as Default,i as Multiple,t as WithArrow,l as WithPlusMinus,$ as __namedExportsOrder,I as default}; diff --git a/docs/assets/Alert.stories-066958fb.js b/docs/assets/Alert.stories-066958fb.js deleted file mode 100644 index 63a87626..00000000 --- a/docs/assets/Alert.stories-066958fb.js +++ /dev/null @@ -1,53 +0,0 @@ -import{j as r,a as h}from"./tw-merge-4486aaf0.js";import{A as s}from"./index-57bfbf7f.js";import{B as d}from"./Button-e31631bb.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";import"./index-8d7e61f2.js";const F={title:"Feedback/Alert",component:s,argTypes:{icon:{control:!1}}},n=e=>r(s,{...e,icon:r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"stroke-info shrink-0 w-6 h-6",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),children:r("span",{children:"12 unread messages. Tap to see."})});n.args={};const o=e=>r(s,{...e,icon:r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"stroke-current shrink-0 w-6 h-6",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),children:r("span",{children:"New software update available."})});o.args={status:"info"};const a=e=>r(s,{...e,icon:r("svg",{xmlns:"http://www.w3.org/2000/svg",className:"stroke-current shrink-0 h-6 w-6",fill:"none",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),children:r("span",{children:"Your purchase has been confirmed!"})});a.args={status:"success"};const t=e=>r(s,{...e,icon:r("svg",{xmlns:"http://www.w3.org/2000/svg",className:"stroke-current shrink-0 h-6 w-6",fill:"none",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),children:r("span",{children:"Warning: Invalid email address!"})});t.args={status:"warning"};const i=e=>r(s,{...e,icon:r("svg",{xmlns:"http://www.w3.org/2000/svg",className:"stroke-current shrink-0 h-6 w-6",fill:"none",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})}),children:r("span",{children:"Error! Task failed successfully."})});i.args={status:"error"};const c=e=>h(s,{...e,icon:r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"stroke-info shrink-0 w-6 h-6",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),children:[r("span",{children:"we use cookies for no reason."}),h("div",{className:"space-x-1",children:[r(d,{size:"sm",children:"Deny"}),r(d,{size:"sm",color:"primary",children:"Accept"})]})]});c.args={className:"shadow-lg"};const l=e=>h(s,{...e,icon:r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"stroke-info shrink-0 w-6 h-6",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),children:[h("div",{children:[r("h3",{className:"font-bold",children:"New message!"}),r("div",{className:"text-xs",children:"You have 1 unread message"})]}),r(d,{size:"sm",children:"See"})]});l.args={className:"shadow-lg"};var p,m,u;n.parameters={...n.parameters,docs:{...(p=n.parameters)==null?void 0:p.docs,source:{originalSource:`args => { - return - - }> - 12 unread messages. Tap to see. - ; -}`,...(u=(m=n.parameters)==null?void 0:m.docs)==null?void 0:u.source}}};var w,g,k;o.parameters={...o.parameters,docs:{...(w=o.parameters)==null?void 0:w.docs,source:{originalSource:`args => { - return - - }> - New software update available. - ; -}`,...(k=(g=o.parameters)==null?void 0:g.docs)==null?void 0:k.source}}};var v,f,x;a.parameters={...a.parameters,docs:{...(v=a.parameters)==null?void 0:v.docs,source:{originalSource:`args => { - return - - }> - Your purchase has been confirmed! - ; -}`,...(x=(f=a.parameters)==null?void 0:f.docs)==null?void 0:x.source}}};var L,N,B;t.parameters={...t.parameters,docs:{...(L=t.parameters)==null?void 0:L.docs,source:{originalSource:`args => { - return - - }> - Warning: Invalid email address! - ; -}`,...(B=(N=t.parameters)==null?void 0:N.docs)==null?void 0:B.source}}};var A,M,W;i.parameters={...i.parameters,docs:{...(A=i.parameters)==null?void 0:A.docs,source:{originalSource:`args => { - return - - }> - Error! Task failed successfully. - ; -}`,...(W=(M=i.parameters)==null?void 0:M.docs)==null?void 0:W.source}}};var z,j,S;c.parameters={...c.parameters,docs:{...(z=c.parameters)==null?void 0:z.docs,source:{originalSource:`args => { - return - - }> - we use cookies for no reason. -
- - -
-
; -}`,...(S=(j=c.parameters)==null?void 0:j.docs)==null?void 0:S.source}}};var C,b,y;l.parameters={...l.parameters,docs:{...(C=l.parameters)==null?void 0:C.docs,source:{originalSource:`args => { - return - - }> -
-

New message!

-
You have 1 unread message
-
- -
; -}`,...(y=(b=l.parameters)==null?void 0:b.docs)==null?void 0:y.source}}};const O=["Default","InfoColor","SuccessColor","WarningColor","ErrorColor","WithButtons","WithTitleAndDescription"];export{n as Default,i as ErrorColor,o as InfoColor,a as SuccessColor,t as WarningColor,c as WithButtons,l as WithTitleAndDescription,O as __namedExportsOrder,F as default}; diff --git a/docs/assets/Alert.stories-C8_pkMd0.js b/docs/assets/Alert.stories-C8_pkMd0.js new file mode 100644 index 00000000..6b290188 --- /dev/null +++ b/docs/assets/Alert.stories-C8_pkMd0.js @@ -0,0 +1,98 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{A as r}from"./index-Z5rb5F7J.js";import{B as h}from"./Button-GtH5nISf.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";import"./index-Dl-l57lR.js";const X={title:"Feedback/Alert",component:r,argTypes:{icon:{control:!1}}},n=s=>e.jsx(r,{...s,icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"stroke-info shrink-0 w-6 h-6",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),children:e.jsx("span",{children:"12 unread messages. Tap to see."})});n.args={};const a=s=>e.jsx(r,{...s,icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"stroke-current shrink-0 w-6 h-6",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),children:e.jsx("span",{children:"New software update available."})});a.args={status:"info"};const t=s=>e.jsx(r,{...s,icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"stroke-current shrink-0 h-6 w-6",fill:"none",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),children:e.jsx("span",{children:"Your purchase has been confirmed!"})});t.args={status:"success"};const o=s=>e.jsx(r,{...s,icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"stroke-current shrink-0 h-6 w-6",fill:"none",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),children:e.jsx("span",{children:"Warning: Invalid email address!"})});o.args={status:"warning"};const i=s=>e.jsx(r,{...s,icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"stroke-current shrink-0 h-6 w-6",fill:"none",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"})}),children:e.jsx("span",{children:"Error! Task failed successfully."})});i.args={status:"error"};const l=s=>e.jsxs("div",{className:"preview bg-base-100 relative flex min-h-[6rem] max-w-4xl min-w-[18rem] flex-wrap items-center justify-center gap-2 overflow-x-hidden bg-cover bg-top p-4 xl:py-10",children:[e.jsx(r,{...s,status:"info",children:"12 unread messages. Tap to see."}),e.jsx(r,{...s,status:"success",children:"Your purchase has been confirmed!"}),e.jsx(r,{...s,status:"warning",children:"Warning: Invalid email address!"}),e.jsx(r,{...s,status:"error",children:"Error! Task failed successfully."})]});l.args={variant:"soft",className:"w-full"};const c=s=>e.jsxs("div",{className:"preview bg-base-100 relative flex min-h-[6rem] max-w-4xl min-w-[18rem] flex-wrap items-center justify-center gap-2 overflow-x-hidden bg-cover bg-top p-4 xl:py-10",children:[e.jsx(r,{...s,status:"info",children:"12 unread messages. Tap to see."}),e.jsx(r,{...s,status:"success",children:"Your purchase has been confirmed!"}),e.jsx(r,{...s,status:"warning",children:"Warning: Invalid email address!"}),e.jsx(r,{...s,status:"error",children:"Error! Task failed successfully."})]});c.args={variant:"outline",className:"w-full"};const d=s=>e.jsxs("div",{className:"preview bg-base-100 relative flex min-h-[6rem] max-w-4xl min-w-[18rem] flex-wrap items-center justify-center gap-2 overflow-x-hidden bg-cover bg-top p-4 xl:py-10",children:[e.jsx(r,{...s,status:"info",children:"12 unread messages. Tap to see."}),e.jsx(r,{...s,status:"success",children:"Your purchase has been confirmed!"}),e.jsx(r,{...s,status:"warning",children:"Warning: Invalid email address!"}),e.jsx(r,{...s,status:"error",children:"Error! Task failed successfully."})]});d.args={variant:"dash",className:"w-full"};const u=s=>e.jsxs(r,{...s,icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"stroke-info shrink-0 w-6 h-6",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),children:[e.jsx("span",{children:"we use cookies for no reason."}),e.jsxs("div",{className:"space-x-1",children:[e.jsx(h,{size:"sm",children:"Deny"}),e.jsx(h,{size:"sm",color:"primary",children:"Accept"})]})]});u.args={className:"shadow-lg"};const m=s=>e.jsxs(r,{...s,icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"stroke-info shrink-0 w-6 h-6",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-bold",children:"New message!"}),e.jsx("div",{className:"text-xs",children:"You have 1 unread message"})]}),e.jsx(h,{size:"sm",children:"See"})]});m.args={className:"shadow-lg"};var p,g,w;n.parameters={...n.parameters,docs:{...(p=n.parameters)==null?void 0:p.docs,source:{originalSource:`args => { + return + + }> + 12 unread messages. Tap to see. + ; +}`,...(w=(g=n.parameters)==null?void 0:g.docs)==null?void 0:w.source}}};var x,v,f;a.parameters={...a.parameters,docs:{...(x=a.parameters)==null?void 0:x.docs,source:{originalSource:`args => { + return + + }> + New software update available. + ; +}`,...(f=(v=a.parameters)==null?void 0:v.docs)==null?void 0:f.source}}};var k,j,A;t.parameters={...t.parameters,docs:{...(k=t.parameters)==null?void 0:k.docs,source:{originalSource:`args => { + return + + }> + Your purchase has been confirmed! + ; +}`,...(A=(j=t.parameters)==null?void 0:j.docs)==null?void 0:A.source}}};var b,N,L;o.parameters={...o.parameters,docs:{...(b=o.parameters)==null?void 0:b.docs,source:{originalSource:`args => { + return + + }> + Warning: Invalid email address! + ; +}`,...(L=(N=o.parameters)==null?void 0:N.docs)==null?void 0:L.source}}};var y,W,B;i.parameters={...i.parameters,docs:{...(y=i.parameters)==null?void 0:y.docs,source:{originalSource:`args => { + return + + }> + Error! Task failed successfully. + ; +}`,...(B=(W=i.parameters)==null?void 0:W.docs)==null?void 0:B.source}}};var M,S,z;l.parameters={...l.parameters,docs:{...(M=l.parameters)==null?void 0:M.docs,source:{originalSource:`args => { + return
+ + 12 unread messages. Tap to see. + + + Your purchase has been confirmed! + + + Warning: Invalid email address! + + + Error! Task failed successfully. + +
; +}`,...(z=(S=l.parameters)==null?void 0:S.docs)==null?void 0:z.source}}};var T,E,I;c.parameters={...c.parameters,docs:{...(T=c.parameters)==null?void 0:T.docs,source:{originalSource:`args => { + return
+ + 12 unread messages. Tap to see. + + + Your purchase has been confirmed! + + + Warning: Invalid email address! + + + Error! Task failed successfully. + +
; +}`,...(I=(E=c.parameters)==null?void 0:E.docs)==null?void 0:I.source}}};var Y,C,D;d.parameters={...d.parameters,docs:{...(Y=d.parameters)==null?void 0:Y.docs,source:{originalSource:`args => { + return
+ + 12 unread messages. Tap to see. + + + Your purchase has been confirmed! + + + Warning: Invalid email address! + + + Error! Task failed successfully. + +
; +}`,...(D=(C=d.parameters)==null?void 0:C.docs)==null?void 0:D.source}}};var O,_,F;u.parameters={...u.parameters,docs:{...(O=u.parameters)==null?void 0:O.docs,source:{originalSource:`args => { + return + + }> + we use cookies for no reason. +
+ + +
+
; +}`,...(F=(_=u.parameters)==null?void 0:_.docs)==null?void 0:F.source}}};var R,q,G;m.parameters={...m.parameters,docs:{...(R=m.parameters)==null?void 0:R.docs,source:{originalSource:`args => { + return + + }> +
+

New message!

+
You have 1 unread message
+
+ +
; +}`,...(G=(q=m.parameters)==null?void 0:q.docs)==null?void 0:G.source}}};const Z=["Default","InfoColor","SuccessColor","WarningColor","ErrorColor","SoftStyle","OutlineStyle","DashStyle","WithButtons","WithTitleAndDescription"];export{d as DashStyle,n as Default,i as ErrorColor,a as InfoColor,c as OutlineStyle,l as SoftStyle,t as SuccessColor,o as WarningColor,u as WithButtons,m as WithTitleAndDescription,Z as __namedExportsOrder,X as default}; diff --git a/docs/assets/Artboard.stories-74886640.js b/docs/assets/Artboard.stories-74886640.js deleted file mode 100644 index 750537c3..00000000 --- a/docs/assets/Artboard.stories-74886640.js +++ /dev/null @@ -1,61 +0,0 @@ -import{t as dr,j as rr}from"./tw-merge-4486aaf0.js";import{r as ir}from"./index-f46741a2.js";import{c as cr}from"./clsx.m-1229b3e0.js";const g=ir.forwardRef(({children:a,demo:b=!0,size:e,horizontal:er,dataTheme:ar,className:or,...nr},sr)=>{const tr=dr("artboard",or,cr({"artboard-demo":b,"phone-1":e===1,"phone-2":e===2,"phone-3":e===3,"phone-4":e===4,"phone-5":e===5,"phone-6":e===6,horizontal:er}));return rr("div",{"aria-label":"Artboard",...nr,ref:sr,"data-theme":ar,className:tr,children:a})});g.displayName="Artboard";const z=g;try{g.displayName="Artboard",g.__docgenInfo={description:"",displayName:"Artboard",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},demo:{defaultValue:{value:"true"},description:"",name:"demo",required:!1,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"4"},{value:"2"},{value:"1"},{value:"3"},{value:"5"},{value:"6"}]}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}try{z.displayName="Artboard",z.__docgenInfo={description:"",displayName:"Artboard",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},demo:{defaultValue:{value:"true"},description:"",name:"demo",required:!1,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"4"},{value:"2"},{value:"1"},{value:"3"},{value:"5"},{value:"6"}]}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}const mr={title:"Layout/Artboard",component:z},r=({children:a,...b})=>rr(z,{...b,children:a}),o=r.bind({});o.args={size:1,children:" 320×568"};const n=r.bind({});n.args={size:2,children:" 375×667"};const s=r.bind({});s.args={size:3,children:" 414×736"};const t=r.bind({});t.args={size:4,children:" 375×812"};const d=r.bind({});d.args={size:5,children:" 414×896"};const i=r.bind({});i.args={size:6,children:" 320×1024"};const c=r.bind({});c.args={size:1,children:"568×320",horizontal:!0};const l=r.bind({});l.args={size:2,children:" 667×375",horizontal:!0};const u=r.bind({});u.args={size:3,children:" 736×414",horizontal:!0};const p=r.bind({});p.args={size:4,children:" 812×375",horizontal:!0};const m=r.bind({});m.args={size:5,children:" 896×414",horizontal:!0};const h=r.bind({});h.args={size:6,children:" 1024×320",horizontal:!0};var A,S,f;o.parameters={...o.parameters,docs:{...(A=o.parameters)==null?void 0:A.docs,source:{originalSource:`({ - children, - ...args -}) => { - return {children}; -}`,...(f=(S=o.parameters)==null?void 0:S.docs)==null?void 0:f.source}}};var _,y,v;n.parameters={...n.parameters,docs:{...(_=n.parameters)==null?void 0:_.docs,source:{originalSource:`({ - children, - ...args -}) => { - return {children}; -}`,...(v=(y=n.parameters)==null?void 0:y.docs)==null?void 0:v.source}}};var H,q,V;s.parameters={...s.parameters,docs:{...(H=s.parameters)==null?void 0:H.docs,source:{originalSource:`({ - children, - ...args -}) => { - return {children}; -}`,...(V=(q=s.parameters)==null?void 0:q.docs)==null?void 0:V.source}}};var N,x,T;t.parameters={...t.parameters,docs:{...(N=t.parameters)==null?void 0:N.docs,source:{originalSource:`({ - children, - ...args -}) => { - return {children}; -}`,...(T=(x=t.parameters)==null?void 0:x.docs)==null?void 0:T.source}}};var j,w,D;d.parameters={...d.parameters,docs:{...(j=d.parameters)==null?void 0:j.docs,source:{originalSource:`({ - children, - ...args -}) => { - return {children}; -}`,...(D=(w=d.parameters)==null?void 0:w.docs)==null?void 0:D.source}}};var E,I,L;i.parameters={...i.parameters,docs:{...(E=i.parameters)==null?void 0:E.docs,source:{originalSource:`({ - children, - ...args -}) => { - return {children}; -}`,...(L=(I=i.parameters)==null?void 0:I.docs)==null?void 0:L.source}}};var M,O,R;c.parameters={...c.parameters,docs:{...(M=c.parameters)==null?void 0:M.docs,source:{originalSource:`({ - children, - ...args -}) => { - return {children}; -}`,...(R=(O=c.parameters)==null?void 0:O.docs)==null?void 0:R.source}}};var $,k,B;l.parameters={...l.parameters,docs:{...($=l.parameters)==null?void 0:$.docs,source:{originalSource:`({ - children, - ...args -}) => { - return {children}; -}`,...(B=(k=l.parameters)==null?void 0:k.docs)==null?void 0:B.source}}};var C,F,G;u.parameters={...u.parameters,docs:{...(C=u.parameters)==null?void 0:C.docs,source:{originalSource:`({ - children, - ...args -}) => { - return {children}; -}`,...(G=(F=u.parameters)==null?void 0:F.docs)==null?void 0:G.source}}};var J,K,P;p.parameters={...p.parameters,docs:{...(J=p.parameters)==null?void 0:J.docs,source:{originalSource:`({ - children, - ...args -}) => { - return {children}; -}`,...(P=(K=p.parameters)==null?void 0:K.docs)==null?void 0:P.source}}};var Q,U,W;m.parameters={...m.parameters,docs:{...(Q=m.parameters)==null?void 0:Q.docs,source:{originalSource:`({ - children, - ...args -}) => { - return {children}; -}`,...(W=(U=m.parameters)==null?void 0:U.docs)==null?void 0:W.source}}};var X,Y,Z;h.parameters={...h.parameters,docs:{...(X=h.parameters)==null?void 0:X.docs,source:{originalSource:`({ - children, - ...args -}) => { - return {children}; -}`,...(Z=(Y=h.parameters)==null?void 0:Y.docs)==null?void 0:Z.source}}};const hr=["Default","Size2","Size3","Size4","Size5","Size6","HorizontalSize1","HorizontalSize2","HorizontalSize3","HorizontalSize4","HorizontalSize5","HorizontalSize6"];export{o as Default,c as HorizontalSize1,l as HorizontalSize2,u as HorizontalSize3,p as HorizontalSize4,m as HorizontalSize5,h as HorizontalSize6,n as Size2,s as Size3,t as Size4,d as Size5,i as Size6,hr as __namedExportsOrder,mr as default}; diff --git a/docs/assets/Artboard.stories-CRFhBK7F.js b/docs/assets/Artboard.stories-CRFhBK7F.js new file mode 100644 index 00000000..66ab6ee2 --- /dev/null +++ b/docs/assets/Artboard.stories-CRFhBK7F.js @@ -0,0 +1,61 @@ +import{j as $}from"./jsx-runtime-BjG_zV1W.js";import{r as tr}from"./iframe-DDnXVYpC.js";import{c as ir}from"./clsx-B-dksMZM.js";import{t as dr}from"./bundle-mjs-yGZq-iow.js";const e=tr.forwardRef(({children:o,demo:z=!0,size:a,horizontal:rr,dataTheme:er,className:ar,...or},nr)=>{const sr=dr("artboard",ar,ir({"artboard-demo":z,"phone-1":a===1,"phone-2":a===2,"phone-3":a===3,"phone-4":a===4,"phone-5":a===5,"phone-6":a===6,horizontal:rr}));return $.jsx("div",{"aria-label":"Artboard",...or,ref:nr,"data-theme":er,className:sr,children:o})});e.displayName="Artboard";try{e.displayName="Artboard",e.__docgenInfo={description:"",displayName:"Artboard",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},demo:{defaultValue:{value:"true"},description:"",name:"demo",required:!1,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"5"},{value:"2"},{value:"4"},{value:"3"},{value:"1"},{value:"6"}]}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}try{e.displayName="Artboard",e.__docgenInfo={description:"",displayName:"Artboard",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},demo:{defaultValue:{value:"true"},description:"",name:"demo",required:!1,type:{name:"boolean"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:"5"},{value:"2"},{value:"4"},{value:"3"},{value:"1"},{value:"6"}]}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}const mr={title:"Layout/Artboard",component:e},r=({children:o,...z})=>$.jsx(e,{...z,children:o}),n=r.bind({});n.args={size:1,children:" 320×568"};const s=r.bind({});s.args={size:2,children:" 375×667"};const t=r.bind({});t.args={size:3,children:" 414×736"};const i=r.bind({});i.args={size:4,children:" 375×812"};const d=r.bind({});d.args={size:5,children:" 414×896"};const c=r.bind({});c.args={size:6,children:" 320×1024"};const l=r.bind({});l.args={size:1,children:"568×320",horizontal:!0};const u=r.bind({});u.args={size:2,children:" 667×375",horizontal:!0};const p=r.bind({});p.args={size:3,children:" 736×414",horizontal:!0};const m=r.bind({});m.args={size:4,children:" 812×375",horizontal:!0};const h=r.bind({});h.args={size:5,children:" 896×414",horizontal:!0};const g=r.bind({});g.args={size:6,children:" 1024×320",horizontal:!0};var b,S,A;n.parameters={...n.parameters,docs:{...(b=n.parameters)==null?void 0:b.docs,source:{originalSource:`({ + children, + ...args +}) => { + return {children}; +}`,...(A=(S=n.parameters)==null?void 0:S.docs)==null?void 0:A.source}}};var f,_,y;s.parameters={...s.parameters,docs:{...(f=s.parameters)==null?void 0:f.docs,source:{originalSource:`({ + children, + ...args +}) => { + return {children}; +}`,...(y=(_=s.parameters)==null?void 0:_.docs)==null?void 0:y.source}}};var v,H,q;t.parameters={...t.parameters,docs:{...(v=t.parameters)==null?void 0:v.docs,source:{originalSource:`({ + children, + ...args +}) => { + return {children}; +}`,...(q=(H=t.parameters)==null?void 0:H.docs)==null?void 0:q.source}}};var x,V,N;i.parameters={...i.parameters,docs:{...(x=i.parameters)==null?void 0:x.docs,source:{originalSource:`({ + children, + ...args +}) => { + return {children}; +}`,...(N=(V=i.parameters)==null?void 0:V.docs)==null?void 0:N.source}}};var T,j,E;d.parameters={...d.parameters,docs:{...(T=d.parameters)==null?void 0:T.docs,source:{originalSource:`({ + children, + ...args +}) => { + return {children}; +}`,...(E=(j=d.parameters)==null?void 0:j.docs)==null?void 0:E.source}}};var w,D,I;c.parameters={...c.parameters,docs:{...(w=c.parameters)==null?void 0:w.docs,source:{originalSource:`({ + children, + ...args +}) => { + return {children}; +}`,...(I=(D=c.parameters)==null?void 0:D.docs)==null?void 0:I.source}}};var R,L,M;l.parameters={...l.parameters,docs:{...(R=l.parameters)==null?void 0:R.docs,source:{originalSource:`({ + children, + ...args +}) => { + return {children}; +}`,...(M=(L=l.parameters)==null?void 0:L.docs)==null?void 0:M.source}}};var O,k,B;u.parameters={...u.parameters,docs:{...(O=u.parameters)==null?void 0:O.docs,source:{originalSource:`({ + children, + ...args +}) => { + return {children}; +}`,...(B=(k=u.parameters)==null?void 0:k.docs)==null?void 0:B.source}}};var C,F,G;p.parameters={...p.parameters,docs:{...(C=p.parameters)==null?void 0:C.docs,source:{originalSource:`({ + children, + ...args +}) => { + return {children}; +}`,...(G=(F=p.parameters)==null?void 0:F.docs)==null?void 0:G.source}}};var J,K,P;m.parameters={...m.parameters,docs:{...(J=m.parameters)==null?void 0:J.docs,source:{originalSource:`({ + children, + ...args +}) => { + return {children}; +}`,...(P=(K=m.parameters)==null?void 0:K.docs)==null?void 0:P.source}}};var Q,U,W;h.parameters={...h.parameters,docs:{...(Q=h.parameters)==null?void 0:Q.docs,source:{originalSource:`({ + children, + ...args +}) => { + return {children}; +}`,...(W=(U=h.parameters)==null?void 0:U.docs)==null?void 0:W.source}}};var X,Y,Z;g.parameters={...g.parameters,docs:{...(X=g.parameters)==null?void 0:X.docs,source:{originalSource:`({ + children, + ...args +}) => { + return {children}; +}`,...(Z=(Y=g.parameters)==null?void 0:Y.docs)==null?void 0:Z.source}}};const hr=["Default","Size2","Size3","Size4","Size5","Size6","HorizontalSize1","HorizontalSize2","HorizontalSize3","HorizontalSize4","HorizontalSize5","HorizontalSize6"];export{n as Default,l as HorizontalSize1,u as HorizontalSize2,p as HorizontalSize3,m as HorizontalSize4,h as HorizontalSize5,g as HorizontalSize6,s as Size2,t as Size3,i as Size4,d as Size5,c as Size6,hr as __namedExportsOrder,mr as default}; diff --git a/docs/assets/Avatar.stories-XJrVBVuE.js b/docs/assets/Avatar.stories-XJrVBVuE.js new file mode 100644 index 00000000..95f4c74a --- /dev/null +++ b/docs/assets/Avatar.stories-XJrVBVuE.js @@ -0,0 +1,146 @@ +import{j as r}from"./jsx-runtime-BjG_zV1W.js";import{A as e}from"./index-Dsnv3XI8.js";import{M as h}from"./index-BQZBaXSX.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";import"./utils-BvopOSUb.js";const jr={title:"Data Display/Avatar",component:e,argTypes:{size:{name:"size",control:{type:"radio"},options:["lg","md","sm","xs"]}},args:{innerClassName:"rounded",src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}},C=s=>r.jsx(e,{...s}),A=C.bind({}),t=C.bind({});t.args={shape:"circle",size:30};t.argTypes={size:{control:{type:"number",min:1,step:1}}};const m=s=>r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx(e,{...s,size:"lg"}),r.jsx(e,{...s,size:"md"}),r.jsx(e,{...s,size:4*20}),r.jsx(e,{...s,size:4*16}),r.jsx(e,{...s,size:"sm"}),r.jsx(e,{...s,size:"xs"})]});m.argTypes={size:{control:!1}};const u=s=>r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx(e,{...s,innerClassName:"rounded-xl"}),r.jsx(e,{...s,shape:"circle"})]});u.argTypes={shape:{control:!1},innerClassName:{control:!1}};const x=s=>r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx(e,{...s,innerClassName:h.className({variant:"squircle"})}),r.jsx(e,{...s,innerClassName:h.className({variant:"hexagon"})}),r.jsx(e,{...s,innerClassName:h.className({variant:"triangle"})})]});x.argTypes={innerClassName:{control:!1}};const n=s=>r.jsxs(e.Group,{children:[r.jsx(e,{...s}),r.jsx(e,{...s}),r.jsx(e,{...s}),r.jsx(e,{...s})]});n.args={size:"sm",innerClassName:""};n.argTypes={shape:{control:!1}};const c=({src:s,letters:o,...a})=>r.jsxs(e.Group,{children:[r.jsx(e,{...a,src:s}),r.jsx(e,{...a,src:s}),r.jsx(e,{...a,src:s}),r.jsx(e,{...a,letters:o})]});c.args={size:"sm",letters:"+99",innerClassName:""};c.argTypes={shape:{control:!1}};const l=({src:s,letters:o,...a})=>r.jsxs("div",{className:"flex flex-col items-center gap-y-2",children:[r.jsxs(e.Group,{className:"space-x-4",children:[r.jsx(e,{...a,src:s}),r.jsx(e,{...a,src:s}),r.jsx(e,{...a,src:s}),r.jsx(e,{...a,letters:o})]}),r.jsxs(e.Group,{className:"space-x-0",children:[r.jsx(e,{...a,src:s}),r.jsx(e,{...a,src:s}),r.jsx(e,{...a,src:s}),r.jsx(e,{...a,letters:o})]}),r.jsxs(e.Group,{className:"-space-x-4",children:[r.jsx(e,{...a,src:s}),r.jsx(e,{...a,src:s}),r.jsx(e,{...a,src:s}),r.jsx(e,{...a,letters:o})]}),r.jsxs(e.Group,{className:"-space-x-8",children:[r.jsx(e,{...a,src:s}),r.jsx(e,{...a,src:s}),r.jsx(e,{...a,src:s}),r.jsx(e,{...a,letters:o})]})]});l.args={size:"sm",letters:"+99",innerClassName:""};l.argTypes={shape:{control:!1}};const v=C.bind({});v.args={border:!0,borderColor:"primary",shape:"circle"};const i=s=>r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx(e,{...s,online:!0}),r.jsx(e,{...s,offline:!0})]});i.argTypes={online:{control:!1},offline:{control:!1}};i.args={innerClassName:"",shape:"circle"};const d=s=>r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx(e,{...s,letters:"K",size:"lg"}),r.jsx(e,{...s,letters:"JO",size:"md",online:!0}),r.jsx(e,{...s,letters:"MX",size:"sm"}),r.jsx(e,{...s,letters:"AA",size:"xs"})]});d.argTypes={size:{control:!1},online:{control:!1},letters:{control:!1},src:{control:!1}};d.args={shape:"circle",src:""};const ir=r.jsxs("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"600px",height:"600px",viewBox:"0 0 600 600",enableBackground:"new 0 0 600 600",children:[r.jsxs("g",{id:"Layer_2",children:[r.jsx("path",{fill:"none",stroke:"#E91E63",strokeWidth:"24",strokeMiterlimit:"10",d:`M371.987,227.641 + c47.628,47.628,85.039,98.708,106.914,143.552c26.358,54.033,30.096,99.722,11.103,118.714 + c-19.793,19.793-68.267,15.884-125.731-12.979c-43.445-21.821-92.031-59.119-137.242-104.331 + c-46.354-46.354-84.95-95.545-106.667-139.816c-27.48-56.023-30.057-103.743-10.643-123.157 + c18.838-18.839,63.248-16.056,116.694,9.757C271.574,141.193,323.895,179.548,371.987,227.641z`}),r.jsx("path",{fill:"none",stroke:"#E91E63",strokeWidth:"24",strokeMiterlimit:"10",d:`M272.931,201.125 + c65.052-17.465,127.989-24.354,177.767-20.902c59.974,4.16,101.42,23.747,108.385,49.688 + c7.259,27.033-20.345,67.073-74.054,102.434c-40.608,26.733-97.189,50.188-158.941,66.769 + c-63.312,16.998-125.207,25.858-174.408,22.553c-62.26-4.181-104.884-25.789-112.004-52.306 + c-6.907-25.731,17.688-62.811,66.75-96.214C147.879,244.923,207.243,218.761,272.931,201.125z`}),r.jsx("path",{fill:"none",stroke:"#E91E63",strokeWidth:"24",strokeMiterlimit:"10",d:`M200.469,273.707 + c17.357-65.081,42.82-123.05,70.671-164.45c33.556-49.882,71.225-76.008,97.178-69.086c27.045,7.212,47.949,51.123,51.76,115.315 + c2.883,48.533-5.055,109.266-21.531,171.046c-16.892,63.341-40.126,121.389-67.562,162.365 + c-34.716,51.852-74.723,77.988-101.252,70.913c-25.743-6.865-45.584-46.692-50.021-105.881 + C175.963,403.92,182.944,339.424,200.469,273.707z`})]}),r.jsx("g",{id:"Layer_3",children:r.jsx("path",{fill:"#E91E63",d:`M300,349.369c-1.019,0-1.881-0.353-2.586-1.058l-36.679-35.386c-0.392-0.313-0.931-0.822-1.617-1.528 + c-0.686-0.705-1.773-1.988-3.262-3.851c-1.489-1.86-2.822-3.771-3.997-5.73s-2.224-4.33-3.145-7.112 + c-0.92-2.782-1.381-5.486-1.381-8.111c0-8.621,2.488-15.361,7.465-20.221c4.977-4.859,11.854-7.289,20.631-7.289 + c2.43,0,4.909,0.421,7.436,1.264c2.527,0.843,4.879,1.979,7.054,3.41c2.174,1.43,4.046,2.772,5.613,4.026s3.057,2.586,4.467,3.997 + c1.411-1.411,2.899-2.743,4.467-3.997c1.568-1.254,3.438-2.596,5.614-4.026c2.175-1.431,4.525-2.567,7.054-3.41 + c2.527-0.842,5.006-1.264,7.435-1.264c8.778,0,15.655,2.43,20.632,7.289c4.978,4.859,7.466,11.6,7.466,20.221 + c0,8.66-4.487,17.477-13.461,26.451l-36.619,35.268C301.881,349.017,301.019,349.369,300,349.369z`})})]}),g=C.bind({});g.args={shape:"circle",children:ir,border:!0,innerClassName:"",src:""};const j=s=>r.jsxs(e,{...s,children:[r.jsx("span",{className:"absolute text-center font-bold",children:"React"}),ir]});j.args={innerClassName:"",src:""};const p=({src:s,letters:o,...a})=>r.jsxs("div",{children:[r.jsxs("div",{className:"flex gap-4 m-4",children:[r.jsx(e,{...a,borderColor:"neutral",src:s}),r.jsx(e,{...a,borderColor:"primary",src:s}),r.jsx(e,{...a,borderColor:"secondary",src:s}),r.jsx(e,{...a,borderColor:"accent",src:s}),r.jsx(e,{...a,borderColor:"info",src:s}),r.jsx(e,{...a,borderColor:"success",src:s}),r.jsx(e,{...a,borderColor:"warning",src:s}),r.jsx(e,{...a,borderColor:"error",src:s})]}),r.jsxs("div",{className:"flex gap-4 m-4",children:[r.jsx(e,{...a,borderColor:"neutral",color:"neutral",letters:o}),r.jsx(e,{...a,borderColor:"primary",color:"primary",letters:o}),r.jsx(e,{...a,borderColor:"secondary",color:"secondary",letters:o}),r.jsx(e,{...a,borderColor:"accent",color:"accent",letters:o}),r.jsx(e,{...a,borderColor:"info",color:"info",letters:o}),r.jsx(e,{...a,borderColor:"success",color:"success",letters:o}),r.jsx(e,{...a,borderColor:"warning",color:"warning",letters:o}),r.jsx(e,{...a,borderColor:"error",color:"error",letters:o})]})]});p.argTypes={color:{control:!1},borderColor:{control:!1}};p.args={letters:"Y",border:!0,shape:"circle",size:"sm"};var f,b,N;A.parameters={...A.parameters,docs:{...(f=A.parameters)==null?void 0:f.docs,source:{originalSource:`args => { + return ; +}`,...(N=(b=A.parameters)==null?void 0:b.docs)==null?void 0:N.source}}};var z,y,G;t.parameters={...t.parameters,docs:{...(z=t.parameters)==null?void 0:z.docs,source:{originalSource:`args => { + return ; +}`,...(G=(y=t.parameters)==null?void 0:y.docs)==null?void 0:G.source}}};var S,M,k;m.parameters={...m.parameters,docs:{...(S=m.parameters)==null?void 0:S.docs,source:{originalSource:`args => { + return
+ + + + + + +
; +}`,...(k=(M=m.parameters)==null?void 0:M.docs)==null?void 0:k.source}}};var w,T,E;u.parameters={...u.parameters,docs:{...(w=u.parameters)==null?void 0:w.docs,source:{originalSource:`args => { + return
+ + +
; +}`,...(E=(T=u.parameters)==null?void 0:T.docs)==null?void 0:E.source}}};var W,R,_;x.parameters={...x.parameters,docs:{...(W=x.parameters)==null?void 0:W.docs,source:{originalSource:`args => { + return
+ + + +
; +}`,...(_=(R=x.parameters)==null?void 0:R.docs)==null?void 0:_.source}}};var B,D,L;n.parameters={...n.parameters,docs:{...(B=n.parameters)==null?void 0:B.docs,source:{originalSource:`args => { + return + + + + + ; +}`,...(L=(D=n.parameters)==null?void 0:D.docs)==null?void 0:L.source}}};var P,O,q;c.parameters={...c.parameters,docs:{...(P=c.parameters)==null?void 0:P.docs,source:{originalSource:`({ + src, + letters, + ...args +}) => { + return + + + + + ; +}`,...(q=(O=c.parameters)==null?void 0:O.docs)==null?void 0:q.source}}};var I,J,K;l.parameters={...l.parameters,docs:{...(I=l.parameters)==null?void 0:I.docs,source:{originalSource:`({ + src, + letters, + ...args +}) => { + return
+ + + + + + + + + + + + + + + + + + + + + + + + +
; +}`,...(K=(J=l.parameters)==null?void 0:J.docs)==null?void 0:K.source}}};var X,Y,F;v.parameters={...v.parameters,docs:{...(X=v.parameters)==null?void 0:X.docs,source:{originalSource:`args => { + return ; +}`,...(F=(Y=v.parameters)==null?void 0:Y.docs)==null?void 0:F.source}}};var H,Q,U;i.parameters={...i.parameters,docs:{...(H=i.parameters)==null?void 0:H.docs,source:{originalSource:`args => { + return
+ + +
; +}`,...(U=(Q=i.parameters)==null?void 0:Q.docs)==null?void 0:U.source}}};var V,Z,$;d.parameters={...d.parameters,docs:{...(V=d.parameters)==null?void 0:V.docs,source:{originalSource:`args => { + return
+ + + + +
; +}`,...($=(Z=d.parameters)==null?void 0:Z.docs)==null?void 0:$.source}}};var rr,er,sr;g.parameters={...g.parameters,docs:{...(rr=g.parameters)==null?void 0:rr.docs,source:{originalSource:`args => { + return ; +}`,...(sr=(er=g.parameters)==null?void 0:er.docs)==null?void 0:sr.source}}};var ar,or,tr;j.parameters={...j.parameters,docs:{...(ar=j.parameters)==null?void 0:ar.docs,source:{originalSource:`args => { + return + React + {reactLogoSvg} + ; +}`,...(tr=(or=j.parameters)==null?void 0:or.docs)==null?void 0:tr.source}}};var nr,cr,lr;p.parameters={...p.parameters,docs:{...(nr=p.parameters)==null?void 0:nr.docs,source:{originalSource:`({ + src, + letters, + ...args +}) => { + return
+
+ + + + + + + + +
+
+ + + + + + + + +
+
; +}`,...(lr=(cr=p.parameters)==null?void 0:cr.docs)==null?void 0:lr.source}}};const Ar=["Default","CustomSize","Sizes","Rounded","WithMask","Group","GroupWithCounter","GroupSpaceBetween","Ring","PresenceIndicator","Placeholder","WithSvg","MultipleChildren","Colors"];export{p as Colors,t as CustomSize,A as Default,n as Group,l as GroupSpaceBetween,c as GroupWithCounter,j as MultipleChildren,d as Placeholder,i as PresenceIndicator,v as Ring,u as Rounded,m as Sizes,x as WithMask,g as WithSvg,Ar as __namedExportsOrder,jr as default}; diff --git a/docs/assets/Avatar.stories-cd385f17.js b/docs/assets/Avatar.stories-cd385f17.js deleted file mode 100644 index 6de2eb12..00000000 --- a/docs/assets/Avatar.stories-cd385f17.js +++ /dev/null @@ -1,146 +0,0 @@ -import{a as o,j as e}from"./tw-merge-4486aaf0.js";import{A as r}from"./index-e7261937.js";import{M as N}from"./index-9795bb01.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";import"./utils-ae2eb491.js";const Cr={title:"Data Display/Avatar",component:r,argTypes:{size:{name:"size",control:{type:"radio"},options:["lg","md","sm","xs"]}},args:{innerClassName:"rounded",src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}},b=a=>e(r,{...a}),f=b.bind({}),t=b.bind({});t.args={shape:"circle",size:30};t.argTypes={size:{control:{type:"number",min:1,step:1}}};const u=a=>o("div",{className:"flex items-center gap-4",children:[e(r,{...a,size:"lg"}),e(r,{...a,size:"md"}),e(r,{...a,size:4*20}),e(r,{...a,size:4*16}),e(r,{...a,size:"sm"}),e(r,{...a,size:"xs"})]});u.argTypes={size:{control:!1}};const v=a=>o("div",{className:"flex items-center gap-4",children:[e(r,{...a,innerClassName:"rounded-xl"}),e(r,{...a,shape:"circle"})]});v.argTypes={shape:{control:!1},innerClassName:{control:!1}};const g=a=>o("div",{className:"flex items-center gap-4",children:[e(r,{...a,innerClassName:N.className({variant:"squircle"})}),e(r,{...a,innerClassName:N.className({variant:"hexagon"})}),e(r,{...a,innerClassName:N.className({variant:"triangle"})})]});g.argTypes={innerClassName:{control:!1}};const c=a=>o(r.Group,{children:[e(r,{...a}),e(r,{...a}),e(r,{...a}),e(r,{...a})]});c.args={size:"sm",innerClassName:""};c.argTypes={shape:{control:!1}};const l=({src:a,letters:n,...s})=>o(r.Group,{children:[e(r,{...s,src:a}),e(r,{...s,src:a}),e(r,{...s,src:a}),e(r,{...s,letters:n})]});l.args={size:"sm",letters:"+99",innerClassName:""};l.argTypes={shape:{control:!1}};const i=({src:a,letters:n,...s})=>o("div",{className:"flex flex-col items-center gap-y-2",children:[o(r.Group,{className:"space-x-4",children:[e(r,{...s,src:a}),e(r,{...s,src:a}),e(r,{...s,src:a}),e(r,{...s,letters:n})]}),o(r.Group,{className:"space-x-0",children:[e(r,{...s,src:a}),e(r,{...s,src:a}),e(r,{...s,src:a}),e(r,{...s,letters:n})]}),o(r.Group,{className:"-space-x-4",children:[e(r,{...s,src:a}),e(r,{...s,src:a}),e(r,{...s,src:a}),e(r,{...s,letters:n})]}),o(r.Group,{className:"-space-x-8",children:[e(r,{...s,src:a}),e(r,{...s,src:a}),e(r,{...s,src:a}),e(r,{...s,letters:n})]})]});i.args={size:"sm",letters:"+99",innerClassName:""};i.argTypes={shape:{control:!1}};const A=b.bind({});A.args={border:!0,borderColor:"primary",shape:"circle"};const d=a=>o("div",{className:"flex items-center gap-4",children:[e(r,{...a,online:!0}),e(r,{...a,offline:!0})]});d.argTypes={online:{control:!1},offline:{control:!1}};d.args={innerClassName:"",shape:"circle"};const p=a=>o("div",{className:"flex items-center gap-4",children:[e(r,{...a,letters:"K",size:"lg"}),e(r,{...a,letters:"JO",size:"md",online:!0}),e(r,{...a,letters:"MX",size:"sm"}),e(r,{...a,letters:"AA",size:"xs"})]});p.argTypes={size:{control:!1},online:{control:!1},letters:{control:!1},src:{control:!1}};p.args={shape:"circle",src:""};const dr=o("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",width:"600px",height:"600px",viewBox:"0 0 600 600",enableBackground:"new 0 0 600 600",children:[o("g",{id:"Layer_2",children:[e("path",{fill:"none",stroke:"#E91E63",strokeWidth:"24",strokeMiterlimit:"10",d:`M371.987,227.641 - c47.628,47.628,85.039,98.708,106.914,143.552c26.358,54.033,30.096,99.722,11.103,118.714 - c-19.793,19.793-68.267,15.884-125.731-12.979c-43.445-21.821-92.031-59.119-137.242-104.331 - c-46.354-46.354-84.95-95.545-106.667-139.816c-27.48-56.023-30.057-103.743-10.643-123.157 - c18.838-18.839,63.248-16.056,116.694,9.757C271.574,141.193,323.895,179.548,371.987,227.641z`}),e("path",{fill:"none",stroke:"#E91E63",strokeWidth:"24",strokeMiterlimit:"10",d:`M272.931,201.125 - c65.052-17.465,127.989-24.354,177.767-20.902c59.974,4.16,101.42,23.747,108.385,49.688 - c7.259,27.033-20.345,67.073-74.054,102.434c-40.608,26.733-97.189,50.188-158.941,66.769 - c-63.312,16.998-125.207,25.858-174.408,22.553c-62.26-4.181-104.884-25.789-112.004-52.306 - c-6.907-25.731,17.688-62.811,66.75-96.214C147.879,244.923,207.243,218.761,272.931,201.125z`}),e("path",{fill:"none",stroke:"#E91E63",strokeWidth:"24",strokeMiterlimit:"10",d:`M200.469,273.707 - c17.357-65.081,42.82-123.05,70.671-164.45c33.556-49.882,71.225-76.008,97.178-69.086c27.045,7.212,47.949,51.123,51.76,115.315 - c2.883,48.533-5.055,109.266-21.531,171.046c-16.892,63.341-40.126,121.389-67.562,162.365 - c-34.716,51.852-74.723,77.988-101.252,70.913c-25.743-6.865-45.584-46.692-50.021-105.881 - C175.963,403.92,182.944,339.424,200.469,273.707z`})]}),e("g",{id:"Layer_3",children:e("path",{fill:"#E91E63",d:`M300,349.369c-1.019,0-1.881-0.353-2.586-1.058l-36.679-35.386c-0.392-0.313-0.931-0.822-1.617-1.528 - c-0.686-0.705-1.773-1.988-3.262-3.851c-1.489-1.86-2.822-3.771-3.997-5.73s-2.224-4.33-3.145-7.112 - c-0.92-2.782-1.381-5.486-1.381-8.111c0-8.621,2.488-15.361,7.465-20.221c4.977-4.859,11.854-7.289,20.631-7.289 - c2.43,0,4.909,0.421,7.436,1.264c2.527,0.843,4.879,1.979,7.054,3.41c2.174,1.43,4.046,2.772,5.613,4.026s3.057,2.586,4.467,3.997 - c1.411-1.411,2.899-2.743,4.467-3.997c1.568-1.254,3.438-2.596,5.614-4.026c2.175-1.431,4.525-2.567,7.054-3.41 - c2.527-0.842,5.006-1.264,7.435-1.264c8.778,0,15.655,2.43,20.632,7.289c4.978,4.859,7.466,11.6,7.466,20.221 - c0,8.66-4.487,17.477-13.461,26.451l-36.619,35.268C301.881,349.017,301.019,349.369,300,349.369z`})})]}),C=b.bind({});C.args={shape:"circle",children:dr,border:!0,innerClassName:"",src:""};const h=a=>o(r,{...a,children:[e("span",{className:"absolute text-center font-bold",children:"React"}),dr]});h.args={innerClassName:"",src:""};const m=({src:a,letters:n,...s})=>o("div",{children:[o("div",{className:"flex gap-4 m-4",children:[e(r,{...s,borderColor:"neutral",src:a}),e(r,{...s,borderColor:"primary",src:a}),e(r,{...s,borderColor:"secondary",src:a}),e(r,{...s,borderColor:"accent",src:a}),e(r,{...s,borderColor:"info",src:a}),e(r,{...s,borderColor:"success",src:a}),e(r,{...s,borderColor:"warning",src:a}),e(r,{...s,borderColor:"error",src:a})]}),o("div",{className:"flex gap-4 m-4",children:[e(r,{...s,borderColor:"neutral",color:"neutral",letters:n}),e(r,{...s,borderColor:"primary",color:"primary",letters:n}),e(r,{...s,borderColor:"secondary",color:"secondary",letters:n}),e(r,{...s,borderColor:"accent",color:"accent",letters:n}),e(r,{...s,borderColor:"info",color:"info",letters:n}),e(r,{...s,borderColor:"success",color:"success",letters:n}),e(r,{...s,borderColor:"warning",color:"warning",letters:n}),e(r,{...s,borderColor:"error",color:"error",letters:n})]})]});m.argTypes={color:{control:!1},borderColor:{control:!1}};m.args={letters:"Y",border:!0,shape:"circle",size:"sm"};var x,z,y;f.parameters={...f.parameters,docs:{...(x=f.parameters)==null?void 0:x.docs,source:{originalSource:`args => { - return ; -}`,...(y=(z=f.parameters)==null?void 0:z.docs)==null?void 0:y.source}}};var G,S,M;t.parameters={...t.parameters,docs:{...(G=t.parameters)==null?void 0:G.docs,source:{originalSource:`args => { - return ; -}`,...(M=(S=t.parameters)==null?void 0:S.docs)==null?void 0:M.source}}};var k,w,T;u.parameters={...u.parameters,docs:{...(k=u.parameters)==null?void 0:k.docs,source:{originalSource:`args => { - return
- - - - - - -
; -}`,...(T=(w=u.parameters)==null?void 0:w.docs)==null?void 0:T.source}}};var E,W,R;v.parameters={...v.parameters,docs:{...(E=v.parameters)==null?void 0:E.docs,source:{originalSource:`args => { - return
- - -
; -}`,...(R=(W=v.parameters)==null?void 0:W.docs)==null?void 0:R.source}}};var _,B,D;g.parameters={...g.parameters,docs:{...(_=g.parameters)==null?void 0:_.docs,source:{originalSource:`args => { - return
- - - -
; -}`,...(D=(B=g.parameters)==null?void 0:B.docs)==null?void 0:D.source}}};var L,P,j;c.parameters={...c.parameters,docs:{...(L=c.parameters)==null?void 0:L.docs,source:{originalSource:`args => { - return - - - - - ; -}`,...(j=(P=c.parameters)==null?void 0:P.docs)==null?void 0:j.source}}};var O,q,I;l.parameters={...l.parameters,docs:{...(O=l.parameters)==null?void 0:O.docs,source:{originalSource:`({ - src, - letters, - ...args -}) => { - return - - - - - ; -}`,...(I=(q=l.parameters)==null?void 0:q.docs)==null?void 0:I.source}}};var J,K,X;i.parameters={...i.parameters,docs:{...(J=i.parameters)==null?void 0:J.docs,source:{originalSource:`({ - src, - letters, - ...args -}) => { - return
- - - - - - - - - - - - - - - - - - - - - - - - -
; -}`,...(X=(K=i.parameters)==null?void 0:K.docs)==null?void 0:X.source}}};var Y,F,H;A.parameters={...A.parameters,docs:{...(Y=A.parameters)==null?void 0:Y.docs,source:{originalSource:`args => { - return ; -}`,...(H=(F=A.parameters)==null?void 0:F.docs)==null?void 0:H.source}}};var Q,U,V;d.parameters={...d.parameters,docs:{...(Q=d.parameters)==null?void 0:Q.docs,source:{originalSource:`args => { - return
- - -
; -}`,...(V=(U=d.parameters)==null?void 0:U.docs)==null?void 0:V.source}}};var Z,$,rr;p.parameters={...p.parameters,docs:{...(Z=p.parameters)==null?void 0:Z.docs,source:{originalSource:`args => { - return
- - - - -
; -}`,...(rr=($=p.parameters)==null?void 0:$.docs)==null?void 0:rr.source}}};var er,ar,sr;C.parameters={...C.parameters,docs:{...(er=C.parameters)==null?void 0:er.docs,source:{originalSource:`args => { - return ; -}`,...(sr=(ar=C.parameters)==null?void 0:ar.docs)==null?void 0:sr.source}}};var or,nr,tr;h.parameters={...h.parameters,docs:{...(or=h.parameters)==null?void 0:or.docs,source:{originalSource:`args => { - return - React - {reactLogoSvg} - ; -}`,...(tr=(nr=h.parameters)==null?void 0:nr.docs)==null?void 0:tr.source}}};var cr,lr,ir;m.parameters={...m.parameters,docs:{...(cr=m.parameters)==null?void 0:cr.docs,source:{originalSource:`({ - src, - letters, - ...args -}) => { - return
-
- - - - - - - - -
-
- - - - - - - - -
-
; -}`,...(ir=(lr=m.parameters)==null?void 0:lr.docs)==null?void 0:ir.source}}};const hr=["Default","CustomSize","Sizes","Rounded","WithMask","Group","GroupWithCounter","GroupSpaceBetween","Ring","PresenceIndicator","Placeholder","WithSvg","MultipleChildren","Colors"];export{m as Colors,t as CustomSize,f as Default,c as Group,i as GroupSpaceBetween,l as GroupWithCounter,h as MultipleChildren,p as Placeholder,d as PresenceIndicator,A as Ring,v as Rounded,u as Sizes,g as WithMask,C as WithSvg,hr as __namedExportsOrder,Cr as default}; diff --git a/docs/assets/Badge.stories-1e6185a7.js b/docs/assets/Badge.stories-1e6185a7.js deleted file mode 100644 index 15fe6beb..00000000 --- a/docs/assets/Badge.stories-1e6185a7.js +++ /dev/null @@ -1,125 +0,0 @@ -import{j as r,a as s}from"./tw-merge-4486aaf0.js";import{B as n}from"./index-e61e426b.js";import{B as m}from"./Button-e31631bb.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";import"./index-8d7e61f2.js";const J={title:"Data Display/Badge",component:n},a=e=>r(n,{...e,children:"Badge"});a.args={};const l=e=>s("div",{className:"flex gap-2 items-center",children:[r(n,{...e,children:"default"}),r(n,{...e,color:"neutral",children:"neutral"}),r(n,{...e,color:"primary",children:"primary"}),r(n,{...e,color:"secondary",children:"secondary"}),r(n,{...e,color:"accent",children:"accent"}),r(n,{...e,color:"ghost",children:"ghost"})]}),o=e=>s("div",{className:"flex gap-2 items-center",children:[r(n,{...e,children:"default"}),r(n,{...e,color:"primary",children:"primary"}),r(n,{...e,color:"secondary",children:"secondary"}),r(n,{...e,color:"accent",children:"accent"})]});o.args={variant:"outline"};const g=e=>s("div",{className:"flex gap-2 items-center",children:[r(n,{...e,size:"lg",children:"987,654"}),r(n,{...e,size:"md",children:"987,654"}),r(n,{...e,size:"sm",children:"987,654"}),r(n,{...e,size:"xs",children:"987,654"})]}),t=e=>s("div",{className:"flex gap-2 items-center",children:[r(n,{...e,size:"lg"}),r(n,{...e,size:"md"}),r(n,{...e,size:"sm"}),r(n,{...e,size:"xs"})]});t.args={color:"primary"};const c=e=>s("div",{className:"flex gap-2 items-center",children:[s(n,{...e,color:"info",children:[r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-4 h-4 stroke-current",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})}),"info"]}),s(n,{...e,color:"success",children:[r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-4 h-4 stroke-current",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})}),"success"]}),s(n,{...e,color:"warning",children:[r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-4 h-4 stroke-current",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})}),"warning"]}),s(n,{...e,color:"error",children:[r("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-4 h-4 stroke-current",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})}),"error"]})]});c.args={className:"gap-2"};const i=e=>s("div",{className:"flex flex-col gap-2 items-center",children:[s("h2",{className:"text-xl",children:["Heading",r(n,{...e,size:"lg",children:"NEW"})]}),s("h3",{className:"text-xl",children:["Heading",r(n,{...e,size:"md",children:"NEW"})]}),s("h4",{className:"text-base",children:["Heading",r(n,{...e,size:"sm",children:"NEW"})]}),s("h5",{className:"text-sm",children:["Heading",r(n,{...e,size:"xs",children:"NEW"})]})]});i.args={};const d=e=>s("div",{className:"flex gap-2 items-center",children:[s(m,{children:["Inbox",r(n,{...e,children:"+99"})]}),s(m,{children:["Inbox",r(n,{...e,color:"secondary",children:"+99"})]})]});d.args={};var p,h,u;a.parameters={...a.parameters,docs:{...(p=a.parameters)==null?void 0:p.docs,source:{originalSource:`args => { - return Badge; -}`,...(u=(h=a.parameters)==null?void 0:h.docs)==null?void 0:u.source}}};var B,x,w;l.parameters={...l.parameters,docs:{...(B=l.parameters)==null?void 0:B.docs,source:{originalSource:`args => { - return
- default - - neutral - - - primary - - - secondary - - - accent - - - ghost - -
; -}`,...(w=(x=l.parameters)==null?void 0:x.docs)==null?void 0:w.source}}};var v,k,N;o.parameters={...o.parameters,docs:{...(v=o.parameters)==null?void 0:v.docs,source:{originalSource:`args => { - return
- default - - primary - - - secondary - - - accent - -
; -}`,...(N=(k=o.parameters)==null?void 0:k.docs)==null?void 0:N.source}}};var f,z,L;g.parameters={...g.parameters,docs:{...(f=g.parameters)==null?void 0:f.docs,source:{originalSource:`args => { - return
- - 987,654 - - - 987,654 - - - 987,654 - - - 987,654 - -
; -}`,...(L=(z=g.parameters)==null?void 0:z.docs)==null?void 0:L.source}}};var y,M,W;t.parameters={...t.parameters,docs:{...(y=t.parameters)==null?void 0:y.docs,source:{originalSource:`args => { - return
- - - - -
; -}`,...(W=(M=t.parameters)==null?void 0:M.docs)==null?void 0:W.source}}};var b,S,j;c.parameters={...c.parameters,docs:{...(b=c.parameters)==null?void 0:b.docs,source:{originalSource:`args => { - return
- - - - - info - - - - - - success - - - - - - warning - - - - - - error - -
; -}`,...(j=(S=c.parameters)==null?void 0:S.docs)==null?void 0:j.source}}};var E,H,I;i.parameters={...i.parameters,docs:{...(E=i.parameters)==null?void 0:E.docs,source:{originalSource:`args => { - return
-

- Heading - - NEW - -

-

- Heading - - NEW - -

-

- Heading - - NEW - -

- -
- Heading - - NEW - -
-
; -}`,...(I=(H=i.parameters)==null?void 0:H.docs)==null?void 0:I.source}}};var C,D,O;d.parameters={...d.parameters,docs:{...(C=d.parameters)==null?void 0:C.docs,source:{originalSource:`args => { - return
- - -
; -}`,...(O=(D=d.parameters)==null?void 0:D.docs)==null?void 0:O.source}}};const K=["Default","BrandColors","Outline","Sizes","Empty","StateColors","BadgeInText","BadgeInAButton"];export{d as BadgeInAButton,i as BadgeInText,l as BrandColors,a as Default,t as Empty,o as Outline,g as Sizes,c as StateColors,K as __namedExportsOrder,J as default}; diff --git a/docs/assets/Badge.stories-Cr8laEmz.js b/docs/assets/Badge.stories-Cr8laEmz.js new file mode 100644 index 00000000..2aeb8ac3 --- /dev/null +++ b/docs/assets/Badge.stories-Cr8laEmz.js @@ -0,0 +1,151 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{B as s}from"./index-Bdz6q0Sq.js";import{B as x}from"./Button-GtH5nISf.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";import"./index-Dl-l57lR.js";const Y={title:"Data Display/Badge",component:s},n=r=>e.jsx(s,{...r,children:"Badge"});n.args={};const g=r=>e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(s,{...r,children:"default"}),e.jsx(s,{...r,color:"neutral",children:"neutral"}),e.jsx(s,{...r,color:"primary",children:"primary"}),e.jsx(s,{...r,color:"secondary",children:"secondary"}),e.jsx(s,{...r,color:"accent",children:"accent"}),e.jsx(s,{...r,color:"ghost",children:"ghost"})]}),a=r=>e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(s,{...r,children:"default"}),e.jsx(s,{...r,color:"primary",children:"primary"}),e.jsx(s,{...r,color:"secondary",children:"secondary"}),e.jsx(s,{...r,color:"accent",children:"accent"})]});a.args={variant:"soft"};const o=r=>e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(s,{...r,children:"default"}),e.jsx(s,{...r,color:"primary",children:"primary"}),e.jsx(s,{...r,color:"secondary",children:"secondary"}),e.jsx(s,{...r,color:"accent",children:"accent"})]});o.args={variant:"outline"};const c=r=>e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(s,{...r,children:"default"}),e.jsx(s,{...r,color:"primary",children:"primary"}),e.jsx(s,{...r,color:"secondary",children:"secondary"}),e.jsx(s,{...r,color:"accent",children:"accent"})]});c.args={variant:"dash"};const m=r=>e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(s,{...r,size:"lg",children:"987,654"}),e.jsx(s,{...r,size:"md",children:"987,654"}),e.jsx(s,{...r,size:"sm",children:"987,654"}),e.jsx(s,{...r,size:"xs",children:"987,654"})]}),t=r=>e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsx(s,{...r,size:"lg"}),e.jsx(s,{...r,size:"md"}),e.jsx(s,{...r,size:"sm"}),e.jsx(s,{...r,size:"xs"})]});t.args={color:"primary"};const d=r=>e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsxs(s,{...r,color:"info",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-4 h-4 stroke-current",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})}),"info"]}),e.jsxs(s,{...r,color:"success",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-4 h-4 stroke-current",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})}),"success"]}),e.jsxs(s,{...r,color:"warning",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-4 h-4 stroke-current",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})}),"warning"]}),e.jsxs(s,{...r,color:"error",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-4 h-4 stroke-current",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})}),"error"]})]});d.args={className:"gap-2"};const i=r=>e.jsxs("div",{className:"flex flex-col gap-2 items-center",children:[e.jsxs("h2",{className:"text-xl",children:["Heading",e.jsx(s,{...r,size:"lg",children:"NEW"})]}),e.jsxs("h3",{className:"text-xl",children:["Heading",e.jsx(s,{...r,size:"md",children:"NEW"})]}),e.jsxs("h4",{className:"text-base",children:["Heading",e.jsx(s,{...r,size:"sm",children:"NEW"})]}),e.jsxs("h5",{className:"text-sm",children:["Heading",e.jsx(s,{...r,size:"xs",children:"NEW"})]})]});i.args={};const l=r=>e.jsxs("div",{className:"flex gap-2 items-center",children:[e.jsxs(x,{children:["Inbox",e.jsx(s,{...r,children:"+99"})]}),e.jsxs(x,{children:["Inbox",e.jsx(s,{...r,color:"secondary",children:"+99"})]})]});l.args={};var p,h,u;n.parameters={...n.parameters,docs:{...(p=n.parameters)==null?void 0:p.docs,source:{originalSource:`args => { + return Badge; +}`,...(u=(h=n.parameters)==null?void 0:h.docs)==null?void 0:u.source}}};var B,j,v;g.parameters={...g.parameters,docs:{...(B=g.parameters)==null?void 0:B.docs,source:{originalSource:`args => { + return
+ default + + neutral + + + primary + + + secondary + + + accent + + + ghost + +
; +}`,...(v=(j=g.parameters)==null?void 0:j.docs)==null?void 0:v.source}}};var w,f,y;a.parameters={...a.parameters,docs:{...(w=a.parameters)==null?void 0:w.docs,source:{originalSource:`args => { + return
+ default + + primary + + + secondary + + + accent + +
; +}`,...(y=(f=a.parameters)==null?void 0:f.docs)==null?void 0:y.source}}};var N,k,z;o.parameters={...o.parameters,docs:{...(N=o.parameters)==null?void 0:N.docs,source:{originalSource:`args => { + return
+ default + + primary + + + secondary + + + accent + +
; +}`,...(z=(k=o.parameters)==null?void 0:k.docs)==null?void 0:z.source}}};var L,S,M;c.parameters={...c.parameters,docs:{...(L=c.parameters)==null?void 0:L.docs,source:{originalSource:`args => { + return
+ default + + primary + + + secondary + + + accent + +
; +}`,...(M=(S=c.parameters)==null?void 0:S.docs)==null?void 0:M.source}}};var W,b,E;m.parameters={...m.parameters,docs:{...(W=m.parameters)==null?void 0:W.docs,source:{originalSource:`args => { + return
+ + 987,654 + + + 987,654 + + + 987,654 + + + 987,654 + +
; +}`,...(E=(b=m.parameters)==null?void 0:b.docs)==null?void 0:E.source}}};var H,I,D;t.parameters={...t.parameters,docs:{...(H=t.parameters)==null?void 0:H.docs,source:{originalSource:`args => { + return
+ + + + +
; +}`,...(D=(I=t.parameters)==null?void 0:I.docs)==null?void 0:D.source}}};var C,O,_;d.parameters={...d.parameters,docs:{...(C=d.parameters)==null?void 0:C.docs,source:{originalSource:`args => { + return
+ + + + + info + + + + + + success + + + + + + warning + + + + + + error + +
; +}`,...(_=(O=d.parameters)==null?void 0:O.docs)==null?void 0:_.source}}};var A,T,R;i.parameters={...i.parameters,docs:{...(A=i.parameters)==null?void 0:A.docs,source:{originalSource:`args => { + return
+

+ Heading + + NEW + +

+

+ Heading + + NEW + +

+

+ Heading + + NEW + +

+ +
+ Heading + + NEW + +
+
; +}`,...(R=(T=i.parameters)==null?void 0:T.docs)==null?void 0:R.source}}};var q,F,G;l.parameters={...l.parameters,docs:{...(q=l.parameters)==null?void 0:q.docs,source:{originalSource:`args => { + return
+ + +
; +}`,...(G=(F=l.parameters)==null?void 0:F.docs)==null?void 0:G.source}}};const Z=["Default","BrandColors","SoftStyle","OutlineStyle","DashStyle","Sizes","Empty","StateColors","BadgeInText","BadgeInAButton"];export{l as BadgeInAButton,i as BadgeInText,g as BrandColors,c as DashStyle,n as Default,t as Empty,o as OutlineStyle,m as Sizes,a as SoftStyle,d as StateColors,Z as __namedExportsOrder,Y as default}; diff --git a/docs/assets/BottomNavigation.stories-0f9a26f2.js b/docs/assets/BottomNavigation.stories-0f9a26f2.js deleted file mode 100644 index 60375b25..00000000 --- a/docs/assets/BottomNavigation.stories-0f9a26f2.js +++ /dev/null @@ -1,302 +0,0 @@ -import{t as x,j as o,a as e,F as u}from"./tw-merge-4486aaf0.js";import{r as L}from"./index-f46741a2.js";import{c as A}from"./clsx.m-1229b3e0.js";const N=L.forwardRef(({children:a,className:r,color:n,dataTheme:s,active:i,disabled:k,...p},G)=>{const J=x(r,A({"text-neutral":n==="neutral","text-primary":n==="primary","text-secondary":n==="secondary","text-accent":n==="accent","text-info":n==="info","text-success":n==="success","text-warning":n==="warning","text-error":n==="error",active:i,disabled:k}));return o("button",{...p,className:J,"data-theme":s,ref:G,children:a})}),K=N;try{N.displayName="BottomNavigationItem",N.__docgenInfo={description:"",displayName:"BottomNavigationItem",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},active:{defaultValue:null,description:"",name:"active",required:!1,type:{name:"boolean"}}}}}catch{}const B=L.forwardRef(({children:a,className:r,...n},s)=>{const i=x("btm-nav-label",r);return o("span",{...n,className:i,ref:s,children:a})}),P=B;try{B.displayName="BottomNavigationLabel",B.__docgenInfo={description:"",displayName:"BottomNavigationLabel",props:{}}}catch{}const g=L.forwardRef(({size:a,dataTheme:r,className:n,children:s,...i},k)=>{const p=x("btm-nav",A({"btm-nav-lg":a==="lg","btm-nav-md":a==="md","btm-nav-sm":a==="sm","btm-nav-xs":a==="xs"}),n);return o("div",{...i,role:"navigation","data-theme":r,className:p,ref:k,children:s})});g.displayName="BottomNavigation";const t=Object.assign(g,{Item:K,Label:P});try{g.displayName="BottomNavigation",g.__docgenInfo={description:"",displayName:"BottomNavigation",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}}}}}catch{}const Y={title:"Navigation/BottomNavigation",component:t,parameters:{controls:{expanded:!0}},argTypes:{children:{control:!1}},args:{className:"relative"}},m=a=>e(t,{...a,children:[o(t.Item,{children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),o(t.Item,{active:!0,children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o(t.Item,{children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})]}),l=a=>e(u,{children:[e(t,{...a,children:[o(t.Item,{color:"primary",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),o(t.Item,{color:"primary",active:!0,children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o(t.Item,{color:"primary",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})]}),e(t,{...a,children:[o(t.Item,{color:"secondary",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),o(t.Item,{color:"secondary",active:!0,children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o(t.Item,{color:"secondary",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})]}),e(t,{...a,children:[o(t.Item,{color:"accent",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),o(t.Item,{color:"accent",active:!0,children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o(t.Item,{color:"accent",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})]})]}),v=a=>e(u,{children:[e(t,{...a,children:[o(t.Item,{color:"info",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),o(t.Item,{color:"info",active:!0,children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o(t.Item,{color:"info",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})]}),e(t,{...a,children:[o(t.Item,{color:"success",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),o(t.Item,{color:"success",active:!0,children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o(t.Item,{color:"success",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})]}),e(t,{...a,children:[o(t.Item,{color:"warning",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),o(t.Item,{color:"warning",active:!0,children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o(t.Item,{color:"warning",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})]}),e(t,{...a,children:[o(t.Item,{color:"error",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),o(t.Item,{color:"error",active:!0,children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o(t.Item,{color:"error",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})]})]}),c=a=>e(t,{...a,children:[e(t.Item,{children:[o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),o(t.Label,{children:"Home"})]}),e(t.Item,{active:!0,children:[o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),o(t.Label,{children:"Warnings"})]}),e(t.Item,{children:[o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})}),o(t.Label,{children:"Statics"})]})]}),d=a=>e(t,{...a,children:[e(t.Item,{className:"bg-pink-200 text-pink-600",children:[o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),o(t.Label,{children:"Home"})]}),e(t.Item,{active:!0,className:"bg-blue-200 text-blue-600 border-blue-600",children:[o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),o(t.Label,{children:"Warnings"})]}),e(t.Item,{className:"bg-teal-200 text-teal-600",children:[o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})}),o(t.Label,{children:"Statics"})]})]}),h=a=>e(u,{children:[e(t,{...a,size:"xs",children:[o(t.Item,{children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),o(t.Item,{active:!0,children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o(t.Item,{children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})]}),e(t,{...a,size:"sm",children:[o(t.Item,{children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),o(t.Item,{active:!0,children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o(t.Item,{children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})]}),e(t,{...a,size:"md",children:[o(t.Item,{children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),o(t.Item,{active:!0,children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o(t.Item,{children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})]}),e(t,{...a,size:"lg",children:[o(t.Item,{children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),o(t.Item,{active:!0,children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o(t.Item,{children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})]})]});h.argTypes={size:{control:!1}};const w=a=>e(u,{children:[e(t,{...a,children:[o(t.Item,{children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),o(t.Item,{disabled:!0,children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o(t.Item,{children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})]}),e(t,{...a,children:[o(t.Item,{children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})}),o(t.Item,{className:"disabled",tabIndex:-1,role:"button","aria-disabled":"true",children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),o(t.Item,{children:o("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:o("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})]})]});var M,I,f;m.parameters={...m.parameters,docs:{...(M=m.parameters)==null?void 0:M.docs,source:{originalSource:`args => { - return - - - - - - - - - - - - - - - - ; -}`,...(f=(I=m.parameters)==null?void 0:I.docs)==null?void 0:f.source}}};var z,C,j;l.parameters={...l.parameters,docs:{...(z=l.parameters)==null?void 0:z.docs,source:{originalSource:`args => { - return <> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; -}`,...(j=(C=l.parameters)==null?void 0:C.docs)==null?void 0:j.source}}};var W,V,b;v.parameters={...v.parameters,docs:{...(W=v.parameters)==null?void 0:W.docs,source:{originalSource:`args => { - return <> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; -}`,...(b=(V=v.parameters)==null?void 0:V.docs)==null?void 0:b.source}}};var H,y,_;c.parameters={...c.parameters,docs:{...(H=c.parameters)==null?void 0:H.docs,source:{originalSource:`args => { - return - - - - - Home - - - - - - Warnings - - - - - - Statics - - ; -}`,...(_=(y=c.parameters)==null?void 0:y.docs)==null?void 0:_.source}}};var S,T,q;d.parameters={...d.parameters,docs:{...(S=d.parameters)==null?void 0:S.docs,source:{originalSource:`args => { - return - - - - - Home - - - - - - Warnings - - - - - - Statics - - ; -}`,...(q=(T=d.parameters)==null?void 0:T.docs)==null?void 0:q.source}}};var D,R,$;h.parameters={...h.parameters,docs:{...(D=h.parameters)==null?void 0:D.docs,source:{originalSource:`args => { - return <> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; -}`,...($=(R=h.parameters)==null?void 0:R.docs)==null?void 0:$.source}}};var E,F,O;w.parameters={...w.parameters,docs:{...(E=w.parameters)==null?void 0:E.docs,source:{originalSource:`args => { - return <> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ; -}`,...(O=(F=w.parameters)==null?void 0:F.docs)==null?void 0:O.source}}};const Z=["Default","BrandColors","StateColors","Title","CustomColor","Sizes","DisabledButtons"];export{l as BrandColors,d as CustomColor,m as Default,w as DisabledButtons,h as Sizes,v as StateColors,c as Title,Z as __namedExportsOrder,Y as default}; diff --git a/docs/assets/Breadcrumbs.stories-230ac743.js b/docs/assets/Breadcrumbs.stories-230ac743.js deleted file mode 100644 index bfb427a3..00000000 --- a/docs/assets/Breadcrumbs.stories-230ac743.js +++ /dev/null @@ -1,36 +0,0 @@ -import{j as e,F as y,t as H,a}from"./tw-merge-4486aaf0.js";import{R as L}from"./index-f46741a2.js";const i=L.forwardRef(({children:t,href:s,...d},c)=>e("li",{role:"link",...d,ref:c,children:s?e("a",{href:s,children:t}):e(y,{children:t})})),M=i;try{i.displayName="BreadcrumbsItem",i.__docgenInfo={description:"",displayName:"BreadcrumbsItem",props:{href:{defaultValue:null,description:"",name:"href",required:!1,type:{name:"string"}}}}}catch{}const u=L.forwardRef(({children:t,dataTheme:s,className:d,innerProps:c,innerRef:x,...v},_)=>{const k=H("breadcrumbs","text-sm",d);return e("div",{role:"navigation","aria-label":"Breadcrumbs",...v,"data-theme":s,className:k,ref:_,children:e("ul",{...c,ref:x,children:t})})}),r=Object.assign(u,{Item:M});try{u.displayName="Breadcrumbs",u.__docgenInfo={description:"",displayName:"Breadcrumbs",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},innerRef:{defaultValue:null,description:"",name:"innerRef",required:!1,type:{name:"Ref"}},innerProps:{defaultValue:null,description:"",name:"innerProps",required:!1,type:{name:"HTMLAttributes"}}}}}catch{}try{r.displayName="Breadcrumbs",r.__docgenInfo={description:"",displayName:"Breadcrumbs",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},innerRef:{defaultValue:null,description:"",name:"innerRef",required:!1,type:{name:"Ref"}},innerProps:{defaultValue:null,description:"",name:"innerProps",required:!1,type:{name:"HTMLAttributes"}}}}}catch{}const W={title:"Navigation/Breadcrumbs",component:r},m=t=>a(r,{...t,children:[e(r.Item,{href:"/",children:"Home"}),e(r.Item,{href:"/",children:"Documents"}),e(r.Item,{href:"/",children:"Add Document"})]}),o=t=>a(r,{...t,children:[a(r.Item,{href:"/",children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"w-4 h-4 mr-2 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),"Home"]}),a(r.Item,{href:"/",children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"w-4 h-4 mr-2 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),"Documents"]}),a(r.Item,{href:"/",children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"w-4 h-4 mr-2 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),"Add Document"]})]}),n=t=>a(r,{...t,children:[e(r.Item,{children:"Long text 1"}),e(r.Item,{children:"Long text 2"}),e(r.Item,{children:"Long text 3"}),e(r.Item,{children:"Long text 4"}),e(r.Item,{children:"Long text 5"})]});n.args={className:"max-w-xs "};var l,h,p;m.parameters={...m.parameters,docs:{...(l=m.parameters)==null?void 0:l.docs,source:{originalSource:`args => { - return - Home - Documents - Add Document - ; -}`,...(p=(h=m.parameters)==null?void 0:h.docs)==null?void 0:p.source}}};var g,f,b;o.parameters={...o.parameters,docs:{...(g=o.parameters)==null?void 0:g.docs,source:{originalSource:`args => { - return - - - - - Home - - - - - - Documents - - - - - - Add Document - - ; -}`,...(b=(f=o.parameters)==null?void 0:f.docs)==null?void 0:b.source}}};var B,I,w;n.parameters={...n.parameters,docs:{...(B=n.parameters)==null?void 0:B.docs,source:{originalSource:`args => { - return - Long text 1 - Long text 2 - Long text 3 - Long text 4 - Long text 5 - ; -}`,...(w=(I=n.parameters)==null?void 0:I.docs)==null?void 0:w.source}}};const j=["Default","WithIcons","WithMaxWidth"];export{m as Default,o as WithIcons,n as WithMaxWidth,j as __namedExportsOrder,W as default}; diff --git a/docs/assets/Breadcrumbs.stories-C3mriA3u.js b/docs/assets/Breadcrumbs.stories-C3mriA3u.js new file mode 100644 index 00000000..fbcb7cad --- /dev/null +++ b/docs/assets/Breadcrumbs.stories-C3mriA3u.js @@ -0,0 +1,36 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{e as I}from"./iframe-DDnXVYpC.js";import{t as _}from"./bundle-mjs-yGZq-iow.js";const c=I.forwardRef(({children:s,href:n,...o},d)=>e.jsx("li",{role:"link",...o,ref:d,children:n?e.jsx("a",{href:n,children:s}):e.jsx(e.Fragment,{children:s})}));try{c.displayName="BreadcrumbsItem",c.__docgenInfo={description:"",displayName:"BreadcrumbsItem",props:{href:{defaultValue:null,description:"",name:"href",required:!1,type:{name:"string"}}}}}catch{}const i=I.forwardRef(({children:s,dataTheme:n,className:o,innerProps:d,innerRef:w,...j},L)=>{const v=_("breadcrumbs","text-sm",o);return e.jsx("div",{role:"navigation","aria-label":"Breadcrumbs",...j,"data-theme":n,className:v,ref:L,children:e.jsx("ul",{...d,ref:w,children:s})})}),r=Object.assign(i,{Item:c});try{i.displayName="Breadcrumbs",i.__docgenInfo={description:"",displayName:"Breadcrumbs",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},innerRef:{defaultValue:null,description:"",name:"innerRef",required:!1,type:{name:"Ref"}},innerProps:{defaultValue:null,description:"",name:"innerProps",required:!1,type:{name:"HTMLAttributes"}}}}}catch{}try{r.displayName="Breadcrumbs",r.__docgenInfo={description:"",displayName:"Breadcrumbs",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},innerRef:{defaultValue:null,description:"",name:"innerRef",required:!1,type:{name:"Ref"}},innerProps:{defaultValue:null,description:"",name:"innerProps",required:!1,type:{name:"HTMLAttributes"}}}}}catch{}const{Item:M}=r,N={title:"Navigation/Breadcrumbs",component:r},a=s=>e.jsxs(r,{...s,children:[e.jsx(r.Item,{href:"/",children:"Home"}),e.jsx(r.Item,{href:"/",children:"Documents"}),e.jsx(r.Item,{href:"/",children:"Add Document"})]}),m=s=>e.jsxs(r,{...s,children:[e.jsxs(r.Item,{href:"/",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"w-4 h-4 mr-2 stroke-current",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),"Home"]}),e.jsxs(r.Item,{href:"/",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"w-4 h-4 mr-2 stroke-current",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})}),"Documents"]}),e.jsxs(r.Item,{href:"/",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"w-4 h-4 mr-2 stroke-current",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m5 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),"Add Document"]})]}),t=s=>e.jsxs(r,{...s,children:[e.jsx(r.Item,{children:"Long text 1"}),e.jsx(r.Item,{children:"Long text 2"}),e.jsx(r.Item,{children:"Long text 3"}),e.jsx(r.Item,{children:"Long text 4"}),e.jsx(r.Item,{children:"Long text 5"})]});t.args={className:"max-w-xs "};var u,l,h;a.parameters={...a.parameters,docs:{...(u=a.parameters)==null?void 0:u.docs,source:{originalSource:`args => { + return + Home + Documents + Add Document + ; +}`,...(h=(l=a.parameters)==null?void 0:l.docs)==null?void 0:h.source}}};var p,x,g;m.parameters={...m.parameters,docs:{...(p=m.parameters)==null?void 0:p.docs,source:{originalSource:`args => { + return + + + + + Home + + + + + + Documents + + + + + + Add Document + + ; +}`,...(g=(x=m.parameters)==null?void 0:x.docs)==null?void 0:g.source}}};var f,b,B;t.parameters={...t.parameters,docs:{...(f=t.parameters)==null?void 0:f.docs,source:{originalSource:`args => { + return + Long text 1 + Long text 2 + Long text 3 + Long text 4 + Long text 5 + ; +}`,...(B=(b=t.parameters)==null?void 0:b.docs)==null?void 0:B.source}}};const V=["Default","WithIcons","WithMaxWidth"];export{a as Default,m as WithIcons,t as WithMaxWidth,V as __namedExportsOrder,N as default}; diff --git a/docs/assets/BrowserMockup.stories-09f4d0d2.js b/docs/assets/BrowserMockup.stories-09f4d0d2.js deleted file mode 100644 index 3272a380..00000000 --- a/docs/assets/BrowserMockup.stories-09f4d0d2.js +++ /dev/null @@ -1 +0,0 @@ -import{t as u,a as E,j as n}from"./tw-merge-4486aaf0.js";import{r as S}from"./index-f46741a2.js";import{c as d}from"./clsx.m-1229b3e0.js";const l=S.forwardRef(({dataTheme:t,className:h,inputClassName:_,innerClassName:v,children:x,url:q,variant:e="border",inputRef:H,innerRef:R,...V},W)=>{const T=u("mockup-browser border",d({"border-base-300":e==="border","bg-base-300":e==="background"}),h),j=u("input",d({"border-base-300":e==="border"}),_),D=u("flex justify-center px-4 py-16 ",d({"border-t border-base-300":e==="border","bg-base-200":e==="background"}),v);return E("div",{"aria-label":"Browser mockup",...V,"data-theme":t,className:T,ref:W,children:[n("div",{className:"mockup-browser-toolbar",children:n("div",{className:j,ref:H,children:q})}),n("div",{className:D,ref:R,children:x})]})});l.displayName="BrowserMockup";const N=l;try{l.displayName="BrowserMockup",l.__docgenInfo={description:"",displayName:"BrowserMockup",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},url:{defaultValue:null,description:"",name:"url",required:!0,type:{name:"string"}},variant:{defaultValue:{value:"border"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"border"'},{value:'"background"'}]}},inputClassName:{defaultValue:null,description:"",name:"inputClassName",required:!1,type:{name:"string"}},innerClassName:{defaultValue:null,description:"",name:"innerClassName",required:!1,type:{name:"string"}},inputRef:{defaultValue:null,description:"",name:"inputRef",required:!1,type:{name:"Ref"}},innerRef:{defaultValue:null,description:"",name:"innerRef",required:!1,type:{name:"Ref"}}}}}catch{}const $={title:"Mockup/BrowserMockup",component:N,parameters:{controls:{expanded:!0}},args:{url:"https://react.daisyui.com",className:"w-full"}},c=t=>n(N,{...t,children:"Hello!"}),r=c.bind({});r.args={};const a=c.bind({});a.args={variant:"background"};const s=c.bind({});s.args={className:"w-full border-primary",inputClassName:"border-primary"};const o=c.bind({});o.args={variant:"background",className:"bg-warning",innerClassName:"bg-info info-content"};var i,p,m;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:"args => Hello!",...(m=(p=r.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var g,f,b;a.parameters={...a.parameters,docs:{...(g=a.parameters)==null?void 0:g.docs,source:{originalSource:"args => Hello!",...(b=(f=a.parameters)==null?void 0:f.docs)==null?void 0:b.source}}};var k,w,B;s.parameters={...s.parameters,docs:{...(k=s.parameters)==null?void 0:k.docs,source:{originalSource:"args => Hello!",...(B=(w=s.parameters)==null?void 0:w.docs)==null?void 0:B.source}}};var M,C,y;o.parameters={...o.parameters,docs:{...(M=o.parameters)==null?void 0:M.docs,source:{originalSource:"args => Hello!",...(y=(C=o.parameters)==null?void 0:C.docs)==null?void 0:y.source}}};const z=["Default","WithBackgroundColor","WithCustomBorderColor","WithCustomBackgroundColor"];export{r as Default,a as WithBackgroundColor,o as WithCustomBackgroundColor,s as WithCustomBorderColor,z as __namedExportsOrder,$ as default}; diff --git a/docs/assets/BrowserMockup.stories-CLUPDMvD.js b/docs/assets/BrowserMockup.stories-CLUPDMvD.js new file mode 100644 index 00000000..212da494 --- /dev/null +++ b/docs/assets/BrowserMockup.stories-CLUPDMvD.js @@ -0,0 +1 @@ +import{j as r}from"./jsx-runtime-BjG_zV1W.js";import{r as T}from"./iframe-DDnXVYpC.js";import{c as u}from"./clsx-B-dksMZM.js";import{t as i}from"./bundle-mjs-yGZq-iow.js";const n=T.forwardRef(({dataTheme:l,className:N,inputClassName:h,innerClassName:x,children:_,url:v,variant:e="border",inputRef:j,innerRef:R,...q},H)=>{const V=i("mockup-browser border",u({"border-base-300":e==="border","bg-base-300":e==="background"}),N),W=i("input",u({"border-base-300":e==="border"}),h),E=i("flex justify-center px-4 py-16 ",u({"border-t border-base-300":e==="border","bg-base-200":e==="background"}),x);return r.jsxs("div",{"aria-label":"Browser mockup",...q,"data-theme":l,className:V,ref:H,children:[r.jsx("div",{className:"mockup-browser-toolbar",children:r.jsx("div",{className:W,ref:j,children:v})}),r.jsx("div",{className:E,ref:R,children:_})]})});n.displayName="BrowserMockup";try{n.displayName="BrowserMockup",n.__docgenInfo={description:"",displayName:"BrowserMockup",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},url:{defaultValue:null,description:"",name:"url",required:!0,type:{name:"string"}},variant:{defaultValue:{value:"border"},description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"border"'},{value:'"background"'}]}},inputClassName:{defaultValue:null,description:"",name:"inputClassName",required:!1,type:{name:"string"}},innerClassName:{defaultValue:null,description:"",name:"innerClassName",required:!1,type:{name:"string"}},inputRef:{defaultValue:null,description:"",name:"inputRef",required:!1,type:{name:"Ref"}},innerRef:{defaultValue:null,description:"",name:"innerRef",required:!1,type:{name:"Ref"}}}}}catch{}const O={title:"Mockup/BrowserMockup",component:n,parameters:{controls:{expanded:!0}},args:{url:"https://react.daisyui.com",className:"w-full"}},c=l=>r.jsx(n,{...l,children:"Hello!"}),a=c.bind({});a.args={};const s=c.bind({});s.args={variant:"background"};const o=c.bind({});o.args={className:"w-full border-primary",inputClassName:"border-primary"};const t=c.bind({});t.args={variant:"background",className:"bg-warning",innerClassName:"bg-info info-content"};var d,p,m;a.parameters={...a.parameters,docs:{...(d=a.parameters)==null?void 0:d.docs,source:{originalSource:"args => Hello!",...(m=(p=a.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var g,f,b;s.parameters={...s.parameters,docs:{...(g=s.parameters)==null?void 0:g.docs,source:{originalSource:"args => Hello!",...(b=(f=s.parameters)==null?void 0:f.docs)==null?void 0:b.source}}};var k,w,B;o.parameters={...o.parameters,docs:{...(k=o.parameters)==null?void 0:k.docs,source:{originalSource:"args => Hello!",...(B=(w=o.parameters)==null?void 0:w.docs)==null?void 0:B.source}}};var C,M,y;t.parameters={...t.parameters,docs:{...(C=t.parameters)==null?void 0:C.docs,source:{originalSource:"args => Hello!",...(y=(M=t.parameters)==null?void 0:M.docs)==null?void 0:y.source}}};const z=["Default","WithBackgroundColor","WithCustomBorderColor","WithCustomBackgroundColor"];export{a as Default,s as WithBackgroundColor,t as WithCustomBackgroundColor,o as WithCustomBorderColor,z as __namedExportsOrder,O as default}; diff --git a/docs/assets/Button-03k-2b2_.js b/docs/assets/Button-03k-2b2_.js new file mode 100644 index 00000000..4036c74e --- /dev/null +++ b/docs/assets/Button-03k-2b2_.js @@ -0,0 +1 @@ +import{j as u}from"./jsx-runtime-BjG_zV1W.js";const t=({primary:e=!1,size:o="medium",backgroundColor:a,label:n,...r})=>{const l=e?"storybook-button--primary":"storybook-button--secondary";return u.jsx("button",{type:"button",className:["storybook-button",`storybook-button--${o}`,l].join(" "),style:{backgroundColor:a},...r,children:n})};try{t.displayName="Button",t.__docgenInfo={description:"Primary UI component for user interaction",displayName:"Button",props:{primary:{defaultValue:{value:"false"},description:"Is this the principal call to action on the page?",name:"primary",required:!1,type:{name:"boolean"}},backgroundColor:{defaultValue:null,description:"What background color to use",name:"backgroundColor",required:!1,type:{name:"string"}},size:{defaultValue:{value:"medium"},description:"How large should the button be?",name:"size",required:!1,type:{name:"enum",value:[{value:'"small"'},{value:'"medium"'},{value:'"large"'}]}},label:{defaultValue:null,description:"Button contents",name:"label",required:!0,type:{name:"string"}},onClick:{defaultValue:null,description:"Optional click handler",name:"onClick",required:!1,type:{name:"(() => void)"}}}}}catch{}export{t as B}; diff --git a/docs/assets/Button-B2efaGtC.css b/docs/assets/Button-B2efaGtC.css new file mode 100644 index 00000000..af901a30 --- /dev/null +++ b/docs/assets/Button-B2efaGtC.css @@ -0,0 +1 @@ +.storybook-button{display:inline-block;cursor:pointer;border:0;border-radius:3em;font-weight:700;line-height:1;font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif}.storybook-button--primary{background-color:#555ab9;color:#fff}.storybook-button--secondary{box-shadow:#00000026 0 0 0 1px inset;background-color:transparent;color:#333}.storybook-button--small{padding:10px 16px;font-size:12px}.storybook-button--medium{padding:11px 20px;font-size:14px}.storybook-button--large{padding:12px 24px;font-size:16px} diff --git a/docs/assets/Button-GtH5nISf.js b/docs/assets/Button-GtH5nISf.js new file mode 100644 index 00000000..47a486c8 --- /dev/null +++ b/docs/assets/Button-GtH5nISf.js @@ -0,0 +1 @@ +import{j as i}from"./jsx-runtime-BjG_zV1W.js";import{r as k}from"./iframe-DDnXVYpC.js";import{c as N}from"./clsx-B-dksMZM.js";import{t as j}from"./bundle-mjs-yGZq-iow.js";import{L as B}from"./index-Dl-l57lR.js";const E=["area","base","br","col","embed","hr","img","input","link","keygen","meta","param","source","track","wbr"],d=k.forwardRef(({children:o,shape:m,size:a,variant:n,color:e,glass:y,startIcon:t,endIcon:l,wide:g,fullWidth:q,responsive:V,animation:h=!0,loading:u,active:x,disabled:r,dataTheme:c,className:w,style:p,tag:_="button",...f},b)=>{const s=_,v=j("btn",w,N((t&&!u||l)&&"gap-2",{"btn-xl":a==="xl","btn-lg":a==="lg","btn-md":a==="md","btn-sm":a==="sm","btn-xs":a==="xs","btn-circle":m==="circle","btn-square":m==="square","btn-soft":n==="soft","btn-dash":n==="dash","btn-outline":n==="outline","btn-link":n==="link","btn-neutral":e==="neutral","btn-primary":e==="primary","btn-secondary":e==="secondary","btn-accent":e==="accent","btn-info":e==="info","btn-success":e==="success","btn-warning":e==="warning","btn-error":e==="error","btn-ghost":e==="ghost",glass:y,"btn-wide":g,"btn-block":q,"btn-xs sm:btn-sm md:btn-md lg:btn-lg":V,"no-animation":!h,"btn-active":x,"btn-disabled":r}));return E.includes(s)?i.jsx(s,{...f,ref:b,"data-theme":c,className:v,style:p,disabled:r}):i.jsxs(s,{...f,ref:b,"data-theme":c,className:v,style:p,disabled:r,children:[u&&i.jsx(B,{size:a}),t&&!u&&t,o,l&&l]})});d.displayName="Button";try{d.displayName="Button",d.__docgenInfo={description:"",displayName:"Button",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},shape:{defaultValue:null,description:"",name:"shape",required:!1,type:{name:"enum",value:[{value:'"circle"'},{value:'"square"'}]}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xl"'},{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"ghost"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}},variant:{defaultValue:null,description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"link"'},{value:'"soft"'},{value:'"dash"'},{value:'"outline"'}]}},glass:{defaultValue:null,description:"",name:"glass",required:!1,type:{name:"boolean"}},wide:{defaultValue:null,description:"",name:"wide",required:!1,type:{name:"boolean"}},fullWidth:{defaultValue:null,description:"",name:"fullWidth",required:!1,type:{name:"boolean"}},responsive:{defaultValue:null,description:"",name:"responsive",required:!1,type:{name:"boolean"}},animation:{defaultValue:{value:"true"},description:"",name:"animation",required:!1,type:{name:"boolean"}},loading:{defaultValue:null,description:"",name:"loading",required:!1,type:{name:"boolean"}},active:{defaultValue:null,description:"",name:"active",required:!1,type:{name:"boolean"}},startIcon:{defaultValue:null,description:"",name:"startIcon",required:!1,type:{name:"ReactNode"}},endIcon:{defaultValue:null,description:"",name:"endIcon",required:!1,type:{name:"ReactNode"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},tag:{defaultValue:{value:"button"},description:"",name:"tag",required:!1,type:{name:"ElementType"}},ref:{defaultValue:null,description:"",name:"ref",required:!1,type:{name:"Ref"}}}}}catch{}export{d as B}; diff --git a/docs/assets/Button-e31631bb.js b/docs/assets/Button-e31631bb.js deleted file mode 100644 index feddbc54..00000000 --- a/docs/assets/Button-e31631bb.js +++ /dev/null @@ -1 +0,0 @@ -import{t as _,j as y,a as N}from"./tw-merge-4486aaf0.js";import{r as B}from"./index-f46741a2.js";import{c as E}from"./clsx.m-1229b3e0.js";import{L as R}from"./index-8d7e61f2.js";const j=["area","base","br","col","embed","hr","img","input","link","keygen","meta","param","source","track","wbr"],n=B.forwardRef(({children:s,shape:d,size:a,variant:o,color:e,glass:v,startIcon:t,endIcon:l,wide:g,fullWidth:q,responsive:V,animation:h=!0,loading:u,active:w,disabled:r,dataTheme:m,className:x,style:c,tag:k="button",...p},f)=>{const i=k,b=_("btn",x,E((t&&!u||l)&&"gap-2",{"btn-lg":a==="lg","btn-md":a==="md","btn-sm":a==="sm","btn-xs":a==="xs","btn-circle":d==="circle","btn-square":d==="square","btn-outline":o==="outline","btn-link":o==="link","btn-neutral":e==="neutral","btn-primary":e==="primary","btn-secondary":e==="secondary","btn-accent":e==="accent","btn-info":e==="info","btn-success":e==="success","btn-warning":e==="warning","btn-error":e==="error","btn-ghost":e==="ghost",glass:v,"btn-wide":g,"btn-block":q,"btn-xs sm:btn-sm md:btn-md lg:btn-lg":V,"no-animation":!h,"btn-active":w,"btn-disabled":r}));return j.includes(i)?y(i,{...p,ref:f,"data-theme":m,className:b,style:c,disabled:r}):N(i,{...p,ref:f,"data-theme":m,className:b,style:c,disabled:r,children:[u&&y(R,{size:a}),t&&!u&&t,s,l&&l]})});n.displayName="Button";const M=n;try{n.displayName="Button",n.__docgenInfo={description:"",displayName:"Button",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},shape:{defaultValue:null,description:"",name:"shape",required:!1,type:{name:"enum",value:[{value:'"circle"'},{value:'"square"'}]}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},variant:{defaultValue:null,description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"link"'},{value:'"outline"'}]}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"ghost"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}},glass:{defaultValue:null,description:"",name:"glass",required:!1,type:{name:"boolean"}},wide:{defaultValue:null,description:"",name:"wide",required:!1,type:{name:"boolean"}},fullWidth:{defaultValue:null,description:"",name:"fullWidth",required:!1,type:{name:"boolean"}},responsive:{defaultValue:null,description:"",name:"responsive",required:!1,type:{name:"boolean"}},animation:{defaultValue:{value:"true"},description:"",name:"animation",required:!1,type:{name:"boolean"}},loading:{defaultValue:null,description:"",name:"loading",required:!1,type:{name:"boolean"}},active:{defaultValue:null,description:"",name:"active",required:!1,type:{name:"boolean"}},startIcon:{defaultValue:null,description:"",name:"startIcon",required:!1,type:{name:"ReactNode"}},endIcon:{defaultValue:null,description:"",name:"endIcon",required:!1,type:{name:"ReactNode"}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},tag:{defaultValue:{value:"button"},description:"",name:"tag",required:!1,type:{name:"ElementType"}},ref:{defaultValue:null,description:"",name:"ref",required:!1,type:{name:"Ref"}}}}}catch{}export{M as B}; diff --git a/docs/assets/Button.stories-3c9570c5.js b/docs/assets/Button.stories-3c9570c5.js deleted file mode 100644 index b545d067..00000000 --- a/docs/assets/Button.stories-3c9570c5.js +++ /dev/null @@ -1,182 +0,0 @@ -import{j as t,a as n}from"./tw-merge-4486aaf0.js";import{B as e}from"./Button-e31631bb.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";import"./index-8d7e61f2.js";const Pr={title:"Actions/Button",component:e,argTypes:{startIcon:{control:!1},endIcon:{control:!1}}},L=r=>t(e,{...r,children:"Button"}),o=r=>n("div",{className:"flex items-center gap-2",children:[t(e,{...r,children:"Default"}),t(e,{...r,color:"neutral",children:"Neutral"}),t(e,{...r,color:"primary",children:"Primary"}),t(e,{...r,color:"secondary",children:"Secondary"}),t(e,{...r,color:"accent",children:"Accent"}),t(e,{...r,color:"ghost",children:"Ghost"}),t(e,{...r,variant:"link",children:"Link"})]});o.args={};const s=r=>n("div",{className:"flex items-center gap-2",children:[t(e,{...r,children:"Default"}),t(e,{...r,color:"neutral",children:"Neutral"}),t(e,{...r,color:"primary",children:"Primary"}),t(e,{...r,color:"secondary",children:"Secondary"}),t(e,{...r,color:"accent",children:"Accent"}),t(e,{...r,color:"ghost",children:"Ghost"}),t(e,{...r,variant:"link",children:"Link"})]});s.args={active:!0};const a=r=>n("div",{className:"flex items-center gap-2",children:[t(e,{...r,color:"info",children:"Info"}),t(e,{...r,color:"success",children:"Success"}),t(e,{...r,color:"warning",children:"Warning"}),t(e,{...r,color:"error",children:"Error"})]});a.args={};const c=r=>n("div",{className:"flex items-center gap-2",children:[t(e,{...r,children:"Default"}),t(e,{...r,color:"primary",children:"Primary"}),t(e,{...r,color:"secondary",children:"Secondary"}),t(e,{...r,color:"accent",children:"Accent"})]});c.args={variant:"outline"};const i=r=>n("div",{className:"flex items-center gap-2",children:[t(e,{...r,color:"info",children:"Info"}),t(e,{...r,color:"success",children:"Success"}),t(e,{...r,color:"warning",children:"Warning"}),t(e,{...r,color:"error",children:"Error"})]});i.args={variant:"outline"};const u=r=>n("div",{className:"flex items-center gap-2",children:[t(e,{...r,size:"lg",children:"Large"}),t(e,{...r,children:"Normal"}),t(e,{...r,size:"sm",children:"Small"}),t(e,{...r,size:"xs",children:"Tiny"})]});u.args={};const l=r=>t(e,{...r,children:"Responsive"});l.args={responsive:!0};const d=r=>t(e,{...r,children:"Wide"});d.args={wide:!0};const m=r=>t("div",{className:"w-full flex justify-center py-8 rounded-md",style:{backgroundImage:"url(https://img.daisyui.com/images/stock/photo-1507358522600-9f71e620c44e.webp)"},children:t(e,{...r,children:"Glass button"})});m.args={glass:!0};const p=r=>n("div",{className:"flex gap-2 items-center justify-center",children:[t(e,{...r,tag:"a",role:"button",children:"Link"}),t(e,{...r,type:"submit",children:"Button"}),t(e,{...r,tag:"input",type:"button",value:"Input"}),t(e,{...r,tag:"input",type:"submit",value:"Submit"}),t(e,{...r,tag:"input",type:"radio","aria-label":"Radio"}),t(e,{...r,tag:"input",type:"checkbox","aria-label":"Checkbox"}),t(e,{...r,tag:"input",type:"reset",value:"Reset"})]});p.args={};const g=r=>n("div",{className:"flex items-center gap-2",children:[t(e,{...r,children:"Disabled using attribute"}),t(e,{className:"btn btn-disabled",tabIndex:-1,role:"button","aria-disabled":"true",children:"Disabled using class name"})]});g.args={disabled:!0};const B=r=>n("div",{className:"flex items-center gap-2",children:[t(e,{...r,children:t("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),t(e,{...r,variant:"outline",children:t("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]});B.args={shape:"square"};const h=r=>n("div",{className:"flex items-center gap-2",children:[t(e,{...r,children:t("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),t(e,{...r,variant:"outline",children:t("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]});h.args={shape:"circle"};const y=r=>t(e,{...r,startIcon:t("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"})}),children:"Button"}),S=r=>t(e,{...r,endIcon:t("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"})}),children:"Button"}),v=r=>t(e,{...r,children:"Block"});v.args={fullWidth:!0};const w=r=>t(e,{...r});w.args={loading:!0,shape:"square"};const k=r=>t(e,{...r,children:"loading"});k.args={loading:!0};const f=r=>t(e,{...r,children:" I don't have click animation "});f.args={animation:!1};const x=r=>t(e,{...r,children:" Link "});x.args={tag:"a",target:"_blank",rel:"noopener",href:"https://daisyui.com/"};var b,N,W;L.parameters={...L.parameters,docs:{...(b=L.parameters)==null?void 0:b.docs,source:{originalSource:`args => { - return ; -}`,...(W=(N=L.parameters)==null?void 0:N.docs)==null?void 0:W.source}}};var C,I,M;o.parameters={...o.parameters,docs:{...(C=o.parameters)==null?void 0:C.docs,source:{originalSource:`args => { - return
- - - - - - - -
; -}`,...(M=(I=o.parameters)==null?void 0:I.docs)==null?void 0:M.source}}};var j,A,D;s.parameters={...s.parameters,docs:{...(j=s.parameters)==null?void 0:j.docs,source:{originalSource:`args => { - return
- - - - - - - -
; -}`,...(D=(A=s.parameters)==null?void 0:A.docs)==null?void 0:D.source}}};var z,G,R;a.parameters={...a.parameters,docs:{...(z=a.parameters)==null?void 0:z.docs,source:{originalSource:`args => { - return
- - - - -
; -}`,...(R=(G=a.parameters)==null?void 0:G.docs)==null?void 0:R.source}}};var E,T,P;c.parameters={...c.parameters,docs:{...(E=c.parameters)==null?void 0:E.docs,source:{originalSource:`args => { - return
- - - - -
; -}`,...(P=(T=c.parameters)==null?void 0:T.docs)==null?void 0:P.source}}};var O,q,_;i.parameters={...i.parameters,docs:{...(O=i.parameters)==null?void 0:O.docs,source:{originalSource:`args => { - return
- - - - -
; -}`,...(_=(q=i.parameters)==null?void 0:q.docs)==null?void 0:_.source}}};var H,F,J;u.parameters={...u.parameters,docs:{...(H=u.parameters)==null?void 0:H.docs,source:{originalSource:`args => { - return
- - - - -
; -}`,...(J=(F=u.parameters)==null?void 0:F.docs)==null?void 0:J.source}}};var K,Q,U;l.parameters={...l.parameters,docs:{...(K=l.parameters)==null?void 0:K.docs,source:{originalSource:`args => { - return ; -}`,...(U=(Q=l.parameters)==null?void 0:Q.docs)==null?void 0:U.source}}};var V,X,Y;d.parameters={...d.parameters,docs:{...(V=d.parameters)==null?void 0:V.docs,source:{originalSource:`args => { - return ; -}`,...(Y=(X=d.parameters)==null?void 0:X.docs)==null?void 0:Y.source}}};var Z,$,rr;m.parameters={...m.parameters,docs:{...(Z=m.parameters)==null?void 0:Z.docs,source:{originalSource:`args => { - return
- -
; -}`,...(rr=($=m.parameters)==null?void 0:$.docs)==null?void 0:rr.source}}};var tr,er,nr;p.parameters={...p.parameters,docs:{...(tr=p.parameters)==null?void 0:tr.docs,source:{originalSource:`args => { - return
- - -
; -}`,...(nr=(er=p.parameters)==null?void 0:er.docs)==null?void 0:nr.source}}};var or,sr,ar;g.parameters={...g.parameters,docs:{...(or=g.parameters)==null?void 0:or.docs,source:{originalSource:`args => { - return
- - -
; -}`,...(ar=(sr=g.parameters)==null?void 0:sr.docs)==null?void 0:ar.source}}};var cr,ir,ur;B.parameters={...B.parameters,docs:{...(cr=B.parameters)==null?void 0:cr.docs,source:{originalSource:`args => { - return
- - -
; -}`,...(ur=(ir=B.parameters)==null?void 0:ir.docs)==null?void 0:ur.source}}};var lr,dr,mr;h.parameters={...h.parameters,docs:{...(lr=h.parameters)==null?void 0:lr.docs,source:{originalSource:`args => { - return
- - -
; -}`,...(mr=(dr=h.parameters)==null?void 0:dr.docs)==null?void 0:mr.source}}};var pr,gr,Br;y.parameters={...y.parameters,docs:{...(pr=y.parameters)==null?void 0:pr.docs,source:{originalSource:`args => { - return ; -}`,...(Br=(gr=y.parameters)==null?void 0:gr.docs)==null?void 0:Br.source}}};var hr,vr,wr;S.parameters={...S.parameters,docs:{...(hr=S.parameters)==null?void 0:hr.docs,source:{originalSource:`args => { - return ; -}`,...(wr=(vr=S.parameters)==null?void 0:vr.docs)==null?void 0:wr.source}}};var kr,fr,xr;v.parameters={...v.parameters,docs:{...(kr=v.parameters)==null?void 0:kr.docs,source:{originalSource:`args => { - return ; -}`,...(xr=(fr=v.parameters)==null?void 0:fr.docs)==null?void 0:xr.source}}};var Lr,yr,Sr;w.parameters={...w.parameters,docs:{...(Lr=w.parameters)==null?void 0:Lr.docs,source:{originalSource:`args => { - return ; -}`,...(Wr=(Nr=k.parameters)==null?void 0:Nr.docs)==null?void 0:Wr.source}}};var Cr,Ir,Mr;f.parameters={...f.parameters,docs:{...(Cr=f.parameters)==null?void 0:Cr.docs,source:{originalSource:`args => { - return ; -}`,...(Mr=(Ir=f.parameters)==null?void 0:Ir.docs)==null?void 0:Mr.source}}};var jr,Ar,Dr;x.parameters={...x.parameters,docs:{...(jr=x.parameters)==null?void 0:jr.docs,source:{originalSource:`args => { - return ; -}`,...(Dr=(Ar=x.parameters)==null?void 0:Ar.docs)==null?void 0:Dr.source}}};const Or=["Default","BrandColors","ActiveButtons","StateColors","OutlineButtons","OutlineButtonsWithStateColors","ButtonSizes","ResponsiveButton","WideButton","Glass","DifferentHtmlTags","DisabledButtons","SquareButton","CircleButton","IconAtStart","IconAtEnd","ButtonBlock","LoadingSpinner","LoadingSpinnerAndText","WithoutClickAnimation","LinkButton"];export{s as ActiveButtons,o as BrandColors,v as ButtonBlock,u as ButtonSizes,h as CircleButton,L as Default,p as DifferentHtmlTags,g as DisabledButtons,m as Glass,S as IconAtEnd,y as IconAtStart,x as LinkButton,w as LoadingSpinner,k as LoadingSpinnerAndText,c as OutlineButtons,i as OutlineButtonsWithStateColors,l as ResponsiveButton,B as SquareButton,a as StateColors,d as WideButton,f as WithoutClickAnimation,Or as __namedExportsOrder,Pr as default}; diff --git a/docs/assets/Button.stories-9NRwbnFY.js b/docs/assets/Button.stories-9NRwbnFY.js new file mode 100644 index 00000000..8d4b0313 --- /dev/null +++ b/docs/assets/Button.stories-9NRwbnFY.js @@ -0,0 +1,257 @@ +import{j as r}from"./jsx-runtime-BjG_zV1W.js";import{B as t}from"./Button-GtH5nISf.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";import"./index-Dl-l57lR.js";const Yr={title:"Actions/Button",component:t,argTypes:{startIcon:{control:!1},endIcon:{control:!1}}},S=n=>r.jsx(t,{...n,children:"Button"}),e=n=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(t,{...n,children:"Default"}),r.jsx(t,{...n,color:"neutral",children:"Neutral"}),r.jsx(t,{...n,color:"primary",children:"Primary"}),r.jsx(t,{...n,color:"secondary",children:"Secondary"}),r.jsx(t,{...n,color:"accent",children:"Accent"}),r.jsx(t,{...n,color:"ghost",children:"Ghost"}),r.jsx(t,{...n,variant:"link",children:"Link"})]});e.args={};const o=n=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(t,{...n,children:"Default"}),r.jsx(t,{...n,color:"primary",children:"Primary"}),r.jsx(t,{...n,color:"secondary",children:"Secondary"}),r.jsx(t,{...n,color:"accent",children:"Accent"}),r.jsx(t,{...n,color:"info",children:"Info"}),r.jsx(t,{...n,color:"success",children:"Success"}),r.jsx(t,{...n,color:"warning",children:"Warning"}),r.jsx(t,{...n,color:"error",children:"Error"})]});o.args={variant:"soft"};const s=n=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(t,{...n,children:"Default"}),r.jsx(t,{...n,color:"primary",children:"Primary"}),r.jsx(t,{...n,color:"secondary",children:"Secondary"}),r.jsx(t,{...n,color:"accent",children:"Accent"}),r.jsx(t,{...n,color:"info",children:"Info"}),r.jsx(t,{...n,color:"success",children:"Success"}),r.jsx(t,{...n,color:"warning",children:"Warning"}),r.jsx(t,{...n,color:"error",children:"Error"})]});s.args={variant:"outline"};const a=n=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(t,{...n,children:"Default"}),r.jsx(t,{...n,color:"primary",children:"Primary"}),r.jsx(t,{...n,color:"secondary",children:"Secondary"}),r.jsx(t,{...n,color:"accent",children:"Accent"}),r.jsx(t,{...n,color:"info",children:"Info"}),r.jsx(t,{...n,color:"success",children:"Success"}),r.jsx(t,{...n,color:"warning",children:"Warning"}),r.jsx(t,{...n,color:"error",children:"Error"})]});a.args={variant:"dash"};const c=n=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(t,{...n,children:"Default"}),r.jsx(t,{...n,color:"neutral",children:"Neutral"}),r.jsx(t,{...n,color:"primary",children:"Primary"}),r.jsx(t,{...n,color:"secondary",children:"Secondary"}),r.jsx(t,{...n,color:"accent",children:"Accent"}),r.jsx(t,{...n,color:"ghost",children:"Ghost"}),r.jsx(t,{...n,variant:"link",children:"Link"})]});c.args={active:!0};const i=n=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(t,{...n,color:"info",children:"Info"}),r.jsx(t,{...n,color:"success",children:"Success"}),r.jsx(t,{...n,color:"warning",children:"Warning"}),r.jsx(t,{...n,color:"error",children:"Error"})]});i.args={};const u=n=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(t,{...n,children:"Default"}),r.jsx(t,{...n,color:"primary",children:"Primary"}),r.jsx(t,{...n,color:"secondary",children:"Secondary"}),r.jsx(t,{...n,color:"accent",children:"Accent"})]});u.args={variant:"outline"};const l=n=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(t,{...n,color:"info",children:"Info"}),r.jsx(t,{...n,color:"success",children:"Success"}),r.jsx(t,{...n,color:"warning",children:"Warning"}),r.jsx(t,{...n,color:"error",children:"Error"})]});l.args={variant:"outline"};const d=n=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(t,{...n,size:"lg",children:"Large"}),r.jsx(t,{...n,children:"Normal"}),r.jsx(t,{...n,size:"sm",children:"Small"}),r.jsx(t,{...n,size:"xs",children:"Tiny"})]});d.args={};const m=n=>r.jsx(t,{...n,children:"Responsive"});m.args={responsive:!0};const g=n=>r.jsx(t,{...n,children:"Wide"});g.args={wide:!0};const p=n=>r.jsx("div",{className:"w-full flex justify-center py-8 rounded-md",style:{backgroundImage:"url(https://img.daisyui.com/images/stock/photo-1507358522600-9f71e620c44e.webp)"},children:r.jsx(t,{...n,children:"Glass button"})});p.args={glass:!0};const B=n=>r.jsxs("div",{className:"flex gap-2 items-center justify-center",children:[r.jsx(t,{...n,tag:"a",role:"button",children:"Link"}),r.jsx(t,{...n,type:"submit",children:"Button"}),r.jsx(t,{...n,tag:"input",type:"button",value:"Input"}),r.jsx(t,{...n,tag:"input",type:"submit",value:"Submit"}),r.jsx(t,{...n,tag:"input",type:"radio","aria-label":"Radio"}),r.jsx(t,{...n,tag:"input",type:"checkbox","aria-label":"Checkbox"}),r.jsx(t,{...n,tag:"input",type:"reset",value:"Reset"})]});B.args={};const h=n=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(t,{...n,children:"Disabled using attribute"}),r.jsx(t,{className:"btn btn-disabled",tabIndex:-1,role:"button","aria-disabled":"true",children:"Disabled using class name"})]});h.args={disabled:!0};const x=n=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(t,{...n,children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),r.jsx(t,{...n,variant:"outline",children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]});x.args={shape:"square"};const j=n=>r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(t,{...n,children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})}),r.jsx(t,{...n,variant:"outline",children:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M6 18L18 6M6 6l12 12"})})})]});j.args={shape:"circle"};const L=n=>r.jsx(t,{...n,startIcon:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"})}),children:"Button"}),N=n=>r.jsx(t,{...n,endIcon:r.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"})}),children:"Button"}),v=n=>r.jsx(t,{...n,children:"Block"});v.args={fullWidth:!0};const f=n=>r.jsx(t,{...n});f.args={loading:!0,shape:"square"};const w=n=>r.jsx(t,{...n,children:"loading"});w.args={loading:!0};const y=n=>r.jsx(t,{...n,children:" I don't have click animation "});y.args={animation:!1};const k=n=>r.jsx(t,{...n,children:" Link "});k.args={tag:"a",target:"_blank",rel:"noopener",href:"https://daisyui.com/"};var b,W,I;S.parameters={...S.parameters,docs:{...(b=S.parameters)==null?void 0:b.docs,source:{originalSource:`args => { + return ; +}`,...(I=(W=S.parameters)==null?void 0:W.docs)==null?void 0:I.source}}};var C,D,A;e.parameters={...e.parameters,docs:{...(C=e.parameters)==null?void 0:C.docs,source:{originalSource:`args => { + return
+ + + + + + + +
; +}`,...(A=(D=e.parameters)==null?void 0:D.docs)==null?void 0:A.source}}};var M,E,z;o.parameters={...o.parameters,docs:{...(M=o.parameters)==null?void 0:M.docs,source:{originalSource:`args => { + return
+ + + + + + + + +
; +}`,...(z=(E=o.parameters)==null?void 0:E.docs)==null?void 0:z.source}}};var P,R,G;s.parameters={...s.parameters,docs:{...(P=s.parameters)==null?void 0:P.docs,source:{originalSource:`args => { + return
+ + + + + + + + +
; +}`,...(G=(R=s.parameters)==null?void 0:R.docs)==null?void 0:G.source}}};var O,T,q;a.parameters={...a.parameters,docs:{...(O=a.parameters)==null?void 0:O.docs,source:{originalSource:`args => { + return
+ + + + + + + + +
; +}`,...(q=(T=a.parameters)==null?void 0:T.docs)==null?void 0:q.source}}};var _,H,F;c.parameters={...c.parameters,docs:{...(_=c.parameters)==null?void 0:_.docs,source:{originalSource:`args => { + return
+ + + + + + + +
; +}`,...(F=(H=c.parameters)==null?void 0:H.docs)==null?void 0:F.source}}};var J,K,Q;i.parameters={...i.parameters,docs:{...(J=i.parameters)==null?void 0:J.docs,source:{originalSource:`args => { + return
+ + + + +
; +}`,...(Q=(K=i.parameters)==null?void 0:K.docs)==null?void 0:Q.source}}};var U,V,X;u.parameters={...u.parameters,docs:{...(U=u.parameters)==null?void 0:U.docs,source:{originalSource:`args => { + return
+ + + + +
; +}`,...(X=(V=u.parameters)==null?void 0:V.docs)==null?void 0:X.source}}};var Y,Z,$;l.parameters={...l.parameters,docs:{...(Y=l.parameters)==null?void 0:Y.docs,source:{originalSource:`args => { + return
+ + + + +
; +}`,...($=(Z=l.parameters)==null?void 0:Z.docs)==null?void 0:$.source}}};var rr,nr,tr;d.parameters={...d.parameters,docs:{...(rr=d.parameters)==null?void 0:rr.docs,source:{originalSource:`args => { + return
+ + + + +
; +}`,...(tr=(nr=d.parameters)==null?void 0:nr.docs)==null?void 0:tr.source}}};var er,or,sr;m.parameters={...m.parameters,docs:{...(er=m.parameters)==null?void 0:er.docs,source:{originalSource:`args => { + return ; +}`,...(sr=(or=m.parameters)==null?void 0:or.docs)==null?void 0:sr.source}}};var ar,cr,ir;g.parameters={...g.parameters,docs:{...(ar=g.parameters)==null?void 0:ar.docs,source:{originalSource:`args => { + return ; +}`,...(ir=(cr=g.parameters)==null?void 0:cr.docs)==null?void 0:ir.source}}};var ur,lr,dr;p.parameters={...p.parameters,docs:{...(ur=p.parameters)==null?void 0:ur.docs,source:{originalSource:`args => { + return
+ +
; +}`,...(dr=(lr=p.parameters)==null?void 0:lr.docs)==null?void 0:dr.source}}};var mr,gr,pr;B.parameters={...B.parameters,docs:{...(mr=B.parameters)==null?void 0:mr.docs,source:{originalSource:`args => { + return
+ + +
; +}`,...(pr=(gr=B.parameters)==null?void 0:gr.docs)==null?void 0:pr.source}}};var Br,hr,xr;h.parameters={...h.parameters,docs:{...(Br=h.parameters)==null?void 0:Br.docs,source:{originalSource:`args => { + return
+ + +
; +}`,...(xr=(hr=h.parameters)==null?void 0:hr.docs)==null?void 0:xr.source}}};var jr,vr,fr;x.parameters={...x.parameters,docs:{...(jr=x.parameters)==null?void 0:jr.docs,source:{originalSource:`args => { + return
+ + +
; +}`,...(fr=(vr=x.parameters)==null?void 0:vr.docs)==null?void 0:fr.source}}};var wr,yr,kr;j.parameters={...j.parameters,docs:{...(wr=j.parameters)==null?void 0:wr.docs,source:{originalSource:`args => { + return
+ + +
; +}`,...(kr=(yr=j.parameters)==null?void 0:yr.docs)==null?void 0:kr.source}}};var Sr,Lr,Nr;L.parameters={...L.parameters,docs:{...(Sr=L.parameters)==null?void 0:Sr.docs,source:{originalSource:`args => { + return ; +}`,...(Nr=(Lr=L.parameters)==null?void 0:Lr.docs)==null?void 0:Nr.source}}};var br,Wr,Ir;N.parameters={...N.parameters,docs:{...(br=N.parameters)==null?void 0:br.docs,source:{originalSource:`args => { + return ; +}`,...(Ir=(Wr=N.parameters)==null?void 0:Wr.docs)==null?void 0:Ir.source}}};var Cr,Dr,Ar;v.parameters={...v.parameters,docs:{...(Cr=v.parameters)==null?void 0:Cr.docs,source:{originalSource:`args => { + return ; +}`,...(Ar=(Dr=v.parameters)==null?void 0:Dr.docs)==null?void 0:Ar.source}}};var Mr,Er,zr;f.parameters={...f.parameters,docs:{...(Mr=f.parameters)==null?void 0:Mr.docs,source:{originalSource:`args => { + return ; +}`,...(Gr=(Rr=w.parameters)==null?void 0:Rr.docs)==null?void 0:Gr.source}}};var Or,Tr,qr;y.parameters={...y.parameters,docs:{...(Or=y.parameters)==null?void 0:Or.docs,source:{originalSource:`args => { + return ; +}`,...(qr=(Tr=y.parameters)==null?void 0:Tr.docs)==null?void 0:qr.source}}};var _r,Hr,Fr;k.parameters={...k.parameters,docs:{...(_r=k.parameters)==null?void 0:_r.docs,source:{originalSource:`args => { + return ; +}`,...(Fr=(Hr=k.parameters)==null?void 0:Hr.docs)==null?void 0:Fr.source}}};const Zr=["Default","BrandColors","SoftStyle","OutlineStyle","DashStyle","ActiveButtons","StateColors","OutlineButtons","OutlineButtonsWithStateColors","ButtonSizes","ResponsiveButton","WideButton","Glass","DifferentHtmlTags","DisabledButtons","SquareButton","CircleButton","IconAtStart","IconAtEnd","ButtonBlock","LoadingSpinner","LoadingSpinnerAndText","WithoutClickAnimation","LinkButton"];export{c as ActiveButtons,e as BrandColors,v as ButtonBlock,d as ButtonSizes,j as CircleButton,a as DashStyle,S as Default,B as DifferentHtmlTags,h as DisabledButtons,p as Glass,N as IconAtEnd,L as IconAtStart,k as LinkButton,f as LoadingSpinner,w as LoadingSpinnerAndText,u as OutlineButtons,l as OutlineButtonsWithStateColors,s as OutlineStyle,m as ResponsiveButton,o as SoftStyle,x as SquareButton,i as StateColors,g as WideButton,y as WithoutClickAnimation,Zr as __namedExportsOrder,Yr as default}; diff --git a/docs/assets/Button.stories-BDcQ6vA1.js b/docs/assets/Button.stories-BDcQ6vA1.js new file mode 100644 index 00000000..afa7cd32 --- /dev/null +++ b/docs/assets/Button.stories-BDcQ6vA1.js @@ -0,0 +1,20 @@ +import{B as S}from"./Button-03k-2b2_.js";import"./jsx-runtime-BjG_zV1W.js";const{fn:b}=__STORYBOOK_MODULE_TEST__,O={title:"Example/Button",component:S,parameters:{layout:"centered"},tags:["autodocs"],argTypes:{backgroundColor:{control:"color"}},args:{onClick:b()}},r={args:{primary:!0,label:"Button"}},a={args:{label:"Button"}},e={args:{size:"large",label:"Button"}},o={args:{size:"small",label:"Button"}};var s,t,n;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`{ + args: { + primary: true, + label: 'Button' + } +}`,...(n=(t=r.parameters)==null?void 0:t.docs)==null?void 0:n.source}}};var c,l,m;a.parameters={...a.parameters,docs:{...(c=a.parameters)==null?void 0:c.docs,source:{originalSource:`{ + args: { + label: 'Button' + } +}`,...(m=(l=a.parameters)==null?void 0:l.docs)==null?void 0:m.source}}};var u,p,d;e.parameters={...e.parameters,docs:{...(u=e.parameters)==null?void 0:u.docs,source:{originalSource:`{ + args: { + size: 'large', + label: 'Button' + } +}`,...(d=(p=e.parameters)==null?void 0:p.docs)==null?void 0:d.source}}};var g,i,B;o.parameters={...o.parameters,docs:{...(g=o.parameters)==null?void 0:g.docs,source:{originalSource:`{ + args: { + size: 'small', + label: 'Button' + } +}`,...(B=(i=o.parameters)==null?void 0:i.docs)==null?void 0:B.source}}};const z=["Primary","Secondary","Large","Small"];export{e as Large,r as Primary,a as Secondary,o as Small,z as __namedExportsOrder,O as default}; diff --git a/docs/assets/Card.stories-DKYUTzy0.js b/docs/assets/Card.stories-DKYUTzy0.js new file mode 100644 index 00000000..f38bd796 --- /dev/null +++ b/docs/assets/Card.stories-DKYUTzy0.js @@ -0,0 +1,50 @@ +import{j as s}from"./jsx-runtime-BjG_zV1W.js";import{C as e}from"./index-DIaYqioD.js";import{B as c}from"./Button-GtH5nISf.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";import"./index-Dl-l57lR.js";const v={title:"Data Display/Card",component:e},a=o=>s.jsxs(e,{...o,children:[s.jsx(e.Image,{src:"https://img.daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.webp",alt:"Shoes"}),s.jsxs(e.Body,{children:[s.jsx(e.Title,{tag:"h2",children:"Shoes!"}),s.jsx("p",{children:"If a dog chews shoes whose shoes does he choose?"}),s.jsx(e.Actions,{className:"justify-end",children:s.jsx(c,{color:"primary",children:"Buy Now"})})]})]}),r=o=>s.jsxs("div",{children:[s.jsx("div",{className:"mb-3",children:"(vertical on small screen, horizontal on large screen)"}),s.jsxs(e,{...o,side:"lg",children:[s.jsx(e.Image,{src:"https://img.daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.webp",alt:"Shoes"}),s.jsxs(e.Body,{children:[s.jsx(e.Title,{tag:"h2",children:"Shoes!"}),s.jsx("p",{children:"If a dog chews shoes whose shoes does he choose?"}),s.jsx(e.Actions,{className:"justify-end",children:s.jsx(c,{color:"primary",children:"Buy Now"})})]})]})]}),t=o=>s.jsxs(e,{...o,children:[s.jsx(e.Image,{src:"https://img.daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.webp",alt:"Shoes"}),s.jsxs(e.Body,{className:"items-center text-center",children:[s.jsx(e.Title,{tag:"h2",children:"Shoes!"}),s.jsx("p",{children:"If a dog chews shoes whose shoes does he choose?"}),s.jsx(e.Actions,{className:"justify-end",children:s.jsx(c,{color:"primary",children:"Buy Now"})})]})]}),n=o=>s.jsxs(e,{...o,imageFull:!0,children:[s.jsx(e.Image,{src:"https://img.daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.webp",alt:"Shoes"}),s.jsxs(e.Body,{children:[s.jsx(e.Title,{tag:"h2",children:"Shoes!"}),s.jsx("p",{children:"If a dog chews shoes whose shoes does he choose?"}),s.jsx(e.Actions,{className:"justify-end",children:s.jsx(c,{color:"primary",children:"Buy Now"})})]})]});var i,d,h;a.parameters={...a.parameters,docs:{...(i=a.parameters)==null?void 0:i.docs,source:{originalSource:`args => { + return + + + Shoes! +

If a dog chews shoes whose shoes does he choose?

+ + + +
+
; +}`,...(h=(d=a.parameters)==null?void 0:d.docs)==null?void 0:h.source}}};var l,m,p;r.parameters={...r.parameters,docs:{...(l=r.parameters)==null?void 0:l.docs,source:{originalSource:`args => { + return
+
+ (vertical on small screen, horizontal on large screen) +
+ + + + Shoes! +

If a dog chews shoes whose shoes does he choose?

+ + + +
+
+
; +}`,...(p=(m=r.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};var g,u,y;t.parameters={...t.parameters,docs:{...(g=t.parameters)==null?void 0:g.docs,source:{originalSource:`args => { + return + + + Shoes! +

If a dog chews shoes whose shoes does he choose?

+ + + +
+
; +}`,...(y=(u=t.parameters)==null?void 0:u.docs)==null?void 0:y.source}}};var C,j,x;n.parameters={...n.parameters,docs:{...(C=n.parameters)==null?void 0:C.docs,source:{originalSource:`args => { + return + + + Shoes! +

If a dog chews shoes whose shoes does he choose?

+ + + +
+
; +}`,...(x=(j=n.parameters)==null?void 0:j.docs)==null?void 0:x.source}}};const A=["Default","Responsive","Centered","ImageOverlay"];export{t as Centered,a as Default,n as ImageOverlay,r as Responsive,A as __namedExportsOrder,v as default}; diff --git a/docs/assets/Card.stories-fc491d28.js b/docs/assets/Card.stories-fc491d28.js deleted file mode 100644 index ad48e9ea..00000000 --- a/docs/assets/Card.stories-fc491d28.js +++ /dev/null @@ -1,50 +0,0 @@ -import{a as o,j as e}from"./tw-merge-4486aaf0.js";import{C as s}from"./index-92e1ed70.js";import{B as d}from"./Button-e31631bb.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";import"./index-8d7e61f2.js";const T={title:"Data Display/Card",component:s},r=a=>o(s,{...a,children:[e(s.Image,{src:"https://img.daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.webp",alt:"Shoes"}),o(s.Body,{children:[e(s.Title,{tag:"h2",children:"Shoes!"}),e("p",{children:"If a dog chews shoes whose shoes does he choose?"}),e(s.Actions,{className:"justify-end",children:e(d,{color:"primary",children:"Buy Now"})})]})]}),t=a=>o("div",{children:[e("div",{className:"mb-3",children:"(vertical on small screen, horizontal on large screen)"}),o(s,{...a,side:"lg",children:[e(s.Image,{src:"https://img.daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.webp",alt:"Shoes"}),o(s.Body,{children:[e(s.Title,{tag:"h2",children:"Shoes!"}),e("p",{children:"If a dog chews shoes whose shoes does he choose?"}),e(s.Actions,{className:"justify-end",children:e(d,{color:"primary",children:"Buy Now"})})]})]})]}),n=a=>o(s,{...a,children:[e(s.Image,{src:"https://img.daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.webp",alt:"Shoes"}),o(s.Body,{className:"items-center text-center",children:[e(s.Title,{tag:"h2",children:"Shoes!"}),e("p",{children:"If a dog chews shoes whose shoes does he choose?"}),e(s.Actions,{className:"justify-end",children:e(d,{color:"primary",children:"Buy Now"})})]})]}),c=a=>o(s,{...a,imageFull:!0,children:[e(s.Image,{src:"https://img.daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.webp",alt:"Shoes"}),o(s.Body,{children:[e(s.Title,{tag:"h2",children:"Shoes!"}),e("p",{children:"If a dog chews shoes whose shoes does he choose?"}),e(s.Actions,{className:"justify-end",children:e(d,{color:"primary",children:"Buy Now"})})]})]});var i,h,l;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`args => { - return - - - Shoes! -

If a dog chews shoes whose shoes does he choose?

- - - -
-
; -}`,...(l=(h=r.parameters)==null?void 0:h.docs)==null?void 0:l.source}}};var m,p,g;t.parameters={...t.parameters,docs:{...(m=t.parameters)==null?void 0:m.docs,source:{originalSource:`args => { - return
-
- (vertical on small screen, horizontal on large screen) -
- - - - Shoes! -

If a dog chews shoes whose shoes does he choose?

- - - -
-
-
; -}`,...(g=(p=t.parameters)==null?void 0:p.docs)==null?void 0:g.source}}};var u,y,C;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`args => { - return - - - Shoes! -

If a dog chews shoes whose shoes does he choose?

- - - -
-
; -}`,...(C=(y=n.parameters)==null?void 0:y.docs)==null?void 0:C.source}}};var w,B,b;c.parameters={...c.parameters,docs:{...(w=c.parameters)==null?void 0:w.docs,source:{originalSource:`args => { - return - - - Shoes! -

If a dog chews shoes whose shoes does he choose?

- - - -
-
; -}`,...(b=(B=c.parameters)==null?void 0:B.docs)==null?void 0:b.source}}};const j=["Default","Responsive","Centered","ImageOverlay"];export{n as Centered,r as Default,c as ImageOverlay,t as Responsive,j as __namedExportsOrder,T as default}; diff --git a/docs/assets/Carousel.stories-CoIgS-ro.js b/docs/assets/Carousel.stories-CoIgS-ro.js new file mode 100644 index 00000000..17244ce9 --- /dev/null +++ b/docs/assets/Carousel.stories-CoIgS-ro.js @@ -0,0 +1,76 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{r}from"./iframe-DDnXVYpC.js";import{c as S}from"./clsx-B-dksMZM.js";import{t as ae}from"./bundle-mjs-yGZq-iow.js";import{B as k}from"./Button-GtH5nISf.js";import"./index-Dl-l57lR.js";const V=({children:t,innerRef:c,src:i,alt:x,index:F=0,width:m,hasButtons:j,buttonStyle:u,onPrev:y,onNext:w,className:v,...C})=>{const N=ae("carousel-item relative",v,S({"w-full":m==="full","w-1/2":m==="half","h-full":!0})),_=S({"w-full":m==="full"}),q=()=>u!=null?e.jsxs(e.Fragment,{children:[r.cloneElement(u("❮"),{onClick:y}),r.cloneElement(u("❯"),{onClick:w})]}):e.jsxs(e.Fragment,{children:[e.jsx(k,{onClick:y,shape:"circle",children:"❮"}),e.jsx(k,{onClick:w,shape:"circle",children:"❯"})]});return e.jsxs("div",{...C,id:`item${F}`,ref:c,className:N,children:[i?e.jsx("img",{src:i,alt:x,className:_}):t,j&&e.jsx("div",{className:"absolute flex justify-between transform -translate-y-1/2 left-5 right-5 top-1/2",children:q()})]})};try{V.displayName="CarouselItem",V.__docgenInfo={description:"",displayName:"CarouselItem",props:{innerRef:{defaultValue:null,description:"",name:"innerRef",required:!1,type:{name:"LegacyRef"}},src:{defaultValue:null,description:"",name:"src",required:!1,type:{name:"string"}},alt:{defaultValue:null,description:"",name:"alt",required:!1,type:{name:"string"}},index:{defaultValue:{value:"0"},description:"",name:"index",required:!1,type:{name:"number"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"enum",value:[{value:'"full"'},{value:'"half"'}]}},hasButtons:{defaultValue:null,description:"",name:"hasButtons",required:!1,type:{name:"boolean"}},buttonStyle:{defaultValue:null,description:"",name:"buttonStyle",required:!1,type:{name:"((value: string) => ReactElement>)"}},onPrev:{defaultValue:null,description:"",name:"onPrev",required:!1,type:{name:"(() => void)"}},onNext:{defaultValue:null,description:"",name:"onNext",required:!1,type:{name:"(() => void)"}}}}}catch{}const E=r.forwardRef(({children:t,display:c="slider",snap:i,vertical:x,width:F,buttonStyle:m,dataTheme:j,className:u,...y},w)=>{const v=ae("carousel",u,S({"carousel-start":i==="start","carousel-center":i==="center","carousel-end":i==="end","carousel-vertical":x,"w-full":c!=="slider"})),[C,N]=r.useState([]),[_,q]=r.useState(0);r.useEffect(()=>{const o=[];t.map(a=>{o.push(r.createRef())}),N(o)},[t]);const I=o=>{var a;(a=C[o].current)==null||a.scrollIntoView({behavior:"smooth",block:"nearest",inline:i}),q(o)};return e.jsxs(e.Fragment,{children:[e.jsx("div",{role:"listbox","aria-label":"Image carousel",...y,ref:w,"data-theme":j,className:v,children:t.map((o,a)=>r.cloneElement(o,{key:a,innerRef:C[a],index:a+1,children:o.props.children,src:o.props.src,alt:o.props.alt,width:c!=="slider"?"full":F,hasButtons:c==="sequential",buttonStyle:m,onPrev:()=>I(a-1<0?t.length-1:a-1),onNext:()=>I(a+1>t.length-1?0:a+1),...o.props}))}),c==="numbered"&&e.jsx("div",{className:"flex justify-center w-full py-2 gap-2",children:t.map((o,a)=>m!=null?r.cloneElement(m((a+1).toString()),{key:a,onClick:()=>I(a)}):e.jsx(k,{active:a===_,onClick:()=>I(a),children:a+1},a))})]})}),s=Object.assign(E,{Item:V});try{E.displayName="Carousel",E.__docgenInfo={description:"",displayName:"Carousel",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},display:{defaultValue:{value:"slider"},description:"",name:"display",required:!1,type:{name:"enum",value:[{value:'"slider"'},{value:'"numbered"'},{value:'"sequential"'}]}},snap:{defaultValue:null,description:"",name:"snap",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"start"'},{value:'"end"'}]}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"enum",value:[{value:'"full"'},{value:'"half"'}]}},buttonStyle:{defaultValue:null,description:"",name:"buttonStyle",required:!1,type:{name:"((value: string) => ReactElement>)"}}}}}catch{}try{s.displayName="Carousel",s.__docgenInfo={description:"",displayName:"Carousel",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},display:{defaultValue:{value:"slider"},description:"",name:"display",required:!1,type:{name:"enum",value:[{value:'"slider"'},{value:'"numbered"'},{value:'"sequential"'}]}},snap:{defaultValue:null,description:"",name:"snap",required:!1,type:{name:"enum",value:[{value:'"center"'},{value:'"start"'},{value:'"end"'}]}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"enum",value:[{value:'"full"'},{value:'"half"'}]}},buttonStyle:{defaultValue:null,description:"",name:"buttonStyle",required:!1,type:{name:"((value: string) => ReactElement>)"}}}}}catch{}const le={title:"Data Display/Carousel",component:s},l=t=>e.jsxs(s,{...t,className:"rounded-box",children:[e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1494253109108-2e30c049369b.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.webp",alt:"Fruits"})]});l.args={};const p=t=>e.jsxs(s,{...t,className:"rounded-box",children:[e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1494253109108-2e30c049369b.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.webp",alt:"Fruits"})]});p.args={snap:"end"};const n=t=>e.jsxs(s,{...t,className:"w-64 rounded-box",children:[e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1494253109108-2e30c049369b.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.webp",alt:"Fruits"})]});n.args={width:"full"};const d=t=>e.jsxs(s,{...t,className:"w-64 rounded-box",children:[e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1494253109108-2e30c049369b.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.webp",alt:"Fruits"})]});d.args={width:"half"};const g=t=>e.jsxs(s,{...t,className:"h-96 w-64 rounded-box",children:[e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1494253109108-2e30c049369b.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp",alt:"Fruits"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.webp",alt:"Fruits"})]});g.args={width:"full",vertical:!0};const b=t=>e.jsxs(s,{...t,className:"rounded-box",children:[e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.webp",alt:"City"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.webp",alt:"City"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1414694762283-acccc27bca85.webp",alt:"City"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.webp",alt:"City"})]});b.args={display:"numbered"};const h=t=>e.jsxs(s,{...t,className:"rounded-box",children:[e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.webp",alt:"City"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.webp",alt:"City"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1414694762283-acccc27bca85.webp",alt:"City"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.webp",alt:"City"})]});h.args={display:"sequential"};const f=t=>{const c=i=>e.jsx(k,{color:"primary",children:i});return t.buttonStyle=c,e.jsxs(s,{...t,className:"rounded-box",children:[e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.webp",alt:"City"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.webp",alt:"City"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1414694762283-acccc27bca85.webp",alt:"City"}),e.jsx(s.Item,{src:"https://img.daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.webp",alt:"City"})]})};f.args={display:"sequential"};var R,B,T;l.parameters={...l.parameters,docs:{...(R=l.parameters)==null?void 0:R.docs,source:{originalSource:`args => { + return + + + + + + + + ; +}`,...(T=(B=l.parameters)==null?void 0:B.docs)==null?void 0:T.source}}};var D,W,H;p.parameters={...p.parameters,docs:{...(D=p.parameters)==null?void 0:D.docs,source:{originalSource:`args => { + return + + + + + + + + ; +}`,...(H=(W=p.parameters)==null?void 0:W.docs)==null?void 0:H.source}}};var J,X,L;n.parameters={...n.parameters,docs:{...(J=n.parameters)==null?void 0:J.docs,source:{originalSource:`args => { + return + + + + + + + + ; +}`,...(L=(X=n.parameters)==null?void 0:X.docs)==null?void 0:L.source}}};var M,O,P;d.parameters={...d.parameters,docs:{...(M=d.parameters)==null?void 0:M.docs,source:{originalSource:`args => { + return + + + + + + + + ; +}`,...(P=(O=d.parameters)==null?void 0:O.docs)==null?void 0:P.source}}};var $,A,z;g.parameters={...g.parameters,docs:{...($=g.parameters)==null?void 0:$.docs,source:{originalSource:`args => { + return + + + + + + + + ; +}`,...(z=(A=g.parameters)==null?void 0:A.docs)==null?void 0:z.source}}};var G,K,Q;b.parameters={...b.parameters,docs:{...(G=b.parameters)==null?void 0:G.docs,source:{originalSource:`args => { + return + + + + + ; +}`,...(Q=(K=b.parameters)==null?void 0:K.docs)==null?void 0:Q.source}}};var U,Y,Z;h.parameters={...h.parameters,docs:{...(U=h.parameters)==null?void 0:U.docs,source:{originalSource:`args => { + return + + + + + ; +}`,...(Z=(Y=h.parameters)==null?void 0:Y.docs)==null?void 0:Z.source}}};var ee,se,te;f.parameters={...f.parameters,docs:{...(ee=f.parameters)==null?void 0:ee.docs,source:{originalSource:`args => { + const buttonStyle = (value: string) => { + return ; + }; + args.buttonStyle = buttonStyle; + return + + + + + ; +}`,...(te=(se=f.parameters)==null?void 0:se.docs)==null?void 0:te.source}}};const pe=["Default","Snap","FullWidth","HalfWidth","Vertical","Numbered","Sequential","CustomButton"];export{f as CustomButton,l as Default,n as FullWidth,d as HalfWidth,b as Numbered,h as Sequential,p as Snap,g as Vertical,pe as __namedExportsOrder,le as default}; diff --git a/docs/assets/Carousel.stories-ee9a369c.js b/docs/assets/Carousel.stories-ee9a369c.js deleted file mode 100644 index f31e8a86..00000000 --- a/docs/assets/Carousel.stories-ee9a369c.js +++ /dev/null @@ -1,76 +0,0 @@ -import{t as ie,a as i,j as t,F as E}from"./tw-merge-4486aaf0.js";import{r as c}from"./index-f46741a2.js";import{c as R}from"./clsx.m-1229b3e0.js";import{B as F}from"./Button-e31631bb.js";import"./index-8d7e61f2.js";const B=({children:s,innerRef:m,src:r,alt:v,index:x=0,width:u,hasButtons:N,buttonStyle:l,onPrev:w,onNext:C,className:_,...I})=>{const q=ie("carousel-item relative",_,R({"w-full":u==="full","w-1/2":u==="half","h-full":!0})),S=R({"w-full":u==="full"}),V=()=>l!=null?i(E,{children:[c.cloneElement(l("❮"),{onClick:w}),c.cloneElement(l("❯"),{onClick:C})]}):i(E,{children:[t(F,{onClick:w,shape:"circle",children:"❮"}),t(F,{onClick:C,shape:"circle",children:"❯"})]});return i("div",{...I,id:`item${x}`,ref:m,className:q,children:[r?t("img",{src:r,alt:v,className:S}):s,N&&t("div",{className:"absolute flex justify-between transform -translate-y-1/2 left-5 right-5 top-1/2",children:V()})]})},re=B;try{B.displayName="CarouselItem",B.__docgenInfo={description:"",displayName:"CarouselItem",props:{innerRef:{defaultValue:null,description:"",name:"innerRef",required:!1,type:{name:"LegacyRef"}},src:{defaultValue:null,description:"",name:"src",required:!1,type:{name:"string"}},alt:{defaultValue:null,description:"",name:"alt",required:!1,type:{name:"string"}},index:{defaultValue:{value:"0"},description:"",name:"index",required:!1,type:{name:"number"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"enum",value:[{value:'"full"'},{value:'"half"'}]}},hasButtons:{defaultValue:null,description:"",name:"hasButtons",required:!1,type:{name:"boolean"}},buttonStyle:{defaultValue:null,description:"",name:"buttonStyle",required:!1,type:{name:"((value: string) => ReactElement>)"}},onPrev:{defaultValue:null,description:"",name:"onPrev",required:!1,type:{name:"(() => void)"}},onNext:{defaultValue:null,description:"",name:"onNext",required:!1,type:{name:"(() => void)"}}}}}catch{}const j=c.forwardRef(({children:s,display:m="slider",snap:r,vertical:v,width:x,buttonStyle:u,dataTheme:N,className:l,...w},C)=>{const _=ie("carousel",l,R({"carousel-start":r==="start","carousel-center":r==="center","carousel-end":r==="end","carousel-vertical":v,"w-full":m!=="slider"})),[I,q]=c.useState([]),[S,V]=c.useState(0);c.useEffect(()=>{const o=[];s.map(a=>{o.push(c.createRef())}),q(o)},[s]);const k=o=>{var a;(a=I[o].current)==null||a.scrollIntoView({behavior:"smooth",block:"nearest",inline:r}),V(o)};return i(E,{children:[t("div",{role:"listbox","aria-label":"Image carousel",...w,ref:C,"data-theme":N,className:_,children:s.map((o,a)=>c.cloneElement(o,{key:a,innerRef:I[a],index:a+1,children:o.props.children,src:o.props.src,alt:o.props.alt,width:m!=="slider"?"full":x,hasButtons:m==="sequential",buttonStyle:u,onPrev:()=>k(a-1<0?s.length-1:a-1),onNext:()=>k(a+1>s.length-1?0:a+1),...o.props}))}),m==="numbered"&&t("div",{className:"flex justify-center w-full py-2 gap-2",children:s.map((o,a)=>u!=null?c.cloneElement(u((a+1).toString()),{key:a,onClick:()=>k(a)}):t(F,{active:a===S,onClick:()=>k(a),children:a+1},a))})]})}),e=Object.assign(j,{Item:re});try{j.displayName="Carousel",j.__docgenInfo={description:"",displayName:"Carousel",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},display:{defaultValue:{value:"slider"},description:"",name:"display",required:!1,type:{name:"enum",value:[{value:'"slider"'},{value:'"numbered"'},{value:'"sequential"'}]}},snap:{defaultValue:null,description:"",name:"snap",required:!1,type:{name:"enum",value:[{value:'"start"'},{value:'"end"'},{value:'"center"'}]}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"enum",value:[{value:'"full"'},{value:'"half"'}]}},buttonStyle:{defaultValue:null,description:"",name:"buttonStyle",required:!1,type:{name:"((value: string) => ReactElement>)"}}}}}catch{}try{e.displayName="Carousel",e.__docgenInfo={description:"",displayName:"Carousel",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},display:{defaultValue:{value:"slider"},description:"",name:"display",required:!1,type:{name:"enum",value:[{value:'"slider"'},{value:'"numbered"'},{value:'"sequential"'}]}},snap:{defaultValue:null,description:"",name:"snap",required:!1,type:{name:"enum",value:[{value:'"start"'},{value:'"end"'},{value:'"center"'}]}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"enum",value:[{value:'"full"'},{value:'"half"'}]}},buttonStyle:{defaultValue:null,description:"",name:"buttonStyle",required:!1,type:{name:"((value: string) => ReactElement>)"}}}}}catch{}const ne={title:"Data Display/Carousel",component:e},p=s=>i(e,{...s,className:"rounded-box",children:[t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1494253109108-2e30c049369b.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.webp",alt:"Fruits"})]});p.args={};const n=s=>i(e,{...s,className:"rounded-box",children:[t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1494253109108-2e30c049369b.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.webp",alt:"Fruits"})]});n.args={snap:"end"};const d=s=>i(e,{...s,className:"w-64 rounded-box",children:[t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1494253109108-2e30c049369b.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.webp",alt:"Fruits"})]});d.args={width:"full"};const g=s=>i(e,{...s,className:"w-64 rounded-box",children:[t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1494253109108-2e30c049369b.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.webp",alt:"Fruits"})]});g.args={width:"half"};const b=s=>i(e,{...s,className:"h-96 w-64 rounded-box",children:[t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1494253109108-2e30c049369b.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1550258987-190a2d41a8ba.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1559181567-c3190ca9959b.webp",alt:"Fruits"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1601004890684-d8cbf643f5f2.webp",alt:"Fruits"})]});b.args={width:"full",vertical:!0};const h=s=>i(e,{...s,className:"rounded-box",children:[t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.webp",alt:"City"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.webp",alt:"City"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1414694762283-acccc27bca85.webp",alt:"City"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.webp",alt:"City"})]});h.args={display:"numbered"};const f=s=>i(e,{...s,className:"rounded-box",children:[t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.webp",alt:"City"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.webp",alt:"City"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1414694762283-acccc27bca85.webp",alt:"City"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.webp",alt:"City"})]});f.args={display:"sequential"};const y=s=>{const m=r=>t(F,{color:"primary",children:r});return s.buttonStyle=m,i(e,{...s,className:"rounded-box",children:[t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1625726411847-8cbb60cc71e6.webp",alt:"City"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1609621838510-5ad474b7d25d.webp",alt:"City"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1414694762283-acccc27bca85.webp",alt:"City"}),t(e.Item,{src:"https://img.daisyui.com/images/stock/photo-1665553365602-b2fb8e5d1707.webp",alt:"City"})]})};y.args={display:"sequential"};var T,D,W;p.parameters={...p.parameters,docs:{...(T=p.parameters)==null?void 0:T.docs,source:{originalSource:`args => { - return - - - - - - - - ; -}`,...(W=(D=p.parameters)==null?void 0:D.docs)==null?void 0:W.source}}};var H,J,X;n.parameters={...n.parameters,docs:{...(H=n.parameters)==null?void 0:H.docs,source:{originalSource:`args => { - return - - - - - - - - ; -}`,...(X=(J=n.parameters)==null?void 0:J.docs)==null?void 0:X.source}}};var $,L,M;d.parameters={...d.parameters,docs:{...($=d.parameters)==null?void 0:$.docs,source:{originalSource:`args => { - return - - - - - - - - ; -}`,...(M=(L=d.parameters)==null?void 0:L.docs)==null?void 0:M.source}}};var O,P,A;g.parameters={...g.parameters,docs:{...(O=g.parameters)==null?void 0:O.docs,source:{originalSource:`args => { - return - - - - - - - - ; -}`,...(A=(P=g.parameters)==null?void 0:P.docs)==null?void 0:A.source}}};var z,G,K;b.parameters={...b.parameters,docs:{...(z=b.parameters)==null?void 0:z.docs,source:{originalSource:`args => { - return - - - - - - - - ; -}`,...(K=(G=b.parameters)==null?void 0:G.docs)==null?void 0:K.source}}};var Q,U,Y;h.parameters={...h.parameters,docs:{...(Q=h.parameters)==null?void 0:Q.docs,source:{originalSource:`args => { - return - - - - - ; -}`,...(Y=(U=h.parameters)==null?void 0:U.docs)==null?void 0:Y.source}}};var Z,ee,te;f.parameters={...f.parameters,docs:{...(Z=f.parameters)==null?void 0:Z.docs,source:{originalSource:`args => { - return - - - - - ; -}`,...(te=(ee=f.parameters)==null?void 0:ee.docs)==null?void 0:te.source}}};var se,ae,oe;y.parameters={...y.parameters,docs:{...(se=y.parameters)==null?void 0:se.docs,source:{originalSource:`args => { - const buttonStyle = (value: string) => { - return ; - }; - args.buttonStyle = buttonStyle; - return - - - - - ; -}`,...(oe=(ae=y.parameters)==null?void 0:ae.docs)==null?void 0:oe.source}}};const de=["Default","Snap","FullWidth","HalfWidth","Vertical","Numbered","Sequential","CustomButton"];export{y as CustomButton,p as Default,d as FullWidth,g as HalfWidth,h as Numbered,f as Sequential,n as Snap,b as Vertical,de as __namedExportsOrder,ne as default}; diff --git a/docs/assets/ChatBubble.stories-6w-HOuV1.js b/docs/assets/ChatBubble.stories-6w-HOuV1.js new file mode 100644 index 00000000..9b2aa9f7 --- /dev/null +++ b/docs/assets/ChatBubble.stories-6w-HOuV1.js @@ -0,0 +1,130 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{e as b,r as J}from"./iframe-DDnXVYpC.js";import{t as i}from"./bundle-mjs-yGZq-iow.js";import{A as P}from"./index-Dsnv3XI8.js";import{c as $}from"./clsx-B-dksMZM.js";import"./utils-BvopOSUb.js";const C=b.forwardRef(({size:s="xs",shape:r="circle",className:t,...n},o)=>e.jsx(P,{size:s,shape:r,...n,className:i("chat-image",t),ref:o}));try{C.displayName="ChatBubbleAvatar",C.__docgenInfo={description:"",displayName:"ChatBubbleAvatar",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},src:{defaultValue:null,description:"",name:"src",required:!1,type:{name:"string"}},letters:{defaultValue:null,description:"",name:"letters",required:!1,type:{name:"string"}},size:{defaultValue:{value:"xs"},description:"",name:"size",required:!1,type:{name:'number | "xl" | "lg" | "md" | "sm" | "xs"'}},shape:{defaultValue:{value:"circle"},description:"",name:"shape",required:!1,type:{name:"enum",value:[{value:'"circle"'},{value:'"square"'}]}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}},border:{defaultValue:null,description:"",name:"border",required:!1,type:{name:"boolean"}},borderColor:{defaultValue:null,description:"",name:"borderColor",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}},online:{defaultValue:null,description:"",name:"online",required:!1,type:{name:"boolean"}},offline:{defaultValue:null,description:"",name:"offline",required:!1,type:{name:"boolean"}},innerClassName:{defaultValue:null,description:"",name:"innerClassName",required:!1,type:{name:"string"}}}}}catch{}const B=b.forwardRef(({color:s,className:r,...t},n)=>{const o=i("chat-bubble",$({"chat-bubble-neutral":s==="neutral","chat-bubble-primary":s==="primary","chat-bubble-secondary":s==="secondary","chat-bubble-accent":s==="accent","chat-bubble-info":s==="info","chat-bubble-success":s==="success","chat-bubble-warning":s==="warning","chat-bubble-error":s==="error"}),r);return e.jsx("div",{...t,className:o,ref:n})});try{B.displayName="ChatBubbleMessage",B.__docgenInfo={description:"",displayName:"ChatBubbleMessage",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const y=b.forwardRef(({className:s,...r},t)=>e.jsx("div",{...r,className:i("chat-header",s),ref:t}));try{y.displayName="ChatBubbleHeader",y.__docgenInfo={description:"",displayName:"ChatBubbleHeader",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const f=b.forwardRef(({className:s,...r},t)=>e.jsx("time",{...r,className:i("text-xs opacity-50",s),ref:t}));try{f.displayName="ChatBubbleTime",f.__docgenInfo={description:"",displayName:"ChatBubbleTime",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const x=b.forwardRef(({className:s,...r},t)=>e.jsx("div",{...r,className:i("chat-footer opacity-50",s),ref:t}));try{x.displayName="ChatBubbleFooter",x.__docgenInfo={description:"",displayName:"ChatBubbleFooter",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const g=J.forwardRef(({end:s=!1,color:r,dataTheme:t,className:n,children:o,...E},z)=>e.jsx("div",{...E,"data-theme":t,className:i("chat",`chat-${s?"end":"start"}`,n),ref:z,children:o}));g.displayName="ChatBubble";const a=Object.assign(g,{Header:y,Time:f,Avatar:C,Message:B,Footer:x});try{g.displayName="ChatBubble",g.__docgenInfo={description:"",displayName:"ChatBubble",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},end:{defaultValue:{value:"false"},description:"",name:"end",required:!1,type:{name:"boolean"}}}}}catch{}const ee={title:"Data Display/Chat Bubble",component:a,decorators:[s=>e.jsx("div",{className:"w-full",children:e.jsx(s,{})})]},l=({header:s,time:r,avatar:t,footer:n,side:o})=>e.jsxs(a,{end:o==="end",children:[s&&e.jsxs(a.Header,{children:["Obi-Wan Kenobi"," ",r&&e.jsx(a.Time,{children:"2 hours ago"})]}),t&&e.jsx(a.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),e.jsx(a.Message,{children:"You were my brother, Anakin."}),n&&e.jsx(a.Footer,{children:"Seen"})]});l.args={header:!1,time:!1,avatar:!1,footer:!1,side:"start"};l.argTypes={side:{options:["start","end"],control:{type:"radio"}}};l.parameters={controls:{exclude:["end","dataTheme"]}};const u=s=>e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsxs(a.Message,{children:["It's over Anakin, ",e.jsx("br",{}),"I have the high ground."]})}),e.jsx(a,{end:!0,children:e.jsx(a.Message,{children:"You underestimate my power!"})})]}),h=s=>e.jsxs(e.Fragment,{children:[e.jsxs(a,{children:[e.jsx(a.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),e.jsx(a.Message,{children:"It was said that you would, destroy the Sith, not join them."})]}),e.jsxs(a,{children:[e.jsx(a.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),e.jsx(a.Message,{children:"It was you who would bring balance to the Force"})]}),e.jsxs(a,{children:[e.jsx(a.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),e.jsx(a.Message,{children:"Not leave it in Darkness"})]})]}),d=s=>e.jsxs(e.Fragment,{children:[e.jsxs(a,{children:[e.jsxs(a.Header,{children:["Obi-Wan Kenobi ",e.jsx(a.Time,{children:"12:45"})]}),e.jsx(a.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),e.jsx(a.Message,{children:"You were the Chosen One!"})]}),e.jsxs(a,{end:!0,children:[e.jsxs(a.Header,{children:["Anakin ",e.jsx(a.Time,{children:"12:46"})]}),e.jsx(a.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),e.jsx(a.Message,{children:"I hate you!"})]})]}),c=s=>e.jsxs(e.Fragment,{children:[e.jsxs(a,{children:[e.jsx(a.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),e.jsx(a.Message,{children:"You were the Chosen One!"}),e.jsx(a.Footer,{children:"Delivered"})]}),e.jsxs(a,{end:!0,children:[e.jsx(a.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),e.jsx(a.Message,{children:"I hate you!"}),e.jsx(a.Footer,{children:"Seen at 12:46"})]})]}),m=s=>e.jsxs(e.Fragment,{children:[e.jsxs(a,{children:[e.jsxs(a.Header,{children:["Obi-Wan Kenobi ",e.jsx(a.Time,{children:"12:45"})]}),e.jsx(a.Message,{children:"You were the Chosen One!"}),e.jsx(a.Footer,{children:"Delivered"})]}),e.jsxs(a,{end:!0,children:[e.jsxs(a.Header,{children:["Anakin ",e.jsx(a.Time,{children:"12:46"})]}),e.jsx(a.Message,{children:"I hate you!"}),e.jsx(a.Footer,{children:"Seen at 12:46"})]})]}),p=s=>e.jsxs(e.Fragment,{children:[e.jsx(a,{children:e.jsx(a.Message,{color:"primary",children:"What kind of nonsense is this"})}),e.jsx(a,{children:e.jsx(a.Message,{color:"secondary",children:"Put me on the Council and not make me a Master!??"})}),e.jsx(a,{children:e.jsx(a.Message,{color:"accent",children:"That's never been done in the history of the Jedi. It's insulting!"})}),e.jsx(a,{end:!0,children:e.jsx(a.Message,{color:"info",children:"Calm down, Anakin."})}),e.jsx(a,{end:!0,children:e.jsx(a.Message,{color:"success",children:"You have been given a great honor."})}),e.jsx(a,{end:!0,children:e.jsx(a.Message,{color:"warning",children:"To be on the Council at your age."})}),e.jsx(a,{end:!0,children:e.jsx(a.Message,{color:"error",children:"It's never happened before."})})]});var j,v,M;l.parameters={...l.parameters,docs:{...(j=l.parameters)==null?void 0:j.docs,source:{originalSource:`({ + header, + time, + avatar, + footer, + side +}) => { + return + {header && + Obi-Wan Kenobi{' '} + {time && 2 hours ago} + } + {avatar && } + You were my brother, Anakin. + {footer && Seen} + ; +}`,...(M=(v=l.parameters)==null?void 0:v.docs)==null?void 0:M.source}}};var w,_,T;u.parameters={...u.parameters,docs:{...(w=u.parameters)==null?void 0:w.docs,source:{originalSource:`args => <> + + + It's over Anakin,
I have the high ground. +
+
+ + + You underestimate my power! + + `,...(T=(_=u.parameters)==null?void 0:_.docs)==null?void 0:T.source}}};var A,k,F;h.parameters={...h.parameters,docs:{...(A=h.parameters)==null?void 0:A.docs,source:{originalSource:`args => <> + + + + It was said that you would, destroy the Sith, not join them. + + + + + + + It was you who would bring balance to the Force + + + + + + Not leave it in Darkness + + `,...(F=(k=h.parameters)==null?void 0:k.docs)==null?void 0:F.source}}};var I,N,H;d.parameters={...d.parameters,docs:{...(I=d.parameters)==null?void 0:I.docs,source:{originalSource:`args => <> + + + Obi-Wan Kenobi 12:45 + + + You were the Chosen One! + + + + + Anakin 12:46 + + + I hate you! + + `,...(H=(N=d.parameters)==null?void 0:N.docs)==null?void 0:H.source}}};var q,S,V;c.parameters={...c.parameters,docs:{...(q=c.parameters)==null?void 0:q.docs,source:{originalSource:`args => <> + + + You were the Chosen One! + Delivered + + + + + I hate you! + Seen at 12:46 + + `,...(V=(S=c.parameters)==null?void 0:S.docs)==null?void 0:V.source}}};var W,O,Y;m.parameters={...m.parameters,docs:{...(W=m.parameters)==null?void 0:W.docs,source:{originalSource:`args => <> + + + Obi-Wan Kenobi 12:45 + + You were the Chosen One! + Delivered + + + + + Anakin 12:46 + + I hate you! + Seen at 12:46 + + `,...(Y=(O=m.parameters)==null?void 0:O.docs)==null?void 0:Y.source}}};var D,R,K;p.parameters={...p.parameters,docs:{...(D=p.parameters)==null?void 0:D.docs,source:{originalSource:`args => <> + + + What kind of nonsense is this + + + + + + Put me on the Council and not make me a Master!?? + + + + + + That's never been done in the history of the Jedi. It's insulting! + + + + + Calm down, Anakin. + + + + + You have been given a great honor. + + + + + + To be on the Council at your age. + + + + + + It's never happened before. + + + `,...(K=(R=p.parameters)==null?void 0:R.docs)==null?void 0:K.source}}};const ae=["Default","Side","WithImage","WithHeader","WithFooter","WithHeaderAndFooter","Colors"];export{p as Colors,l as Default,u as Side,c as WithFooter,d as WithHeader,m as WithHeaderAndFooter,h as WithImage,ae as __namedExportsOrder,ee as default}; diff --git a/docs/assets/ChatBubble.stories-9243605c.js b/docs/assets/ChatBubble.stories-9243605c.js deleted file mode 100644 index ef2a1d26..00000000 --- a/docs/assets/ChatBubble.stories-9243605c.js +++ /dev/null @@ -1,130 +0,0 @@ -import{j as a,t as b,a as r,F as u}from"./tw-merge-4486aaf0.js";import{R as h,r as P}from"./index-f46741a2.js";import{A as G}from"./index-e7261937.js";import{c as L}from"./clsx.m-1229b3e0.js";import"./utils-ae2eb491.js";const y=h.forwardRef(({size:t="xs",shape:n="circle",className:s,...o},l)=>a(G,{size:t,shape:n,...o,className:b("chat-image",s),ref:l})),Q=y;try{y.displayName="ChatBubbleAvatar",y.__docgenInfo={description:"",displayName:"ChatBubbleAvatar",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},src:{defaultValue:null,description:"",name:"src",required:!1,type:{name:"string"}},letters:{defaultValue:null,description:"",name:"letters",required:!1,type:{name:"string"}},size:{defaultValue:{value:"xs"},description:"",name:"size",required:!1,type:{name:'number | "lg" | "md" | "sm" | "xs"'}},shape:{defaultValue:{value:"circle"},description:"",name:"shape",required:!1,type:{name:"enum",value:[{value:'"circle"'},{value:'"square"'}]}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}},border:{defaultValue:null,description:"",name:"border",required:!1,type:{name:"boolean"}},borderColor:{defaultValue:null,description:"",name:"borderColor",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}},online:{defaultValue:null,description:"",name:"online",required:!1,type:{name:"boolean"}},offline:{defaultValue:null,description:"",name:"offline",required:!1,type:{name:"boolean"}},innerClassName:{defaultValue:null,description:"",name:"innerClassName",required:!1,type:{name:"string"}}}}}catch{}const f=h.forwardRef(({color:t,className:n,...s},o)=>{const l=b("chat-bubble",L({"chat-bubble-primary":t==="primary","chat-bubble-secondary":t==="secondary","chat-bubble-accent":t==="accent","chat-bubble-info":t==="info","chat-bubble-success":t==="success","chat-bubble-warning":t==="warning","chat-bubble-error":t==="error"}),n);return a("div",{...s,className:l,ref:o})}),U=f;try{f.displayName="ChatBubbleMessage",f.__docgenInfo={description:"",displayName:"ChatBubbleMessage",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const v=h.forwardRef(({className:t,...n},s)=>a("div",{...n,className:b("chat-header",t),ref:s})),X=v;try{v.displayName="ChatBubbleHeader",v.__docgenInfo={description:"",displayName:"ChatBubbleHeader",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const M=h.forwardRef(({className:t,...n},s)=>a("time",{...n,className:b("text-xs opacity-50",t),ref:s})),Z=M;try{M.displayName="ChatBubbleTime",M.__docgenInfo={description:"",displayName:"ChatBubbleTime",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const w=h.forwardRef(({className:t,...n},s)=>a("div",{...n,className:b("chat-footer opacity-50",t),ref:s})),ee=w;try{w.displayName="ChatBubbleFooter",w.__docgenInfo={description:"",displayName:"ChatBubbleFooter",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const B=P.forwardRef(({end:t=!1,color:n,dataTheme:s,className:o,children:l,...E},J)=>a("div",{...E,"data-theme":s,className:b("chat",`chat-${t?"end":"start"}`,o),ref:J,children:l}));B.displayName="ChatBubble";const e=Object.assign(B,{Header:X,Time:Z,Avatar:Q,Message:U,Footer:ee});try{B.displayName="ChatBubble",B.__docgenInfo={description:"",displayName:"ChatBubble",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},end:{defaultValue:{value:"false"},description:"",name:"end",required:!1,type:{name:"boolean"}}}}}catch{}const oe={title:"Data Display/Chat Bubble",component:e,decorators:[t=>a("div",{className:"w-full",children:a(t,{})})]},i=({header:t,time:n,avatar:s,footer:o,side:l})=>r(e,{end:l==="end",children:[t&&r(e.Header,{children:["Obi-Wan Kenobi"," ",n&&a(e.Time,{children:"2 hours ago"})]}),s&&a(e.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),a(e.Message,{children:"You were my brother, Anakin."}),o&&a(e.Footer,{children:"Seen"})]});i.args={header:!1,time:!1,avatar:!1,footer:!1,side:"start"};i.argTypes={side:{options:["start","end"],control:{type:"radio"}}};i.parameters={controls:{exclude:["end","dataTheme"]}};const d=t=>r(u,{children:[a(e,{children:r(e.Message,{children:["It's over Anakin, ",a("br",{}),"I have the high ground."]})}),a(e,{end:!0,children:a(e.Message,{children:"You underestimate my power!"})})]}),c=t=>r(u,{children:[r(e,{children:[a(e.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),a(e.Message,{children:"It was said that you would, destroy the Sith, not join them."})]}),r(e,{children:[a(e.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),a(e.Message,{children:"It was you who would bring balance to the Force"})]}),r(e,{children:[a(e.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),a(e.Message,{children:"Not leave it in Darkness"})]})]}),m=t=>r(u,{children:[r(e,{children:[r(e.Header,{children:["Obi-Wan Kenobi ",a(e.Time,{children:"12:45"})]}),a(e.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),a(e.Message,{children:"You were the Chosen One!"})]}),r(e,{end:!0,children:[r(e.Header,{children:["Anakin ",a(e.Time,{children:"12:46"})]}),a(e.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),a(e.Message,{children:"I hate you!"})]})]}),p=t=>r(u,{children:[r(e,{children:[a(e.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),a(e.Message,{children:"You were the Chosen One!"}),a(e.Footer,{children:"Delivered"})]}),r(e,{end:!0,children:[a(e.Avatar,{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"}),a(e.Message,{children:"I hate you!"}),a(e.Footer,{children:"Seen at 12:46"})]})]}),g=t=>r(u,{children:[r(e,{children:[r(e.Header,{children:["Obi-Wan Kenobi ",a(e.Time,{children:"12:45"})]}),a(e.Message,{children:"You were the Chosen One!"}),a(e.Footer,{children:"Delivered"})]}),r(e,{end:!0,children:[r(e.Header,{children:["Anakin ",a(e.Time,{children:"12:46"})]}),a(e.Message,{children:"I hate you!"}),a(e.Footer,{children:"Seen at 12:46"})]})]}),C=t=>r(u,{children:[a(e,{children:a(e.Message,{color:"primary",children:"What kind of nonsense is this"})}),a(e,{children:a(e.Message,{color:"secondary",children:"Put me on the Council and not make me a Master!??"})}),a(e,{children:a(e.Message,{color:"accent",children:"That's never been done in the history of the Jedi. It's insulting!"})}),a(e,{end:!0,children:a(e.Message,{color:"info",children:"Calm down, Anakin."})}),a(e,{end:!0,children:a(e.Message,{color:"success",children:"You have been given a great honor."})}),a(e,{end:!0,children:a(e.Message,{color:"warning",children:"To be on the Council at your age."})}),a(e,{end:!0,children:a(e.Message,{color:"error",children:"It's never happened before."})})]});var _,T,A;i.parameters={...i.parameters,docs:{...(_=i.parameters)==null?void 0:_.docs,source:{originalSource:`({ - header, - time, - avatar, - footer, - side -}) => { - return - {header && - Obi-Wan Kenobi{' '} - {time && 2 hours ago} - } - {avatar && } - You were my brother, Anakin. - {footer && Seen} - ; -}`,...(A=(T=i.parameters)==null?void 0:T.docs)==null?void 0:A.source}}};var k,F,I;d.parameters={...d.parameters,docs:{...(k=d.parameters)==null?void 0:k.docs,source:{originalSource:`args => <> - - - It's over Anakin,
I have the high ground. -
-
- - - You underestimate my power! - - `,...(I=(F=d.parameters)==null?void 0:F.docs)==null?void 0:I.source}}};var H,N,q;c.parameters={...c.parameters,docs:{...(H=c.parameters)==null?void 0:H.docs,source:{originalSource:`args => <> - - - - It was said that you would, destroy the Sith, not join them. - - - - - - - It was you who would bring balance to the Force - - - - - - Not leave it in Darkness - - `,...(q=(N=c.parameters)==null?void 0:N.docs)==null?void 0:q.source}}};var S,V,W;m.parameters={...m.parameters,docs:{...(S=m.parameters)==null?void 0:S.docs,source:{originalSource:`args => <> - - - Obi-Wan Kenobi 12:45 - - - You were the Chosen One! - - - - - Anakin 12:46 - - - I hate you! - - `,...(W=(V=m.parameters)==null?void 0:V.docs)==null?void 0:W.source}}};var O,x,Y;p.parameters={...p.parameters,docs:{...(O=p.parameters)==null?void 0:O.docs,source:{originalSource:`args => <> - - - You were the Chosen One! - Delivered - - - - - I hate you! - Seen at 12:46 - - `,...(Y=(x=p.parameters)==null?void 0:x.docs)==null?void 0:Y.source}}};var D,R,$;g.parameters={...g.parameters,docs:{...(D=g.parameters)==null?void 0:D.docs,source:{originalSource:`args => <> - - - Obi-Wan Kenobi 12:45 - - You were the Chosen One! - Delivered - - - - - Anakin 12:46 - - I hate you! - Seen at 12:46 - - `,...($=(R=g.parameters)==null?void 0:R.docs)==null?void 0:$.source}}};var j,K,z;C.parameters={...C.parameters,docs:{...(j=C.parameters)==null?void 0:j.docs,source:{originalSource:`args => <> - - - What kind of nonsense is this - - - - - - Put me on the Council and not make me a Master!?? - - - - - - That's never been done in the history of the Jedi. It's insulting! - - - - - Calm down, Anakin. - - - - - You have been given a great honor. - - - - - - To be on the Council at your age. - - - - - - It's never happened before. - - - `,...(z=(K=C.parameters)==null?void 0:K.docs)==null?void 0:z.source}}};const le=["Default","Side","WithImage","WithHeader","WithFooter","WithHeaderAndFooter","Colors"];export{C as Colors,i as Default,d as Side,p as WithFooter,m as WithHeader,g as WithHeaderAndFooter,c as WithImage,le as __namedExportsOrder,oe as default}; diff --git a/docs/assets/Checkbox.stories-CpuwjbFp.js b/docs/assets/Checkbox.stories-CpuwjbFp.js new file mode 100644 index 00000000..6da0012f --- /dev/null +++ b/docs/assets/Checkbox.stories-CpuwjbFp.js @@ -0,0 +1,34 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{C as s}from"./index-BTy56zCQ.js";import{F as m}from"./index-BNCmuIF-.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";const G={title:"Data Input/Checkbox",component:s},u=r=>e.jsx(s,{...r}),a=u.bind({});a.args={};const o=u.bind({});o.args={indeterminate:!0};const _=r=>e.jsx(m,{className:"shadow bg-base-200 w-64 rounded-lg p-4",children:e.jsx(m.Label,{title:"Remember me",children:e.jsx(s,{...r})})}),t=_.bind({});t.args={};const c=r=>e.jsxs("div",{className:"flex flex-row items-center float-left gap-2",children:[e.jsx(s,{...r,defaultChecked:!0,color:"primary"}),e.jsx(s,{...r,defaultChecked:!0,color:"secondary"}),e.jsx(s,{...r,defaultChecked:!0,color:"accent"}),e.jsx(s,{...r,defaultChecked:!0,color:"neutral"}),e.jsx(s,{...r,defaultChecked:!0,color:"success"}),e.jsx(s,{...r,defaultChecked:!0,color:"warning"}),e.jsx(s,{...r,defaultChecked:!0,color:"info"}),e.jsx(s,{...r,defaultChecked:!0,color:"error"})]});c.args={};const d=r=>e.jsxs("div",{className:"flex flex-row items-center float-left gap-2",children:[e.jsx(s,{...r,defaultChecked:!0,size:"xs"}),e.jsx(s,{...r,defaultChecked:!0,size:"sm"}),e.jsx(s,{...r,defaultChecked:!0,size:"md"}),e.jsx(s,{...r,defaultChecked:!0,size:"lg"}),e.jsx(s,{...r,defaultChecked:!0,size:"xl"})]});d.args={};const l=u.bind({});l.args={disabled:!0};const n=u.bind({});n.args={checked:!0,disabled:!0};var i,h,x;a.parameters={...a.parameters,docs:{...(i=a.parameters)==null?void 0:i.docs,source:{originalSource:`args => { + return ; +}`,...(x=(h=a.parameters)==null?void 0:h.docs)==null?void 0:x.source}}};var C,f,k;o.parameters={...o.parameters,docs:{...(C=o.parameters)==null?void 0:C.docs,source:{originalSource:`args => { + return ; +}`,...(k=(f=o.parameters)==null?void 0:f.docs)==null?void 0:k.source}}};var p,b,g;t.parameters={...t.parameters,docs:{...(p=t.parameters)==null?void 0:p.docs,source:{originalSource:`args => { + return
+ + + +
; +}`,...(g=(b=t.parameters)==null?void 0:b.docs)==null?void 0:g.source}}};var j,z,w;c.parameters={...c.parameters,docs:{...(j=c.parameters)==null?void 0:j.docs,source:{originalSource:`args => { + return
+ + + + + + + + +
; +}`,...(w=(z=c.parameters)==null?void 0:z.docs)==null?void 0:w.source}}};var F,S,D;d.parameters={...d.parameters,docs:{...(F=d.parameters)==null?void 0:F.docs,source:{originalSource:`args => { + return
+ + + + + +
; +}`,...(D=(S=d.parameters)==null?void 0:S.docs)==null?void 0:D.source}}};var v,N,y;l.parameters={...l.parameters,docs:{...(v=l.parameters)==null?void 0:v.docs,source:{originalSource:`args => { + return ; +}`,...(y=(N=l.parameters)==null?void 0:N.docs)==null?void 0:y.source}}};var I,L,R;n.parameters={...n.parameters,docs:{...(I=n.parameters)==null?void 0:I.docs,source:{originalSource:`args => { + return ; +}`,...(R=(L=n.parameters)==null?void 0:L.docs)==null?void 0:R.source}}};const H=["Default","Indeterminate","FormControl","Colors","Sizes","Disabled","DisabledChecked"];export{c as Colors,a as Default,l as Disabled,n as DisabledChecked,t as FormControl,o as Indeterminate,d as Sizes,H as __namedExportsOrder,G as default}; diff --git a/docs/assets/Checkbox.stories-dd00ff2e.js b/docs/assets/Checkbox.stories-dd00ff2e.js deleted file mode 100644 index 2aa3d5d5..00000000 --- a/docs/assets/Checkbox.stories-dd00ff2e.js +++ /dev/null @@ -1,32 +0,0 @@ -import{a as R,j as r}from"./tw-merge-4486aaf0.js";import{C as a}from"./index-7a860f54.js";import{F as m}from"./index-1d303440.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";const G={title:"Data Input/Checkbox",component:a},u=e=>r(a,{...e}),s=u.bind({});s.args={};const o=u.bind({});o.args={indeterminate:!0};const T=e=>r(m,{className:"shadow bg-base-200 w-64 rounded-lg p-4",children:r(m.Label,{title:"Remember me",children:r(a,{...e})})}),c=T.bind({});c.args={};const t=e=>R("div",{className:"flex flex-col items-center float-left gap-2",children:[r(a,{...e,defaultChecked:!0,color:"primary"}),r(a,{...e,defaultChecked:!0,color:"secondary"}),r(a,{...e,defaultChecked:!0,color:"accent"}),r(a,{...e,defaultChecked:!0,color:"success"}),r(a,{...e,defaultChecked:!0,color:"warning"}),r(a,{...e,defaultChecked:!0,color:"info"}),r(a,{...e,defaultChecked:!0,color:"error"})]});t.args={};const d=e=>R("div",{className:"flex flex-col items-center float-left gap-2",children:[r(a,{...e,defaultChecked:!0,size:"xs"}),r(a,{...e,defaultChecked:!0,size:"sm"}),r(a,{...e,defaultChecked:!0,size:"md"}),r(a,{...e,defaultChecked:!0,size:"lg"})]});d.args={};const l=u.bind({});l.args={disabled:!0};const n=u.bind({});n.args={checked:!0,disabled:!0};var i,h,C;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`args => { - return ; -}`,...(C=(h=s.parameters)==null?void 0:h.docs)==null?void 0:C.source}}};var p,f,k;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`args => { - return ; -}`,...(k=(f=o.parameters)==null?void 0:f.docs)==null?void 0:k.source}}};var g,b,x;c.parameters={...c.parameters,docs:{...(g=c.parameters)==null?void 0:g.docs,source:{originalSource:`args => { - return
- - - -
; -}`,...(x=(b=c.parameters)==null?void 0:b.docs)==null?void 0:x.source}}};var z,F,S;t.parameters={...t.parameters,docs:{...(z=t.parameters)==null?void 0:z.docs,source:{originalSource:`args => { - return
- - - - - - - -
; -}`,...(S=(F=t.parameters)==null?void 0:F.docs)==null?void 0:S.source}}};var D,v,w;d.parameters={...d.parameters,docs:{...(D=d.parameters)==null?void 0:D.docs,source:{originalSource:`args => { - return
- - - - -
; -}`,...(w=(v=d.parameters)==null?void 0:v.docs)==null?void 0:w.source}}};var N,y,j;l.parameters={...l.parameters,docs:{...(N=l.parameters)==null?void 0:N.docs,source:{originalSource:`args => { - return ; -}`,...(j=(y=l.parameters)==null?void 0:y.docs)==null?void 0:j.source}}};var I,L,_;n.parameters={...n.parameters,docs:{...(I=n.parameters)==null?void 0:I.docs,source:{originalSource:`args => { - return ; -}`,...(_=(L=n.parameters)==null?void 0:L.docs)==null?void 0:_.source}}};const H=["Default","Indeterminate","FormControl","Colors","Sizes","Disabled","DisabledChecked"];export{t as Colors,s as Default,l as Disabled,n as DisabledChecked,c as FormControl,o as Indeterminate,d as Sizes,H as __namedExportsOrder,G as default}; diff --git a/docs/assets/CodeMockup-79bde71e.js b/docs/assets/CodeMockup-79bde71e.js deleted file mode 100644 index 2bb6ab74..00000000 --- a/docs/assets/CodeMockup-79bde71e.js +++ /dev/null @@ -1 +0,0 @@ -import{t as m,j as d}from"./tw-merge-4486aaf0.js";import{r as f,R as u}from"./index-f46741a2.js";import{c as _}from"./clsx.m-1229b3e0.js";const g=f.forwardRef(({dataPrefix:a,dataTheme:n,status:e,className:o,children:t,innerProps:c,innerRef:s,...i},l)=>{const p=m(_({"bg-info":e==="info","bg-success":e==="success","bg-warning":e==="warning","bg-error":e==="error","text-info-content":e==="info","text-success-content":e==="success","text-warning-content":e==="warning","text-error-content":e==="error"}),o),y={...i,className:p,...a!==!1&&{"data-prefix":a||">"}};return d("pre",{...y,"data-theme":n,className:p,ref:l,children:d("code",{...c,ref:s,children:t})})});g.displayName="CodeMockup.Line";try{CodeMockup.Line.displayName="CodeMockup.Line",CodeMockup.Line.__docgenInfo={description:"",displayName:"CodeMockup.Line",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},dataPrefix:{defaultValue:null,description:"",name:"dataPrefix",required:!1,type:{name:"string | boolean"}},status:{defaultValue:null,description:"",name:"status",required:!1,type:{name:"enum",value:[{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}},innerProps:{defaultValue:null,description:"",name:"innerProps",required:!1,type:{name:"HTMLAttributes"}},innerRef:{defaultValue:null,description:"",name:"innerRef",required:!1,type:{name:"Ref"}}}}}catch{}const r=f.forwardRef(({dataTheme:a,className:n,children:e,...o},t)=>{const c=m("mockup-code",n);return d("div",{"aria-label":"Code mockup",...o,"data-theme":a,className:c,ref:t,children:u.Children.map(e,(s,i)=>{const l=s;return u.cloneElement(l,{key:i})})})});r.displayName="CodeMockup";const h=Object.assign(r,{Line:g});try{r.displayName="CodeMockup",r.__docgenInfo={description:"",displayName:"CodeMockup",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}export{h as C}; diff --git a/docs/assets/CodeMockup.stories-0e1270a0.js b/docs/assets/CodeMockup.stories-0e1270a0.js deleted file mode 100644 index 6a26d486..00000000 --- a/docs/assets/CodeMockup.stories-0e1270a0.js +++ /dev/null @@ -1,34 +0,0 @@ -import{j as r,a as b}from"./tw-merge-4486aaf0.js";import{C as e}from"./CodeMockup-79bde71e.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";const j={title:"Mockup/CodeMockup",component:e,subcomponents:{"CodeMockup.Line":e.Line},parameters:{controls:{expanded:!0}}},o=a=>r(e,{...a,children:r(e.Line,{children:"yarn add daisyui react-daisyui"})}),n=a=>r(e,{...a,children:r(e.Line,{dataPrefix:"$",children:"yarn add daisyui react-daisyui"})}),i=a=>b(e,{...a,children:[r(e.Line,{children:"yarn add daisyui react-daisyui"}),r(e.Line,{className:"text-warning",children:"installing..."}),r(e.Line,{className:"text-success",children:"Done!"})]}),s=a=>b(e,{...a,children:[r(e.Line,{children:"yarn add daisyui react-daisyui"}),r(e.Line,{children:"installing..."}),r(e.Line,{status:"warning",children:"Error!"})]}),t=a=>r(e,{...a,children:r(e.Line,{dataPrefix:"~",children:"Magnam dolore beatae necessitatibus nemopsum itaque sit. Et porro quae qui et et dolore ratione."})}),c=a=>r(e,{...a,children:r(e.Line,{dataPrefix:!1,children:"without prefix"})});var d,u,p;o.parameters={...o.parameters,docs:{...(d=o.parameters)==null?void 0:d.docs,source:{originalSource:`args => { - return - yarn add daisyui react-daisyui - ; -}`,...(p=(u=o.parameters)==null?void 0:u.docs)==null?void 0:p.source}}};var l,m,L;n.parameters={...n.parameters,docs:{...(l=n.parameters)==null?void 0:l.docs,source:{originalSource:`args => { - return - - yarn add daisyui react-daisyui - - ; -}`,...(L=(m=n.parameters)==null?void 0:m.docs)==null?void 0:L.source}}};var M,k,C;i.parameters={...i.parameters,docs:{...(M=i.parameters)==null?void 0:M.docs,source:{originalSource:`args => { - return - yarn add daisyui react-daisyui - installing... - Done! - ; -}`,...(C=(k=i.parameters)==null?void 0:k.docs)==null?void 0:C.source}}};var g,h,y;s.parameters={...s.parameters,docs:{...(g=s.parameters)==null?void 0:g.docs,source:{originalSource:`args => { - return - yarn add daisyui react-daisyui - installing... - Error! - ; -}`,...(y=(h=s.parameters)==null?void 0:h.docs)==null?void 0:y.source}}};var x,f,P;t.parameters={...t.parameters,docs:{...(x=t.parameters)==null?void 0:x.docs,source:{originalSource:`args => { - return - - Magnam dolore beatae necessitatibus nemopsum itaque sit. Et porro quae qui - et et dolore ratione. - - ; -}`,...(P=(f=t.parameters)==null?void 0:f.docs)==null?void 0:P.source}}};var S,q,w;c.parameters={...c.parameters,docs:{...(S=c.parameters)==null?void 0:S.docs,source:{originalSource:`args => { - return - without prefix - ; -}`,...(w=(q=c.parameters)==null?void 0:q.docs)==null?void 0:w.source}}};const H=["Default","LinePrefix","MultiLine","HighlightedLine","LongLineWithScroll","WithoutPrefix"];export{o as Default,s as HighlightedLine,n as LinePrefix,t as LongLineWithScroll,i as MultiLine,c as WithoutPrefix,H as __namedExportsOrder,j as default}; diff --git a/docs/assets/CodeMockup.stories-Du-2VA_z.js b/docs/assets/CodeMockup.stories-Du-2VA_z.js new file mode 100644 index 00000000..6731a5cd --- /dev/null +++ b/docs/assets/CodeMockup.stories-Du-2VA_z.js @@ -0,0 +1,34 @@ +import{j as r}from"./jsx-runtime-BjG_zV1W.js";import{r as D,e as k}from"./iframe-DDnXVYpC.js";import{t as W}from"./bundle-mjs-yGZq-iow.js";import{c as A}from"./clsx-B-dksMZM.js";const $=D.forwardRef(({dataPrefix:a,dataTheme:u,status:n,className:p,children:l,innerProps:m,innerRef:M,...g},L)=>{const f=W(A({"bg-info":n==="info","bg-success":n==="success","bg-warning":n==="warning","bg-error":n==="error","text-info-content":n==="info","text-success-content":n==="success","text-warning-content":n==="warning","text-error-content":n==="error"}),p),O={...g,className:f,...a!==!1&&{"data-prefix":a||">"}};return r.jsx("pre",{...O,"data-theme":u,className:f,ref:L,children:r.jsx("code",{...m,ref:M,children:l})})});$.displayName="CodeMockup.Line";try{CodeMockup.Line.displayName="CodeMockup.Line",CodeMockup.Line.__docgenInfo={description:"",displayName:"CodeMockup.Line",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},dataPrefix:{defaultValue:null,description:"",name:"dataPrefix",required:!1,type:{name:"string | boolean"}},status:{defaultValue:null,description:"",name:"status",required:!1,type:{name:"enum",value:[{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}},innerProps:{defaultValue:null,description:"",name:"innerProps",required:!1,type:{name:"HTMLAttributes"}},innerRef:{defaultValue:null,description:"",name:"innerRef",required:!1,type:{name:"Ref"}}}}}catch{}const I=D.forwardRef(({dataTheme:a,className:u,children:n,...p},l)=>{const m=W("mockup-code",u);return r.jsx("div",{"aria-label":"Code mockup",...p,"data-theme":a,className:m,ref:l,children:k.Children.map(n,(M,g)=>{const L=M;return k.cloneElement(L,{key:g})})})});I.displayName="CodeMockup";const e=Object.assign(I,{Line:$});try{e.displayName="CodeMockupNamespace",e.__docgenInfo={description:"",displayName:"CodeMockupNamespace",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const J={title:"Mockup/CodeMockup",component:e,subcomponents:{"CodeMockup.Line":e.Line},parameters:{controls:{expanded:!0}}},o=a=>r.jsx(e,{...a,children:r.jsx(e.Line,{children:"yarn add daisyui react-daisyui"})}),s=a=>r.jsx(e,{...a,children:r.jsx(e.Line,{dataPrefix:"$",children:"yarn add daisyui react-daisyui"})}),i=a=>r.jsxs(e,{...a,children:[r.jsx(e.Line,{children:"yarn add daisyui react-daisyui"}),r.jsx(e.Line,{className:"text-warning",children:"installing..."}),r.jsx(e.Line,{className:"text-success",children:"Done!"})]}),t=a=>r.jsxs(e,{...a,children:[r.jsx(e.Line,{children:"yarn add daisyui react-daisyui"}),r.jsx(e.Line,{children:"installing..."}),r.jsx(e.Line,{status:"warning",children:"Error!"})]}),c=a=>r.jsx(e,{...a,children:r.jsx(e.Line,{dataPrefix:"~",children:"Magnam dolore beatae necessitatibus nemopsum itaque sit. Et porro quae qui et et dolore ratione."})}),d=a=>r.jsx(e,{...a,children:r.jsx(e.Line,{dataPrefix:!1,children:"without prefix"})});var x,C,y;o.parameters={...o.parameters,docs:{...(x=o.parameters)==null?void 0:x.docs,source:{originalSource:`args => { + return + yarn add daisyui react-daisyui + ; +}`,...(y=(C=o.parameters)==null?void 0:C.docs)==null?void 0:y.source}}};var h,j,_;s.parameters={...s.parameters,docs:{...(h=s.parameters)==null?void 0:h.docs,source:{originalSource:`args => { + return + + yarn add daisyui react-daisyui + + ; +}`,...(_=(j=s.parameters)==null?void 0:j.docs)==null?void 0:_.source}}};var N,w,P;i.parameters={...i.parameters,docs:{...(N=i.parameters)==null?void 0:N.docs,source:{originalSource:`args => { + return + yarn add daisyui react-daisyui + installing... + Done! + ; +}`,...(P=(w=i.parameters)==null?void 0:w.docs)==null?void 0:P.source}}};var b,q,E;t.parameters={...t.parameters,docs:{...(b=t.parameters)==null?void 0:b.docs,source:{originalSource:`args => { + return + yarn add daisyui react-daisyui + installing... + Error! + ; +}`,...(E=(q=t.parameters)==null?void 0:q.docs)==null?void 0:E.source}}};var S,T,v;c.parameters={...c.parameters,docs:{...(S=c.parameters)==null?void 0:S.docs,source:{originalSource:`args => { + return + + Magnam dolore beatae necessitatibus nemopsum itaque sit. Et porro quae qui + et et dolore ratione. + + ; +}`,...(v=(T=c.parameters)==null?void 0:T.docs)==null?void 0:v.source}}};var R,V,H;d.parameters={...d.parameters,docs:{...(R=d.parameters)==null?void 0:R.docs,source:{originalSource:`args => { + return + without prefix + ; +}`,...(H=(V=d.parameters)==null?void 0:V.docs)==null?void 0:H.source}}};const K=["Default","LinePrefix","MultiLine","HighlightedLine","LongLineWithScroll","WithoutPrefix"];export{o as Default,t as HighlightedLine,s as LinePrefix,c as LongLineWithScroll,i as MultiLine,d as WithoutPrefix,K as __namedExportsOrder,J as default}; diff --git a/docs/assets/Collapse.stories-38f9c57c.js b/docs/assets/Collapse.stories-38f9c57c.js deleted file mode 100644 index 0285581c..00000000 --- a/docs/assets/Collapse.stories-38f9c57c.js +++ /dev/null @@ -1,124 +0,0 @@ -import{a as n,j as s}from"./tw-merge-4486aaf0.js";import{r as Y}from"./index-f46741a2.js";import{C as e}from"./index-b2a88d73.js";import"./clsx.m-1229b3e0.js";import"./CollapseContent-4c7c3cf3.js";const re={title:"Data Display/Collapse",component:e,args:{className:"bg-base-200"}},g=t=>n(e,{...t,children:[s(e.Title,{className:"text-xl font-medium",children:"Focus me to see content"}),s(e.Content,{children:'tabindex="0" attribute is necessary to make the div focusable'})]}),a=g.bind({});a.args={};const r=t=>n(e,{...t,children:[s(e.Title,{className:"text-xl font-medium",children:"Click me to show/hide content"}),s(e.Content,{children:"hello"})]});r.args={checkbox:!0};const c=g.bind({});c.args={className:"border border-base-300 bg-base-200"};const l=g.bind({});l.args={className:"border border-base-300 bg-base-200",icon:"arrow"};const i=g.bind({});i.args={className:"border border-base-300 bg-base-200",icon:"plus"};const p=t=>n(e,{...t,children:[s(e.Title,{className:"text-xl font-medium",children:"I have collapse-open class"}),s(e.Content,{children:'tabindex="0" attribute is necessary to make the div focusable'})]});p.args={className:"border border-base-300 bg-base-200",open:!0};const d=t=>n(e,{...t,children:[s(e.Title,{className:"text-xl font-medium",children:"I have collapse-close class"}),s(e.Content,{children:'tabindex="0" attribute is necessary to make the div focusable'})]});d.args={className:"border border-base-300 bg-base-200",open:!1};const m=t=>n(e,{...t,className:"group",children:[s(e.Title,{className:"bg-primary text-primary-content group-focus:bg-secondary group-focus:text-secondary-content",children:"Focus me to see content"}),s(e.Content,{className:"bg-primary text-primary-content group-focus:bg-secondary group-focus:text-secondary-content",children:s("p",{children:'tabindex="0" attribute is necessary to make the div focusable'})})]}),u=t=>n(e,{...t,className:"group",checkbox:!0,children:[s(e.Title,{className:"bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content",children:"Click me to show/hide content"}),s(e.Content,{className:"bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content",children:s("p",{children:'tabindex="0" attribute is necessary to make the div focusable'})})]}),h=t=>{const[b,o]=Y.useState(!1);return n("div",{children:[n("span",{children:["Checkbox is ",b?"open":"closed","."]}),n(e,{...t,className:"group",onClose:()=>{o(!1)},onOpen:()=>{o(!0)},onToggle:()=>{console.log("toggled!")},children:[s(e.Title,{className:"bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content",children:"Click me to show/hide content"}),s(e.Content,{className:"bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content",children:s("p",{children:'tabindex="0" attribute is necessary to make the div focusable'})})]})]})},C=t=>{const[b,o]=Y.useState(!1);return n("div",{children:[n("span",{children:["Checkbox is ",b?"open":"closed","."]}),n(e,{...t,className:"group",onClose:()=>{o(!1)},onOpen:()=>{o(!0)},onToggle:()=>{console.log("toggled!")},checkbox:!0,children:[s(e.Title,{className:"bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content",children:"Click me to show/hide content"}),s(e.Content,{className:"bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content",children:s("p",{children:'tabindex="0" attribute is necessary to make the div focusable'})})]})]})};var x,y,k;a.parameters={...a.parameters,docs:{...(x=a.parameters)==null?void 0:x.docs,source:{originalSource:`args => { - return - - Focus me to see content - - - tabindex="0" attribute is necessary to make the div focusable - - ; -}`,...(k=(y=a.parameters)==null?void 0:y.docs)==null?void 0:k.source}}};var f,T,N;r.parameters={...r.parameters,docs:{...(f=r.parameters)==null?void 0:f.docs,source:{originalSource:`args => { - return - - Click me to show/hide content - - hello - ; -}`,...(N=(T=r.parameters)==null?void 0:T.docs)==null?void 0:N.source}}};var v,O,F;c.parameters={...c.parameters,docs:{...(v=c.parameters)==null?void 0:v.docs,source:{originalSource:`args => { - return - - Focus me to see content - - - tabindex="0" attribute is necessary to make the div focusable - - ; -}`,...(F=(O=c.parameters)==null?void 0:O.docs)==null?void 0:F.source}}};var S,I,w;l.parameters={...l.parameters,docs:{...(S=l.parameters)==null?void 0:S.docs,source:{originalSource:`args => { - return - - Focus me to see content - - - tabindex="0" attribute is necessary to make the div focusable - - ; -}`,...(w=(I=l.parameters)==null?void 0:I.docs)==null?void 0:w.source}}};var W,E,A;i.parameters={...i.parameters,docs:{...(W=i.parameters)==null?void 0:W.docs,source:{originalSource:`args => { - return - - Focus me to see content - - - tabindex="0" attribute is necessary to make the div focusable - - ; -}`,...(A=(E=i.parameters)==null?void 0:E.docs)==null?void 0:A.source}}};var B,D,j;p.parameters={...p.parameters,docs:{...(B=p.parameters)==null?void 0:B.docs,source:{originalSource:`args => { - return - - I have collapse-open class - - - tabindex="0" attribute is necessary to make the div focusable - - ; -}`,...(j=(D=p.parameters)==null?void 0:D.docs)==null?void 0:j.source}}};var _,H,M;d.parameters={...d.parameters,docs:{...(_=d.parameters)==null?void 0:_.docs,source:{originalSource:`args => { - return - - I have collapse-close class - - - tabindex="0" attribute is necessary to make the div focusable - - ; -}`,...(M=(H=d.parameters)==null?void 0:H.docs)==null?void 0:M.source}}};var P,q,z;m.parameters={...m.parameters,docs:{...(P=m.parameters)==null?void 0:P.docs,source:{originalSource:`args => { - return - - Focus me to see content - - -

tabindex="0" attribute is necessary to make the div focusable

-
-
; -}`,...(z=(q=m.parameters)==null?void 0:q.docs)==null?void 0:z.source}}};var G,J,K;u.parameters={...u.parameters,docs:{...(G=u.parameters)==null?void 0:G.docs,source:{originalSource:`args => { - return - - Click me to show/hide content - - -

tabindex="0" attribute is necessary to make the div focusable

-
-
; -}`,...(K=(J=u.parameters)==null?void 0:J.docs)==null?void 0:K.source}}};var L,Q,R;h.parameters={...h.parameters,docs:{...(L=h.parameters)==null?void 0:L.docs,source:{originalSource:`args => { - const [isOpen, setIsOpen] = useState(false); - const handleToggle = () => { - console.log('toggled!'); - }; - const handleOpen = () => { - setIsOpen(true); - }; - const handleClose = () => { - setIsOpen(false); - }; - return
- Checkbox is {isOpen ? 'open' : 'closed'}. - - - Click me to show/hide content - - -

tabindex="0" attribute is necessary to make the div focusable

-
-
-
; -}`,...(R=(Q=h.parameters)==null?void 0:Q.docs)==null?void 0:R.source}}};var U,V,X;C.parameters={...C.parameters,docs:{...(U=C.parameters)==null?void 0:U.docs,source:{originalSource:`args => { - const [isOpen, setIsOpen] = useState(false); - const handleToggle = () => { - console.log('toggled!'); - }; - const handleOpen = () => { - setIsOpen(true); - }; - const handleClose = () => { - setIsOpen(false); - }; - return
- Checkbox is {isOpen ? 'open' : 'closed'}. - - - Click me to show/hide content - - -

tabindex="0" attribute is necessary to make the div focusable

-
-
-
; -}`,...(X=(V=C.parameters)==null?void 0:V.docs)==null?void 0:X.source}}};const ce=["Default","Checkbox","WithBorderAndBackground","WithArrow","WithPlusMinus","ForceOpen","ForceClose","CustomColorsWithFocus","CustomColorsWithFocusCheckbox","HandlingEvents","CheckboxEvents"];export{r as Checkbox,C as CheckboxEvents,m as CustomColorsWithFocus,u as CustomColorsWithFocusCheckbox,a as Default,d as ForceClose,p as ForceOpen,h as HandlingEvents,l as WithArrow,c as WithBorderAndBackground,i as WithPlusMinus,ce as __namedExportsOrder,re as default}; diff --git a/docs/assets/Collapse.stories-YQNnmDpW.js b/docs/assets/Collapse.stories-YQNnmDpW.js new file mode 100644 index 00000000..d3ebd47c --- /dev/null +++ b/docs/assets/Collapse.stories-YQNnmDpW.js @@ -0,0 +1,124 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{r as $}from"./iframe-DDnXVYpC.js";import{C as s}from"./index-BTzAqsfK.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";import"./CollapseContent-CGPqZTWi.js";const re={title:"Data Display/Collapse",component:s,args:{className:"bg-base-200"}},C=t=>e.jsxs(s,{...t,children:[e.jsx(s.Title,{className:"text-xl font-medium",children:"Focus me to see content"}),e.jsx(s.Content,{children:'tabindex="0" attribute is necessary to make the div focusable'})]}),a=C.bind({});a.args={};const n=t=>e.jsxs(s,{...t,children:[e.jsx(s.Title,{className:"text-xl font-medium",children:"Click me to show/hide content"}),e.jsx(s.Content,{children:"hello"})]});n.args={checkbox:!0};const r=C.bind({});r.args={className:"border border-base-300 bg-base-200"};const c=C.bind({});c.args={className:"border border-base-300 bg-base-200",icon:"arrow"};const l=C.bind({});l.args={className:"border border-base-300 bg-base-200",icon:"plus"};const i=t=>e.jsxs(s,{...t,children:[e.jsx(s.Title,{className:"text-xl font-medium",children:"I have collapse-open class"}),e.jsx(s.Content,{children:'tabindex="0" attribute is necessary to make the div focusable'})]});i.args={className:"border border-base-300 bg-base-200",open:!0};const p=t=>e.jsxs(s,{...t,children:[e.jsx(s.Title,{className:"text-xl font-medium",children:"I have collapse-close class"}),e.jsx(s.Content,{children:'tabindex="0" attribute is necessary to make the div focusable'})]});p.args={className:"border border-base-300 bg-base-200",open:!1};const d=t=>e.jsxs(s,{...t,className:"group",children:[e.jsx(s.Title,{className:"bg-primary text-primary-content group-focus:bg-secondary group-focus:text-secondary-content",children:"Focus me to see content"}),e.jsx(s.Content,{className:"bg-primary text-primary-content group-focus:bg-secondary group-focus:text-secondary-content",children:e.jsx("p",{children:'tabindex="0" attribute is necessary to make the div focusable'})})]}),m=t=>e.jsxs(s,{...t,className:"group",checkbox:!0,children:[e.jsx(s.Title,{className:"bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content",children:"Click me to show/hide content"}),e.jsx(s.Content,{className:"bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content",children:e.jsx("p",{children:'tabindex="0" attribute is necessary to make the div focusable'})})]}),u=t=>{const[g,o]=$.useState(!1),b=()=>{console.log("toggled!")},x=()=>{o(!0)},y=()=>{o(!1)};return e.jsxs("div",{children:[e.jsxs("span",{children:["Checkbox is ",g?"open":"closed","."]}),e.jsxs(s,{...t,className:"group",onClose:y,onOpen:x,onToggle:b,children:[e.jsx(s.Title,{className:"bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content",children:"Click me to show/hide content"}),e.jsx(s.Content,{className:"bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content",children:e.jsx("p",{children:'tabindex="0" attribute is necessary to make the div focusable'})})]})]})},h=t=>{const[g,o]=$.useState(!1),b=()=>{console.log("toggled!")},x=()=>{o(!0)},y=()=>{o(!1)};return e.jsxs("div",{children:[e.jsxs("span",{children:["Checkbox is ",g?"open":"closed","."]}),e.jsxs(s,{...t,className:"group",onClose:y,onOpen:x,onToggle:b,checkbox:!0,children:[e.jsx(s.Title,{className:"bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content",children:"Click me to show/hide content"}),e.jsx(s.Content,{className:"bg-primary text-primary-content peer-checked:bg-secondary peer-checked:text-secondary-content",children:e.jsx("p",{children:'tabindex="0" attribute is necessary to make the div focusable'})})]})]})};var k,f,N;a.parameters={...a.parameters,docs:{...(k=a.parameters)==null?void 0:k.docs,source:{originalSource:`args => { + return + + Focus me to see content + + + tabindex="0" attribute is necessary to make the div focusable + + ; +}`,...(N=(f=a.parameters)==null?void 0:f.docs)==null?void 0:N.source}}};var T,j,v;n.parameters={...n.parameters,docs:{...(T=n.parameters)==null?void 0:T.docs,source:{originalSource:`args => { + return + + Click me to show/hide content + + hello + ; +}`,...(v=(j=n.parameters)==null?void 0:j.docs)==null?void 0:v.source}}};var O,F,S;r.parameters={...r.parameters,docs:{...(O=r.parameters)==null?void 0:O.docs,source:{originalSource:`args => { + return + + Focus me to see content + + + tabindex="0" attribute is necessary to make the div focusable + + ; +}`,...(S=(F=r.parameters)==null?void 0:F.docs)==null?void 0:S.source}}};var I,w,W;c.parameters={...c.parameters,docs:{...(I=c.parameters)==null?void 0:I.docs,source:{originalSource:`args => { + return + + Focus me to see content + + + tabindex="0" attribute is necessary to make the div focusable + + ; +}`,...(W=(w=c.parameters)==null?void 0:w.docs)==null?void 0:W.source}}};var E,A,B;l.parameters={...l.parameters,docs:{...(E=l.parameters)==null?void 0:E.docs,source:{originalSource:`args => { + return + + Focus me to see content + + + tabindex="0" attribute is necessary to make the div focusable + + ; +}`,...(B=(A=l.parameters)==null?void 0:A.docs)==null?void 0:B.source}}};var D,_,H;i.parameters={...i.parameters,docs:{...(D=i.parameters)==null?void 0:D.docs,source:{originalSource:`args => { + return + + I have collapse-open class + + + tabindex="0" attribute is necessary to make the div focusable + + ; +}`,...(H=(_=i.parameters)==null?void 0:_.docs)==null?void 0:H.source}}};var M,P,R;p.parameters={...p.parameters,docs:{...(M=p.parameters)==null?void 0:M.docs,source:{originalSource:`args => { + return + + I have collapse-close class + + + tabindex="0" attribute is necessary to make the div focusable + + ; +}`,...(R=(P=p.parameters)==null?void 0:P.docs)==null?void 0:R.source}}};var q,z,G;d.parameters={...d.parameters,docs:{...(q=d.parameters)==null?void 0:q.docs,source:{originalSource:`args => { + return + + Focus me to see content + + +

tabindex="0" attribute is necessary to make the div focusable

+
+
; +}`,...(G=(z=d.parameters)==null?void 0:z.docs)==null?void 0:G.source}}};var J,K,L;m.parameters={...m.parameters,docs:{...(J=m.parameters)==null?void 0:J.docs,source:{originalSource:`args => { + return + + Click me to show/hide content + + +

tabindex="0" attribute is necessary to make the div focusable

+
+
; +}`,...(L=(K=m.parameters)==null?void 0:K.docs)==null?void 0:L.source}}};var Q,U,V;u.parameters={...u.parameters,docs:{...(Q=u.parameters)==null?void 0:Q.docs,source:{originalSource:`args => { + const [isOpen, setIsOpen] = useState(false); + const handleToggle = () => { + console.log('toggled!'); + }; + const handleOpen = () => { + setIsOpen(true); + }; + const handleClose = () => { + setIsOpen(false); + }; + return
+ Checkbox is {isOpen ? 'open' : 'closed'}. + + + Click me to show/hide content + + +

tabindex="0" attribute is necessary to make the div focusable

+
+
+
; +}`,...(V=(U=u.parameters)==null?void 0:U.docs)==null?void 0:V.source}}};var X,Y,Z;h.parameters={...h.parameters,docs:{...(X=h.parameters)==null?void 0:X.docs,source:{originalSource:`args => { + const [isOpen, setIsOpen] = useState(false); + const handleToggle = () => { + console.log('toggled!'); + }; + const handleOpen = () => { + setIsOpen(true); + }; + const handleClose = () => { + setIsOpen(false); + }; + return
+ Checkbox is {isOpen ? 'open' : 'closed'}. + + + Click me to show/hide content + + +

tabindex="0" attribute is necessary to make the div focusable

+
+
+
; +}`,...(Z=(Y=h.parameters)==null?void 0:Y.docs)==null?void 0:Z.source}}};const ce=["Default","Checkbox","WithBorderAndBackground","WithArrow","WithPlusMinus","ForceOpen","ForceClose","CustomColorsWithFocus","CustomColorsWithFocusCheckbox","HandlingEvents","CheckboxEvents"];export{n as Checkbox,h as CheckboxEvents,d as CustomColorsWithFocus,m as CustomColorsWithFocusCheckbox,a as Default,p as ForceClose,i as ForceOpen,u as HandlingEvents,c as WithArrow,r as WithBorderAndBackground,l as WithPlusMinus,ce as __namedExportsOrder,re as default}; diff --git a/docs/assets/CollapseContent-4c7c3cf3.js b/docs/assets/CollapseContent-4c7c3cf3.js deleted file mode 100644 index 5ff69fa1..00000000 --- a/docs/assets/CollapseContent-4c7c3cf3.js +++ /dev/null @@ -1 +0,0 @@ -import{j as l,t as n}from"./tw-merge-4486aaf0.js";import{R as d}from"./index-f46741a2.js";const c=({className:e})=>n("collapse-title",e),s=({children:e,className:a,...t})=>l("div",{...t,className:c({className:a}),children:e}),o=d.forwardRef(({children:e,className:a},t)=>l("summary",{ref:t,className:c({className:a}),children:e})),_=s;try{o.displayName="Summary",o.__docgenInfo={description:"",displayName:"Summary",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}try{s.displayName="CollapseTitle",s.__docgenInfo={description:"",displayName:"CollapseTitle",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const r=({children:e,className:a,...t})=>{const p=n("collapse-content",a);return l("div",{...t,className:p,children:e})},u=r;try{r.displayName="CollapseContent",r.__docgenInfo={description:"",displayName:"CollapseContent",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}export{_ as C,o as S,u as a}; diff --git a/docs/assets/CollapseContent-CGPqZTWi.js b/docs/assets/CollapseContent-CGPqZTWi.js new file mode 100644 index 00000000..2102fea1 --- /dev/null +++ b/docs/assets/CollapseContent-CGPqZTWi.js @@ -0,0 +1 @@ +import{j as r}from"./jsx-runtime-BjG_zV1W.js";import{e as i}from"./iframe-DDnXVYpC.js";import{t as n}from"./bundle-mjs-yGZq-iow.js";const p=({className:e})=>n("collapse-title",e),s=({children:e,className:a,...t})=>r.jsx("div",{...t,className:p({className:a}),children:e}),o=i.forwardRef(({children:e,className:a},t)=>r.jsx("summary",{ref:t,className:p({className:a}),children:e}));try{o.displayName="Summary",o.__docgenInfo={description:"",displayName:"Summary",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}try{s.displayName="CollapseTitle",s.__docgenInfo={description:"",displayName:"CollapseTitle",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const l=({children:e,className:a,...t})=>{const c=n("collapse-content",a);return r.jsx("div",{...t,className:c,children:e})};try{l.displayName="CollapseContent",l.__docgenInfo={description:"",displayName:"CollapseContent",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}export{l as C,o as S,s as a}; diff --git a/docs/assets/CollapseDetails.stories-72a12026.js b/docs/assets/CollapseDetails.stories-72a12026.js deleted file mode 100644 index 25818024..00000000 --- a/docs/assets/CollapseDetails.stories-72a12026.js +++ /dev/null @@ -1,10 +0,0 @@ -import{a as r,j as s}from"./tw-merge-4486aaf0.js";import{C as t}from"./index-b2a88d73.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";import"./CollapseContent-4c7c3cf3.js";const D={title:"Data Display/Collapse/Details",component:t.Details},e=n=>r(t.Details,{...n,children:[s(t.Details.Title,{className:"text-xl font-medium",children:"Click to open/close"}),s(t.Content,{children:s("p",{children:"content"})})]});e.args={className:"bg-base-200"};var a,l,o;e.parameters={...e.parameters,docs:{...(a=e.parameters)==null?void 0:a.docs,source:{originalSource:`args => { - return - - Click to open/close - - -

content

-
-
; -}`,...(o=(l=e.parameters)==null?void 0:l.docs)==null?void 0:o.source}}};const d=["Default"];export{e as Default,d as __namedExportsOrder,D as default}; diff --git a/docs/assets/CollapseDetails.stories-awaFyz9Q.js b/docs/assets/CollapseDetails.stories-awaFyz9Q.js new file mode 100644 index 00000000..7e58109a --- /dev/null +++ b/docs/assets/CollapseDetails.stories-awaFyz9Q.js @@ -0,0 +1,10 @@ +import{j as t}from"./jsx-runtime-BjG_zV1W.js";import{C as s}from"./index-BTzAqsfK.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";import"./CollapseContent-CGPqZTWi.js";const D={title:"Data Display/Collapse/Details",component:s.Details},e=n=>t.jsxs(s.Details,{...n,children:[t.jsx(s.Details.Title,{className:"text-xl font-medium",children:"Click to open/close"}),t.jsx(s.Content,{children:t.jsx("p",{children:"content"})})]});e.args={className:"bg-base-200"};var l,a,o;e.parameters={...e.parameters,docs:{...(l=e.parameters)==null?void 0:l.docs,source:{originalSource:`args => { + return + + Click to open/close + + +

content

+
+
; +}`,...(o=(a=e.parameters)==null?void 0:a.docs)==null?void 0:o.source}}};const d=["Default"];export{e as Default,d as __namedExportsOrder,D as default}; diff --git a/docs/assets/Color-6VNJS4EI-afc89e58.js b/docs/assets/Color-6VNJS4EI-afc89e58.js deleted file mode 100644 index d5b050b0..00000000 --- a/docs/assets/Color-6VNJS4EI-afc89e58.js +++ /dev/null @@ -1 +0,0 @@ -import{n as M,d as ue,T as Me,F as Ce,I as $e,g as Ne}from"./index-7b8a467a.js";import{R as h,r as b,g as fe}from"./index-f46741a2.js";import{_ as Oe,i as J,a as Ie}from"./index-b7b0ffbb.js";import"./iframe-b74445e5.js";import"../sb-preview/runtime.js";import"./chunk-6E673XPF-4294b5bd.js";import"./index-d868a670.js";import"./index-356e4a49.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[c]=s*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=0/0,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{icon:"markup",onClick:k}):null)},fn=tn;export{tn as ColorControl,fn as default}; diff --git a/docs/assets/Color-AVL7NMMY-wuUqvwr3.js b/docs/assets/Color-AVL7NMMY-wuUqvwr3.js new file mode 100644 index 00000000..3cbc27af --- /dev/null +++ b/docs/assets/Color-AVL7NMMY-wuUqvwr3.js @@ -0,0 +1 @@ +import{d as ce,x as M,O as Y,g as he,G as fe,N as de,M as ge,_ as be,a as q}from"./blocks-Bs-ErNLf.js";import{r as p,e as v}from"./iframe-DDnXVYpC.js";import"./jsx-runtime-BjG_zV1W.js";import"./index-BMljdo4-.js";var ve=q({"../../node_modules/color-name/index.js"(r,l){l.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}}),J=q({"../../node_modules/color-convert/conversions.js"(r,l){var s=ve(),h={};for(let e of Object.keys(s))h[s[e]]=e;var u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};l.exports=u;for(let e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:n,labels:t}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:n}),Object.defineProperty(u[e],"labels",{value:t})}u.rgb.hsl=function(e){let n=e[0]/255,t=e[1]/255,a=e[2]/255,o=Math.min(n,t,a),i=Math.max(n,t,a),c=i-o,f,g;i===o?f=0:n===i?f=(t-a)/c:t===i?f=2+(a-n)/c:a===i&&(f=4+(n-t)/c),f=Math.min(f*60,360),f<0&&(f+=360);let b=(o+i)/2;return i===o?g=0:b<=.5?g=c/(i+o):g=c/(2-i-o),[f,g*100,b*100]},u.rgb.hsv=function(e){let n,t,a,o,i,c=e[0]/255,f=e[1]/255,g=e[2]/255,b=Math.max(c,f,g),y=b-Math.min(c,f,g),m=function(k){return(b-k)/6/y+1/2};return y===0?(o=0,i=0):(i=y/b,n=m(c),t=m(f),a=m(g),c===b?o=a-t:f===b?o=1/3+n-a:g===b&&(o=2/3+t-n),o<0?o+=1:o>1&&(o-=1)),[o*360,i*100,b*100]},u.rgb.hwb=function(e){let n=e[0],t=e[1],a=e[2],o=u.rgb.hsl(e)[0],i=1/255*Math.min(n,Math.min(t,a));return a=1-1/255*Math.max(n,Math.max(t,a)),[o,i*100,a*100]},u.rgb.cmyk=function(e){let n=e[0]/255,t=e[1]/255,a=e[2]/255,o=Math.min(1-n,1-t,1-a),i=(1-n-o)/(1-o)||0,c=(1-t-o)/(1-o)||0,f=(1-a-o)/(1-o)||0;return[i*100,c*100,f*100,o*100]};function d(e,n){return(e[0]-n[0])**2+(e[1]-n[1])**2+(e[2]-n[2])**2}u.rgb.keyword=function(e){let n=h[e];if(n)return n;let t=1/0,a;for(let o of Object.keys(s)){let i=s[o],c=d(e,i);c.04045?((n+.055)/1.055)**2.4:n/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;let o=n*.4124+t*.3576+a*.1805,i=n*.2126+t*.7152+a*.0722,c=n*.0193+t*.1192+a*.9505;return[o*100,i*100,c*100]},u.rgb.lab=function(e){let n=u.rgb.xyz(e),t=n[0],a=n[1],o=n[2];t/=95.047,a/=100,o/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;let i=116*a-16,c=500*(t-a),f=200*(a-o);return[i,c,f]},u.hsl.rgb=function(e){let n=e[0]/360,t=e[1]/100,a=e[2]/100,o,i,c;if(t===0)return c=a*255,[c,c,c];a<.5?o=a*(1+t):o=a+t-a*t;let f=2*a-o,g=[0,0,0];for(let b=0;b<3;b++)i=n+1/3*-(b-1),i<0&&i++,i>1&&i--,6*i<1?c=f+(o-f)*6*i:2*i<1?c=o:3*i<2?c=f+(o-f)*(2/3-i)*6:c=f,g[b]=c*255;return g},u.hsl.hsv=function(e){let n=e[0],t=e[1]/100,a=e[2]/100,o=t,i=Math.max(a,.01);a*=2,t*=a<=1?a:2-a,o*=i<=1?i:2-i;let c=(a+t)/2,f=a===0?2*o/(i+o):2*t/(a+t);return[n,f*100,c*100]},u.hsv.rgb=function(e){let n=e[0]/60,t=e[1]/100,a=e[2]/100,o=Math.floor(n)%6,i=n-Math.floor(n),c=255*a*(1-t),f=255*a*(1-t*i),g=255*a*(1-t*(1-i));switch(a*=255,o){case 0:return[a,g,c];case 1:return[f,a,c];case 2:return[c,a,g];case 3:return[c,f,a];case 4:return[g,c,a];case 5:return[a,c,f]}},u.hsv.hsl=function(e){let n=e[0],t=e[1]/100,a=e[2]/100,o=Math.max(a,.01),i,c;c=(2-t)*a;let f=(2-t)*o;return i=t*o,i/=f<=1?f:2-f,i=i||0,c/=2,[n,i*100,c*100]},u.hwb.rgb=function(e){let n=e[0]/360,t=e[1]/100,a=e[2]/100,o=t+a,i;o>1&&(t/=o,a/=o);let c=Math.floor(6*n),f=1-a;i=6*n-c,c&1&&(i=1-i);let g=t+i*(f-t),b,y,m;switch(c){default:case 6:case 0:b=f,y=g,m=t;break;case 1:b=g,y=f,m=t;break;case 2:b=t,y=f,m=g;break;case 3:b=t,y=g,m=f;break;case 4:b=g,y=t,m=f;break;case 5:b=f,y=t,m=g;break}return[b*255,y*255,m*255]},u.cmyk.rgb=function(e){let n=e[0]/100,t=e[1]/100,a=e[2]/100,o=e[3]/100,i=1-Math.min(1,n*(1-o)+o),c=1-Math.min(1,t*(1-o)+o),f=1-Math.min(1,a*(1-o)+o);return[i*255,c*255,f*255]},u.xyz.rgb=function(e){let n=e[0]/100,t=e[1]/100,a=e[2]/100,o,i,c;return o=n*3.2406+t*-1.5372+a*-.4986,i=n*-.9689+t*1.8758+a*.0415,c=n*.0557+t*-.204+a*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,c=c>.0031308?1.055*c**(1/2.4)-.055:c*12.92,o=Math.min(Math.max(0,o),1),i=Math.min(Math.max(0,i),1),c=Math.min(Math.max(0,c),1),[o*255,i*255,c*255]},u.xyz.lab=function(e){let n=e[0],t=e[1],a=e[2];n/=95.047,t/=100,a/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;let o=116*t-16,i=500*(n-t),c=200*(t-a);return[o,i,c]},u.lab.xyz=function(e){let n=e[0],t=e[1],a=e[2],o,i,c;i=(n+16)/116,o=t/500+i,c=i-a/200;let f=i**3,g=o**3,b=c**3;return i=f>.008856?f:(i-16/116)/7.787,o=g>.008856?g:(o-16/116)/7.787,c=b>.008856?b:(c-16/116)/7.787,o*=95.047,i*=100,c*=108.883,[o,i,c]},u.lab.lch=function(e){let n=e[0],t=e[1],a=e[2],o;o=Math.atan2(a,t)*360/2/Math.PI,o<0&&(o+=360);let i=Math.sqrt(t*t+a*a);return[n,i,o]},u.lch.lab=function(e){let n=e[0],t=e[1],a=e[2]/360*2*Math.PI,o=t*Math.cos(a),i=t*Math.sin(a);return[n,o,i]},u.rgb.ansi16=function(e,n=null){let[t,a,o]=e,i=n===null?u.rgb.hsv(e)[2]:n;if(i=Math.round(i/50),i===0)return 30;let c=30+(Math.round(o/255)<<2|Math.round(a/255)<<1|Math.round(t/255));return i===2&&(c+=60),c},u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])},u.rgb.ansi256=function(e){let n=e[0],t=e[1],a=e[2];return n===t&&t===a?n<8?16:n>248?231:Math.round((n-8)/247*24)+232:16+36*Math.round(n/255*5)+6*Math.round(t/255*5)+Math.round(a/255*5)},u.ansi16.rgb=function(e){let n=e%10;if(n===0||n===7)return e>50&&(n+=3.5),n=n/10.5*255,[n,n,n];let t=(~~(e>50)+1)*.5,a=(n&1)*t*255,o=(n>>1&1)*t*255,i=(n>>2&1)*t*255;return[a,o,i]},u.ansi256.rgb=function(e){if(e>=232){let i=(e-232)*10+8;return[i,i,i]}e-=16;let n,t=Math.floor(e/36)/5*255,a=Math.floor((n=e%36)/6)/5*255,o=n%6/5*255;return[t,a,o]},u.rgb.hex=function(e){let n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n},u.hex.rgb=function(e){let n=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!n)return[0,0,0];let t=n[0];n[0].length===3&&(t=t.split("").map(f=>f+f).join(""));let a=parseInt(t,16),o=a>>16&255,i=a>>8&255,c=a&255;return[o,i,c]},u.rgb.hcg=function(e){let n=e[0]/255,t=e[1]/255,a=e[2]/255,o=Math.max(Math.max(n,t),a),i=Math.min(Math.min(n,t),a),c=o-i,f,g;return c<1?f=i/(1-c):f=0,c<=0?g=0:o===n?g=(t-a)/c%6:o===t?g=2+(a-n)/c:g=4+(n-t)/c,g/=6,g%=1,[g*360,c*100,f*100]},u.hsl.hcg=function(e){let n=e[1]/100,t=e[2]/100,a=t<.5?2*n*t:2*n*(1-t),o=0;return a<1&&(o=(t-.5*a)/(1-a)),[e[0],a*100,o*100]},u.hsv.hcg=function(e){let n=e[1]/100,t=e[2]/100,a=n*t,o=0;return a<1&&(o=(t-a)/(1-a)),[e[0],a*100,o*100]},u.hcg.rgb=function(e){let n=e[0]/360,t=e[1]/100,a=e[2]/100;if(t===0)return[a*255,a*255,a*255];let o=[0,0,0],i=n%1*6,c=i%1,f=1-c,g=0;switch(Math.floor(i)){case 0:o[0]=1,o[1]=c,o[2]=0;break;case 1:o[0]=f,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=c;break;case 3:o[0]=0,o[1]=f,o[2]=1;break;case 4:o[0]=c,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=f}return g=(1-t)*a,[(t*o[0]+g)*255,(t*o[1]+g)*255,(t*o[2]+g)*255]},u.hcg.hsv=function(e){let n=e[1]/100,t=e[2]/100,a=n+t*(1-n),o=0;return a>0&&(o=n/a),[e[0],o*100,a*100]},u.hcg.hsl=function(e){let n=e[1]/100,t=e[2]/100*(1-n)+.5*n,a=0;return t>0&&t<.5?a=n/(2*t):t>=.5&&t<1&&(a=n/(2*(1-t))),[e[0],a*100,t*100]},u.hcg.hwb=function(e){let n=e[1]/100,t=e[2]/100,a=n+t*(1-n);return[e[0],(a-n)*100,(1-a)*100]},u.hwb.hcg=function(e){let n=e[1]/100,t=1-e[2]/100,a=t-n,o=0;return a<1&&(o=(t-a)/(1-a)),[e[0],a*100,o*100]},u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},u.gray.hsl=function(e){return[0,0,e[0]]},u.gray.hsv=u.gray.hsl,u.gray.hwb=function(e){return[0,100,e[0]]},u.gray.cmyk=function(e){return[0,0,0,e[0]]},u.gray.lab=function(e){return[e[0],0,0]},u.gray.hex=function(e){let n=Math.round(e[0]/100*255)&255,t=((n<<16)+(n<<8)+n).toString(16).toUpperCase();return"000000".substring(t.length)+t},u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}}),me=q({"../../node_modules/color-convert/route.js"(r,l){var s=J();function h(){let n={},t=Object.keys(s);for(let a=t.length,o=0;o1&&(o=i),t(o))};return"conversion"in t&&(a.conversion=t.conversion),a}function n(t){let a=function(...o){let i=o[0];if(i==null)return i;i.length>1&&(o=i);let c=t(o);if(typeof c=="object")for(let f=c.length,g=0;g{u[t]={},Object.defineProperty(u[t],"channels",{value:s[t].channels}),Object.defineProperty(u[t],"labels",{value:s[t].labels});let a=h(t);Object.keys(a).forEach(o=>{let i=a[o];u[t][o]=n(i),u[t][o].raw=e(i)})}),l.exports=u}}),_=be(pe());function C(){return(C=Object.assign||function(r){for(var l=1;l=0||(u[s]=r[s]);return u}function L(r){var l=p.useRef(r),s=p.useRef(function(h){l.current&&l.current(h)});return l.current=r,s.current}var $=function(r,l,s){return l===void 0&&(l=0),s===void 0&&(s=1),r>s?s:r0:y.buttons>0)&&u.current?d(T(u.current,y,n.current)):b(!1)},g=function(){return b(!1)};function b(y){var m=t.current,k=B(u.current),E=y?k.addEventListener:k.removeEventListener;E(m?"touchmove":"mousemove",f),E(m?"touchend":"mouseup",g)}return[function(y){var m=y.nativeEvent,k=u.current;if(k&&(W(m),!function(x,j){return j&&!N(x)}(m,t.current)&&k)){if(N(m)){t.current=!0;var E=m.changedTouches||[];E.length&&(n.current=E[0].identifier)}k.focus(),d(T(k,m,n.current)),b(!0)}},function(y){var m=y.which||y.keyCode;m<37||m>40||(y.preventDefault(),e({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},b]},[e,d]),o=a[0],i=a[1],c=a[2];return p.useEffect(function(){return c},[c]),v.createElement("div",C({},h,{onTouchStart:o,onMouseDown:o,className:"react-colorful__interactive",ref:u,onKeyDown:i,tabIndex:0,role:"slider"}))}),S=function(r){return r.filter(Boolean).join(" ")},F=function(r){var l=r.color,s=r.left,h=r.top,u=h===void 0?.5:h,d=S(["react-colorful__pointer",r.className]);return v.createElement("div",{className:d,style:{top:100*u+"%",left:100*s+"%"}},v.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:l}}))},w=function(r,l,s){return l===void 0&&(l=0),s===void 0&&(s=Math.pow(10,l)),Math.round(s*r)/s},ye={grad:.9,turn:360,rad:360/(2*Math.PI)},xe=function(r){return ee(K(r))},K=function(r){return r[0]==="#"&&(r=r.substring(1)),r.length<6?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:r.length===4?w(parseInt(r[3]+r[3],16)/255,2):1}:{r:parseInt(r.substring(0,2),16),g:parseInt(r.substring(2,4),16),b:parseInt(r.substring(4,6),16),a:r.length===8?w(parseInt(r.substring(6,8),16)/255,2):1}},we=function(r,l){return l===void 0&&(l="deg"),Number(r)*(ye[l]||1)},ke=function(r){var l=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(r);return l?_e({h:we(l[1],l[2]),s:Number(l[3]),l:Number(l[4]),a:l[5]===void 0?1:Number(l[5])/(l[6]?100:1)}):{h:0,s:0,v:0,a:1}},_e=function(r){var l=r.s,s=r.l;return{h:r.h,s:(l*=(s<50?s:100-s)/100)>0?2*l/(s+l)*100:0,v:s+l,a:r.a}},Ee=function(r){return Ce(Z(r))},Q=function(r){var l=r.s,s=r.v,h=r.a,u=(200-l)*s/100;return{h:w(r.h),s:w(u>0&&u<200?l*s/100/(u<=100?u:200-u)*100:0),l:w(u/2),a:w(h,2)}},X=function(r){var l=Q(r);return"hsl("+l.h+", "+l.s+"%, "+l.l+"%)"},H=function(r){var l=Q(r);return"hsla("+l.h+", "+l.s+"%, "+l.l+"%, "+l.a+")"},Z=function(r){var l=r.h,s=r.s,h=r.v,u=r.a;l=l/360*6,s/=100,h/=100;var d=Math.floor(l),e=h*(1-s),n=h*(1-(l-d)*s),t=h*(1-(1-l+d)*s),a=d%6;return{r:w(255*[h,n,e,e,t,h][a]),g:w(255*[t,h,h,n,e,e][a]),b:w(255*[e,e,t,h,h,n][a]),a:w(u,2)}},Me=function(r){var l=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(r);return l?ee({r:Number(l[1])/(l[2]?100/255:1),g:Number(l[3])/(l[4]?100/255:1),b:Number(l[5])/(l[6]?100/255:1),a:l[7]===void 0?1:Number(l[7])/(l[8]?100:1)}):{h:0,s:0,v:0,a:1}},R=function(r){var l=r.toString(16);return l.length<2?"0"+l:l},Ce=function(r){var l=r.r,s=r.g,h=r.b,u=r.a,d=u<1?R(w(255*u)):"";return"#"+R(l)+R(s)+R(h)+d},ee=function(r){var l=r.r,s=r.g,h=r.b,u=r.a,d=Math.max(l,s,h),e=d-Math.min(l,s,h),n=e?d===l?(s-h)/e:d===s?2+(h-l)/e:4+(l-s)/e:0;return{h:w(60*(n<0?n+6:n)),s:w(d?e/d*100:0),v:w(d/255*100),a:u}},re=v.memo(function(r){var l=r.hue,s=r.onChange,h=S(["react-colorful__hue",r.className]);return v.createElement("div",{className:h},v.createElement(D,{onMove:function(u){s({h:360*u.left})},onKey:function(u){s({h:$(l+360*u.left,0,360)})},"aria-label":"Hue","aria-valuenow":w(l),"aria-valuemax":"360","aria-valuemin":"0"},v.createElement(F,{className:"react-colorful__hue-pointer",left:l/360,color:X({h:l,s:100,v:100,a:1})})))}),te=v.memo(function(r){var l=r.hsva,s=r.onChange,h={backgroundColor:X({h:l.h,s:100,v:100,a:1})};return v.createElement("div",{className:"react-colorful__saturation",style:h},v.createElement(D,{onMove:function(u){s({s:100*u.left,v:100-100*u.top})},onKey:function(u){s({s:$(l.s+100*u.left,0,100),v:$(l.v-100*u.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+w(l.s)+"%, Brightness "+w(l.v)+"%"},v.createElement(F,{className:"react-colorful__saturation-pointer",top:1-l.v/100,left:l.s/100,color:X(l)})))}),ne=function(r,l){if(r===l)return!0;for(var s in r)if(r[s]!==l[s])return!1;return!0},ae=function(r,l){return r.replace(/\s/g,"")===l.replace(/\s/g,"")},Oe=function(r,l){return r.toLowerCase()===l.toLowerCase()||ne(K(r),K(l))};function le(r,l,s){var h=L(s),u=p.useState(function(){return r.toHsva(l)}),d=u[0],e=u[1],n=p.useRef({color:l,hsva:d});p.useEffect(function(){if(!r.equal(l,n.current.color)){var a=r.toHsva(l);n.current={hsva:a,color:l},e(a)}},[l,r]),p.useEffect(function(){var a;ne(d,n.current.hsva)||r.equal(a=r.fromHsva(d),n.current.color)||(n.current={hsva:d,color:a},h(a))},[d,r,h]);var t=p.useCallback(function(a){e(function(o){return Object.assign({},o,a)})},[]);return[d,t]}var $e=typeof window<"u"?p.useLayoutEffect:p.useEffect,Ne=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},A=new Map,oe=function(r){$e(function(){var l=r.current?r.current.ownerDocument:document;if(l!==void 0&&!A.has(l)){var s=l.createElement("style");s.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,A.set(l,s);var h=Ne();h&&s.setAttribute("nonce",h),l.head.appendChild(s)}},[])},Se=function(r){var l=r.className,s=r.colorModel,h=r.color,u=h===void 0?s.defaultColor:h,d=r.onChange,e=V(r,["className","colorModel","color","onChange"]),n=p.useRef(null);oe(n);var t=le(s,u,d),a=t[0],o=t[1],i=S(["react-colorful",l]);return v.createElement("div",C({},e,{ref:n,className:i}),v.createElement(te,{hsva:a,onChange:o}),v.createElement(re,{hue:a.h,onChange:o,className:"react-colorful__last-control"}))},je={defaultColor:"000",toHsva:xe,fromHsva:function(r){return Ee({h:r.h,s:r.s,v:r.v,a:1})},equal:Oe},Re=function(r){return v.createElement(Se,C({},r,{colorModel:je}))},ze=function(r){var l=r.className,s=r.hsva,h=r.onChange,u={backgroundImage:"linear-gradient(90deg, "+H(Object.assign({},s,{a:0}))+", "+H(Object.assign({},s,{a:1}))+")"},d=S(["react-colorful__alpha",l]),e=w(100*s.a);return v.createElement("div",{className:d},v.createElement("div",{className:"react-colorful__alpha-gradient",style:u}),v.createElement(D,{onMove:function(n){h({a:n.left})},onKey:function(n){h({a:$(s.a+n.left)})},"aria-label":"Alpha","aria-valuetext":e+"%","aria-valuenow":e,"aria-valuemin":"0","aria-valuemax":"100"},v.createElement(F,{className:"react-colorful__alpha-pointer",left:s.a,color:H(s)})))},ue=function(r){var l=r.className,s=r.colorModel,h=r.color,u=h===void 0?s.defaultColor:h,d=r.onChange,e=V(r,["className","colorModel","color","onChange"]),n=p.useRef(null);oe(n);var t=le(s,u,d),a=t[0],o=t[1],i=S(["react-colorful",l]);return v.createElement("div",C({},e,{ref:n,className:i}),v.createElement(te,{hsva:a,onChange:o}),v.createElement(re,{hue:a.h,onChange:o}),v.createElement(ze,{hsva:a,onChange:o,className:"react-colorful__last-control"}))},He={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:ke,fromHsva:H,equal:ae},Ie=function(r){return v.createElement(ue,C({},r,{colorModel:He}))},qe={defaultColor:"rgba(0, 0, 0, 1)",toHsva:Me,fromHsva:function(r){var l=Z(r);return"rgba("+l.r+", "+l.g+", "+l.b+", "+l.a+")"},equal:ae},Pe=function(r){return v.createElement(ue,C({},r,{colorModel:qe}))},Le=M.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),Be=M(Y)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),Ke=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Xe=M(fe)(({theme:r})=>({fontFamily:r.typography.fonts.base})),Ge=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Ve=M.div(({theme:r,active:l})=>({width:16,height:16,boxShadow:l?`${r.appBorderColor} 0 0 0 1px inset, ${r.textMutedColor}50 0 0 0 4px`:`${r.appBorderColor} 0 0 0 1px inset`,borderRadius:r.appBorderRadius})),De=`url('data:image/svg+xml;charset=utf-8,')`,U=({value:r,style:l,...s})=>{let h=`linear-gradient(${r}, ${r}), ${De}, linear-gradient(#fff, #fff)`;return v.createElement(Ve,{...s,style:{...l,backgroundImage:h}})},Fe=M(de.Input)(({theme:r,readOnly:l})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:r.typography.fonts.base})),Te=M(ge)(({theme:r})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:r.input.color})),ie=(r=>(r.RGB="rgb",r.HSL="hsl",r.HEX="hex",r))(ie||{}),P=Object.values(ie),We=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Ae=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ue=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,G=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Ye=/^\s*#?([0-9a-f]{3})\s*$/i,Je={hex:Re,rgb:Pe,hsl:Ie},z={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},se=r=>{let l=r==null?void 0:r.match(We);if(!l)return[0,0,0,1];let[,s,h,u,d=1]=l;return[s,h,u,d].map(Number)},Qe=r=>{let[l,s,h,u]=se(r),[d,e,n]=_.default.rgb.hsl([l,s,h])||[0,0,0];return{valid:!0,value:r,keyword:_.default.rgb.keyword([l,s,h]),colorSpace:"rgb",rgb:r,hsl:`hsla(${d}, ${e}%, ${n}%, ${u})`,hex:`#${_.default.rgb.hex([l,s,h]).toLowerCase()}`}},Ze=r=>{let[l,s,h,u]=se(r),[d,e,n]=_.default.hsl.rgb([l,s,h])||[0,0,0];return{valid:!0,value:r,keyword:_.default.hsl.keyword([l,s,h]),colorSpace:"hsl",rgb:`rgba(${d}, ${e}, ${n}, ${u})`,hsl:r,hex:`#${_.default.hsl.hex([l,s,h]).toLowerCase()}`}},er=r=>{let l=r.replace("#",""),s=_.default.keyword.rgb(l)||_.default.hex.rgb(l),h=_.default.rgb.hsl(s),u=r;/[^#a-f0-9]/i.test(r)?u=l:G.test(r)&&(u=`#${l}`);let d=!0;if(u.startsWith("#"))d=G.test(u);else try{_.default.keyword.hex(u)}catch{d=!1}return{valid:d,value:u,keyword:_.default.rgb.keyword(s),colorSpace:"hex",rgb:`rgba(${s[0]}, ${s[1]}, ${s[2]}, 1)`,hsl:`hsla(${h[0]}, ${h[1]}%, ${h[2]}%, 1)`,hex:u}},O=r=>{if(r)return Ae.test(r)?Qe(r):Ue.test(r)?Ze(r):er(r)},rr=(r,l,s)=>{if(!r||!(l!=null&&l.valid))return z[s];if(s!=="hex")return(l==null?void 0:l[s])||z[s];if(!l.hex.startsWith("#"))try{return`#${_.default.keyword.hex(l.hex)}`}catch{return z.hex}let h=l.hex.match(Ye);if(!h)return G.test(l.hex)?l.hex:z.hex;let[u,d,e]=h[1].split("");return`#${u}${u}${d}${d}${e}${e}`},tr=(r,l)=>{let[s,h]=p.useState(r||""),[u,d]=p.useState(()=>O(s)),[e,n]=p.useState((u==null?void 0:u.colorSpace)||"hex");p.useEffect(()=>{let i=r||"",c=O(i);h(i),d(c),n((c==null?void 0:c.colorSpace)||"hex")},[r]);let t=p.useMemo(()=>rr(s,u,e).toLowerCase(),[s,u,e]),a=p.useCallback(i=>{let c=O(i),f=(c==null?void 0:c.value)||i||"";h(f),f===""&&(d(void 0),l(void 0)),c&&(d(c),n(c.colorSpace),l(c.value))},[l]),o=p.useCallback(()=>{let i=(P.indexOf(e)+1)%P.length,c=P[i];n(c);let f=(u==null?void 0:u[c])||"";h(f),l(f)},[u,e,l]);return{value:s,realValue:t,updateValue:a,color:u,colorSpace:e,cycleColorSpace:o}},I=r=>r.replace(/\s*/,"").toLowerCase(),nr=(r,l,s)=>{let[h,u]=p.useState(l!=null&&l.valid?[l]:[]);p.useEffect(()=>{l===void 0&&u([])},[l]);let d=p.useMemo(()=>(r||[]).map(n=>typeof n=="string"?O(n):n.title?{...O(n.color),keyword:n.title}:O(n.color)).concat(h).filter(Boolean).slice(-27),[r,h]),e=p.useCallback(n=>{n!=null&&n.valid&&(d.some(t=>t&&t[s]&&I(t[s]||"")===I(n[s]||""))||u(t=>t.concat(n)))},[s,d]);return{presets:d,addPreset:e}},ar=({name:r,value:l,onChange:s,onFocus:h,onBlur:u,presetColors:d,startOpen:e=!1,argType:n})=>{var E;let t=p.useCallback(ce(s,200),[s]),{value:a,realValue:o,updateValue:i,color:c,colorSpace:f,cycleColorSpace:g}=tr(l,t),{presets:b,addPreset:y}=nr(d??[],c,f),m=Je[f],k=!!((E=n==null?void 0:n.table)!=null&&E.readonly);return v.createElement(Le,{"aria-readonly":k},v.createElement(Be,{startOpen:e,trigger:k?null:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>c&&y(c),tooltip:v.createElement(Ke,null,v.createElement(m,{color:o==="transparent"?"#000000":o,onChange:i,onFocus:h,onBlur:u}),b.length>0&&v.createElement(Ge,null,b.map((x,j)=>v.createElement(Y,{key:`${(x==null?void 0:x.value)||j}-${j}`,hasChrome:!1,tooltip:v.createElement(Xe,{note:(x==null?void 0:x.keyword)||(x==null?void 0:x.value)||""})},v.createElement(U,{value:(x==null?void 0:x[f])||"",active:!!(c&&x&&x[f]&&I(x[f]||"")===I(c[f])),onClick:()=>x&&i(x.value||"")})))))},v.createElement(U,{value:o,style:{margin:4}})),v.createElement(Fe,{id:he(r),value:a,onChange:x=>i(x.target.value),onFocus:x=>x.target.select(),readOnly:k,placeholder:"Choose color..."}),a?v.createElement(Te,{onClick:g}):null)},sr=ar;export{ar as ColorControl,sr as default}; diff --git a/docs/assets/Configure-B5q04VJl.js b/docs/assets/Configure-B5q04VJl.js new file mode 100644 index 00000000..642379b3 --- /dev/null +++ b/docs/assets/Configure-B5q04VJl.js @@ -0,0 +1,165 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{useMDXComponents as r}from"./index-DEzYFtvv.js";import{b as a}from"./blocks-Bs-ErNLf.js";import"./iframe-DDnXVYpC.js";import"./index-BMljdo4-.js";const n="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23161614'%20d='M16.0001%200C7.16466%200%200%207.17472%200%2016.0256C0%2023.1061%204.58452%2029.1131%2010.9419%2031.2322C11.7415%2031.3805%2012.0351%2030.8845%2012.0351%2030.4613C12.0351%2030.0791%2012.0202%2028.8167%2012.0133%2027.4776C7.56209%2028.447%206.62283%2025.5868%206.62283%2025.5868C5.89499%2023.7345%204.8463%2023.2419%204.8463%2023.2419C3.39461%2022.2473%204.95573%2022.2678%204.95573%2022.2678C6.56242%2022.3808%207.40842%2023.9192%207.40842%2023.9192C8.83547%2026.3691%2011.1514%2025.6609%2012.0645%2025.2514C12.2081%2024.2156%2012.6227%2023.5087%2013.0803%2023.1085C9.52648%2022.7032%205.7906%2021.3291%205.7906%2015.1886C5.7906%2013.4389%206.41563%2012.0094%207.43916%2010.8871C7.27303%2010.4834%206.72537%208.85349%207.59415%206.64609C7.59415%206.64609%208.93774%206.21539%2011.9953%208.28877C13.2716%207.9337%2014.6404%207.75563%2016.0001%207.74953C17.3599%207.75563%2018.7297%207.9337%2020.0084%208.28877C23.0623%206.21539%2024.404%206.64609%2024.404%206.64609C25.2749%208.85349%2024.727%2010.4834%2024.5608%2010.8871C25.5868%2012.0094%2026.2075%2013.4389%2026.2075%2015.1886C26.2075%2021.3437%2022.4645%2022.699%2018.9017%2023.0957C19.4756%2023.593%2019.9869%2024.5683%2019.9869%2026.0634C19.9869%2028.2077%2019.9684%2029.9334%2019.9684%2030.4613C19.9684%2030.8877%2020.2564%2031.3874%2021.0674%2031.2301C27.4213%2029.1086%2032%2023.1037%2032%2016.0256C32%207.17472%2024.8364%200%2016.0001%200ZM5.99257%2022.8288C5.95733%2022.9084%205.83227%2022.9322%205.71834%2022.8776C5.60229%2022.8253%205.53711%2022.7168%205.57474%2022.6369C5.60918%2022.5549%205.7345%2022.5321%205.85029%2022.587C5.9666%2022.6393%206.03284%2022.7489%205.99257%2022.8288ZM6.7796%2023.5321C6.70329%2023.603%206.55412%2023.5701%206.45291%2023.4581C6.34825%2023.3464%206.32864%2023.197%206.40601%2023.125C6.4847%2023.0542%206.62937%2023.0874%206.73429%2023.1991C6.83895%2023.3121%206.85935%2023.4605%206.7796%2023.5321ZM7.31953%2024.4321C7.2215%2024.5003%207.0612%2024.4363%206.96211%2024.2938C6.86407%2024.1513%206.86407%2023.9804%206.96422%2023.9119C7.06358%2023.8435%207.2215%2023.905%207.32191%2024.0465C7.41968%2024.1914%207.41968%2024.3623%207.31953%2024.4321ZM8.23267%2025.4743C8.14497%2025.5712%207.95818%2025.5452%207.82146%2025.413C7.68156%2025.2838%207.64261%2025.1004%207.73058%2025.0035C7.81934%2024.9064%208.00719%2024.9337%208.14497%2025.0648C8.28381%2025.1938%208.3262%2025.3785%208.23267%2025.4743ZM9.41281%2025.8262C9.37413%2025.9517%209.19423%2026.0088%209.013%2025.9554C8.83203%2025.9005%208.7136%2025.7535%208.75016%2025.6266C8.78778%2025.5003%208.96848%2025.4408%209.15104%2025.4979C9.33174%2025.5526%209.45044%2025.6985%209.41281%2025.8262ZM10.7559%2025.9754C10.7604%2026.1076%2010.6067%2026.2172%2010.4165%2026.2196C10.2252%2026.2238%2010.0704%2026.1169%2010.0683%2025.9868C10.0683%2025.8534%2010.2185%2025.7448%2010.4098%2025.7416C10.6001%2025.7379%2010.7559%2025.8441%2010.7559%2025.9754ZM12.0753%2025.9248C12.0981%2026.0537%2011.9658%2026.1862%2011.7769%2026.2215C11.5912%2026.2554%2011.4192%2026.1758%2011.3957%2026.0479C11.3726%2025.9157%2011.5072%2025.7833%2011.6927%2025.7491C11.8819%2025.7162%2012.0512%2025.7937%2012.0753%2025.9248Z'/%3e%3c/svg%3e",c="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='33'%20height='32'%20fill='none'%20viewBox='0%200%2033%2032'%3e%3cg%20clip-path='url(%23clip0_10031_177575)'%3e%3cmask%20id='mask0_10031_177575'%20style='mask-type:luminance'%20width='33'%20height='25'%20x='0'%20y='4'%20maskUnits='userSpaceOnUse'%3e%3cpath%20fill='%23fff'%20d='M32.5034%204.00195H0.503906V28.7758H32.5034V4.00195Z'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_10031_177575)'%3e%3cpath%20fill='%235865F2'%20d='M27.5928%206.20817C25.5533%205.27289%2023.3662%204.58382%2021.0794%204.18916C21.0378%204.18154%2020.9962%204.20057%2020.9747%204.23864C20.6935%204.73863%2020.3819%205.3909%2020.1637%205.90358C17.7042%205.53558%2015.2573%205.53558%2012.8481%205.90358C12.6299%205.37951%2012.307%204.73863%2012.0245%204.23864C12.003%204.20184%2011.9614%204.18281%2011.9198%204.18916C9.63431%204.58255%207.44721%205.27163%205.40641%206.20817C5.38874%206.21578%205.3736%206.22848%205.36355%206.24497C1.21508%2012.439%200.078646%2018.4809%200.636144%2024.4478C0.638667%2024.477%200.655064%2024.5049%200.677768%2024.5227C3.41481%2026.5315%206.06609%2027.7511%208.66815%2028.5594C8.70979%2028.5721%208.75392%2028.5569%208.78042%2028.5226C9.39594%2027.6826%209.94461%2026.7968%2010.4151%2025.8653C10.4428%2025.8107%2010.4163%2025.746%2010.3596%2025.7244C9.48927%2025.3945%208.66058%2024.9922%207.86343%2024.5354C7.80038%2024.4986%207.79533%2024.4084%207.85333%2024.3653C8.02108%2024.2397%208.18888%2024.109%208.34906%2023.977C8.37804%2023.9529%208.41842%2023.9478%208.45249%2023.963C13.6894%2026.3526%2019.359%2026.3526%2024.5341%2023.963C24.5682%2023.9465%2024.6086%2023.9516%2024.6388%2023.9757C24.799%2024.1077%2024.9668%2024.2397%2025.1358%2024.3653C25.1938%2024.4084%2025.19%2024.4986%2025.127%2024.5354C24.3298%2025.0011%2023.5011%2025.3945%2022.6296%2025.7232C22.5728%2025.7447%2022.5476%2025.8107%2022.5754%2025.8653C23.0559%2026.7955%2023.6046%2027.6812%2024.2087%2028.5213C24.234%2028.5569%2024.2794%2028.5721%2024.321%2028.5594C26.9357%2027.7511%2029.5869%2026.5315%2032.324%2024.5227C32.348%2024.5049%2032.3631%2024.4783%2032.3656%2024.4491C33.0328%2017.5506%2031.2481%2011.5584%2027.6344%206.24623C27.6256%206.22848%2027.6105%206.21578%2027.5928%206.20817ZM11.1971%2020.8146C9.62043%2020.8146%208.32129%2019.3679%208.32129%2017.5913C8.32129%2015.8146%209.59523%2014.368%2011.1971%2014.368C12.8115%2014.368%2014.0981%2015.8273%2014.0729%2017.5913C14.0729%2019.3679%2012.7989%2020.8146%2011.1971%2020.8146ZM21.8299%2020.8146C20.2533%2020.8146%2018.9541%2019.3679%2018.9541%2017.5913C18.9541%2015.8146%2020.228%2014.368%2021.8299%2014.368C23.4444%2014.368%2024.7309%2015.8273%2024.7057%2017.5913C24.7057%2019.3679%2023.4444%2020.8146%2021.8299%2020.8146Z'/%3e%3c/g%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_10031_177575'%3e%3crect%20width='32'%20height='32'%20fill='%23fff'%20transform='translate(0.5)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",l="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='32'%20height='32'%20fill='none'%20viewBox='0%200%2032%2032'%3e%3cpath%20fill='%23ED1D24'%20d='M31.3313%208.44657C30.9633%207.08998%2029.8791%206.02172%2028.5022%205.65916C26.0067%205.00026%2016%205.00026%2016%205.00026C16%205.00026%205.99333%205.00026%203.4978%205.65916C2.12102%206.02172%201.03665%207.08998%200.668678%208.44657C0%2010.9053%200%2016.0353%200%2016.0353C0%2016.0353%200%2021.1652%200.668678%2023.6242C1.03665%2024.9806%202.12102%2026.0489%203.4978%2026.4116C5.99333%2027.0703%2016%2027.0703%2016%2027.0703C16%2027.0703%2026.0067%2027.0703%2028.5022%2026.4116C29.8791%2026.0489%2030.9633%2024.9806%2031.3313%2023.6242C32%2021.1652%2032%2016.0353%2032%2016.0353C32%2016.0353%2032%2010.9053%2031.3313%208.44657Z'/%3e%3cpath%20fill='%23fff'%20d='M12.7266%2020.6934L21.0902%2016.036L12.7266%2011.3781V20.6934Z'/%3e%3c/svg%3e",d="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='33'%20height='32'%20fill='none'%20viewBox='0%200%2033%2032'%3e%3cg%20clip-path='url(%23clip0_10031_177597)'%3e%3cpath%20fill='%23B7F0EF'%20fill-rule='evenodd'%20d='M17%207.87059C17%206.48214%2017.9812%205.28722%2019.3431%205.01709L29.5249%202.99755C31.3238%202.64076%2033%204.01717%2033%205.85105V22.1344C33%2023.5229%2032.0188%2024.7178%2030.6569%2024.9879L20.4751%2027.0074C18.6762%2027.3642%2017%2025.9878%2017%2024.1539L17%207.87059Z'%20clip-rule='evenodd'%20opacity='.7'/%3e%3cpath%20fill='%2387E6E5'%20fill-rule='evenodd'%20d='M1%205.85245C1%204.01857%202.67623%202.64215%204.47507%202.99895L14.6569%205.01848C16.0188%205.28861%2017%206.48354%2017%207.87198V24.1553C17%2025.9892%2015.3238%2027.3656%2013.5249%2027.0088L3.34311%2024.9893C1.98119%2024.7192%201%2023.5242%201%2022.1358V5.85245Z'%20clip-rule='evenodd'/%3e%3cpath%20fill='%2361C1FD'%20fill-rule='evenodd'%20d='M15.543%205.71289C15.543%205.71289%2016.8157%205.96289%2017.4002%206.57653C17.9847%207.19016%2018.4521%209.03107%2018.4521%209.03107C18.4521%209.03107%2018.4521%2025.1106%2018.4521%2026.9629C18.4521%2028.8152%2019.3775%2031.4174%2019.3775%2031.4174L17.4002%2028.8947L16.2575%2031.4174C16.2575%2031.4174%2015.543%2029.0765%2015.543%2027.122C15.543%2025.1674%2015.543%205.71289%2015.543%205.71289Z'%20clip-rule='evenodd'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_10031_177597'%3e%3crect%20width='32'%20height='32'%20fill='%23fff'%20transform='translate(0.5)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",g=""+new URL("styling-Bk6zjRzU.png",import.meta.url).href,h=""+new URL("context-C0qIqeS4.png",import.meta.url).href,m="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkQAAAEECAMAAAD+jtuZAAAA1VBMVEUAAAC97a687K687K697K697a687a697K+87K6/76+87K7///831dPd9ddmvzyc24PE7riR1XWH0GdxxUru+utxxEr3/fXl+OHN9fTA7bNQ2tn7/vrm+vri99xE19Z8yllp396n4ZG07++o7ezz/Pz9/v2O6ObN8cKb6umC5eTf9tnZ9NHq+ebV883y/O/s+unJ8L7y/fzR8sex56Da9/dd3dtE2NZ24+GM027B8vFrwkO36qeW2HxrwkSm4ZGBzWB3yFHC7bTe9tas5Jih3orA8vJc3dy6weW4AAAACnRSTlMA3694YO/PkFAQwrWpKAAADgtJREFUeNrs2d1qg0AQQGGTNH+zCF4siixeBqHGIL5B3v+lGrbU3rQ0uhsGt+d7hsMww2TeebfdCDDLYfuWfTvtBVhgM2V0FGChXebtBFjsmD28CRDg9IiIjRpB9mcGEcLXoq0AQbbZQYAgm0yAQEQEIoI+IgIRQR8RgYigj4hARNBHRCAi6CMiEBH0ERGICPqICEQEfUQEIoI+IgIRQR8RgYigj4hARNBHRCCiZ9R9c7XWNmMhiO4fRFSPTWkmFRlFl3pEbW6NR0avk3JERWed+UFJRXGlGlHdV878xg2CiFKMqG6bm5kwi14uuYja3DrzJyuIJ6mIiu7qzHN6QTTJRFT3TWmeVwqiSSIivwTN1ApiWX9ErT/kZ6sEsaw7oqKrnFnGCWJZb0T+mxGAKz+adUZU+29GmE4QiWJE9b1YZPBLUDBbPNxrQTCtiIY+X+L9eruYOC75p34gpEA6EY2LAqqsMxFV+ZeRjIJoRDTk81W2NJHZfNLxkf1g196WEgeCAAzv9XQSTpEECXIMJxFUdEUX3FPVvv8jLUnEzWCsmnHSw7jT35UIxQ1/9TQJSvRHNHEldVbNGMrXdHPo2qMC/RFN5JcgJHOqqBzaI7qWWoKagChw8+hEU6A3otal+BIUAy7fzaPrRgr0RnQrvATha7ucW0Y+RnNELYElyG+DJnOXw8jHaI7oWmIJwrdwXdqtS6A5oiv3XUFyhum1dDn0a8cP0hzRu0vQMgb9Yvd/Wq3Xmwo7Db0RtaTuZuALXM7nvvvR8LxndhJ6I/opdTcD38rl/GSfmed5JxpFeiOqSi1B+Jou53P/Ts26iNK7GacXzymiEuiPKFuCDBFQRCXQHFG6BBnEp4hKoDOi6uXKhDMsr0kRlUBbRJOOUSPoYE4RqdMU0ZWRBe0FFJE6LRFVfTCVTxGp0xHRtaljaK9NEanTEFHV4IYAOhSRMuyITG8IVhSRMvyIAjDakiJShh5RFcwWU0TKkCMyfhABBBSRKuyIWmC6FUWkCjuiWzBdkyJShR1RB0wXzykiRdgRmXut+lVQekQVZM/sLYropPzSI/KQ1dlbFNFJtSkiRdgRLcB8c4pIDS3WAAuEiPoMS9e+iK7AfD5FpIYuNgK0KSJVXxgqs+/hZzoUkRL0iDqgXxRGIGNFESlBj2gCekXDhwvHcc4HIK6JH9Hv7eb72ZmXU2MFat4/T2fd79vj97EzohboMxrMzp2DMQiLkSNab568lFBEvEZ9zXLsjIj5oMUoHN87nCEICxAjysqQi4iXz8jSiH4BvnDYu3By0nn0dQSifMSIvnW9xO5HvbatHOzej+ipclDbdHfZwbZlB5ZGNAFc0XDGBzR+vIEw+dcARDURI/qRDpM+45y9H1GD5fXr/NiyNCLWBjSjx/G5k3MxG0SQmu0fzUDYHC2iTbLX/GYcwYgy67qXy8PWiBaAIF2CelxAveEdvBok5xkIC7AiqiQNrRlPOKLMNjnRXt7D1oguoXx3R0tQbxze8Ik5e3cgyseKqFHUkFxEWYldlrI1oiqUazQ4XoIGN/DGvdT3szZSRJXCT1YyouxMfGYJWyNibcQl6GEY5fOaTh9fHo+T+QTC5jgRNQqjkI7o2+4wiqyNKIByhNPjJSjkAptmA2qavVjuS/4CJaJ+8QcrHRGrHUaRtRFdgbroaAm6P16CYPTn9blR8jB5eQiiligR1YubkI0oG0UbtmdtRK2Sl6CLWdESNHNePcBeLx1KomKUiHbFH7h0ROlW9MT2rI2ILZXvZvBLUJEwy+vBSYQAMJVbijoIEfXTPwrIR/T8cp7ZG1Hn40sQ/0V+GgKPH0TnEUCULN7jQ1UjELVCiKiWjI8i8hGxl/PM3oj+sndHTWkDQQDHed67YAaZACGIxVJAUKlg1aLVtvb7f6UmzUBNe7F3m+PY9Pb30gfGmc70P9ziLc0Ev9KxE+dDUKmb7T3HWTYViVT24/dCV2Q/ouzf+wkUMBHd5a/4G1GvbzoEfYjVQ1C5eDtHd7PiROrWaB9kvIeInktSwUSU/cZpBeBvRGbrIN3S24x/vRNNC78gOstr0tWxHFH+5wsoYCLa5I14HNFc6JsWh6CPBj/2aSTEj91CWiJTidDVthrR83A4fC6bqzERZT9yPEx99jWiidB2Vljp0JfIzMmJ/J1ObHTzEdmMaGcFCqiIWv5+eTFncPMR50PQ9oM8or7dr4c+GK6D7CMiUEFF9OB9RAuh6V6mRgJjumsIuQ5iLaLWb6CCimjV2lG14kFEc5MSbgXO6FSmTruFdZCuwVAUghsaERnzIKLQJKKZwPrYXb+eo07N1kE4IrQGuBAJLcUjCA+1DjLgiHBcRTQQeopHEB5qHYQjwnEV0YXQoDiC8BDrIBwRjquIeogjqLpTs5sPjgirAU608UcQXn4Zq20JbnBESAP8EYS3NlsHmYMbHBHSpPoRtO6+fyO+tao8sy/CtsENjgip1694BHWzC5FpUvZTaS7xVPxpZjQU9XvgBEeE1a52BCXyl3gkVEaKVxHrIBNwgiPCmgsV7SMo3t3ur4Uof/U2EVuIdZABOMERYS2Fmt4RNJK/zf6qYqp8dbcOQm8o4oiQTIaiWBS9j+VrU+VRJxVn2gezC90euMARoXVM1suSsrca1fAz+/PVe7F1b3YXdw0ucERoc6FBfQQl8i83SXEUL5olhbs4ckMRR4QUCg3qI2gmc+pQYqkwTV81/yJsBC5wRHiR0KA6grpSKZ4WZm7FiWf+RdgQHOCI0PDrILGU5aEk5a+ut3dx5G4+OCKsa6FBcQSNZLnb5IPMlZ14ZndxHXCAI8LrCU3FIyiJJd7UcB2kDw5wRGjYdZCZrCLOIrqhdvPBEaF9E1qKR1AiK6K4DsIRISHXQWayKoLrIBwRHmIdZCRtmBFbB+GIsFDrILG04ROxoYgjwsKsg5zJ6giug3BEWIbrILNqH++xz626hL3jiKoIx4ZfhJ1JS05prYNwRHjhpcnNR5J/vHc9FF3AvnFEVYQLs3WQG2kHuZsPjggvPDf6IuxIWkJuHYQjwguDvsnNRyztuSW1DsIR4YVBW3sosuxUULr54IjwwqCjf/Nh10xoW8CecURVhMG5/jqIVSeJoLQOwhHhhUEQaQ9FeOolR0o3HxwRWhZR2+TmA0/xXBl9AewXR1RFGOgPRbcST/1cGULrIBwRWhZRMNZeB8FTP1eG0M0HR4QXBvpDUSKx1M+VITUUcURYeURXexqKNJ4rQ2cdhCPCyiMa6K+DmNB5rgydmw+OCC8MUn3tdRAz6ufK0ByKOCK0PCLtdRDrQxCddRCOCC2PaCE03egPQZof5Mmsg3BEaHlE+usgmkOQ9gd5OjcfZRE9cET/kEdk8eYjf0q+ATL/L/pjyT/4UfYQdBTfItJeBzl5M6DsNsMQmXWQkkcMZxE1AcW3iCysg9wYDkHEbj6+548YVr+wAgzfIjrXvvkwuc2o01D0kv6Db0Bhgy7Bt4gqDEUnp2ZDENGbj1az+Qwq2cTdAgzvIkLefFQcguisg6weS1O5SyfrDSB4F1FHaDozus2ozVD0VD75fElfegIE7yIKxkLTFDME0b75WD0cN0vfiPLAjo9WYMq/iC6FrmQ0WouDuAarvrcyT8+fm5nj0ko2x83M5+GwldHOwr+IrgR9A7DqXfOV5xWUWmUV7bRAk38RDQR9EVhUiGh4BG86GnJE5bKIcn1BXwj25BGlJ9Tdw8sG/mnz7uGu9TR85IgUdhG1BX0XYE8eERgackQKu4gWgr4O2MMR2bOL6FzQtwB7OCJ7wmArEuS1wR6OyJ4wqNFQZDsibfwR/w2vI+oI8jgiXYeK6HwsqBuAPRyRPWFQo6HoGmzaHKF8AU1eRkT/5iOEevEwIvI3Hx2oGQ8jCqgPRXV7I/IyoktBWu3eiLyMiPbNR1S7NyIvIyI9FPXr15CXEVFeB4mWUD9eRkT35qNdw/chTyOiOhRFF1BLXkZEch0kGkygpryMiNzNx/hqXstz7BdfIyI1FEXtTlDnhHyNiMw6SL/dOU//PhwRkvuIiN18jC8XvwLiiPBcR0RqKBpHV4Mg9X9E9NhsvoODcBtRL0gRWQfJhqDU/xPRy/ABDsN9RBRuPvIh6C89YDgNcCg4/FA0vkzPMDVgKI4juggKLgUafggqVdPfVFPgNKJlULAQDkX5GVaujreuRDiNqBcUnAtH+u3FHwHxSGRTA1y6dv4hPz/DNFwDw3EdUS9wevMxzj7I65nzGxFeA5xaIm4+bA1BPBHtSwPcmiCGIuRthonaboCQ0ADHJoihCDMEcUPuNMC15RwxFGFuM/gsc6UBzvWuEUMR8jaDP5e50IAD6C0vgtzY5hCEccEnWXUNOJDe1zB1ZeUdaL4MUb7y53orGnBQc1FR+9uESzisg0f0s317x20YBqIoOvr4N2pUEFIhqE5jp8gSsv9FJQICBDBgwyKLNzTuWcMtnkRyLHub8UVAEZhrTUOeZa76bcZ7Mdda80YQczgSc62PYafPlREUjbnYtGsE3QgoIHlEt+E1y5URFJU8Ik+vjKBvRlBg+ojGiRFUOX1EzypaZkZQBQJE9KCiJTGCKhEhIh/n4Q4jqCYhItoy4jSjXkEi2m4ZrSmlK3+CKhQmItSLiEBE0CMiEBH0iAhEBD0iAhFBj4hARNAjIhAR9IgIRAQ9IgIRQY+IQETQIyIQEfSICEQEPSICEUGPiEBE0CMiFLPGgSJHax0o0lrnQJHeLgcHCjRmdnagQG+/Tg5k62zDLEK+k/3p+c5HlsPZ/vXt0YFdmra72OYHk2xFNYF+8mMAAAAASUVORK5CYII=",p=""+new URL("docs---vsFbMi.png",import.meta.url).href,x=""+new URL("share-DGA-UcQf.png",import.meta.url).href,b=""+new URL("figma-plugin-CH2hELiO.png",import.meta.url).href,C=""+new URL("testing-cbzR9l9r.png",import.meta.url).href,f=""+new URL("accessibility-W_h2acOZ.png",import.meta.url).href,u=""+new URL("theming-D6WJLNoW.png",import.meta.url).href,j=""+new URL("addon-library-BWUCAmyN.png",import.meta.url).href,s=()=>e.jsx("svg",{viewBox:"0 0 14 14",width:"8px",height:"14px",style:{marginLeft:"4px",display:"inline-block",shapeRendering:"inherit",verticalAlign:"middle",fill:"currentColor","path fill":"currentColor"},children:e.jsx("path",{d:"m11.1 7.35-5.5 5.5a.5.5 0 0 1-.7-.7L10.04 7 4.9 1.85a.5.5 0 1 1 .7-.7l5.5 5.5c.2.2.2.5 0 .7Z"})});function o(t){const i={code:"code",h1:"h1",p:"p",...r(),...t.components};return e.jsxs(e.Fragment,{children:[e.jsx(a,{title:"Configure your project"}),` +`,e.jsxs("div",{className:"sb-container",children:[e.jsxs("div",{className:"sb-section-title",children:[e.jsx(i.h1,{id:"configure-your-project",children:"Configure your project"}),e.jsx(i.p,{children:"Because Storybook works separately from your app, you'll need to configure it for your specific stack and setup. Below, explore guides for configuring Storybook with popular frameworks and tools. If you get stuck, learn how you can ask for help from our community."})]}),e.jsxs("div",{className:"sb-section",children:[e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:g,alt:"A wall of logos representing different styling technologies"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Add styling and CSS"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Like with web applications, there are many ways to include CSS within Storybook. Learn more about setting up styling within Storybook."}),e.jsxs("a",{href:"https://storybook.js.org/docs/configure/styling-and-css/?renderer=react",target:"_blank",children:["Learn more",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:h,alt:"An abstraction representing the composition of data for a component"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Provide context and mocking"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Often when a story doesn't render, it's because your component is expecting a specific environment or context (like a theme provider) to be available."}),e.jsxs("a",{href:"https://storybook.js.org/docs/writing-stories/decorators/?renderer=react#context-for-mocking",target:"_blank",children:["Learn more",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:m,alt:"A representation of typography and image assets"}),e.jsxs("div",{children:[e.jsx("h4",{className:"sb-section-item-heading",children:"Load assets and resources"}),e.jsxs("p",{className:"sb-section-item-paragraph",children:[`To link static files (like fonts) to your projects and stories, use the +`,e.jsx(i.code,{children:"staticDirs"}),` configuration option to specify folders to load when +starting Storybook.`]}),e.jsxs("a",{href:"https://storybook.js.org/docs/configure/images-and-assets/?renderer=react",target:"_blank",children:["Learn more",e.jsx(s,{})]})]})]})]})]}),` +`,e.jsxs("div",{className:"sb-container",children:[e.jsxs("div",{className:"sb-section-title",children:[e.jsx(i.h1,{id:"do-more-with-storybook",children:"Do more with Storybook"}),e.jsx(i.p,{children:"Now that you know the basics, let's explore other parts of Storybook that will improve your experience. This list is just to get you started. You can customise Storybook in many ways to fit your needs."})]}),e.jsx("div",{className:"sb-section",children:e.jsxs("div",{className:"sb-features-grid",children:[e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:p,alt:"A screenshot showing the autodocs tag being set, pointing a docs page being generated"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Autodocs"}),e.jsx("p",{className:"sb-section-item-paragraph",children:`Auto-generate living, +interactive reference documentation from your components and stories.`}),e.jsxs("a",{href:"https://storybook.js.org/docs/writing-docs/autodocs/?renderer=react",target:"_blank",children:["Learn more",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:x,alt:"A browser window showing a Storybook being published to a chromatic.com URL"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Publish to Chromatic"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Publish your Storybook to review and collaborate with your entire team."}),e.jsxs("a",{href:"https://storybook.js.org/docs/sharing/publish-storybook/?renderer=react#publish-storybook-with-chromatic",target:"_blank",children:["Learn more",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:b,alt:"Windows showing the Storybook plugin in Figma"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Figma Plugin"}),e.jsx("p",{className:"sb-section-item-paragraph",children:`Embed your stories into Figma to cross-reference the design and live +implementation in one place.`}),e.jsxs("a",{href:"https://storybook.js.org/docs/sharing/design-integrations/?renderer=react#embed-storybook-in-figma-with-the-plugin",target:"_blank",children:["Learn more",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:C,alt:"Screenshot of tests passing and failing"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Testing"}),e.jsx("p",{className:"sb-section-item-paragraph",children:`Use stories to test a component in all its variations, no matter how +complex.`}),e.jsxs("a",{href:"https://storybook.js.org/docs/writing-tests/?renderer=react",target:"_blank",children:["Learn more",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:f,alt:"Screenshot of accessibility tests passing and failing"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Accessibility"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Automatically test your components for a11y issues as you develop."}),e.jsxs("a",{href:"https://storybook.js.org/docs/writing-tests/accessibility-testing/?renderer=react",target:"_blank",children:["Learn more",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-grid-item",children:[e.jsx("img",{src:u,alt:"Screenshot of Storybook in light and dark mode"}),e.jsx("h4",{className:"sb-section-item-heading",children:"Theming"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Theme Storybook's UI to personalize it to your project."}),e.jsxs("a",{href:"https://storybook.js.org/docs/configure/theming/?renderer=react",target:"_blank",children:["Learn more",e.jsx(s,{})]})]})]})})]}),` +`,e.jsxs("div",{className:"sb-addon",children:[e.jsxs("div",{className:"sb-addon-text",children:[e.jsx("h4",{children:"Addons"}),e.jsx("p",{className:"sb-section-item-paragraph",children:"Integrate your tools with Storybook to connect workflows."}),e.jsxs("a",{href:"https://storybook.js.org/addons/",target:"_blank",children:["Discover all addons",e.jsx(s,{})]})]}),e.jsx("div",{className:"sb-addon-img",children:e.jsx("img",{src:j,alt:"Integrate your tools with Storybook to connect workflows."})})]}),` +`,e.jsxs("div",{className:"sb-section sb-socials",children:[e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:n,alt:"Github logo",className:"sb-explore-image"}),e.jsx(i.p,{children:"Join our contributors building the future of UI development."}),e.jsxs("a",{href:"https://github.com/storybookjs/storybook",target:"_blank",children:["Star on GitHub",e.jsx(s,{})]})]}),e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:c,alt:"Discord logo",className:"sb-explore-image"}),e.jsxs("div",{children:[e.jsx(i.p,{children:"Get support and chat with frontend developers."}),e.jsxs("a",{href:"https://discord.gg/storybook",target:"_blank",children:["Join Discord server",e.jsx(s,{})]})]})]}),e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:l,alt:"Youtube logo",className:"sb-explore-image"}),e.jsxs("div",{children:[e.jsx(i.p,{children:"Watch tutorials, feature previews and interviews."}),e.jsxs("a",{href:"https://www.youtube.com/@chromaticui",target:"_blank",children:["Watch on YouTube",e.jsx(s,{})]})]})]}),e.jsxs("div",{className:"sb-section-item",children:[e.jsx("img",{src:d,alt:"A book",className:"sb-explore-image"}),e.jsx("p",{children:"Follow guided walkthroughs on for key workflows."}),e.jsxs("a",{href:"https://storybook.js.org/tutorials/",target:"_blank",children:["Discover tutorials",e.jsx(s,{})]})]})]}),` +`,e.jsx("style",{children:` +.sb-container { + margin-bottom: 48px; +} + +.sb-section { + width: 100%; + display: flex; + flex-direction: row; + gap: 20px; +} + +img { + object-fit: cover; +} + +.sb-section-title { + margin-bottom: 32px; +} + +.sb-section a:not(h1 a, h2 a, h3 a) { + font-size: 14px; +} + +.sb-section-item, .sb-grid-item { + flex: 1; + display: flex; + flex-direction: column; +} + +.sb-section-item-heading { + padding-top: 20px !important; + padding-bottom: 5px !important; + margin: 0 !important; +} +.sb-section-item-paragraph { + margin: 0; + padding-bottom: 10px; +} + +.sb-chevron { + margin-left: 5px; +} + +.sb-features-grid { + display: grid; + grid-template-columns: repeat(2, 1fr); + grid-gap: 32px 20px; +} + +.sb-socials { + display: grid; + grid-template-columns: repeat(4, 1fr); +} + +.sb-socials p { + margin-bottom: 10px; +} + +.sb-explore-image { + max-height: 32px; + align-self: flex-start; +} + +.sb-addon { + width: 100%; + display: flex; + align-items: center; + position: relative; + background-color: #EEF3F8; + border-radius: 5px; + border: 1px solid rgba(0, 0, 0, 0.05); + background: #EEF3F8; + height: 180px; + margin-bottom: 48px; + overflow: hidden; +} + +.sb-addon-text { + padding-left: 48px; + max-width: 240px; +} + +.sb-addon-text h4 { + padding-top: 0px; +} + +.sb-addon-img { + position: absolute; + left: 345px; + top: 0; + height: 100%; + width: 200%; + overflow: hidden; +} + +.sb-addon-img img { + width: 650px; + transform: rotate(-15deg); + margin-left: 40px; + margin-top: -72px; + box-shadow: 0 0 1px rgba(255, 255, 255, 0); + backface-visibility: hidden; +} + +@media screen and (max-width: 800px) { + .sb-addon-img { + left: 300px; + } +} + +@media screen and (max-width: 600px) { + .sb-section { + flex-direction: column; + } + + .sb-features-grid { + grid-template-columns: repeat(1, 1fr); + } + + .sb-socials { + grid-template-columns: repeat(2, 1fr); + } + + .sb-addon { + height: 280px; + align-items: flex-start; + padding-top: 32px; + overflow: hidden; + } + + .sb-addon-text { + padding-left: 24px; + } + + .sb-addon-img { + right: 0; + left: 0; + top: 130px; + bottom: 0; + overflow: hidden; + height: auto; + width: 124%; + } + + .sb-addon-img img { + width: 1200px; + transform: rotate(-12deg); + margin-left: 0; + margin-top: 48px; + margin-bottom: -40px; + margin-left: -24px; + } +} +`})]})}function E(t={}){const{wrapper:i}={...r(),...t.components};return i?e.jsx(i,{...t,children:e.jsx(o,{...t})}):o(t)}export{s as RightArrow,E as default}; diff --git a/docs/assets/Countdown.stories-C6ZSTyoB.js b/docs/assets/Countdown.stories-C6ZSTyoB.js new file mode 100644 index 00000000..4bff3ab1 --- /dev/null +++ b/docs/assets/Countdown.stories-C6ZSTyoB.js @@ -0,0 +1,83 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{r}from"./iframe-DDnXVYpC.js";import{t as T}from"./bundle-mjs-yGZq-iow.js";const t=({value:a,dataTheme:n,className:l,...o})=>{const s=T("countdown",l),C={"--value":Math.min(99,Math.max(0,a))};return e.jsx("span",{role:"timer",...o,"data-theme":n,className:s,children:e.jsx("span",{style:C})})};try{t.displayName="Countdown",t.__docgenInfo={description:"",displayName:"Countdown",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"number"}}}}}catch{}try{t.displayName="Countdown",t.__docgenInfo={description:"",displayName:"Countdown",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"number"}}}}}catch{}const q={title:"Data Display/Countdown",component:t},u=a=>{const[n,l]=r.useState(a.value);return r.useEffect(()=>{const o=setTimeout(()=>{l(s=>s<=0?a.value:s-1)},1e3);return()=>{clearTimeout(o)}},[n]),e.jsx(t,{className:"text-2xl",value:n})};u.args={value:50};const c=a=>{const[n,l]=r.useState(a.value);return r.useEffect(()=>{const o=setTimeout(()=>{l(s=>s<=0?a.value:s-1)},1e3);return()=>{clearTimeout(o)}},[n]),e.jsxs("span",{className:"font-mono text-2xl",children:[e.jsx(t,{value:10}),":",e.jsx(t,{value:24}),":",e.jsx(t,{value:n})]})};c.args={value:34};const m=a=>{const[n,l]=r.useState(a.value);return r.useEffect(()=>{const o=setTimeout(()=>{l(s=>s<=0?a.value:s-1)},1e3);return()=>{clearTimeout(o)}},[n]),e.jsxs("div",{className:"grid grid-flow-col gap-5 text-center auto-cols-max",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx(t,{className:"font-mono text-5xl",value:15}),"days"]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx(t,{className:"font-mono text-5xl",value:10}),"hours"]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx(t,{className:"font-mono text-5xl",value:24}),"min"]}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx(t,{className:"font-mono text-5xl",value:n}),"sec"]})]})};m.args={value:37};const d=a=>{const[n,l]=r.useState(a.value);return r.useEffect(()=>{const o=setTimeout(()=>{l(s=>s<=0?a.value:s-1)},1e3);return()=>{clearTimeout(o)}},[n]),e.jsxs("div",{className:"grid grid-flow-col gap-5 text-center auto-cols-max",children:[e.jsxs("div",{className:"flex flex-col p-2 bg-neutral rounded-box text-neutral-content",children:[e.jsx(t,{className:"font-mono text-5xl",value:15}),"days"]}),e.jsxs("div",{className:"flex flex-col p-2 bg-neutral rounded-box text-neutral-content",children:[e.jsx(t,{className:"font-mono text-5xl",value:10}),"hours"]}),e.jsxs("div",{className:"flex flex-col p-2 bg-neutral rounded-box text-neutral-content",children:[e.jsx(t,{className:"font-mono text-5xl",value:24}),"min"]}),e.jsxs("div",{className:"flex flex-col p-2 bg-neutral rounded-box text-neutral-content",children:[e.jsx(t,{className:"font-mono text-5xl",value:n}),"sec"]})]})};d.args={value:26};var i,x,v;u.parameters={...u.parameters,docs:{...(i=u.parameters)==null?void 0:i.docs,source:{originalSource:`args => { + const [value, setValue] = useState(args.value); + useEffect(() => { + const timer = setTimeout(() => { + setValue(v => v <= 0 ? args.value : v - 1); + }, 1000); + return () => { + clearTimeout(timer); + }; + }, [value]); + return ; +}`,...(v=(x=u.parameters)==null?void 0:x.docs)==null?void 0:v.source}}};var f,p,N;c.parameters={...c.parameters,docs:{...(f=c.parameters)==null?void 0:f.docs,source:{originalSource:`args => { + const [value, setValue] = useState(args.value); + useEffect(() => { + const timer = setTimeout(() => { + setValue(v => v <= 0 ? args.value : v - 1); + }, 1000); + return () => { + clearTimeout(timer); + }; + }, [value]); + return + : + : + + ; +}`,...(N=(p=c.parameters)==null?void 0:p.docs)==null?void 0:N.source}}};var g,h,j;m.parameters={...m.parameters,docs:{...(g=m.parameters)==null?void 0:g.docs,source:{originalSource:`args => { + const [value, setValue] = useState(args.value); + useEffect(() => { + const timer = setTimeout(() => { + setValue(v => v <= 0 ? args.value : v - 1); + }, 1000); + return () => { + clearTimeout(timer); + }; + }, [value]); + return
+
+ + days +
+
+ + hours +
+
+ + min +
+
+ + sec +
+
; +}`,...(j=(h=m.parameters)==null?void 0:h.docs)==null?void 0:j.source}}};var w,b,y;d.parameters={...d.parameters,docs:{...(w=d.parameters)==null?void 0:w.docs,source:{originalSource:`args => { + const [value, setValue] = useState(args.value); + useEffect(() => { + const timer = setTimeout(() => { + setValue(v => v <= 0 ? args.value : v - 1); + }, 1000); + return () => { + clearTimeout(timer); + }; + }, [value]); + return
+
+ + days +
+
+ + hours +
+
+ + min +
+
+ + sec +
+
; +}`,...(y=(b=d.parameters)==null?void 0:b.docs)==null?void 0:y.source}}};const D=["Default","Clock","WithLabels","WithBoxes"];export{c as Clock,u as Default,d as WithBoxes,m as WithLabels,D as __namedExportsOrder,q as default}; diff --git a/docs/assets/Countdown.stories-af5338ba.js b/docs/assets/Countdown.stories-af5338ba.js deleted file mode 100644 index 94ee04bc..00000000 --- a/docs/assets/Countdown.stories-af5338ba.js +++ /dev/null @@ -1,83 +0,0 @@ -import{t as S,j as a,a as o}from"./tw-merge-4486aaf0.js";import{r as u}from"./index-f46741a2.js";const x=({value:e,dataTheme:n,className:s,...r})=>{const l=S("countdown",s),V={"--value":Math.min(99,Math.max(0,e))};return a("span",{role:"timer",...r,"data-theme":n,className:l,children:a("span",{style:V})})},t=x;try{x.displayName="Countdown",x.__docgenInfo={description:"",displayName:"Countdown",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"number"}}}}}catch{}try{t.displayName="Countdown",t.__docgenInfo={description:"",displayName:"Countdown",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"number"}}}}}catch{}const W={title:"Data Display/Countdown",component:t},c=e=>{const[n,s]=u.useState(e.value);return u.useEffect(()=>{const r=setTimeout(()=>{s(l=>l<=0?e.value:l-1)},1e3);return()=>{clearTimeout(r)}},[n]),a(t,{className:"text-2xl",value:n})};c.args={value:50};const m=e=>{const[n,s]=u.useState(e.value);return u.useEffect(()=>{const r=setTimeout(()=>{s(l=>l<=0?e.value:l-1)},1e3);return()=>{clearTimeout(r)}},[n]),o("span",{className:"font-mono text-2xl",children:[a(t,{value:10}),":",a(t,{value:24}),":",a(t,{value:n})]})};m.args={value:34};const d=e=>{const[n,s]=u.useState(e.value);return u.useEffect(()=>{const r=setTimeout(()=>{s(l=>l<=0?e.value:l-1)},1e3);return()=>{clearTimeout(r)}},[n]),o("div",{className:"grid grid-flow-col gap-5 text-center auto-cols-max",children:[o("div",{className:"flex flex-col",children:[a(t,{className:"font-mono text-5xl",value:15}),"days"]}),o("div",{className:"flex flex-col",children:[a(t,{className:"font-mono text-5xl",value:10}),"hours"]}),o("div",{className:"flex flex-col",children:[a(t,{className:"font-mono text-5xl",value:24}),"min"]}),o("div",{className:"flex flex-col",children:[a(t,{className:"font-mono text-5xl",value:n}),"sec"]})]})};d.args={value:37};const i=e=>{const[n,s]=u.useState(e.value);return u.useEffect(()=>{const r=setTimeout(()=>{s(l=>l<=0?e.value:l-1)},1e3);return()=>{clearTimeout(r)}},[n]),o("div",{className:"grid grid-flow-col gap-5 text-center auto-cols-max",children:[o("div",{className:"flex flex-col p-2 bg-neutral rounded-box text-neutral-content",children:[a(t,{className:"font-mono text-5xl",value:15}),"days"]}),o("div",{className:"flex flex-col p-2 bg-neutral rounded-box text-neutral-content",children:[a(t,{className:"font-mono text-5xl",value:10}),"hours"]}),o("div",{className:"flex flex-col p-2 bg-neutral rounded-box text-neutral-content",children:[a(t,{className:"font-mono text-5xl",value:24}),"min"]}),o("div",{className:"flex flex-col p-2 bg-neutral rounded-box text-neutral-content",children:[a(t,{className:"font-mono text-5xl",value:n}),"sec"]})]})};i.args={value:26};var v,f,p;c.parameters={...c.parameters,docs:{...(v=c.parameters)==null?void 0:v.docs,source:{originalSource:`args => { - const [value, setValue] = useState(args.value); - useEffect(() => { - const timer = setTimeout(() => { - setValue(v => v <= 0 ? args.value : v - 1); - }, 1000); - return () => { - clearTimeout(timer); - }; - }, [value]); - return ; -}`,...(p=(f=c.parameters)==null?void 0:f.docs)==null?void 0:p.source}}};var N,g,h;m.parameters={...m.parameters,docs:{...(N=m.parameters)==null?void 0:N.docs,source:{originalSource:`args => { - const [value, setValue] = useState(args.value); - useEffect(() => { - const timer = setTimeout(() => { - setValue(v => v <= 0 ? args.value : v - 1); - }, 1000); - return () => { - clearTimeout(timer); - }; - }, [value]); - return - : - : - - ; -}`,...(h=(g=m.parameters)==null?void 0:g.docs)==null?void 0:h.source}}};var w,b,C;d.parameters={...d.parameters,docs:{...(w=d.parameters)==null?void 0:w.docs,source:{originalSource:`args => { - const [value, setValue] = useState(args.value); - useEffect(() => { - const timer = setTimeout(() => { - setValue(v => v <= 0 ? args.value : v - 1); - }, 1000); - return () => { - clearTimeout(timer); - }; - }, [value]); - return
-
- - days -
-
- - hours -
-
- - min -
-
- - sec -
-
; -}`,...(C=(b=d.parameters)==null?void 0:b.docs)==null?void 0:C.source}}};var y,T,_;i.parameters={...i.parameters,docs:{...(y=i.parameters)==null?void 0:y.docs,source:{originalSource:`args => { - const [value, setValue] = useState(args.value); - useEffect(() => { - const timer = setTimeout(() => { - setValue(v => v <= 0 ? args.value : v - 1); - }, 1000); - return () => { - clearTimeout(timer); - }; - }, [value]); - return
-
- - days -
-
- - hours -
-
- - min -
-
- - sec -
-
; -}`,...(_=(T=i.parameters)==null?void 0:T.docs)==null?void 0:_.source}}};const j=["Default","Clock","WithLabels","WithBoxes"];export{m as Clock,c as Default,i as WithBoxes,d as WithLabels,j as __namedExportsOrder,W as default}; diff --git a/docs/assets/Diff.stories-DdGIDHOs.js b/docs/assets/Diff.stories-DdGIDHOs.js new file mode 100644 index 00000000..2977d38a --- /dev/null +++ b/docs/assets/Diff.stories-DdGIDHOs.js @@ -0,0 +1,15 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{r as y}from"./iframe-DDnXVYpC.js";import{c as h}from"./clsx-B-dksMZM.js";import{t as D}from"./bundle-mjs-yGZq-iow.js";const a=y.forwardRef(({dataTheme:r,className:t,children:p,secondItem:f,...g},x)=>{const u=D("diff aspect-[16/9]",h({}),t);return e.jsxs("div",{...g,"data-theme":r,className:u,ref:x,children:[e.jsx("div",{className:"diff-item-1",children:p}),e.jsx("div",{className:"diff-item-2",children:f}),e.jsx("div",{className:"diff-resizer"})]})});a.displayName="Diff";try{a.displayName="Diff",a.__docgenInfo={description:"",displayName:"Diff",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},secondItem:{defaultValue:null,description:"",name:"secondItem",required:!0,type:{name:"ReactNode"}}}}}catch{}const v={title:"Data Display/Diff",component:a,parameters:{controls:{expanded:!0}}},s=({secondItem:r,...t})=>e.jsx(a,{...t,secondItem:e.jsx("img",{alt:"daisy",src:"https://img.daisyui.com/images/stock/photo-1560717789-0ac7c58ac90a-blur.webp"}),children:e.jsx("img",{alt:"daisy",src:" https://img.daisyui.com/images/stock/photo-1560717789-0ac7c58ac90a.webp"})});s.argTypes={secondItem:{control:!1}};const c=({secondItem:r,...t})=>e.jsx(a,{...t,secondItem:e.jsx("div",{className:"bg-base-200 text-9xl font-black grid place-content-center",children:"DAISY"}),children:e.jsx("div",{className:"bg-primary text-primary-content text-9xl font-black grid place-content-center",children:"DAISY"})});c.argTypes={secondItem:{control:!1}};var o,i,n;s.parameters={...s.parameters,docs:{...(o=s.parameters)==null?void 0:o.docs,source:{originalSource:`({ + secondItem, + ...args +}) => }> + daisy + `,...(n=(i=s.parameters)==null?void 0:i.docs)==null?void 0:n.source}}};var d,m,l;c.parameters={...c.parameters,docs:{...(d=c.parameters)==null?void 0:d.docs,source:{originalSource:`({ + secondItem, + ...args +}) => + DAISY + }> +
+ DAISY +
+
`,...(l=(m=c.parameters)==null?void 0:m.docs)==null?void 0:l.source}}};const _=["Default","Text"];export{s as Default,c as Text,_ as __namedExportsOrder,v as default}; diff --git a/docs/assets/Diff.stories-e2916729.js b/docs/assets/Diff.stories-e2916729.js deleted file mode 100644 index 9ecc5709..00000000 --- a/docs/assets/Diff.stories-e2916729.js +++ /dev/null @@ -1,15 +0,0 @@ -import{t as h,a as D,j as e}from"./tw-merge-4486aaf0.js";import{r as I}from"./index-f46741a2.js";import{c as b}from"./clsx.m-1229b3e0.js";const r=I.forwardRef(({dataTheme:c,className:a,children:f,secondItem:g,...u},y)=>{const x=h("diff aspect-[16/9]",b({}),a);return D("div",{...u,"data-theme":c,className:x,ref:y,children:[e("div",{className:"diff-item-1",children:f}),e("div",{className:"diff-item-2",children:g}),e("div",{className:"diff-resizer"})]})});r.displayName="Diff";const i=r;try{r.displayName="Diff",r.__docgenInfo={description:"",displayName:"Diff",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},secondItem:{defaultValue:null,description:"",name:"secondItem",required:!0,type:{name:"ReactNode"}}}}}catch{}const k={title:"Data Display/Diff",component:i,parameters:{controls:{expanded:!0}}},t=({secondItem:c,...a})=>e(i,{...a,secondItem:e("img",{alt:"daisy",src:"https://img.daisyui.com/images/stock/photo-1560717789-0ac7c58ac90a-blur.webp"}),children:e("img",{alt:"daisy",src:" https://img.daisyui.com/images/stock/photo-1560717789-0ac7c58ac90a.webp"})});t.argTypes={secondItem:{control:!1}};const s=({secondItem:c,...a})=>e(i,{...a,secondItem:e("div",{className:"bg-base-200 text-9xl font-black grid place-content-center",children:"DAISY"}),children:e("div",{className:"bg-primary text-primary-content text-9xl font-black grid place-content-center",children:"DAISY"})});s.argTypes={secondItem:{control:!1}};var o,n,d;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`({ - secondItem, - ...args -}) => }> - daisy - `,...(d=(n=t.parameters)==null?void 0:n.docs)==null?void 0:d.source}}};var m,l,p;s.parameters={...s.parameters,docs:{...(m=s.parameters)==null?void 0:m.docs,source:{originalSource:`({ - secondItem, - ...args -}) => - DAISY - }> -
- DAISY -
-
`,...(p=(l=s.parameters)==null?void 0:l.docs)==null?void 0:p.source}}};const w=["Default","Text"];export{t as Default,s as Text,w as __namedExportsOrder,k as default}; diff --git a/docs/assets/Divider.stories-001fec64.js b/docs/assets/Divider.stories-001fec64.js deleted file mode 100644 index 5bb7bc56..00000000 --- a/docs/assets/Divider.stories-001fec64.js +++ /dev/null @@ -1,115 +0,0 @@ -import{t as F,j as e,a as o}from"./tw-merge-4486aaf0.js";import{r as G}from"./index-f46741a2.js";import{c as J}from"./clsx.m-1229b3e0.js";import{C as d}from"./index-92e1ed70.js";const g=G.forwardRef(({children:n,vertical:i,horizontal:a,responsive:l,color:s,start:O,end:W,dataTheme:L,className:M,...$},k)=>{const B=F("divider",M,J({"divider-vertical":i,"divider-horizontal":a,"lg:divider-horizontal":l,"divider-neutral":s==="neutral","divider-primary":s==="primary","divider-secondary":s==="secondary","divider-accent":s==="accent","divider-warning":s==="warning","divider-info":s==="info","divider-error":s==="error","divider-start":O,"divider-end":W}));return e("div",{role:"separator",...$,"data-theme":L,className:B,ref:k,children:n})});g.displayName="Divider";const r=g;try{g.displayName="Divider",g.__docgenInfo={description:"",displayName:"Divider",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}},responsive:{defaultValue:null,description:"",name:"responsive",required:!1,type:{name:"boolean"}},start:{defaultValue:null,description:"",name:"start",required:!1,type:{name:"boolean"}},end:{defaultValue:null,description:"",name:"end",required:!1,type:{name:"boolean"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}}}}}catch{}try{r.displayName="Divider",r.__docgenInfo={description:"",displayName:"Divider",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}},responsive:{defaultValue:null,description:"",name:"responsive",required:!1,type:{name:"boolean"}},start:{defaultValue:null,description:"",name:"start",required:!1,type:{name:"boolean"}},end:{defaultValue:null,description:"",name:"end",required:!1,type:{name:"boolean"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}}}}}catch{}const Y={title:"Layout/Divider",component:r,args:{children:"OR"}},c=({children:n,...i})=>o("div",{className:"flex flex-col w-full border-opacity-50",children:[e(d,{className:"grid h-20 bg-base-300 rounded-box place-items-center",children:"content"}),e(r,{...i,children:n}),e(d,{className:"grid h-20 bg-base-300 rounded-box place-items-center",children:"content"})]});c.args={};const u=({children:n,...i})=>o("div",{className:"flex w-full ",children:[e(d,{className:"grid h-20 flex-grow bg-base-300 rounded-box place-items-center",children:"content"}),e(r,{...i,children:n}),e(d,{className:"grid h-20 flex-grow bg-base-300 rounded-box place-items-center",children:"content"})]});u.args={horizontal:!0};const m=({children:n,...i})=>o("div",{className:"flex flex-col w-full",children:[e(d,{className:"grid h-20 bg-base-300 rounded-box place-items-center",children:"content"}),e(r,{...i,children:n}),e(d,{className:"grid h-20 bg-base-300 rounded-box place-items-center",children:"content"})]});m.args={children:""};const f=({children:n,...i})=>o("div",{className:"flex flex-col w-full lg:flex-row",children:[e(d,{className:"grid flex-grow h-32 bg-base-300 rounded-box place-items-center",children:"content"}),e(r,{...i,children:n}),e(d,{className:"grid flex-grow h-32 bg-base-300 rounded-box place-items-center",children:"content"})]});f.args={responsive:!0};const p=({children:n,color:i,...a})=>o("div",{className:"flex flex-col w-full",children:[e(r,{...a,children:"Default"}),e(r,{...a,color:"neutral",children:"Neutral"}),e(r,{...a,color:"primary",children:"Primary"}),e(r,{...a,color:"secondary",children:"Secondary"}),e(r,{...a,color:"accent",children:"Accent"}),e(r,{...a,color:"success",children:"Success"}),e(r,{...a,color:"warning",children:"Warning"}),e(r,{...a,color:"info",children:"Info"}),e(r,{...a,color:"error",children:"Error"})]});p.argTypes={children:{control:!1},color:{control:!1}};const v=({children:n,start:i,end:a,...l})=>o("div",{className:"flex flex-col w-full",children:[e(r,{...l,start:!0,children:"Start"}),e(r,{...l,children:"Default"}),e(r,{...l,end:!0,children:"End"})]});v.argTypes={children:{control:!1},start:{control:!1},end:{control:!1}};const t=({children:n,start:i,end:a,...l})=>o("div",{className:"flex w-full justify-center h-52",children:[e(r,{...l,start:!0,children:"Start"}),e(r,{...l,children:"Default"}),e(r,{...l,end:!0,children:"End"})]});t.argTypes={children:{control:!1},start:{control:!1},end:{control:!1}};t.args={horizontal:!0};var h,b,x;c.parameters={...c.parameters,docs:{...(h=c.parameters)==null?void 0:h.docs,source:{originalSource:`({ - children, - ...args -}) => { - return
- - content - - {children} - - content - -
; -}`,...(x=(b=c.parameters)==null?void 0:b.docs)==null?void 0:x.source}}};var D,y,N;u.parameters={...u.parameters,docs:{...(D=u.parameters)==null?void 0:D.docs,source:{originalSource:`({ - children, - ...args -}) => { - return
- - content - - {children} - - content - -
; -}`,...(N=(y=u.parameters)==null?void 0:y.docs)==null?void 0:N.source}}};var w,C,_;m.parameters={...m.parameters,docs:{...(w=m.parameters)==null?void 0:w.docs,source:{originalSource:`({ - children, - ...args -}) => { - return
- - content - - {children} - - content - -
; -}`,...(_=(C=m.parameters)==null?void 0:C.docs)==null?void 0:_.source}}};var S,q,V;f.parameters={...f.parameters,docs:{...(S=f.parameters)==null?void 0:S.docs,source:{originalSource:`({ - children, - ...args -}) => { - return
- - content - - {children} - - content - -
; -}`,...(V=(q=f.parameters)==null?void 0:q.docs)==null?void 0:V.source}}};var z,T,E;p.parameters={...p.parameters,docs:{...(z=p.parameters)==null?void 0:z.docs,source:{originalSource:`({ - children, - color, - ...args -}) => { - return
- Default - - Neutral - - - Primary - - - Secondary - - - Accent - - - Success - - - Warning - - - Info - - - Error - -
; -}`,...(E=(T=p.parameters)==null?void 0:T.docs)==null?void 0:E.source}}};var P,j,H;v.parameters={...v.parameters,docs:{...(P=v.parameters)==null?void 0:P.docs,source:{originalSource:`({ - children, - start, - end, - ...args -}) => { - return
- - Start - - Default - - End - -
; -}`,...(H=(j=v.parameters)==null?void 0:j.docs)==null?void 0:H.source}}};var I,R,A;t.parameters={...t.parameters,docs:{...(I=t.parameters)==null?void 0:I.docs,source:{originalSource:`({ - children, - start, - end, - ...args -}) => { - return
- - Start - - Default - - End - -
; -}`,...(A=(R=t.parameters)==null?void 0:R.docs)==null?void 0:A.source}}};const Z=["Default","Horizontal","NoText","Responsive","Colors","DifferentPositions","DifferentPositionsHorizontal"];export{p as Colors,c as Default,v as DifferentPositions,t as DifferentPositionsHorizontal,u as Horizontal,m as NoText,f as Responsive,Z as __namedExportsOrder,Y as default}; diff --git a/docs/assets/Divider.stories-6WIBp1E-.js b/docs/assets/Divider.stories-6WIBp1E-.js new file mode 100644 index 00000000..46c5745f --- /dev/null +++ b/docs/assets/Divider.stories-6WIBp1E-.js @@ -0,0 +1,115 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{r as B}from"./iframe-DDnXVYpC.js";import{c as F}from"./clsx-B-dksMZM.js";import{t as G}from"./bundle-mjs-yGZq-iow.js";import{C as l}from"./index-DIaYqioD.js";const r=B.forwardRef(({children:n,vertical:s,horizontal:a,responsive:i,color:d,start:I,end:A,dataTheme:O,className:W,...L},M)=>{const k=G("divider",W,F({"divider-vertical":s,"divider-horizontal":a,"lg:divider-horizontal":i,"divider-neutral":d==="neutral","divider-primary":d==="primary","divider-secondary":d==="secondary","divider-accent":d==="accent","divider-warning":d==="warning","divider-info":d==="info","divider-error":d==="error","divider-start":I,"divider-end":A}));return e.jsx("div",{role:"separator",...L,"data-theme":O,className:k,ref:M,children:n})});r.displayName="Divider";try{r.displayName="Divider",r.__docgenInfo={description:"",displayName:"Divider",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}},responsive:{defaultValue:null,description:"",name:"responsive",required:!1,type:{name:"boolean"}},start:{defaultValue:null,description:"",name:"start",required:!1,type:{name:"boolean"}},end:{defaultValue:null,description:"",name:"end",required:!1,type:{name:"boolean"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}}}}}catch{}try{r.displayName="Divider",r.__docgenInfo={description:"",displayName:"Divider",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}},responsive:{defaultValue:null,description:"",name:"responsive",required:!1,type:{name:"boolean"}},start:{defaultValue:null,description:"",name:"start",required:!1,type:{name:"boolean"}},end:{defaultValue:null,description:"",name:"end",required:!1,type:{name:"boolean"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}}}}}catch{}const Y={title:"Layout/Divider",component:r,args:{children:"OR"}},t=({children:n,...s})=>e.jsxs("div",{className:"flex flex-col w-full border-opacity-50",children:[e.jsx(l,{className:"grid h-20 bg-base-300 rounded-box place-items-center",children:"content"}),e.jsx(r,{...s,children:n}),e.jsx(l,{className:"grid h-20 bg-base-300 rounded-box place-items-center",children:"content"})]});t.args={};const c=({children:n,...s})=>e.jsxs("div",{className:"flex w-full ",children:[e.jsx(l,{className:"grid h-20 flex-grow bg-base-300 rounded-box place-items-center",children:"content"}),e.jsx(r,{...s,children:n}),e.jsx(l,{className:"grid h-20 flex-grow bg-base-300 rounded-box place-items-center",children:"content"})]});c.args={horizontal:!0};const u=({children:n,...s})=>e.jsxs("div",{className:"flex flex-col w-full",children:[e.jsx(l,{className:"grid h-20 bg-base-300 rounded-box place-items-center",children:"content"}),e.jsx(r,{...s,children:n}),e.jsx(l,{className:"grid h-20 bg-base-300 rounded-box place-items-center",children:"content"})]});u.args={children:""};const m=({children:n,...s})=>e.jsxs("div",{className:"flex flex-col w-full lg:flex-row",children:[e.jsx(l,{className:"grid flex-grow h-32 bg-base-300 rounded-box place-items-center",children:"content"}),e.jsx(r,{...s,children:n}),e.jsx(l,{className:"grid flex-grow h-32 bg-base-300 rounded-box place-items-center",children:"content"})]});m.args={responsive:!0};const f=({children:n,color:s,...a})=>e.jsxs("div",{className:"flex flex-col w-full",children:[e.jsx(r,{...a,children:"Default"}),e.jsx(r,{...a,color:"neutral",children:"Neutral"}),e.jsx(r,{...a,color:"primary",children:"Primary"}),e.jsx(r,{...a,color:"secondary",children:"Secondary"}),e.jsx(r,{...a,color:"accent",children:"Accent"}),e.jsx(r,{...a,color:"success",children:"Success"}),e.jsx(r,{...a,color:"warning",children:"Warning"}),e.jsx(r,{...a,color:"info",children:"Info"}),e.jsx(r,{...a,color:"error",children:"Error"})]});f.argTypes={children:{control:!1},color:{control:!1}};const p=({children:n,start:s,end:a,...i})=>e.jsxs("div",{className:"flex flex-col w-full",children:[e.jsx(r,{...i,start:!0,children:"Start"}),e.jsx(r,{...i,children:"Default"}),e.jsx(r,{...i,end:!0,children:"End"})]});p.argTypes={children:{control:!1},start:{control:!1},end:{control:!1}};const o=({children:n,start:s,end:a,...i})=>e.jsxs("div",{className:"flex w-full justify-center h-52",children:[e.jsx(r,{...i,start:!0,children:"Start"}),e.jsx(r,{...i,children:"Default"}),e.jsx(r,{...i,end:!0,children:"End"})]});o.argTypes={children:{control:!1},start:{control:!1},end:{control:!1}};o.args={horizontal:!0};var v,x,g;t.parameters={...t.parameters,docs:{...(v=t.parameters)==null?void 0:v.docs,source:{originalSource:`({ + children, + ...args +}) => { + return
+ + content + + {children} + + content + +
; +}`,...(g=(x=t.parameters)==null?void 0:x.docs)==null?void 0:g.source}}};var h,b,D;c.parameters={...c.parameters,docs:{...(h=c.parameters)==null?void 0:h.docs,source:{originalSource:`({ + children, + ...args +}) => { + return
+ + content + + {children} + + content + +
; +}`,...(D=(b=c.parameters)==null?void 0:b.docs)==null?void 0:D.source}}};var y,N,j;u.parameters={...u.parameters,docs:{...(y=u.parameters)==null?void 0:y.docs,source:{originalSource:`({ + children, + ...args +}) => { + return
+ + content + + {children} + + content + +
; +}`,...(j=(N=u.parameters)==null?void 0:N.docs)==null?void 0:j.source}}};var w,C,_;m.parameters={...m.parameters,docs:{...(w=m.parameters)==null?void 0:w.docs,source:{originalSource:`({ + children, + ...args +}) => { + return
+ + content + + {children} + + content + +
; +}`,...(_=(C=m.parameters)==null?void 0:C.docs)==null?void 0:_.source}}};var S,q,V;f.parameters={...f.parameters,docs:{...(S=f.parameters)==null?void 0:S.docs,source:{originalSource:`({ + children, + color, + ...args +}) => { + return
+ Default + + Neutral + + + Primary + + + Secondary + + + Accent + + + Success + + + Warning + + + Info + + + Error + +
; +}`,...(V=(q=f.parameters)==null?void 0:q.docs)==null?void 0:V.source}}};var z,E,T;p.parameters={...p.parameters,docs:{...(z=p.parameters)==null?void 0:z.docs,source:{originalSource:`({ + children, + start, + end, + ...args +}) => { + return
+ + Start + + Default + + End + +
; +}`,...(T=(E=p.parameters)==null?void 0:E.docs)==null?void 0:T.source}}};var P,R,H;o.parameters={...o.parameters,docs:{...(P=o.parameters)==null?void 0:P.docs,source:{originalSource:`({ + children, + start, + end, + ...args +}) => { + return
+ + Start + + Default + + End + +
; +}`,...(H=(R=o.parameters)==null?void 0:R.docs)==null?void 0:H.source}}};const Z=["Default","Horizontal","NoText","Responsive","Colors","DifferentPositions","DifferentPositionsHorizontal"];export{f as Colors,t as Default,p as DifferentPositions,o as DifferentPositionsHorizontal,c as Horizontal,u as NoText,m as Responsive,Z as __namedExportsOrder,Y as default}; diff --git a/docs/assets/Dock.stories-CHYDZRhM.js b/docs/assets/Dock.stories-CHYDZRhM.js new file mode 100644 index 00000000..cdbfe551 --- /dev/null +++ b/docs/assets/Dock.stories-CHYDZRhM.js @@ -0,0 +1,34 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{r as p}from"./iframe-DDnXVYpC.js";import{c as f}from"./clsx-B-dksMZM.js";import{t as u}from"./bundle-mjs-yGZq-iow.js";const d=p.forwardRef(({children:r,className:o,color:t,dataTheme:l,active:n,disabled:c,...m},v)=>{const w=u(o,f({"text-neutral":t==="neutral","text-primary":t==="primary","text-secondary":t==="secondary","text-accent":t==="accent","text-info":t==="info","text-success":t==="success","text-warning":t==="warning","text-error":t==="error",active:n,disabled:c}));return e.jsx("button",{...m,className:w,"data-theme":l,ref:v,children:r})});try{d.displayName="DockItem",d.__docgenInfo={description:"",displayName:"DockItem",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},active:{defaultValue:null,description:"",name:"active",required:!1,type:{name:"boolean"}}}}}catch{}const k=p.forwardRef(({children:r,className:o,...t},l)=>{const n=u("dock-label",o);return e.jsx("span",{...t,className:n,ref:l,children:r})});try{k.displayName="DockLabel",k.__docgenInfo={description:"",displayName:"DockLabel",props:{}}}catch{}const a=p.forwardRef(({size:r,dataTheme:o,className:t,children:l,...n},c)=>{const m=u("dock",f({"dock-lg":r==="lg","dock-md":r==="md","dock-sm":r==="sm","dock-xs":r==="xs"}),t);return e.jsx("div",{...n,role:"navigation","data-theme":o,className:m,ref:c,children:l})});a.displayName="Dock";const s=Object.assign(a,{Item:d,Label:k});try{a.displayName="Dock",a.__docgenInfo={description:"",displayName:"Dock",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xl"'},{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}}}}}catch{}const D={title:"Navigation/Dock",component:s,parameters:{controls:{expanded:!0}},argTypes:{children:{control:!1}},args:{className:"relative"}},i=r=>e.jsx("div",{className:"bg-base-300 rounded-box w-full max-w-sm pt-32",children:e.jsxs(s,{...r,className:"relative border border-base-300",children:[e.jsxs(s.Item,{children:[e.jsx("svg",{className:"size-[1.2em]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:e.jsxs("g",{fill:"currentColor",strokeLinejoin:"miter",strokeLinecap:"butt",children:[e.jsx("polyline",{points:"1 11 12 2 23 11",fill:"none",stroke:"currentColor","stroke-miterlimit":"10",strokeWidth:"2"}),e.jsx("path",{d:"m5,13v7c0,1.105.895,2,2,2h10c1.105,0,2-.895,2-2v-7",fill:"none",stroke:"currentColor",strokeLinecap:"square","stroke-miterlimit":"10",strokeWidth:"2"}),e.jsx("line",{x1:"12",y1:"22",x2:"12",y2:"18",fill:"none",stroke:"currentColor",strokeLinecap:"square","stroke-miterlimit":"10",strokeWidth:"2"})]})}),e.jsx(s.Label,{children:"Home"})]}),e.jsxs(s.Item,{active:!0,children:[e.jsx("svg",{className:"size-[1.2em]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:e.jsxs("g",{fill:"currentColor",strokeLinejoin:"miter",strokeLinecap:"butt",children:[e.jsx("polyline",{points:"3 14 9 14 9 17 15 17 15 14 21 14",fill:"none",stroke:"currentColor","stroke-miterlimit":"10",strokeWidth:"2"}),e.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2",fill:"none",stroke:"currentColor",strokeLinecap:"square","stroke-miterlimit":"10",strokeWidth:"2"})]})}),e.jsx(s.Label,{children:"Inbox"})]}),e.jsxs(s.Item,{children:[e.jsx("svg",{className:"size-[1.2em]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:e.jsxs("g",{fill:"currentColor",strokeLinejoin:"miter",strokeLinecap:"butt",children:[e.jsx("circle",{cx:"12",cy:"12",r:"3",fill:"none",stroke:"currentColor",strokeLinecap:"square","stroke-miterlimit":"10",strokeWidth:"2"}),e.jsx("path",{d:"m22,13.25v-2.5l-2.318-.966c-.167-.581-.395-1.135-.682-1.654l.954-2.318-1.768-1.768-2.318.954c-.518-.287-1.073-.515-1.654-.682l-.966-2.318h-2.5l-.966,2.318c-.581.167-1.135.395-1.654.682l-2.318-.954-1.768,1.768.954,2.318c-.287.518-.515,1.073-.682,1.654l-2.318.966v2.5l2.318.966c.167.581.395,1.135.682,1.654l-.954,2.318,1.768,1.768,2.318-.954c.518.287,1.073.515,1.654.682l.966,2.318h2.5l.966-2.318c.581-.167,1.135-.395,1.654-.682l2.318.954,1.768-1.768-.954-2.318c.287-.518.515-1.073.682-1.654l2.318-.966Z",fill:"none",stroke:"currentColor",strokeLinecap:"square","stroke-miterlimit":"10",strokeWidth:"2"})]})}),e.jsx(s.Label,{children:"Settings"})]})]})});var x,h,g;i.parameters={...i.parameters,docs:{...(x=i.parameters)==null?void 0:x.docs,source:{originalSource:`args => { + return
+ + + + + + + + + + Home + + + + + + + + + Inbox + + + + + + + + + Settings + + +
; +}`,...(g=(h=i.parameters)==null?void 0:h.docs)==null?void 0:g.source}}};const _=["Default"];export{i as Default,_ as __namedExportsOrder,D as default}; diff --git a/docs/assets/DocsRenderer-NNNQARDV-c41e41e0.js b/docs/assets/DocsRenderer-NNNQARDV-c41e41e0.js deleted file mode 100644 index 29a79a50..00000000 --- a/docs/assets/DocsRenderer-NNNQARDV-c41e41e0.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as p}from"./iframe-b74445e5.js";import{R as e,r as c}from"./index-f46741a2.js";import{r as l,u}from"./react-18-3202c028.js";import{C as h,A as E,H as d,D as x}from"./index-7b8a467a.js";import"../sb-preview/runtime.js";import"./index-d868a670.js";import"./chunk-6E673XPF-4294b5bd.js";import"./index-b7b0ffbb.js";import"./index-356e4a49.js";var _={code:h,a:E,...d},D=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t){let{showException:r}=this.props;r(t)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},F=class{constructor(){this.render=async(t,r,o)=>{let n={..._,...r==null?void 0:r.components},s=x;return new Promise((m,a)=>{p(()=>import("./index-3dbaff96.js"),["./index-3dbaff96.js","./index-13ca71f7.js","./index-f46741a2.js"],import.meta.url).then(({MDXProvider:i})=>l(e.createElement(D,{showException:a,key:Math.random()},e.createElement(i,{components:n},e.createElement(s,{context:t,docsParameter:r}))),o)).then(()=>m())})},this.unmount=t=>{u(t)}}};export{F as DocsRenderer,_ as defaultComponents}; diff --git a/docs/assets/DocsRenderer-PQXLIZUC-BzNHGoHk.js b/docs/assets/DocsRenderer-PQXLIZUC-BzNHGoHk.js new file mode 100644 index 00000000..7775da2d --- /dev/null +++ b/docs/assets/DocsRenderer-PQXLIZUC-BzNHGoHk.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DEzYFtvv.js","./iframe-DDnXVYpC.js","./iframe-DuwZ-hQm.css"])))=>i.map(i=>d[i]); +import{_ as c,e as t,r as p}from"./iframe-DDnXVYpC.js";import{renderElement as l,unmountElement as u}from"./react-18-CU2k4B5i.js";import{H as h,A as E,C as d,D as x}from"./blocks-Bs-ErNLf.js";import"./index-BMljdo4-.js";import"./jsx-runtime-BjG_zV1W.js";var D={code:d,a:E,...h},_=class extends p.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(r){let{showException:e}=this.props;e(r)}render(){let{hasError:r}=this.state,{children:e}=this.props;return r?null:t.createElement(t.Fragment,null,e)}},y=class{constructor(){this.render=async(r,e,n)=>{let s={...D,...e==null?void 0:e.components},a=x;return new Promise((i,m)=>{c(async()=>{const{MDXProvider:o}=await import("./index-DEzYFtvv.js");return{MDXProvider:o}},__vite__mapDeps([0,1,2]),import.meta.url).then(({MDXProvider:o})=>l(t.createElement(_,{showException:m,key:Math.random()},t.createElement(o,{components:s},t.createElement(a,{context:r,docsParameter:e}))),n)).then(()=>i())})},this.unmount=r=>{u(r)}}};export{y as DocsRenderer,D as defaultComponents}; diff --git a/docs/assets/Drawer.stories-BrW8INw5.js b/docs/assets/Drawer.stories-BrW8INw5.js new file mode 100644 index 00000000..2ca93b89 --- /dev/null +++ b/docs/assets/Drawer.stories-BrW8INw5.js @@ -0,0 +1,87 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{r as i}from"./iframe-DDnXVYpC.js";import{c}from"./clsx-B-dksMZM.js";import{t as R}from"./bundle-mjs-yGZq-iow.js";import{B as p}from"./Button-GtH5nISf.js";import{N as L}from"./index-pbAkFGQM.js";import{M as s}from"./index-BxHmxGX2.js";import"./index-Dl-l57lR.js";const o=({children:n,side:l,open:r,end:a,dataTheme:t,className:y,toggleClassName:V,contentClassName:S,sideClassName:O,overlayClassName:D,onClickOverlay:B,...q})=>{const _=R("drawer",y,c({"drawer-end":a}));return e.jsxs("div",{"aria-expanded":r,...q,"data-theme":t,className:_,children:[e.jsx("input",{type:"checkbox",className:c("drawer-toggle",V),checked:r,readOnly:!0}),e.jsx("div",{className:c("drawer-content",S),children:n}),e.jsxs("div",{className:c("drawer-side",O),children:[e.jsx("label",{className:c("drawer-overlay",D),onClick:B}),l]})]})};try{o.displayName="Drawer",o.__docgenInfo={description:"",displayName:"Drawer",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},side:{defaultValue:null,description:"",name:"side",required:!0,type:{name:"ReactNode"}},open:{defaultValue:null,description:"",name:"open",required:!1,type:{name:"boolean"}},end:{defaultValue:null,description:"",name:"end",required:!1,type:{name:"boolean"}},toggleClassName:{defaultValue:null,description:"",name:"toggleClassName",required:!1,type:{name:"string"}},contentClassName:{defaultValue:null,description:"",name:"contentClassName",required:!1,type:{name:"string"}},sideClassName:{defaultValue:null,description:"",name:"sideClassName",required:!1,type:{name:"string"}},overlayClassName:{defaultValue:null,description:"",name:"overlayClassName",required:!1,type:{name:"string"}},onClickOverlay:{defaultValue:null,description:"",name:"onClickOverlay",required:!1,type:{name:"(() => void)"}}}}}catch{}const H={title:"Layout/Drawer",component:o,argTypes:{side:{control:!1}}},d=n=>{const[l,r]=i.useState(!1),a=i.useCallback(()=>{r(t=>!t)},[]);return e.jsx(o,{...n,open:l,onClickOverlay:a,side:e.jsxs(s,{className:"p-4 w-80 h-full bg-base-200 text-base-content",children:[e.jsx(s.Item,{children:e.jsx("a",{children:"Sidebar Item 1"})}),e.jsx(s.Item,{children:e.jsx("a",{children:"Sidebar Item 2"})})]}),children:e.jsx(p,{color:"primary",onClick:a,children:"Open drawer"})})};d.args={sideClassName:"h-full absolute",contentClassName:"flex h-56 items-center justify-center"};const m=n=>{const[l,r]=i.useState(!1),a=i.useCallback(()=>{r(t=>!t)},[]);return e.jsx(o,{...n,open:l,onClickOverlay:a,side:e.jsxs(s,{className:"p-4 w-80 h-full bg-base-200 text-base-content",children:[e.jsx(s.Item,{children:e.jsx("a",{children:"Sidebar Item 1"})}),e.jsx(s.Item,{children:e.jsx("a",{children:"Sidebar Item 2"})})]}),children:e.jsx(p,{color:"primary",onClick:a,className:"lg:hidden",children:"Open drawer"})})};m.args={className:"lg:drawer-open",sideClassName:"h-full absolute",contentClassName:"flex h-56 items-center justify-center"};const u=n=>{const[l,r]=i.useState(!1),a=i.useCallback(()=>{r(t=>!t)},[]);return e.jsxs(o,{...n,open:l,onClickOverlay:a,side:e.jsxs(s,{className:"p-4 w-60 md:w-80 h-full bg-base-200",children:[e.jsx(s.Item,{children:e.jsx("a",{children:"Sidebar Item 1"})}),e.jsx(s.Item,{children:e.jsx("a",{children:"Sidebar Item 2"})})]}),children:[e.jsxs(L,{className:"w-full bg-base-300",children:[e.jsx("div",{className:"flex-none lg:hidden",children:e.jsx(p,{shape:"square",color:"ghost",onClick:a,children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-6 h-6 stroke-current",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 6h16M4 12h16M4 18h16"})})})}),e.jsx("div",{className:"flex-1 px-2 mx-2",children:"Navbar Title"}),e.jsx("div",{className:"flex-none hidden lg:block",children:e.jsxs(s,{horizontal:!0,children:[e.jsx(s.Item,{children:e.jsx("a",{children:"Navbar Item 1"})}),e.jsx(s.Item,{children:e.jsx("a",{children:"Navbar Item 2"})})]})})]}),e.jsx("div",{className:"flex flex-grow items-center justify-center",children:"Content"})]})};u.args={className:"h-56 rounded overflow-hidden",contentClassName:"flex flex-col"};const b=n=>{const[l,r]=i.useState(!1),a=i.useCallback(()=>{r(t=>!t)},[]);return e.jsx(o,{...n,open:l,onClickOverlay:a,side:e.jsxs(s,{className:"p-4 w-80 h-full bg-base-200 text-base-content",children:[e.jsx(s.Item,{children:e.jsx("a",{children:"Sidebar Item 1"})}),e.jsx(s.Item,{children:e.jsx("a",{children:"Sidebar Item 2"})})]}),children:e.jsx(p,{color:"primary",onClick:a,children:"Open drawer"})})};b.args={sideClassName:"h-full absolute ms-[-100vw] w-[stretch]",contentClassName:"flex h-56 items-center justify-center",end:!0};var g,h,x;d.parameters={...d.parameters,docs:{...(g=d.parameters)==null?void 0:g.docs,source:{originalSource:`args => { + const [visible, setVisible] = useState(false); + const toggleVisible = useCallback(() => { + setVisible(visible => !visible); + }, []); + return + + Sidebar Item 1 + + + Sidebar Item 2 + + }> + + ; +}`,...(x=(h=d.parameters)==null?void 0:h.docs)==null?void 0:x.source}}};var f,v,N;m.parameters={...m.parameters,docs:{...(f=m.parameters)==null?void 0:f.docs,source:{originalSource:`args => { + const [visible, setVisible] = useState(false); + const toggleVisible = useCallback(() => { + setVisible(visible => !visible); + }, []); + return + + Sidebar Item 1 + + + Sidebar Item 2 + + }> + + ; +}`,...(N=(v=m.parameters)==null?void 0:v.docs)==null?void 0:N.source}}};var w,j,I;u.parameters={...u.parameters,docs:{...(w=u.parameters)==null?void 0:w.docs,source:{originalSource:`args => { + const [visible, setVisible] = useState(false); + const toggleVisible = useCallback(() => { + setVisible(visible => !visible); + }, []); + return + + Sidebar Item 1 + + + Sidebar Item 2 + + }> + +
+ +
+
Navbar Title
+
+ + + Navbar Item 1 + + + Navbar Item 2 + + +
+
+
Content
+
; +}`,...(I=(j=u.parameters)==null?void 0:j.docs)==null?void 0:I.source}}};var C,k,M;b.parameters={...b.parameters,docs:{...(C=b.parameters)==null?void 0:C.docs,source:{originalSource:`args => { + const [visible, setVisible] = useState(false); + const toggleVisible = useCallback(() => { + setVisible(visible => !visible); + }, []); + return + + Sidebar Item 1 + + + Sidebar Item 2 + + }> + + ; +}`,...(M=(k=b.parameters)==null?void 0:k.docs)==null?void 0:M.source}}};const J=["Default","Responsive","NavbarMenuForDesktopSidebarDrawerForMobile","RightSideOfPage"];export{d as Default,u as NavbarMenuForDesktopSidebarDrawerForMobile,m as Responsive,b as RightSideOfPage,J as __namedExportsOrder,H as default}; diff --git a/docs/assets/Drawer.stories-a6f75e24.js b/docs/assets/Drawer.stories-a6f75e24.js deleted file mode 100644 index dd002156..00000000 --- a/docs/assets/Drawer.stories-a6f75e24.js +++ /dev/null @@ -1,87 +0,0 @@ -import{t as T,a as i,j as e}from"./tw-merge-4486aaf0.js";import{r as o}from"./index-f46741a2.js";import{c}from"./clsx.m-1229b3e0.js";import{B as g}from"./Button-e31631bb.js";import{N as F}from"./index-44811f16.js";import{M as a}from"./index-1453f494.js";import"./index-8d7e61f2.js";const h=({children:s,side:l,open:r,end:n,dataTheme:t,className:D,toggleClassName:O,contentClassName:B,sideClassName:q,overlayClassName:_,onClickOverlay:j,...L})=>{const R=T("drawer",D,c({"drawer-end":n}));return i("div",{"aria-expanded":r,...L,"data-theme":t,className:R,children:[e("input",{type:"checkbox",className:c("drawer-toggle",O),checked:r,readOnly:!0}),e("div",{className:c("drawer-content",B),children:s}),i("div",{className:c("drawer-side",q),children:[e("label",{className:c("drawer-overlay",_),onClick:j}),l]})]})},p=h;try{h.displayName="Drawer",h.__docgenInfo={description:"",displayName:"Drawer",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},side:{defaultValue:null,description:"",name:"side",required:!0,type:{name:"ReactNode"}},open:{defaultValue:null,description:"",name:"open",required:!1,type:{name:"boolean"}},end:{defaultValue:null,description:"",name:"end",required:!1,type:{name:"boolean"}},toggleClassName:{defaultValue:null,description:"",name:"toggleClassName",required:!1,type:{name:"string"}},contentClassName:{defaultValue:null,description:"",name:"contentClassName",required:!1,type:{name:"string"}},sideClassName:{defaultValue:null,description:"",name:"sideClassName",required:!1,type:{name:"string"}},overlayClassName:{defaultValue:null,description:"",name:"overlayClassName",required:!1,type:{name:"string"}},onClickOverlay:{defaultValue:null,description:"",name:"onClickOverlay",required:!1,type:{name:"(() => void)"}}}}}catch{}const H={title:"Layout/Drawer",component:p,argTypes:{side:{control:!1}}},d=s=>{const[l,r]=o.useState(!1),n=o.useCallback(()=>{r(t=>!t)},[]);return e(p,{...s,open:l,onClickOverlay:n,side:i(a,{className:"p-4 w-80 h-full bg-base-200 text-base-content",children:[e(a.Item,{children:e("a",{children:"Sidebar Item 1"})}),e(a.Item,{children:e("a",{children:"Sidebar Item 2"})})]}),children:e(g,{color:"primary",onClick:n,children:"Open drawer"})})};d.args={sideClassName:"h-full absolute",contentClassName:"flex h-56 items-center justify-center"};const m=s=>{const[l,r]=o.useState(!1),n=o.useCallback(()=>{r(t=>!t)},[]);return e(p,{...s,open:l,onClickOverlay:n,side:i(a,{className:"p-4 w-80 h-full bg-base-200 text-base-content",children:[e(a.Item,{children:e("a",{children:"Sidebar Item 1"})}),e(a.Item,{children:e("a",{children:"Sidebar Item 2"})})]}),children:e(g,{color:"primary",onClick:n,className:"lg:hidden",children:"Open drawer"})})};m.args={className:"lg:drawer-open",sideClassName:"h-full absolute",contentClassName:"flex h-56 items-center justify-center"};const u=s=>{const[l,r]=o.useState(!1),n=o.useCallback(()=>{r(t=>!t)},[]);return i(p,{...s,open:l,onClickOverlay:n,side:i(a,{className:"p-4 w-60 md:w-80 h-full bg-base-200",children:[e(a.Item,{children:e("a",{children:"Sidebar Item 1"})}),e(a.Item,{children:e("a",{children:"Sidebar Item 2"})})]}),children:[i(F,{className:"w-full bg-base-300",children:[e("div",{className:"flex-none lg:hidden",children:e(g,{shape:"square",color:"ghost",onClick:n,children:e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-6 h-6 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4 6h16M4 12h16M4 18h16"})})})}),e("div",{className:"flex-1 px-2 mx-2",children:"Navbar Title"}),e("div",{className:"flex-none hidden lg:block",children:i(a,{horizontal:!0,children:[e(a.Item,{children:e("a",{children:"Navbar Item 1"})}),e(a.Item,{children:e("a",{children:"Navbar Item 2"})})]})})]}),e("div",{className:"flex flex-grow items-center justify-center",children:"Content"})]})};u.args={className:"h-56 rounded overflow-hidden",contentClassName:"flex flex-col"};const b=s=>{const[l,r]=o.useState(!1),n=o.useCallback(()=>{r(t=>!t)},[]);return e(p,{...s,open:l,onClickOverlay:n,side:i(a,{className:"p-4 w-80 h-full bg-base-200 text-base-content",children:[e(a.Item,{children:e("a",{children:"Sidebar Item 1"})}),e(a.Item,{children:e("a",{children:"Sidebar Item 2"})})]}),children:e(g,{color:"primary",onClick:n,children:"Open drawer"})})};b.args={sideClassName:"h-full absolute ms-[-100vw] w-[stretch]",contentClassName:"flex h-56 items-center justify-center",end:!0};var f,v,w;d.parameters={...d.parameters,docs:{...(f=d.parameters)==null?void 0:f.docs,source:{originalSource:`args => { - const [visible, setVisible] = useState(false); - const toggleVisible = useCallback(() => { - setVisible(visible => !visible); - }, []); - return - - Sidebar Item 1 - - - Sidebar Item 2 - - }> - - ; -}`,...(w=(v=d.parameters)==null?void 0:v.docs)==null?void 0:w.source}}};var N,I,C;m.parameters={...m.parameters,docs:{...(N=m.parameters)==null?void 0:N.docs,source:{originalSource:`args => { - const [visible, setVisible] = useState(false); - const toggleVisible = useCallback(() => { - setVisible(visible => !visible); - }, []); - return - - Sidebar Item 1 - - - Sidebar Item 2 - - }> - - ; -}`,...(C=(I=m.parameters)==null?void 0:I.docs)==null?void 0:C.source}}};var k,M,y;u.parameters={...u.parameters,docs:{...(k=u.parameters)==null?void 0:k.docs,source:{originalSource:`args => { - const [visible, setVisible] = useState(false); - const toggleVisible = useCallback(() => { - setVisible(visible => !visible); - }, []); - return - - Sidebar Item 1 - - - Sidebar Item 2 - - }> - -
- -
-
Navbar Title
-
- - - Navbar Item 1 - - - Navbar Item 2 - - -
-
-
Content
-
; -}`,...(y=(M=u.parameters)==null?void 0:M.docs)==null?void 0:y.source}}};var x,V,S;b.parameters={...b.parameters,docs:{...(x=b.parameters)==null?void 0:x.docs,source:{originalSource:`args => { - const [visible, setVisible] = useState(false); - const toggleVisible = useCallback(() => { - setVisible(visible => !visible); - }, []); - return - - Sidebar Item 1 - - - Sidebar Item 2 - - }> - - ; -}`,...(S=(V=b.parameters)==null?void 0:V.docs)==null?void 0:S.source}}};const J=["Default","Responsive","NavbarMenuForDesktopSidebarDrawerForMobile","RightSideOfPage"];export{d as Default,u as NavbarMenuForDesktopSidebarDrawerForMobile,m as Responsive,b as RightSideOfPage,J as __namedExportsOrder,H as default}; diff --git a/docs/assets/Dropdown.stories-3wgy_iGg.js b/docs/assets/Dropdown.stories-3wgy_iGg.js new file mode 100644 index 00000000..32231ac3 --- /dev/null +++ b/docs/assets/Dropdown.stories-3wgy_iGg.js @@ -0,0 +1,63 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{D as r}from"./index-BfJ2msvr.js";import{C as d}from"./index-DIaYqioD.js";import{N as c}from"./index-pbAkFGQM.js";import{B as f}from"./Button-GtH5nISf.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";import"./index-Dl-l57lR.js";const A={title:"Actions/Dropdown",component:r,argTypes:{item:{control:!1}}},a=o=>e.jsx("div",{className:"my-32",children:e.jsxs(r,{...o,children:[e.jsx(r.Toggle,{children:"Click"}),e.jsxs(r.Menu,{className:"w-52",children:[e.jsx(r.Item,{children:"Item 1"}),e.jsx(r.Item,{children:"Item 2"})]})]})}),t=o=>e.jsx("div",{className:"my-32",children:e.jsxs(r,{...o,children:[e.jsx(r.Toggle,{children:"Click"}),e.jsx(r.Menu,{className:"card card-compact w-64 p-2 shadow bg-primary text-primary-content m-1",children:e.jsxs(d.Body,{children:[e.jsx(d.Title,{tag:"h3",children:"Card title!"}),e.jsx("p",{children:"you can use any element as a dropdown."})]})})]})}),n=({dataTheme:o,...N})=>e.jsxs(c,{className:"my-32 px-2 font-sans bg-base-300 rounded-box",dataTheme:o,children:[e.jsx(c.Start,{className:"px-2 lg:flex-none",children:e.jsx("span",{className:"text-lg font-bold",children:"daisyUI"})}),e.jsxs(c.End,{children:[e.jsx(f,{color:"ghost",dataTheme:o,children:"Button"}),e.jsxs(r,{...N,dataTheme:o,children:[e.jsx(r.Toggle,{className:"btn btn-ghost rounded-btn",button:!1,children:"Dropdown"}),e.jsxs(r.Menu,{className:"w-52 mt-4",children:[e.jsx(r.Item,{children:"Item 1"}),e.jsx(r.Item,{children:"Item 2"})]})]})]})]});n.args={end:!0};const s=o=>e.jsxs("div",{className:"my-32 font-sans",children:["A normal text and a helper dropdown",e.jsxs(r,{...o,children:[e.jsx(r.Toggle,{button:!1,className:"btn btn-circle btn-ghost btn-xs text-info",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"w-4 h-4 stroke-current",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),e.jsx(r.Menu,{className:"card compact w-64 !p-0 shadow bg-base-100 rounded-box",children:e.jsxs(d.Body,{children:[e.jsx(d.Title,{tag:"h2",children:"You needed more info?"}),e.jsx("p",{children:"Here is a description!"})]})})]})]});s.args={end:!0};var l,m,p;a.parameters={...a.parameters,docs:{...(l=a.parameters)==null?void 0:l.docs,source:{originalSource:`args => { + return
+ + Click + + Item 1 + Item 2 + + +
; +}`,...(p=(m=a.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};var i,h,g;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`args => { + return
+ + Click + + + Card title! +

you can use any element as a dropdown.

+
+
+
+
; +}`,...(g=(h=t.parameters)==null?void 0:h.docs)==null?void 0:g.source}}};var u,w,x;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`({ + dataTheme, + ...args +}) => { + return + + daisyUI + + + + + + Dropdown + + + Item 1 + Item 2 + + + + ; +}`,...(x=(w=n.parameters)==null?void 0:w.docs)==null?void 0:x.source}}};var b,D,j;s.parameters={...s.parameters,docs:{...(b=s.parameters)==null?void 0:b.docs,source:{originalSource:`args => { + return
+ A normal text and a helper dropdown + + + + + + + + + You needed more info? +

Here is a description!

+
+
+
+
; +}`,...(j=(D=s.parameters)==null?void 0:D.docs)==null?void 0:j.source}}};const E=["Default","AsCard","InNavbar","Helper"];export{t as AsCard,a as Default,s as Helper,n as InNavbar,E as __namedExportsOrder,A as default}; diff --git a/docs/assets/Dropdown.stories-6e700d32.js b/docs/assets/Dropdown.stories-6e700d32.js deleted file mode 100644 index 3b5e90c8..00000000 --- a/docs/assets/Dropdown.stories-6e700d32.js +++ /dev/null @@ -1,63 +0,0 @@ -import{j as e,a as r}from"./tw-merge-4486aaf0.js";import{D as n}from"./index-8ea57d49.js";import{C as c}from"./index-92e1ed70.js";import{N as l}from"./index-44811f16.js";import{B as y}from"./Button-e31631bb.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";import"./index-8d7e61f2.js";const A={title:"Actions/Dropdown",component:n,argTypes:{item:{control:!1}}},s=o=>e("div",{className:"my-32",children:r(n,{...o,children:[e(n.Toggle,{children:"Click"}),r(n.Menu,{className:"w-52",children:[e(n.Item,{children:"Item 1"}),e(n.Item,{children:"Item 2"})]})]})}),d=o=>e("div",{className:"my-32",children:r(n,{...o,children:[e(n.Toggle,{children:"Click"}),e(n.Menu,{className:"card card-compact w-64 p-2 shadow bg-primary text-primary-content m-1",children:r(c.Body,{children:[e(c.Title,{tag:"h3",children:"Card title!"}),e("p",{children:"you can use any element as a dropdown."})]})})]})}),a=({dataTheme:o,...v})=>r(l,{className:"my-32 px-2 font-sans bg-base-300 rounded-box",dataTheme:o,children:[e(l.Start,{className:"px-2 lg:flex-none",children:e("span",{className:"text-lg font-bold",children:"daisyUI"})}),r(l.End,{children:[e(y,{color:"ghost",dataTheme:o,children:"Button"}),r(n,{...v,dataTheme:o,children:[e(n.Toggle,{className:"btn btn-ghost rounded-btn",button:!1,children:"Dropdown"}),r(n.Menu,{className:"w-52 mt-4",children:[e(n.Item,{children:"Item 1"}),e(n.Item,{children:"Item 2"})]})]})]})]});a.args={end:!0};const t=o=>r("div",{className:"my-32 font-sans",children:["A normal text and a helper dropdown",r(n,{...o,children:[e(n.Toggle,{button:!1,className:"btn btn-circle btn-ghost btn-xs text-info",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"w-4 h-4 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),e(n.Menu,{className:"card compact w-64 !p-0 shadow bg-base-100 rounded-box",children:r(c.Body,{children:[e(c.Title,{tag:"h2",children:"You needed more info?"}),e("p",{children:"Here is a description!"})]})})]})]});t.args={end:!0};var m,p,i;s.parameters={...s.parameters,docs:{...(m=s.parameters)==null?void 0:m.docs,source:{originalSource:`args => { - return
- - Click - - Item 1 - Item 2 - - -
; -}`,...(i=(p=s.parameters)==null?void 0:p.docs)==null?void 0:i.source}}};var h,g,w;d.parameters={...d.parameters,docs:{...(h=d.parameters)==null?void 0:h.docs,source:{originalSource:`args => { - return
- - Click - - - Card title! -

you can use any element as a dropdown.

-
-
-
-
; -}`,...(w=(g=d.parameters)==null?void 0:g.docs)==null?void 0:w.source}}};var u,b,D;a.parameters={...a.parameters,docs:{...(u=a.parameters)==null?void 0:u.docs,source:{originalSource:`({ - dataTheme, - ...args -}) => { - return - - daisyUI - - - - - - Dropdown - - - Item 1 - Item 2 - - - - ; -}`,...(D=(b=a.parameters)==null?void 0:b.docs)==null?void 0:D.source}}};var N,x,f;t.parameters={...t.parameters,docs:{...(N=t.parameters)==null?void 0:N.docs,source:{originalSource:`args => { - return
- A normal text and a helper dropdown - - - - - - - - - You needed more info? -

Here is a description!

-
-
-
-
; -}`,...(f=(x=t.parameters)==null?void 0:x.docs)==null?void 0:f.source}}};const E=["Default","AsCard","InNavbar","Helper"];export{d as AsCard,s as Default,t as Helper,a as InNavbar,E as __namedExportsOrder,A as default}; diff --git a/docs/assets/DropdownDetails.stories-PrBHpvjM.js b/docs/assets/DropdownDetails.stories-PrBHpvjM.js new file mode 100644 index 00000000..794588a8 --- /dev/null +++ b/docs/assets/DropdownDetails.stories-PrBHpvjM.js @@ -0,0 +1,11 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{D as o}from"./index-BfJ2msvr.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";import"./Button-GtH5nISf.js";import"./index-Dl-l57lR.js";const w={title:"Actions/Dropdown/Details",component:o.Details},r=a=>e.jsx("div",{className:"my-32",children:e.jsxs(o.Details,{...a,children:[e.jsx(o.Details.Toggle,{children:"Click"}),e.jsxs(o.Menu,{className:"w-52",children:[e.jsx(o.Item,{children:"Item 1"}),e.jsx(o.Item,{children:"Item 2"})]})]})});r.args={};var s,t,n;r.parameters={...r.parameters,docs:{...(s=r.parameters)==null?void 0:s.docs,source:{originalSource:`args => { + return
+ + Click + + Item 1 + Item 2 + + +
; +}`,...(n=(t=r.parameters)==null?void 0:t.docs)==null?void 0:n.source}}};const u=["Default"];export{r as Default,u as __namedExportsOrder,w as default}; diff --git a/docs/assets/DropdownDetails.stories-d1cc8002.js b/docs/assets/DropdownDetails.stories-d1cc8002.js deleted file mode 100644 index 69357c40..00000000 --- a/docs/assets/DropdownDetails.stories-d1cc8002.js +++ /dev/null @@ -1,11 +0,0 @@ -import{j as r,a as t}from"./tw-merge-4486aaf0.js";import{D as e}from"./index-8ea57d49.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";import"./Button-e31631bb.js";import"./index-8d7e61f2.js";const w={title:"Actions/Dropdown/Details",component:e.Details},o=i=>r("div",{className:"my-32",children:t(e.Details,{...i,children:[r(e.Details.Toggle,{children:"Click"}),t(e.Menu,{className:"w-52",children:[r(e.Item,{children:"Item 1"}),r(e.Item,{children:"Item 2"})]})]})});o.args={};var s,n,a;o.parameters={...o.parameters,docs:{...(s=o.parameters)==null?void 0:s.docs,source:{originalSource:`args => { - return
- - Click - - Item 1 - Item 2 - - -
; -}`,...(a=(n=o.parameters)==null?void 0:n.docs)==null?void 0:a.source}}};const u=["Default"];export{o as Default,u as __namedExportsOrder,w as default}; diff --git a/docs/assets/FileInput.stories-42f94857.js b/docs/assets/FileInput.stories-42f94857.js deleted file mode 100644 index a401653d..00000000 --- a/docs/assets/FileInput.stories-42f94857.js +++ /dev/null @@ -1,35 +0,0 @@ -import{t as q,j as a,a as o}from"./tw-merge-4486aaf0.js";import{c as S}from"./clsx.m-1229b3e0.js";import{r as V}from"./index-f46741a2.js";const p=V.forwardRef(({className:e,size:c,color:s,bordered:h,dataTheme:w,..._},z)=>{const A=q("file-input",e,S({"file-input-lg":c==="lg","file-input-md":c==="md","file-input-sm":c==="sm","file-input-xs":c==="xs","file-input-primary":s==="primary","file-input-secondary":s==="secondary","file-input-accent":s==="accent","file-input-ghost":s==="ghost","file-input-info":s==="info","file-input-success":s==="success","file-input-warning":s==="warning","file-input-error":s==="error","file-input-bordered":h}));return a("input",{..._,ref:z,type:"file","data-theme":w,className:A})});p.displayName="FileInput";const l=p;try{p.displayName="FileInput",p.__docgenInfo={description:"",displayName:"FileInput",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},bordered:{defaultValue:null,description:"",name:"bordered",required:!1,type:{name:"boolean"}}}}}catch{}try{l.displayName="FileInput",l.__docgenInfo={description:"",displayName:"FileInput",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},bordered:{defaultValue:null,description:"",name:"bordered",required:!1,type:{name:"boolean"}}}}}catch{}const k={title:"Data Input/FileInput",component:l,args:{className:"w-full max-w-xs",disabled:!1}},j=e=>a(l,{...e}),r=j.bind({});r.args={};const n=e=>o("div",{className:"w-full flex flex-col gap-2",children:[a(l,{...e,color:"primary"}),a(l,{...e,color:"secondary"}),a(l,{...e,color:"accent"}),a(l,{...e,color:"ghost"}),a(l,{...e,color:"info"}),a(l,{...e,color:"success"}),a(l,{...e,color:"warning"}),a(l,{...e,color:"error"})]});n.args={};const t=e=>o("div",{className:"flex flex-col gap-4 w-full items-center",children:[a(l,{...e,size:"xs"}),a(l,{...e,size:"sm"}),a(l,{...e,size:"md"}),a(l,{...e,size:"lg"})]});t.args={};const i=e=>a("div",{className:"flex w-full component-preview p-4 items-center justify-center gap-2 font-sans",children:o("div",{className:"form-control w-full max-w-xs",children:[o("label",{className:"label",children:[a("span",{className:"label-text",children:"Pick a file"}),a("span",{className:"label-text-alt",children:"Alt label"})]}),a(l,{...e}),o("label",{className:"label",children:[a("span",{className:"label-text-alt",children:"Alt label"}),a("span",{className:"label-text-alt",children:"Alt label"})]})]})});i.args={};var u,m,d;r.parameters={...r.parameters,docs:{...(u=r.parameters)==null?void 0:u.docs,source:{originalSource:`args => { - return ; -}`,...(d=(m=r.parameters)==null?void 0:m.docs)==null?void 0:d.source}}};var f,g,x;n.parameters={...n.parameters,docs:{...(f=n.parameters)==null?void 0:f.docs,source:{originalSource:`args => { - return
- - - - - - - - -
; -}`,...(x=(g=n.parameters)==null?void 0:g.docs)==null?void 0:x.source}}};var b,N,y;t.parameters={...t.parameters,docs:{...(b=t.parameters)==null?void 0:b.docs,source:{originalSource:`args => { - return
- - - - -
; -}`,...(y=(N=t.parameters)==null?void 0:N.docs)==null?void 0:y.source}}};var I,F,v;i.parameters={...i.parameters,docs:{...(I=i.parameters)==null?void 0:I.docs,source:{originalSource:`args => { - return
-
- - - -
-
; -}`,...(v=(F=i.parameters)==null?void 0:F.docs)==null?void 0:v.source}}};const E=["Default","Colors","Sizes","FormControlAndLabels"];export{n as Colors,r as Default,i as FormControlAndLabels,t as Sizes,E as __namedExportsOrder,k as default}; diff --git a/docs/assets/FileInput.stories-BMit3RyM.js b/docs/assets/FileInput.stories-BMit3RyM.js new file mode 100644 index 00000000..7551cbe3 --- /dev/null +++ b/docs/assets/FileInput.stories-BMit3RyM.js @@ -0,0 +1,35 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{c as _}from"./clsx-B-dksMZM.js";import{r as z}from"./iframe-DDnXVYpC.js";import{t as A}from"./bundle-mjs-yGZq-iow.js";const a=z.forwardRef(({className:l,size:r,color:s,bordered:y,dataTheme:I,...F},h)=>{const w=A("file-input",l,_({"file-input-xl":r==="xl","file-input-lg":r==="lg","file-input-md":r==="md","file-input-sm":r==="sm","file-input-xs":r==="xs","file-input-primary":s==="primary","file-input-secondary":s==="secondary","file-input-accent":s==="accent","file-input-ghost":s==="ghost","file-input-info":s==="info","file-input-success":s==="success","file-input-warning":s==="warning","file-input-error":s==="error","file-input-bordered":y}));return e.jsx("input",{...F,ref:h,type:"file","data-theme":I,className:w})});a.displayName="FileInput";try{a.displayName="FileInput",a.__docgenInfo={description:"",displayName:"FileInput",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xl"'},{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},bordered:{defaultValue:null,description:"",name:"bordered",required:!1,type:{name:"boolean"}}}}}catch{}try{a.displayName="FileInput",a.__docgenInfo={description:"",displayName:"FileInput",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xl"'},{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},bordered:{defaultValue:null,description:"",name:"bordered",required:!1,type:{name:"boolean"}}}}}catch{}const D={title:"Data Input/FileInput",component:a,args:{className:"w-full max-w-xs",disabled:!1}},q=l=>e.jsx(a,{...l}),n=q.bind({});n.args={};const t=l=>e.jsxs("div",{className:"w-full flex flex-col gap-2",children:[e.jsx(a,{...l,color:"primary"}),e.jsx(a,{...l,color:"secondary"}),e.jsx(a,{...l,color:"accent"}),e.jsx(a,{...l,color:"ghost"}),e.jsx(a,{...l,color:"info"}),e.jsx(a,{...l,color:"success"}),e.jsx(a,{...l,color:"warning"}),e.jsx(a,{...l,color:"error"})]});t.args={};const i=l=>e.jsxs("div",{className:"flex flex-col gap-4 w-full items-center",children:[e.jsx(a,{...l,size:"xs"}),e.jsx(a,{...l,size:"sm"}),e.jsx(a,{...l,size:"md"}),e.jsx(a,{...l,size:"lg"})]});i.args={};const o=l=>e.jsx("div",{className:"flex w-full component-preview p-4 items-center justify-center gap-2 font-sans",children:e.jsxs("div",{className:"form-control w-full max-w-xs",children:[e.jsxs("label",{className:"label",children:[e.jsx("span",{className:"label-text",children:"Pick a file"}),e.jsx("span",{className:"label-text-alt",children:"Alt label"})]}),e.jsx(a,{...l}),e.jsxs("label",{className:"label",children:[e.jsx("span",{className:"label-text-alt",children:"Alt label"}),e.jsx("span",{className:"label-text-alt",children:"Alt label"})]})]})});o.args={};var c,p,u;n.parameters={...n.parameters,docs:{...(c=n.parameters)==null?void 0:c.docs,source:{originalSource:`args => { + return ; +}`,...(u=(p=n.parameters)==null?void 0:p.docs)==null?void 0:u.source}}};var m,d,f;t.parameters={...t.parameters,docs:{...(m=t.parameters)==null?void 0:m.docs,source:{originalSource:`args => { + return
+ + + + + + + + +
; +}`,...(f=(d=t.parameters)==null?void 0:d.docs)==null?void 0:f.source}}};var x,g,b;i.parameters={...i.parameters,docs:{...(x=i.parameters)==null?void 0:x.docs,source:{originalSource:`args => { + return
+ + + + +
; +}`,...(b=(g=i.parameters)==null?void 0:g.docs)==null?void 0:b.source}}};var j,N,v;o.parameters={...o.parameters,docs:{...(j=o.parameters)==null?void 0:j.docs,source:{originalSource:`args => { + return
+
+ + + +
+
; +}`,...(v=(N=o.parameters)==null?void 0:N.docs)==null?void 0:v.source}}};const E=["Default","Colors","Sizes","FormControlAndLabels"];export{t as Colors,n as Default,o as FormControlAndLabels,i as Sizes,E as __namedExportsOrder,D as default}; diff --git a/docs/assets/Footer.stories-59363e51.js b/docs/assets/Footer.stories-59363e51.js deleted file mode 100644 index 594f2b33..00000000 --- a/docs/assets/Footer.stories-59363e51.js +++ /dev/null @@ -1,115 +0,0 @@ -import{t as C,j as e,a as n}from"./tw-merge-4486aaf0.js";import{R as _}from"./index-f46741a2.js";import{c as P}from"./clsx.m-1229b3e0.js";const h=_.forwardRef(({className:a,...t},c)=>{const d=C("footer-title",a);return e("span",{...t,className:d,ref:c})}),M=h;try{h.displayName="FooterTitle",h.__docgenInfo={description:"",displayName:"FooterTitle",props:{}}}catch{}const k=_.forwardRef(({center:a,dataTheme:t,className:c,...d},A)=>{const L=C("footer",c,P({"footer-center":a}));return e("div",{role:"contentinfo",...d,"data-theme":t,className:L,ref:A})}),l=Object.assign(k,{Title:M});try{k.displayName="Footer",k.__docgenInfo={description:"",displayName:"Footer",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},center:{defaultValue:null,description:"",name:"center",required:!1,type:{name:"boolean"}}}}}catch{}try{l.displayName="Footer",l.__docgenInfo={description:"",displayName:"Footer",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},center:{defaultValue:null,description:"",name:"center",required:!1,type:{name:"boolean"}}}}}catch{}const D={title:"Layout/Footer",component:l},x=a=>n(l,{className:"p-10 bg-neutral text-neutral-content",...a,children:[n("div",{children:[e(l.Title,{children:"Services"}),e("a",{className:"link link-hover",children:"Branding"}),e("a",{className:"link link-hover",children:"Design"}),e("a",{className:"link link-hover",children:"Marketing"}),e("a",{className:"link link-hover",children:"Advertisement"})]}),n("div",{children:[e(l.Title,{children:"Company"}),e("a",{className:"link link-hover",children:"About us"}),e("a",{className:"link link-hover",children:"Contact"}),e("a",{className:"link link-hover",children:"Jobs"}),e("a",{className:"link link-hover",children:"Press kit"})]}),n("div",{children:[e(l.Title,{children:"Legal"}),e("a",{className:"link link-hover",children:"Terms of use"}),e("a",{className:"link link-hover",children:"Privacy policy"}),e("a",{className:"link link-hover",children:"Cookie policy"})]})]}),i=x.bind({});i.args={};const r=x.bind({});r.args={center:!0};const s=a=>n(l,{className:"p-10 bg-neutral text-neutral-content",...a,children:[n("div",{children:[e("svg",{width:"50",height:"50",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",className:"fill-current",children:e("path",{d:"M22.672 15.226l-2.432.811.841 2.515c.33 1.019-.209 2.127-1.23 2.456-1.15.325-2.148-.321-2.463-1.226l-.84-2.518-5.013 1.677.84 2.517c.391 1.203-.434 2.542-1.831 2.542-.88 0-1.601-.564-1.86-1.314l-.842-2.516-2.431.809c-1.135.328-2.145-.317-2.463-1.229-.329-1.018.211-2.127 1.231-2.456l2.432-.809-1.621-4.823-2.432.808c-1.355.384-2.558-.59-2.558-1.839 0-.817.509-1.582 1.327-1.846l2.433-.809-.842-2.515c-.33-1.02.211-2.129 1.232-2.458 1.02-.329 2.13.209 2.461 1.229l.842 2.515 5.011-1.677-.839-2.517c-.403-1.238.484-2.553 1.843-2.553.819 0 1.585.509 1.85 1.326l.841 2.517 2.431-.81c1.02-.33 2.131.211 2.461 1.229.332 1.018-.21 2.126-1.23 2.456l-2.433.809 1.622 4.823 2.433-.809c1.242-.401 2.557.484 2.557 1.838 0 .819-.51 1.583-1.328 1.847m-8.992-6.428l-5.01 1.675 1.619 4.828 5.011-1.674-1.62-4.829z"})}),n("p",{children:["ACME Industries Ltd.",e("br",{}),"Providing reliable tech since 1992"]})]}),n("div",{children:[e(l.Title,{children:"Services"}),e("a",{className:"link link-hover",children:"Branding"}),e("a",{className:"link link-hover",children:"Design"}),e("a",{className:"link link-hover",children:"Marketing"}),e("a",{className:"link link-hover",children:"Advertisement"})]}),n("div",{children:[e(l.Title,{children:"Company"}),e("a",{className:"link link-hover",children:"About us"}),e("a",{className:"link link-hover",children:"Contact"}),e("a",{className:"link link-hover",children:"Jobs"}),e("a",{className:"link link-hover",children:"Press kit"})]}),n("div",{children:[e(l.Title,{children:"Legal"}),e("a",{className:"link link-hover",children:"Terms of use"}),e("a",{className:"link link-hover",children:"Privacy policy"}),e("a",{className:"link link-hover",children:"Cookie policy"})]})]}),o=a=>n(l,{className:"p-10 bg-primary text-secondary-content",...a,children:[n("div",{children:[e("svg",{width:"50",height:"50",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",className:"fill-current",children:e("path",{d:"M22.672 15.226l-2.432.811.841 2.515c.33 1.019-.209 2.127-1.23 2.456-1.15.325-2.148-.321-2.463-1.226l-.84-2.518-5.013 1.677.84 2.517c.391 1.203-.434 2.542-1.831 2.542-.88 0-1.601-.564-1.86-1.314l-.842-2.516-2.431.809c-1.135.328-2.145-.317-2.463-1.229-.329-1.018.211-2.127 1.231-2.456l2.432-.809-1.621-4.823-2.432.808c-1.355.384-2.558-.59-2.558-1.839 0-.817.509-1.582 1.327-1.846l2.433-.809-.842-2.515c-.33-1.02.211-2.129 1.232-2.458 1.02-.329 2.13.209 2.461 1.229l.842 2.515 5.011-1.677-.839-2.517c-.403-1.238.484-2.553 1.843-2.553.819 0 1.585.509 1.85 1.326l.841 2.517 2.431-.81c1.02-.33 2.131.211 2.461 1.229.332 1.018-.21 2.126-1.23 2.456l-2.433.809 1.622 4.823 2.433-.809c1.242-.401 2.557.484 2.557 1.838 0 .819-.51 1.583-1.328 1.847m-8.992-6.428l-5.01 1.675 1.619 4.828 5.011-1.674-1.62-4.829z"})}),n("p",{children:["ACME Industries Ltd.",e("br",{}),"Providing reliable tech since 1992"]})]}),n("div",{children:[e(l.Title,{children:"Services"}),e("a",{className:"link link-hover",children:"Branding"}),e("a",{className:"link link-hover",children:"Design"}),e("a",{className:"link link-hover",children:"Marketing"}),e("a",{className:"link link-hover",children:"Advertisement"})]}),n("div",{children:[e(l.Title,{children:"Company"}),e("a",{className:"link link-hover",children:"About us"}),e("a",{className:"link link-hover",children:"Contact"}),e("a",{className:"link link-hover",children:"Jobs"}),e("a",{className:"link link-hover",children:"Press kit"})]}),n("div",{children:[e(l.Title,{children:"Legal"}),e("a",{className:"link link-hover",children:"Terms of use"}),e("a",{className:"link link-hover",children:"Privacy policy"}),e("a",{className:"link link-hover",children:"Cookie policy"})]})]});var m,v,p;i.parameters={...i.parameters,docs:{...(m=i.parameters)==null?void 0:m.docs,source:{originalSource:`args => { - return ; -}`,...(p=(v=i.parameters)==null?void 0:v.docs)==null?void 0:p.source}}};var N,u,g;r.parameters={...r.parameters,docs:{...(N=r.parameters)==null?void 0:N.docs,source:{originalSource:`args => { - return ; -}`,...(g=(u=r.parameters)==null?void 0:u.docs)==null?void 0:g.source}}};var T,y,F;s.parameters={...s.parameters,docs:{...(T=s.parameters)==null?void 0:T.docs,source:{originalSource:`args => { - return ; -}`,...(F=(y=s.parameters)==null?void 0:y.docs)==null?void 0:F.source}}};var f,b,w;o.parameters={...o.parameters,docs:{...(f=o.parameters)==null?void 0:f.docs,source:{originalSource:`args => { - return ; -}`,...(w=(b=o.parameters)==null?void 0:b.docs)==null?void 0:w.source}}};const I=["Default","Centered","WithLogo","WithLogoAndLightBackground"];export{r as Centered,i as Default,s as WithLogo,o as WithLogoAndLightBackground,I as __namedExportsOrder,D as default}; diff --git a/docs/assets/Footer.stories-C7uKrRmY.js b/docs/assets/Footer.stories-C7uKrRmY.js new file mode 100644 index 00000000..5790f517 --- /dev/null +++ b/docs/assets/Footer.stories-C7uKrRmY.js @@ -0,0 +1,115 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{e as F}from"./iframe-DDnXVYpC.js";import{c as L}from"./clsx-B-dksMZM.js";import{t as b}from"./bundle-mjs-yGZq-iow.js";const d=F.forwardRef(({className:l,...s},t)=>{const c=b("footer-title",l);return e.jsx("span",{...s,className:c,ref:t})});try{d.displayName="FooterTitle",d.__docgenInfo={description:"",displayName:"FooterTitle",props:{}}}catch{}const h=F.forwardRef(({center:l,layout:s="vertical",dataTheme:t,className:c,...C},_)=>{const A=b("footer",c,L({"footer-center":l,"footer-vertical":s==="vertical","footer-horizontal":s==="horizontal"}));return e.jsx("div",{role:"contentinfo",...C,"data-theme":t,className:A,ref:_})}),n=Object.assign(h,{Title:d});try{h.displayName="Footer",h.__docgenInfo={description:"",displayName:"Footer",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},center:{defaultValue:null,description:"",name:"center",required:!1,type:{name:"boolean"}},layout:{defaultValue:{value:"vertical"},description:"",name:"layout",required:!1,type:{name:"enum",value:[{value:'"horizontal"'},{value:'"vertical"'}]}}}}}catch{}try{n.displayName="Footer",n.__docgenInfo={description:"",displayName:"Footer",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},center:{defaultValue:null,description:"",name:"center",required:!1,type:{name:"boolean"}},layout:{defaultValue:{value:"vertical"},description:"",name:"layout",required:!1,type:{name:"enum",value:[{value:'"horizontal"'},{value:'"vertical"'}]}}}}}catch{}const S={title:"Layout/Footer",component:n},w=l=>e.jsxs(n,{className:"p-10 bg-neutral text-neutral-content",...l,children:[e.jsxs("div",{children:[e.jsx(n.Title,{children:"Services"}),e.jsx("a",{className:"link link-hover",children:"Branding"}),e.jsx("a",{className:"link link-hover",children:"Design"}),e.jsx("a",{className:"link link-hover",children:"Marketing"}),e.jsx("a",{className:"link link-hover",children:"Advertisement"})]}),e.jsxs("div",{children:[e.jsx(n.Title,{children:"Company"}),e.jsx("a",{className:"link link-hover",children:"About us"}),e.jsx("a",{className:"link link-hover",children:"Contact"}),e.jsx("a",{className:"link link-hover",children:"Jobs"}),e.jsx("a",{className:"link link-hover",children:"Press kit"})]}),e.jsxs("div",{children:[e.jsx(n.Title,{children:"Legal"}),e.jsx("a",{className:"link link-hover",children:"Terms of use"}),e.jsx("a",{className:"link link-hover",children:"Privacy policy"}),e.jsx("a",{className:"link link-hover",children:"Cookie policy"})]})]}),a=w.bind({});a.args={};const i=w.bind({});i.args={center:!0};const r=l=>e.jsxs(n,{className:"p-10 bg-neutral text-neutral-content",...l,children:[e.jsxs("div",{children:[e.jsx("svg",{width:"50",height:"50",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",className:"fill-current",children:e.jsx("path",{d:"M22.672 15.226l-2.432.811.841 2.515c.33 1.019-.209 2.127-1.23 2.456-1.15.325-2.148-.321-2.463-1.226l-.84-2.518-5.013 1.677.84 2.517c.391 1.203-.434 2.542-1.831 2.542-.88 0-1.601-.564-1.86-1.314l-.842-2.516-2.431.809c-1.135.328-2.145-.317-2.463-1.229-.329-1.018.211-2.127 1.231-2.456l2.432-.809-1.621-4.823-2.432.808c-1.355.384-2.558-.59-2.558-1.839 0-.817.509-1.582 1.327-1.846l2.433-.809-.842-2.515c-.33-1.02.211-2.129 1.232-2.458 1.02-.329 2.13.209 2.461 1.229l.842 2.515 5.011-1.677-.839-2.517c-.403-1.238.484-2.553 1.843-2.553.819 0 1.585.509 1.85 1.326l.841 2.517 2.431-.81c1.02-.33 2.131.211 2.461 1.229.332 1.018-.21 2.126-1.23 2.456l-2.433.809 1.622 4.823 2.433-.809c1.242-.401 2.557.484 2.557 1.838 0 .819-.51 1.583-1.328 1.847m-8.992-6.428l-5.01 1.675 1.619 4.828 5.011-1.674-1.62-4.829z"})}),e.jsxs("p",{children:["ACME Industries Ltd.",e.jsx("br",{}),"Providing reliable tech since 1992"]})]}),e.jsxs("div",{children:[e.jsx(n.Title,{children:"Services"}),e.jsx("a",{className:"link link-hover",children:"Branding"}),e.jsx("a",{className:"link link-hover",children:"Design"}),e.jsx("a",{className:"link link-hover",children:"Marketing"}),e.jsx("a",{className:"link link-hover",children:"Advertisement"})]}),e.jsxs("div",{children:[e.jsx(n.Title,{children:"Company"}),e.jsx("a",{className:"link link-hover",children:"About us"}),e.jsx("a",{className:"link link-hover",children:"Contact"}),e.jsx("a",{className:"link link-hover",children:"Jobs"}),e.jsx("a",{className:"link link-hover",children:"Press kit"})]}),e.jsxs("div",{children:[e.jsx(n.Title,{children:"Legal"}),e.jsx("a",{className:"link link-hover",children:"Terms of use"}),e.jsx("a",{className:"link link-hover",children:"Privacy policy"}),e.jsx("a",{className:"link link-hover",children:"Cookie policy"})]})]}),o=l=>e.jsxs(n,{className:"p-10 bg-primary text-secondary-content",...l,children:[e.jsxs("div",{children:[e.jsx("svg",{width:"50",height:"50",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",className:"fill-current",children:e.jsx("path",{d:"M22.672 15.226l-2.432.811.841 2.515c.33 1.019-.209 2.127-1.23 2.456-1.15.325-2.148-.321-2.463-1.226l-.84-2.518-5.013 1.677.84 2.517c.391 1.203-.434 2.542-1.831 2.542-.88 0-1.601-.564-1.86-1.314l-.842-2.516-2.431.809c-1.135.328-2.145-.317-2.463-1.229-.329-1.018.211-2.127 1.231-2.456l2.432-.809-1.621-4.823-2.432.808c-1.355.384-2.558-.59-2.558-1.839 0-.817.509-1.582 1.327-1.846l2.433-.809-.842-2.515c-.33-1.02.211-2.129 1.232-2.458 1.02-.329 2.13.209 2.461 1.229l.842 2.515 5.011-1.677-.839-2.517c-.403-1.238.484-2.553 1.843-2.553.819 0 1.585.509 1.85 1.326l.841 2.517 2.431-.81c1.02-.33 2.131.211 2.461 1.229.332 1.018-.21 2.126-1.23 2.456l-2.433.809 1.622 4.823 2.433-.809c1.242-.401 2.557.484 2.557 1.838 0 .819-.51 1.583-1.328 1.847m-8.992-6.428l-5.01 1.675 1.619 4.828 5.011-1.674-1.62-4.829z"})}),e.jsxs("p",{children:["ACME Industries Ltd.",e.jsx("br",{}),"Providing reliable tech since 1992"]})]}),e.jsxs("div",{children:[e.jsx(n.Title,{children:"Services"}),e.jsx("a",{className:"link link-hover",children:"Branding"}),e.jsx("a",{className:"link link-hover",children:"Design"}),e.jsx("a",{className:"link link-hover",children:"Marketing"}),e.jsx("a",{className:"link link-hover",children:"Advertisement"})]}),e.jsxs("div",{children:[e.jsx(n.Title,{children:"Company"}),e.jsx("a",{className:"link link-hover",children:"About us"}),e.jsx("a",{className:"link link-hover",children:"Contact"}),e.jsx("a",{className:"link link-hover",children:"Jobs"}),e.jsx("a",{className:"link link-hover",children:"Press kit"})]}),e.jsxs("div",{children:[e.jsx(n.Title,{children:"Legal"}),e.jsx("a",{className:"link link-hover",children:"Terms of use"}),e.jsx("a",{className:"link link-hover",children:"Privacy policy"}),e.jsx("a",{className:"link link-hover",children:"Cookie policy"})]})]});var v,k,m;a.parameters={...a.parameters,docs:{...(v=a.parameters)==null?void 0:v.docs,source:{originalSource:`args => { + return ; +}`,...(m=(k=a.parameters)==null?void 0:k.docs)==null?void 0:m.source}}};var u,p,N;i.parameters={...i.parameters,docs:{...(u=i.parameters)==null?void 0:u.docs,source:{originalSource:`args => { + return ; +}`,...(N=(p=i.parameters)==null?void 0:p.docs)==null?void 0:N.source}}};var g,x,j;r.parameters={...r.parameters,docs:{...(g=r.parameters)==null?void 0:g.docs,source:{originalSource:`args => { + return ; +}`,...(j=(x=r.parameters)==null?void 0:x.docs)==null?void 0:j.source}}};var y,T,f;o.parameters={...o.parameters,docs:{...(y=o.parameters)==null?void 0:y.docs,source:{originalSource:`args => { + return ; +}`,...(f=(T=o.parameters)==null?void 0:T.docs)==null?void 0:f.source}}};const D=["Default","Centered","WithLogo","WithLogoAndLightBackground"];export{i as Centered,a as Default,r as WithLogo,o as WithLogoAndLightBackground,D as __namedExportsOrder,S as default}; diff --git a/docs/assets/Header-BNcRpGpZ.js b/docs/assets/Header-BNcRpGpZ.js new file mode 100644 index 00000000..23ff75a0 --- /dev/null +++ b/docs/assets/Header-BNcRpGpZ.js @@ -0,0 +1 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{B as s}from"./Button-03k-2b2_.js";const a=({user:l,onLogin:n,onLogout:i,onCreateAccount:r})=>e.jsx("header",{children:e.jsxs("div",{className:"storybook-header",children:[e.jsxs("div",{children:[e.jsx("svg",{width:"32",height:"32",viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",children:e.jsxs("g",{fill:"none",fillRule:"evenodd",children:[e.jsx("path",{d:"M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z",fill:"#FFF"}),e.jsx("path",{d:"M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z",fill:"#555AB9"}),e.jsx("path",{d:"M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z",fill:"#91BAF8"})]})}),e.jsx("h1",{children:"Acme"})]}),e.jsx("div",{children:l?e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"welcome",children:["Welcome, ",e.jsx("b",{children:l.name}),"!"]}),e.jsx(s,{size:"small",onClick:i,label:"Log out"})]}):e.jsxs(e.Fragment,{children:[e.jsx(s,{size:"small",onClick:n,label:"Log in"}),e.jsx(s,{primary:!0,size:"small",onClick:r,label:"Sign up"})]})})]})});try{a.displayName="Header",a.__docgenInfo={description:"",displayName:"Header",props:{user:{defaultValue:null,description:"",name:"user",required:!1,type:{name:"User"}},onLogin:{defaultValue:null,description:"",name:"onLogin",required:!1,type:{name:"(() => void)"}},onLogout:{defaultValue:null,description:"",name:"onLogout",required:!1,type:{name:"(() => void)"}},onCreateAccount:{defaultValue:null,description:"",name:"onCreateAccount",required:!1,type:{name:"(() => void)"}}}}}catch{}export{a as H}; diff --git a/docs/assets/Header-Ck-SSN7O.css b/docs/assets/Header-Ck-SSN7O.css new file mode 100644 index 00000000..f7dc3bb8 --- /dev/null +++ b/docs/assets/Header-Ck-SSN7O.css @@ -0,0 +1 @@ +.storybook-header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid rgba(0,0,0,.1);padding:15px 20px;font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif}.storybook-header svg{display:inline-block;vertical-align:top}.storybook-header h1{display:inline-block;vertical-align:top;margin:6px 0 6px 10px;font-weight:700;font-size:20px;line-height:1}.storybook-header button+button{margin-left:10px}.storybook-header .welcome{margin-right:10px;color:#333;font-size:14px} diff --git a/docs/assets/Header.stories-DZmifVr8.js b/docs/assets/Header.stories-DZmifVr8.js new file mode 100644 index 00000000..7bfc981e --- /dev/null +++ b/docs/assets/Header.stories-DZmifVr8.js @@ -0,0 +1,7 @@ +import{H as d}from"./Header-BNcRpGpZ.js";import"./jsx-runtime-BjG_zV1W.js";import"./Button-03k-2b2_.js";const{fn:r}=__STORYBOOK_MODULE_TEST__,i={title:"Example/Header",component:d,tags:["autodocs"],parameters:{layout:"fullscreen"},args:{onLogin:r(),onLogout:r(),onCreateAccount:r()}},e={args:{user:{name:"Jane Doe"}}},o={};var a,s,t;e.parameters={...e.parameters,docs:{...(a=e.parameters)==null?void 0:a.docs,source:{originalSource:`{ + args: { + user: { + name: 'Jane Doe' + } + } +}`,...(t=(s=e.parameters)==null?void 0:s.docs)==null?void 0:t.source}}};var n,c,m;o.parameters={...o.parameters,docs:{...(n=o.parameters)==null?void 0:n.docs,source:{originalSource:"{}",...(m=(c=o.parameters)==null?void 0:c.docs)==null?void 0:m.source}}};const l=["LoggedIn","LoggedOut"];export{e as LoggedIn,o as LoggedOut,l as __namedExportsOrder,i as default}; diff --git a/docs/assets/Hero-23d1d87a.js b/docs/assets/Hero-23d1d87a.js deleted file mode 100644 index 0e7cf132..00000000 --- a/docs/assets/Hero-23d1d87a.js +++ /dev/null @@ -1 +0,0 @@ -import{t as l,j as i}from"./tw-merge-4486aaf0.js";import{R as p}from"./index-f46741a2.js";const n=p.forwardRef(({dataTheme:e,className:r,children:a,...t},o)=>{const s=l("hero-content",r);return i("div",{...t,"data-theme":e,className:s,ref:o,children:a})}),m=n;try{n.displayName="HeroContent",n.__docgenInfo={description:"",displayName:"HeroContent",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const c=p.forwardRef(({dataTheme:e,className:r,children:a,...t},o)=>{const s=l("hero-overlay",r);return i("div",{...t,"data-theme":e,className:s,ref:o,children:a})}),_=c;try{c.displayName="HeroOverlay",c.__docgenInfo={description:"",displayName:"HeroOverlay",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const d=p.forwardRef(({dataTheme:e,className:r,children:a,...t},o)=>{const s=l("hero",r);return i("div",{role:"banner",...t,"data-theme":e,className:s,ref:o,children:a})}),h=Object.assign(d,{Content:m,Overlay:_});try{d.displayName="Hero",d.__docgenInfo={description:"",displayName:"Hero",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}export{h as H}; diff --git a/docs/assets/Hero.stories-0b1c8797.js b/docs/assets/Hero.stories-0b1c8797.js deleted file mode 100644 index 1d73dac9..00000000 --- a/docs/assets/Hero.stories-0b1c8797.js +++ /dev/null @@ -1,82 +0,0 @@ -import{j as e,a as t}from"./tw-merge-4486aaf0.js";import{H as a}from"./Hero-23d1d87a.js";import{B as d}from"./Button-e31631bb.js";import{C as c}from"./index-92e1ed70.js";import{I as m}from"./index-1b2f1137.js";import{F as n}from"./index-1d303440.js";import{L as C}from"./index-13a2cfa3.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";import"./index-8d7e61f2.js";const G={title:"Layout/Hero",component:a,args:{className:"bg-base-200 min-h-[30rem]"}},i=r=>e(a,{...r,children:e(a.Content,{className:"text-center",children:t("div",{className:"max-w-md",children:[e("h1",{className:"text-5xl font-bold",children:"Hello there"}),e("p",{className:"py-6",children:"Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda excepturi exercitationem quasi. In deleniti eaque aut repudiandae et a id nisi."}),e(d,{color:"primary",children:"Get Started"})]})})}),o=r=>e(a,{...r,children:t(a.Content,{children:[e("img",{src:"https://img.daisyui.com/images/stock/photo-1635805737707-575885ab0820.webp",className:"max-w-sm rounded-lg shadow-2xl"}),t("div",{children:[e("h1",{className:"text-5xl font-bold",children:"Box Office News!"}),e("p",{className:"py-6",children:"Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda excepturi exercitationem quasi. In deleniti eaque aut repudiandae et a id nisi."}),e(d,{color:"primary",children:"Get Started"})]})]})}),l=r=>e(a,{...r,children:t(a.Content,{className:"flex-col lg:flex-row-reverse",children:[t("div",{className:"text-center lg:text-left",children:[e("h1",{className:"text-5xl font-bold",children:"Login now!"}),e("p",{className:"py-6",children:"Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda excepturi exercitationem quasi. In deleniti eaque aut repudiandae et a id nisi."})]}),e(c,{className:"flex-shrink-0 w-full max-w-sm shadow-2xl bg-base-100",children:t(c.Body,{children:[t(n,{children:[e(n.Label,{title:"Email"}),e(m,{type:"text",placeholder:"email",className:"input-bordered"})]}),t(n,{children:[e(n.Label,{title:"Password"}),e(m,{type:"text",placeholder:"password",className:"input-bordered"}),e("label",{className:"label",children:e(C,{href:"#",className:"label-text-alt",hover:!0,children:"Forgot password?"})})]}),e(n,{className:"mt-6",children:e(d,{children:"Login"})})]})})]})}),s=r=>t(a,{style:{backgroundImage:"url(https://img.daisyui.com/images/stock/photo-1507358522600-9f71e620c44e.webp)"},children:[e(a.Overlay,{...r}),e(a.Content,{className:"text-center",children:t("div",{className:"max-w-md",children:[e("h1",{className:"text-5xl font-bold",children:"Hello there"}),e("p",{className:"py-6",children:"Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda excepturi exercitationem quasi. In deleniti eaque aut repudiandae et a id nisi."}),e(d,{color:"primary",children:"Get Started"})]})})]});s.args={className:"bg-opacity-60"};i.args={};var u,p,h;i.parameters={...i.parameters,docs:{...(u=i.parameters)==null?void 0:u.docs,source:{originalSource:`args => { - return - -
-

Hello there

-

- Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda - excepturi exercitationem quasi. In deleniti eaque aut repudiandae et - a id nisi. -

- - -
-
-
; -}`,...(h=(p=i.parameters)==null?void 0:p.docs)==null?void 0:h.source}}};var x,g,N;o.parameters={...o.parameters,docs:{...(x=o.parameters)==null?void 0:x.docs,source:{originalSource:`args => { - return - - -
-

Box Office News!

-

- Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda - excepturi exercitationem quasi. In deleniti eaque aut repudiandae et - a id nisi. -

- -
-
-
; -}`,...(N=(g=o.parameters)==null?void 0:g.docs)==null?void 0:N.source}}};var f,b,v;l.parameters={...l.parameters,docs:{...(f=l.parameters)==null?void 0:f.docs,source:{originalSource:`args => { - return - -
-

Login now!

-

- Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda - excepturi exercitationem quasi. In deleniti eaque aut repudiandae et - a id nisi. -

-
- - -
- - - -
- - - - -
- -
-
-
-
-
; -}`,...(v=(b=l.parameters)==null?void 0:b.docs)==null?void 0:v.source}}};var y,H,w;s.parameters={...s.parameters,docs:{...(y=s.parameters)==null?void 0:y.docs,source:{originalSource:`args => { - return - - -
-

Hello there

-

- Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda - excepturi exercitationem quasi. In deleniti eaque aut repudiandae et - a id nisi. -

- - -
-
-
; -}`,...(w=(H=s.parameters)==null?void 0:H.docs)==null?void 0:w.source}}};const W=["Default","HeroWithFigure","HeroWithForm","HeroWithOverlayImage"];export{i as Default,o as HeroWithFigure,l as HeroWithForm,s as HeroWithOverlayImage,W as __namedExportsOrder,G as default}; diff --git a/docs/assets/Hero.stories-YXyPBwO1.js b/docs/assets/Hero.stories-YXyPBwO1.js new file mode 100644 index 00000000..db986da6 --- /dev/null +++ b/docs/assets/Hero.stories-YXyPBwO1.js @@ -0,0 +1,82 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{e as f}from"./iframe-DDnXVYpC.js";import{t as N}from"./bundle-mjs-yGZq-iow.js";import{B as p}from"./Button-GtH5nISf.js";import{C as y}from"./index-DIaYqioD.js";import{I as v}from"./index-DW2o7ZWh.js";import{F as l}from"./index-BNCmuIF-.js";import{L as k}from"./index-B_cgKLuR.js";import"./clsx-B-dksMZM.js";import"./index-Dl-l57lR.js";const x=f.forwardRef(({dataTheme:a,className:r,children:s,...n},o)=>{const i=N("hero-content",r);return e.jsx("div",{...n,"data-theme":a,className:i,ref:o,children:s})});try{x.displayName="HeroContent",x.__docgenInfo={description:"",displayName:"HeroContent",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const h=f.forwardRef(({dataTheme:a,className:r,children:s,...n},o)=>{const i=N("hero-overlay",r);return e.jsx("div",{...n,"data-theme":a,className:i,ref:o,children:s})});try{h.displayName="HeroOverlay",h.__docgenInfo={description:"",displayName:"HeroOverlay",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const g=f.forwardRef(({dataTheme:a,className:r,children:s,...n},o)=>{const i=N("hero",r);return e.jsx("div",{role:"banner",...n,"data-theme":a,className:i,ref:o,children:s})}),t=Object.assign(g,{Content:x,Overlay:h});try{g.displayName="Hero",g.__docgenInfo={description:"",displayName:"Hero",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const M={title:"Layout/Hero",component:t,args:{className:"bg-base-200 min-h-[30rem]"}},d=a=>e.jsx(t,{...a,children:e.jsx(t.Content,{className:"text-center",children:e.jsxs("div",{className:"max-w-md",children:[e.jsx("h1",{className:"text-5xl font-bold",children:"Hello there"}),e.jsx("p",{className:"py-6",children:"Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda excepturi exercitationem quasi. In deleniti eaque aut repudiandae et a id nisi."}),e.jsx(p,{color:"primary",children:"Get Started"})]})})}),m=a=>e.jsx(t,{...a,children:e.jsxs(t.Content,{children:[e.jsx("img",{src:"https://img.daisyui.com/images/stock/photo-1635805737707-575885ab0820.webp",className:"max-w-sm rounded-lg shadow-2xl"}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-5xl font-bold",children:"Box Office News!"}),e.jsx("p",{className:"py-6",children:"Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda excepturi exercitationem quasi. In deleniti eaque aut repudiandae et a id nisi."}),e.jsx(p,{color:"primary",children:"Get Started"})]})]})}),u=a=>e.jsx(t,{...a,children:e.jsxs(t.Content,{className:"flex-col lg:flex-row-reverse",children:[e.jsxs("div",{className:"text-center lg:text-left",children:[e.jsx("h1",{className:"text-5xl font-bold",children:"Login now!"}),e.jsx("p",{className:"py-6",children:"Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda excepturi exercitationem quasi. In deleniti eaque aut repudiandae et a id nisi."})]}),e.jsx(y,{className:"flex-shrink-0 w-full max-w-sm shadow-2xl bg-base-100",children:e.jsxs(y.Body,{children:[e.jsxs(l,{children:[e.jsx(l.Label,{title:"Email"}),e.jsx(v,{type:"text",placeholder:"email",className:"input-bordered"})]}),e.jsxs(l,{children:[e.jsx(l.Label,{title:"Password"}),e.jsx(v,{type:"text",placeholder:"password",className:"input-bordered"}),e.jsx("label",{className:"label",children:e.jsx(k,{href:"#",className:"label-text-alt",hover:!0,children:"Forgot password?"})})]}),e.jsx(l,{className:"mt-6",children:e.jsx(p,{children:"Login"})})]})})]})}),c=a=>e.jsxs(t,{style:{backgroundImage:"url(https://img.daisyui.com/images/stock/photo-1507358522600-9f71e620c44e.webp)"},children:[e.jsx(t.Overlay,{...a}),e.jsx(t.Content,{className:"text-center",children:e.jsxs("div",{className:"max-w-md",children:[e.jsx("h1",{className:"text-5xl font-bold",children:"Hello there"}),e.jsx("p",{className:"py-6",children:"Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda excepturi exercitationem quasi. In deleniti eaque aut repudiandae et a id nisi."}),e.jsx(p,{color:"primary",children:"Get Started"})]})})]});c.args={className:"bg-opacity-60"};d.args={};var j,b,H;d.parameters={...d.parameters,docs:{...(j=d.parameters)==null?void 0:j.docs,source:{originalSource:`args => { + return + +
+

Hello there

+

+ Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda + excepturi exercitationem quasi. In deleniti eaque aut repudiandae et + a id nisi. +

+ + +
+
+
; +}`,...(H=(b=d.parameters)==null?void 0:b.docs)==null?void 0:H.source}}};var w,_,C;m.parameters={...m.parameters,docs:{...(w=m.parameters)==null?void 0:w.docs,source:{originalSource:`args => { + return + + +
+

Box Office News!

+

+ Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda + excepturi exercitationem quasi. In deleniti eaque aut repudiandae et + a id nisi. +

+ +
+
+
; +}`,...(C=(_=m.parameters)==null?void 0:_.docs)==null?void 0:C.source}}};var q,I,F;u.parameters={...u.parameters,docs:{...(q=u.parameters)==null?void 0:q.docs,source:{originalSource:`args => { + return + +
+

Login now!

+

+ Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda + excepturi exercitationem quasi. In deleniti eaque aut repudiandae et + a id nisi. +

+
+ + +
+ + + +
+ + + + +
+ +
+
+
+
+
; +}`,...(F=(I=u.parameters)==null?void 0:I.docs)==null?void 0:F.source}}};var B,L,O;c.parameters={...c.parameters,docs:{...(B=c.parameters)==null?void 0:B.docs,source:{originalSource:`args => { + return + + +
+

Hello there

+

+ Provident cupiditate voluptatem et in. Quaerat fugiat ut assumenda + excepturi exercitationem quasi. In deleniti eaque aut repudiandae et + a id nisi. +

+ + +
+
+
; +}`,...(O=(L=c.parameters)==null?void 0:L.docs)==null?void 0:O.source}}};const $=["Default","HeroWithFigure","HeroWithForm","HeroWithOverlayImage"];export{d as Default,m as HeroWithFigure,u as HeroWithForm,c as HeroWithOverlayImage,$ as __namedExportsOrder,M as default}; diff --git a/docs/assets/Indicator.stories-D-DLjQqk.js b/docs/assets/Indicator.stories-D-DLjQqk.js new file mode 100644 index 00000000..f5b9fc13 --- /dev/null +++ b/docs/assets/Indicator.stories-D-DLjQqk.js @@ -0,0 +1,197 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{I as a}from"./index-BOrxIxgS.js";import{A as Ce}from"./index-Dsnv3XI8.js";import{B as s}from"./index-Bdz6q0Sq.js";import{B as fe}from"./Button-GtH5nISf.js";import{T as B}from"./index-CKvsACjx.js";import{I as Fe}from"./index-DW2o7ZWh.js";import{C as z}from"./index-DIaYqioD.js";import"./iframe-DDnXVYpC.js";import"./bundle-mjs-yGZq-iow.js";import"./clsx-B-dksMZM.js";import"./utils-BvopOSUb.js";import"./index-Dl-l57lR.js";const Ge={title:"Layout/Indicator",component:a.Item},o=r=>e.jsxs(a,{children:[e.jsx(a.Item,{...r}),e.jsx("div",{className:"grid w-32 h-32 rounded bg-base-300 place-items-center",children:"content"})]});o.args={className:"badge badge-secondary"};const x=r=>e.jsxs(a,{children:[e.jsx(s,{color:"primary",className:a.Item.className(r),children:"new"}),e.jsx("div",{className:"grid w-32 h-32 rounded bg-base-300 place-items-center",children:"content"})]}),y=r=>e.jsxs(a,{children:[e.jsx(s,{color:"secondary",className:a.Item.className(r),children:"99+"}),e.jsx(fe,{children:"inbox"})]}),n=r=>e.jsxs(B,{variant:"lifted",value:1,children:[e.jsx(B.Tab,{value:0,children:"Messages"}),e.jsxs(B.Tab,{className:a.className(),value:1,children:["Notifications",e.jsx(a.Item,{...r,children:"8"})]}),e.jsx(B.Tab,{value:2,children:"Request"})]});n.args={className:"badge"};const j=r=>e.jsxs(a,{children:[e.jsx(s,{className:a.Item.className(r),color:"secondary",children:"typing…"}),e.jsx(Ce,{shape:"square",src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"})]}),c=r=>e.jsxs(a,{children:[e.jsx(a.Item,{...r,children:"Required"}),e.jsx(Fe,{placeholder:"Your email address",bordered:!0})]});c.args={className:"badge"};const d=r=>e.jsxs(a,{className:"my-6 mx-10",children:[e.jsx(fe,{color:"primary",className:a.Item.className(r),children:"Apply"}),e.jsx(z,{bordered:!0,className:"bg-base-100",children:e.jsxs(z.Body,{children:[e.jsx(z.Title,{children:"Job Title"}),e.jsx("p",{children:"Rerum reiciendis beatae tenetur excepturi"})]})})]});d.args={vertical:"bottom"};const i=r=>e.jsxs(a,{children:[e.jsx(s,{color:"secondary",className:a.Item.className(r),children:"Uploading Image..."}),e.jsx("img",{src:"https://img.daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.webp"})]});i.args={vertical:"middle",horizontal:"center"};const t=r=>e.jsxs(a,{children:[e.jsx(s,{color:"secondary",className:a.Item.className(r)}),e.jsx("div",{className:"grid w-32 h-32 rounded bg-base-300 place-items-center",children:"content"})]}),m=t.bind({});m.args={horizontal:"start"};const l=t.bind({});l.args={horizontal:"center"};const T=t.bind({}),g=t.bind({});g.args={horizontal:"start",vertical:"middle"};const p=t.bind({});p.args={horizontal:"center",vertical:"middle"};const u=t.bind({});u.args={vertical:"middle"};const I=t.bind({});I.args={horizontal:"start",vertical:"bottom"};const b=t.bind({});b.args={horizontal:"center",vertical:"bottom"};const N=t.bind({});N.args={vertical:"bottom"};const h=r=>e.jsxs(a,{...r,children:[e.jsx(s,{color:"secondary",className:a.Item.className({vertical:"top",horizontal:"start"}),children:"top+start"}),e.jsx(s,{color:"secondary",className:a.Item.className({vertical:"top",horizontal:"center"}),children:"top+center"}),e.jsx(s,{color:"secondary",className:a.Item.className({vertical:"top",horizontal:"end"}),children:"top+end"}),e.jsx(s,{color:"secondary",className:a.Item.className({vertical:"middle",horizontal:"start"}),children:"middle+start"}),e.jsx(s,{color:"secondary",className:a.Item.className({vertical:"middle",horizontal:"center"}),children:"middle+center"}),e.jsx(s,{color:"secondary",className:a.Item.className({vertical:"middle",horizontal:"end"}),children:"middle+end"}),e.jsx(s,{color:"secondary",className:a.Item.className({vertical:"bottom",horizontal:"start"}),children:"bottom+start"}),e.jsx(s,{color:"secondary",className:a.Item.className({vertical:"bottom",horizontal:"center"}),children:"bottom+center"}),e.jsx(s,{color:"secondary",className:a.Item.className({vertical:"bottom",horizontal:"end"}),children:"bottom+end"}),e.jsx("div",{className:"grid w-60 h-32 bg-base-300 place-items-center",children:"content"})]});h.argTypes={horizontal:{control:!1},vertical:{control:!1}};const v=t.bind({});v.args={className:"sm:indicator-middle md:indicator-bottom lg:indicator-center xl:indicator-end",horizontal:"start"};var A,S,w;o.parameters={...o.parameters,docs:{...(A=o.parameters)==null?void 0:A.docs,source:{originalSource:`args => { + return + +
+ content +
+
; +}`,...(w=(S=o.parameters)==null?void 0:S.docs)==null?void 0:w.source}}};var f,C,F;x.parameters={...x.parameters,docs:{...(f=x.parameters)==null?void 0:f.docs,source:{originalSource:`args => { + return + + new + +
+ content +
+
; +}`,...(F=(C=x.parameters)==null?void 0:C.docs)==null?void 0:F.source}}};var M,R,E;y.parameters={...y.parameters,docs:{...(M=y.parameters)==null?void 0:M.docs,source:{originalSource:`args => { + return + + 99+ + + + ; +}`,...(E=(R=y.parameters)==null?void 0:R.docs)==null?void 0:E.source}}};var q,k,O;n.parameters={...n.parameters,docs:{...(q=n.parameters)==null?void 0:q.docs,source:{originalSource:`args => { + return + Messages + + Notifications + 8 + + Request + ; +}`,...(O=(k=n.parameters)==null?void 0:k.docs)==null?void 0:O.source}}};var _,D,J;j.parameters={...j.parameters,docs:{...(_=j.parameters)==null?void 0:_.docs,source:{originalSource:`args => { + return + + typing… + + + ; +}`,...(J=(D=j.parameters)==null?void 0:D.docs)==null?void 0:J.source}}};var U,W,Y;c.parameters={...c.parameters,docs:{...(U=c.parameters)==null?void 0:U.docs,source:{originalSource:`args => { + return + Required + + ; +}`,...(Y=(W=c.parameters)==null?void 0:W.docs)==null?void 0:Y.source}}};var L,G,H;d.parameters={...d.parameters,docs:{...(L=d.parameters)==null?void 0:L.docs,source:{originalSource:`args => { + return + + + + Job Title +

Rerum reiciendis beatae tenetur excepturi

+
+
+
; +}`,...(H=(G=d.parameters)==null?void 0:G.docs)==null?void 0:H.source}}};var K,P,Q;i.parameters={...i.parameters,docs:{...(K=i.parameters)==null?void 0:K.docs,source:{originalSource:`args => { + return + + Uploading Image... + + + ; +}`,...(Q=(P=i.parameters)==null?void 0:P.docs)==null?void 0:Q.source}}};var V,X,Z;m.parameters={...m.parameters,docs:{...(V=m.parameters)==null?void 0:V.docs,source:{originalSource:`args => { + return + +
+ content +
+
; +}`,...(Z=(X=m.parameters)==null?void 0:X.docs)==null?void 0:Z.source}}};var $,ee,ae;l.parameters={...l.parameters,docs:{...($=l.parameters)==null?void 0:$.docs,source:{originalSource:`args => { + return + +
+ content +
+
; +}`,...(ae=(ee=l.parameters)==null?void 0:ee.docs)==null?void 0:ae.source}}};var re,se,te;T.parameters={...T.parameters,docs:{...(re=T.parameters)==null?void 0:re.docs,source:{originalSource:`args => { + return + +
+ content +
+
; +}`,...(te=(se=T.parameters)==null?void 0:se.docs)==null?void 0:te.source}}};var oe,ne,ce;g.parameters={...g.parameters,docs:{...(oe=g.parameters)==null?void 0:oe.docs,source:{originalSource:`args => { + return + +
+ content +
+
; +}`,...(ce=(ne=g.parameters)==null?void 0:ne.docs)==null?void 0:ce.source}}};var de,ie,me;p.parameters={...p.parameters,docs:{...(de=p.parameters)==null?void 0:de.docs,source:{originalSource:`args => { + return + +
+ content +
+
; +}`,...(me=(ie=p.parameters)==null?void 0:ie.docs)==null?void 0:me.source}}};var le,ge,pe;u.parameters={...u.parameters,docs:{...(le=u.parameters)==null?void 0:le.docs,source:{originalSource:`args => { + return + +
+ content +
+
; +}`,...(pe=(ge=u.parameters)==null?void 0:ge.docs)==null?void 0:pe.source}}};var ue,Ie,be;I.parameters={...I.parameters,docs:{...(ue=I.parameters)==null?void 0:ue.docs,source:{originalSource:`args => { + return + +
+ content +
+
; +}`,...(be=(Ie=I.parameters)==null?void 0:Ie.docs)==null?void 0:be.source}}};var Ne,he,ve;b.parameters={...b.parameters,docs:{...(Ne=b.parameters)==null?void 0:Ne.docs,source:{originalSource:`args => { + return + +
+ content +
+
; +}`,...(ve=(he=b.parameters)==null?void 0:he.docs)==null?void 0:ve.source}}};var Be,xe,ye;N.parameters={...N.parameters,docs:{...(Be=N.parameters)==null?void 0:Be.docs,source:{originalSource:`args => { + return + +
+ content +
+
; +}`,...(ye=(xe=N.parameters)==null?void 0:xe.docs)==null?void 0:ye.source}}};var je,Te,ze;h.parameters={...h.parameters,docs:{...(je=h.parameters)==null?void 0:je.docs,source:{originalSource:`args => { + return + + top+start + + + top+center + + + top+end + + + + middle+start + + + middle+center + + + middle+end + + + + bottom+start + + + bottom+center + + + bottom+end + + +
+ content +
+
; +}`,...(ze=(Te=h.parameters)==null?void 0:Te.docs)==null?void 0:ze.source}}};var Ae,Se,we;v.parameters={...v.parameters,docs:{...(Ae=v.parameters)==null?void 0:Ae.docs,source:{originalSource:`args => { + return + +
+ content +
+
; +}`,...(we=(Se=v.parameters)==null?void 0:Se.docs)==null?void 0:we.source}}};const He=["Default","BadgeWithText","ForButton","ForTab","ForAvatar","ForInput","ButtonAsIndicatorForCard","InCenterOfImage","TopAndStart","TopAndCenter","TopAndEnd","MiddleAndStart","MiddleAndCenter","MiddleAndEnd","BottomAndStart","BottomAndCenter","BottomAndEnd","Multiple","Responsive"];export{x as BadgeWithText,b as BottomAndCenter,N as BottomAndEnd,I as BottomAndStart,d as ButtonAsIndicatorForCard,o as Default,j as ForAvatar,y as ForButton,c as ForInput,n as ForTab,i as InCenterOfImage,p as MiddleAndCenter,u as MiddleAndEnd,g as MiddleAndStart,h as Multiple,v as Responsive,l as TopAndCenter,T as TopAndEnd,m as TopAndStart,He as __namedExportsOrder,Ge as default}; diff --git a/docs/assets/Indicator.stories-e252f2de.js b/docs/assets/Indicator.stories-e252f2de.js deleted file mode 100644 index 52ac4bfd..00000000 --- a/docs/assets/Indicator.stories-e252f2de.js +++ /dev/null @@ -1,197 +0,0 @@ -import{a as n,j as e}from"./tw-merge-4486aaf0.js";import{I as a}from"./index-f4284876.js";import{A as Me}from"./index-e7261937.js";import{B as s}from"./index-e61e426b.js";import{B as Fe}from"./Button-e31631bb.js";import{T as y}from"./index-4b7ed1ca.js";import{I as Re}from"./index-1b2f1137.js";import{C as w}from"./index-92e1ed70.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";import"./utils-ae2eb491.js";import"./index-8d7e61f2.js";const Ge={title:"Layout/Indicator",component:a.Item},o=r=>n(a,{children:[e(a.Item,{...r}),e("div",{className:"grid w-32 h-32 rounded bg-base-300 place-items-center",children:"content"})]});o.args={className:"badge badge-secondary"};const T=r=>n(a,{children:[e(s,{color:"primary",className:a.Item.className(r),children:"new"}),e("div",{className:"grid w-32 h-32 rounded bg-base-300 place-items-center",children:"content"})]}),z=r=>n(a,{children:[e(s,{color:"secondary",className:a.Item.className(r),children:"99+"}),e(Fe,{children:"inbox"})]}),c=r=>n(y,{variant:"lifted",value:1,children:[e(y.Tab,{value:0,children:"Messages"}),n(y.Tab,{className:a.className(),value:1,children:["Notifications",e(a.Item,{...r,children:"8"})]}),e(y.Tab,{value:2,children:"Request"})]});c.args={className:"badge"};const A=r=>n(a,{children:[e(s,{className:a.Item.className(r),color:"secondary",children:"typing…"}),e(Me,{shape:"square",src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"})]}),d=r=>n(a,{children:[e(a.Item,{...r,children:"Required"}),e(Re,{placeholder:"Your email address",bordered:!0})]});d.args={className:"badge"};const i=r=>n(a,{className:"my-6 mx-10",children:[e(Fe,{color:"primary",className:a.Item.className(r),children:"Apply"}),e(w,{bordered:!0,className:"bg-base-100",children:n(w.Body,{children:[e(w.Title,{children:"Job Title"}),e("p",{children:"Rerum reiciendis beatae tenetur excepturi"})]})})]});i.args={vertical:"bottom"};const m=r=>n(a,{children:[e(s,{color:"secondary",className:a.Item.className(r),children:"Uploading Image..."}),e("img",{src:"https://img.daisyui.com/images/stock/photo-1606107557195-0e29a4b5b4aa.webp"})]});m.args={vertical:"middle",horizontal:"center"};const t=r=>n(a,{children:[e(s,{color:"secondary",className:a.Item.className(r)}),e("div",{className:"grid w-32 h-32 rounded bg-base-300 place-items-center",children:"content"})]}),l=t.bind({});l.args={horizontal:"start"};const g=t.bind({});g.args={horizontal:"center"};const S=t.bind({}),p=t.bind({});p.args={horizontal:"start",vertical:"middle"};const u=t.bind({});u.args={horizontal:"center",vertical:"middle"};const I=t.bind({});I.args={vertical:"middle"};const b=t.bind({});b.args={horizontal:"start",vertical:"bottom"};const N=t.bind({});N.args={horizontal:"center",vertical:"bottom"};const h=t.bind({});h.args={vertical:"bottom"};const v=r=>n(a,{...r,children:[e(s,{color:"secondary",className:a.Item.className({vertical:"top",horizontal:"start"}),children:"top+start"}),e(s,{color:"secondary",className:a.Item.className({vertical:"top",horizontal:"center"}),children:"top+center"}),e(s,{color:"secondary",className:a.Item.className({vertical:"top",horizontal:"end"}),children:"top+end"}),e(s,{color:"secondary",className:a.Item.className({vertical:"middle",horizontal:"start"}),children:"middle+start"}),e(s,{color:"secondary",className:a.Item.className({vertical:"middle",horizontal:"center"}),children:"middle+center"}),e(s,{color:"secondary",className:a.Item.className({vertical:"middle",horizontal:"end"}),children:"middle+end"}),e(s,{color:"secondary",className:a.Item.className({vertical:"bottom",horizontal:"start"}),children:"bottom+start"}),e(s,{color:"secondary",className:a.Item.className({vertical:"bottom",horizontal:"center"}),children:"bottom+center"}),e(s,{color:"secondary",className:a.Item.className({vertical:"bottom",horizontal:"end"}),children:"bottom+end"}),e("div",{className:"grid w-60 h-32 bg-base-300 place-items-center",children:"content"})]});v.argTypes={horizontal:{control:!1},vertical:{control:!1}};const B=t.bind({});B.args={className:"sm:indicator-middle md:indicator-bottom lg:indicator-center xl:indicator-end",horizontal:"start"};var f,C,x;o.parameters={...o.parameters,docs:{...(f=o.parameters)==null?void 0:f.docs,source:{originalSource:`args => { - return - -
- content -
-
; -}`,...(x=(C=o.parameters)==null?void 0:C.docs)==null?void 0:x.source}}};var F,M,R;T.parameters={...T.parameters,docs:{...(F=T.parameters)==null?void 0:F.docs,source:{originalSource:`args => { - return - - new - -
- content -
-
; -}`,...(R=(M=T.parameters)==null?void 0:M.docs)==null?void 0:R.source}}};var E,q,k;z.parameters={...z.parameters,docs:{...(E=z.parameters)==null?void 0:E.docs,source:{originalSource:`args => { - return - - 99+ - - - ; -}`,...(k=(q=z.parameters)==null?void 0:q.docs)==null?void 0:k.source}}};var j,O,_;c.parameters={...c.parameters,docs:{...(j=c.parameters)==null?void 0:j.docs,source:{originalSource:`args => { - return - Messages - - Notifications - 8 - - Request - ; -}`,...(_=(O=c.parameters)==null?void 0:O.docs)==null?void 0:_.source}}};var D,J,U;A.parameters={...A.parameters,docs:{...(D=A.parameters)==null?void 0:D.docs,source:{originalSource:`args => { - return - - typing… - - - ; -}`,...(U=(J=A.parameters)==null?void 0:J.docs)==null?void 0:U.source}}};var W,Y,L;d.parameters={...d.parameters,docs:{...(W=d.parameters)==null?void 0:W.docs,source:{originalSource:`args => { - return - Required - - ; -}`,...(L=(Y=d.parameters)==null?void 0:Y.docs)==null?void 0:L.source}}};var G,H,K;i.parameters={...i.parameters,docs:{...(G=i.parameters)==null?void 0:G.docs,source:{originalSource:`args => { - return - - - - Job Title -

Rerum reiciendis beatae tenetur excepturi

-
-
-
; -}`,...(K=(H=i.parameters)==null?void 0:H.docs)==null?void 0:K.source}}};var P,Q,V;m.parameters={...m.parameters,docs:{...(P=m.parameters)==null?void 0:P.docs,source:{originalSource:`args => { - return - - Uploading Image... - - - ; -}`,...(V=(Q=m.parameters)==null?void 0:Q.docs)==null?void 0:V.source}}};var X,Z,$;l.parameters={...l.parameters,docs:{...(X=l.parameters)==null?void 0:X.docs,source:{originalSource:`args => { - return - -
- content -
-
; -}`,...($=(Z=l.parameters)==null?void 0:Z.docs)==null?void 0:$.source}}};var ee,ae,re;g.parameters={...g.parameters,docs:{...(ee=g.parameters)==null?void 0:ee.docs,source:{originalSource:`args => { - return - -
- content -
-
; -}`,...(re=(ae=g.parameters)==null?void 0:ae.docs)==null?void 0:re.source}}};var se,ne,te;S.parameters={...S.parameters,docs:{...(se=S.parameters)==null?void 0:se.docs,source:{originalSource:`args => { - return - -
- content -
-
; -}`,...(te=(ne=S.parameters)==null?void 0:ne.docs)==null?void 0:te.source}}};var oe,ce,de;p.parameters={...p.parameters,docs:{...(oe=p.parameters)==null?void 0:oe.docs,source:{originalSource:`args => { - return - -
- content -
-
; -}`,...(de=(ce=p.parameters)==null?void 0:ce.docs)==null?void 0:de.source}}};var ie,me,le;u.parameters={...u.parameters,docs:{...(ie=u.parameters)==null?void 0:ie.docs,source:{originalSource:`args => { - return - -
- content -
-
; -}`,...(le=(me=u.parameters)==null?void 0:me.docs)==null?void 0:le.source}}};var ge,pe,ue;I.parameters={...I.parameters,docs:{...(ge=I.parameters)==null?void 0:ge.docs,source:{originalSource:`args => { - return - -
- content -
-
; -}`,...(ue=(pe=I.parameters)==null?void 0:pe.docs)==null?void 0:ue.source}}};var Ie,be,Ne;b.parameters={...b.parameters,docs:{...(Ie=b.parameters)==null?void 0:Ie.docs,source:{originalSource:`args => { - return - -
- content -
-
; -}`,...(Ne=(be=b.parameters)==null?void 0:be.docs)==null?void 0:Ne.source}}};var he,ve,Be;N.parameters={...N.parameters,docs:{...(he=N.parameters)==null?void 0:he.docs,source:{originalSource:`args => { - return - -
- content -
-
; -}`,...(Be=(ve=N.parameters)==null?void 0:ve.docs)==null?void 0:Be.source}}};var ye,Te,ze;h.parameters={...h.parameters,docs:{...(ye=h.parameters)==null?void 0:ye.docs,source:{originalSource:`args => { - return - -
- content -
-
; -}`,...(ze=(Te=h.parameters)==null?void 0:Te.docs)==null?void 0:ze.source}}};var Ae,Se,we;v.parameters={...v.parameters,docs:{...(Ae=v.parameters)==null?void 0:Ae.docs,source:{originalSource:`args => { - return - - top+start - - - top+center - - - top+end - - - - middle+start - - - middle+center - - - middle+end - - - - bottom+start - - - bottom+center - - - bottom+end - - -
- content -
-
; -}`,...(we=(Se=v.parameters)==null?void 0:Se.docs)==null?void 0:we.source}}};var fe,Ce,xe;B.parameters={...B.parameters,docs:{...(fe=B.parameters)==null?void 0:fe.docs,source:{originalSource:`args => { - return - -
- content -
-
; -}`,...(xe=(Ce=B.parameters)==null?void 0:Ce.docs)==null?void 0:xe.source}}};const He=["Default","BadgeWithText","ForButton","ForTab","ForAvatar","ForInput","ButtonAsIndicatorForCard","InCenterOfImage","TopAndStart","TopAndCenter","TopAndEnd","MiddleAndStart","MiddleAndCenter","MiddleAndEnd","BottomAndStart","BottomAndCenter","BottomAndEnd","Multiple","Responsive"];export{T as BadgeWithText,N as BottomAndCenter,h as BottomAndEnd,b as BottomAndStart,i as ButtonAsIndicatorForCard,o as Default,A as ForAvatar,z as ForButton,d as ForInput,c as ForTab,m as InCenterOfImage,u as MiddleAndCenter,I as MiddleAndEnd,p as MiddleAndStart,v as Multiple,B as Responsive,g as TopAndCenter,S as TopAndEnd,l as TopAndStart,He as __namedExportsOrder,Ge as default}; diff --git a/docs/assets/Input.stories-978e40a8.js b/docs/assets/Input.stories-978e40a8.js deleted file mode 100644 index 9e5c2cd9..00000000 --- a/docs/assets/Input.stories-978e40a8.js +++ /dev/null @@ -1,19 +0,0 @@ -import{j as e,a as t}from"./tw-merge-4486aaf0.js";import{I as n}from"./index-1b2f1137.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";const x={title:"Data Input/Input",component:n,args:{placeholder:"Type here",className:"w-full max-w-xs",disabled:!1}},a=s=>e("div",{className:"flex w-full component-preview p-4 items-center justify-center gap-2 font-sans",children:e(n,{...s})}),l=s=>e("div",{className:"flex w-full component-preview p-4 items-center justify-center gap-2 font-sans",children:t("div",{className:"form-control w-full max-w-xs",children:[t("label",{className:"label",children:[e("span",{className:"label-text",children:"What is your name?"}),e("span",{className:"label-text-alt",children:"Alt label"})]}),e(n,{...s}),t("label",{className:"label",children:[e("span",{className:"label-text-alt",children:"Alt label"}),e("span",{className:"label-text-alt",children:"Alt label"})]})]})});var r,c,o;a.parameters={...a.parameters,docs:{...(r=a.parameters)==null?void 0:r.docs,source:{originalSource:`args => { - return
- -
; -}`,...(o=(c=a.parameters)==null?void 0:c.docs)==null?void 0:o.source}}};var m,p,i;l.parameters={...l.parameters,docs:{...(m=l.parameters)==null?void 0:m.docs,source:{originalSource:`args => { - return
-
- - - -
-
; -}`,...(i=(p=l.parameters)==null?void 0:p.docs)==null?void 0:i.source}}};const N=["Default","FormControlAndLabels"];export{a as Default,l as FormControlAndLabels,N as __namedExportsOrder,x as default}; diff --git a/docs/assets/Input.stories-Bysd8iid.js b/docs/assets/Input.stories-Bysd8iid.js new file mode 100644 index 00000000..c0c85e68 --- /dev/null +++ b/docs/assets/Input.stories-Bysd8iid.js @@ -0,0 +1,19 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{I as t}from"./index-DW2o7ZWh.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";const f={title:"Data Input/Input",component:t,args:{placeholder:"Type here",className:"w-full max-w-xs",disabled:!1}},a=l=>e.jsx("div",{className:"flex w-full component-preview p-4 items-center justify-center gap-2 font-sans",children:e.jsx(t,{...l})}),s=l=>e.jsx("div",{className:"flex w-full component-preview p-4 items-center justify-center gap-2 font-sans",children:e.jsxs("div",{className:"form-control w-full max-w-xs",children:[e.jsxs("label",{className:"label",children:[e.jsx("span",{className:"label-text",children:"What is your name?"}),e.jsx("span",{className:"label-text-alt",children:"Alt label"})]}),e.jsx(t,{...l}),e.jsxs("label",{className:"label",children:[e.jsx("span",{className:"label-text-alt",children:"Alt label"}),e.jsx("span",{className:"label-text-alt",children:"Alt label"})]})]})});var n,r,c;a.parameters={...a.parameters,docs:{...(n=a.parameters)==null?void 0:n.docs,source:{originalSource:`args => { + return
+ +
; +}`,...(c=(r=a.parameters)==null?void 0:r.docs)==null?void 0:c.source}}};var o,m,p;s.parameters={...s.parameters,docs:{...(o=s.parameters)==null?void 0:o.docs,source:{originalSource:`args => { + return
+
+ + + +
+
; +}`,...(p=(m=s.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};const N=["Default","FormControlAndLabels"];export{a as Default,s as FormControlAndLabels,N as __namedExportsOrder,f as default}; diff --git a/docs/assets/Join-455a80a9.js b/docs/assets/Join-455a80a9.js deleted file mode 100644 index 265558d7..00000000 --- a/docs/assets/Join-455a80a9.js +++ /dev/null @@ -1 +0,0 @@ -import{t as c,j as m}from"./tw-merge-4486aaf0.js";import{r as p}from"./index-f46741a2.js";import{c as u}from"./clsx.m-1229b3e0.js";const e=p.forwardRef(({dataTheme:o,className:r,children:t,responsive:a,vertical:n,horizontal:i,...l},s)=>{const d=c("join",u({"join-vertical":!a&&n,"join-horizontal":!a&&i,"join-vertical lg:join-horizontal":a}),r);return m("div",{...l,"data-theme":o,className:d,ref:s,children:t})});e.displayName="Join";const _=e;try{e.displayName="Join",e.__docgenInfo={description:"",displayName:"Join",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},responsive:{defaultValue:null,description:"",name:"responsive",required:!1,type:{name:"boolean"}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}export{_ as J}; diff --git a/docs/assets/Join-C8mVsF_m.js b/docs/assets/Join-C8mVsF_m.js new file mode 100644 index 00000000..67cbbeb3 --- /dev/null +++ b/docs/assets/Join-C8mVsF_m.js @@ -0,0 +1 @@ +import{j as m}from"./jsx-runtime-BjG_zV1W.js";import{r as p}from"./iframe-DDnXVYpC.js";import{c}from"./clsx-B-dksMZM.js";import{t as u}from"./bundle-mjs-yGZq-iow.js";const a=p.forwardRef(({dataTheme:o,className:r,children:t,responsive:e,vertical:i,horizontal:n,...l},s)=>{const d=u("join",c({"join-vertical":!e&&i,"join-horizontal":!e&&n,"join-vertical lg:join-horizontal":e}),r);return m.jsx("div",{...l,"data-theme":o,className:d,ref:s,children:t})});a.displayName="Join";try{a.displayName="Join",a.__docgenInfo={description:"",displayName:"Join",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},responsive:{defaultValue:null,description:"",name:"responsive",required:!1,type:{name:"boolean"}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}export{a as J}; diff --git a/docs/assets/Join.stories-8a733059.js b/docs/assets/Join.stories-8a733059.js deleted file mode 100644 index e2c05bd5..00000000 --- a/docs/assets/Join.stories-8a733059.js +++ /dev/null @@ -1,46 +0,0 @@ -import{a,j as e}from"./tw-merge-4486aaf0.js";import{J as o}from"./Join-455a80a9.js";import{B as n}from"./Button-e31631bb.js";import{I as v}from"./index-1b2f1137.js";import{S as r}from"./index-3ff73cf5.js";import{I as d}from"./index-f4284876.js";import{B as E}from"./index-e61e426b.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";import"./index-8d7e61f2.js";const L={title:"Layout/Join (group items)",component:o},i=t=>a(o,{...t,children:[e(n,{className:"join-item",children:"Button"}),e(n,{className:"join-item",children:"Button"}),e(n,{className:"join-item",children:"Button"})]});i.args={};const s=t=>a(o,{...t,children:[e(n,{className:"join-item",children:"Button"}),e(n,{className:"join-item",children:"Button"}),e(n,{className:"join-item",children:"Button"})]});s.args={vertical:!0};const c=t=>a(o,{...t,children:[e("div",{children:e("div",{children:e(v,{className:"join-item",placeholder:"Search..."})})}),a(r,{className:"join-item",children:[e(r.Option,{selected:!0,disabled:!0,children:"Category"}),e(r.Option,{children:"Sci-fi"}),e(r.Option,{children:"Drama"}),e(r.Option,{children:"Action"})]}),a(d,{children:[e(E,{color:"secondary",className:d.Item.className(),children:"new"}),e(n,{className:"join-item",children:"Search"})]})]});c.args={};const m=t=>a(o,{...t,children:[e(v,{className:"join-item",placeholder:"Email"}),e(n,{className:"join-item rounded-r-full",children:"Subscribe"})]});m.args={};const l=t=>a(o,{...t,children:[e("input",{className:"join-item btn",type:"radio",name:"options","aria-label":"Radio 1"}),e("input",{className:"join-item btn",type:"radio",name:"options","aria-label":"Radio 2"}),e("input",{className:"join-item btn",type:"radio",name:"options","aria-label":"Radio 3"})]});l.args={};var u,p,B;i.parameters={...i.parameters,docs:{...(u=i.parameters)==null?void 0:u.docs,source:{originalSource:`args => { - return - - - - ; -}`,...(B=(p=i.parameters)==null?void 0:p.docs)==null?void 0:B.source}}};var h,N,j;s.parameters={...s.parameters,docs:{...(h=s.parameters)==null?void 0:h.docs,source:{originalSource:`args => { - return - - - - ; -}`,...(j=(N=s.parameters)==null?void 0:N.docs)==null?void 0:j.source}}};var S,g,b;c.parameters={...c.parameters,docs:{...(S=c.parameters)==null?void 0:S.docs,source:{originalSource:`args => { - return -
-
- -
-
- - - - new - - - -
; -}`,...(b=(g=c.parameters)==null?void 0:g.docs)==null?void 0:b.source}}};var y,I,f;m.parameters={...m.parameters,docs:{...(y=m.parameters)==null?void 0:y.docs,source:{originalSource:`args => { - return - - - ; -}`,...(f=(I=m.parameters)==null?void 0:I.docs)==null?void 0:f.source}}};var J,O,R;l.parameters={...l.parameters,docs:{...(J=l.parameters)==null?void 0:J.docs,source:{originalSource:`args => { - return - - - - ; -}`,...(R=(O=l.parameters)==null?void 0:O.docs)==null?void 0:R.source}}};const k=["Default","Vertically","ExtraElementsInTheGroup","CustomBorderRadius","RadioInputsWithBtnStyle"];export{m as CustomBorderRadius,i as Default,c as ExtraElementsInTheGroup,l as RadioInputsWithBtnStyle,s as Vertically,k as __namedExportsOrder,L as default}; diff --git a/docs/assets/Join.stories-DctOe0Ah.js b/docs/assets/Join.stories-DctOe0Ah.js new file mode 100644 index 00000000..51708e17 --- /dev/null +++ b/docs/assets/Join.stories-DctOe0Ah.js @@ -0,0 +1,46 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{J as a}from"./Join-C8mVsF_m.js";import{B as n}from"./Button-GtH5nISf.js";import{I as O}from"./index-DW2o7ZWh.js";import{S as o}from"./index-Bew10GTu.js";import{I as l}from"./index-BOrxIxgS.js";import{B as R}from"./index-Bdz6q0Sq.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";import"./index-Dl-l57lR.js";const L={title:"Layout/Join (group items)",component:a},s=t=>e.jsxs(a,{...t,children:[e.jsx(n,{className:"join-item",children:"Button"}),e.jsx(n,{className:"join-item",children:"Button"}),e.jsx(n,{className:"join-item",children:"Button"})]});s.args={};const r=t=>e.jsxs(a,{...t,children:[e.jsx(n,{className:"join-item",children:"Button"}),e.jsx(n,{className:"join-item",children:"Button"}),e.jsx(n,{className:"join-item",children:"Button"})]});r.args={vertical:!0};const i=t=>e.jsxs(a,{...t,children:[e.jsx("div",{children:e.jsx("div",{children:e.jsx(O,{className:"join-item",placeholder:"Search..."})})}),e.jsxs(o,{className:"join-item",children:[e.jsx(o.Option,{selected:!0,disabled:!0,children:"Category"}),e.jsx(o.Option,{children:"Sci-fi"}),e.jsx(o.Option,{children:"Drama"}),e.jsx(o.Option,{children:"Action"})]}),e.jsxs(l,{children:[e.jsx(R,{color:"secondary",className:l.Item.className(),children:"new"}),e.jsx(n,{className:"join-item",children:"Search"})]})]});i.args={};const c=t=>e.jsxs(a,{...t,children:[e.jsx(O,{className:"join-item",placeholder:"Email"}),e.jsx(n,{className:"join-item rounded-r-full",children:"Subscribe"})]});c.args={};const m=t=>e.jsxs(a,{...t,children:[e.jsx("input",{className:"join-item btn",type:"radio",name:"options","aria-label":"Radio 1"}),e.jsx("input",{className:"join-item btn",type:"radio",name:"options","aria-label":"Radio 2"}),e.jsx("input",{className:"join-item btn",type:"radio",name:"options","aria-label":"Radio 3"})]});m.args={};var d,u,p;s.parameters={...s.parameters,docs:{...(d=s.parameters)==null?void 0:d.docs,source:{originalSource:`args => { + return + + + + ; +}`,...(p=(u=s.parameters)==null?void 0:u.docs)==null?void 0:p.source}}};var j,B,h;r.parameters={...r.parameters,docs:{...(j=r.parameters)==null?void 0:j.docs,source:{originalSource:`args => { + return + + + + ; +}`,...(h=(B=r.parameters)==null?void 0:B.docs)==null?void 0:h.source}}};var x,N,S;i.parameters={...i.parameters,docs:{...(x=i.parameters)==null?void 0:x.docs,source:{originalSource:`args => { + return +
+
+ +
+
+ + + + new + + + +
; +}`,...(S=(N=i.parameters)==null?void 0:N.docs)==null?void 0:S.source}}};var g,b,y;c.parameters={...c.parameters,docs:{...(g=c.parameters)==null?void 0:g.docs,source:{originalSource:`args => { + return + + + ; +}`,...(y=(b=c.parameters)==null?void 0:b.docs)==null?void 0:y.source}}};var I,f,J;m.parameters={...m.parameters,docs:{...(I=m.parameters)==null?void 0:I.docs,source:{originalSource:`args => { + return + + + + ; +}`,...(J=(f=m.parameters)==null?void 0:f.docs)==null?void 0:J.source}}};const k=["Default","Vertically","ExtraElementsInTheGroup","CustomBorderRadius","RadioInputsWithBtnStyle"];export{c as CustomBorderRadius,s as Default,i as ExtraElementsInTheGroup,m as RadioInputsWithBtnStyle,r as Vertically,k as __namedExportsOrder,L as default}; diff --git a/docs/assets/Kbd.stories-31e5000d.js b/docs/assets/Kbd.stories-31e5000d.js deleted file mode 100644 index b30af96f..00000000 --- a/docs/assets/Kbd.stories-31e5000d.js +++ /dev/null @@ -1,70 +0,0 @@ -import{t as V,j as r,F as u,a as n}from"./tw-merge-4486aaf0.js";import{r as z}from"./index-f46741a2.js";import{c as B}from"./clsx.m-1229b3e0.js";const b=z.forwardRef(({children:e,size:s,dataTheme:T,className:A,...C},D)=>{const I=V("kbd",A,B({"kbd-lg":s==="lg","kbd-md":s==="md","kbd-sm":s==="sm","kbd-xs":s==="xs"}));return r("kbd",{...C,"data-theme":T,className:I,ref:D,children:e})}),d=b;try{b.displayName="Kbd",b.__docgenInfo={description:"",displayName:"Kbd",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}}}}}catch{}try{d.displayName="Kbd",d.__docgenInfo={description:"",displayName:"Kbd",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}}}}}catch{}const R={title:"Data Display/Kbd",component:d},l=e=>r(u,{children:r(d,{...e,children:"A"})}),a=e=>n("div",{className:"font-sans",children:["Press ",r(d,{...e,children:"F"})," to pay respects."]});a.args={};const c=e=>n(u,{children:[r(d,{...e,children:"ctrl"}),"+",r(d,{...e,children:"shift"}),"+",r(d,{...e,children:"del"})]}),t=e=>n(u,{children:[r(d,{...e,children:"⌘"}),r(d,{...e,children:"⌥"}),r(d,{...e,children:"⇧"}),r(d,{...e,children:"⌃"})]}),i=e=>n("div",{className:"overflow-x-auto",children:[n("div",{className:"flex justify-center gap-1 w-full",children:[r(d,{...e,children:"q"}),r(d,{...e,children:"w"}),r(d,{...e,children:"e"}),r(d,{...e,children:"r"}),r(d,{...e,children:"t"}),r(d,{...e,children:"y"}),r(d,{...e,children:"u"}),r(d,{...e,children:"i"}),r(d,{...e,children:"o"}),r(d,{...e,children:"p"})]}),n("div",{className:"flex justify-center gap-1 my-1 w-full",children:[r(d,{...e,children:"a"}),r(d,{...e,children:"s"}),r(d,{...e,children:"d"}),r(d,{...e,children:"f"}),r(d,{...e,children:"g"}),r(d,{...e,children:"h"}),r(d,{...e,children:"j"}),r(d,{...e,children:"k"}),r(d,{...e,children:"l"})]}),n("div",{className:"flex justify-center gap-1 my-1 w-full",children:[r(d,{...e,children:"z"}),r(d,{...e,children:"x"}),r(d,{...e,children:"c"}),r(d,{...e,children:"v"}),r(d,{...e,children:"b"}),r(d,{...e,children:"n"}),r(d,{...e,children:"m"}),r(d,{...e,children:"/"})]})]}),o=e=>n(u,{children:[r("div",{className:"flex justify-center w-full",children:r(d,{...e,children:"▲"})}),n("div",{className:"flex justify-center gap-12 w-full",children:[r(d,{...e,children:"◀︎"}),r(d,{...e,children:"▶︎"})]}),r("div",{className:"flex justify-center w-full",children:r(d,{...e,children:"▼"})})]});var K,m,p;l.parameters={...l.parameters,docs:{...(K=l.parameters)==null?void 0:K.docs,source:{originalSource:`args => { - return <> - A - ; -}`,...(p=(m=l.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};var h,f,g;a.parameters={...a.parameters,docs:{...(h=a.parameters)==null?void 0:h.docs,source:{originalSource:`args => { - return
- Press F to pay respects. -
; -}`,...(g=(f=a.parameters)==null?void 0:f.docs)==null?void 0:g.source}}};var y,v,x;c.parameters={...c.parameters,docs:{...(y=c.parameters)==null?void 0:y.docs,source:{originalSource:`args => { - return <> - ctrl+shift+ - del - ; -}`,...(x=(v=c.parameters)==null?void 0:v.docs)==null?void 0:x.source}}};var N,w,_;t.parameters={...t.parameters,docs:{...(N=t.parameters)==null?void 0:N.docs,source:{originalSource:`args => { - return <> - - - - - ; -}`,...(_=(w=t.parameters)==null?void 0:w.docs)==null?void 0:_.source}}};var j,F,k;i.parameters={...i.parameters,docs:{...(j=i.parameters)==null?void 0:j.docs,source:{originalSource:`args => { - return
-
- q - w - e - r - t - y - u - i - o - p -
-
- a - s - d - f - g - h - j - k - l -
-
- z - x - c - v - b - n - m - / -
-
; -}`,...(k=(F=i.parameters)==null?void 0:F.docs)==null?void 0:k.source}}};var E,q,S;o.parameters={...o.parameters,docs:{...(E=o.parameters)==null?void 0:E.docs,source:{originalSource:`args => { - return <> -
- -
-
- ◀︎ - ▶︎ -
-
- -
- ; -}`,...(S=(q=o.parameters)==null?void 0:q.docs)==null?void 0:S.source}}};const $=["Default","InText","KeyCombination","FunctionKeys","FullKeyboard","ArrowKeys"];export{o as ArrowKeys,l as Default,i as FullKeyboard,t as FunctionKeys,a as InText,c as KeyCombination,$ as __namedExportsOrder,R as default}; diff --git a/docs/assets/Kbd.stories-ud38TxlQ.js b/docs/assets/Kbd.stories-ud38TxlQ.js new file mode 100644 index 00000000..69347ff9 --- /dev/null +++ b/docs/assets/Kbd.stories-ud38TxlQ.js @@ -0,0 +1,70 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{r as I}from"./iframe-DDnXVYpC.js";import{c as V}from"./clsx-B-dksMZM.js";import{t as E}from"./bundle-mjs-yGZq-iow.js";const r=I.forwardRef(({children:s,size:d,dataTheme:q,className:S,...T},A)=>{const D=E("kbd",S,V({"kbd-xl":d==="xl","kbd-lg":d==="lg","kbd-md":d==="md","kbd-sm":d==="sm","kbd-xs":d==="xs"}));return e.jsx("kbd",{...T,"data-theme":q,className:D,ref:A,children:s})});try{r.displayName="Kbd",r.__docgenInfo={description:"",displayName:"Kbd",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xl"'},{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}}}}}catch{}try{r.displayName="Kbd",r.__docgenInfo={description:"",displayName:"Kbd",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xl"'},{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}}}}}catch{}const M={title:"Data Display/Kbd",component:r},a=s=>e.jsx(e.Fragment,{children:e.jsx(r,{...s,children:"A"})}),n=s=>e.jsxs("div",{className:"font-sans",children:["Press ",e.jsx(r,{...s,children:"F"})," to pay respects."]});n.args={};const l=s=>e.jsxs(e.Fragment,{children:[e.jsx(r,{...s,children:"ctrl"}),"+",e.jsx(r,{...s,children:"shift"}),"+",e.jsx(r,{...s,children:"del"})]}),c=s=>e.jsxs(e.Fragment,{children:[e.jsx(r,{...s,children:"⌘"}),e.jsx(r,{...s,children:"⌥"}),e.jsx(r,{...s,children:"⇧"}),e.jsx(r,{...s,children:"⌃"})]}),t=s=>e.jsxs("div",{className:"overflow-x-auto",children:[e.jsxs("div",{className:"flex justify-center gap-1 w-full",children:[e.jsx(r,{...s,children:"q"}),e.jsx(r,{...s,children:"w"}),e.jsx(r,{...s,children:"e"}),e.jsx(r,{...s,children:"r"}),e.jsx(r,{...s,children:"t"}),e.jsx(r,{...s,children:"y"}),e.jsx(r,{...s,children:"u"}),e.jsx(r,{...s,children:"i"}),e.jsx(r,{...s,children:"o"}),e.jsx(r,{...s,children:"p"})]}),e.jsxs("div",{className:"flex justify-center gap-1 my-1 w-full",children:[e.jsx(r,{...s,children:"a"}),e.jsx(r,{...s,children:"s"}),e.jsx(r,{...s,children:"d"}),e.jsx(r,{...s,children:"f"}),e.jsx(r,{...s,children:"g"}),e.jsx(r,{...s,children:"h"}),e.jsx(r,{...s,children:"j"}),e.jsx(r,{...s,children:"k"}),e.jsx(r,{...s,children:"l"})]}),e.jsxs("div",{className:"flex justify-center gap-1 my-1 w-full",children:[e.jsx(r,{...s,children:"z"}),e.jsx(r,{...s,children:"x"}),e.jsx(r,{...s,children:"c"}),e.jsx(r,{...s,children:"v"}),e.jsx(r,{...s,children:"b"}),e.jsx(r,{...s,children:"n"}),e.jsx(r,{...s,children:"m"}),e.jsx(r,{...s,children:"/"})]})]}),i=s=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex justify-center w-full",children:e.jsx(r,{...s,children:"▲"})}),e.jsxs("div",{className:"flex justify-center gap-12 w-full",children:[e.jsx(r,{...s,children:"◀︎"}),e.jsx(r,{...s,children:"▶︎"})]}),e.jsx("div",{className:"flex justify-center w-full",children:e.jsx(r,{...s,children:"▼"})})]});var o,b,u;a.parameters={...a.parameters,docs:{...(o=a.parameters)==null?void 0:o.docs,source:{originalSource:`args => { + return <> + A + ; +}`,...(u=(b=a.parameters)==null?void 0:b.docs)==null?void 0:u.source}}};var K,m,x;n.parameters={...n.parameters,docs:{...(K=n.parameters)==null?void 0:K.docs,source:{originalSource:`args => { + return
+ Press F to pay respects. +
; +}`,...(x=(m=n.parameters)==null?void 0:m.docs)==null?void 0:x.source}}};var p,j,f;l.parameters={...l.parameters,docs:{...(p=l.parameters)==null?void 0:p.docs,source:{originalSource:`args => { + return <> + ctrl+shift+ + del + ; +}`,...(f=(j=l.parameters)==null?void 0:j.docs)==null?void 0:f.source}}};var h,g,y;c.parameters={...c.parameters,docs:{...(h=c.parameters)==null?void 0:h.docs,source:{originalSource:`args => { + return <> + + + + + ; +}`,...(y=(g=c.parameters)==null?void 0:g.docs)==null?void 0:y.source}}};var v,N,w;t.parameters={...t.parameters,docs:{...(v=t.parameters)==null?void 0:v.docs,source:{originalSource:`args => { + return
+
+ q + w + e + r + t + y + u + i + o + p +
+
+ a + s + d + f + g + h + j + k + l +
+
+ z + x + c + v + b + n + m + / +
+
; +}`,...(w=(N=t.parameters)==null?void 0:N.docs)==null?void 0:w.source}}};var _,F,k;i.parameters={...i.parameters,docs:{...(_=i.parameters)==null?void 0:_.docs,source:{originalSource:`args => { + return <> +
+ +
+
+ ◀︎ + ▶︎ +
+
+ +
+ ; +}`,...(k=(F=i.parameters)==null?void 0:F.docs)==null?void 0:k.source}}};const O=["Default","InText","KeyCombination","FunctionKeys","FullKeyboard","ArrowKeys"];export{i as ArrowKeys,a as Default,t as FullKeyboard,c as FunctionKeys,n as InText,l as KeyCombination,O as __namedExportsOrder,M as default}; diff --git a/docs/assets/Link.stories-8fcf5c31.js b/docs/assets/Link.stories-8fcf5c31.js deleted file mode 100644 index 9a83ba3c..00000000 --- a/docs/assets/Link.stories-8fcf5c31.js +++ /dev/null @@ -1,7 +0,0 @@ -import{j as p}from"./tw-merge-4486aaf0.js";import{L as s}from"./index-13a2cfa3.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";const d={title:"Navigation/Link",component:s},r=t=>p(s,{...t,children:"It's just a simple link"});r.args={};const e=t=>p(s,{...t,href:"https://google.com",target:"_blank",children:"Take me to Google!"});e.args={};var o,a,n;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`args => { - return It's just a simple link; -}`,...(n=(a=r.parameters)==null?void 0:a.docs)==null?void 0:n.source}}};var i,m,c;e.parameters={...e.parameters,docs:{...(i=e.parameters)==null?void 0:i.docs,source:{originalSource:`args => { - return - Take me to Google! - ; -}`,...(c=(m=e.parameters)==null?void 0:m.docs)==null?void 0:c.source}}};const L=["Default","LinkWithHref"];export{r as Default,e as LinkWithHref,L as __namedExportsOrder,d as default}; diff --git a/docs/assets/Link.stories-B7PS6Kzc.js b/docs/assets/Link.stories-B7PS6Kzc.js new file mode 100644 index 00000000..7f7078f3 --- /dev/null +++ b/docs/assets/Link.stories-B7PS6Kzc.js @@ -0,0 +1,7 @@ +import{j as p}from"./jsx-runtime-BjG_zV1W.js";import{L as s}from"./index-B_cgKLuR.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";const L={title:"Navigation/Link",component:s},r=t=>p.jsx(s,{...t,children:"It's just a simple link"});r.args={};const e=t=>p.jsx(s,{...t,href:"https://google.com",target:"_blank",children:"Take me to Google!"});e.args={};var o,a,n;r.parameters={...r.parameters,docs:{...(o=r.parameters)==null?void 0:o.docs,source:{originalSource:`args => { + return It's just a simple link; +}`,...(n=(a=r.parameters)==null?void 0:a.docs)==null?void 0:n.source}}};var i,m,c;e.parameters={...e.parameters,docs:{...(i=e.parameters)==null?void 0:i.docs,source:{originalSource:`args => { + return + Take me to Google! + ; +}`,...(c=(m=e.parameters)==null?void 0:m.docs)==null?void 0:c.source}}};const f=["Default","LinkWithHref"];export{r as Default,e as LinkWithHref,f as __namedExportsOrder,L as default}; diff --git a/docs/assets/Loading.stories-BxmS8H62.js b/docs/assets/Loading.stories-BxmS8H62.js new file mode 100644 index 00000000..621c94b2 --- /dev/null +++ b/docs/assets/Loading.stories-BxmS8H62.js @@ -0,0 +1,35 @@ +import{j as r}from"./jsx-runtime-BjG_zV1W.js";import{L as a}from"./index-Dl-l57lR.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";const N={title:"Feedback/Loading",component:a,parameters:{controls:{expanded:!0}}},f=s=>r.jsx(a,{...s}),n=f.bind({});n.args={variant:"spinner"};const o=s=>r.jsx("div",{children:r.jsxs("div",{children:[r.jsx(a,{...s}),r.jsx(a,{...s,color:"primary"}),r.jsx(a,{...s,color:"secondary"}),r.jsx(a,{...s,color:"success"}),r.jsx(a,{...s,color:"warning"}),r.jsx(a,{...s,color:"error"}),r.jsx(a,{...s,color:"info"}),r.jsx(a,{...s,color:"accent"}),r.jsx(a,{...s,color:"ghost"})]})});o.args={className:"m-1"};const e=s=>r.jsxs("div",{className:"flex gap-x-2",children:[r.jsx(a,{...s}),r.jsx(a,{...s,variant:"dots"}),r.jsx(a,{...s,variant:"ring"}),r.jsx(a,{...s,variant:"ball"}),r.jsx(a,{...s,variant:"bars"}),r.jsx(a,{...s,variant:"infinity"})]}),i=s=>r.jsx("div",{children:r.jsxs("div",{children:[r.jsx(a,{...s,size:"xs"}),r.jsx(a,{...s,size:"sm"}),r.jsx(a,{...s,size:"md"}),r.jsx(a,{...s,size:"lg"})]})});var t,c,d;n.parameters={...n.parameters,docs:{...(t=n.parameters)==null?void 0:t.docs,source:{originalSource:`args => { + return ; +}`,...(d=(c=n.parameters)==null?void 0:c.docs)==null?void 0:d.source}}};var g,l,m;o.parameters={...o.parameters,docs:{...(g=o.parameters)==null?void 0:g.docs,source:{originalSource:`args => { + return
+
+ + + + + + + + + +
+
; +}`,...(m=(l=o.parameters)==null?void 0:l.docs)==null?void 0:m.source}}};var x,p,j;e.parameters={...e.parameters,docs:{...(x=e.parameters)==null?void 0:x.docs,source:{originalSource:`args => { + return
+ + + + + + +
; +}`,...(j=(p=e.parameters)==null?void 0:p.docs)==null?void 0:j.source}}};var u,v,L;i.parameters={...i.parameters,docs:{...(u=i.parameters)==null?void 0:u.docs,source:{originalSource:`args => { + return
+
+ + + + +
+
; +}`,...(L=(v=i.parameters)==null?void 0:v.docs)==null?void 0:L.source}}};const w=["Default","Colors","Variants","Sizes"];export{o as Colors,n as Default,i as Sizes,e as Variants,w as __namedExportsOrder,N as default}; diff --git a/docs/assets/Loading.stories-c583e0a9.js b/docs/assets/Loading.stories-c583e0a9.js deleted file mode 100644 index 4673cd7c..00000000 --- a/docs/assets/Loading.stories-c583e0a9.js +++ /dev/null @@ -1,35 +0,0 @@ -import{j as a,a as t}from"./tw-merge-4486aaf0.js";import{L as n}from"./index-8d7e61f2.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";const N={title:"Feedback/Loading",component:n,parameters:{controls:{expanded:!0}}},h=r=>a(n,{...r}),o=h.bind({});o.args={variant:"spinner"};const s=r=>a("div",{children:t("div",{children:[a(n,{...r}),a(n,{...r,color:"primary"}),a(n,{...r,color:"secondary"}),a(n,{...r,color:"success"}),a(n,{...r,color:"warning"}),a(n,{...r,color:"error"}),a(n,{...r,color:"info"}),a(n,{...r,color:"accent"}),a(n,{...r,color:"ghost"})]})});s.args={className:"m-1"};const e=r=>t("div",{className:"flex gap-x-2",children:[a(n,{...r}),a(n,{...r,variant:"dots"}),a(n,{...r,variant:"ring"}),a(n,{...r,variant:"ball"}),a(n,{...r,variant:"bars"}),a(n,{...r,variant:"infinity"})]}),i=r=>a("div",{children:t("div",{children:[a(n,{...r,size:"xs"}),a(n,{...r,size:"sm"}),a(n,{...r,size:"md"}),a(n,{...r,size:"lg"})]})});var c,d,g;o.parameters={...o.parameters,docs:{...(c=o.parameters)==null?void 0:c.docs,source:{originalSource:`args => { - return ; -}`,...(g=(d=o.parameters)==null?void 0:d.docs)==null?void 0:g.source}}};var l,m,p;s.parameters={...s.parameters,docs:{...(l=s.parameters)==null?void 0:l.docs,source:{originalSource:`args => { - return
-
- - - - - - - - - -
-
; -}`,...(p=(m=s.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};var u,v,L;e.parameters={...e.parameters,docs:{...(u=e.parameters)==null?void 0:u.docs,source:{originalSource:`args => { - return
- - - - - - -
; -}`,...(L=(v=e.parameters)==null?void 0:v.docs)==null?void 0:L.source}}};var f,x,z;i.parameters={...i.parameters,docs:{...(f=i.parameters)==null?void 0:f.docs,source:{originalSource:`args => { - return
-
- - - - -
-
; -}`,...(z=(x=i.parameters)==null?void 0:x.docs)==null?void 0:z.source}}};const w=["Default","Colors","Variants","Sizes"];export{s as Colors,o as Default,i as Sizes,e as Variants,w as __namedExportsOrder,N as default}; diff --git a/docs/assets/Mask.stories-HHIxd4DC.js b/docs/assets/Mask.stories-HHIxd4DC.js new file mode 100644 index 00000000..0bac51f8 --- /dev/null +++ b/docs/assets/Mask.stories-HHIxd4DC.js @@ -0,0 +1,31 @@ +import{j as a}from"./jsx-runtime-BjG_zV1W.js";import{M as s}from"./index-BQZBaXSX.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";const br={title:"Layout/Mask",component:s},e=r=>a.jsx(s,{...r});e.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"squircle"};const o=r=>a.jsx(s,{...r});o.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"heart"};const t=r=>a.jsx(s,{...r});t.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"hexagon"};const c=r=>a.jsx(s,{...r});c.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"hexagon-2"};const n=r=>a.jsx(s,{...r});n.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"decagon"};const i=r=>a.jsx(s,{...r});i.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"pentagon"};const m=r=>a.jsx(s,{...r});m.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"diamond"};const p=r=>a.jsx(s,{...r});p.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"square"};const g=r=>a.jsx(s,{...r});g.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"circle"};const u=r=>a.jsx(s,{...r});u.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"star"};const d=r=>a.jsx(s,{...r});d.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"star-2"};const b=r=>a.jsx(s,{...r});b.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"triangle"};const h=r=>a.jsx(s,{...r});h.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"triangle-2"};const k=r=>a.jsx(s,{...r});k.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"triangle-3"};const l=r=>a.jsx(s,{...r});l.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"triangle-4"};var x,w,M;e.parameters={...e.parameters,docs:{...(x=e.parameters)==null?void 0:x.docs,source:{originalSource:`args => { + return ; +}`,...(M=(w=e.parameters)==null?void 0:w.docs)==null?void 0:M.source}}};var S,j,y;o.parameters={...o.parameters,docs:{...(S=o.parameters)==null?void 0:S.docs,source:{originalSource:`args => { + return ; +}`,...(y=(j=o.parameters)==null?void 0:j.docs)==null?void 0:y.source}}};var T,v,D;t.parameters={...t.parameters,docs:{...(T=t.parameters)==null?void 0:T.docs,source:{originalSource:`args => { + return ; +}`,...(D=(v=t.parameters)==null?void 0:v.docs)==null?void 0:D.source}}};var H,f,q;c.parameters={...c.parameters,docs:{...(H=c.parameters)==null?void 0:H.docs,source:{originalSource:`args => { + return ; +}`,...(q=(f=c.parameters)==null?void 0:f.docs)==null?void 0:q.source}}};var _,C,E;n.parameters={...n.parameters,docs:{...(_=n.parameters)==null?void 0:_.docs,source:{originalSource:`args => { + return ; +}`,...(E=(C=n.parameters)==null?void 0:C.docs)==null?void 0:E.source}}};var F,P,L;i.parameters={...i.parameters,docs:{...(F=i.parameters)==null?void 0:F.docs,source:{originalSource:`args => { + return ; +}`,...(L=(P=i.parameters)==null?void 0:P.docs)==null?void 0:L.source}}};var O,R,z;m.parameters={...m.parameters,docs:{...(O=m.parameters)==null?void 0:O.docs,source:{originalSource:`args => { + return ; +}`,...(z=(R=m.parameters)==null?void 0:R.docs)==null?void 0:z.source}}};var A,B,G;p.parameters={...p.parameters,docs:{...(A=p.parameters)==null?void 0:A.docs,source:{originalSource:`args => { + return ; +}`,...(G=(B=p.parameters)==null?void 0:B.docs)==null?void 0:G.source}}};var I,J,K;g.parameters={...g.parameters,docs:{...(I=g.parameters)==null?void 0:I.docs,source:{originalSource:`args => { + return ; +}`,...(K=(J=g.parameters)==null?void 0:J.docs)==null?void 0:K.source}}};var N,Q,U;u.parameters={...u.parameters,docs:{...(N=u.parameters)==null?void 0:N.docs,source:{originalSource:`args => { + return ; +}`,...(U=(Q=u.parameters)==null?void 0:Q.docs)==null?void 0:U.source}}};var V,W,X;d.parameters={...d.parameters,docs:{...(V=d.parameters)==null?void 0:V.docs,source:{originalSource:`args => { + return ; +}`,...(X=(W=d.parameters)==null?void 0:W.docs)==null?void 0:X.source}}};var Y,Z,$;b.parameters={...b.parameters,docs:{...(Y=b.parameters)==null?void 0:Y.docs,source:{originalSource:`args => { + return ; +}`,...($=(Z=b.parameters)==null?void 0:Z.docs)==null?void 0:$.source}}};var rr,sr,ar;h.parameters={...h.parameters,docs:{...(rr=h.parameters)==null?void 0:rr.docs,source:{originalSource:`args => { + return ; +}`,...(ar=(sr=h.parameters)==null?void 0:sr.docs)==null?void 0:ar.source}}};var er,or,tr;k.parameters={...k.parameters,docs:{...(er=k.parameters)==null?void 0:er.docs,source:{originalSource:`args => { + return ; +}`,...(tr=(or=k.parameters)==null?void 0:or.docs)==null?void 0:tr.source}}};var cr,nr,ir;l.parameters={...l.parameters,docs:{...(cr=l.parameters)==null?void 0:cr.docs,source:{originalSource:`args => { + return ; +}`,...(ir=(nr=l.parameters)==null?void 0:nr.docs)==null?void 0:ir.source}}};const hr=["Default","MaskHeart","Hexagon","HexagonTwo","Decagon","Pentagon","Diamond","Square","Circle","Star","StarTwo","Triangle","TriangleTwo","TriangleThree","TriangleFour"];export{g as Circle,n as Decagon,e as Default,m as Diamond,t as Hexagon,c as HexagonTwo,o as MaskHeart,i as Pentagon,p as Square,u as Star,d as StarTwo,b as Triangle,l as TriangleFour,k as TriangleThree,h as TriangleTwo,hr as __namedExportsOrder,br as default}; diff --git a/docs/assets/Mask.stories-f37c3ece.js b/docs/assets/Mask.stories-f37c3ece.js deleted file mode 100644 index 258623e7..00000000 --- a/docs/assets/Mask.stories-f37c3ece.js +++ /dev/null @@ -1,39 +0,0 @@ -import{j as e}from"./tw-merge-4486aaf0.js";import{M as a}from"./index-9795bb01.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";const qr={title:"Layout/Mask",component:a},s=r=>e(a,{...r});s.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"squircle"};const o=r=>e(a,{...r});o.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"heart"};const t=r=>e(a,{...r});t.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"hexagon"};const c=r=>e(a,{...r});c.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"hexagon-2"};const n=r=>e(a,{...r});n.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"decagon"};const i=r=>e(a,{...r});i.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"pentagon"};const m=r=>e(a,{...r});m.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"diamond"};const g=r=>e(a,{...r});g.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"square"};const p=r=>e(a,{...r});p.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"circle"};const u=r=>e(a,{...r});u.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"parallelogram"};const d=r=>e(a,{...r});d.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"parallelogram-2"};const l=r=>e(a,{...r});l.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"parallelogram-3"};const b=r=>e(a,{...r});b.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"parallelogram-4"};const h=r=>e(a,{...r});h.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"star"};const k=r=>e(a,{...r});k.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"star-2"};const w=r=>e(a,{...r});w.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"triangle"};const M=r=>e(a,{...r});M.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"triangle-2"};const S=r=>e(a,{...r});S.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"triangle-3"};const y=r=>e(a,{...r});y.args={src:"https://img.daisyui.com/images/stock/photo-1567653418876-5bb0e566e1c2.webp",variant:"triangle-4"};var T,v,P;s.parameters={...s.parameters,docs:{...(T=s.parameters)==null?void 0:T.docs,source:{originalSource:`args => { - return ; -}`,...(P=(v=s.parameters)==null?void 0:v.docs)==null?void 0:P.source}}};var x,D,H;o.parameters={...o.parameters,docs:{...(x=o.parameters)==null?void 0:x.docs,source:{originalSource:`args => { - return ; -}`,...(H=(D=o.parameters)==null?void 0:D.docs)==null?void 0:H.source}}};var f,q,F;t.parameters={...t.parameters,docs:{...(f=t.parameters)==null?void 0:f.docs,source:{originalSource:`args => { - return ; -}`,...(F=(q=t.parameters)==null?void 0:q.docs)==null?void 0:F.source}}};var _,j,C;c.parameters={...c.parameters,docs:{...(_=c.parameters)==null?void 0:_.docs,source:{originalSource:`args => { - return ; -}`,...(C=(j=c.parameters)==null?void 0:j.docs)==null?void 0:C.source}}};var E,L,O;n.parameters={...n.parameters,docs:{...(E=n.parameters)==null?void 0:E.docs,source:{originalSource:`args => { - return ; -}`,...(O=(L=n.parameters)==null?void 0:L.docs)==null?void 0:O.source}}};var z,A,B;i.parameters={...i.parameters,docs:{...(z=i.parameters)==null?void 0:z.docs,source:{originalSource:`args => { - return ; -}`,...(B=(A=i.parameters)==null?void 0:A.docs)==null?void 0:B.source}}};var G,I,J;m.parameters={...m.parameters,docs:{...(G=m.parameters)==null?void 0:G.docs,source:{originalSource:`args => { - return ; -}`,...(J=(I=m.parameters)==null?void 0:I.docs)==null?void 0:J.source}}};var K,N,Q;g.parameters={...g.parameters,docs:{...(K=g.parameters)==null?void 0:K.docs,source:{originalSource:`args => { - return ; -}`,...(Q=(N=g.parameters)==null?void 0:N.docs)==null?void 0:Q.source}}};var R,U,V;p.parameters={...p.parameters,docs:{...(R=p.parameters)==null?void 0:R.docs,source:{originalSource:`args => { - return ; -}`,...(V=(U=p.parameters)==null?void 0:U.docs)==null?void 0:V.source}}};var W,X,Y;u.parameters={...u.parameters,docs:{...(W=u.parameters)==null?void 0:W.docs,source:{originalSource:`args => { - return ; -}`,...(Y=(X=u.parameters)==null?void 0:X.docs)==null?void 0:Y.source}}};var Z,$,rr;d.parameters={...d.parameters,docs:{...(Z=d.parameters)==null?void 0:Z.docs,source:{originalSource:`args => { - return ; -}`,...(rr=($=d.parameters)==null?void 0:$.docs)==null?void 0:rr.source}}};var ar,er,sr;l.parameters={...l.parameters,docs:{...(ar=l.parameters)==null?void 0:ar.docs,source:{originalSource:`args => { - return ; -}`,...(sr=(er=l.parameters)==null?void 0:er.docs)==null?void 0:sr.source}}};var or,tr,cr;b.parameters={...b.parameters,docs:{...(or=b.parameters)==null?void 0:or.docs,source:{originalSource:`args => { - return ; -}`,...(cr=(tr=b.parameters)==null?void 0:tr.docs)==null?void 0:cr.source}}};var nr,ir,mr;h.parameters={...h.parameters,docs:{...(nr=h.parameters)==null?void 0:nr.docs,source:{originalSource:`args => { - return ; -}`,...(mr=(ir=h.parameters)==null?void 0:ir.docs)==null?void 0:mr.source}}};var gr,pr,ur;k.parameters={...k.parameters,docs:{...(gr=k.parameters)==null?void 0:gr.docs,source:{originalSource:`args => { - return ; -}`,...(ur=(pr=k.parameters)==null?void 0:pr.docs)==null?void 0:ur.source}}};var dr,lr,br;w.parameters={...w.parameters,docs:{...(dr=w.parameters)==null?void 0:dr.docs,source:{originalSource:`args => { - return ; -}`,...(br=(lr=w.parameters)==null?void 0:lr.docs)==null?void 0:br.source}}};var hr,kr,wr;M.parameters={...M.parameters,docs:{...(hr=M.parameters)==null?void 0:hr.docs,source:{originalSource:`args => { - return ; -}`,...(wr=(kr=M.parameters)==null?void 0:kr.docs)==null?void 0:wr.source}}};var Mr,Sr,yr;S.parameters={...S.parameters,docs:{...(Mr=S.parameters)==null?void 0:Mr.docs,source:{originalSource:`args => { - return ; -}`,...(yr=(Sr=S.parameters)==null?void 0:Sr.docs)==null?void 0:yr.source}}};var Tr,vr,Pr;y.parameters={...y.parameters,docs:{...(Tr=y.parameters)==null?void 0:Tr.docs,source:{originalSource:`args => { - return ; -}`,...(Pr=(vr=y.parameters)==null?void 0:vr.docs)==null?void 0:Pr.source}}};const Fr=["Default","MaskHeart","Hexagon","HexagonTwo","Decagon","Pentagon","Diamond","Square","Circle","Parallelogram","ParallelogramTwo","ParallelogramThree","ParallelogramFour","Star","StarTwo","Triangle","TriangleTwo","TriangleThree","TriangleFour"];export{p as Circle,n as Decagon,s as Default,m as Diamond,t as Hexagon,c as HexagonTwo,o as MaskHeart,u as Parallelogram,b as ParallelogramFour,l as ParallelogramThree,d as ParallelogramTwo,i as Pentagon,g as Square,h as Star,k as StarTwo,w as Triangle,y as TriangleFour,S as TriangleThree,M as TriangleTwo,Fr as __namedExportsOrder,qr as default}; diff --git a/docs/assets/Menu.stories-SZR-qRsu.js b/docs/assets/Menu.stories-SZR-qRsu.js new file mode 100644 index 00000000..cf376306 --- /dev/null +++ b/docs/assets/Menu.stories-SZR-qRsu.js @@ -0,0 +1,599 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{r as B}from"./iframe-DDnXVYpC.js";import{M as n}from"./index-BxHmxGX2.js";import{T as r}from"./index-5p3KT8qP.js";import{B as C}from"./index-Bdz6q0Sq.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";const f={control:"select",options:[!0,!1,"xs","sm","md","lg"]},sn={title:"Navigation/Menu",component:n,args:{className:"bg-base-100 w-56 shadow-xl"},argTypes:{compact:f,normal:f,horizontal:f,vertical:f}},t=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx("a",{children:"Item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 2"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 3"})})]});t.args={className:"bg-base-200 w-56 rounded-box"};const a=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx("a",{children:"Item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 2"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 3"})})]});a.args={className:"bg-base-200 rounded-box",responsive:!0};const o=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx("a",{children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})})}),e.jsx(n.Item,{children:e.jsx("a",{children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})}),e.jsx(n.Item,{children:e.jsx("a",{children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})})]});o.args={className:"bg-base-200 rounded-box"};const l=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx("a",{children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})})}),e.jsx(n.Item,{children:e.jsx("a",{children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})}),e.jsx(n.Item,{children:e.jsx("a",{children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})})]});l.args={className:"bg-base-200 rounded-box",horizontal:!0};const m=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx(r,{message:"Home",position:"right",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})})}),e.jsx(n.Item,{children:e.jsx(r,{message:"Details",position:"right",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})}),e.jsx(n.Item,{children:e.jsx(r,{message:"Stats",position:"right",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})})]});m.args={className:"bg-base-200 rounded-box"};const i=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx(r,{message:"Home",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})})}),e.jsx(n.Item,{children:e.jsx(r,{message:"Details",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})}),e.jsx(n.Item,{children:e.jsx(r,{message:"Stats",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})})]});i.args={className:"bg-base-200 rounded-box mt-6",horizontal:!0};const c=s=>e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs(n,{...s,size:"xs",children:[e.jsx(n.Item,{children:e.jsx("a",{children:"xs item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"xs item 1"})})]}),e.jsxs(n,{...s,size:"sm",children:[e.jsx(n.Item,{children:e.jsx("a",{children:"sm item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"sm item 1"})})]}),e.jsxs(n,{...s,size:"md",children:[e.jsx(n.Item,{children:e.jsx("a",{children:"md item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"md item 1"})})]}),e.jsxs(n,{...s,size:"lg",children:[e.jsx(n.Item,{children:e.jsx("a",{children:"lg item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"lg item 1"})})]})]});c.args={className:"bg-base-200 w-56 rounded-box"};const h=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx("a",{children:"Enabled item 1"})}),e.jsx(n.Item,{disabled:!0,children:e.jsx("a",{children:"disabled item"})}),e.jsx(n.Item,{disabled:!0,children:e.jsx("a",{children:"disabled item"})})]});h.args={className:"bg-base-200 w-56 rounded-box"};const u=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsxs("a",{children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Item 1"]})}),e.jsx(n.Item,{children:e.jsxs("a",{children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Item 2"]})}),e.jsx(n.Item,{children:e.jsxs("a",{children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})}),"Item 3"]})})]});u.args={className:"bg-base-200 w-56 rounded-box"};const d=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsxs("a",{children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Inbox",e.jsx(C,{size:"sm",children:"99+"})]})}),e.jsx(n.Item,{children:e.jsxs("a",{children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Updates",e.jsx(C,{color:"warning",size:"sm",children:"NEW"})]})}),e.jsx(n.Item,{children:e.jsxs("a",{children:["Stats",e.jsx(C,{color:"info",size:"xs"})]})})]});d.args={className:"bg-base-200 rounded-box",responsive:!0};const x=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx("a",{children:"Item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 2"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 3"})})]});x.args={className:"bg-base-200 w-56 p-0 [&_li>*]:rounded-none"};const I=s=>e.jsxs(n,{...s,children:[e.jsx(n.Title,{children:"Title"}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 2"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 3"})})]});I.args={className:"bg-base-200 w-56 rounded-box"};const M=s=>e.jsx(n,{...s,children:e.jsxs(n.Item,{children:[e.jsx(n.Title,{children:"Title"}),e.jsxs(n,{children:[e.jsx(n.Item,{children:e.jsx("a",{children:"Item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 2"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 3"})})]})]})});M.args={className:"bg-base-200 w-56 rounded-box"};const j=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx("a",{children:"Item 1"})}),e.jsxs(n.Item,{children:[e.jsx("a",{children:"Parent"}),e.jsxs(n,{children:[e.jsx(n.Item,{children:e.jsx("a",{children:"level 2 item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"level 2 item 2"})}),e.jsxs(n.Item,{children:[e.jsx("a",{children:"Parent"}),e.jsxs(n,{children:[e.jsx(n.Item,{children:e.jsx("a",{children:"level 3 item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"level 3 item 2"})})]})]})]})]}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 3"})})]});j.args={className:"bg-base-200 w-56 rounded-box"};const v=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx("a",{children:"Item 1"})}),e.jsx(n.Item,{children:e.jsxs(n.Details,{open:!0,label:"Parent",children:[e.jsx(n.Item,{children:e.jsx("a",{children:"level 2 item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"level 2 item 2"})}),e.jsx(n.Item,{children:e.jsxs(n.Details,{open:!0,label:"Parent",children:[e.jsx(n.Item,{children:e.jsx("a",{children:"level 3 item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"level 3 item 2"})})]})})]})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 3"})})]});v.args={className:"bg-base-200 w-56 rounded-box"};const g=s=>{const[qe,W]=B.useState(!0),Ge=B.useCallback(()=>{W(Je=>!Je)},[W]);return e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx("a",{children:"Item 1"})}),e.jsx(n.Item,{children:e.jsxs(n.Dropdown,{label:"Parent",onClick:Ge,open:qe,children:[e.jsx(n.Item,{children:e.jsx("a",{children:"level 2 item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"level 2 item 2"})})]})})]})};g.args={className:"bg-base-200 w-56 rounded-box"};const p=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsxs("a",{children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),"resume.pdf"]})}),e.jsx(n.Item,{children:e.jsxs(n.Details,{open:!0,label:e.jsxs(e.Fragment,{children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})}),"My Files"]}),children:[e.jsx(n.Item,{children:e.jsxs("a",{children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),"Project-final.psd"]})}),e.jsx(n.Item,{children:e.jsxs("a",{children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),"Project-final-2.psd"]})}),e.jsx(n.Item,{children:e.jsxs(n.Details,{open:!0,label:e.jsxs(e.Fragment,{children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})}),"Images"]}),children:[e.jsx(n.Item,{children:e.jsxs("a",{children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})}),"Screenshot1.png"]})}),e.jsx(n.Item,{children:e.jsxs("a",{children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})}),"Screenshot2.png"]})}),e.jsx(n.Item,{children:e.jsx(n.Details,{open:!0,label:e.jsxs(e.Fragment,{children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})}),"Others"]}),children:e.jsx(n.Item,{children:e.jsxs("a",{children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})}),"Screenshot3.png"]})})})})]})})]})}),e.jsx(n.Item,{children:e.jsxs("a",{children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),"reports-final-2.pdf"]})})]});p.args={className:"bg-base-200 w-56 rounded-lg max-w-xs w-full",size:"xs"};const w=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx("a",{children:"Item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{className:"active",children:"Item 2"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 3"})})]});w.args={className:"bg-base-200 w-56 rounded-box"};const k=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx("a",{children:"Item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{className:"focus",children:"Item 2"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 3"})})]});k.args={className:"bg-base-200 w-56 rounded-box"};const b=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx("a",{children:"Item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 2"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 3"})})]});b.args={className:"bg-base-200 rounded-box",horizontal:!0};const L=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx("a",{children:"Item 1"})}),e.jsxs(n.Item,{children:[e.jsx("a",{children:"Parent"}),e.jsxs(n,{children:[e.jsx(n.Item,{children:e.jsx("a",{children:"level2 Item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"level2 Item 2"})})]})]}),e.jsx(n.Item,{children:e.jsx("a",{children:"Item 3"})})]});L.args={className:"bg-base-200 rounded-box",horizontal:!0};const z=s=>e.jsxs(n,{...s,children:[e.jsxs(n.Item,{children:[e.jsx("a",{children:"Solutions"}),e.jsxs(n,{children:[e.jsx(n.Item,{children:e.jsx("a",{children:"Design"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Development"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Hosting"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Domain register"})})]})]}),e.jsxs(n.Item,{children:[e.jsx("a",{children:"Enterprise"}),e.jsxs(n,{children:[e.jsx(n.Item,{children:e.jsx("a",{children:"CRM software"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Marketing management"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Security"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Consulting"})})]})]}),e.jsxs(n.Item,{children:[e.jsx("a",{children:"Products"}),e.jsxs(n,{children:[e.jsx(n.Item,{children:e.jsx("a",{children:"UI Kit"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Wordpress themes"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Wordpress plugins"})}),e.jsxs(n.Item,{children:[e.jsx("a",{children:"Open source"}),e.jsxs(n,{children:[e.jsx(n.Item,{children:e.jsx("a",{children:"Auth management system"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"VScode theme"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Color picker app"})})]})]})]})]}),e.jsxs(n.Item,{children:[e.jsx("a",{children:"Company"}),e.jsxs(n,{children:[e.jsx(n.Item,{children:e.jsx("a",{children:"About us"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Contact us"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Privacy policy"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"Press kit"})})]})]})]});z.args={className:"bg-base-200 rounded-box lg:min-w-max ",responsive:!0};const N=s=>e.jsxs(n,{...s,children:[e.jsx(n.Item,{children:e.jsx("a",{children:"Item 1"})}),e.jsx(n.Item,{children:e.jsxs(n.Details,{open:!0,label:"Parent item",children:[e.jsx(n.Item,{children:e.jsx("a",{children:"level 2 item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"level 2 item 2"})}),e.jsx(n.Item,{children:e.jsxs(n.Details,{open:!0,label:"Parent",children:[e.jsx(n.Item,{children:e.jsx("a",{children:"item 1"})}),e.jsx(n.Item,{children:e.jsx("a",{children:"item 2"})})]})})]})}),e.jsx("li",{children:e.jsx("a",{children:"Item 3"})})]});N.args={className:"bg-base-200 rounded-box lg:mb-64",responsive:!0};var S,H,V;t.parameters={...t.parameters,docs:{...(S=t.parameters)==null?void 0:S.docs,source:{originalSource:`args => { + return + + Item 1 + + + Item 2 + + + Item 3 + + ; +}`,...(V=(H=t.parameters)==null?void 0:H.docs)==null?void 0:V.source}}};var A,D,T;a.parameters={...a.parameters,docs:{...(A=a.parameters)==null?void 0:A.docs,source:{originalSource:`args => { + return + + Item 1 + + + Item 2 + + + Item 3 + + ; +}`,...(T=(D=a.parameters)==null?void 0:D.docs)==null?void 0:T.source}}};var P,y,O;o.parameters={...o.parameters,docs:{...(P=o.parameters)==null?void 0:P.docs,source:{originalSource:`args => { + return + + + + + + + + + + + + + + + + + + + + + + ; +}`,...(O=(y=o.parameters)==null?void 0:y.docs)==null?void 0:O.source}}};var R,E,F;l.parameters={...l.parameters,docs:{...(R=l.parameters)==null?void 0:R.docs,source:{originalSource:`args => { + return + + + + + + + + + + + + + + + + + + + + + + ; +}`,...(F=(E=l.parameters)==null?void 0:E.docs)==null?void 0:F.source}}};var U,_,K;m.parameters={...m.parameters,docs:{...(U=m.parameters)==null?void 0:U.docs,source:{originalSource:`args => { + return + + + + + + + + + + + + + + + + + + + + + + ; +}`,...(K=(_=m.parameters)==null?void 0:_.docs)==null?void 0:K.source}}};var q,G,J;i.parameters={...i.parameters,docs:{...(q=i.parameters)==null?void 0:q.docs,source:{originalSource:`args => { + return + + + + + + + + + + + + + + + + + + + + + + ; +}`,...(J=(G=i.parameters)==null?void 0:G.docs)==null?void 0:J.source}}};var Q,X,Y;c.parameters={...c.parameters,docs:{...(Q=c.parameters)==null?void 0:Q.docs,source:{originalSource:`args => { + return
+ + + xs item 1 + + + xs item 1 + + + + + sm item 1 + + + sm item 1 + + + + + md item 1 + + + md item 1 + + + + + lg item 1 + + + lg item 1 + + +
; +}`,...(Y=(X=c.parameters)==null?void 0:X.docs)==null?void 0:Y.source}}};var Z,$,ee;h.parameters={...h.parameters,docs:{...(Z=h.parameters)==null?void 0:Z.docs,source:{originalSource:`args => { + return + + Enabled item 1 + + + disabled item + + + disabled item + + ; +}`,...(ee=($=h.parameters)==null?void 0:$.docs)==null?void 0:ee.source}}};var ne,se,re;u.parameters={...u.parameters,docs:{...(ne=u.parameters)==null?void 0:ne.docs,source:{originalSource:`args => { + return + + + + + + Item 1 + + + + + + + + Item 2 + + + + + + + + Item 3 + + + ; +}`,...(re=(se=u.parameters)==null?void 0:se.docs)==null?void 0:re.source}}};var te,ae,oe;d.parameters={...d.parameters,docs:{...(te=d.parameters)==null?void 0:te.docs,source:{originalSource:`args => { + return + + + + + + Inbox + 99+ + + + + + + + + Updates + + NEW + + + + + + Stats + + + + ; +}`,...(oe=(ae=d.parameters)==null?void 0:ae.docs)==null?void 0:oe.source}}};var le,me,ie;x.parameters={...x.parameters,docs:{...(le=x.parameters)==null?void 0:le.docs,source:{originalSource:`args => { + return + + Item 1 + + + Item 2 + + + Item 3 + + ; +}`,...(ie=(me=x.parameters)==null?void 0:me.docs)==null?void 0:ie.source}}};var ce,he,ue;I.parameters={...I.parameters,docs:{...(ce=I.parameters)==null?void 0:ce.docs,source:{originalSource:`args => { + return + Title + + Item 1 + + + Item 2 + + + Item 3 + + ; +}`,...(ue=(he=I.parameters)==null?void 0:he.docs)==null?void 0:ue.source}}};var de,xe,Ie;M.parameters={...M.parameters,docs:{...(de=M.parameters)==null?void 0:de.docs,source:{originalSource:`args => { + return + + Title + + + Item 1 + + + Item 2 + + + Item 3 + + + + ; +}`,...(Ie=(xe=M.parameters)==null?void 0:xe.docs)==null?void 0:Ie.source}}};var Me,je,ve;j.parameters={...j.parameters,docs:{...(Me=j.parameters)==null?void 0:Me.docs,source:{originalSource:`args => { + return + + Item 1 + + + Parent + + + level 2 item 1 + + + level 2 item 2 + + + Parent + + + level 3 item 1 + + + level 3 item 2 + + + + + + + Item 3 + + ; +}`,...(ve=(je=j.parameters)==null?void 0:je.docs)==null?void 0:ve.source}}};var ge,pe,we;v.parameters={...v.parameters,docs:{...(ge=v.parameters)==null?void 0:ge.docs,source:{originalSource:`args => { + return + + Item 1 + + + + + level 2 item 1 + + + level 2 item 2 + + + + + level 3 item 1 + + + level 3 item 2 + + + + + + + Item 3 + + ; +}`,...(we=(pe=v.parameters)==null?void 0:pe.docs)==null?void 0:we.source}}};var ke,be,Le;g.parameters={...g.parameters,docs:{...(ke=g.parameters)==null?void 0:ke.docs,source:{originalSource:`args => { + const [open, setOpen] = useState(true); + const toggleOpen = useCallback(() => { + setOpen(val => !val); + }, [setOpen]); + return + + Item 1 + + + + + level 2 item 1 + + + level 2 item 2 + + + + ; +}`,...(Le=(be=g.parameters)==null?void 0:be.docs)==null?void 0:Le.source}}};var ze,Ne,fe;p.parameters={...p.parameters,docs:{...(ze=p.parameters)==null?void 0:ze.docs,source:{originalSource:`args => { + return + + + + + + resume.pdf + + + + + + + + My Files + }> + + + + + + Project-final.psd + + + + + + + + Project-final-2.psd + + + + + + + + Images + }> + + + + + + Screenshot1.png + + + + + + + + Screenshot2.png + + + + + + + + Others + }> + + + + + + Screenshot3.png + + + + + + + + + + + + + + reports-final-2.pdf + + + ; +}`,...(fe=(Ne=p.parameters)==null?void 0:Ne.docs)==null?void 0:fe.source}}};var Ce,We,Be;w.parameters={...w.parameters,docs:{...(Ce=w.parameters)==null?void 0:Ce.docs,source:{originalSource:`args => { + return + + Item 1 + + + Item 2 + + + Item 3 + + ; +}`,...(Be=(We=w.parameters)==null?void 0:We.docs)==null?void 0:Be.source}}};var Se,He,Ve;k.parameters={...k.parameters,docs:{...(Se=k.parameters)==null?void 0:Se.docs,source:{originalSource:`args => { + return + + Item 1 + + + Item 2 + + + Item 3 + + ; +}`,...(Ve=(He=k.parameters)==null?void 0:He.docs)==null?void 0:Ve.source}}};var Ae,De,Te;b.parameters={...b.parameters,docs:{...(Ae=b.parameters)==null?void 0:Ae.docs,source:{originalSource:`args => { + return + + Item 1 + + + Item 2 + + + Item 3 + + ; +}`,...(Te=(De=b.parameters)==null?void 0:De.docs)==null?void 0:Te.source}}};var Pe,ye,Oe;L.parameters={...L.parameters,docs:{...(Pe=L.parameters)==null?void 0:Pe.docs,source:{originalSource:`args => { + return + + Item 1 + + + Parent + + + level2 Item 1 + + + level2 Item 2 + + + + + Item 3 + + ; +}`,...(Oe=(ye=L.parameters)==null?void 0:ye.docs)==null?void 0:Oe.source}}};var Re,Ee,Fe;z.parameters={...z.parameters,docs:{...(Re=z.parameters)==null?void 0:Re.docs,source:{originalSource:`args => { + return + + Solutions + + + Design + + + Development + + + Hosting + + + Domain register + + + + + Enterprise + + + CRM software + + + Marketing management + + + Security + + + Consulting + + + + + Products + + + UI Kit + + + Wordpress themes + + + Wordpress plugins + + + Open source + + + Auth management system + + + VScode theme + + + Color picker app + + + + + + + Company + + + About us + + + Contact us + + + Privacy policy + + + Press kit + + + + ; +}`,...(Fe=(Ee=z.parameters)==null?void 0:Ee.docs)==null?void 0:Fe.source}}};var Ue,_e,Ke;N.parameters={...N.parameters,docs:{...(Ue=N.parameters)==null?void 0:Ue.docs,source:{originalSource:`args => { + return + + Item 1 + + + + + level 2 item 1 + + + level 2 item 2 + + + + + item 1 + + + item 2 + + + + + +
  • + Item 3 +
  • +
    ; +}`,...(Ke=(_e=N.parameters)==null?void 0:_e.docs)==null?void 0:Ke.source}}};const rn=["Default","Responsive","IconOnly","IconOnlyHorizontal","IconOnlyWithTooltip","IconOnlyHorizontalWithTooltip","Sizes","DisabledItems","Icons","IconsAndBadgeResponsive","WithoutPaddingAndBorderRadius","Title","TitleAsParent","Submenu","CollapsibleSubmenu","CollapsibleSubmenuWithMenuDropdown","FileTree","ActiveItem","FocusItem","Horizontal","HorizontalSubmenu","MegaMenuWithSubmenuResponsive","CollapsibleWithSubmenuResponsive"];export{w as ActiveItem,v as CollapsibleSubmenu,g as CollapsibleSubmenuWithMenuDropdown,N as CollapsibleWithSubmenuResponsive,t as Default,h as DisabledItems,p as FileTree,k as FocusItem,b as Horizontal,L as HorizontalSubmenu,o as IconOnly,l as IconOnlyHorizontal,i as IconOnlyHorizontalWithTooltip,m as IconOnlyWithTooltip,u as Icons,d as IconsAndBadgeResponsive,z as MegaMenuWithSubmenuResponsive,a as Responsive,c as Sizes,j as Submenu,I as Title,M as TitleAsParent,x as WithoutPaddingAndBorderRadius,rn as __namedExportsOrder,sn as default}; diff --git a/docs/assets/Menu.stories-f9d7c6c6.js b/docs/assets/Menu.stories-f9d7c6c6.js deleted file mode 100644 index c7f4777a..00000000 --- a/docs/assets/Menu.stories-f9d7c6c6.js +++ /dev/null @@ -1,599 +0,0 @@ -import{a as r,j as e,F as B}from"./tw-merge-4486aaf0.js";import{r as H}from"./index-f46741a2.js";import{M as n}from"./index-1453f494.js";import{T as a}from"./index-a3878ae0.js";import{B as j}from"./index-e61e426b.js";import"./clsx.m-1229b3e0.js";const W={control:"select",options:[!0,!1,"xs","sm","md","lg"]},tn={title:"Navigation/Menu",component:n,args:{className:"bg-base-100 w-56 shadow-xl"},argTypes:{compact:W,normal:W,horizontal:W,vertical:W}},s=t=>r(n,{...t,children:[e(n.Item,{children:e("a",{children:"Item 1"})}),e(n.Item,{children:e("a",{children:"Item 2"})}),e(n.Item,{children:e("a",{children:"Item 3"})})]});s.args={className:"bg-base-200 w-56 rounded-box"};const o=t=>r(n,{...t,children:[e(n.Item,{children:e("a",{children:"Item 1"})}),e(n.Item,{children:e("a",{children:"Item 2"})}),e(n.Item,{children:e("a",{children:"Item 3"})})]});o.args={className:"bg-base-200 rounded-box",responsive:!0};const l=t=>r(n,{...t,children:[e(n.Item,{children:e("a",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})})}),e(n.Item,{children:e("a",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})}),e(n.Item,{children:e("a",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})})]});l.args={className:"bg-base-200 rounded-box"};const m=t=>r(n,{...t,children:[e(n.Item,{children:e("a",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})})}),e(n.Item,{children:e("a",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})}),e(n.Item,{children:e("a",{children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})})]});m.args={className:"bg-base-200 rounded-box",horizontal:!0};const i=t=>r(n,{...t,children:[e(n.Item,{children:e(a,{message:"Home",position:"right",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})})}),e(n.Item,{children:e(a,{message:"Details",position:"right",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})}),e(n.Item,{children:e(a,{message:"Stats",position:"right",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})})]});i.args={className:"bg-base-200 rounded-box"};const c=t=>r(n,{...t,children:[e(n.Item,{children:e(a,{message:"Home",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})})})}),e(n.Item,{children:e(a,{message:"Details",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})})}),e(n.Item,{children:e(a,{message:"Stats",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})})})]});c.args={className:"bg-base-200 rounded-box mt-6",horizontal:!0};const h=t=>r("div",{className:"flex flex-col gap-4",children:[r(n,{...t,size:"xs",children:[e(n.Item,{children:e("a",{children:"xs item 1"})}),e(n.Item,{children:e("a",{children:"xs item 1"})})]}),r(n,{...t,size:"sm",children:[e(n.Item,{children:e("a",{children:"sm item 1"})}),e(n.Item,{children:e("a",{children:"sm item 1"})})]}),r(n,{...t,size:"md",children:[e(n.Item,{children:e("a",{children:"md item 1"})}),e(n.Item,{children:e("a",{children:"md item 1"})})]}),r(n,{...t,size:"lg",children:[e(n.Item,{children:e("a",{children:"lg item 1"})}),e(n.Item,{children:e("a",{children:"lg item 1"})})]})]});h.args={className:"bg-base-200 w-56 rounded-box"};const u=t=>r(n,{...t,children:[e(n.Item,{children:e("a",{children:"Enabled item 1"})}),e(n.Item,{disabled:!0,children:e("a",{children:"disabled item"})}),e(n.Item,{disabled:!0,children:e("a",{children:"disabled item"})})]});u.args={className:"bg-base-200 w-56 rounded-box"};const d=t=>r(n,{...t,children:[e(n.Item,{children:r("a",{children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Item 1"]})}),e(n.Item,{children:r("a",{children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Item 2"]})}),e(n.Item,{children:r("a",{children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})}),"Item 3"]})})]});d.args={className:"bg-base-200 w-56 rounded-box"};const I=t=>r(n,{...t,children:[e(n.Item,{children:r("a",{children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Inbox",e(j,{size:"sm",children:"99+"})]})}),e(n.Item,{children:r("a",{children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Updates",e(j,{color:"warning",size:"sm",children:"NEW"})]})}),e(n.Item,{children:r("a",{children:["Stats",e(j,{color:"info",size:"xs"})]})})]});I.args={className:"bg-base-200 rounded-box",responsive:!0};const M=t=>r(n,{...t,children:[e(n.Item,{children:e("a",{children:"Item 1"})}),e(n.Item,{children:e("a",{children:"Item 2"})}),e(n.Item,{children:e("a",{children:"Item 3"})})]});M.args={className:"bg-base-200 w-56 p-0 [&_li>*]:rounded-none"};const v=t=>r(n,{...t,children:[e(n.Title,{children:"Title"}),e(n.Item,{children:e("a",{children:"Item 1"})}),e(n.Item,{children:e("a",{children:"Item 2"})}),e(n.Item,{children:e("a",{children:"Item 3"})})]});v.args={className:"bg-base-200 w-56 rounded-box"};const g=t=>e(n,{...t,children:r(n.Item,{children:[e(n.Title,{children:"Title"}),r(n,{children:[e(n.Item,{children:e("a",{children:"Item 1"})}),e(n.Item,{children:e("a",{children:"Item 2"})}),e(n.Item,{children:e("a",{children:"Item 3"})})]})]})});g.args={className:"bg-base-200 w-56 rounded-box"};const p=t=>r(n,{...t,children:[e(n.Item,{children:e("a",{children:"Item 1"})}),r(n.Item,{children:[e("a",{children:"Parent"}),r(n,{children:[e(n.Item,{children:e("a",{children:"level 2 item 1"})}),e(n.Item,{children:e("a",{children:"level 2 item 2"})}),r(n.Item,{children:[e("a",{children:"Parent"}),r(n,{children:[e(n.Item,{children:e("a",{children:"level 3 item 1"})}),e(n.Item,{children:e("a",{children:"level 3 item 2"})})]})]})]})]}),e(n.Item,{children:e("a",{children:"Item 3"})})]});p.args={className:"bg-base-200 w-56 rounded-box"};const w=t=>r(n,{...t,children:[e(n.Item,{children:e("a",{children:"Item 1"})}),e(n.Item,{children:r(n.Details,{open:!0,label:"Parent",children:[e(n.Item,{children:e("a",{children:"level 2 item 1"})}),e(n.Item,{children:e("a",{children:"level 2 item 2"})}),e(n.Item,{children:r(n.Details,{open:!0,label:"Parent",children:[e(n.Item,{children:e("a",{children:"level 3 item 1"})}),e(n.Item,{children:e("a",{children:"level 3 item 2"})})]})})]})}),e(n.Item,{children:e("a",{children:"Item 3"})})]});w.args={className:"bg-base-200 w-56 rounded-box"};const k=t=>{const[Je,S]=H.useState(!0),Qe=H.useCallback(()=>{S(Xe=>!Xe)},[S]);return r(n,{...t,children:[e(n.Item,{children:e("a",{children:"Item 1"})}),e(n.Item,{children:r(n.Dropdown,{label:"Parent",onClick:Qe,open:Je,children:[e(n.Item,{children:e("a",{children:"level 2 item 1"})}),e(n.Item,{children:e("a",{children:"level 2 item 2"})})]})})]})};k.args={className:"bg-base-200 w-56 rounded-box"};const x=t=>r(n,{...t,children:[e(n.Item,{children:r("a",{children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),"resume.pdf"]})}),e(n.Item,{children:r(n.Details,{open:!0,label:r(B,{children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})}),"My Files"]}),children:[e(n.Item,{children:r("a",{children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),"Project-final.psd"]})}),e(n.Item,{children:r("a",{children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m2.25 0H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),"Project-final-2.psd"]})}),e(n.Item,{children:r(n.Details,{open:!0,label:r(B,{children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})}),"Images"]}),children:[e(n.Item,{children:r("a",{children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})}),"Screenshot1.png"]})}),e(n.Item,{children:r("a",{children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})}),"Screenshot2.png"]})}),e(n.Item,{children:e(n.Details,{open:!0,label:r(B,{children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 12.75V12A2.25 2.25 0 014.5 9.75h15A2.25 2.25 0 0121.75 12v.75m-8.69-6.44l-2.12-2.12a1.5 1.5 0 00-1.061-.44H4.5A2.25 2.25 0 002.25 6v12a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18V9a2.25 2.25 0 00-2.25-2.25h-5.379a1.5 1.5 0 01-1.06-.44z"})}),"Others"]}),children:e(n.Item,{children:r("a",{children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"})}),"Screenshot3.png"]})})})})]})})]})}),e(n.Item,{children:r("a",{children:[e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-4 h-4",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"})}),"reports-final-2.pdf"]})})]});x.args={className:"bg-base-200 w-56 rounded-lg max-w-xs w-full",size:"xs"};const b=t=>r(n,{...t,children:[e(n.Item,{children:e("a",{children:"Item 1"})}),e(n.Item,{children:e("a",{className:"active",children:"Item 2"})}),e(n.Item,{children:e("a",{children:"Item 3"})})]});b.args={className:"bg-base-200 w-56 rounded-box"};const L=t=>r(n,{...t,children:[e(n.Item,{children:e("a",{children:"Item 1"})}),e(n.Item,{children:e("a",{className:"focus",children:"Item 2"})}),e(n.Item,{children:e("a",{children:"Item 3"})})]});L.args={className:"bg-base-200 w-56 rounded-box"};const z=t=>r(n,{...t,children:[e(n.Item,{children:e("a",{children:"Item 1"})}),e(n.Item,{children:e("a",{children:"Item 2"})}),e(n.Item,{children:e("a",{children:"Item 3"})})]});z.args={className:"bg-base-200 rounded-box",horizontal:!0};const N=t=>r(n,{...t,children:[e(n.Item,{children:e("a",{children:"Item 1"})}),r(n.Item,{children:[e("a",{children:"Parent"}),r(n,{children:[e(n.Item,{children:e("a",{children:"level2 Item 1"})}),e(n.Item,{children:e("a",{children:"level2 Item 2"})})]})]}),e(n.Item,{children:e("a",{children:"Item 3"})})]});N.args={className:"bg-base-200 rounded-box",horizontal:!0};const f=t=>r(n,{...t,children:[r(n.Item,{children:[e("a",{children:"Solutions"}),r(n,{children:[e(n.Item,{children:e("a",{children:"Design"})}),e(n.Item,{children:e("a",{children:"Development"})}),e(n.Item,{children:e("a",{children:"Hosting"})}),e(n.Item,{children:e("a",{children:"Domain register"})})]})]}),r(n.Item,{children:[e("a",{children:"Enterprise"}),r(n,{children:[e(n.Item,{children:e("a",{children:"CRM software"})}),e(n.Item,{children:e("a",{children:"Marketing management"})}),e(n.Item,{children:e("a",{children:"Security"})}),e(n.Item,{children:e("a",{children:"Consulting"})})]})]}),r(n.Item,{children:[e("a",{children:"Products"}),r(n,{children:[e(n.Item,{children:e("a",{children:"UI Kit"})}),e(n.Item,{children:e("a",{children:"Wordpress themes"})}),e(n.Item,{children:e("a",{children:"Wordpress plugins"})}),r(n.Item,{children:[e("a",{children:"Open source"}),r(n,{children:[e(n.Item,{children:e("a",{children:"Auth management system"})}),e(n.Item,{children:e("a",{children:"VScode theme"})}),e(n.Item,{children:e("a",{children:"Color picker app"})})]})]})]})]}),r(n.Item,{children:[e("a",{children:"Company"}),r(n,{children:[e(n.Item,{children:e("a",{children:"About us"})}),e(n.Item,{children:e("a",{children:"Contact us"})}),e(n.Item,{children:e("a",{children:"Privacy policy"})}),e(n.Item,{children:e("a",{children:"Press kit"})})]})]})]});f.args={className:"bg-base-200 rounded-box lg:min-w-max ",responsive:!0};const C=t=>r(n,{...t,children:[e(n.Item,{children:e("a",{children:"Item 1"})}),e(n.Item,{children:r(n.Details,{open:!0,label:"Parent item",children:[e(n.Item,{children:e("a",{children:"level 2 item 1"})}),e(n.Item,{children:e("a",{children:"level 2 item 2"})}),e(n.Item,{children:r(n.Details,{open:!0,label:"Parent",children:[e(n.Item,{children:e("a",{children:"item 1"})}),e(n.Item,{children:e("a",{children:"item 2"})})]})})]})}),e("li",{children:e("a",{children:"Item 3"})})]});C.args={className:"bg-base-200 rounded-box lg:mb-64",responsive:!0};var V,A,D;s.parameters={...s.parameters,docs:{...(V=s.parameters)==null?void 0:V.docs,source:{originalSource:`args => { - return - - Item 1 - - - Item 2 - - - Item 3 - - ; -}`,...(D=(A=s.parameters)==null?void 0:A.docs)==null?void 0:D.source}}};var T,P,y;o.parameters={...o.parameters,docs:{...(T=o.parameters)==null?void 0:T.docs,source:{originalSource:`args => { - return - - Item 1 - - - Item 2 - - - Item 3 - - ; -}`,...(y=(P=o.parameters)==null?void 0:P.docs)==null?void 0:y.source}}};var O,R,E;l.parameters={...l.parameters,docs:{...(O=l.parameters)==null?void 0:O.docs,source:{originalSource:`args => { - return - - - - - - - - - - - - - - - - - - - - - - ; -}`,...(E=(R=l.parameters)==null?void 0:R.docs)==null?void 0:E.source}}};var F,U,_;m.parameters={...m.parameters,docs:{...(F=m.parameters)==null?void 0:F.docs,source:{originalSource:`args => { - return - - - - - - - - - - - - - - - - - - - - - - ; -}`,...(_=(U=m.parameters)==null?void 0:U.docs)==null?void 0:_.source}}};var K,q,G;i.parameters={...i.parameters,docs:{...(K=i.parameters)==null?void 0:K.docs,source:{originalSource:`args => { - return - - - - - - - - - - - - - - - - - - - - - - ; -}`,...(G=(q=i.parameters)==null?void 0:q.docs)==null?void 0:G.source}}};var J,Q,X;c.parameters={...c.parameters,docs:{...(J=c.parameters)==null?void 0:J.docs,source:{originalSource:`args => { - return - - - - - - - - - - - - - - - - - - - - - - ; -}`,...(X=(Q=c.parameters)==null?void 0:Q.docs)==null?void 0:X.source}}};var Y,Z,$;h.parameters={...h.parameters,docs:{...(Y=h.parameters)==null?void 0:Y.docs,source:{originalSource:`args => { - return
    - - - xs item 1 - - - xs item 1 - - - - - sm item 1 - - - sm item 1 - - - - - md item 1 - - - md item 1 - - - - - lg item 1 - - - lg item 1 - - -
    ; -}`,...($=(Z=h.parameters)==null?void 0:Z.docs)==null?void 0:$.source}}};var ee,ne,re;u.parameters={...u.parameters,docs:{...(ee=u.parameters)==null?void 0:ee.docs,source:{originalSource:`args => { - return - - Enabled item 1 - - - disabled item - - - disabled item - - ; -}`,...(re=(ne=u.parameters)==null?void 0:ne.docs)==null?void 0:re.source}}};var te,ae,se;d.parameters={...d.parameters,docs:{...(te=d.parameters)==null?void 0:te.docs,source:{originalSource:`args => { - return - - - - - - Item 1 - - - - - - - - Item 2 - - - - - - - - Item 3 - - - ; -}`,...(se=(ae=d.parameters)==null?void 0:ae.docs)==null?void 0:se.source}}};var oe,le,me;I.parameters={...I.parameters,docs:{...(oe=I.parameters)==null?void 0:oe.docs,source:{originalSource:`args => { - return - - - - - - Inbox - 99+ - - - - - - - - Updates - - NEW - - - - - - Stats - - - - ; -}`,...(me=(le=I.parameters)==null?void 0:le.docs)==null?void 0:me.source}}};var ie,ce,he;M.parameters={...M.parameters,docs:{...(ie=M.parameters)==null?void 0:ie.docs,source:{originalSource:`args => { - return - - Item 1 - - - Item 2 - - - Item 3 - - ; -}`,...(he=(ce=M.parameters)==null?void 0:ce.docs)==null?void 0:he.source}}};var ue,de,Ie;v.parameters={...v.parameters,docs:{...(ue=v.parameters)==null?void 0:ue.docs,source:{originalSource:`args => { - return - Title - - Item 1 - - - Item 2 - - - Item 3 - - ; -}`,...(Ie=(de=v.parameters)==null?void 0:de.docs)==null?void 0:Ie.source}}};var Me,ve,ge;g.parameters={...g.parameters,docs:{...(Me=g.parameters)==null?void 0:Me.docs,source:{originalSource:`args => { - return - - Title - - - Item 1 - - - Item 2 - - - Item 3 - - - - ; -}`,...(ge=(ve=g.parameters)==null?void 0:ve.docs)==null?void 0:ge.source}}};var pe,we,ke;p.parameters={...p.parameters,docs:{...(pe=p.parameters)==null?void 0:pe.docs,source:{originalSource:`args => { - return - - Item 1 - - - Parent - - - level 2 item 1 - - - level 2 item 2 - - - Parent - - - level 3 item 1 - - - level 3 item 2 - - - - - - - Item 3 - - ; -}`,...(ke=(we=p.parameters)==null?void 0:we.docs)==null?void 0:ke.source}}};var xe,be,Le;w.parameters={...w.parameters,docs:{...(xe=w.parameters)==null?void 0:xe.docs,source:{originalSource:`args => { - return - - Item 1 - - - - - level 2 item 1 - - - level 2 item 2 - - - - - level 3 item 1 - - - level 3 item 2 - - - - - - - Item 3 - - ; -}`,...(Le=(be=w.parameters)==null?void 0:be.docs)==null?void 0:Le.source}}};var ze,Ne,fe;k.parameters={...k.parameters,docs:{...(ze=k.parameters)==null?void 0:ze.docs,source:{originalSource:`args => { - const [open, setOpen] = useState(true); - const toggleOpen = useCallback(() => { - setOpen(val => !val); - }, [setOpen]); - return - - Item 1 - - - - - level 2 item 1 - - - level 2 item 2 - - - - ; -}`,...(fe=(Ne=k.parameters)==null?void 0:Ne.docs)==null?void 0:fe.source}}};var Ce,We,Be;x.parameters={...x.parameters,docs:{...(Ce=x.parameters)==null?void 0:Ce.docs,source:{originalSource:`args => { - return - - - - - - resume.pdf - - - - - - - - My Files - }> - - - - - - Project-final.psd - - - - - - - - Project-final-2.psd - - - - - - - - Images - }> - - - - - - Screenshot1.png - - - - - - - - Screenshot2.png - - - - - - - - Others - }> - - - - - - Screenshot3.png - - - - - - - - - - - - - - reports-final-2.pdf - - - ; -}`,...(Be=(We=x.parameters)==null?void 0:We.docs)==null?void 0:Be.source}}};var je,Se,He;b.parameters={...b.parameters,docs:{...(je=b.parameters)==null?void 0:je.docs,source:{originalSource:`args => { - return - - Item 1 - - - Item 2 - - - Item 3 - - ; -}`,...(He=(Se=b.parameters)==null?void 0:Se.docs)==null?void 0:He.source}}};var Ve,Ae,De;L.parameters={...L.parameters,docs:{...(Ve=L.parameters)==null?void 0:Ve.docs,source:{originalSource:`args => { - return - - Item 1 - - - Item 2 - - - Item 3 - - ; -}`,...(De=(Ae=L.parameters)==null?void 0:Ae.docs)==null?void 0:De.source}}};var Te,Pe,ye;z.parameters={...z.parameters,docs:{...(Te=z.parameters)==null?void 0:Te.docs,source:{originalSource:`args => { - return - - Item 1 - - - Item 2 - - - Item 3 - - ; -}`,...(ye=(Pe=z.parameters)==null?void 0:Pe.docs)==null?void 0:ye.source}}};var Oe,Re,Ee;N.parameters={...N.parameters,docs:{...(Oe=N.parameters)==null?void 0:Oe.docs,source:{originalSource:`args => { - return - - Item 1 - - - Parent - - - level2 Item 1 - - - level2 Item 2 - - - - - Item 3 - - ; -}`,...(Ee=(Re=N.parameters)==null?void 0:Re.docs)==null?void 0:Ee.source}}};var Fe,Ue,_e;f.parameters={...f.parameters,docs:{...(Fe=f.parameters)==null?void 0:Fe.docs,source:{originalSource:`args => { - return - - Solutions - - - Design - - - Development - - - Hosting - - - Domain register - - - - - Enterprise - - - CRM software - - - Marketing management - - - Security - - - Consulting - - - - - Products - - - UI Kit - - - Wordpress themes - - - Wordpress plugins - - - Open source - - - Auth management system - - - VScode theme - - - Color picker app - - - - - - - Company - - - About us - - - Contact us - - - Privacy policy - - - Press kit - - - - ; -}`,...(_e=(Ue=f.parameters)==null?void 0:Ue.docs)==null?void 0:_e.source}}};var Ke,qe,Ge;C.parameters={...C.parameters,docs:{...(Ke=C.parameters)==null?void 0:Ke.docs,source:{originalSource:`args => { - return - - Item 1 - - - - - level 2 item 1 - - - level 2 item 2 - - - - - item 1 - - - item 2 - - - - - -
  • - Item 3 -
  • -
    ; -}`,...(Ge=(qe=C.parameters)==null?void 0:qe.docs)==null?void 0:Ge.source}}};const an=["Default","Responsive","IconOnly","IconOnlyHorizontal","IconOnlyWithTooltip","IconOnlyHorizontalWithTooltip","Sizes","DisabledItems","Icons","IconsAndBadgeResponsive","WithoutPaddingAndBorderRadius","Title","TitleAsParent","Submenu","CollapsibleSubmenu","CollapsibleSubmenuWithMenuDropdown","FileTree","ActiveItem","FocusItem","Horizontal","HorizontalSubmenu","MegaMenuWithSubmenuResponsive","CollapsibleWithSubmenuResponsive"];export{b as ActiveItem,w as CollapsibleSubmenu,k as CollapsibleSubmenuWithMenuDropdown,C as CollapsibleWithSubmenuResponsive,s as Default,u as DisabledItems,x as FileTree,L as FocusItem,z as Horizontal,N as HorizontalSubmenu,l as IconOnly,m as IconOnlyHorizontal,c as IconOnlyHorizontalWithTooltip,i as IconOnlyWithTooltip,d as Icons,I as IconsAndBadgeResponsive,f as MegaMenuWithSubmenuResponsive,o as Responsive,h as Sizes,p as Submenu,v as Title,g as TitleAsParent,M as WithoutPaddingAndBorderRadius,an as __namedExportsOrder,tn as default}; diff --git a/docs/assets/Modal.stories-B56aj0bo.js b/docs/assets/Modal.stories-B56aj0bo.js new file mode 100644 index 00000000..c5936c7b --- /dev/null +++ b/docs/assets/Modal.stories-B56aj0bo.js @@ -0,0 +1,85 @@ +import{j as o}from"./jsx-runtime-BjG_zV1W.js";import{r as t}from"./iframe-DDnXVYpC.js";import{M as e}from"./index-CUE0XAQJ.js";import{B as r}from"./Button-GtH5nISf.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";import"./index-Dl-l57lR.js";const P={title:"Actions/Modal",component:e},i=l=>{const s=t.useRef(null),a=t.useCallback(()=>{var n;(n=s.current)==null||n.showModal()},[s]);return o.jsxs("div",{className:"font-sans",children:[o.jsx(r,{onClick:a,children:"Open Modal"}),o.jsxs(e,{...l,ref:s,children:[o.jsx(e.Header,{className:"font-bold",children:"Hello!"}),o.jsx(e.Body,{children:"Press ESC key or click the button below to close"}),o.jsx(e.Actions,{children:o.jsx("form",{method:"dialog",children:o.jsx(r,{children:"Close"})})})]})]})},d=l=>{const s=t.useRef(null),a=t.useCallback(()=>{var n;(n=s.current)==null||n.showModal()},[s]);return o.jsxs("div",{className:"font-sans",children:[o.jsx(r,{onClick:a,children:"Open Modal"}),o.jsxs(e,{...l,ref:s,children:[o.jsx(e.Header,{className:"font-bold",children:"Hello!"}),o.jsx(e.Body,{children:"Press ESC key or click outside to close"})]})]})};d.args={backdrop:!0};const u=l=>{const s=t.useRef(null),a=t.useCallback(()=>{var n;(n=s.current)==null||n.showModal()},[s]);return o.jsxs("div",{className:"font-sans",children:[o.jsx(r,{onClick:a,children:"Open Modal"}),o.jsxs(e,{...l,ref:s,children:[o.jsx("form",{method:"dialog",children:o.jsx(r,{size:"sm",color:"ghost",shape:"circle",className:"absolute right-2 top-2",children:"x"})}),o.jsx(e.Header,{className:"font-bold",children:"Hello!"}),o.jsx(e.Body,{children:"Press ESC key or click on X button to close"})]})]})},c=l=>{const s=t.useRef(null),a=t.useCallback(()=>{var n;(n=s.current)==null||n.showModal()},[s]);return o.jsxs("div",{className:"font-sans",children:[o.jsx(r,{onClick:a,children:"Open Modal"}),o.jsxs(e,{...l,ref:s,children:[o.jsx(e.Header,{className:"font-bold",children:"Hello!"}),o.jsx(e.Body,{children:"Press ESC key or click the button below to close"}),o.jsx(e.Actions,{children:o.jsx("form",{method:"dialog",children:o.jsx(r,{children:"Close"})})})]})]})};c.args={className:"w-11/12 max-w-5xl"};const h=l=>{const{Dialog:s,handleShow:a}=e.useDialog();return o.jsxs("div",{className:"font-sans",children:[o.jsx(r,{onClick:a,children:"Open Modal"}),o.jsxs(s,{...l,children:[o.jsx(e.Header,{className:"font-bold",children:"Hello!"}),o.jsx(e.Body,{children:"This modal works with useDialog hook!"}),o.jsx(e.Actions,{children:o.jsx("form",{method:"dialog",children:o.jsx(r,{children:"Close"})})})]})]})};var m,f,M;i.parameters={...i.parameters,docs:{...(m=i.parameters)==null?void 0:m.docs,source:{originalSource:`args => { + const ref = useRef(null); + const handleShow = useCallback(() => { + ref.current?.showModal(); + }, [ref]); + return
    + + + Hello! + + Press ESC key or click the button below to close + + +
    + +
    +
    +
    +
    ; +}`,...(M=(f=i.parameters)==null?void 0:f.docs)==null?void 0:M.source}}};var p,x,g;d.parameters={...d.parameters,docs:{...(p=d.parameters)==null?void 0:p.docs,source:{originalSource:`args => { + const ref = useRef(null); + const handleShow = useCallback(() => { + ref.current?.showModal(); + }, [ref]); + return
    + + + Hello! + Press ESC key or click outside to close + +
    ; +}`,...(g=(x=d.parameters)==null?void 0:x.docs)==null?void 0:g.source}}};var k,j,C;u.parameters={...u.parameters,docs:{...(k=u.parameters)==null?void 0:k.docs,source:{originalSource:`args => { + const ref = useRef(null); + const handleShow = useCallback(() => { + ref.current?.showModal(); + }, [ref]); + return
    + + +
    + +
    + Hello! + Press ESC key or click on X button to close +
    +
    ; +}`,...(C=(j=u.parameters)==null?void 0:j.docs)==null?void 0:C.source}}};var B,w,b;c.parameters={...c.parameters,docs:{...(B=c.parameters)==null?void 0:B.docs,source:{originalSource:`args => { + const ref = useRef(null); + const handleShow = useCallback(() => { + ref.current?.showModal(); + }, [ref]); + return
    + + + Hello! + + Press ESC key or click the button below to close + + +
    + +
    +
    +
    +
    ; +}`,...(b=(w=c.parameters)==null?void 0:w.docs)==null?void 0:b.source}}};var H,S,y;h.parameters={...h.parameters,docs:{...(H=h.parameters)==null?void 0:H.docs,source:{originalSource:`args => { + const { + Dialog, + handleShow + } = Modal.useDialog(); + return
    + + + Hello! + This modal works with useDialog hook! + +
    + +
    +
    +
    +
    ; +}`,...(y=(S=h.parameters)==null?void 0:S.docs)==null?void 0:y.source}}};const T=["Default","ClickedOutside","CloseButton","CustomWidth","UseDialogHook"];export{d as ClickedOutside,u as CloseButton,c as CustomWidth,i as Default,h as UseDialogHook,T as __namedExportsOrder,P as default}; diff --git a/docs/assets/Modal.stories-eeb30e7c.js b/docs/assets/Modal.stories-eeb30e7c.js deleted file mode 100644 index 68b9da9f..00000000 --- a/docs/assets/Modal.stories-eeb30e7c.js +++ /dev/null @@ -1,85 +0,0 @@ -import{a,j as o}from"./tw-merge-4486aaf0.js";import{r as t}from"./index-f46741a2.js";import{M as e}from"./index-d3c6f540.js";import{B as d}from"./Button-e31631bb.js";import"./clsx.m-1229b3e0.js";import"./index-8d7e61f2.js";const T={title:"Actions/Modal",component:e},h=s=>{const n=t.useRef(null),r=t.useCallback(()=>{var l;(l=n.current)==null||l.showModal()},[n]);return a("div",{className:"font-sans",children:[o(d,{onClick:r,children:"Open Modal"}),a(e,{...s,ref:n,children:[o(e.Header,{className:"font-bold",children:"Hello!"}),o(e.Body,{children:"Press ESC key or click the button below to close"}),o(e.Actions,{children:o("form",{method:"dialog",children:o(d,{children:"Close"})})})]})]})},c=s=>{const n=t.useRef(null),r=t.useCallback(()=>{var l;(l=n.current)==null||l.showModal()},[n]);return a("div",{className:"font-sans",children:[o(d,{onClick:r,children:"Open Modal"}),a(e,{...s,ref:n,children:[o(e.Header,{className:"font-bold",children:"Hello!"}),o(e.Body,{children:"Press ESC key or click outside to close"})]})]})};c.args={backdrop:!0};const u=s=>{const n=t.useRef(null),r=t.useCallback(()=>{var l;(l=n.current)==null||l.showModal()},[n]);return a("div",{className:"font-sans",children:[o(d,{onClick:r,children:"Open Modal"}),a(e,{...s,ref:n,children:[o("form",{method:"dialog",children:o(d,{size:"sm",color:"ghost",shape:"circle",className:"absolute right-2 top-2",children:"x"})}),o(e.Header,{className:"font-bold",children:"Hello!"}),o(e.Body,{children:"Press ESC key or click on X button to close"})]})]})},i=s=>{const n=t.useRef(null),r=t.useCallback(()=>{var l;(l=n.current)==null||l.showModal()},[n]);return a("div",{className:"font-sans",children:[o(d,{onClick:r,children:"Open Modal"}),a(e,{...s,ref:n,children:[o(e.Header,{className:"font-bold",children:"Hello!"}),o(e.Body,{children:"Press ESC key or click the button below to close"}),o(e.Actions,{children:o("form",{method:"dialog",children:o(d,{children:"Close"})})})]})]})};i.args={className:"w-11/12 max-w-5xl"};const m=s=>{const{Dialog:n,handleShow:r}=e.useDialog();return a("div",{className:"font-sans",children:[o(d,{onClick:r,children:"Open Modal"}),a(n,{...s,children:[o(e.Header,{className:"font-bold",children:"Hello!"}),o(e.Body,{children:"This modal works with useDialog hook!"}),o(e.Actions,{children:o("form",{method:"dialog",children:o(d,{children:"Close"})})})]})]})};var f,M,p;h.parameters={...h.parameters,docs:{...(f=h.parameters)==null?void 0:f.docs,source:{originalSource:`args => { - const ref = useRef(null); - const handleShow = useCallback(() => { - ref.current?.showModal(); - }, [ref]); - return
    - - - Hello! - - Press ESC key or click the button below to close - - -
    - -
    -
    -
    -
    ; -}`,...(p=(M=h.parameters)==null?void 0:M.docs)==null?void 0:p.source}}};var g,k,C;c.parameters={...c.parameters,docs:{...(g=c.parameters)==null?void 0:g.docs,source:{originalSource:`args => { - const ref = useRef(null); - const handleShow = useCallback(() => { - ref.current?.showModal(); - }, [ref]); - return
    - - - Hello! - Press ESC key or click outside to close - -
    ; -}`,...(C=(k=c.parameters)==null?void 0:k.docs)==null?void 0:C.source}}};var B,w,b;u.parameters={...u.parameters,docs:{...(B=u.parameters)==null?void 0:B.docs,source:{originalSource:`args => { - const ref = useRef(null); - const handleShow = useCallback(() => { - ref.current?.showModal(); - }, [ref]); - return
    - - -
    - -
    - Hello! - Press ESC key or click on X button to close -
    -
    ; -}`,...(b=(w=u.parameters)==null?void 0:w.docs)==null?void 0:b.source}}};var H,S,y;i.parameters={...i.parameters,docs:{...(H=i.parameters)==null?void 0:H.docs,source:{originalSource:`args => { - const ref = useRef(null); - const handleShow = useCallback(() => { - ref.current?.showModal(); - }, [ref]); - return
    - - - Hello! - - Press ESC key or click the button below to close - - -
    - -
    -
    -
    -
    ; -}`,...(y=(S=i.parameters)==null?void 0:S.docs)==null?void 0:y.source}}};var N,D,v;m.parameters={...m.parameters,docs:{...(N=m.parameters)==null?void 0:N.docs,source:{originalSource:`args => { - const { - Dialog, - handleShow - } = Modal.useDialog(); - return
    - - - Hello! - This modal works with useDialog hook! - -
    - -
    -
    -
    -
    ; -}`,...(v=(D=m.parameters)==null?void 0:D.docs)==null?void 0:v.source}}};const L=["Default","ClickedOutside","CloseButton","CustomWidth","UseDialogHook"];export{c as ClickedOutside,u as CloseButton,i as CustomWidth,h as Default,m as UseDialogHook,L as __namedExportsOrder,T as default}; diff --git a/docs/assets/ModalLegacy.stories-BjpPPeJ9.js b/docs/assets/ModalLegacy.stories-BjpPPeJ9.js new file mode 100644 index 00000000..af642042 --- /dev/null +++ b/docs/assets/ModalLegacy.stories-BjpPPeJ9.js @@ -0,0 +1,59 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{r as g}from"./iframe-DDnXVYpC.js";import{M as s}from"./index-CUE0XAQJ.js";import{B as t}from"./Button-GtH5nISf.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";import"./index-Dl-l57lR.js";const O={title:"Actions/Modal/Legacy",component:s.Legacy},c=n=>{const[o,a]=g.useState(!1),l=()=>{a(!o)};return e.jsxs("div",{className:"font-sans",children:[e.jsx(t,{onClick:l,children:"Open Modal"}),e.jsxs(s.Legacy,{...n,open:o,children:[e.jsx(s.Header,{className:"font-bold",children:"Hello!"}),e.jsx(s.Body,{children:"This modal works with a legacy mode!"}),e.jsx(s.Actions,{children:e.jsx(t,{onClick:l,children:"Close"})})]})]})},r=n=>{const[o,a]=g.useState(!1),l=()=>{a(!o)};return e.jsxs("div",{className:"font-sans",children:[e.jsx(t,{onClick:l,children:"Open Modal"}),e.jsxs(s.Legacy,{...n,open:o,onClickBackdrop:l,children:[e.jsx(s.Header,{className:"font-bold",children:"Hello!"}),e.jsx(s.Body,{children:"Click outside to close"})]})]})},d=n=>{const[o,a]=g.useState(!1),l=()=>{a(!o)};return e.jsxs("div",{className:"font-sans",children:[e.jsx(t,{onClick:l,children:"Open Modal"}),e.jsxs(s.Legacy,{...n,open:o,children:[e.jsx(t,{size:"sm",color:"ghost",shape:"circle",className:"absolute right-2 top-2",onClick:l,children:"✕"}),e.jsx(s.Header,{className:"font-bold",children:"Hello!"}),e.jsx(s.Body,{children:"Click on X button to close"})]})]})},i=n=>{const[o,a]=g.useState(!1),l=()=>{a(!o)};return e.jsxs("div",{className:"font-sans",children:[e.jsx(t,{onClick:l,children:"Open Modal"}),e.jsxs(s.Legacy,{...n,open:o,children:[e.jsx(s.Header,{className:"font-bold",children:"Hello!"}),e.jsx(s.Body,{children:"This modal works with a legacy mode!"}),e.jsx(s.Actions,{children:e.jsx(t,{onClick:l,children:"Close"})})]})]})};i.args={className:"w-11/12 max-w-5xl"};var m,b,u;c.parameters={...c.parameters,docs:{...(m=c.parameters)==null?void 0:m.docs,source:{originalSource:`args => { + const [visible, setVisible] = useState(false); + const toggleVisible = () => { + setVisible(!visible); + }; + return
    + + + Hello! + This modal works with a legacy mode! + + + + + +
    ; +}`,...(u=(b=c.parameters)==null?void 0:b.docs)==null?void 0:u.source}}};var p,h,M;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`args => { + const [visible, setVisible] = useState(false); + const toggleVisible = () => { + setVisible(!visible); + }; + return
    + + + Hello! + Click outside to close + +
    ; +}`,...(M=(h=r.parameters)==null?void 0:h.docs)==null?void 0:M.source}}};var x,B,f;d.parameters={...d.parameters,docs:{...(x=d.parameters)==null?void 0:x.docs,source:{originalSource:`args => { + const [visible, setVisible] = useState(false); + const toggleVisible = () => { + setVisible(!visible); + }; + return
    + + + + Hello! + Click on X button to close + +
    ; +}`,...(f=(B=d.parameters)==null?void 0:B.docs)==null?void 0:f.source}}};var y,C,k;i.parameters={...i.parameters,docs:{...(y=i.parameters)==null?void 0:y.docs,source:{originalSource:`args => { + const [visible, setVisible] = useState(false); + const toggleVisible = () => { + setVisible(!visible); + }; + return
    + + + Hello! + This modal works with a legacy mode! + + + + +
    ; +}`,...(k=(C=i.parameters)==null?void 0:C.docs)==null?void 0:k.source}}};const w=["Default","ClickedOutside","CloseButton","CustomWidth"];export{r as ClickedOutside,d as CloseButton,i as CustomWidth,c as Default,w as __namedExportsOrder,O as default}; diff --git a/docs/assets/ModalLegacy.stories-f0ba88c4.js b/docs/assets/ModalLegacy.stories-f0ba88c4.js deleted file mode 100644 index bdda5a88..00000000 --- a/docs/assets/ModalLegacy.stories-f0ba88c4.js +++ /dev/null @@ -1,59 +0,0 @@ -import{a,j as e}from"./tw-merge-4486aaf0.js";import{r as b}from"./index-f46741a2.js";import{M as o}from"./index-d3c6f540.js";import{B as i}from"./Button-e31631bb.js";import"./clsx.m-1229b3e0.js";import"./index-8d7e61f2.js";const x={title:"Actions/Modal/Legacy",component:o.Legacy},d=n=>{const[s,t]=b.useState(!1),l=()=>{t(!s)};return a("div",{className:"font-sans",children:[e(i,{onClick:l,children:"Open Modal"}),a(o.Legacy,{...n,open:s,children:[e(o.Header,{className:"font-bold",children:"Hello!"}),e(o.Body,{children:"This modal works with a legacy mode!"}),e(o.Actions,{children:e(i,{onClick:l,children:"Close"})})]})]})},r=n=>{const[s,t]=b.useState(!1),l=()=>{t(!s)};return a("div",{className:"font-sans",children:[e(i,{onClick:l,children:"Open Modal"}),a(o.Legacy,{...n,open:s,onClickBackdrop:l,children:[e(o.Header,{className:"font-bold",children:"Hello!"}),e(o.Body,{children:"Click outside to close"})]})]})},g=n=>{const[s,t]=b.useState(!1),l=()=>{t(!s)};return a("div",{className:"font-sans",children:[e(i,{onClick:l,children:"Open Modal"}),a(o.Legacy,{...n,open:s,children:[e(i,{size:"sm",color:"ghost",shape:"circle",className:"absolute right-2 top-2",onClick:l,children:"✕"}),e(o.Header,{className:"font-bold",children:"Hello!"}),e(o.Body,{children:"Click on X button to close"})]})]})},c=n=>{const[s,t]=b.useState(!1),l=()=>{t(!s)};return a("div",{className:"font-sans",children:[e(i,{onClick:l,children:"Open Modal"}),a(o.Legacy,{...n,open:s,children:[e(o.Header,{className:"font-bold",children:"Hello!"}),e(o.Body,{children:"This modal works with a legacy mode!"}),e(o.Actions,{children:e(i,{onClick:l,children:"Close"})})]})]})};c.args={className:"w-11/12 max-w-5xl"};var m,u,p;d.parameters={...d.parameters,docs:{...(m=d.parameters)==null?void 0:m.docs,source:{originalSource:`args => { - const [visible, setVisible] = useState(false); - const toggleVisible = () => { - setVisible(!visible); - }; - return
    - - - Hello! - This modal works with a legacy mode! - - - - - -
    ; -}`,...(p=(u=d.parameters)==null?void 0:u.docs)==null?void 0:p.source}}};var h,M,B;r.parameters={...r.parameters,docs:{...(h=r.parameters)==null?void 0:h.docs,source:{originalSource:`args => { - const [visible, setVisible] = useState(false); - const toggleVisible = () => { - setVisible(!visible); - }; - return
    - - - Hello! - Click outside to close - -
    ; -}`,...(B=(M=r.parameters)==null?void 0:M.docs)==null?void 0:B.source}}};var f,y,C;g.parameters={...g.parameters,docs:{...(f=g.parameters)==null?void 0:f.docs,source:{originalSource:`args => { - const [visible, setVisible] = useState(false); - const toggleVisible = () => { - setVisible(!visible); - }; - return
    - - - - Hello! - Click on X button to close - -
    ; -}`,...(C=(y=g.parameters)==null?void 0:y.docs)==null?void 0:C.source}}};var k,v,V;c.parameters={...c.parameters,docs:{...(k=c.parameters)==null?void 0:k.docs,source:{originalSource:`args => { - const [visible, setVisible] = useState(false); - const toggleVisible = () => { - setVisible(!visible); - }; - return
    - - - Hello! - This modal works with a legacy mode! - - - - -
    ; -}`,...(V=(v=c.parameters)==null?void 0:v.docs)==null?void 0:V.source}}};const A=["Default","ClickedOutside","CloseButton","CustomWidth"];export{r as ClickedOutside,g as CloseButton,c as CustomWidth,d as Default,A as __namedExportsOrder,x as default}; diff --git a/docs/assets/Navbar.stories-301a0ffe.js b/docs/assets/Navbar.stories-301a0ffe.js deleted file mode 100644 index 331444ba..00000000 --- a/docs/assets/Navbar.stories-301a0ffe.js +++ /dev/null @@ -1,261 +0,0 @@ -import{j as e,a as n,F as O}from"./tw-merge-4486aaf0.js";import{N as s}from"./index-44811f16.js";import{B as a}from"./Button-e31631bb.js";import{M as t}from"./index-1453f494.js";import{D as o}from"./index-8ea57d49.js";import{F as G}from"./index-1d303440.js";import{I as J}from"./index-1b2f1137.js";import{I as w}from"./index-f4284876.js";import{B as N}from"./index-e61e426b.js";import{C as x}from"./index-92e1ed70.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";import"./index-8d7e61f2.js";const ce={title:"Navigation/Navbar",component:s,args:{className:"bg-base-100 shadow-xl rounded-box"}},u=r=>e(s,{...r,children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),g=r=>n(s,{...r,children:[e("div",{className:"flex-1",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),e("div",{className:"flex-none",children:e(a,{tag:"a",shape:"square",color:"ghost",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-5 h-5 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z"})})})})]}),p=r=>n(s,{...r,children:[e("div",{className:"flex-none",children:e(a,{shape:"square",color:"ghost",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-5 h-5 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})}),e("div",{className:"flex-1",children:e(a,{tag:"a",color:"ghost",className:"normal-case text-xl",children:"daisyUI"})}),e("div",{className:"flex-none",children:e(a,{shape:"square",color:"ghost",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-5 h-5 stroke-current",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z"})})})})]}),l=r=>n(s,{...r,children:[e("div",{className:"flex-1",children:e(a,{tag:"a",color:"ghost",className:"normal-case text-xl",children:"daisyUI"})}),e("div",{className:"flex-none",children:n(t,{horizontal:!0,className:"px-1",children:[e(t.Item,{children:e("a",{children:"Link"})}),e(t.Item,{children:n("details",{children:[e("summary",{children:"Parent"}),n("ul",{className:"p-2 bg-base-100",children:[e("li",{children:e("a",{children:"Link 1"})}),e("li",{children:e("a",{children:"Link 2"})})]})]})})]})})]});l.args={className:"bg-base-100 mb-32 shadow-xl rounded-box"};const c=r=>n(s,{...r,children:[e("div",{className:"flex-1",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),n("div",{className:"flex-none gap-2",children:[e(G,{children:e(J,{bordered:!0,type:"text",placeholder:"Search",className:"w-24 md:w-auto"})}),n(o,{end:!0,children:[e(a,{tag:"label",tabIndex:0,color:"ghost",className:"avatar",shape:"circle",children:e("div",{className:"w-10 rounded-full",children:e("img",{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"})})}),n(o.Menu,{className:"w-52 menu-sm mt-3 z-[1] p-2",children:[e("li",{children:n("a",{className:"justify-between",children:["Profile",e(N,{children:"New"})]})}),e(o.Item,{children:"Settings"}),e(o.Item,{children:"Logout"})]})]})]})]});c.args={className:"bg-base-100 mb-32 shadow-xl round-box"};const d=r=>n(s,{...r,children:[e("div",{className:"flex-1",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),n("div",{className:"flex-none",children:[n(o,{end:!0,children:[e(a,{tag:"label",tabIndex:0,color:"ghost",shape:"circle",children:n(w,{children:[e(N,{size:"sm",className:w.Item.className(),children:"8"}),e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"})})]})}),e(o.Menu,{className:"mt-3 z-[1] card card-compact w-52 !p-0",children:n(x.Body,{children:[e("span",{className:"font-bold text-lg",children:"8 Items"}),e("span",{className:"text-info",children:"Subtotal: $999"}),e(x.Actions,{children:e(a,{color:"primary",fullWidth:!0,children:"View cart"})})]})})]}),n(o,{end:!0,children:[e(a,{tag:"label",tabIndex:0,color:"ghost",className:"avatar",shape:"circle",children:e("div",{className:"w-10 rounded-full",children:e("img",{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"})})}),n(o.Menu,{className:"mt-3 z-[1] w-52 menu-sm",children:[e("li",{children:n("a",{className:"justify-between",children:["Profile",e(N,{className:"badge",children:"New"})]})}),e(o.Item,{children:"Settings"}),e(o.Item,{children:"Logout"})]})]})]})]});d.args={className:"bg-base-100 mb-40 shadow-xl rounded-box"};const i=r=>n(s,{...r,children:[e(s.Start,{children:n(o,{children:[e(a,{tag:"label",color:"ghost",shape:"circle",tabIndex:0,children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h7"})})}),n(o.Menu,{className:"menu-sm w-52 mt-3 z-[1]",children:[e(o.Item,{children:"Homepage"}),e(o.Item,{children:"Portfolio"}),e(o.Item,{children:"About"})]})]})}),e(s.Center,{children:e(a,{tag:"a",color:"ghost",className:"normal-case text-xl",children:"daisyUI"})}),n(s.End,{className:"navbar-end",children:[e(a,{color:"ghost",shape:"circle",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),e(a,{color:"ghost",shape:"circle",children:n(w,{children:[e(N,{size:"xs",color:"primary",className:w.Item.className()}),e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})})]})})]})]});i.args={className:"bg-base-100 mb-40 shadow-xl rounded-box"};const m=r=>n(s,{...r,children:[n(s.Start,{children:[n(o,{children:[e(a,{tag:"label",color:"ghost",tabIndex:0,className:"lg:hidden",children:e("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h8m-8 6h16"})})}),n(o.Menu,{tabIndex:0,className:"w-52 menu-sm mt-3 z-[1]",children:[e(o.Item,{children:"Item 1"}),n("li",{children:[e("a",{children:"Parent"}),n("ul",{className:"p-2",children:[e("li",{children:e("a",{children:"Submenu 1"})}),e("li",{children:e("a",{children:"Submenu 2"})})]})]}),e(o.Item,{children:"Item 3"})]})]}),e("a",{className:"btn btn-ghost normal-case text-xl",children:"daisyUI"})]}),e(s.Center,{className:"hidden lg:flex",children:n(t,{horizontal:!0,className:"px-1",children:[e(t.Item,{children:e("a",{children:"Item 1"})}),e(t.Item,{children:n("details",{children:[e("summary",{children:"Parent"}),n("ul",{className:"p-2",children:[e(t.Item,{children:e("a",{children:"Submenu 1"})}),e(t.Item,{children:e("a",{children:"Submenu 2"})})]})]})}),e(t.Item,{children:e("a",{children:"Item 3"})})]})}),e(s.End,{children:e(a,{tag:"a",children:"Button"})})]});m.args={className:"bg-base-100 mb-48 shadow-xl rounded-box"};const h=r=>n(O,{children:[e(s,{...r,className:"rounded-box bg-neutral text-neutral-content",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),e(s,{...r,className:"rounded-box bg-base-300",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),e(s,{...r,className:"rounded-box bg-primary text-primary-content",children:e(a,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})})]});h.argTypes={className:{control:!1}};var v,b,I;u.parameters={...u.parameters,docs:{...(v=u.parameters)==null?void 0:v.docs,source:{originalSource:`args => { - return - - ; -}`,...(I=(b=u.parameters)==null?void 0:b.docs)==null?void 0:I.source}}};var M,k,B;g.parameters={...g.parameters,docs:{...(M=g.parameters)==null?void 0:M.docs,source:{originalSource:`args => { - return -
    - -
    -
    - -
    -
    ; -}`,...(B=(k=g.parameters)==null?void 0:k.docs)==null?void 0:B.source}}};var f,y,D;p.parameters={...p.parameters,docs:{...(f=p.parameters)==null?void 0:f.docs,source:{originalSource:`args => { - return -
    - -
    -
    - -
    -
    - -
    -
    ; -}`,...(D=(y=p.parameters)==null?void 0:y.docs)==null?void 0:D.source}}};var L,S,z;l.parameters={...l.parameters,docs:{...(L=l.parameters)==null?void 0:L.docs,source:{originalSource:`args => { - return -
    - -
    -
    - - - Link - - -
    - Parent - -
    -
    -
    -
    -
    ; -}`,...(z=(S=l.parameters)==null?void 0:S.docs)==null?void 0:z.source}}};var C,j,U;c.parameters={...c.parameters,docs:{...(C=c.parameters)==null?void 0:C.docs,source:{originalSource:`args => { - return -
    - -
    -
    -
    - -
    - - - -
  • - - Profile - New - -
  • - Settings - Logout -
    -
    -
    -
    ; -}`,...(U=(j=c.parameters)==null?void 0:j.docs)==null?void 0:U.source}}};var A,W,P;d.parameters={...d.parameters,docs:{...(A=d.parameters)==null?void 0:A.docs,source:{originalSource:`args => { - return -
    - -
    -
    - - - - - 8 Items - Subtotal: $999 - - - - - - - - - -
  • - - Profile - New - -
  • - Settings - Logout -
    -
    -
    -
    ; -}`,...(P=(W=d.parameters)==null?void 0:W.docs)==null?void 0:P.source}}};var E,H,q;i.parameters={...i.parameters,docs:{...(E=i.parameters)==null?void 0:E.docs,source:{originalSource:`args => { - return - - - - - Homepage - Portfolio - About - - - - - - - - - - - ; -}`,...(q=(H=i.parameters)==null?void 0:H.docs)==null?void 0:q.source}}};var F,V,T;m.parameters={...m.parameters,docs:{...(F=m.parameters)==null?void 0:F.docs,source:{originalSource:`args => { - return - - - - - Item 1 -
  • - Parent - -
  • - Item 3 -
    -
    - daisyUI -
    - - - - Item 1 - - -
    - Parent - -
    -
    - - Item 3 - -
    -
    - - - -
    ; -}`,...(T=(V=m.parameters)==null?void 0:V.docs)==null?void 0:T.source}}};var _,R,$;h.parameters={...h.parameters,docs:{...(_=h.parameters)==null?void 0:_.docs,source:{originalSource:`args => { - return <> - - - - - - - - - - ; -}`,...($=(R=h.parameters)==null?void 0:R.docs)==null?void 0:$.source}}};const de=["Default","TitleAndIcon","IconAtStartAndEnd","MenuAndSubmenu","SearchInputAndDropdown","IconIndicatorAndDropdown","DropdownCenterLogoAndIcon","Responsive","Colors"];export{h as Colors,u as Default,i as DropdownCenterLogoAndIcon,p as IconAtStartAndEnd,d as IconIndicatorAndDropdown,l as MenuAndSubmenu,m as Responsive,c as SearchInputAndDropdown,g as TitleAndIcon,de as __namedExportsOrder,ce as default}; diff --git a/docs/assets/Navbar.stories-BE1JPKzF.js b/docs/assets/Navbar.stories-BE1JPKzF.js new file mode 100644 index 00000000..51c6897d --- /dev/null +++ b/docs/assets/Navbar.stories-BE1JPKzF.js @@ -0,0 +1,261 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{N as r}from"./index-pbAkFGQM.js";import{B as n}from"./Button-GtH5nISf.js";import{M as o}from"./index-BxHmxGX2.js";import{D as a}from"./index-BfJ2msvr.js";import{F as $}from"./index-BNCmuIF-.js";import{I as O}from"./index-DW2o7ZWh.js";import{I as g}from"./index-BOrxIxgS.js";import{B as p}from"./index-Bdz6q0Sq.js";import{C as w}from"./index-DIaYqioD.js";import"./iframe-DDnXVYpC.js";import"./bundle-mjs-yGZq-iow.js";import"./clsx-B-dksMZM.js";import"./index-Dl-l57lR.js";const le={title:"Navigation/Navbar",component:r,args:{className:"bg-base-100 shadow-xl rounded-box"}},h=s=>e.jsx(r,{...s,children:e.jsx(n,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),x=s=>e.jsxs(r,{...s,children:[e.jsx("div",{className:"flex-1",children:e.jsx(n,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),e.jsx("div",{className:"flex-none",children:e.jsx(n,{tag:"a",shape:"square",color:"ghost",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-5 h-5 stroke-current",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z"})})})})]}),u=s=>e.jsxs(r,{...s,children:[e.jsx("div",{className:"flex-none",children:e.jsx(n,{shape:"square",color:"ghost",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-5 h-5 stroke-current",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})}),e.jsx("div",{className:"flex-1",children:e.jsx(n,{tag:"a",color:"ghost",className:"normal-case text-xl",children:"daisyUI"})}),e.jsx("div",{className:"flex-none",children:e.jsx(n,{shape:"square",color:"ghost",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-5 h-5 stroke-current",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h.01M12 12h.01M19 12h.01M6 12a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0zm7 0a1 1 0 11-2 0 1 1 0 012 0z"})})})})]}),t=s=>e.jsxs(r,{...s,children:[e.jsx("div",{className:"flex-1",children:e.jsx(n,{tag:"a",color:"ghost",className:"normal-case text-xl",children:"daisyUI"})}),e.jsx("div",{className:"flex-none",children:e.jsxs(o,{horizontal:!0,className:"px-1",children:[e.jsx(o.Item,{children:e.jsx("a",{children:"Link"})}),e.jsx(o.Item,{children:e.jsxs("details",{children:[e.jsx("summary",{children:"Parent"}),e.jsxs("ul",{className:"p-2 bg-base-100",children:[e.jsx("li",{children:e.jsx("a",{children:"Link 1"})}),e.jsx("li",{children:e.jsx("a",{children:"Link 2"})})]})]})})]})})]});t.args={className:"bg-base-100 mb-32 shadow-xl rounded-box"};const l=s=>e.jsxs(r,{...s,children:[e.jsx("div",{className:"flex-1",children:e.jsx(n,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),e.jsxs("div",{className:"flex-none gap-2",children:[e.jsx($,{children:e.jsx(O,{bordered:!0,type:"text",placeholder:"Search",className:"w-24 md:w-auto"})}),e.jsxs(a,{end:!0,children:[e.jsx(n,{tag:"label",tabIndex:0,color:"ghost",className:"avatar",shape:"circle",children:e.jsx("div",{className:"w-10 rounded-full",children:e.jsx("img",{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"})})}),e.jsxs(a.Menu,{className:"w-52 menu-sm mt-3 z-[1] p-2",children:[e.jsx("li",{children:e.jsxs("a",{className:"justify-between",children:["Profile",e.jsx(p,{children:"New"})]})}),e.jsx(a.Item,{children:"Settings"}),e.jsx(a.Item,{children:"Logout"})]})]})]})]});l.args={className:"bg-base-100 mb-32 shadow-xl round-box"};const c=s=>e.jsxs(r,{...s,children:[e.jsx("div",{className:"flex-1",children:e.jsx(n,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),e.jsxs("div",{className:"flex-none",children:[e.jsxs(a,{end:!0,children:[e.jsx(n,{tag:"label",tabIndex:0,color:"ghost",shape:"circle",children:e.jsxs(g,{children:[e.jsx(p,{size:"sm",className:g.Item.className(),children:"8"}),e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 11-4 0 2 2 0 014 0z"})})]})}),e.jsx(a.Menu,{className:"mt-3 z-[1] card card-compact w-52 !p-0",children:e.jsxs(w.Body,{children:[e.jsx("span",{className:"font-bold text-lg",children:"8 Items"}),e.jsx("span",{className:"text-info",children:"Subtotal: $999"}),e.jsx(w.Actions,{children:e.jsx(n,{color:"primary",fullWidth:!0,children:"View cart"})})]})})]}),e.jsxs(a,{end:!0,children:[e.jsx(n,{tag:"label",tabIndex:0,color:"ghost",className:"avatar",shape:"circle",children:e.jsx("div",{className:"w-10 rounded-full",children:e.jsx("img",{src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp"})})}),e.jsxs(a.Menu,{className:"mt-3 z-[1] w-52 menu-sm",children:[e.jsx("li",{children:e.jsxs("a",{className:"justify-between",children:["Profile",e.jsx(p,{className:"badge",children:"New"})]})}),e.jsx(a.Item,{children:"Settings"}),e.jsx(a.Item,{children:"Logout"})]})]})]})]});c.args={className:"bg-base-100 mb-40 shadow-xl rounded-box"};const d=s=>e.jsxs(r,{...s,children:[e.jsx(r.Start,{children:e.jsxs(a,{children:[e.jsx(n,{tag:"label",color:"ghost",shape:"circle",tabIndex:0,children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h7"})})}),e.jsxs(a.Menu,{className:"menu-sm w-52 mt-3 z-[1]",children:[e.jsx(a.Item,{children:"Homepage"}),e.jsx(a.Item,{children:"Portfolio"}),e.jsx(a.Item,{children:"About"})]})]})}),e.jsx(r.Center,{children:e.jsx(n,{tag:"a",color:"ghost",className:"normal-case text-xl",children:"daisyUI"})}),e.jsxs(r.End,{className:"navbar-end",children:[e.jsx(n,{color:"ghost",shape:"circle",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}),e.jsx(n,{color:"ghost",shape:"circle",children:e.jsxs(g,{children:[e.jsx(p,{size:"xs",color:"primary",className:g.Item.className()}),e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})})]})})]})]});d.args={className:"bg-base-100 mb-40 shadow-xl rounded-box"};const i=s=>e.jsxs(r,{...s,children:[e.jsxs(r.Start,{children:[e.jsxs(a,{children:[e.jsx(n,{tag:"label",color:"ghost",tabIndex:0,className:"lg:hidden",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h8m-8 6h16"})})}),e.jsxs(a.Menu,{tabIndex:0,className:"w-52 menu-sm mt-3 z-[1]",children:[e.jsx(a.Item,{children:"Item 1"}),e.jsxs("li",{children:[e.jsx("a",{children:"Parent"}),e.jsxs("ul",{className:"p-2",children:[e.jsx("li",{children:e.jsx("a",{children:"Submenu 1"})}),e.jsx("li",{children:e.jsx("a",{children:"Submenu 2"})})]})]}),e.jsx(a.Item,{children:"Item 3"})]})]}),e.jsx("a",{className:"btn btn-ghost normal-case text-xl",children:"daisyUI"})]}),e.jsx(r.Center,{className:"hidden lg:flex",children:e.jsxs(o,{horizontal:!0,className:"px-1",children:[e.jsx(o.Item,{children:e.jsx("a",{children:"Item 1"})}),e.jsx(o.Item,{children:e.jsxs("details",{children:[e.jsx("summary",{children:"Parent"}),e.jsxs("ul",{className:"p-2",children:[e.jsx(o.Item,{children:e.jsx("a",{children:"Submenu 1"})}),e.jsx(o.Item,{children:e.jsx("a",{children:"Submenu 2"})})]})]})}),e.jsx(o.Item,{children:e.jsx("a",{children:"Item 3"})})]})}),e.jsx(r.End,{children:e.jsx(n,{tag:"a",children:"Button"})})]});i.args={className:"bg-base-100 mb-48 shadow-xl rounded-box"};const m=s=>e.jsxs(e.Fragment,{children:[e.jsx(r,{...s,className:"rounded-box bg-neutral text-neutral-content",children:e.jsx(n,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),e.jsx(r,{...s,className:"rounded-box bg-base-300",children:e.jsx(n,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})}),e.jsx(r,{...s,className:"rounded-box bg-primary text-primary-content",children:e.jsx(n,{tag:"a",className:"text-xl normal-case",color:"ghost",children:"daisyUI"})})]});m.argTypes={className:{control:!1}};var N,j,v;h.parameters={...h.parameters,docs:{...(N=h.parameters)==null?void 0:N.docs,source:{originalSource:`args => { + return + + ; +}`,...(v=(j=h.parameters)==null?void 0:j.docs)==null?void 0:v.source}}};var b,I,M;x.parameters={...x.parameters,docs:{...(b=x.parameters)==null?void 0:b.docs,source:{originalSource:`args => { + return +
    + +
    +
    + +
    +
    ; +}`,...(M=(I=x.parameters)==null?void 0:I.docs)==null?void 0:M.source}}};var k,B,f;u.parameters={...u.parameters,docs:{...(k=u.parameters)==null?void 0:k.docs,source:{originalSource:`args => { + return +
    + +
    +
    + +
    +
    + +
    +
    ; +}`,...(f=(B=u.parameters)==null?void 0:B.docs)==null?void 0:f.source}}};var y,D,L;t.parameters={...t.parameters,docs:{...(y=t.parameters)==null?void 0:y.docs,source:{originalSource:`args => { + return +
    + +
    +
    + + + Link + + +
    + Parent + +
    +
    +
    +
    +
    ; +}`,...(L=(D=t.parameters)==null?void 0:D.docs)==null?void 0:L.source}}};var S,z,C;l.parameters={...l.parameters,docs:{...(S=l.parameters)==null?void 0:S.docs,source:{originalSource:`args => { + return +
    + +
    +
    +
    + +
    + + + +
  • + + Profile + New + +
  • + Settings + Logout +
    +
    +
    +
    ; +}`,...(C=(z=l.parameters)==null?void 0:z.docs)==null?void 0:C.source}}};var U,A,W;c.parameters={...c.parameters,docs:{...(U=c.parameters)==null?void 0:U.docs,source:{originalSource:`args => { + return +
    + +
    +
    + + + + + 8 Items + Subtotal: $999 + + + + + + + + + +
  • + + Profile + New + +
  • + Settings + Logout +
    +
    +
    +
    ; +}`,...(W=(A=c.parameters)==null?void 0:A.docs)==null?void 0:W.source}}};var P,E,H;d.parameters={...d.parameters,docs:{...(P=d.parameters)==null?void 0:P.docs,source:{originalSource:`args => { + return + + + + + Homepage + Portfolio + About + + + + + + + + + + + ; +}`,...(H=(E=d.parameters)==null?void 0:E.docs)==null?void 0:H.source}}};var q,V,F;i.parameters={...i.parameters,docs:{...(q=i.parameters)==null?void 0:q.docs,source:{originalSource:`args => { + return + + + + + Item 1 +
  • + Parent + +
  • + Item 3 +
    +
    + daisyUI +
    + + + + Item 1 + + +
    + Parent + +
    +
    + + Item 3 + +
    +
    + + + +
    ; +}`,...(F=(V=i.parameters)==null?void 0:V.docs)==null?void 0:F.source}}};var R,T,_;m.parameters={...m.parameters,docs:{...(R=m.parameters)==null?void 0:R.docs,source:{originalSource:`args => { + return <> + + + + + + + + + + ; +}`,...(_=(T=m.parameters)==null?void 0:T.docs)==null?void 0:_.source}}};const ce=["Default","TitleAndIcon","IconAtStartAndEnd","MenuAndSubmenu","SearchInputAndDropdown","IconIndicatorAndDropdown","DropdownCenterLogoAndIcon","Responsive","Colors"];export{m as Colors,h as Default,d as DropdownCenterLogoAndIcon,u as IconAtStartAndEnd,c as IconIndicatorAndDropdown,t as MenuAndSubmenu,i as Responsive,l as SearchInputAndDropdown,x as TitleAndIcon,ce as __namedExportsOrder,le as default}; diff --git a/docs/assets/Page-CeeQJVdd.css b/docs/assets/Page-CeeQJVdd.css new file mode 100644 index 00000000..a29cad7a --- /dev/null +++ b/docs/assets/Page-CeeQJVdd.css @@ -0,0 +1 @@ +.storybook-page{margin:0 auto;padding:48px 20px;max-width:600px;color:#333;font-size:14px;line-height:24px;font-family:Nunito Sans,Helvetica Neue,Helvetica,Arial,sans-serif}.storybook-page h2{display:inline-block;vertical-align:top;margin:0 0 4px;font-weight:700;font-size:32px;line-height:1}.storybook-page p{margin:1em 0}.storybook-page a{color:inherit}.storybook-page ul{margin:1em 0;padding-left:30px}.storybook-page li{margin-bottom:8px}.storybook-page .tip{display:inline-block;vertical-align:top;margin-right:10px;border-radius:1em;background:#e7fdd8;padding:4px 12px;color:#357a14;font-weight:700;font-size:11px;line-height:12px}.storybook-page .tip-wrapper{margin-top:40px;margin-bottom:40px;font-size:13px;line-height:20px}.storybook-page .tip-wrapper svg{display:inline-block;vertical-align:top;margin-top:3px;margin-right:4px;width:12px;height:12px}.storybook-page .tip-wrapper svg path{fill:#1ea7fd} diff --git a/docs/assets/Page.stories-Bn5S-uoX.js b/docs/assets/Page.stories-Bn5S-uoX.js new file mode 100644 index 00000000..caaab9c8 --- /dev/null +++ b/docs/assets/Page.stories-Bn5S-uoX.js @@ -0,0 +1,17 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{e as u}from"./iframe-DDnXVYpC.js";import{H as x}from"./Header-BNcRpGpZ.js";import"./Button-03k-2b2_.js";const i=()=>{const[o,t]=u.useState();return e.jsxs("article",{children:[e.jsx(x,{user:o,onLogin:()=>t({name:"Jane Doe"}),onLogout:()=>t(void 0),onCreateAccount:()=>t({name:"Jane Doe"})}),e.jsxs("section",{className:"storybook-page",children:[e.jsx("h2",{children:"Pages in Storybook"}),e.jsxs("p",{children:["We recommend building UIs with a"," ",e.jsx("a",{href:"https://componentdriven.org",target:"_blank",rel:"noopener noreferrer",children:e.jsx("strong",{children:"component-driven"})})," ","process starting with atomic components and ending with pages."]}),e.jsx("p",{children:"Render pages with mock data. This makes it easy to build and review page states without needing to navigate to them in your app. Here are some handy patterns for managing page data in Storybook:"}),e.jsxs("ul",{children:[e.jsx("li",{children:'Use a higher-level connected component. Storybook helps you compose such data from the "args" of child component stories'}),e.jsx("li",{children:"Assemble data in the page component from your services. You can mock these services out using Storybook."})]}),e.jsxs("p",{children:["Get a guided tutorial on component-driven development at"," ",e.jsx("a",{href:"https://storybook.js.org/tutorials/",target:"_blank",rel:"noopener noreferrer",children:"Storybook tutorials"}),". Read more in the"," ",e.jsx("a",{href:"https://storybook.js.org/docs",target:"_blank",rel:"noopener noreferrer",children:"docs"}),"."]}),e.jsxs("div",{className:"tip-wrapper",children:[e.jsx("span",{className:"tip",children:"Tip"})," Adjust the width of the canvas with the"," ",e.jsx("svg",{width:"10",height:"10",viewBox:"0 0 12 12",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("g",{fill:"none",fillRule:"evenodd",children:e.jsx("path",{d:"M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z",id:"a",fill:"#999"})})}),"Viewports addon in the toolbar"]})]})]})};try{i.displayName="Page",i.__docgenInfo={description:"",displayName:"Page",props:{}}}catch{}const{expect:s,userEvent:v,within:w}=__STORYBOOK_MODULE_TEST__,b={title:"Example/Page",component:i,parameters:{layout:"fullscreen"}},n={},a={play:async({canvasElement:o})=>{const t=w(o),r=t.getByRole("button",{name:/Log in/i});await s(r).toBeInTheDocument(),await v.click(r),await s(r).not.toBeInTheDocument();const g=t.getByRole("button",{name:/Log out/i});await s(g).toBeInTheDocument()}};var c,l,d;n.parameters={...n.parameters,docs:{...(c=n.parameters)==null?void 0:c.docs,source:{originalSource:"{}",...(d=(l=n.parameters)==null?void 0:l.docs)==null?void 0:d.source}}};var p,m,h;a.parameters={...a.parameters,docs:{...(p=a.parameters)==null?void 0:p.docs,source:{originalSource:`{ + play: async ({ + canvasElement + }) => { + const canvas = within(canvasElement); + const loginButton = canvas.getByRole('button', { + name: /Log in/i + }); + await expect(loginButton).toBeInTheDocument(); + await userEvent.click(loginButton); + await expect(loginButton).not.toBeInTheDocument(); + const logoutButton = canvas.getByRole('button', { + name: /Log out/i + }); + await expect(logoutButton).toBeInTheDocument(); + } +}`,...(h=(m=a.parameters)==null?void 0:m.docs)==null?void 0:h.source}}};const _=["LoggedOut","LoggedIn"];export{a as LoggedIn,n as LoggedOut,_ as __namedExportsOrder,b as default}; diff --git a/docs/assets/Pagination.stories-a1632775.js b/docs/assets/Pagination.stories-a1632775.js deleted file mode 100644 index ce7b1934..00000000 --- a/docs/assets/Pagination.stories-a1632775.js +++ /dev/null @@ -1,104 +0,0 @@ -import{a as i,j as e}from"./tw-merge-4486aaf0.js";import{J as E}from"./Join-455a80a9.js";import{B as n}from"./Button-e31631bb.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";import"./index-8d7e61f2.js";const u=E,t=u;try{u.displayName="Pagination",u.__docgenInfo={description:"",displayName:"Pagination",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},responsive:{defaultValue:null,description:"",name:"responsive",required:!1,type:{name:"boolean"}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}try{t.displayName="Pagination",t.__docgenInfo={description:"",displayName:"Pagination",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},responsive:{defaultValue:null,description:"",name:"responsive",required:!1,type:{name:"boolean"}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}const C={title:"Navigation/Pagination",component:t},s=a=>i(t,{...a,children:[e(n,{className:"join-item",children:"1"}),e(n,{className:"join-item",active:!0,children:"2"}),e(n,{className:"join-item",children:"3"}),e(n,{className:"join-item",children:"4"})]});s.args={};const o=a=>i("div",{className:"flex flex-col gap-2 items-center",children:[i(t,{...a,children:[e(n,{size:"xs",className:"join-item",children:"1"}),e(n,{size:"xs",className:"join-item",active:!0,children:"2"}),e(n,{size:"xs",className:"join-item",children:"3"}),e(n,{size:"xs",className:"join-item",children:"4"})]}),i(t,{...a,children:[e(n,{size:"sm",className:"join-item",children:"1"}),e(n,{size:"sm",className:"join-item",active:!0,children:"2"}),e(n,{size:"sm",className:"join-item",children:"3"}),e(n,{size:"sm",className:"join-item",children:"4"})]}),i(t,{...a,children:[e(n,{size:"md",className:"join-item",children:"1"}),e(n,{size:"md",className:"join-item",active:!0,children:"2"}),e(n,{size:"md",className:"join-item",children:"3"}),e(n,{size:"md",className:"join-item",children:"4"})]}),i(t,{...a,children:[e(n,{size:"lg",className:"join-item",children:"1"}),e(n,{size:"lg",className:"join-item",active:!0,children:"2"}),e(n,{size:"lg",className:"join-item",children:"3"}),e(n,{size:"lg",className:"join-item",children:"4"})]})]});o.args={};const r=a=>i(t,{...a,children:[e(n,{className:"join-item",children:"1"}),e(n,{className:"join-item",children:"2"}),e(n,{className:"join-item",disabled:!0,children:"..."}),e(n,{className:"join-item",children:"99"}),e(n,{className:"join-item",children:"100"})]});r.args={};const l=a=>i(t,{...a,children:[e(n,{className:"join-item",children:"«"}),e(n,{className:"join-item",children:"Page 22"}),e(n,{className:"join-item",children:"»"})]});l.args={};const m=a=>i(t,{...a,children:[e(n,{variant:"outline",className:"join-item",children:"Previous page"}),e(n,{variant:"outline",className:"join-item",children:"Next"})]});m.args={className:"grid grid-cols-2"};const c=a=>i(t,{...a,children:[e("input",{className:"join-item btn btn-square",type:"radio",name:"options","aria-label":"1",defaultChecked:!0}),e("input",{className:"join-item btn btn-square",type:"radio",name:"options","aria-label":"2"}),e("input",{className:"join-item btn btn-square",type:"radio",name:"options","aria-label":"3"}),e("input",{className:"join-item btn btn-square",type:"radio",name:"options","aria-label":"4"})]});c.args={};var d,p,N;s.parameters={...s.parameters,docs:{...(d=s.parameters)==null?void 0:d.docs,source:{originalSource:`args => { - return - - - - - ; -}`,...(N=(p=s.parameters)==null?void 0:p.docs)==null?void 0:N.source}}};var g,j,B;o.parameters={...o.parameters,docs:{...(g=o.parameters)==null?void 0:g.docs,source:{originalSource:`args => { - return
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ; -}`,...(B=(j=o.parameters)==null?void 0:j.docs)==null?void 0:B.source}}};var h,z,b;r.parameters={...r.parameters,docs:{...(h=r.parameters)==null?void 0:h.docs,source:{originalSource:`args => { - return - - - - - - ; -}`,...(b=(z=r.parameters)==null?void 0:z.docs)==null?void 0:b.source}}};var P,f,v;l.parameters={...l.parameters,docs:{...(P=l.parameters)==null?void 0:P.docs,source:{originalSource:`args => { - return - - - - ; -}`,...(v=(f=l.parameters)==null?void 0:f.docs)==null?void 0:v.source}}};var x,y,_;m.parameters={...m.parameters,docs:{...(x=m.parameters)==null?void 0:x.docs,source:{originalSource:`args => { - return - - - ; -}`,...(_=(y=m.parameters)==null?void 0:y.docs)==null?void 0:_.source}}};var q,S,V;c.parameters={...c.parameters,docs:{...(q=c.parameters)==null?void 0:q.docs,source:{originalSource:`args => { - return - - - - - ; -}`,...(V=(S=c.parameters)==null?void 0:S.docs)==null?void 0:V.source}}};const J=["Default","Sizes","DisabledButton","ExtraSmallButtons","NextPrevOutlineButtonsWithEqualWidth","UsingRadioInputs"];export{s as Default,r as DisabledButton,l as ExtraSmallButtons,m as NextPrevOutlineButtonsWithEqualWidth,o as Sizes,c as UsingRadioInputs,J as __namedExportsOrder,C as default}; diff --git a/docs/assets/Pagination.stories-oy8PogCF.js b/docs/assets/Pagination.stories-oy8PogCF.js new file mode 100644 index 00000000..7fb6ae79 --- /dev/null +++ b/docs/assets/Pagination.stories-oy8PogCF.js @@ -0,0 +1,104 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{J as S}from"./Join-C8mVsF_m.js";import{B as n}from"./Button-GtH5nISf.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";import"./index-Dl-l57lR.js";const t=S;try{t.displayName="Pagination",t.__docgenInfo={description:"",displayName:"Pagination",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},responsive:{defaultValue:null,description:"",name:"responsive",required:!1,type:{name:"boolean"}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}try{t.displayName="Pagination",t.__docgenInfo={description:"",displayName:"Pagination",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},responsive:{defaultValue:null,description:"",name:"responsive",required:!1,type:{name:"boolean"}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}const R={title:"Navigation/Pagination",component:t},i=a=>e.jsxs(t,{...a,children:[e.jsx(n,{className:"join-item",children:"1"}),e.jsx(n,{className:"join-item",active:!0,children:"2"}),e.jsx(n,{className:"join-item",children:"3"}),e.jsx(n,{className:"join-item",children:"4"})]});i.args={};const s=a=>e.jsxs("div",{className:"flex flex-col gap-2 items-center",children:[e.jsxs(t,{...a,children:[e.jsx(n,{size:"xs",className:"join-item",children:"1"}),e.jsx(n,{size:"xs",className:"join-item",active:!0,children:"2"}),e.jsx(n,{size:"xs",className:"join-item",children:"3"}),e.jsx(n,{size:"xs",className:"join-item",children:"4"})]}),e.jsxs(t,{...a,children:[e.jsx(n,{size:"sm",className:"join-item",children:"1"}),e.jsx(n,{size:"sm",className:"join-item",active:!0,children:"2"}),e.jsx(n,{size:"sm",className:"join-item",children:"3"}),e.jsx(n,{size:"sm",className:"join-item",children:"4"})]}),e.jsxs(t,{...a,children:[e.jsx(n,{size:"md",className:"join-item",children:"1"}),e.jsx(n,{size:"md",className:"join-item",active:!0,children:"2"}),e.jsx(n,{size:"md",className:"join-item",children:"3"}),e.jsx(n,{size:"md",className:"join-item",children:"4"})]}),e.jsxs(t,{...a,children:[e.jsx(n,{size:"lg",className:"join-item",children:"1"}),e.jsx(n,{size:"lg",className:"join-item",active:!0,children:"2"}),e.jsx(n,{size:"lg",className:"join-item",children:"3"}),e.jsx(n,{size:"lg",className:"join-item",children:"4"})]})]});s.args={};const o=a=>e.jsxs(t,{...a,children:[e.jsx(n,{className:"join-item",children:"1"}),e.jsx(n,{className:"join-item",children:"2"}),e.jsx(n,{className:"join-item",disabled:!0,children:"..."}),e.jsx(n,{className:"join-item",children:"99"}),e.jsx(n,{className:"join-item",children:"100"})]});o.args={};const r=a=>e.jsxs(t,{...a,children:[e.jsx(n,{className:"join-item",children:"«"}),e.jsx(n,{className:"join-item",children:"Page 22"}),e.jsx(n,{className:"join-item",children:"»"})]});r.args={};const l=a=>e.jsxs(t,{...a,children:[e.jsx(n,{variant:"outline",className:"join-item",children:"Previous page"}),e.jsx(n,{variant:"outline",className:"join-item",children:"Next"})]});l.args={className:"grid grid-cols-2"};const m=a=>e.jsxs(t,{...a,children:[e.jsx("input",{className:"join-item btn btn-square",type:"radio",name:"options","aria-label":"1",defaultChecked:!0}),e.jsx("input",{className:"join-item btn btn-square",type:"radio",name:"options","aria-label":"2"}),e.jsx("input",{className:"join-item btn btn-square",type:"radio",name:"options","aria-label":"3"}),e.jsx("input",{className:"join-item btn btn-square",type:"radio",name:"options","aria-label":"4"})]});m.args={};var c,u,d;i.parameters={...i.parameters,docs:{...(c=i.parameters)==null?void 0:c.docs,source:{originalSource:`args => { + return + + + + + ; +}`,...(d=(u=i.parameters)==null?void 0:u.docs)==null?void 0:d.source}}};var j,p,N;s.parameters={...s.parameters,docs:{...(j=s.parameters)==null?void 0:j.docs,source:{originalSource:`args => { + return
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    ; +}`,...(N=(p=s.parameters)==null?void 0:p.docs)==null?void 0:N.source}}};var g,B,x;o.parameters={...o.parameters,docs:{...(g=o.parameters)==null?void 0:g.docs,source:{originalSource:`args => { + return + + + + + + ; +}`,...(x=(B=o.parameters)==null?void 0:B.docs)==null?void 0:x.source}}};var h,z,b;r.parameters={...r.parameters,docs:{...(h=r.parameters)==null?void 0:h.docs,source:{originalSource:`args => { + return + + + + ; +}`,...(b=(z=r.parameters)==null?void 0:z.docs)==null?void 0:b.source}}};var P,f,v;l.parameters={...l.parameters,docs:{...(P=l.parameters)==null?void 0:P.docs,source:{originalSource:`args => { + return + + + ; +}`,...(v=(f=l.parameters)==null?void 0:f.docs)==null?void 0:v.source}}};var y,_,q;m.parameters={...m.parameters,docs:{...(y=m.parameters)==null?void 0:y.docs,source:{originalSource:`args => { + return + + + + + ; +}`,...(q=(_=m.parameters)==null?void 0:_.docs)==null?void 0:q.source}}};const k=["Default","Sizes","DisabledButton","ExtraSmallButtons","NextPrevOutlineButtonsWithEqualWidth","UsingRadioInputs"];export{i as Default,o as DisabledButton,r as ExtraSmallButtons,l as NextPrevOutlineButtonsWithEqualWidth,s as Sizes,m as UsingRadioInputs,k as __namedExportsOrder,R as default}; diff --git a/docs/assets/PhoneMockup.stories-9ec0dc15.js b/docs/assets/PhoneMockup.stories-9ec0dc15.js deleted file mode 100644 index e00e767d..00000000 --- a/docs/assets/PhoneMockup.stories-9ec0dc15.js +++ /dev/null @@ -1,5 +0,0 @@ -import{t as n,a as N,j as s}from"./tw-merge-4486aaf0.js";import{r as P}from"./index-f46741a2.js";import{c as x}from"./clsx.m-1229b3e0.js";import{c as T}from"./constants-fe73bc72.js";const t=P.forwardRef(({color:e,dataTheme:h,className:y,children:g,innerRef:M,innerProps:o,...k},b)=>{const _=n("mockup-phone",x({"border-primary":e==="primary","border-secondary":e==="secondary","border-info":e==="info","border-success":e==="success","border-warning":e==="warning","border-error":e==="error"}),y);return N("div",{"aria-label":"Phone mockup",...k,"data-theme":h,className:_,ref:b,children:[s("div",{className:"camera"}),s("div",{className:"display",children:s("div",{...o,className:n("artboard artboard-demo phone-1",o==null?void 0:o.className),ref:M,children:g})})]})});t.displayName="PhoneMockup";const u=t;try{t.displayName="PhoneMockup",t.__docgenInfo={description:"",displayName:"PhoneMockup",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},innerProps:{defaultValue:null,description:"",name:"innerProps",required:!1,type:{name:"HTMLAttributes"}},innerRef:{defaultValue:null,description:"",name:"innerRef",required:!1,type:{name:"Ref"}}}}}catch{}const D={title:"Mockup/PhoneMockup",component:u,parameters:{controls:{expanded:!0}},argTypes:{color:{control:{type:"select"},options:T}}},f=e=>s(u,{...e,children:"Hi."}),r=f.bind({});r.args={};const a=f.bind({});a.args={color:"primary"};var c,p,d;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:`args => { - return Hi.; -}`,...(d=(p=r.parameters)==null?void 0:p.docs)==null?void 0:d.source}}};var m,i,l;a.parameters={...a.parameters,docs:{...(m=a.parameters)==null?void 0:m.docs,source:{originalSource:`args => { - return Hi.; -}`,...(l=(i=a.parameters)==null?void 0:i.docs)==null?void 0:l.source}}};const E=["Default","ComponentColors"];export{a as ComponentColors,r as Default,E as __namedExportsOrder,D as default}; diff --git a/docs/assets/PhoneMockup.stories-QBP_jv6c.js b/docs/assets/PhoneMockup.stories-QBP_jv6c.js new file mode 100644 index 00000000..3c70fbba --- /dev/null +++ b/docs/assets/PhoneMockup.stories-QBP_jv6c.js @@ -0,0 +1,5 @@ +import{j as r}from"./jsx-runtime-BjG_zV1W.js";import{r as x}from"./iframe-DDnXVYpC.js";import{c as _}from"./clsx-B-dksMZM.js";import{t as n}from"./bundle-mjs-yGZq-iow.js";import{c as N}from"./constants-DRV7E8Ky.js";const s=x.forwardRef(({color:e,dataTheme:f,className:h,children:y,innerRef:g,innerProps:t,...k},M)=>{const b=n("mockup-phone",_({"border-primary":e==="primary","border-secondary":e==="secondary","border-info":e==="info","border-success":e==="success","border-warning":e==="warning","border-error":e==="error"}),h);return r.jsxs("div",{"aria-label":"Phone mockup",...k,"data-theme":f,className:b,ref:M,children:[r.jsx("div",{className:"mockup-phone-camera"}),r.jsx("div",{className:"mockup-phone-display",children:r.jsx("div",{...t,className:n("artboard artboard-demo phone-1",t==null?void 0:t.className),ref:g,children:y})})]})});s.displayName="PhoneMockup";try{s.displayName="PhoneMockup",s.__docgenInfo={description:"",displayName:"PhoneMockup",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},innerProps:{defaultValue:null,description:"",name:"innerProps",required:!1,type:{name:"HTMLAttributes"}},innerRef:{defaultValue:null,description:"",name:"innerRef",required:!1,type:{name:"Ref"}}}}}catch{}const C={title:"Mockup/PhoneMockup",component:s,parameters:{controls:{expanded:!0}},argTypes:{color:{control:{type:"select"},options:N}}},u=e=>r.jsx(s,{...e,children:"Hi."}),a=u.bind({});a.args={};const o=u.bind({});o.args={color:"primary"};var c,p,m;a.parameters={...a.parameters,docs:{...(c=a.parameters)==null?void 0:c.docs,source:{originalSource:`args => { + return Hi.; +}`,...(m=(p=a.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};var d,i,l;o.parameters={...o.parameters,docs:{...(d=o.parameters)==null?void 0:d.docs,source:{originalSource:`args => { + return Hi.; +}`,...(l=(i=o.parameters)==null?void 0:i.docs)==null?void 0:l.source}}};const E=["Default","ComponentColors"];export{o as ComponentColors,a as Default,E as __namedExportsOrder,C as default}; diff --git a/docs/assets/Progress.stories--aLG5iWd.js b/docs/assets/Progress.stories--aLG5iWd.js new file mode 100644 index 00000000..6a9d7318 --- /dev/null +++ b/docs/assets/Progress.stories--aLG5iWd.js @@ -0,0 +1,67 @@ +import{j as r}from"./jsx-runtime-BjG_zV1W.js";import{r as J}from"./iframe-DDnXVYpC.js";import{c as K}from"./clsx-B-dksMZM.js";import{t as L}from"./bundle-mjs-yGZq-iow.js";const e=J.forwardRef(({color:s,dataTheme:O,className:z,...B},G)=>{const H=L("progress",z,K({"progress-accent":s==="accent","progress-error":s==="error","progress-ghost":s==="ghost","progress-info":s==="info","progress-primary":s==="primary","progress-secondary":s==="secondary","progress-success":s==="success","progress-warning":s==="warning"}));return r.jsx("progress",{...B,ref:G,"data-theme":O,className:H})});e.displayName="Progress";try{e.displayName="Progress",e.__docgenInfo={description:"",displayName:"Progress",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"ghost"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}}}}}catch{}try{e.displayName="Progress",e.__docgenInfo={description:"",displayName:"Progress",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"ghost"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}}}}}catch{}const Z={title:"Feedback/Progress",component:e},a=s=>r.jsxs("div",{className:"flex flex-col gap-y-2",children:[r.jsx(e,{...s,className:"w-56",value:0}),r.jsx(e,{...s,className:"w-56",value:10}),r.jsx(e,{...s,className:"w-56",value:40}),r.jsx(e,{...s,className:"w-56",value:70}),r.jsx(e,{...s,className:"w-56",value:100})]}),o=a.bind({});o.args={max:100};const l=a.bind({});l.args={max:100,color:"primary"};const c=a.bind({});c.args={max:100,color:"secondary"};const n=a.bind({});n.args={max:100,color:"accent"};const g=a.bind({});g.args={max:100,color:"success"};const m=a.bind({});m.args={max:100,color:"info"};const u=a.bind({});u.args={max:100,color:"warning"};const t=a.bind({});t.args={max:100,color:"error"};const d=s=>r.jsx(e,{...s,className:"w-56"});d.args={};var i,p,v;o.parameters={...o.parameters,docs:{...(i=o.parameters)==null?void 0:i.docs,source:{originalSource:`args => { + return
    + + + + + +
    ; +}`,...(v=(p=o.parameters)==null?void 0:p.docs)==null?void 0:v.source}}};var N,w,P;l.parameters={...l.parameters,docs:{...(N=l.parameters)==null?void 0:N.docs,source:{originalSource:`args => { + return
    + + + + + +
    ; +}`,...(P=(w=l.parameters)==null?void 0:w.docs)==null?void 0:P.source}}};var f,x,y;c.parameters={...c.parameters,docs:{...(f=c.parameters)==null?void 0:f.docs,source:{originalSource:`args => { + return
    + + + + + +
    ; +}`,...(y=(x=c.parameters)==null?void 0:x.docs)==null?void 0:y.source}}};var _,C,S;n.parameters={...n.parameters,docs:{...(_=n.parameters)==null?void 0:_.docs,source:{originalSource:`args => { + return
    + + + + + +
    ; +}`,...(S=(C=n.parameters)==null?void 0:C.docs)==null?void 0:S.source}}};var h,j,b;g.parameters={...g.parameters,docs:{...(h=g.parameters)==null?void 0:h.docs,source:{originalSource:`args => { + return
    + + + + + +
    ; +}`,...(b=(j=g.parameters)==null?void 0:j.docs)==null?void 0:b.source}}};var I,E,T;m.parameters={...m.parameters,docs:{...(I=m.parameters)==null?void 0:I.docs,source:{originalSource:`args => { + return
    + + + + + +
    ; +}`,...(T=(E=m.parameters)==null?void 0:E.docs)==null?void 0:T.source}}};var q,V,A;u.parameters={...u.parameters,docs:{...(q=u.parameters)==null?void 0:q.docs,source:{originalSource:`args => { + return
    + + + + + +
    ; +}`,...(A=(V=u.parameters)==null?void 0:V.docs)==null?void 0:A.source}}};var D,R,W;t.parameters={...t.parameters,docs:{...(D=t.parameters)==null?void 0:D.docs,source:{originalSource:`args => { + return
    + + + + + +
    ; +}`,...(W=(R=t.parameters)==null?void 0:R.docs)==null?void 0:W.source}}};var k,F,M;d.parameters={...d.parameters,docs:{...(k=d.parameters)==null?void 0:k.docs,source:{originalSource:`args => { + return ; +}`,...(M=(F=d.parameters)==null?void 0:F.docs)==null?void 0:M.source}}};const $=["Default","PrimaryColor","SecondaryColor","AccentColor","SuccessColor","InfoColor","WarningColor","ErrorColor","Indeterminate"];export{n as AccentColor,o as Default,t as ErrorColor,d as Indeterminate,m as InfoColor,l as PrimaryColor,c as SecondaryColor,g as SuccessColor,u as WarningColor,$ as __namedExportsOrder,Z as default}; diff --git a/docs/assets/Progress.stories-e80e8fb7.js b/docs/assets/Progress.stories-e80e8fb7.js deleted file mode 100644 index 18ba0da2..00000000 --- a/docs/assets/Progress.stories-e80e8fb7.js +++ /dev/null @@ -1,67 +0,0 @@ -import{t as J,j as a,a as K}from"./tw-merge-4486aaf0.js";import{r as L}from"./index-f46741a2.js";import{c as Q}from"./clsx.m-1229b3e0.js";const i=L.forwardRef(({color:s,dataTheme:$,className:z,...B},G)=>{const H=J("progress",z,Q({"progress-accent":s==="accent","progress-error":s==="error","progress-ghost":s==="ghost","progress-info":s==="info","progress-primary":s==="primary","progress-secondary":s==="secondary","progress-success":s==="success","progress-warning":s==="warning"}));return a("progress",{...B,ref:G,"data-theme":$,className:H})});i.displayName="Progress";const e=i;try{i.displayName="Progress",i.__docgenInfo={description:"",displayName:"Progress",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"ghost"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}}}}}catch{}try{e.displayName="Progress",e.__docgenInfo={description:"",displayName:"Progress",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"ghost"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}}}}}catch{}const Z={title:"Feedback/Progress",component:e},r=s=>K("div",{className:"flex flex-col gap-y-2",children:[a(e,{...s,className:"w-56",value:0}),a(e,{...s,className:"w-56",value:10}),a(e,{...s,className:"w-56",value:40}),a(e,{...s,className:"w-56",value:70}),a(e,{...s,className:"w-56",value:100})]}),o=r.bind({});o.args={max:100};const l=r.bind({});l.args={max:100,color:"primary"};const c=r.bind({});c.args={max:100,color:"secondary"};const n=r.bind({});n.args={max:100,color:"accent"};const g=r.bind({});g.args={max:100,color:"success"};const m=r.bind({});m.args={max:100,color:"info"};const u=r.bind({});u.args={max:100,color:"warning"};const t=r.bind({});t.args={max:100,color:"error"};const d=s=>a(e,{...s,className:"w-56"});d.args={};var p,v,N;o.parameters={...o.parameters,docs:{...(p=o.parameters)==null?void 0:p.docs,source:{originalSource:`args => { - return
    - - - - - -
    ; -}`,...(N=(v=o.parameters)==null?void 0:v.docs)==null?void 0:N.source}}};var w,P,f;l.parameters={...l.parameters,docs:{...(w=l.parameters)==null?void 0:w.docs,source:{originalSource:`args => { - return
    - - - - - -
    ; -}`,...(f=(P=l.parameters)==null?void 0:P.docs)==null?void 0:f.source}}};var y,x,_;c.parameters={...c.parameters,docs:{...(y=c.parameters)==null?void 0:y.docs,source:{originalSource:`args => { - return
    - - - - - -
    ; -}`,...(_=(x=c.parameters)==null?void 0:x.docs)==null?void 0:_.source}}};var C,S,h;n.parameters={...n.parameters,docs:{...(C=n.parameters)==null?void 0:C.docs,source:{originalSource:`args => { - return
    - - - - - -
    ; -}`,...(h=(S=n.parameters)==null?void 0:S.docs)==null?void 0:h.source}}};var b,I,T;g.parameters={...g.parameters,docs:{...(b=g.parameters)==null?void 0:b.docs,source:{originalSource:`args => { - return
    - - - - - -
    ; -}`,...(T=(I=g.parameters)==null?void 0:I.docs)==null?void 0:T.source}}};var q,E,V;m.parameters={...m.parameters,docs:{...(q=m.parameters)==null?void 0:q.docs,source:{originalSource:`args => { - return
    - - - - - -
    ; -}`,...(V=(E=m.parameters)==null?void 0:E.docs)==null?void 0:V.source}}};var j,A,D;u.parameters={...u.parameters,docs:{...(j=u.parameters)==null?void 0:j.docs,source:{originalSource:`args => { - return
    - - - - - -
    ; -}`,...(D=(A=u.parameters)==null?void 0:A.docs)==null?void 0:D.source}}};var W,k,F;t.parameters={...t.parameters,docs:{...(W=t.parameters)==null?void 0:W.docs,source:{originalSource:`args => { - return
    - - - - - -
    ; -}`,...(F=(k=t.parameters)==null?void 0:k.docs)==null?void 0:F.source}}};var M,O,R;d.parameters={...d.parameters,docs:{...(M=d.parameters)==null?void 0:M.docs,source:{originalSource:`args => { - return ; -}`,...(R=(O=d.parameters)==null?void 0:O.docs)==null?void 0:R.source}}};const ss=["Default","PrimaryColor","SecondaryColor","AccentColor","SuccessColor","InfoColor","WarningColor","ErrorColor","Indeterminate"];export{n as AccentColor,o as Default,t as ErrorColor,d as Indeterminate,m as InfoColor,l as PrimaryColor,c as SecondaryColor,g as SuccessColor,u as WarningColor,ss as __namedExportsOrder,Z as default}; diff --git a/docs/assets/RadialProgress.stories-bxp6Klj4.js b/docs/assets/RadialProgress.stories-bxp6Klj4.js new file mode 100644 index 00000000..27e3f476 --- /dev/null +++ b/docs/assets/RadialProgress.stories-bxp6Klj4.js @@ -0,0 +1,16 @@ +import{j as o}from"./jsx-runtime-BjG_zV1W.js";import{r as T}from"./iframe-DDnXVYpC.js";import{c as V}from"./clsx-B-dksMZM.js";import{t as q}from"./bundle-mjs-yGZq-iow.js";const r=T.forwardRef(({value:a,size:k="4rem",thickness:_="4px",color:e,dataTheme:b,className:z,children:C,...j},N)=>{const S=q("radial-progress",z,V({"text-primary":e==="primary","text-secondary":e==="secondary","text-accent":e==="accent","text-info":e==="info","text-success":e==="success","text-warning":e==="warning","text-error":e==="error"})),c=Math.min(100,Math.max(0,a)),w={"--value":c,"--size":k,"--thickness":_};return o.jsx("div",{role:"progressbar","aria-valuenow":c,"aria-valuemin":0,"aria-valuemax":100,...j,ref:N,"data-theme":b,className:S,style:w,children:C})});r.displayName="RadialProgress";try{r.displayName="RadialProgress",r.__docgenInfo={description:"",displayName:"RadialProgress",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"number"}},size:{defaultValue:{value:"4rem"},description:"",name:"size",required:!1,type:{name:"string"}},thickness:{defaultValue:{value:"4px"},description:"",name:"thickness",required:!1,type:{name:"string"}}}}}catch{}const D={title:"Feedback/Radial Progress",component:r},l=a=>o.jsxs(r,{...a,children:[a.value,"%"]}),s=l.bind({});s.args={value:75};const t=l.bind({});t.args={value:75,color:"primary"};const i=l.bind({});i.args={value:75,className:"bg-primary text-primary-content border-4 border-primary"};const n=a=>o.jsxs("div",{className:"flex items-center gap-4",children:[o.jsx(r,{value:70,size:"12rem",thickness:"2px",children:"70%"}),o.jsx(r,{value:80,size:"12rem",thickness:"2rem",children:"80%"})]});n.args={};var d,m,u;s.parameters={...s.parameters,docs:{...(d=s.parameters)==null?void 0:d.docs,source:{originalSource:`args => { + return {args.value}%; +}`,...(u=(m=s.parameters)==null?void 0:m.docs)==null?void 0:u.source}}};var p,g,x;t.parameters={...t.parameters,docs:{...(p=t.parameters)==null?void 0:p.docs,source:{originalSource:`args => { + return {args.value}%; +}`,...(x=(g=t.parameters)==null?void 0:g.docs)==null?void 0:x.source}}};var v,f,y;i.parameters={...i.parameters,docs:{...(v=i.parameters)==null?void 0:v.docs,source:{originalSource:`args => { + return {args.value}%; +}`,...(y=(f=i.parameters)==null?void 0:f.docs)==null?void 0:y.source}}};var h,R,P;n.parameters={...n.parameters,docs:{...(h=n.parameters)==null?void 0:h.docs,source:{originalSource:`args => { + return
    + + 70% + + + 80% + +
    ; +}`,...(P=(R=n.parameters)==null?void 0:R.docs)==null?void 0:P.source}}};const F=["Default","CustomColor","BackgroundColor","CustomSizeAndThickness"];export{i as BackgroundColor,t as CustomColor,n as CustomSizeAndThickness,s as Default,F as __namedExportsOrder,D as default}; diff --git a/docs/assets/RadialProgress.stories-d0a4fe39.js b/docs/assets/RadialProgress.stories-d0a4fe39.js deleted file mode 100644 index 91cecbf5..00000000 --- a/docs/assets/RadialProgress.stories-d0a4fe39.js +++ /dev/null @@ -1,16 +0,0 @@ -import{t as q,j as l,a as _}from"./tw-merge-4486aaf0.js";import{r as j}from"./index-f46741a2.js";import{c as M}from"./clsx.m-1229b3e0.js";const o=j.forwardRef(({value:r,size:b="4rem",thickness:z="4px",color:e,dataTheme:C,className:S,children:N,...w},T)=>{const V=q("radial-progress",S,M({"text-primary":e==="primary","text-secondary":e==="secondary","text-accent":e==="accent","text-info":e==="info","text-success":e==="success","text-warning":e==="warning","text-error":e==="error"})),d=Math.min(100,Math.max(0,r));return l("div",{role:"progressbar","aria-valuenow":d,"aria-valuemin":0,"aria-valuemax":100,...w,ref:T,"data-theme":C,className:V,style:{"--value":d,"--size":b,"--thickness":z},children:N})});o.displayName="RadialProgress";const i=o;try{o.displayName="RadialProgress",o.__docgenInfo={description:"",displayName:"RadialProgress",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"number"}},size:{defaultValue:{value:"4rem"},description:"",name:"size",required:!1,type:{name:"string"}},thickness:{defaultValue:{value:"4px"},description:"",name:"thickness",required:!1,type:{name:"string"}}}}}catch{}const F={title:"Feedback/Radial Progress",component:i},c=r=>_(i,{...r,children:[r.value,"%"]}),a=c.bind({});a.args={value:75};const s=c.bind({});s.args={value:75,color:"primary"};const t=c.bind({});t.args={value:75,className:"bg-primary text-primary-content border-4 border-primary"};const n=r=>_("div",{className:"flex items-center gap-4",children:[l(i,{value:70,size:"12rem",thickness:"2px",children:"70%"}),l(i,{value:80,size:"12rem",thickness:"2rem",children:"80%"})]});n.args={};var m,u,p;a.parameters={...a.parameters,docs:{...(m=a.parameters)==null?void 0:m.docs,source:{originalSource:`args => { - return {args.value}%; -}`,...(p=(u=a.parameters)==null?void 0:u.docs)==null?void 0:p.source}}};var g,v,x;s.parameters={...s.parameters,docs:{...(g=s.parameters)==null?void 0:g.docs,source:{originalSource:`args => { - return {args.value}%; -}`,...(x=(v=s.parameters)==null?void 0:v.docs)==null?void 0:x.source}}};var y,f,h;t.parameters={...t.parameters,docs:{...(y=t.parameters)==null?void 0:y.docs,source:{originalSource:`args => { - return {args.value}%; -}`,...(h=(f=t.parameters)==null?void 0:f.docs)==null?void 0:h.source}}};var R,P,k;n.parameters={...n.parameters,docs:{...(R=n.parameters)==null?void 0:R.docs,source:{originalSource:`args => { - return
    - - 70% - - - 80% - -
    ; -}`,...(k=(P=n.parameters)==null?void 0:P.docs)==null?void 0:k.source}}};const I=["Default","CustomColor","BackgroundColor","CustomSizeAndThickness"];export{t as BackgroundColor,s as CustomColor,n as CustomSizeAndThickness,a as Default,I as __namedExportsOrder,F as default}; diff --git a/docs/assets/Radio.stories-CnuccfDd.js b/docs/assets/Radio.stories-CnuccfDd.js new file mode 100644 index 00000000..06baa409 --- /dev/null +++ b/docs/assets/Radio.stories-CnuccfDd.js @@ -0,0 +1,32 @@ +import{j as a}from"./jsx-runtime-BjG_zV1W.js";import{r as w}from"./iframe-DDnXVYpC.js";import{c as L}from"./clsx-B-dksMZM.js";import{t as D}from"./bundle-mjs-yGZq-iow.js";import{F as t}from"./index-BNCmuIF-.js";const r=w.forwardRef(({color:e,size:d,name:y,dataTheme:j,className:_,...v},N)=>{const F=D("radio",_,L({"radio-xl":d==="xl","radio-lg":d==="lg","radio-md":d==="md","radio-sm":d==="sm","radio-xs":d==="xs","radio-primary":e==="primary","radio-secondary":e==="secondary","radio-accent":e==="accent","radio-info":e==="info","radio-success":e==="success","radio-warning":e==="warning","radio-error":e==="error"}));return a.jsx("input",{...v,ref:N,type:"radio",name:y,"data-theme":j,className:F})});r.displayName="Radio";try{r.displayName="Radio",r.__docgenInfo={description:"",displayName:"Radio",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xl"'},{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}}}}}catch{}try{r.displayName="Radio",r.__docgenInfo={description:"",displayName:"Radio",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xl"'},{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}}}}}catch{}const E={title:"Data Input/Radio",component:r},C=e=>a.jsxs(a.Fragment,{children:[a.jsx(r,{...e,name:"radio1",defaultChecked:!0}),a.jsx(r,{...e,name:"radio1"})]}),s=C.bind({});s.args={};const o=e=>a.jsxs("div",{className:"flex flex-col items-center float-left gap-2",children:[a.jsx(r,{...e,defaultChecked:!0,color:"primary"}),a.jsx(r,{...e,defaultChecked:!0,color:"secondary"}),a.jsx(r,{...e,defaultChecked:!0,color:"accent"}),a.jsx(r,{...e,defaultChecked:!0,color:"success"}),a.jsx(r,{...e,defaultChecked:!0,color:"warning"}),a.jsx(r,{...e,defaultChecked:!0,color:"info"}),a.jsx(r,{...e,defaultChecked:!0,color:"error"})]});o.args={};const l=C.bind({});l.args={disabled:!0};const c=e=>a.jsxs("div",{className:"bg-base-200 w-1/4 p-4 rounded-lg shadow",children:[a.jsx(t,{children:a.jsx(t.Label,{title:"Red Pill",children:a.jsx(r,{...e,name:"radio1",className:"checked:bg-red-500",defaultChecked:!0})})}),a.jsx(t,{children:a.jsx(t.Label,{title:"Blue Pill",children:a.jsx(r,{...e,name:"radio1",className:"checked:bg-blue-500",defaultChecked:!0})})})]});var n,i,u;s.parameters={...s.parameters,docs:{...(n=s.parameters)==null?void 0:n.docs,source:{originalSource:`args => { + return <> + + + ; +}`,...(u=(i=s.parameters)==null?void 0:i.docs)==null?void 0:u.source}}};var m,p,f;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`args =>
    + + + + + + + +
    `,...(f=(p=o.parameters)==null?void 0:p.docs)==null?void 0:f.source}}};var h,g,x;l.parameters={...l.parameters,docs:{...(h=l.parameters)==null?void 0:h.docs,source:{originalSource:`args => { + return <> + + + ; +}`,...(x=(g=l.parameters)==null?void 0:g.docs)==null?void 0:x.source}}};var k,R,b;c.parameters={...c.parameters,docs:{...(k=c.parameters)==null?void 0:k.docs,source:{originalSource:`args => { + return
    +
    + + + +
    +
    + + + +
    +
    ; +}`,...(b=(R=c.parameters)==null?void 0:R.docs)==null?void 0:b.source}}};const I=["Default","Colors","Disabled","WithLabelsAndForm"];export{o as Colors,s as Default,l as Disabled,c as WithLabelsAndForm,I as __namedExportsOrder,E as default}; diff --git a/docs/assets/Radio.stories-e32ea42a.js b/docs/assets/Radio.stories-e32ea42a.js deleted file mode 100644 index 603161fd..00000000 --- a/docs/assets/Radio.stories-e32ea42a.js +++ /dev/null @@ -1,32 +0,0 @@ -import{t as T,j as a,a as i,F as q}from"./tw-merge-4486aaf0.js";import{r as P}from"./index-f46741a2.js";import{c as S}from"./clsx.m-1229b3e0.js";import{F as l}from"./index-1d303440.js";const n=P.forwardRef(({color:e,size:t,name:x,dataTheme:F,className:N,...w},L)=>{const D=T("radio",N,S({"radio-lg":t==="lg","radio-md":t==="md","radio-sm":t==="sm","radio-xs":t==="xs","radio-primary":e==="primary","radio-secondary":e==="secondary","radio-accent":e==="accent","radio-info":e==="info","radio-success":e==="success","radio-warning":e==="warning","radio-error":e==="error"}));return a("input",{...w,ref:L,type:"radio",name:x,"data-theme":F,className:D})});n.displayName="Radio";const r=n;try{n.displayName="Radio",n.__docgenInfo={description:"",displayName:"Radio",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}}}}}catch{}try{r.displayName="Radio",r.__docgenInfo={description:"",displayName:"Radio",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}}}}}catch{}const B={title:"Data Input/Radio",component:r},v=e=>i(q,{children:[a(r,{...e,name:"radio1",defaultChecked:!0}),a(r,{...e,name:"radio1"})]}),d=v.bind({});d.args={};const o=e=>i("div",{className:"flex flex-col items-center float-left gap-2",children:[a(r,{...e,defaultChecked:!0,color:"primary"}),a(r,{...e,defaultChecked:!0,color:"secondary"}),a(r,{...e,defaultChecked:!0,color:"accent"}),a(r,{...e,defaultChecked:!0,color:"success"}),a(r,{...e,defaultChecked:!0,color:"warning"}),a(r,{...e,defaultChecked:!0,color:"info"}),a(r,{...e,defaultChecked:!0,color:"error"})]});o.args={};const s=v.bind({});s.args={disabled:!0};const c=e=>i("div",{className:"bg-base-200 w-1/4 p-4 rounded-lg shadow",children:[a(l,{children:a(l.Label,{title:"Red Pill",children:a(r,{...e,name:"radio1",className:"checked:bg-red-500",defaultChecked:!0})})}),a(l,{children:a(l.Label,{title:"Blue Pill",children:a(r,{...e,name:"radio1",className:"checked:bg-blue-500",defaultChecked:!0})})})]});var u,m,p;d.parameters={...d.parameters,docs:{...(u=d.parameters)==null?void 0:u.docs,source:{originalSource:`args => { - return <> - - - ; -}`,...(p=(m=d.parameters)==null?void 0:m.docs)==null?void 0:p.source}}};var f,h,g;o.parameters={...o.parameters,docs:{...(f=o.parameters)==null?void 0:f.docs,source:{originalSource:`args =>
    - - - - - - - -
    `,...(g=(h=o.parameters)==null?void 0:h.docs)==null?void 0:g.source}}};var k,R,b;s.parameters={...s.parameters,docs:{...(k=s.parameters)==null?void 0:k.docs,source:{originalSource:`args => { - return <> - - - ; -}`,...(b=(R=s.parameters)==null?void 0:R.docs)==null?void 0:b.source}}};var C,y,_;c.parameters={...c.parameters,docs:{...(C=c.parameters)==null?void 0:C.docs,source:{originalSource:`args => { - return
    -
    - - - -
    -
    - - - -
    -
    ; -}`,...(_=(y=c.parameters)==null?void 0:y.docs)==null?void 0:_.source}}};const E=["Default","Colors","Disabled","WithLabelsAndForm"];export{o as Colors,d as Default,s as Disabled,c as WithLabelsAndForm,E as __namedExportsOrder,B as default}; diff --git a/docs/assets/Range.stories-03fa77f2.js b/docs/assets/Range.stories-03fa77f2.js deleted file mode 100644 index f5ed1ba5..00000000 --- a/docs/assets/Range.stories-03fa77f2.js +++ /dev/null @@ -1,22 +0,0 @@ -import{t as W,a as i,F as A,j as a}from"./tw-merge-4486aaf0.js";import{r as O}from"./index-f46741a2.js";import{c as $}from"./clsx.m-1229b3e0.js";const d=O.forwardRef(({color:e,size:u,step:c,displayTicks:T,ticksStep:m,dataTheme:z,className:b,...s},k)=>{const q=W("range",b,$({"range-lg":u==="lg","range-md":u==="md","range-sm":u==="sm","range-xs":u==="xs","range-primary":e==="primary","range-secondary":e==="secondary","range-accent":e==="accent","range-info":e==="info","range-success":e==="success","range-warning":e==="warning","range-error":e==="error"})),j=T??c!==void 0,D=c!==void 0?Number(c):1,I=m||D,M=s.min!==void 0?Number(s.min):0,C=s.max!==void 0?Number(s.max):100,E=Math.max(Math.ceil((C-M)/I),1)+1;return i(A,{children:[a("input",{...s,ref:k,type:"range",step:c,"data-theme":z,className:q}),j&&a("div",{className:"w-full flex justify-between text-xs px-2",children:[...Array(E)].map((B,F)=>a("span",{children:"|"},F))})]})});d.displayName="Range";const r=d;try{d.displayName="Range",d.__docgenInfo={description:"",displayName:"Range",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},displayTicks:{defaultValue:null,description:"",name:"displayTicks",required:!1,type:{name:"boolean"}},ticksStep:{defaultValue:null,description:"",name:"ticksStep",required:!1,type:{name:"number"}}}}}catch{}try{r.displayName="Range",r.__docgenInfo={description:"",displayName:"Range",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},displayTicks:{defaultValue:null,description:"",name:"displayTicks",required:!1,type:{name:"boolean"}},ticksStep:{defaultValue:null,description:"",name:"ticksStep",required:!1,type:{name:"number"}}}}}catch{}const K={title:"Data Input/Range",component:r},w=e=>a(r,{...e}),l=w.bind({});l.args={};const n=w.bind({});n.args={step:25};const t=e=>i("div",{className:"w-full flex flex-col gap-2",children:[a(r,{...e,defaultValue:"20",color:"primary"}),a(r,{...e,defaultValue:"30",color:"secondary"}),a(r,{...e,defaultValue:"40",color:"accent"}),a(r,{...e,defaultValue:"50",color:"success"}),a(r,{...e,defaultValue:"60",color:"warning"}),a(r,{...e,defaultValue:"70",color:"info"}),a(r,{...e,defaultValue:"80",color:"error"})]});t.args={};const o=e=>i("div",{className:"w-full flex flex-col gap-2",children:[a(r,{...e,defaultValue:"40",size:"xs"}),a(r,{...e,defaultValue:"50",size:"sm"}),a(r,{...e,defaultValue:"60",size:"md"}),a(r,{...e,defaultValue:"70",size:"lg"})]});var g,p,f;l.parameters={...l.parameters,docs:{...(g=l.parameters)==null?void 0:g.docs,source:{originalSource:`args => { - return ; -}`,...(f=(p=l.parameters)==null?void 0:p.docs)==null?void 0:f.source}}};var y,V,x;n.parameters={...n.parameters,docs:{...(y=n.parameters)==null?void 0:y.docs,source:{originalSource:`args => { - return ; -}`,...(x=(V=n.parameters)==null?void 0:V.docs)==null?void 0:x.source}}};var R,v,_;t.parameters={...t.parameters,docs:{...(R=t.parameters)==null?void 0:R.docs,source:{originalSource:`args => { - return
    - - - - - - - -
    ; -}`,...(_=(v=t.parameters)==null?void 0:v.docs)==null?void 0:_.source}}};var h,N,S;o.parameters={...o.parameters,docs:{...(h=o.parameters)==null?void 0:h.docs,source:{originalSource:`args => { - return
    - - - - -
    ; -}`,...(S=(N=o.parameters)==null?void 0:N.docs)==null?void 0:S.source}}};const L=["Default","WithSteps","Colors","Sizes"];export{t as Colors,l as Default,o as Sizes,n as WithSteps,L as __namedExportsOrder,K as default}; diff --git a/docs/assets/Range.stories-D221NBK7.js b/docs/assets/Range.stories-D221NBK7.js new file mode 100644 index 00000000..5f8fd720 --- /dev/null +++ b/docs/assets/Range.stories-D221NBK7.js @@ -0,0 +1,22 @@ +import{j as a}from"./jsx-runtime-BjG_zV1W.js";import{r as W}from"./iframe-DDnXVYpC.js";import{c as A}from"./clsx-B-dksMZM.js";import{t as F}from"./bundle-mjs-yGZq-iow.js";const r=W.forwardRef(({color:e,size:s,step:c,displayTicks:S,ticksStep:i,dataTheme:T,className:w,...l},b)=>{const k=F("range",w,A({"range-xl":s==="xl","range-lg":s==="lg","range-md":s==="md","range-sm":s==="sm","range-xs":s==="xs","range-primary":e==="primary","range-secondary":e==="secondary","range-accent":e==="accent","range-info":e==="info","range-success":e==="success","range-warning":e==="warning","range-error":e==="error"})),z=S??c!==void 0,q=c!==void 0?Number(c):1,D=i||q,I=l.min!==void 0?Number(l.min):0,E=l.max!==void 0?Number(l.max):100,o=Math.max(Math.ceil((E-I)/D),1)+1,M=Number.isSafeInteger(o)&&o>0&&o<1e3;return a.jsxs(a.Fragment,{children:[a.jsx("input",{...l,ref:b,type:"range",step:c,"data-theme":T,className:k}),z&&M&&a.jsx("div",{className:"w-full flex justify-between text-xs px-2",children:[...Array(o)].map((O,C)=>a.jsx("span",{children:"|"},C))})]})});r.displayName="Range";try{r.displayName="Range",r.__docgenInfo={description:"",displayName:"Range",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xl"'},{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},displayTicks:{defaultValue:null,description:"",name:"displayTicks",required:!1,type:{name:"boolean"}},ticksStep:{defaultValue:null,description:"",name:"ticksStep",required:!1,type:{name:"number"}}}}}catch{}try{r.displayName="Range",r.__docgenInfo={description:"",displayName:"Range",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xl"'},{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},displayTicks:{defaultValue:null,description:"",name:"displayTicks",required:!1,type:{name:"boolean"}},ticksStep:{defaultValue:null,description:"",name:"ticksStep",required:!1,type:{name:"number"}}}}}catch{}const K={title:"Data Input/Range",component:r},N=e=>a.jsx(r,{...e}),n=N.bind({});n.args={};const t=N.bind({});t.args={step:25};const u=e=>a.jsxs("div",{className:"w-full flex flex-col gap-2",children:[a.jsx(r,{...e,defaultValue:"20",color:"primary"}),a.jsx(r,{...e,defaultValue:"30",color:"secondary"}),a.jsx(r,{...e,defaultValue:"40",color:"accent"}),a.jsx(r,{...e,defaultValue:"50",color:"success"}),a.jsx(r,{...e,defaultValue:"60",color:"warning"}),a.jsx(r,{...e,defaultValue:"70",color:"info"}),a.jsx(r,{...e,defaultValue:"80",color:"error"})]});u.args={};const d=e=>a.jsxs("div",{className:"w-full flex flex-col gap-2",children:[a.jsx(r,{...e,defaultValue:"40",size:"xs"}),a.jsx(r,{...e,defaultValue:"50",size:"sm"}),a.jsx(r,{...e,defaultValue:"60",size:"md"}),a.jsx(r,{...e,defaultValue:"70",size:"lg"})]});var m,g,p;n.parameters={...n.parameters,docs:{...(m=n.parameters)==null?void 0:m.docs,source:{originalSource:`args => { + return ; +}`,...(p=(g=n.parameters)==null?void 0:g.docs)==null?void 0:p.source}}};var f,x,y;t.parameters={...t.parameters,docs:{...(f=t.parameters)==null?void 0:f.docs,source:{originalSource:`args => { + return ; +}`,...(y=(x=t.parameters)==null?void 0:x.docs)==null?void 0:y.source}}};var V,R,v;u.parameters={...u.parameters,docs:{...(V=u.parameters)==null?void 0:V.docs,source:{originalSource:`args => { + return
    + + + + + + + +
    ; +}`,...(v=(R=u.parameters)==null?void 0:R.docs)==null?void 0:v.source}}};var j,_,h;d.parameters={...d.parameters,docs:{...(j=d.parameters)==null?void 0:j.docs,source:{originalSource:`args => { + return
    + + + + +
    ; +}`,...(h=(_=d.parameters)==null?void 0:_.docs)==null?void 0:h.source}}};const L=["Default","WithSteps","Colors","Sizes"];export{u as Colors,n as Default,d as Sizes,t as WithSteps,L as __namedExportsOrder,K as default}; diff --git a/docs/assets/Rating.stories-6_ETqJsJ.js b/docs/assets/Rating.stories-6_ETqJsJ.js new file mode 100644 index 00000000..5057067f --- /dev/null +++ b/docs/assets/Rating.stories-6_ETqJsJ.js @@ -0,0 +1,117 @@ +import{j as a}from"./jsx-runtime-BjG_zV1W.js";import{e as N,r}from"./iframe-DDnXVYpC.js";import{c as b}from"./clsx-B-dksMZM.js";import{t as J}from"./bundle-mjs-yGZq-iow.js";const d=({...s})=>a.jsx("input",{...s,type:"checkbox"});try{d.displayName="RatingItem",d.__docgenInfo={description:"",displayName:"RatingItem",props:{}}}catch{}const f=N.forwardRef(({children:s,size:g,half:n,hidden:m,dataTheme:t,className:T,value:h,onChange:R,...z},$)=>{const p=J("rating",T,b({"rating-lg":g==="lg","rating-md":g==="md","rating-sm":g==="sm","rating-xs":g==="xs","rating-half":n,"rating-hidden":m||h===0}));return a.jsxs("div",{"aria-label":"Rating",...z,ref:$,"data-theme":t,className:p,children:[h===0&&a.jsx(d,{className:b(p,"hidden"),checked:!0,readOnly:!0}),N.Children.map(s,(A,I)=>{const B=A;return N.cloneElement(B,{key:I+h,checked:h===I+1,readOnly:R==null,onChange:()=>{R==null||R(I+1)}})})]})}),e=Object.assign(f,{Item:d});try{f.displayName="Rating",f.__docgenInfo={description:"",displayName:"Rating",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xl"'},{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},half:{defaultValue:null,description:"",name:"half",required:!1,type:{name:"boolean"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"number"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((newRating: number) => void)"}}}}}catch{}const U={title:"Data Input/Rating",component:e},i=({value:s,onChange:g,...n})=>{const[m,t]=r.useState(s);return r.useEffect(()=>{t(s)},[s]),a.jsxs(e,{value:m,onChange:t,...n,children:[a.jsx(e.Item,{name:"rating-1",className:"mask mask-star"}),a.jsx(e.Item,{name:"rating-1",className:"mask mask-star"}),a.jsx(e.Item,{name:"rating-1",className:"mask mask-star"}),a.jsx(e.Item,{name:"rating-1",className:"mask mask-star"}),a.jsx(e.Item,{name:"rating-1",className:"mask mask-star"})]})};i.args={value:2};const l=({value:s,onChange:g,...n})=>{const[m,t]=r.useState(s);return r.useEffect(()=>{t(s)},[s]),a.jsxs(e,{value:m,onChange:t,...n,children:[a.jsx(e.Item,{name:"rating-2",className:"mask mask-star-2 bg-orange-400"}),a.jsx(e.Item,{name:"rating-2",className:"mask mask-star-2 bg-orange-400"}),a.jsx(e.Item,{name:"rating-2",className:"mask mask-star-2 bg-orange-400"}),a.jsx(e.Item,{name:"rating-2",className:"mask mask-star-2 bg-orange-400"}),a.jsx(e.Item,{name:"rating-2",className:"mask mask-star-2 bg-orange-400"})]})};l.args={value:2};const o=({value:s,onChange:g,...n})=>{const[m,t]=r.useState(s);return r.useEffect(()=>{t(s)},[s]),a.jsxs(e,{value:m,onChange:t,...n,children:[a.jsx(e.Item,{name:"rating-3",className:"mask mask-heart bg-red-400"}),a.jsx(e.Item,{name:"rating-3",className:"mask mask-heart bg-orange-400"}),a.jsx(e.Item,{name:"rating-3",className:"mask mask-heart bg-yellow-400"}),a.jsx(e.Item,{name:"rating-3",className:"mask mask-heart bg-lime-400"}),a.jsx(e.Item,{name:"rating-3",className:"mask mask-heart bg-green-400"})]})};o.args={value:2};const c=({value:s,onChange:g,...n})=>{const[m,t]=r.useState(s);return r.useEffect(()=>{t(s)},[s]),a.jsxs(e,{value:m,onChange:t,...n,children:[a.jsx(e.Item,{name:"rating-4",className:"mask mask-star-2 bg-green-500"}),a.jsx(e.Item,{name:"rating-4",className:"mask mask-star-2 bg-green-500"}),a.jsx(e.Item,{name:"rating-4",className:"mask mask-star-2 bg-green-500"}),a.jsx(e.Item,{name:"rating-4",className:"mask mask-star-2 bg-green-500"}),a.jsx(e.Item,{name:"rating-4",className:"mask mask-star-2 bg-green-500"})]})};c.args={value:2};const k=({value:s,onChange:g,...n})=>{const[m,t]=r.useState(s);return r.useEffect(()=>{t(s)},[s]),a.jsxs(e,{value:m,onChange:t,...n,children:[a.jsx(e.Item,{name:"rating-9",className:"mask mask-star"}),a.jsx(e.Item,{name:"rating-9",className:"mask mask-star"}),a.jsx(e.Item,{name:"rating-9",className:"mask mask-star"}),a.jsx(e.Item,{name:"rating-9",className:"mask mask-star"}),a.jsx(e.Item,{name:"rating-9",className:"mask mask-star"})]})};k.args={size:"lg",value:0};const u=({value:s,onChange:g,...n})=>{const[m,t]=r.useState(s);return r.useEffect(()=>{t(s)},[s]),a.jsxs(e,{value:m,onChange:t,...n,children:[a.jsx(e.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-1 bg-green-500"}),a.jsx(e.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-2 bg-green-500"}),a.jsx(e.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-1 bg-green-500"}),a.jsx(e.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-2 bg-green-500"}),a.jsx(e.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-1 bg-green-500"}),a.jsx(e.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-2 bg-green-500"}),a.jsx(e.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-1 bg-green-500"}),a.jsx(e.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-2 bg-green-500"}),a.jsx(e.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-1 bg-green-500"}),a.jsx(e.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-2 bg-green-500"})]})};u.args={size:"lg",half:!0,value:3};var x,j,v;i.parameters={...i.parameters,docs:{...(x=i.parameters)==null?void 0:x.docs,source:{originalSource:`({ + value, + onChange, + ...args +}) => { + const [rating, setRating] = useState(value); + + // For Storybook to update the value with the controls + useEffect(() => { + setRating(value); + }, [value]); + return + + + + + + ; +}`,...(v=(j=i.parameters)==null?void 0:j.docs)==null?void 0:v.source}}};var C,S,y;l.parameters={...l.parameters,docs:{...(C=l.parameters)==null?void 0:C.docs,source:{originalSource:`({ + value, + onChange, + ...args +}) => { + const [rating, setRating] = useState(value); + + // For Storybook to update the value with the controls + useEffect(() => { + setRating(value); + }, [value]); + return + + + + + + ; +}`,...(y=(S=l.parameters)==null?void 0:S.docs)==null?void 0:y.source}}};var _,E,w;o.parameters={...o.parameters,docs:{...(_=o.parameters)==null?void 0:_.docs,source:{originalSource:`({ + value, + onChange, + ...args +}) => { + const [rating, setRating] = useState(value); + + // For Storybook to update the value with the controls + useEffect(() => { + setRating(value); + }, [value]); + return + + + + + + ; +}`,...(w=(E=o.parameters)==null?void 0:E.docs)==null?void 0:w.source}}};var M,W,F;c.parameters={...c.parameters,docs:{...(M=c.parameters)==null?void 0:M.docs,source:{originalSource:`({ + value, + onChange, + ...args +}) => { + const [rating, setRating] = useState(value); + + // For Storybook to update the value with the controls + useEffect(() => { + setRating(value); + }, [value]); + return + + + + + + ; +}`,...(F=(W=c.parameters)==null?void 0:W.docs)==null?void 0:F.source}}};var H,q,V;k.parameters={...k.parameters,docs:{...(H=k.parameters)==null?void 0:H.docs,source:{originalSource:`({ + value, + onChange, + ...args +}) => { + const [rating, setRating] = useState(value); + + // For Storybook to update the value with the controls + useEffect(() => { + setRating(value); + }, [value]); + return + + + + + + ; +}`,...(V=(q=k.parameters)==null?void 0:q.docs)==null?void 0:V.source}}};var O,D,G;u.parameters={...u.parameters,docs:{...(O=u.parameters)==null?void 0:O.docs,source:{originalSource:`({ + value, + onChange, + ...args +}) => { + const [rating, setRating] = useState(value); + + // For Storybook to update the value with the controls + useEffect(() => { + setRating(value); + }, [value]); + return + + + + + + + + + + + + + + ; +}`,...(G=(D=u.parameters)==null?void 0:D.docs)==null?void 0:G.source}}};const X=["Default","MaskStart2WithWarningColor","MaskHeartWithMultipleColors","MaskStart2WithGreen500Color","RatingHidden","HalfStars"];export{i as Default,u as HalfStars,o as MaskHeartWithMultipleColors,c as MaskStart2WithGreen500Color,l as MaskStart2WithWarningColor,k as RatingHidden,X as __namedExportsOrder,U as default}; diff --git a/docs/assets/Rating.stories-a9fc7b36.js b/docs/assets/Rating.stories-a9fc7b36.js deleted file mode 100644 index 325c6eec..00000000 --- a/docs/assets/Rating.stories-a9fc7b36.js +++ /dev/null @@ -1,117 +0,0 @@ -import{j as e,t as L,a as i}from"./tw-merge-4486aaf0.js";import{R as N,r}from"./index-f46741a2.js";import{c as v}from"./clsx.m-1229b3e0.js";const f=({...s})=>e("input",{...s,type:"checkbox"}),$=f;try{f.displayName="RatingItem",f.__docgenInfo={description:"",displayName:"RatingItem",props:{}}}catch{}const p=N.forwardRef(({children:s,size:g,half:n,hidden:m,dataTheme:t,className:z,value:R,onChange:d,...A},B)=>{const b=L("rating",z,v({"rating-lg":g==="lg","rating-md":g==="md","rating-sm":g==="sm","rating-xs":g==="xs","rating-half":n,"rating-hidden":m||R===0}));return i("div",{"aria-label":"Rating",...A,ref:B,"data-theme":t,className:b,children:[R===0&&e($,{className:v(b,"hidden"),checked:!0,readOnly:!0}),N.Children.map(s,(J,I)=>{const K=J;return N.cloneElement(K,{key:I+R,checked:R===I+1,readOnly:d==null,onChange:()=>{d==null||d(I+1)}})})]})}),a=Object.assign(p,{Item:$});try{p.displayName="Rating",p.__docgenInfo={description:"",displayName:"Rating",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},half:{defaultValue:null,description:"",name:"half",required:!1,type:{name:"boolean"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"number"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"((newRating: number) => void)"}}}}}catch{}const X={title:"Data Input/Rating",component:a},l=({value:s,onChange:g,...n})=>{const[m,t]=r.useState(s);return r.useEffect(()=>{t(s)},[s]),i(a,{value:m,onChange:t,...n,children:[e(a.Item,{name:"rating-1",className:"mask mask-star"}),e(a.Item,{name:"rating-1",className:"mask mask-star"}),e(a.Item,{name:"rating-1",className:"mask mask-star"}),e(a.Item,{name:"rating-1",className:"mask mask-star"}),e(a.Item,{name:"rating-1",className:"mask mask-star"})]})};l.args={value:2};const o=({value:s,onChange:g,...n})=>{const[m,t]=r.useState(s);return r.useEffect(()=>{t(s)},[s]),i(a,{value:m,onChange:t,...n,children:[e(a.Item,{name:"rating-2",className:"mask mask-star-2 bg-orange-400"}),e(a.Item,{name:"rating-2",className:"mask mask-star-2 bg-orange-400"}),e(a.Item,{name:"rating-2",className:"mask mask-star-2 bg-orange-400"}),e(a.Item,{name:"rating-2",className:"mask mask-star-2 bg-orange-400"}),e(a.Item,{name:"rating-2",className:"mask mask-star-2 bg-orange-400"})]})};o.args={value:2};const c=({value:s,onChange:g,...n})=>{const[m,t]=r.useState(s);return r.useEffect(()=>{t(s)},[s]),i(a,{value:m,onChange:t,...n,children:[e(a.Item,{name:"rating-3",className:"mask mask-heart bg-red-400"}),e(a.Item,{name:"rating-3",className:"mask mask-heart bg-orange-400"}),e(a.Item,{name:"rating-3",className:"mask mask-heart bg-yellow-400"}),e(a.Item,{name:"rating-3",className:"mask mask-heart bg-lime-400"}),e(a.Item,{name:"rating-3",className:"mask mask-heart bg-green-400"})]})};c.args={value:2};const k=({value:s,onChange:g,...n})=>{const[m,t]=r.useState(s);return r.useEffect(()=>{t(s)},[s]),i(a,{value:m,onChange:t,...n,children:[e(a.Item,{name:"rating-4",className:"mask mask-star-2 bg-green-500"}),e(a.Item,{name:"rating-4",className:"mask mask-star-2 bg-green-500"}),e(a.Item,{name:"rating-4",className:"mask mask-star-2 bg-green-500"}),e(a.Item,{name:"rating-4",className:"mask mask-star-2 bg-green-500"}),e(a.Item,{name:"rating-4",className:"mask mask-star-2 bg-green-500"})]})};k.args={value:2};const u=({value:s,onChange:g,...n})=>{const[m,t]=r.useState(s);return r.useEffect(()=>{t(s)},[s]),i(a,{value:m,onChange:t,...n,children:[e(a.Item,{name:"rating-9",className:"mask mask-star"}),e(a.Item,{name:"rating-9",className:"mask mask-star"}),e(a.Item,{name:"rating-9",className:"mask mask-star"}),e(a.Item,{name:"rating-9",className:"mask mask-star"}),e(a.Item,{name:"rating-9",className:"mask mask-star"})]})};u.args={size:"lg",value:0};const h=({value:s,onChange:g,...n})=>{const[m,t]=r.useState(s);return r.useEffect(()=>{t(s)},[s]),i(a,{value:m,onChange:t,...n,children:[e(a.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-1 bg-green-500"}),e(a.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-2 bg-green-500"}),e(a.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-1 bg-green-500"}),e(a.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-2 bg-green-500"}),e(a.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-1 bg-green-500"}),e(a.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-2 bg-green-500"}),e(a.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-1 bg-green-500"}),e(a.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-2 bg-green-500"}),e(a.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-1 bg-green-500"}),e(a.Item,{name:"rating-10",className:"mask mask-star-2 mask-half-2 bg-green-500"})]})};h.args={size:"lg",half:!0,value:3};var C,S,y;l.parameters={...l.parameters,docs:{...(C=l.parameters)==null?void 0:C.docs,source:{originalSource:`({ - value, - onChange, - ...args -}) => { - const [rating, setRating] = useState(value); - - // For Storybook to update the value with the controls - useEffect(() => { - setRating(value); - }, [value]); - return - - - - - - ; -}`,...(y=(S=l.parameters)==null?void 0:S.docs)==null?void 0:y.source}}};var _,E,w;o.parameters={...o.parameters,docs:{...(_=o.parameters)==null?void 0:_.docs,source:{originalSource:`({ - value, - onChange, - ...args -}) => { - const [rating, setRating] = useState(value); - - // For Storybook to update the value with the controls - useEffect(() => { - setRating(value); - }, [value]); - return - - - - - - ; -}`,...(w=(E=o.parameters)==null?void 0:E.docs)==null?void 0:w.source}}};var M,x,W;c.parameters={...c.parameters,docs:{...(M=c.parameters)==null?void 0:M.docs,source:{originalSource:`({ - value, - onChange, - ...args -}) => { - const [rating, setRating] = useState(value); - - // For Storybook to update the value with the controls - useEffect(() => { - setRating(value); - }, [value]); - return - - - - - - ; -}`,...(W=(x=c.parameters)==null?void 0:x.docs)==null?void 0:W.source}}};var F,H,q;k.parameters={...k.parameters,docs:{...(F=k.parameters)==null?void 0:F.docs,source:{originalSource:`({ - value, - onChange, - ...args -}) => { - const [rating, setRating] = useState(value); - - // For Storybook to update the value with the controls - useEffect(() => { - setRating(value); - }, [value]); - return - - - - - - ; -}`,...(q=(H=k.parameters)==null?void 0:H.docs)==null?void 0:q.source}}};var V,j,O;u.parameters={...u.parameters,docs:{...(V=u.parameters)==null?void 0:V.docs,source:{originalSource:`({ - value, - onChange, - ...args -}) => { - const [rating, setRating] = useState(value); - - // For Storybook to update the value with the controls - useEffect(() => { - setRating(value); - }, [value]); - return - - - - - - ; -}`,...(O=(j=u.parameters)==null?void 0:j.docs)==null?void 0:O.source}}};var D,G,T;h.parameters={...h.parameters,docs:{...(D=h.parameters)==null?void 0:D.docs,source:{originalSource:`({ - value, - onChange, - ...args -}) => { - const [rating, setRating] = useState(value); - - // For Storybook to update the value with the controls - useEffect(() => { - setRating(value); - }, [value]); - return - - - - - - - - - - - - - - ; -}`,...(T=(G=h.parameters)==null?void 0:G.docs)==null?void 0:T.source}}};const Y=["Default","MaskStart2WithWarningColor","MaskHeartWithMultipleColors","MaskStart2WithGreen500Color","RatingHidden","HalfStars"];export{l as Default,h as HalfStars,c as MaskHeartWithMultipleColors,k as MaskStart2WithGreen500Color,o as MaskStart2WithWarningColor,u as RatingHidden,Y as __namedExportsOrder,X as default}; diff --git a/docs/assets/Select.stories-1015e6f6.js b/docs/assets/Select.stories-1015e6f6.js deleted file mode 100644 index de765034..00000000 --- a/docs/assets/Select.stories-1015e6f6.js +++ /dev/null @@ -1,38 +0,0 @@ -import{j as e,a as l}from"./tw-merge-4486aaf0.js";import{r as h}from"./index-f46741a2.js";import{S as r}from"./index-3ff73cf5.js";import"./clsx.m-1229b3e0.js";const{Option:a}=r,S={title:"Data Input/Select",component:r,parameters:{controls:{exclude:["ref"]}},args:{className:"w-full max-w-xs",disabled:!1}},t=s=>{const[m,f]=h.useState("default");return e("div",{className:"flex w-full component-preview p-4 items-center justify-center gap-2 font-sans",children:l(r,{...s,value:m,onChange:v=>f(v.target.value),children:[e(a,{value:"default",disabled:!0,children:"Pick your favorite Simpson"}),e(a,{value:"Homer",children:"Homer"}),e(a,{value:"Marge",children:"Marge"}),e(a,{value:"Bart",children:"Bart"}),e(a,{value:"Lisa",children:"Lisa"}),e(a,{value:"Maggie",children:"Maggie"})]})})},n=s=>e("div",{className:"flex w-full component-preview p-4 items-center justify-center gap-2 font-sans",children:l("div",{className:"form-control w-full max-w-xs",children:[l("label",{className:"label",children:[e("span",{className:"label-text",children:"Pick the best fantasy franchise"}),e("span",{className:"label-text-alt",children:"Alt label"})]}),l(r,{defaultValue:"default",onChange:console.log,...s,children:[e(a,{value:"default",disabled:!0,children:"Pick one"}),e(a,{value:"Star Wars",children:"Star Wars"}),e(a,{value:"Harry Potter",children:"Harry Potter"}),e(a,{value:"Lord of the Rings",children:"Lord of the Rings"}),e(a,{value:"Planet of the Apes",children:"Planet of the Apes"}),e(a,{value:"Star Trek",children:"Star Trek"})]}),l("label",{className:"label",children:[e("span",{className:"label-text-alt",children:"Alt label"}),e("span",{className:"label-text-alt",children:"Alt label"})]})]})});var o,i,c;t.parameters={...t.parameters,docs:{...(o=t.parameters)==null?void 0:o.docs,source:{originalSource:`args => { - const [value, setValue] = useState('default'); - return
    - -
    ; -}`,...(c=(i=t.parameters)==null?void 0:i.docs)==null?void 0:c.source}}};var p,u,d;n.parameters={...n.parameters,docs:{...(p=n.parameters)==null?void 0:p.docs,source:{originalSource:`args => { - return
    -
    - - - -
    -
    ; -}`,...(d=(u=n.parameters)==null?void 0:u.docs)==null?void 0:d.source}}};const N=["Default","FormControlAndLabels"];export{t as Default,n as FormControlAndLabels,N as __namedExportsOrder,S as default}; diff --git a/docs/assets/Select.stories-CkXHoJz4.js b/docs/assets/Select.stories-CkXHoJz4.js new file mode 100644 index 00000000..db81b986 --- /dev/null +++ b/docs/assets/Select.stories-CkXHoJz4.js @@ -0,0 +1,38 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{r as v}from"./iframe-DDnXVYpC.js";import{S as s}from"./index-Bew10GTu.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";const{Option:a}=s,O={title:"Data Input/Select",component:s,parameters:{controls:{exclude:["ref"]}},args:{className:"w-full max-w-xs",disabled:!1}},l=r=>{const[d,m]=v.useState("default");return e.jsx("div",{className:"flex w-full component-preview p-4 items-center justify-center gap-2 font-sans",children:e.jsxs(s,{...r,value:d,onChange:f=>m(f.target.value),children:[e.jsx(a,{value:"default",disabled:!0,children:"Pick your favorite Simpson"}),e.jsx(a,{value:"Homer",children:"Homer"}),e.jsx(a,{value:"Marge",children:"Marge"}),e.jsx(a,{value:"Bart",children:"Bart"}),e.jsx(a,{value:"Lisa",children:"Lisa"}),e.jsx(a,{value:"Maggie",children:"Maggie"})]})})},t=r=>e.jsx("div",{className:"flex w-full component-preview p-4 items-center justify-center gap-2 font-sans",children:e.jsxs("div",{className:"form-control w-full max-w-xs",children:[e.jsxs("label",{className:"label",children:[e.jsx("span",{className:"label-text",children:"Pick the best fantasy franchise"}),e.jsx("span",{className:"label-text-alt",children:"Alt label"})]}),e.jsxs(s,{defaultValue:"default",onChange:console.log,...r,children:[e.jsx(a,{value:"default",disabled:!0,children:"Pick one"}),e.jsx(a,{value:"Star Wars",children:"Star Wars"}),e.jsx(a,{value:"Harry Potter",children:"Harry Potter"}),e.jsx(a,{value:"Lord of the Rings",children:"Lord of the Rings"}),e.jsx(a,{value:"Planet of the Apes",children:"Planet of the Apes"}),e.jsx(a,{value:"Star Trek",children:"Star Trek"})]}),e.jsxs("label",{className:"label",children:[e.jsx("span",{className:"label-text-alt",children:"Alt label"}),e.jsx("span",{className:"label-text-alt",children:"Alt label"})]})]})});var n,o,i;l.parameters={...l.parameters,docs:{...(n=l.parameters)==null?void 0:n.docs,source:{originalSource:`args => { + const [value, setValue] = useState('default'); + return
    + +
    ; +}`,...(i=(o=l.parameters)==null?void 0:o.docs)==null?void 0:i.source}}};var c,p,u;t.parameters={...t.parameters,docs:{...(c=t.parameters)==null?void 0:c.docs,source:{originalSource:`args => { + return
    +
    + + + +
    +
    ; +}`,...(u=(p=t.parameters)==null?void 0:p.docs)==null?void 0:u.source}}};const S=["Default","FormControlAndLabels"];export{l as Default,t as FormControlAndLabels,S as __namedExportsOrder,O as default}; diff --git a/docs/assets/Skeleton.stories-5010174e.js b/docs/assets/Skeleton.stories-5010174e.js deleted file mode 100644 index 8e7206a3..00000000 --- a/docs/assets/Skeleton.stories-5010174e.js +++ /dev/null @@ -1,25 +0,0 @@ -import{t as v,j as e,a as r}from"./tw-merge-4486aaf0.js";import{r as _}from"./index-f46741a2.js";import{c as y}from"./clsx.m-1229b3e0.js";const o=_.forwardRef(({dataTheme:s,className:k,children:S,...w},x)=>{const g=v("skeleton",y({}),k);return e("div",{...w,"data-theme":s,className:g,ref:x,children:S})});o.displayName="Skeleton";const a=o;try{o.displayName="Skeleton",o.__docgenInfo={description:"",displayName:"Skeleton",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const j={title:"Feedback/Skeleton",component:a,parameters:{controls:{expanded:!0}}},l=s=>e(a,{...s});l.args={className:"w-32 h-32"};const t=({dataTheme:s})=>r("div",{className:"flex flex-col gap-4 w-52","data-theme":s,children:[r("div",{className:"flex gap-4 items-center",children:[e(a,{className:"w-16 h-16 rounded-full shrink-0"}),r("div",{className:"flex flex-col gap-4",children:[e(a,{className:"h-4 w-20"}),e(a,{className:"h-4 w-28"})]})]}),e(a,{className:"h-32 w-full"})]}),n=({dataTheme:s})=>r("div",{className:"flex flex-col gap-4 w-52","data-theme":s,children:[e(a,{className:"h-32 w-full"}),e(a,{className:"h-4 w-28"}),e(a,{className:"h-4 w-full"}),e(a,{className:"h-4 w-full"})]});var c,m,d;l.parameters={...l.parameters,docs:{...(c=l.parameters)==null?void 0:c.docs,source:{originalSource:`args => { - return ; -}`,...(d=(m=l.parameters)==null?void 0:m.docs)==null?void 0:d.source}}};var i,h,p;t.parameters={...t.parameters,docs:{...(i=t.parameters)==null?void 0:i.docs,source:{originalSource:`({ - dataTheme -}) => { - return
    -
    - -
    - - -
    -
    - -
    ; -}`,...(p=(h=t.parameters)==null?void 0:h.docs)==null?void 0:p.source}}};var u,f,N;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`({ - dataTheme -}) => { - return
    - - - - -
    ; -}`,...(N=(f=n.parameters)==null?void 0:f.docs)==null?void 0:N.source}}};const R=["Default","CircleWithContent","RectangleWithContent"];export{t as CircleWithContent,l as Default,n as RectangleWithContent,R as __namedExportsOrder,j as default}; diff --git a/docs/assets/Skeleton.stories-DzXgw13V.js b/docs/assets/Skeleton.stories-DzXgw13V.js new file mode 100644 index 00000000..84014da9 --- /dev/null +++ b/docs/assets/Skeleton.stories-DzXgw13V.js @@ -0,0 +1,25 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{r as w}from"./iframe-DDnXVYpC.js";import{c as g}from"./clsx-B-dksMZM.js";import{t as j}from"./bundle-mjs-yGZq-iow.js";const a=w.forwardRef(({dataTheme:s,className:f,children:x,...N},k)=>{const S=j("skeleton",g({}),f);return e.jsx("div",{...N,"data-theme":s,className:S,ref:k,children:x})});a.displayName="Skeleton";try{a.displayName="Skeleton",a.__docgenInfo={description:"",displayName:"Skeleton",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const T={title:"Feedback/Skeleton",component:a,parameters:{controls:{expanded:!0}}},l=s=>e.jsx(a,{...s});l.args={className:"w-32 h-32"};const t=({dataTheme:s})=>e.jsxs("div",{className:"flex flex-col gap-4 w-52","data-theme":s,children:[e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsx(a,{className:"w-16 h-16 rounded-full shrink-0"}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(a,{className:"h-4 w-20"}),e.jsx(a,{className:"h-4 w-28"})]})]}),e.jsx(a,{className:"h-32 w-full"})]}),r=({dataTheme:s})=>e.jsxs("div",{className:"flex flex-col gap-4 w-52","data-theme":s,children:[e.jsx(a,{className:"h-32 w-full"}),e.jsx(a,{className:"h-4 w-28"}),e.jsx(a,{className:"h-4 w-full"}),e.jsx(a,{className:"h-4 w-full"})]});var n,o,c;l.parameters={...l.parameters,docs:{...(n=l.parameters)==null?void 0:n.docs,source:{originalSource:`args => { + return ; +}`,...(c=(o=l.parameters)==null?void 0:o.docs)==null?void 0:c.source}}};var m,d,i;t.parameters={...t.parameters,docs:{...(m=t.parameters)==null?void 0:m.docs,source:{originalSource:`({ + dataTheme +}) => { + return
    +
    + +
    + + +
    +
    + +
    ; +}`,...(i=(d=t.parameters)==null?void 0:d.docs)==null?void 0:i.source}}};var p,h,u;r.parameters={...r.parameters,docs:{...(p=r.parameters)==null?void 0:p.docs,source:{originalSource:`({ + dataTheme +}) => { + return
    + + + + +
    ; +}`,...(u=(h=r.parameters)==null?void 0:h.docs)==null?void 0:u.source}}};const R=["Default","CircleWithContent","RectangleWithContent"];export{t as CircleWithContent,l as Default,r as RectangleWithContent,R as __namedExportsOrder,T as default}; diff --git a/docs/assets/Stack.stories-7a943654.js b/docs/assets/Stack.stories-7a943654.js deleted file mode 100644 index 39e7e131..00000000 --- a/docs/assets/Stack.stories-7a943654.js +++ /dev/null @@ -1,64 +0,0 @@ -import{t as A,j as e,a as t}from"./tw-merge-4486aaf0.js";import{r as W}from"./index-f46741a2.js";import{C as a}from"./index-92e1ed70.js";import"./clsx.m-1229b3e0.js";const m=W.forwardRef(({dataTheme:r,className:T,children:v,..._},I)=>{const Y=A("stack",T);return e("div",{"aria-label":"Stack",..._,ref:I,"data-theme":r,className:Y,children:v})});m.displayName="Stack";const s=m;try{m.displayName="Stack",m.__docgenInfo={description:"",displayName:"Stack",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const L={title:"Layout/Stack",component:s},d=r=>t(s,{...r,children:[e("div",{className:"grid w-32 h-20 rounded bg-primary text-primary-content place-content-center",children:"1"}),e("div",{className:"grid w-32 h-20 rounded bg-accent text-accent-content place-content-center",children:"2"}),e("div",{className:"grid w-32 h-20 rounded bg-secondary text-secondary-content place-content-center",children:"3"})]}),n=r=>t(s,{...r,children:[e("img",{src:"https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp",alt:"Image 1",className:"rounded"}),e("img",{src:"https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp",alt:"Image 2",className:"rounded"}),e("img",{src:"https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp",alt:"Image 3",className:"rounded"})]}),c=r=>t(s,{...r,children:[e(a,{className:"text-center border border-base-content w-36 bg-base-100",children:e(a.Body,{children:"A"})}),e(a,{className:"text-center border border-base-content w-36 bg-base-100",children:e(a.Body,{children:"B"})}),e(a,{className:"text-center border border-base-content w-36 bg-base-100",children:e(a.Body,{children:"C"})})]}),o=r=>t(s,{...r,children:[e(a,{className:"text-center shadow-md w-36 bg-base-200",children:e(a.Body,{children:"A"})}),e(a,{className:"text-center shadow-md w-36 bg-base-200",children:e(a.Body,{children:"B"})}),e(a,{className:"text-center shadow-md w-36 bg-base-200",children:e(a.Body,{children:"C"})})]}),i=r=>t(s,{...r,children:[e(a,{className:"text-center shadow-md bg-primary text-primary-content",children:t(a.Body,{children:[e(a.Title,{children:"Notification 1"}),e("p",{children:"You have 3 unread messages. Tap here to see."})]})}),e(a,{className:"text-center shadow-md bg-primary text-primary-content",children:t(a.Body,{children:[e(a.Title,{children:"Notification 2"}),e("p",{children:"You have 3 unread messages. Tap here to see."})]})}),e(a,{className:"text-center shadow-md bg-primary text-primary-content",children:t(a.Body,{children:[e(a.Title,{children:"Notification 3"}),e("p",{children:"You have 3 unread messages. Tap here to see."})]})})]});d.args={};var l,p,h;d.parameters={...d.parameters,docs:{...(l=d.parameters)==null?void 0:l.docs,source:{originalSource:`args => { - return -
    - 1 -
    -
    - 2 -
    -
    - 3 -
    -
    ; -}`,...(h=(p=d.parameters)==null?void 0:p.docs)==null?void 0:h.source}}};var g,b,u;n.parameters={...n.parameters,docs:{...(g=n.parameters)==null?void 0:g.docs,source:{originalSource:`args => { - return - Image 1 - Image 2 - Image 3 - ; -}`,...(u=(b=n.parameters)==null?void 0:b.docs)==null?void 0:u.source}}};var y,C,w;c.parameters={...c.parameters,docs:{...(y=c.parameters)==null?void 0:y.docs,source:{originalSource:`args => { - return - - A - - - B - - - C - - ; -}`,...(w=(C=c.parameters)==null?void 0:C.docs)==null?void 0:w.source}}};var N,x,k;o.parameters={...o.parameters,docs:{...(N=o.parameters)==null?void 0:N.docs,source:{originalSource:`args => { - return - - A - - - B - - - C - - ; -}`,...(k=(x=o.parameters)==null?void 0:x.docs)==null?void 0:k.source}}};var B,S,f;i.parameters={...i.parameters,docs:{...(B=i.parameters)==null?void 0:B.docs,source:{originalSource:`args => { - return - - - Notification 1 -

    You have 3 unread messages. Tap here to see.

    -
    -
    - - - Notification 2 -

    You have 3 unread messages. Tap here to see.

    -
    -
    - - - Notification 3 -

    You have 3 unread messages. Tap here to see.

    -
    -
    -
    ; -}`,...(f=(S=i.parameters)==null?void 0:S.docs)==null?void 0:f.source}}};const M=["Default","StackedImages","StackedCardsWithBorder","StackedCardsWithShadow","StackedCards"];export{d as Default,i as StackedCards,c as StackedCardsWithBorder,o as StackedCardsWithShadow,n as StackedImages,M as __namedExportsOrder,L as default}; diff --git a/docs/assets/Stack.stories-CXDPkctp.js b/docs/assets/Stack.stories-CXDPkctp.js new file mode 100644 index 00000000..0a394f82 --- /dev/null +++ b/docs/assets/Stack.stories-CXDPkctp.js @@ -0,0 +1,64 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{r as I}from"./iframe-DDnXVYpC.js";import{c as Y}from"./clsx-B-dksMZM.js";import{t as A}from"./bundle-mjs-yGZq-iow.js";import{C as a}from"./index-DIaYqioD.js";const t=I.forwardRef(({position:r="bottom",dataTheme:B,className:S,children:f,...v},T)=>{const _=A("stack",S,Y({"stack-end":r==="end","stack-start":r==="start","stack-top":r==="top","stack-bottom":r==="bottom"}));return e.jsx("div",{"aria-label":"Stack",...v,ref:T,"data-theme":B,className:_,children:f})});t.displayName="Stack";try{t.displayName="Stack",t.__docgenInfo={description:"",displayName:"Stack",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},position:{defaultValue:{value:"bottom"},description:"",name:"position",required:!1,type:{name:"enum",value:[{value:'"start"'},{value:'"end"'},{value:'"top"'},{value:'"bottom"'}]}}}}}catch{}const V={title:"Layout/Stack",component:t},s=r=>e.jsxs(t,{...r,children:[e.jsx("div",{className:"grid w-32 h-20 rounded bg-primary text-primary-content place-content-center",children:"1"}),e.jsx("div",{className:"grid w-32 h-20 rounded bg-accent text-accent-content place-content-center",children:"2"}),e.jsx("div",{className:"grid w-32 h-20 rounded bg-secondary text-secondary-content place-content-center",children:"3"})]}),d=r=>e.jsxs(t,{...r,children:[e.jsx("img",{src:"https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp",alt:"Image 1",className:"rounded"}),e.jsx("img",{src:"https://img.daisyui.com/images/stock/photo-1565098772267-60af42b81ef2.webp",alt:"Image 2",className:"rounded"}),e.jsx("img",{src:"https://img.daisyui.com/images/stock/photo-1572635148818-ef6fd45eb394.webp",alt:"Image 3",className:"rounded"})]}),n=r=>e.jsxs(t,{...r,children:[e.jsx(a,{className:"text-center border border-base-content w-36 bg-base-100",children:e.jsx(a.Body,{children:"A"})}),e.jsx(a,{className:"text-center border border-base-content w-36 bg-base-100",children:e.jsx(a.Body,{children:"B"})}),e.jsx(a,{className:"text-center border border-base-content w-36 bg-base-100",children:e.jsx(a.Body,{children:"C"})})]}),c=r=>e.jsxs(t,{...r,children:[e.jsx(a,{className:"text-center shadow-md w-36 bg-base-200",children:e.jsx(a.Body,{children:"A"})}),e.jsx(a,{className:"text-center shadow-md w-36 bg-base-200",children:e.jsx(a.Body,{children:"B"})}),e.jsx(a,{className:"text-center shadow-md w-36 bg-base-200",children:e.jsx(a.Body,{children:"C"})})]}),o=r=>e.jsxs(t,{...r,children:[e.jsx(a,{className:"text-center shadow-md bg-primary text-primary-content",children:e.jsxs(a.Body,{children:[e.jsx(a.Title,{children:"Notification 1"}),e.jsx("p",{children:"You have 3 unread messages. Tap here to see."})]})}),e.jsx(a,{className:"text-center shadow-md bg-primary text-primary-content",children:e.jsxs(a.Body,{children:[e.jsx(a.Title,{children:"Notification 2"}),e.jsx("p",{children:"You have 3 unread messages. Tap here to see."})]})}),e.jsx(a,{className:"text-center shadow-md bg-primary text-primary-content",children:e.jsxs(a.Body,{children:[e.jsx(a.Title,{children:"Notification 3"}),e.jsx("p",{children:"You have 3 unread messages. Tap here to see."})]})})]});s.args={};var i,m,l;s.parameters={...s.parameters,docs:{...(i=s.parameters)==null?void 0:i.docs,source:{originalSource:`args => { + return +
    + 1 +
    +
    + 2 +
    +
    + 3 +
    +
    ; +}`,...(l=(m=s.parameters)==null?void 0:m.docs)==null?void 0:l.source}}};var p,h,g;d.parameters={...d.parameters,docs:{...(p=d.parameters)==null?void 0:p.docs,source:{originalSource:`args => { + return + Image 1 + Image 2 + Image 3 + ; +}`,...(g=(h=d.parameters)==null?void 0:h.docs)==null?void 0:g.source}}};var u,b,x;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`args => { + return + + A + + + B + + + C + + ; +}`,...(x=(b=n.parameters)==null?void 0:b.docs)==null?void 0:x.source}}};var y,C,w;c.parameters={...c.parameters,docs:{...(y=c.parameters)==null?void 0:y.docs,source:{originalSource:`args => { + return + + A + + + B + + + C + + ; +}`,...(w=(C=c.parameters)==null?void 0:C.docs)==null?void 0:w.source}}};var N,j,k;o.parameters={...o.parameters,docs:{...(N=o.parameters)==null?void 0:N.docs,source:{originalSource:`args => { + return + + + Notification 1 +

    You have 3 unread messages. Tap here to see.

    +
    +
    + + + Notification 2 +

    You have 3 unread messages. Tap here to see.

    +
    +
    + + + Notification 3 +

    You have 3 unread messages. Tap here to see.

    +
    +
    +
    ; +}`,...(k=(j=o.parameters)==null?void 0:j.docs)==null?void 0:k.source}}};const L=["Default","StackedImages","StackedCardsWithBorder","StackedCardsWithShadow","StackedCards"];export{s as Default,o as StackedCards,n as StackedCardsWithBorder,c as StackedCardsWithShadow,d as StackedImages,L as __namedExportsOrder,V as default}; diff --git a/docs/assets/Stats.stories-2c14a0e7.js b/docs/assets/Stats.stories-2c14a0e7.js deleted file mode 100644 index ce0cd8bc..00000000 --- a/docs/assets/Stats.stories-2c14a0e7.js +++ /dev/null @@ -1,129 +0,0 @@ -import{t as T,j as a,a as s}from"./tw-merge-4486aaf0.js";import{R as r,r as q}from"./index-f46741a2.js";import{c as K}from"./clsx.m-1229b3e0.js";import{A as $}from"./index-e7261937.js";import{B as w}from"./Button-e31631bb.js";import"./utils-ae2eb491.js";import"./index-8d7e61f2.js";const N=r.forwardRef(({children:e,section:n,className:l,...c},i)=>{const g=T(l,K({"stat-title":n==="title","stat-value":n==="value","stat-desc":n==="desc","stat-figure":n==="figure","stat-actions":n==="actions"}));return a("div",{...c,className:g,ref:i,children:e})}),o=N;try{N.displayName="StatSection",N.__docgenInfo={description:"",displayName:"StatSection",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},section:{defaultValue:null,description:"",name:"section",required:!0,type:{name:"enum",value:[{value:'"title"'},{value:'"figure"'},{value:'"desc"'},{value:'"value"'},{value:'"actions"'}]}}}}}catch{}const f=q.forwardRef(({dataTheme:e,className:n,...l},c)=>{const i=T("stat",n);return a("div",{...l,"data-theme":e,className:i,ref:c})}),J=r.forwardRef((e,n)=>a(o,{...e,section:"title",ref:n})),U=r.forwardRef((e,n)=>a(o,{...e,section:"value",ref:n})),O=r.forwardRef((e,n)=>a(o,{...e,section:"desc",ref:n})),P=r.forwardRef((e,n)=>a(o,{...e,section:"figure",ref:n})),G=r.forwardRef((e,n)=>a(o,{...e,section:"actions",ref:n})),H=Object.assign(f,{Title:J,Value:U,Desc:O,Figure:P,Actions:G});try{f.displayName="Stat",f.__docgenInfo={description:"",displayName:"Stat",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const V=r.forwardRef(({direction:e="horizontal",dataTheme:n,className:l,children:c,...i},g)=>{const W=T("stats",l,K({"stats-vertical":e==="vertical","stats-horizontal":e==="horizontal"}));return a("div",{...i,ref:g,"data-theme":n,className:W,children:c})}),t=Object.assign(V,{Stat:H});try{V.displayName="Stats",V.__docgenInfo={description:"",displayName:"Stats",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},direction:{defaultValue:{value:"horizontal"},description:"",name:"direction",required:!1,type:{name:"enum",value:[{value:'"vertical"'},{value:'"horizontal"'}]}}}}}catch{}try{t.displayName="Stats",t.__docgenInfo={description:"",displayName:"Stats",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},direction:{defaultValue:{value:"horizontal"},description:"",name:"direction",required:!1,type:{name:"enum",value:[{value:'"vertical"'},{value:'"horizontal"'}]}}}}}catch{}const st={title:"Data Display/Stats",component:t},d=e=>a(t,{...e,className:"shadow",children:s(t.Stat,{children:[a(t.Stat.Title,{children:"Total Page Views"}),a(t.Stat.Value,{children:"89,400"}),a(t.Stat.Desc,{children:"21% more than last month"})]})}),u=e=>s(t,{...e,className:"shadow font-sans",children:[s(t.Stat,{children:[a(t.Stat.Figure,{className:"text-primary",children:a("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-8 h-8 stroke-current",children:a("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"})})}),a(t.Stat.Title,{children:"Total Likes"}),a(t.Stat.Value,{className:"text-primary",children:"25.6K"}),a(t.Stat.Desc,{children:"21% more than last month"})]}),s(t.Stat,{children:[a(t.Stat.Figure,{className:"text-secondary",children:a("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-8 h-8 stroke-current",children:a("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),a(t.Stat.Title,{children:"Page Views"}),a(t.Stat.Value,{className:"text-secondary",children:"2.6M"}),a(t.Stat.Desc,{children:"21% more than last month"})]}),s(t.Stat,{children:[a(t.Stat.Figure,{className:"text-primary",children:a("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-8 h-8 stroke-current",children:a("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"})})}),a(t.Stat.Figure,{className:"text-secondary",children:a($,{size:"sm",online:!0,src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp",shape:"circle"})}),a(t.Stat.Value,{children:"86%"}),a(t.Stat.Title,{children:"Tasks done"}),a(t.Stat.Desc,{className:"text-secondary",children:"31 tasks remaining"})]})]}),m=e=>s(t,{...e,className:"shadow font-sans",children:[s(t.Stat,{className:"place-items-center",children:[a(t.Stat.Title,{children:"Downloads"}),a(t.Stat.Value,{children:"31K"}),a(t.Stat.Desc,{children:"From January 1st to February 1st"})]}),s(t.Stat,{className:"place-items-center",children:[a(t.Stat.Title,{children:"Users"}),a(t.Stat.Value,{className:"text-secondary",children:"4,200"}),a(t.Stat.Desc,{className:"text-secondary",children:"↗︎ 40 (2%)"})]}),s(t.Stat,{className:"place-items-center",children:[a(t.Stat.Title,{children:"New Registers"}),a(t.Stat.Value,{children:"1,200"}),a(t.Stat.Desc,{children:"↘︎ 90 (14%)"})]})]}),S=e=>s(t,{...e,className:"shadow font-sans",children:[s(t.Stat,{children:[a(t.Stat.Title,{children:"Downloads"}),a(t.Stat.Value,{children:"31K"}),a(t.Stat.Desc,{children:"Jan 1st - Feb 1st"})]}),s(t.Stat,{children:[a(t.Stat.Title,{children:"New Users"}),a(t.Stat.Value,{children:"4,200"}),a(t.Stat.Desc,{children:"↗︎ 400 (22%)"})]}),s(t.Stat,{children:[a(t.Stat.Title,{children:"New Registers"}),a(t.Stat.Value,{children:"1,200"}),a(t.Stat.Desc,{children:"↘︎ 90 (14%)"})]})]});S.args={direction:"vertical"};const h=e=>s(t,{...e,className:"lg:stats-horizontal shadow",children:[s(t.Stat,{children:[a(t.Stat.Title,{children:"Downloads"}),a(t.Stat.Value,{children:"31K"}),a(t.Stat.Desc,{children:"Jan 1st - Feb 1st"})]}),s(t.Stat,{children:[a(t.Stat.Title,{children:"New Users"}),a(t.Stat.Value,{children:"4,200"}),a(t.Stat.Desc,{children:"↗︎ 400 (22%)"})]}),s(t.Stat,{children:[a(t.Stat.Title,{children:"New Registers"}),a(t.Stat.Value,{children:"1,200"}),a(t.Stat.Desc,{children:"↘︎ 90 (14%)"})]})]}),p=e=>s(t,{...e,className:"font-sans bg-primary text-primary-content",children:[s(t.Stat,{children:[a(t.Stat.Title,{children:"Account balance"}),a(t.Stat.Value,{children:"$89,400"}),a(t.Stat.Actions,{children:a(w,{size:"sm",color:"success",children:"Add funds"})})]}),s(t.Stat,{children:[a(t.Stat.Title,{children:"Current balance"}),a(t.Stat.Value,{children:"$89,400"}),s(t.Stat.Actions,{className:"gap-1 flex",children:[a(w,{size:"sm",children:"Withdrawal"}),a(w,{size:"sm",children:"deposit"})]})]})]});var v,y,D;d.parameters={...d.parameters,docs:{...(v=d.parameters)==null?void 0:v.docs,source:{originalSource:`args => { - return - - Total Page Views - 89,400 - 21% more than last month - - ; -}`,...(D=(y=d.parameters)==null?void 0:y.docs)==null?void 0:D.source}}};var x,k,_;u.parameters={...u.parameters,docs:{...(x=u.parameters)==null?void 0:x.docs,source:{originalSource:`args => { - return - - - - - - - Total Likes - 25.6K - 21% more than last month - - - - - - - - - Page Views - 2.6M - 21% more than last month - - - - - - - - - - - - 86% - Tasks done - - 31 tasks remaining - - - ; -}`,...(_=(k=u.parameters)==null?void 0:k.docs)==null?void 0:_.source}}};var F,b,L;m.parameters={...m.parameters,docs:{...(F=m.parameters)==null?void 0:F.docs,source:{originalSource:`args => { - return - - Downloads - 31K - From January 1st to February 1st - - - - Users - 4,200 - ↗︎ 40 (2%) - - - - New Registers - 1,200 - ↘︎ 90 (14%) - - ; -}`,...(L=(b=m.parameters)==null?void 0:b.docs)==null?void 0:L.source}}};var z,A,R;S.parameters={...S.parameters,docs:{...(z=S.parameters)==null?void 0:z.docs,source:{originalSource:`args => { - return - - Downloads - 31K - Jan 1st - Feb 1st - - - - New Users - 4,200 - ↗︎ 400 (22%) - - - - New Registers - 1,200 - ↘︎ 90 (14%) - - ; -}`,...(R=(A=S.parameters)==null?void 0:A.docs)==null?void 0:R.source}}};var B,E,j;h.parameters={...h.parameters,docs:{...(B=h.parameters)==null?void 0:B.docs,source:{originalSource:`args => { - return - - Downloads - 31K - Jan 1st - Feb 1st - - - - New Users - 4,200 - ↗︎ 400 (22%) - - - - New Registers - 1,200 - ↘︎ 90 (14%) - - ; -}`,...(j=(E=h.parameters)==null?void 0:E.docs)==null?void 0:j.source}}};var I,M,C;p.parameters={...p.parameters,docs:{...(I=p.parameters)==null?void 0:I.docs,source:{originalSource:`args => { - return - - Account balance - $89,400 - - - - - - Current balance - $89,400 - - - - - - ; -}`,...(C=(M=p.parameters)==null?void 0:M.docs)==null?void 0:C.source}}};const nt=["Default","IconsOrImage","CenteredItems","Vertical","Responsive","CustomColorsAndButton"];export{m as CenteredItems,p as CustomColorsAndButton,d as Default,u as IconsOrImage,h as Responsive,S as Vertical,nt as __namedExportsOrder,st as default}; diff --git a/docs/assets/Stats.stories-C1uOrHb4.js b/docs/assets/Stats.stories-C1uOrHb4.js new file mode 100644 index 00000000..fb17183c --- /dev/null +++ b/docs/assets/Stats.stories-C1uOrHb4.js @@ -0,0 +1,129 @@ +import{j as t}from"./jsx-runtime-BjG_zV1W.js";import{e as r,r as W}from"./iframe-DDnXVYpC.js";import{c as C}from"./clsx-B-dksMZM.js";import{t as w}from"./bundle-mjs-yGZq-iow.js";import{A as q}from"./index-Dsnv3XI8.js";import{B as x}from"./Button-GtH5nISf.js";import"./utils-BvopOSUb.js";import"./index-Dl-l57lR.js";const n=r.forwardRef(({children:s,section:e,className:l,...c},i)=>{const p=w(l,C({"stat-title":e==="title","stat-value":e==="value","stat-desc":e==="desc","stat-figure":e==="figure","stat-actions":e==="actions"}));return t.jsx("div",{...c,className:p,ref:i,children:s})});try{n.displayName="StatSection",n.__docgenInfo={description:"",displayName:"StatSection",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},section:{defaultValue:null,description:"",name:"section",required:!0,type:{name:"enum",value:[{value:'"title"'},{value:'"figure"'},{value:'"value"'},{value:'"desc"'},{value:'"actions"'}]}}}}}catch{}const j=W.forwardRef(({dataTheme:s,className:e,...l},c)=>{const i=w("stat",e);return t.jsx("div",{...l,"data-theme":s,className:i,ref:c})}),J=r.forwardRef((s,e)=>t.jsx(n,{...s,section:"title",ref:e})),U=r.forwardRef((s,e)=>t.jsx(n,{...s,section:"value",ref:e})),$=r.forwardRef((s,e)=>t.jsx(n,{...s,section:"desc",ref:e})),O=r.forwardRef((s,e)=>t.jsx(n,{...s,section:"figure",ref:e})),P=r.forwardRef((s,e)=>t.jsx(n,{...s,section:"actions",ref:e})),E=Object.assign(j,{Title:J,Value:U,Desc:$,Figure:O,Actions:P});try{j.displayName="Stat",j.__docgenInfo={description:"",displayName:"Stat",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}}}}}catch{}const g=r.forwardRef(({direction:s="horizontal",dataTheme:e,className:l,children:c,...i},p)=>{const K=w("stats",l,C({"stats-vertical":s==="vertical","stats-horizontal":s==="horizontal"}));return t.jsx("div",{...i,ref:p,"data-theme":e,className:K,children:c})}),a=Object.assign(g,{Stat:E});try{g.displayName="Stats",g.__docgenInfo={description:"",displayName:"Stats",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},direction:{defaultValue:{value:"horizontal"},description:"",name:"direction",required:!1,type:{name:"enum",value:[{value:'"horizontal"'},{value:'"vertical"'}]}}}}}catch{}try{a.displayName="Stats",a.__docgenInfo={description:"",displayName:"Stats",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},direction:{defaultValue:{value:"horizontal"},description:"",name:"direction",required:!1,type:{name:"enum",value:[{value:'"horizontal"'},{value:'"vertical"'}]}}}}}catch{}const st={title:"Data Display/Stats",component:a},o=s=>t.jsx(a,{...s,className:"shadow",children:t.jsxs(a.Stat,{children:[t.jsx(a.Stat.Title,{children:"Total Page Views"}),t.jsx(a.Stat.Value,{children:"89,400"}),t.jsx(a.Stat.Desc,{children:"21% more than last month"})]})}),d=s=>t.jsxs(a,{...s,className:"shadow font-sans",children:[t.jsxs(a.Stat,{children:[t.jsx(a.Stat.Figure,{className:"text-primary",children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-8 h-8 stroke-current",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"})})}),t.jsx(a.Stat.Title,{children:"Total Likes"}),t.jsx(a.Stat.Value,{className:"text-primary",children:"25.6K"}),t.jsx(a.Stat.Desc,{children:"21% more than last month"})]}),t.jsxs(a.Stat,{children:[t.jsx(a.Stat.Figure,{className:"text-secondary",children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-8 h-8 stroke-current",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M13 10V3L4 14h7v7l9-11h-7z"})})}),t.jsx(a.Stat.Title,{children:"Page Views"}),t.jsx(a.Stat.Value,{className:"text-secondary",children:"2.6M"}),t.jsx(a.Stat.Desc,{children:"21% more than last month"})]}),t.jsxs(a.Stat,{children:[t.jsx(a.Stat.Figure,{className:"text-primary",children:t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",className:"inline-block w-8 h-8 stroke-current",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"})})}),t.jsx(a.Stat.Figure,{className:"text-secondary",children:t.jsx(q,{size:"sm",online:!0,src:"https://img.daisyui.com/images/stock/photo-1534528741775-53994a69daeb.webp",shape:"circle"})}),t.jsx(a.Stat.Value,{children:"86%"}),t.jsx(a.Stat.Title,{children:"Tasks done"}),t.jsx(a.Stat.Desc,{className:"text-secondary",children:"31 tasks remaining"})]})]}),u=s=>t.jsxs(a,{...s,className:"shadow font-sans",children:[t.jsxs(a.Stat,{className:"place-items-center",children:[t.jsx(a.Stat.Title,{children:"Downloads"}),t.jsx(a.Stat.Value,{children:"31K"}),t.jsx(a.Stat.Desc,{children:"From January 1st to February 1st"})]}),t.jsxs(a.Stat,{className:"place-items-center",children:[t.jsx(a.Stat.Title,{children:"Users"}),t.jsx(a.Stat.Value,{className:"text-secondary",children:"4,200"}),t.jsx(a.Stat.Desc,{className:"text-secondary",children:"↗︎ 40 (2%)"})]}),t.jsxs(a.Stat,{className:"place-items-center",children:[t.jsx(a.Stat.Title,{children:"New Registers"}),t.jsx(a.Stat.Value,{children:"1,200"}),t.jsx(a.Stat.Desc,{children:"↘︎ 90 (14%)"})]})]}),S=s=>t.jsxs(a,{...s,className:"shadow font-sans",children:[t.jsxs(a.Stat,{children:[t.jsx(a.Stat.Title,{children:"Downloads"}),t.jsx(a.Stat.Value,{children:"31K"}),t.jsx(a.Stat.Desc,{children:"Jan 1st - Feb 1st"})]}),t.jsxs(a.Stat,{children:[t.jsx(a.Stat.Title,{children:"New Users"}),t.jsx(a.Stat.Value,{children:"4,200"}),t.jsx(a.Stat.Desc,{children:"↗︎ 400 (22%)"})]}),t.jsxs(a.Stat,{children:[t.jsx(a.Stat.Title,{children:"New Registers"}),t.jsx(a.Stat.Value,{children:"1,200"}),t.jsx(a.Stat.Desc,{children:"↘︎ 90 (14%)"})]})]});S.args={direction:"vertical"};const m=s=>t.jsxs(a,{...s,className:"lg:stats-horizontal shadow",children:[t.jsxs(a.Stat,{children:[t.jsx(a.Stat.Title,{children:"Downloads"}),t.jsx(a.Stat.Value,{children:"31K"}),t.jsx(a.Stat.Desc,{children:"Jan 1st - Feb 1st"})]}),t.jsxs(a.Stat,{children:[t.jsx(a.Stat.Title,{children:"New Users"}),t.jsx(a.Stat.Value,{children:"4,200"}),t.jsx(a.Stat.Desc,{children:"↗︎ 400 (22%)"})]}),t.jsxs(a.Stat,{children:[t.jsx(a.Stat.Title,{children:"New Registers"}),t.jsx(a.Stat.Value,{children:"1,200"}),t.jsx(a.Stat.Desc,{children:"↘︎ 90 (14%)"})]})]}),h=s=>t.jsxs(a,{...s,className:"font-sans bg-primary text-primary-content",children:[t.jsxs(a.Stat,{children:[t.jsx(a.Stat.Title,{children:"Account balance"}),t.jsx(a.Stat.Value,{children:"$89,400"}),t.jsx(a.Stat.Actions,{children:t.jsx(x,{size:"sm",color:"success",children:"Add funds"})})]}),t.jsxs(a.Stat,{children:[t.jsx(a.Stat.Title,{children:"Current balance"}),t.jsx(a.Stat.Value,{children:"$89,400"}),t.jsxs(a.Stat.Actions,{className:"gap-1 flex",children:[t.jsx(x,{size:"sm",children:"Withdrawal"}),t.jsx(x,{size:"sm",children:"deposit"})]})]})]});var N,f,V;o.parameters={...o.parameters,docs:{...(N=o.parameters)==null?void 0:N.docs,source:{originalSource:`args => { + return + + Total Page Views + 89,400 + 21% more than last month + + ; +}`,...(V=(f=o.parameters)==null?void 0:f.docs)==null?void 0:V.source}}};var T,v,y;d.parameters={...d.parameters,docs:{...(T=d.parameters)==null?void 0:T.docs,source:{originalSource:`args => { + return + + + + + + + Total Likes + 25.6K + 21% more than last month + + + + + + + + + Page Views + 2.6M + 21% more than last month + + + + + + + + + + + + 86% + Tasks done + + 31 tasks remaining + + + ; +}`,...(y=(v=d.parameters)==null?void 0:v.docs)==null?void 0:y.source}}};var D,k,_;u.parameters={...u.parameters,docs:{...(D=u.parameters)==null?void 0:D.docs,source:{originalSource:`args => { + return + + Downloads + 31K + From January 1st to February 1st + + + + Users + 4,200 + ↗︎ 40 (2%) + + + + New Registers + 1,200 + ↘︎ 90 (14%) + + ; +}`,...(_=(k=u.parameters)==null?void 0:k.docs)==null?void 0:_.source}}};var b,L,z;S.parameters={...S.parameters,docs:{...(b=S.parameters)==null?void 0:b.docs,source:{originalSource:`args => { + return + + Downloads + 31K + Jan 1st - Feb 1st + + + + New Users + 4,200 + ↗︎ 400 (22%) + + + + New Registers + 1,200 + ↘︎ 90 (14%) + + ; +}`,...(z=(L=S.parameters)==null?void 0:L.docs)==null?void 0:z.source}}};var F,A,R;m.parameters={...m.parameters,docs:{...(F=m.parameters)==null?void 0:F.docs,source:{originalSource:`args => { + return + + Downloads + 31K + Jan 1st - Feb 1st + + + + New Users + 4,200 + ↗︎ 400 (22%) + + + + New Registers + 1,200 + ↘︎ 90 (14%) + + ; +}`,...(R=(A=m.parameters)==null?void 0:A.docs)==null?void 0:R.source}}};var B,I,M;h.parameters={...h.parameters,docs:{...(B=h.parameters)==null?void 0:B.docs,source:{originalSource:`args => { + return + + Account balance + $89,400 + + + + + + Current balance + $89,400 + + + + + + ; +}`,...(M=(I=h.parameters)==null?void 0:I.docs)==null?void 0:M.source}}};const et=["Default","IconsOrImage","CenteredItems","Vertical","Responsive","CustomColorsAndButton"];export{u as CenteredItems,h as CustomColorsAndButton,o as Default,d as IconsOrImage,m as Responsive,S as Vertical,et as __namedExportsOrder,st as default}; diff --git a/docs/assets/Steps.stories-d1823ecf.js b/docs/assets/Steps.stories-d1823ecf.js deleted file mode 100644 index d71eb2a9..00000000 --- a/docs/assets/Steps.stories-d1823ecf.js +++ /dev/null @@ -1,77 +0,0 @@ -import{t as D,j as t,a as o}from"./tw-merge-4486aaf0.js";import{R as T}from"./index-f46741a2.js";import{c as F}from"./clsx.m-1229b3e0.js";const v=T.forwardRef(({children:r,value:c,color:p,dataTheme:i,className:u,...d},h)=>{const m=D("step",u,F({"step-primary":p==="primary","step-secondary":p==="secondary","step-accent":p==="accent","step-info":p==="info","step-success":p==="success","step-warning":p==="warning","step-error":p==="error"}));return t("li",{"aria-label":"Step",...d,"data-theme":i,"data-content":c,className:m,ref:h,children:r})}),k=v;try{v.displayName="Step",v.__docgenInfo={description:"",displayName:"Step",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"ghost"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}}}}}catch{}const g=T.forwardRef(({children:r,dataTheme:c,className:p,vertical:i,horizontal:u,...d},h)=>{const m=D("steps",p,F({"steps-vertical":i,"steps-horizontal":u}));return t("ul",{"aria-label":"Steps",role:"group",...d,"data-theme":c,className:m,ref:h,children:r})}),e=Object.assign(g,{Step:k});try{g.displayName="Steps",g.__docgenInfo={description:"",displayName:"Steps",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}const $={title:"Navigation/Steps",component:e},s=r=>o(e,{...r,children:[t(e.Step,{color:"primary",children:"Register"}),t(e.Step,{color:"primary",children:"Choose plan"}),t(e.Step,{children:"Purchase"}),t(e.Step,{children:"Receive Product"})]}),n=r=>o(e,{...r,children:[t(e.Step,{color:"primary",children:"Register"}),t(e.Step,{color:"primary",children:"Choose plan"}),t(e.Step,{children:"Purchase"}),t(e.Step,{children:"Receive Product"})]});n.args={className:"lg:steps-horizontal",vertical:!0};const a=r=>o(e,{...r,children:[t(e.Step,{value:"?",color:"neutral",children:"Step 1"}),t(e.Step,{value:"!",color:"neutral",children:"Step 2"}),t(e.Step,{value:"✓",color:"neutral",children:"Step 3"}),t(e.Step,{value:"✕",color:"neutral",children:"Step 4"}),t(e.Step,{value:"!",color:"neutral",children:"Step 5"}),t(e.Step,{value:"",color:"neutral",children:"Step 6"}),t(e.Step,{value:"●",color:"neutral",children:"Step 7"})]}),S=r=>o(e,{...r,children:[t(e.Step,{color:"info",children:"Fly to moon"}),t(e.Step,{color:"info",children:"Shrink the moon"}),t(e.Step,{color:"info",children:"Grab the moon"}),t(e.Step,{value:"?",color:"error",children:"Sit on toilet"})]}),l=r=>t("div",{className:"overflow-x-auto",children:o(e,{...r,children:[t(e.Step,{children:"start"}),t(e.Step,{color:"secondary",children:"2"}),t(e.Step,{color:"secondary",children:"3"}),t(e.Step,{color:"secondary",children:"4"}),t(e.Step,{children:"5"}),t(e.Step,{color:"accent",children:"6"}),t(e.Step,{color:"accent",children:"7"}),t(e.Step,{children:"8"}),t(e.Step,{color:"error",children:"9"}),t(e.Step,{color:"error",children:"10"}),t(e.Step,{children:"11"}),t(e.Step,{children:"12"}),t(e.Step,{color:"warning",children:"13"}),t(e.Step,{color:"warning",children:"14"}),t(e.Step,{children:"15"}),t(e.Step,{color:"neutral",children:"16"}),t(e.Step,{color:"neutral",children:"17"}),t(e.Step,{color:"neutral",children:"18"}),t(e.Step,{color:"neutral",children:"19"}),t(e.Step,{color:"neutral",children:"20"}),t(e.Step,{color:"neutral",children:"21"}),t(e.Step,{color:"neutral",children:"22"}),t(e.Step,{color:"neutral",children:"23"}),t(e.Step,{color:"neutral",children:"end"})]})});var y,f,_;s.parameters={...s.parameters,docs:{...(y=s.parameters)==null?void 0:y.docs,source:{originalSource:`args => { - return - Register - Choose plan - Purchase - Receive Product - ; -}`,...(_=(f=s.parameters)==null?void 0:f.docs)==null?void 0:_.source}}};var R,w,C;n.parameters={...n.parameters,docs:{...(R=n.parameters)==null?void 0:R.docs,source:{originalSource:`args => { - return - Register - Choose plan - Purchase - Receive Product - ; -}`,...(C=(w=n.parameters)==null?void 0:w.docs)==null?void 0:C.source}}};var N,b,P;a.parameters={...a.parameters,docs:{...(N=a.parameters)==null?void 0:N.docs,source:{originalSource:`args => { - return - - Step 1 - - - Step 2 - - - Step 3 - - - Step 4 - - - Step 5 - - - Step 6 - - - Step 7 - - ; -}`,...(P=(b=a.parameters)==null?void 0:b.docs)==null?void 0:P.source}}};var x,q,V;S.parameters={...S.parameters,docs:{...(x=S.parameters)==null?void 0:x.docs,source:{originalSource:`args => { - return - Fly to moon - Shrink the moon - Grab the moon - - Sit on toilet - - ; -}`,...(V=(q=S.parameters)==null?void 0:q.docs)==null?void 0:V.source}}};var W,j,z;l.parameters={...l.parameters,docs:{...(W=l.parameters)==null?void 0:W.docs,source:{originalSource:`args => { - return
    - - start - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - end - -
    ; -}`,...(z=(j=l.parameters)==null?void 0:j.docs)==null?void 0:z.source}}};const E=["Default","Responsive","WithDataContent","CustomColors","WithScrollableWrapper"];export{S as CustomColors,s as Default,n as Responsive,a as WithDataContent,l as WithScrollableWrapper,E as __namedExportsOrder,$ as default}; diff --git a/docs/assets/Steps.stories-wA3FkvPb.js b/docs/assets/Steps.stories-wA3FkvPb.js new file mode 100644 index 00000000..4f011246 --- /dev/null +++ b/docs/assets/Steps.stories-wA3FkvPb.js @@ -0,0 +1,77 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{e as z}from"./iframe-DDnXVYpC.js";import{c as D}from"./clsx-B-dksMZM.js";import{t as T}from"./bundle-mjs-yGZq-iow.js";const m=z.forwardRef(({children:r,value:S,color:p,dataTheme:c,className:i,...u},d)=>{const h=T("step",i,D({"step-primary":p==="primary","step-secondary":p==="secondary","step-accent":p==="accent","step-info":p==="info","step-success":p==="success","step-warning":p==="warning","step-error":p==="error"}));return e.jsx("li",{"aria-label":"Step",...u,"data-theme":c,"data-content":S,className:h,ref:d,children:r})});try{m.displayName="Step",m.__docgenInfo={description:"",displayName:"Step",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!1,type:{name:"string"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"ghost"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}}}}}catch{}const x=z.forwardRef(({children:r,dataTheme:S,className:p,vertical:c,horizontal:i,...u},d)=>{const h=T("steps",p,D({"steps-vertical":c,"steps-horizontal":i}));return e.jsx("ul",{"aria-label":"Steps",role:"group",...u,"data-theme":S,className:h,ref:d,children:r})}),t=Object.assign(x,{Step:m});try{x.displayName="Steps",x.__docgenInfo={description:"",displayName:"Steps",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},vertical:{defaultValue:null,description:"",name:"vertical",required:!1,type:{name:"boolean"}},horizontal:{defaultValue:null,description:"",name:"horizontal",required:!1,type:{name:"boolean"}}}}}catch{}const I={title:"Navigation/Steps",component:t},o=r=>e.jsxs(t,{...r,children:[e.jsx(t.Step,{color:"primary",children:"Register"}),e.jsx(t.Step,{color:"primary",children:"Choose plan"}),e.jsx(t.Step,{children:"Purchase"}),e.jsx(t.Step,{children:"Receive Product"})]}),s=r=>e.jsxs(t,{...r,children:[e.jsx(t.Step,{color:"primary",children:"Register"}),e.jsx(t.Step,{color:"primary",children:"Choose plan"}),e.jsx(t.Step,{children:"Purchase"}),e.jsx(t.Step,{children:"Receive Product"})]});s.args={className:"lg:steps-horizontal",vertical:!0};const n=r=>e.jsxs(t,{...r,children:[e.jsx(t.Step,{value:"?",color:"neutral",children:"Step 1"}),e.jsx(t.Step,{value:"!",color:"neutral",children:"Step 2"}),e.jsx(t.Step,{value:"✓",color:"neutral",children:"Step 3"}),e.jsx(t.Step,{value:"✕",color:"neutral",children:"Step 4"}),e.jsx(t.Step,{value:"!",color:"neutral",children:"Step 5"}),e.jsx(t.Step,{value:"",color:"neutral",children:"Step 6"}),e.jsx(t.Step,{value:"●",color:"neutral",children:"Step 7"})]}),a=r=>e.jsxs(t,{...r,children:[e.jsx(t.Step,{color:"info",children:"Fly to moon"}),e.jsx(t.Step,{color:"info",children:"Shrink the moon"}),e.jsx(t.Step,{color:"info",children:"Grab the moon"}),e.jsx(t.Step,{value:"?",color:"error",children:"Sit on toilet"})]}),l=r=>e.jsx("div",{className:"overflow-x-auto",children:e.jsxs(t,{...r,children:[e.jsx(t.Step,{children:"start"}),e.jsx(t.Step,{color:"secondary",children:"2"}),e.jsx(t.Step,{color:"secondary",children:"3"}),e.jsx(t.Step,{color:"secondary",children:"4"}),e.jsx(t.Step,{children:"5"}),e.jsx(t.Step,{color:"accent",children:"6"}),e.jsx(t.Step,{color:"accent",children:"7"}),e.jsx(t.Step,{children:"8"}),e.jsx(t.Step,{color:"error",children:"9"}),e.jsx(t.Step,{color:"error",children:"10"}),e.jsx(t.Step,{children:"11"}),e.jsx(t.Step,{children:"12"}),e.jsx(t.Step,{color:"warning",children:"13"}),e.jsx(t.Step,{color:"warning",children:"14"}),e.jsx(t.Step,{children:"15"}),e.jsx(t.Step,{color:"neutral",children:"16"}),e.jsx(t.Step,{color:"neutral",children:"17"}),e.jsx(t.Step,{color:"neutral",children:"18"}),e.jsx(t.Step,{color:"neutral",children:"19"}),e.jsx(t.Step,{color:"neutral",children:"20"}),e.jsx(t.Step,{color:"neutral",children:"21"}),e.jsx(t.Step,{color:"neutral",children:"22"}),e.jsx(t.Step,{color:"neutral",children:"23"}),e.jsx(t.Step,{color:"neutral",children:"end"})]})});var j,v,g;o.parameters={...o.parameters,docs:{...(j=o.parameters)==null?void 0:j.docs,source:{originalSource:`args => { + return + Register + Choose plan + Purchase + Receive Product + ; +}`,...(g=(v=o.parameters)==null?void 0:v.docs)==null?void 0:g.source}}};var f,y,_;s.parameters={...s.parameters,docs:{...(f=s.parameters)==null?void 0:f.docs,source:{originalSource:`args => { + return + Register + Choose plan + Purchase + Receive Product + ; +}`,...(_=(y=s.parameters)==null?void 0:y.docs)==null?void 0:_.source}}};var R,w,C;n.parameters={...n.parameters,docs:{...(R=n.parameters)==null?void 0:R.docs,source:{originalSource:`args => { + return + + Step 1 + + + Step 2 + + + Step 3 + + + Step 4 + + + Step 5 + + + Step 6 + + + Step 7 + + ; +}`,...(C=(w=n.parameters)==null?void 0:w.docs)==null?void 0:C.source}}};var N,b,P;a.parameters={...a.parameters,docs:{...(N=a.parameters)==null?void 0:N.docs,source:{originalSource:`args => { + return + Fly to moon + Shrink the moon + Grab the moon + + Sit on toilet + + ; +}`,...(P=(b=a.parameters)==null?void 0:b.docs)==null?void 0:P.source}}};var q,V,W;l.parameters={...l.parameters,docs:{...(q=l.parameters)==null?void 0:q.docs,source:{originalSource:`args => { + return
    + + start + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + end + +
    ; +}`,...(W=(V=l.parameters)==null?void 0:V.docs)==null?void 0:W.source}}};const O=["Default","Responsive","WithDataContent","CustomColors","WithScrollableWrapper"];export{a as CustomColors,o as Default,s as Responsive,n as WithDataContent,l as WithScrollableWrapper,O as __namedExportsOrder,I as default}; diff --git a/docs/assets/Swap.stories-53784551.js b/docs/assets/Swap.stories-53784551.js deleted file mode 100644 index 505bb831..00000000 --- a/docs/assets/Swap.stories-53784551.js +++ /dev/null @@ -1,11 +0,0 @@ -import{t as j,a as O,j as e,F as c}from"./tw-merge-4486aaf0.js";import{R as W}from"./index-f46741a2.js";import{c as $}from"./clsx.m-1229b3e0.js";import{w as m}from"./utils-ae2eb491.js";const p=W.forwardRef(({onElement:a,offElement:_,active:S,rotate:Z,flip:q,dataTheme:b,className:A,onClick:C,onChange:R,...T},F)=>{const I=j("swap",A,$({"swap-active":S,"swap-rotate":Z,"swap-flip":q})),B=m({node:a,wrapper:e("div",{}),props:{className:"swap-on"}}),k=m({node:_,wrapper:e("div",{}),props:{className:"swap-off"}});return O("label",{...T,"data-theme":b,className:I,ref:F,children:[e("input",{type:"checkbox",onClick:C,onChange:R}),B,k]})}),i=p;try{p.displayName="Swap",p.__docgenInfo={description:"",displayName:"Swap",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},onElement:{defaultValue:null,description:"",name:"onElement",required:!0,type:{name:"ReactNode | ReactNode[]"}},offElement:{defaultValue:null,description:"",name:"offElement",required:!0,type:{name:"ReactNode | ReactNode[]"}},active:{defaultValue:null,description:"",name:"active",required:!1,type:{name:"boolean"}},rotate:{defaultValue:null,description:"",name:"rotate",required:!1,type:{name:"boolean"}},flip:{defaultValue:null,description:"",name:"flip",required:!1,type:{name:"boolean"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"MouseEventHandler"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"FormEventHandler"}}}}}catch{}try{i.displayName="Swap",i.__docgenInfo={description:"",displayName:"Swap",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},onElement:{defaultValue:null,description:"",name:"onElement",required:!0,type:{name:"ReactNode | ReactNode[]"}},offElement:{defaultValue:null,description:"",name:"offElement",required:!0,type:{name:"ReactNode | ReactNode[]"}},active:{defaultValue:null,description:"",name:"active",required:!1,type:{name:"boolean"}},rotate:{defaultValue:null,description:"",name:"rotate",required:!1,type:{name:"boolean"}},flip:{defaultValue:null,description:"",name:"flip",required:!1,type:{name:"boolean"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"MouseEventHandler"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"FormEventHandler"}}}}}catch{}const K={title:"Actions/Swap",component:i,argTypes:{onElement:{control:!1},offElement:{control:!1}}},s=a=>e(i,{...a}),t=s.bind({});t.args={onElement:"ON",offElement:"OFF"};const r=s.bind({});r.args={onElement:e("svg",{className:"fill-current",xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",children:e("path",{d:"M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"})}),offElement:e("svg",{className:"fill-current",xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",children:e("path",{d:"M3,9H7L12,4V20L7,15H3V9M16.59,12L14,9.41L15.41,8L18,10.59L20.59,8L22,9.41L19.41,12L22,14.59L20.59,16L18,13.41L15.41,16L14,14.59L16.59,12Z"})})};const n=s.bind({});n.args={rotate:!0,onElement:e("svg",{className:"fill-current",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 512 512",children:e("polygon",{points:"400 145.49 366.51 112 256 222.51 145.49 112 112 145.49 222.51 256 112 366.51 145.49 400 256 289.49 366.51 400 400 366.51 289.49 256 400 145.49"})}),offElement:e("svg",{className:"fill-current",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 512 512",children:e("path",{d:"M64,384H448V341.33H64Zm0-106.67H448V234.67H64ZM64,128v42.67H448V128Z"})})};const l=s.bind({});l.args={rotate:!0,onElement:e("svg",{className:"fill-current w-10 h-10",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:e("path",{d:"M5.64,17l-.71.71a1,1,0,0,0,0,1.41,1,1,0,0,0,1.41,0l.71-.71A1,1,0,0,0,5.64,17ZM5,12a1,1,0,0,0-1-1H3a1,1,0,0,0,0,2H4A1,1,0,0,0,5,12Zm7-7a1,1,0,0,0,1-1V3a1,1,0,0,0-2,0V4A1,1,0,0,0,12,5ZM5.64,7.05a1,1,0,0,0,.7.29,1,1,0,0,0,.71-.29,1,1,0,0,0,0-1.41l-.71-.71A1,1,0,0,0,4.93,6.34Zm12,.29a1,1,0,0,0,.7-.29l.71-.71a1,1,0,1,0-1.41-1.41L17,5.64a1,1,0,0,0,0,1.41A1,1,0,0,0,17.66,7.34ZM21,11H20a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Zm-9,8a1,1,0,0,0-1,1v1a1,1,0,0,0,2,0V20A1,1,0,0,0,12,19ZM18.36,17A1,1,0,0,0,17,18.36l.71.71a1,1,0,0,0,1.41,0,1,1,0,0,0,0-1.41ZM12,6.5A5.5,5.5,0,1,0,17.5,12,5.51,5.51,0,0,0,12,6.5Zm0,9A3.5,3.5,0,1,1,15.5,12,3.5,3.5,0,0,1,12,15.5Z"})}),offElement:e("svg",{className:"fill-current w-10 h-10",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:e("path",{d:"M21.64,13a1,1,0,0,0-1.05-.14,8.05,8.05,0,0,1-3.37.73A8.15,8.15,0,0,1,9.08,5.49a8.59,8.59,0,0,1,.25-2A1,1,0,0,0,8,2.36,10.14,10.14,0,1,0,22,14.05,1,1,0,0,0,21.64,13Zm-9.5,6.69A8.14,8.14,0,0,1,7.08,5.22v.27A10.15,10.15,0,0,0,17.22,15.63a9.79,9.79,0,0,0,2.1-.22A8.11,8.11,0,0,1,12.14,19.73Z"})})};const o=s.bind({});o.args={flip:!0,className:"text-6xl",onElement:e(c,{children:"😈"}),offElement:e(c,{children:"😇"})};var d,u,f;t.parameters={...t.parameters,docs:{...(d=t.parameters)==null?void 0:d.docs,source:{originalSource:`args => { - return ; -}`,...(f=(u=t.parameters)==null?void 0:u.docs)==null?void 0:f.source}}};var w,g,h;r.parameters={...r.parameters,docs:{...(w=r.parameters)==null?void 0:w.docs,source:{originalSource:`args => { - return ; -}`,...(h=(g=r.parameters)==null?void 0:g.docs)==null?void 0:h.source}}};var E,v,V;n.parameters={...n.parameters,docs:{...(E=n.parameters)==null?void 0:E.docs,source:{originalSource:`args => { - return ; -}`,...(V=(v=n.parameters)==null?void 0:v.docs)==null?void 0:V.source}}};var y,N,x;l.parameters={...l.parameters,docs:{...(y=l.parameters)==null?void 0:y.docs,source:{originalSource:`args => { - return ; -}`,...(x=(N=l.parameters)==null?void 0:N.docs)==null?void 0:x.source}}};var H,L,M;o.parameters={...o.parameters,docs:{...(H=o.parameters)==null?void 0:H.docs,source:{originalSource:`args => { - return ; -}`,...(M=(L=o.parameters)==null?void 0:L.docs)==null?void 0:M.source}}};const P=["Text","Volume","Hamburger","RotateEfect","FlipEffect"];export{o as FlipEffect,n as Hamburger,l as RotateEfect,t as Text,r as Volume,P as __namedExportsOrder,K as default}; diff --git a/docs/assets/Swap.stories-5giTwOQT.js b/docs/assets/Swap.stories-5giTwOQT.js new file mode 100644 index 00000000..cf2a579b --- /dev/null +++ b/docs/assets/Swap.stories-5giTwOQT.js @@ -0,0 +1,11 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{e as I}from"./iframe-DDnXVYpC.js";import{c as B}from"./clsx-B-dksMZM.js";import{t as k}from"./bundle-mjs-yGZq-iow.js";import{w as p}from"./utils-BvopOSUb.js";const a=I.forwardRef(({onElement:t,offElement:j,active:L,rotate:M,flip:_,dataTheme:S,className:Z,onClick:q,onChange:b,...A},C)=>{const R=k("swap",Z,B({"swap-active":L,"swap-rotate":M,"swap-flip":_})),T=p({node:t,wrapper:e.jsx("div",{}),props:{className:"swap-on"}}),F=p({node:j,wrapper:e.jsx("div",{}),props:{className:"swap-off"}});return e.jsxs("label",{...A,"data-theme":S,className:R,ref:C,children:[e.jsx("input",{type:"checkbox",onClick:q,onChange:b}),T,F]})});try{a.displayName="Swap",a.__docgenInfo={description:"",displayName:"Swap",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},onElement:{defaultValue:null,description:"",name:"onElement",required:!0,type:{name:"ReactNode | ReactNode[]"}},offElement:{defaultValue:null,description:"",name:"offElement",required:!0,type:{name:"ReactNode | ReactNode[]"}},active:{defaultValue:null,description:"",name:"active",required:!1,type:{name:"boolean"}},rotate:{defaultValue:null,description:"",name:"rotate",required:!1,type:{name:"boolean"}},flip:{defaultValue:null,description:"",name:"flip",required:!1,type:{name:"boolean"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"MouseEventHandler"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"FormEventHandler"}}}}}catch{}try{a.displayName="Swap",a.__docgenInfo={description:"",displayName:"Swap",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},onElement:{defaultValue:null,description:"",name:"onElement",required:!0,type:{name:"ReactNode | ReactNode[]"}},offElement:{defaultValue:null,description:"",name:"offElement",required:!0,type:{name:"ReactNode | ReactNode[]"}},active:{defaultValue:null,description:"",name:"active",required:!1,type:{name:"boolean"}},rotate:{defaultValue:null,description:"",name:"rotate",required:!1,type:{name:"boolean"}},flip:{defaultValue:null,description:"",name:"flip",required:!1,type:{name:"boolean"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"MouseEventHandler"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!1,type:{name:"FormEventHandler"}}}}}catch{}const J={title:"Actions/Swap",component:a,argTypes:{onElement:{control:!1},offElement:{control:!1}}},i=t=>e.jsx(a,{...t}),r=i.bind({});r.args={onElement:"ON",offElement:"OFF"};const n=i.bind({});n.args={onElement:e.jsx("svg",{className:"fill-current",xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"})}),offElement:e.jsx("svg",{className:"fill-current",xmlns:"http://www.w3.org/2000/svg",width:"48",height:"48",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M3,9H7L12,4V20L7,15H3V9M16.59,12L14,9.41L15.41,8L18,10.59L20.59,8L22,9.41L19.41,12L22,14.59L20.59,16L18,13.41L15.41,16L14,14.59L16.59,12Z"})})};const s=i.bind({});s.args={rotate:!0,onElement:e.jsx("svg",{className:"fill-current",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 512 512",children:e.jsx("polygon",{points:"400 145.49 366.51 112 256 222.51 145.49 112 112 145.49 222.51 256 112 366.51 145.49 400 256 289.49 366.51 400 400 366.51 289.49 256 400 145.49"})}),offElement:e.jsx("svg",{className:"fill-current",xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 512 512",children:e.jsx("path",{d:"M64,384H448V341.33H64Zm0-106.67H448V234.67H64ZM64,128v42.67H448V128Z"})})};const l=i.bind({});l.args={rotate:!0,onElement:e.jsx("svg",{className:"fill-current w-10 h-10",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M5.64,17l-.71.71a1,1,0,0,0,0,1.41,1,1,0,0,0,1.41,0l.71-.71A1,1,0,0,0,5.64,17ZM5,12a1,1,0,0,0-1-1H3a1,1,0,0,0,0,2H4A1,1,0,0,0,5,12Zm7-7a1,1,0,0,0,1-1V3a1,1,0,0,0-2,0V4A1,1,0,0,0,12,5ZM5.64,7.05a1,1,0,0,0,.7.29,1,1,0,0,0,.71-.29,1,1,0,0,0,0-1.41l-.71-.71A1,1,0,0,0,4.93,6.34Zm12,.29a1,1,0,0,0,.7-.29l.71-.71a1,1,0,1,0-1.41-1.41L17,5.64a1,1,0,0,0,0,1.41A1,1,0,0,0,17.66,7.34ZM21,11H20a1,1,0,0,0,0,2h1a1,1,0,0,0,0-2Zm-9,8a1,1,0,0,0-1,1v1a1,1,0,0,0,2,0V20A1,1,0,0,0,12,19ZM18.36,17A1,1,0,0,0,17,18.36l.71.71a1,1,0,0,0,1.41,0,1,1,0,0,0,0-1.41ZM12,6.5A5.5,5.5,0,1,0,17.5,12,5.51,5.51,0,0,0,12,6.5Zm0,9A3.5,3.5,0,1,1,15.5,12,3.5,3.5,0,0,1,12,15.5Z"})}),offElement:e.jsx("svg",{className:"fill-current w-10 h-10",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M21.64,13a1,1,0,0,0-1.05-.14,8.05,8.05,0,0,1-3.37.73A8.15,8.15,0,0,1,9.08,5.49a8.59,8.59,0,0,1,.25-2A1,1,0,0,0,8,2.36,10.14,10.14,0,1,0,22,14.05,1,1,0,0,0,21.64,13Zm-9.5,6.69A8.14,8.14,0,0,1,7.08,5.22v.27A10.15,10.15,0,0,0,17.22,15.63a9.79,9.79,0,0,0,2.1-.22A8.11,8.11,0,0,1,12.14,19.73Z"})})};const o=i.bind({});o.args={flip:!0,className:"text-6xl",onElement:e.jsx(e.Fragment,{children:"😈"}),offElement:e.jsx(e.Fragment,{children:"😇"})};var m,c,d;r.parameters={...r.parameters,docs:{...(m=r.parameters)==null?void 0:m.docs,source:{originalSource:`args => { + return ; +}`,...(d=(c=r.parameters)==null?void 0:c.docs)==null?void 0:d.source}}};var u,f,w;n.parameters={...n.parameters,docs:{...(u=n.parameters)==null?void 0:u.docs,source:{originalSource:`args => { + return ; +}`,...(w=(f=n.parameters)==null?void 0:f.docs)==null?void 0:w.source}}};var g,h,x;s.parameters={...s.parameters,docs:{...(g=s.parameters)==null?void 0:g.docs,source:{originalSource:`args => { + return ; +}`,...(x=(h=s.parameters)==null?void 0:h.docs)==null?void 0:x.source}}};var E,v,V;l.parameters={...l.parameters,docs:{...(E=l.parameters)==null?void 0:E.docs,source:{originalSource:`args => { + return ; +}`,...(V=(v=l.parameters)==null?void 0:v.docs)==null?void 0:V.source}}};var y,N,H;o.parameters={...o.parameters,docs:{...(y=o.parameters)==null?void 0:y.docs,source:{originalSource:`args => { + return ; +}`,...(H=(N=o.parameters)==null?void 0:N.docs)==null?void 0:H.source}}};const K=["Text","Volume","Hamburger","RotateEfect","FlipEffect"];export{o as FlipEffect,s as Hamburger,l as RotateEfect,r as Text,n as Volume,K as __namedExportsOrder,J as default}; diff --git a/docs/assets/Table.stories-BhvHJMq5.js b/docs/assets/Table.stories-BhvHJMq5.js new file mode 100644 index 00000000..d7fb60cf --- /dev/null +++ b/docs/assets/Table.stories-BhvHJMq5.js @@ -0,0 +1,485 @@ +import{j as n}from"./jsx-runtime-BjG_zV1W.js";import{e as m}from"./iframe-DDnXVYpC.js";import{c as $}from"./clsx-B-dksMZM.js";import{t as nn}from"./bundle-mjs-yGZq-iow.js";import{B as T}from"./index-Bdz6q0Sq.js";import{B as w}from"./Button-GtH5nISf.js";import{C as c}from"./index-BTy56zCQ.js";import{M as y}from"./index-BQZBaXSX.js";import"./index-Dl-l57lR.js";const C=m.forwardRef(({children:s,noCell:e=!1,...r},i)=>{const o=e?s:s==null?void 0:s.map((p,l)=>l<1?n.jsx("th",{children:p},l):n.jsx("td",{children:p},l));return n.jsx("thead",{...r,ref:i,children:n.jsx("tr",{children:o})})});try{C.displayName="TableHead",C.__docgenInfo={description:"",displayName:"TableHead",props:{noCell:{defaultValue:{value:"false"},description:"",name:"noCell",required:!1,type:{name:"boolean"}}}}}catch{}const S=m.forwardRef(({children:s,...e},r)=>n.jsx("tbody",{...e,ref:r,children:s}));try{S.displayName="TableBody",S.__docgenInfo={description:"",displayName:"TableBody",props:{}}}catch{}const B=m.forwardRef(({children:s,active:e,noCell:r=!1,className:i,...o},p)=>{const l=nn(i,$({active:e})),g=r?s:s==null?void 0:s.map((b,d)=>d<1?n.jsx("th",{children:b},d):n.jsx("td",{children:b},d));return n.jsx("tr",{...o,className:l,ref:p,children:g})});try{B.displayName="TableRow",B.__docgenInfo={description:"",displayName:"TableRow",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},active:{defaultValue:null,description:"",name:"active",required:!1,type:{name:"boolean"}},noCell:{defaultValue:{value:"false"},description:"",name:"noCell",required:!1,type:{name:"boolean"}}}}}catch{}const N=m.forwardRef(({children:s,noCell:e=!1,...r},i)=>{const o=e?s:s==null?void 0:s.map((p,l)=>l<1?n.jsx("th",{children:p},l):n.jsx("td",{children:p},l));return n.jsx("tfoot",{...r,ref:i,children:n.jsx("tr",{children:o})})});try{N.displayName="TableFooter",N.__docgenInfo={description:"",displayName:"TableFooter",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},noCell:{defaultValue:{value:"false"},description:"",name:"noCell",required:!1,type:{name:"boolean"}}}}}catch{}const H=m.forwardRef(({children:s,size:e,zebra:r,pinRows:i,pinCols:o,dataTheme:p,className:l,...g},b)=>{const d=nn("table",l,$({"table-zebra":r,"table-xl":e==="xl","table-lg":e==="lg","table-md":e==="md","table-sm":e==="sm","table-xs":e==="xs","table-pin-rows":i,"table-pin-cols":o}));return n.jsx("table",{...g,"data-theme":p,className:d,ref:b,children:s})}),a=Object.assign(H,{Head:C,Body:S,Row:B,Footer:N});try{H.displayName="Table",H.__docgenInfo={description:"",displayName:"Table",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xl"'},{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},zebra:{defaultValue:null,description:"",name:"zebra",required:!1,type:{name:"boolean"}},pinRows:{defaultValue:null,description:"",name:"pinRows",required:!1,type:{name:"boolean"}},pinCols:{defaultValue:null,description:"",name:"pinCols",required:!1,type:{name:"boolean"}}}}}catch{}try{a.displayName="Table",a.__docgenInfo={description:"",displayName:"Table",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xl"'},{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},zebra:{defaultValue:null,description:"",name:"zebra",required:!1,type:{name:"boolean"}},pinRows:{defaultValue:null,description:"",name:"pinRows",required:!1,type:{name:"boolean"}},pinCols:{defaultValue:null,description:"",name:"pinCols",required:!1,type:{name:"boolean"}}}}}catch{}const un={title:"Data Display/Table",component:a},an=s=>n.jsx("div",{className:"overflow-x-auto",children:n.jsxs(a,{...s,children:[n.jsxs(a.Head,{children:[n.jsx("span",{}),n.jsx("span",{children:"Name"}),n.jsx("span",{children:"Job"}),n.jsx("span",{children:"Favorite Color"})]}),n.jsxs(a.Body,{children:[n.jsxs(a.Row,{children:[n.jsx("span",{children:"1"}),n.jsx("span",{children:"Cy Ganderton"}),n.jsx("span",{children:"Quality Control Specialist"}),n.jsx("span",{children:"Blue"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"2"}),n.jsx("span",{children:"Hart Hagerty"}),n.jsx("span",{children:"Desktop Support Technician"}),n.jsx("span",{children:"Purple"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"3"}),n.jsx("span",{children:"Brice Swyre"}),n.jsx("span",{children:"Tax Accountant"}),n.jsx("span",{children:"Red"})]})]})]})}),t=an.bind({});t.args={};const R=s=>n.jsx("div",{className:"overflow-x-auto",children:n.jsxs(a,{...s,children:[n.jsxs(a.Head,{children:[n.jsx("span",{}),n.jsx("span",{children:"Name"}),n.jsx("span",{children:"Job"}),n.jsx("span",{children:"Favorite Color"})]}),n.jsxs(a.Body,{children:[n.jsxs(a.Row,{active:!0,children:[n.jsx("span",{children:"1"}),n.jsx("span",{children:"Cy Ganderton"}),n.jsx("span",{children:"Quality Control Specialist"}),n.jsx("span",{children:"Blue"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"2"}),n.jsx("span",{children:"Hart Hagerty"}),n.jsx("span",{children:"Desktop Support Technician"}),n.jsx("span",{children:"Purple"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"3"}),n.jsx("span",{children:"Brice Swyre"}),n.jsx("span",{children:"Tax Accountant"}),n.jsx("span",{children:"Red"})]})]})]})}),v=s=>n.jsx("div",{className:"overflow-x-auto",children:n.jsxs(a,{...s,children:[n.jsxs(a.Head,{children:[n.jsx("span",{}),n.jsx("span",{children:"Name"}),n.jsx("span",{children:"Job"}),n.jsx("span",{children:"Favorite Color"})]}),n.jsxs(a.Body,{children:[n.jsxs(a.Row,{children:[n.jsx("span",{children:"1"}),n.jsx("span",{children:"Cy Ganderton"}),n.jsx("span",{children:"Quality Control Specialist"}),n.jsx("span",{children:"Blue"})]}),n.jsxs(a.Row,{hover:!0,children:[n.jsx("span",{children:"2"}),n.jsx("span",{children:"Hart Hagerty"}),n.jsx("span",{children:"Desktop Support Technician"}),n.jsx("span",{children:"Purple"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"3"}),n.jsx("span",{children:"Brice Swyre"}),n.jsx("span",{children:"Tax Accountant"}),n.jsx("span",{children:"Red"})]})]})]})}),h=an.bind({});h.args={zebra:!0};const x=s=>n.jsx("div",{className:"overflow-x-auto",children:n.jsxs(a,{...s,className:"rounded-box",children:[n.jsxs(a.Head,{children:[n.jsx(c,{}),n.jsx("span",{children:"Name"}),n.jsx("span",{children:"Job"}),n.jsx("span",{children:"Favorite Color"}),n.jsx("span",{})]}),n.jsxs(a.Body,{children:[n.jsxs(a.Row,{children:[n.jsx(c,{}),n.jsxs("div",{className:"flex items-center space-x-3 truncate",children:[n.jsx(y,{variant:"squircle",src:"https://img.daisyui.com/images/profile/demo/2@94.webp"}),n.jsxs("div",{children:[n.jsx("div",{className:"font-bold",children:"Hart Hagerty"}),n.jsx("div",{className:"text-sm opacity-50",children:"United States"})]})]}),n.jsxs("div",{children:["Zemlak, Daniel and Leannon",n.jsx("br",{}),n.jsx(T,{color:"ghost",size:"sm",children:"Desktop Support Technician"})]}),n.jsx("div",{children:"Purple"}),n.jsx(w,{color:"ghost",size:"xs",children:"details"})]}),n.jsxs(a.Row,{children:[n.jsx(c,{}),n.jsxs("div",{className:"flex items-center space-x-3 truncate",children:[n.jsx(y,{variant:"squircle",src:"https://img.daisyui.com/images/profile/demo/3@94.webp"}),n.jsxs("div",{children:[n.jsx("div",{className:"font-bold",children:"Brice Swyre"}),n.jsx("div",{className:"text-sm opacity-50",children:"China"})]})]}),n.jsxs("div",{children:["Carrol Group",n.jsx("br",{}),n.jsx(T,{color:"ghost",size:"sm",children:"Tax Accountant"})]}),n.jsx("div",{children:"Red"}),n.jsx(w,{color:"ghost",size:"xs",children:"details"})]}),n.jsxs(a.Row,{children:[n.jsx(c,{}),n.jsxs("div",{className:"flex items-center space-x-3 truncate",children:[n.jsx(y,{variant:"squircle",src:"https://img.daisyui.com/images/profile/demo/4@94.webp"}),n.jsxs("div",{children:[n.jsx("div",{className:"font-bold",children:"Marjy Ferencz"}),n.jsx("div",{className:"text-sm opacity-50",children:"Russia"})]})]}),n.jsxs("div",{children:["Rowe-Schoen",n.jsx("br",{}),n.jsx(T,{color:"ghost",size:"sm",children:"Office Assistant I"})]}),n.jsx("div",{children:"Crimson"}),n.jsx(w,{color:"ghost",size:"xs",children:"details"})]}),n.jsxs(a.Row,{children:[n.jsx(c,{}),n.jsxs("div",{className:"flex items-center space-x-3 truncate",children:[n.jsx(y,{variant:"squircle",src:"https://img.daisyui.com/images/profile/demo/5@94.webp"}),n.jsxs("div",{children:[n.jsx("div",{className:"font-bold",children:"Yancy Tear"}),n.jsx("div",{className:"text-sm opacity-50",children:"Brazil"})]})]}),n.jsxs("div",{children:["Wyman-Ledner",n.jsx("br",{}),n.jsx(T,{color:"ghost",size:"sm",children:"Community Outreach Specialist"})]}),n.jsx("div",{children:"Indigo"}),n.jsx(w,{color:"ghost",size:"xs",children:"details"})]})]}),n.jsxs(a.Footer,{children:[n.jsx("span",{children:" "}),n.jsx("span",{children:"Name"}),n.jsx("span",{children:"Job"}),n.jsx("span",{children:"Favorite Color"}),n.jsx("span",{children:" "})]})]})});x.args={};const j=s=>n.jsx("div",{className:"overflow-x-auto",children:n.jsxs(a,{...s,children:[n.jsxs(a.Head,{children:[n.jsx("span",{}),n.jsx("span",{children:"Name"}),n.jsx("span",{children:"Job"}),n.jsx("span",{children:"Company"}),n.jsx("span",{children:"Location"}),n.jsx("span",{children:"Last Login"}),n.jsx("span",{children:"Favorite Color"})]}),n.jsxs(a.Body,{children:[n.jsxs(a.Row,{children:[n.jsx("span",{children:"1"}),n.jsx("span",{children:"Cy Ganderton"}),n.jsx("span",{children:"Quality Control Specialist"}),n.jsx("span",{children:"Littel, Schaden and Vandervort"}),n.jsx("span",{children:"Canada"}),n.jsx("span",{children:"12/16/2020"}),n.jsx("span",{children:"Blue"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"2"}),n.jsx("span",{children:"Hart Hagerty"}),n.jsx("span",{children:"Desktop Support Technician"}),n.jsx("span",{children:"Zemlak, Daniel and Leannon"}),n.jsx("span",{children:"United States"}),n.jsx("span",{children:"12/5/2020"}),n.jsx("span",{children:"Purple"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"3"}),n.jsx("span",{children:"Brice Swyre"}),n.jsx("span",{children:"Tax Accountant"}),n.jsx("span",{children:"Carroll Group"}),n.jsx("span",{children:"China"}),n.jsx("span",{children:"8/15/2020"}),n.jsx("span",{children:"Red"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"4"}),n.jsx("span",{children:"Marjy Ferencz"}),n.jsx("span",{children:"Office Assistant I"}),n.jsx("span",{children:"Rowe-Schoen"}),n.jsx("span",{children:"Russia"}),n.jsx("span",{children:"3/25/2021"}),n.jsx("span",{children:"Crimson"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"5"}),n.jsx("span",{children:"Yancy Tear"}),n.jsx("span",{children:"Community Outreach Specialist"}),n.jsx("span",{children:"Wyman-Ledner"}),n.jsx("span",{children:"Brazil"}),n.jsx("span",{children:"5/22/2020"}),n.jsx("span",{children:"Indigo"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"6"}),n.jsx("span",{children:"Irma Vasilik"}),n.jsx("span",{children:"Editor"}),n.jsx("span",{children:"Wiza, Bins and Emard"}),n.jsx("span",{children:"Venezuela"}),n.jsx("span",{children:"12/8/2020"}),n.jsx("span",{children:"Purple"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"7"}),n.jsx("span",{children:"Meghann Durtnal"}),n.jsx("span",{children:"Staff Accountant IV"}),n.jsx("span",{children:"Schuster-Schimmel"}),n.jsx("span",{children:"Philippines"}),n.jsx("span",{children:"2/17/2021"}),n.jsx("span",{children:"Yellow"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"8"}),n.jsx("span",{children:"Sammy Seston"}),n.jsx("span",{children:"Accountant I"}),n.jsx("span",{children:"O'Hara, Welch and Keebler"}),n.jsx("span",{children:"Indonesia"}),n.jsx("span",{children:"5/23/2020"}),n.jsx("span",{children:"Crimson"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"9"}),n.jsx("span",{children:"Lesya Tinham"}),n.jsx("span",{children:"Safety Technician IV"}),n.jsx("span",{children:"Turner-Kuhlman"}),n.jsx("span",{children:"Philippines"}),n.jsx("span",{children:"2/21/2021"}),n.jsx("span",{children:"Maroon"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"10"}),n.jsx("span",{children:"Zaneta Tewkesbury"}),n.jsx("span",{children:"VP Marketing"}),n.jsx("span",{children:"Sauer LLC"}),n.jsx("span",{children:"Chad"}),n.jsx("span",{children:"6/23/2020"}),n.jsx("span",{children:"Green"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"11"}),n.jsx("span",{children:"Andy Tipple"}),n.jsx("span",{children:"Librarian"}),n.jsx("span",{children:"Hilpert Group"}),n.jsx("span",{children:"Poland"}),n.jsx("span",{children:"7/9/2020"}),n.jsx("span",{children:"Indigo"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"12"}),n.jsx("span",{children:"Sophi Biles"}),n.jsx("span",{children:"Recruiting Manager"}),n.jsx("span",{children:"Gutmann Inc"}),n.jsx("span",{children:"Indonesia"}),n.jsx("span",{children:"2/12/2021"}),n.jsx("span",{children:"Maroon"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"13"}),n.jsx("span",{children:"Florida Garces"}),n.jsx("span",{children:"Web Developer IV"}),n.jsx("span",{children:"Gaylord, Pacocha and Baumbach"}),n.jsx("span",{children:"Poland"}),n.jsx("span",{children:"5/31/2020"}),n.jsx("span",{children:"Purple"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"14"}),n.jsx("span",{children:"Maribespan Popping"}),n.jsx("span",{children:"Analyst Programmer"}),n.jsx("span",{children:"Deckow-Pouros"}),n.jsx("span",{children:"Portugal"}),n.jsx("span",{children:"4/27/2021"}),n.jsx("span",{children:"Aquamarine"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"15"}),n.jsx("span",{children:"Moritz Dryburgh"}),n.jsx("span",{children:"Dental Hygienist"}),n.jsx("span",{children:"Schiller, Cole and Hackett"}),n.jsx("span",{children:"Sri Lanka"}),n.jsx("span",{children:"8/8/2020"}),n.jsx("span",{children:"Crimson"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"16"}),n.jsx("span",{children:"Reid Semiras"}),n.jsx("span",{children:"Teacher"}),n.jsx("span",{children:"Sporer, Sipes and Rogahn"}),n.jsx("span",{children:"Poland"}),n.jsx("span",{children:"7/30/2020"}),n.jsx("span",{children:"Green"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"17"}),n.jsx("span",{children:"Alec Lethby"}),n.jsx("span",{children:"Teacher"}),n.jsx("span",{children:"Reichel, Glover and Hamill"}),n.jsx("span",{children:"China"}),n.jsx("span",{children:"2/28/2021"}),n.jsx("span",{children:"Khaki"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"18"}),n.jsx("span",{children:"Aland Wilber"}),n.jsx("span",{children:"Quality Control Specialist"}),n.jsx("span",{children:"Kshlerin, Rogahn and Swaniawski"}),n.jsx("span",{children:"Czech Republic"}),n.jsx("span",{children:"9/29/2020"}),n.jsx("span",{children:"Purple"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"19"}),n.jsx("span",{children:"Teddie Duerden"}),n.jsx("span",{children:"Staff Accountant III"}),n.jsx("span",{children:"Pouros, Ullrich and Windler"}),n.jsx("span",{children:"France"}),n.jsx("span",{children:"10/27/2020"}),n.jsx("span",{children:"Aquamarine"})]}),n.jsxs(a.Row,{children:[n.jsx("span",{children:"20"}),n.jsx("span",{children:"Lorelei Blackstone"}),n.jsx("span",{children:"Data Coordiator"}),n.jsx("span",{children:"Witting, Kutch and Greenfelder"}),n.jsx("span",{children:"Kazakhstan"}),n.jsx("span",{children:"6/3/2020"}),n.jsx("span",{children:"Red"})]})]}),n.jsxs(a.Footer,{children:[n.jsx("span",{}),n.jsx("span",{children:"Name"}),n.jsx("span",{children:"Job"}),n.jsx("span",{children:"company"}),n.jsx("span",{children:"location"}),n.jsx("span",{children:"Last Login"}),n.jsx("span",{children:"Favorite Color"})]})]})});j.args={size:"xs"};const f=50,_={headers:new Array(f).fill("header").map((s,e)=>s+e),row:new Array(f).fill("data").map((s,e)=>s+e),footers:new Array(f).fill("footer").map((s,e)=>s+e)},k=(s,e,r=!0)=>r?n.jsx("div",{children:s}):e%5===0?n.jsx("th",{children:s}):n.jsx("td",{children:s}),sn=s=>_.headers.map((e,r)=>k(e,r,s)),en=s=>_.row.map((e,r)=>k(e,r,s)),rn=s=>_.footers.map((e,r)=>k(e,r,s)),u=({noCell:s,...e})=>{const r=new Array(10).fill("").map(()=>n.jsx(a.Row,{noCell:s,children:en(!s)}));return n.jsx("div",{className:"overflow-x-auto max-w-lg max-h-80",children:n.jsxs(a,{...e,children:[n.jsx(a.Head,{noCell:s,children:sn(!s)}),n.jsx(a.Body,{children:r}),n.jsx(a.Footer,{noCell:s,children:rn(!s)})]})})};u.args={noCell:!0,pinRows:!0,pinCols:!0,zebra:!0};var P,z,A;t.parameters={...t.parameters,docs:{...(P=t.parameters)==null?void 0:P.docs,source:{originalSource:`args => { + return
    + + + + Name + Job + Favorite Color + + + + + 1 + Cy Ganderton + Quality Control Specialist + Blue + + + + 2 + Hart Hagerty + Desktop Support Technician + Purple + + + + 3 + Brice Swyre + Tax Accountant + Red + + +
    +
    ; +}`,...(A=(z=t.parameters)==null?void 0:z.docs)==null?void 0:A.source}}};var I,F,D;R.parameters={...R.parameters,docs:{...(I=R.parameters)==null?void 0:I.docs,source:{originalSource:`args => { + return
    + + + + Name + Job + Favorite Color + + + + + 1 + Cy Ganderton + Quality Control Specialist + Blue + + + + 2 + Hart Hagerty + Desktop Support Technician + Purple + + + + 3 + Brice Swyre + Tax Accountant + Red + + +
    +
    ; +}`,...(D=(F=R.parameters)==null?void 0:F.docs)==null?void 0:D.source}}};var L,V,G;v.parameters={...v.parameters,docs:{...(L=v.parameters)==null?void 0:L.docs,source:{originalSource:`args => { + return
    + + + + Name + Job + Favorite Color + + + + + 1 + Cy Ganderton + Quality Control Specialist + Blue + + + + 2 + Hart Hagerty + Desktop Support Technician + Purple + + + + 3 + Brice Swyre + Tax Accountant + Red + + +
    +
    ; +}`,...(G=(V=v.parameters)==null?void 0:V.docs)==null?void 0:G.source}}};var q,M,W;h.parameters={...h.parameters,docs:{...(q=h.parameters)==null?void 0:q.docs,source:{originalSource:`args => { + return
    + + + + Name + Job + Favorite Color + + + + + 1 + Cy Ganderton + Quality Control Specialist + Blue + + + + 2 + Hart Hagerty + Desktop Support Technician + Purple + + + + 3 + Brice Swyre + Tax Accountant + Red + + +
    +
    ; +}`,...(W=(M=h.parameters)==null?void 0:M.docs)==null?void 0:W.source}}};var O,J,K;x.parameters={...x.parameters,docs:{...(O=x.parameters)==null?void 0:O.docs,source:{originalSource:`args => { + return
    + + + + Name + Job + Favorite Color + + + + + + +
    + +
    +
    Hart Hagerty
    +
    United States
    +
    +
    +
    + Zemlak, Daniel and Leannon +
    + + Desktop Support Technician + +
    +
    Purple
    + +
    + + + +
    + +
    +
    Brice Swyre
    +
    China
    +
    +
    +
    + Carrol Group +
    + + Tax Accountant + +
    +
    Red
    + +
    + + + +
    + +
    +
    Marjy Ferencz
    +
    Russia
    +
    +
    +
    + Rowe-Schoen +
    + + Office Assistant I + +
    +
    Crimson
    + +
    + + + +
    + +
    +
    Yancy Tear
    +
    Brazil
    +
    +
    +
    + Wyman-Ledner +
    + + Community Outreach Specialist + +
    +
    Indigo
    + +
    +
    + + +   + Name + Job + Favorite Color +   + +
    +
    ; +}`,...(K=(J=x.parameters)==null?void 0:J.docs)==null?void 0:K.source}}};var Q,E,Z;j.parameters={...j.parameters,docs:{...(Q=j.parameters)==null?void 0:Q.docs,source:{originalSource:`args => { + return
    + + + + Name + Job + Company + Location + Last Login + Favorite Color + + + + + 1 + Cy Ganderton + Quality Control Specialist + Littel, Schaden and Vandervort + Canada + 12/16/2020 + Blue + + + + 2 + Hart Hagerty + Desktop Support Technician + Zemlak, Daniel and Leannon + United States + 12/5/2020 + Purple + + + + 3 + Brice Swyre + Tax Accountant + Carroll Group + China + 8/15/2020 + Red + + + + 4 + Marjy Ferencz + Office Assistant I + Rowe-Schoen + Russia + 3/25/2021 + Crimson + + + + 5 + Yancy Tear + Community Outreach Specialist + Wyman-Ledner + Brazil + 5/22/2020 + Indigo + + + + 6 + Irma Vasilik + Editor + Wiza, Bins and Emard + Venezuela + 12/8/2020 + Purple + + + + 7 + Meghann Durtnal + Staff Accountant IV + Schuster-Schimmel + Philippines + 2/17/2021 + Yellow + + + + 8 + Sammy Seston + Accountant I + O'Hara, Welch and Keebler + Indonesia + 5/23/2020 + Crimson + + + + 9 + Lesya Tinham + Safety Technician IV + Turner-Kuhlman + Philippines + 2/21/2021 + Maroon + + + + 10 + Zaneta Tewkesbury + VP Marketing + Sauer LLC + Chad + 6/23/2020 + Green + + + + 11 + Andy Tipple + Librarian + Hilpert Group + Poland + 7/9/2020 + Indigo + + + + 12 + Sophi Biles + Recruiting Manager + Gutmann Inc + Indonesia + 2/12/2021 + Maroon + + + + 13 + Florida Garces + Web Developer IV + Gaylord, Pacocha and Baumbach + Poland + 5/31/2020 + Purple + + + + 14 + Maribespan Popping + Analyst Programmer + Deckow-Pouros + Portugal + 4/27/2021 + Aquamarine + + + + 15 + Moritz Dryburgh + Dental Hygienist + Schiller, Cole and Hackett + Sri Lanka + 8/8/2020 + Crimson + + + + 16 + Reid Semiras + Teacher + Sporer, Sipes and Rogahn + Poland + 7/30/2020 + Green + + + + 17 + Alec Lethby + Teacher + Reichel, Glover and Hamill + China + 2/28/2021 + Khaki + + + + 18 + Aland Wilber + Quality Control Specialist + Kshlerin, Rogahn and Swaniawski + Czech Republic + 9/29/2020 + Purple + + + + 19 + Teddie Duerden + Staff Accountant III + Pouros, Ullrich and Windler + France + 10/27/2020 + Aquamarine + + + + 20 + Lorelei Blackstone + Data Coordiator + Witting, Kutch and Greenfelder + Kazakhstan + 6/3/2020 + Red + + + + + + Name + Job + company + location + Last Login + Favorite Color + +
    +
    ; +}`,...(Z=(E=j.parameters)==null?void 0:E.docs)==null?void 0:Z.source}}};var U,Y,X;u.parameters={...u.parameters,docs:{...(U=u.parameters)==null?void 0:U.docs,source:{originalSource:`({ + noCell, + ...args +}) => { + const renderRows = new Array(10).fill('').map(() => {renderRow(!noCell)}); + return
    + + {renderHeaders(!noCell)} + {renderRows} + {renderFooter(!noCell)} +
    +
    ; +}`,...(X=(Y=u.parameters)==null?void 0:Y.docs)==null?void 0:X.source}}};const mn=["Default","ActiveRow","HighlightsOnHover","Zebra","WithVisualElements","Xs","PinnedRowsOrColsNoCell"];export{R as ActiveRow,t as Default,v as HighlightsOnHover,u as PinnedRowsOrColsNoCell,x as WithVisualElements,j as Xs,h as Zebra,mn as __namedExportsOrder,un as default}; diff --git a/docs/assets/Table.stories-c1faaa58.js b/docs/assets/Table.stories-c1faaa58.js deleted file mode 100644 index 68ae2fb0..00000000 --- a/docs/assets/Table.stories-c1faaa58.js +++ /dev/null @@ -1,485 +0,0 @@ -import{j as n,t as an,a}from"./tw-merge-4486aaf0.js";import{R as T}from"./index-f46741a2.js";import{c as en}from"./clsx.m-1229b3e0.js";import{B as y}from"./index-e61e426b.js";import{B as R}from"./Button-e31631bb.js";import{C as c}from"./index-7a860f54.js";import{M as v}from"./index-9795bb01.js";import"./index-8d7e61f2.js";const N=T.forwardRef(({children:s,noCell:r=!1,...l},o)=>{const d=r?s:s==null?void 0:s.map((i,p)=>p<1?n("th",{children:i},p):n("td",{children:i},p));return n("thead",{...l,ref:o,children:n("tr",{children:d})})}),rn=N;try{N.displayName="TableHead",N.__docgenInfo={description:"",displayName:"TableHead",props:{noCell:{defaultValue:{value:"false"},description:"",name:"noCell",required:!1,type:{name:"boolean"}}}}}catch{}const H=T.forwardRef(({children:s,...r},l)=>n("tbody",{...r,ref:l,children:s})),ln=H;try{H.displayName="TableBody",H.__docgenInfo={description:"",displayName:"TableBody",props:{}}}catch{}const _=T.forwardRef(({children:s,active:r,hover:l,noCell:o=!1,className:d,...i},p)=>{const C=an(d,en({active:r,hover:l})),S=o?s:s==null?void 0:s.map((w,x)=>x<1?n("th",{children:w},x):n("td",{children:w},x));return n("tr",{...i,className:C,ref:p,children:S})}),pn=_;try{_.displayName="TableRow",_.__docgenInfo={description:"",displayName:"TableRow",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},active:{defaultValue:null,description:"",name:"active",required:!1,type:{name:"boolean"}},hover:{defaultValue:null,description:"",name:"hover",required:!1,type:{name:"boolean"}},noCell:{defaultValue:{value:"false"},description:"",name:"noCell",required:!1,type:{name:"boolean"}}}}}catch{}const k=T.forwardRef(({children:s,noCell:r=!1,...l},o)=>{const d=r?s:s==null?void 0:s.map((i,p)=>p<1?n("th",{children:i},p):n("td",{children:i},p));return n("tfoot",{...l,ref:o,children:n("tr",{children:d})})}),on=k;try{k.displayName="TableFooter",k.__docgenInfo={description:"",displayName:"TableFooter",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},noCell:{defaultValue:{value:"false"},description:"",name:"noCell",required:!1,type:{name:"boolean"}}}}}catch{}const z=T.forwardRef(({children:s,size:r,zebra:l,pinRows:o,pinCols:d,dataTheme:i,className:p,...C},S)=>{const w=an("table",p,en({"table-zebra":l,"table-lg":r==="lg","table-md":r==="md","table-sm":r==="sm","table-xs":r==="xs","table-pin-rows":o,"table-pin-cols":d}));return n("table",{...C,"data-theme":i,className:w,ref:S,children:s})}),e=Object.assign(z,{Head:rn,Body:ln,Row:pn,Footer:on});try{z.displayName="Table",z.__docgenInfo={description:"",displayName:"Table",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},zebra:{defaultValue:null,description:"",name:"zebra",required:!1,type:{name:"boolean"}},pinRows:{defaultValue:null,description:"",name:"pinRows",required:!1,type:{name:"boolean"}},pinCols:{defaultValue:null,description:"",name:"pinCols",required:!1,type:{name:"boolean"}}}}}catch{}try{e.displayName="Table",e.__docgenInfo={description:"",displayName:"Table",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}},zebra:{defaultValue:null,description:"",name:"zebra",required:!1,type:{name:"boolean"}},pinRows:{defaultValue:null,description:"",name:"pinRows",required:!1,type:{name:"boolean"}},pinCols:{defaultValue:null,description:"",name:"pinCols",required:!1,type:{name:"boolean"}}}}}catch{}const vn={title:"Data Display/Table",component:e},sn=s=>n("div",{className:"overflow-x-auto",children:a(e,{...s,children:[a(e.Head,{children:[n("span",{}),n("span",{children:"Name"}),n("span",{children:"Job"}),n("span",{children:"Favorite Color"})]}),a(e.Body,{children:[a(e.Row,{children:[n("span",{children:"1"}),n("span",{children:"Cy Ganderton"}),n("span",{children:"Quality Control Specialist"}),n("span",{children:"Blue"})]}),a(e.Row,{children:[n("span",{children:"2"}),n("span",{children:"Hart Hagerty"}),n("span",{children:"Desktop Support Technician"}),n("span",{children:"Purple"})]}),a(e.Row,{children:[n("span",{children:"3"}),n("span",{children:"Brice Swyre"}),n("span",{children:"Tax Accountant"}),n("span",{children:"Red"})]})]})]})}),t=sn.bind({});t.args={};const g=s=>n("div",{className:"overflow-x-auto",children:a(e,{...s,children:[a(e.Head,{children:[n("span",{}),n("span",{children:"Name"}),n("span",{children:"Job"}),n("span",{children:"Favorite Color"})]}),a(e.Body,{children:[a(e.Row,{active:!0,children:[n("span",{children:"1"}),n("span",{children:"Cy Ganderton"}),n("span",{children:"Quality Control Specialist"}),n("span",{children:"Blue"})]}),a(e.Row,{children:[n("span",{children:"2"}),n("span",{children:"Hart Hagerty"}),n("span",{children:"Desktop Support Technician"}),n("span",{children:"Purple"})]}),a(e.Row,{children:[n("span",{children:"3"}),n("span",{children:"Brice Swyre"}),n("span",{children:"Tax Accountant"}),n("span",{children:"Red"})]})]})]})}),f=s=>n("div",{className:"overflow-x-auto",children:a(e,{...s,children:[a(e.Head,{children:[n("span",{}),n("span",{children:"Name"}),n("span",{children:"Job"}),n("span",{children:"Favorite Color"})]}),a(e.Body,{children:[a(e.Row,{children:[n("span",{children:"1"}),n("span",{children:"Cy Ganderton"}),n("span",{children:"Quality Control Specialist"}),n("span",{children:"Blue"})]}),a(e.Row,{hover:!0,children:[n("span",{children:"2"}),n("span",{children:"Hart Hagerty"}),n("span",{children:"Desktop Support Technician"}),n("span",{children:"Purple"})]}),a(e.Row,{children:[n("span",{children:"3"}),n("span",{children:"Brice Swyre"}),n("span",{children:"Tax Accountant"}),n("span",{children:"Red"})]})]})]})}),h=sn.bind({});h.args={zebra:!0};const u=s=>n("div",{className:"overflow-x-auto",children:a(e,{...s,className:"rounded-box",children:[a(e.Head,{children:[n(c,{}),n("span",{children:"Name"}),n("span",{children:"Job"}),n("span",{children:"Favorite Color"}),n("span",{})]}),a(e.Body,{children:[a(e.Row,{children:[n(c,{}),a("div",{className:"flex items-center space-x-3 truncate",children:[n(v,{variant:"squircle",src:"https://img.daisyui.com/images/profile/demo/2@94.webp"}),a("div",{children:[n("div",{className:"font-bold",children:"Hart Hagerty"}),n("div",{className:"text-sm opacity-50",children:"United States"})]})]}),a("div",{children:["Zemlak, Daniel and Leannon",n("br",{}),n(y,{color:"ghost",size:"sm",children:"Desktop Support Technician"})]}),n("div",{children:"Purple"}),n(R,{color:"ghost",size:"xs",children:"details"})]}),a(e.Row,{children:[n(c,{}),a("div",{className:"flex items-center space-x-3 truncate",children:[n(v,{variant:"squircle",src:"https://img.daisyui.com/images/profile/demo/3@94.webp"}),a("div",{children:[n("div",{className:"font-bold",children:"Brice Swyre"}),n("div",{className:"text-sm opacity-50",children:"China"})]})]}),a("div",{children:["Carrol Group",n("br",{}),n(y,{color:"ghost",size:"sm",children:"Tax Accountant"})]}),n("div",{children:"Red"}),n(R,{color:"ghost",size:"xs",children:"details"})]}),a(e.Row,{children:[n(c,{}),a("div",{className:"flex items-center space-x-3 truncate",children:[n(v,{variant:"squircle",src:"https://img.daisyui.com/images/profile/demo/4@94.webp"}),a("div",{children:[n("div",{className:"font-bold",children:"Marjy Ferencz"}),n("div",{className:"text-sm opacity-50",children:"Russia"})]})]}),a("div",{children:["Rowe-Schoen",n("br",{}),n(y,{color:"ghost",size:"sm",children:"Office Assistant I"})]}),n("div",{children:"Crimson"}),n(R,{color:"ghost",size:"xs",children:"details"})]}),a(e.Row,{children:[n(c,{}),a("div",{className:"flex items-center space-x-3 truncate",children:[n(v,{variant:"squircle",src:"https://img.daisyui.com/images/profile/demo/5@94.webp"}),a("div",{children:[n("div",{className:"font-bold",children:"Yancy Tear"}),n("div",{className:"text-sm opacity-50",children:"Brazil"})]})]}),a("div",{children:["Wyman-Ledner",n("br",{}),n(y,{color:"ghost",size:"sm",children:"Community Outreach Specialist"})]}),n("div",{children:"Indigo"}),n(R,{color:"ghost",size:"xs",children:"details"})]})]}),a(e.Footer,{children:[n("span",{children:" "}),n("span",{children:"Name"}),n("span",{children:"Job"}),n("span",{children:"Favorite Color"}),n("span",{children:" "})]})]})});u.args={};const m=s=>n("div",{className:"overflow-x-auto",children:a(e,{...s,children:[a(e.Head,{children:[n("span",{}),n("span",{children:"Name"}),n("span",{children:"Job"}),n("span",{children:"Company"}),n("span",{children:"Location"}),n("span",{children:"Last Login"}),n("span",{children:"Favorite Color"})]}),a(e.Body,{children:[a(e.Row,{children:[n("span",{children:"1"}),n("span",{children:"Cy Ganderton"}),n("span",{children:"Quality Control Specialist"}),n("span",{children:"Littel, Schaden and Vandervort"}),n("span",{children:"Canada"}),n("span",{children:"12/16/2020"}),n("span",{children:"Blue"})]}),a(e.Row,{children:[n("span",{children:"2"}),n("span",{children:"Hart Hagerty"}),n("span",{children:"Desktop Support Technician"}),n("span",{children:"Zemlak, Daniel and Leannon"}),n("span",{children:"United States"}),n("span",{children:"12/5/2020"}),n("span",{children:"Purple"})]}),a(e.Row,{children:[n("span",{children:"3"}),n("span",{children:"Brice Swyre"}),n("span",{children:"Tax Accountant"}),n("span",{children:"Carroll Group"}),n("span",{children:"China"}),n("span",{children:"8/15/2020"}),n("span",{children:"Red"})]}),a(e.Row,{children:[n("span",{children:"4"}),n("span",{children:"Marjy Ferencz"}),n("span",{children:"Office Assistant I"}),n("span",{children:"Rowe-Schoen"}),n("span",{children:"Russia"}),n("span",{children:"3/25/2021"}),n("span",{children:"Crimson"})]}),a(e.Row,{children:[n("span",{children:"5"}),n("span",{children:"Yancy Tear"}),n("span",{children:"Community Outreach Specialist"}),n("span",{children:"Wyman-Ledner"}),n("span",{children:"Brazil"}),n("span",{children:"5/22/2020"}),n("span",{children:"Indigo"})]}),a(e.Row,{children:[n("span",{children:"6"}),n("span",{children:"Irma Vasilik"}),n("span",{children:"Editor"}),n("span",{children:"Wiza, Bins and Emard"}),n("span",{children:"Venezuela"}),n("span",{children:"12/8/2020"}),n("span",{children:"Purple"})]}),a(e.Row,{children:[n("span",{children:"7"}),n("span",{children:"Meghann Durtnal"}),n("span",{children:"Staff Accountant IV"}),n("span",{children:"Schuster-Schimmel"}),n("span",{children:"Philippines"}),n("span",{children:"2/17/2021"}),n("span",{children:"Yellow"})]}),a(e.Row,{children:[n("span",{children:"8"}),n("span",{children:"Sammy Seston"}),n("span",{children:"Accountant I"}),n("span",{children:"O'Hara, Welch and Keebler"}),n("span",{children:"Indonesia"}),n("span",{children:"5/23/2020"}),n("span",{children:"Crimson"})]}),a(e.Row,{children:[n("span",{children:"9"}),n("span",{children:"Lesya Tinham"}),n("span",{children:"Safety Technician IV"}),n("span",{children:"Turner-Kuhlman"}),n("span",{children:"Philippines"}),n("span",{children:"2/21/2021"}),n("span",{children:"Maroon"})]}),a(e.Row,{children:[n("span",{children:"10"}),n("span",{children:"Zaneta Tewkesbury"}),n("span",{children:"VP Marketing"}),n("span",{children:"Sauer LLC"}),n("span",{children:"Chad"}),n("span",{children:"6/23/2020"}),n("span",{children:"Green"})]}),a(e.Row,{children:[n("span",{children:"11"}),n("span",{children:"Andy Tipple"}),n("span",{children:"Librarian"}),n("span",{children:"Hilpert Group"}),n("span",{children:"Poland"}),n("span",{children:"7/9/2020"}),n("span",{children:"Indigo"})]}),a(e.Row,{children:[n("span",{children:"12"}),n("span",{children:"Sophi Biles"}),n("span",{children:"Recruiting Manager"}),n("span",{children:"Gutmann Inc"}),n("span",{children:"Indonesia"}),n("span",{children:"2/12/2021"}),n("span",{children:"Maroon"})]}),a(e.Row,{children:[n("span",{children:"13"}),n("span",{children:"Florida Garces"}),n("span",{children:"Web Developer IV"}),n("span",{children:"Gaylord, Pacocha and Baumbach"}),n("span",{children:"Poland"}),n("span",{children:"5/31/2020"}),n("span",{children:"Purple"})]}),a(e.Row,{children:[n("span",{children:"14"}),n("span",{children:"Maribespan Popping"}),n("span",{children:"Analyst Programmer"}),n("span",{children:"Deckow-Pouros"}),n("span",{children:"Portugal"}),n("span",{children:"4/27/2021"}),n("span",{children:"Aquamarine"})]}),a(e.Row,{children:[n("span",{children:"15"}),n("span",{children:"Moritz Dryburgh"}),n("span",{children:"Dental Hygienist"}),n("span",{children:"Schiller, Cole and Hackett"}),n("span",{children:"Sri Lanka"}),n("span",{children:"8/8/2020"}),n("span",{children:"Crimson"})]}),a(e.Row,{children:[n("span",{children:"16"}),n("span",{children:"Reid Semiras"}),n("span",{children:"Teacher"}),n("span",{children:"Sporer, Sipes and Rogahn"}),n("span",{children:"Poland"}),n("span",{children:"7/30/2020"}),n("span",{children:"Green"})]}),a(e.Row,{children:[n("span",{children:"17"}),n("span",{children:"Alec Lethby"}),n("span",{children:"Teacher"}),n("span",{children:"Reichel, Glover and Hamill"}),n("span",{children:"China"}),n("span",{children:"2/28/2021"}),n("span",{children:"Khaki"})]}),a(e.Row,{children:[n("span",{children:"18"}),n("span",{children:"Aland Wilber"}),n("span",{children:"Quality Control Specialist"}),n("span",{children:"Kshlerin, Rogahn and Swaniawski"}),n("span",{children:"Czech Republic"}),n("span",{children:"9/29/2020"}),n("span",{children:"Purple"})]}),a(e.Row,{children:[n("span",{children:"19"}),n("span",{children:"Teddie Duerden"}),n("span",{children:"Staff Accountant III"}),n("span",{children:"Pouros, Ullrich and Windler"}),n("span",{children:"France"}),n("span",{children:"10/27/2020"}),n("span",{children:"Aquamarine"})]}),a(e.Row,{children:[n("span",{children:"20"}),n("span",{children:"Lorelei Blackstone"}),n("span",{children:"Data Coordiator"}),n("span",{children:"Witting, Kutch and Greenfelder"}),n("span",{children:"Kazakhstan"}),n("span",{children:"6/3/2020"}),n("span",{children:"Red"})]})]}),a(e.Footer,{children:[n("span",{}),n("span",{children:"Name"}),n("span",{children:"Job"}),n("span",{children:"company"}),n("span",{children:"location"}),n("span",{children:"Last Login"}),n("span",{children:"Favorite Color"})]})]})});m.args={size:"xs"};const B=50,P={headers:new Array(B).fill("header").map((s,r)=>s+r),row:new Array(B).fill("data").map((s,r)=>s+r),footers:new Array(B).fill("footer").map((s,r)=>s+r)},A=(s,r,l=!0)=>l?n("div",{children:s}):r%5===0?n("th",{children:s}):n("td",{children:s}),dn=s=>P.headers.map((r,l)=>A(r,l,s)),cn=s=>P.row.map((r,l)=>A(r,l,s)),tn=s=>P.footers.map((r,l)=>A(r,l,s)),b=({noCell:s,...r})=>{const l=new Array(10).fill("").map(()=>n(e.Row,{noCell:s,children:cn(!s)}));return n("div",{className:"overflow-x-auto max-w-lg max-h-80",children:a(e,{...r,children:[n(e.Head,{noCell:s,children:dn(!s)}),n(e.Body,{children:l}),n(e.Footer,{noCell:s,children:tn(!s)})]})})};b.args={noCell:!0,pinRows:!0,pinCols:!0,zebra:!0};var F,I,D;t.parameters={...t.parameters,docs:{...(F=t.parameters)==null?void 0:F.docs,source:{originalSource:`args => { - return
    - - - - Name - Job - Favorite Color - - - - - 1 - Cy Ganderton - Quality Control Specialist - Blue - - - - 2 - Hart Hagerty - Desktop Support Technician - Purple - - - - 3 - Brice Swyre - Tax Accountant - Red - - -
    -
    ; -}`,...(D=(I=t.parameters)==null?void 0:I.docs)==null?void 0:D.source}}};var L,V,q;g.parameters={...g.parameters,docs:{...(L=g.parameters)==null?void 0:L.docs,source:{originalSource:`args => { - return
    - - - - Name - Job - Favorite Color - - - - - 1 - Cy Ganderton - Quality Control Specialist - Blue - - - - 2 - Hart Hagerty - Desktop Support Technician - Purple - - - - 3 - Brice Swyre - Tax Accountant - Red - - -
    -
    ; -}`,...(q=(V=g.parameters)==null?void 0:V.docs)==null?void 0:q.source}}};var G,M,W;f.parameters={...f.parameters,docs:{...(G=f.parameters)==null?void 0:G.docs,source:{originalSource:`args => { - return
    - - - - Name - Job - Favorite Color - - - - - 1 - Cy Ganderton - Quality Control Specialist - Blue - - - - 2 - Hart Hagerty - Desktop Support Technician - Purple - - - - 3 - Brice Swyre - Tax Accountant - Red - - -
    -
    ; -}`,...(W=(M=f.parameters)==null?void 0:M.docs)==null?void 0:W.source}}};var O,J,K;h.parameters={...h.parameters,docs:{...(O=h.parameters)==null?void 0:O.docs,source:{originalSource:`args => { - return
    - - - - Name - Job - Favorite Color - - - - - 1 - Cy Ganderton - Quality Control Specialist - Blue - - - - 2 - Hart Hagerty - Desktop Support Technician - Purple - - - - 3 - Brice Swyre - Tax Accountant - Red - - -
    -
    ; -}`,...(K=(J=h.parameters)==null?void 0:J.docs)==null?void 0:K.source}}};var Q,j,Z;u.parameters={...u.parameters,docs:{...(Q=u.parameters)==null?void 0:Q.docs,source:{originalSource:`args => { - return
    - - - - Name - Job - Favorite Color - - - - - - -
    - -
    -
    Hart Hagerty
    -
    United States
    -
    -
    -
    - Zemlak, Daniel and Leannon -
    - - Desktop Support Technician - -
    -
    Purple
    - -
    - - - -
    - -
    -
    Brice Swyre
    -
    China
    -
    -
    -
    - Carrol Group -
    - - Tax Accountant - -
    -
    Red
    - -
    - - - -
    - -
    -
    Marjy Ferencz
    -
    Russia
    -
    -
    -
    - Rowe-Schoen -
    - - Office Assistant I - -
    -
    Crimson
    - -
    - - - -
    - -
    -
    Yancy Tear
    -
    Brazil
    -
    -
    -
    - Wyman-Ledner -
    - - Community Outreach Specialist - -
    -
    Indigo
    - -
    -
    - - -   - Name - Job - Favorite Color -   - -
    -
    ; -}`,...(Z=(j=u.parameters)==null?void 0:j.docs)==null?void 0:Z.source}}};var E,U,Y;m.parameters={...m.parameters,docs:{...(E=m.parameters)==null?void 0:E.docs,source:{originalSource:`args => { - return
    - - - - Name - Job - Company - Location - Last Login - Favorite Color - - - - - 1 - Cy Ganderton - Quality Control Specialist - Littel, Schaden and Vandervort - Canada - 12/16/2020 - Blue - - - - 2 - Hart Hagerty - Desktop Support Technician - Zemlak, Daniel and Leannon - United States - 12/5/2020 - Purple - - - - 3 - Brice Swyre - Tax Accountant - Carroll Group - China - 8/15/2020 - Red - - - - 4 - Marjy Ferencz - Office Assistant I - Rowe-Schoen - Russia - 3/25/2021 - Crimson - - - - 5 - Yancy Tear - Community Outreach Specialist - Wyman-Ledner - Brazil - 5/22/2020 - Indigo - - - - 6 - Irma Vasilik - Editor - Wiza, Bins and Emard - Venezuela - 12/8/2020 - Purple - - - - 7 - Meghann Durtnal - Staff Accountant IV - Schuster-Schimmel - Philippines - 2/17/2021 - Yellow - - - - 8 - Sammy Seston - Accountant I - O'Hara, Welch and Keebler - Indonesia - 5/23/2020 - Crimson - - - - 9 - Lesya Tinham - Safety Technician IV - Turner-Kuhlman - Philippines - 2/21/2021 - Maroon - - - - 10 - Zaneta Tewkesbury - VP Marketing - Sauer LLC - Chad - 6/23/2020 - Green - - - - 11 - Andy Tipple - Librarian - Hilpert Group - Poland - 7/9/2020 - Indigo - - - - 12 - Sophi Biles - Recruiting Manager - Gutmann Inc - Indonesia - 2/12/2021 - Maroon - - - - 13 - Florida Garces - Web Developer IV - Gaylord, Pacocha and Baumbach - Poland - 5/31/2020 - Purple - - - - 14 - Maribespan Popping - Analyst Programmer - Deckow-Pouros - Portugal - 4/27/2021 - Aquamarine - - - - 15 - Moritz Dryburgh - Dental Hygienist - Schiller, Cole and Hackett - Sri Lanka - 8/8/2020 - Crimson - - - - 16 - Reid Semiras - Teacher - Sporer, Sipes and Rogahn - Poland - 7/30/2020 - Green - - - - 17 - Alec Lethby - Teacher - Reichel, Glover and Hamill - China - 2/28/2021 - Khaki - - - - 18 - Aland Wilber - Quality Control Specialist - Kshlerin, Rogahn and Swaniawski - Czech Republic - 9/29/2020 - Purple - - - - 19 - Teddie Duerden - Staff Accountant III - Pouros, Ullrich and Windler - France - 10/27/2020 - Aquamarine - - - - 20 - Lorelei Blackstone - Data Coordiator - Witting, Kutch and Greenfelder - Kazakhstan - 6/3/2020 - Red - - - - - - Name - Job - company - location - Last Login - Favorite Color - -
    -
    ; -}`,...(Y=(U=m.parameters)==null?void 0:U.docs)==null?void 0:Y.source}}};var $,X,nn;b.parameters={...b.parameters,docs:{...($=b.parameters)==null?void 0:$.docs,source:{originalSource:`({ - noCell, - ...args -}) => { - const renderRows = new Array(10).fill('').map(() => {renderRow(!noCell)}); - return
    - - {renderHeaders(!noCell)} - {renderRows} - {renderFooter(!noCell)} -
    -
    ; -}`,...(nn=(X=b.parameters)==null?void 0:X.docs)==null?void 0:nn.source}}};const gn=["Default","ActiveRow","HighlightsOnHover","Zebra","WithVisualElements","Xs","PinnedRowsOrColsNoCell"];export{g as ActiveRow,t as Default,f as HighlightsOnHover,b as PinnedRowsOrColsNoCell,u as WithVisualElements,m as Xs,h as Zebra,gn as __namedExportsOrder,vn as default}; diff --git a/docs/assets/Tabs.stories-CbArrvef.js b/docs/assets/Tabs.stories-CbArrvef.js new file mode 100644 index 00000000..4fd84833 --- /dev/null +++ b/docs/assets/Tabs.stories-CbArrvef.js @@ -0,0 +1,85 @@ +import{j as e}from"./jsx-runtime-BjG_zV1W.js";import{T as a}from"./index-CKvsACjx.js";import"./iframe-DDnXVYpC.js";import"./clsx-B-dksMZM.js";import"./bundle-mjs-yGZq-iow.js";const{Tab:I,RadioTab:J}=a,K={title:"Navigation/Tabs",component:a},l=s=>e.jsxs(a,{...s,children:[e.jsx(a.Tab,{children:"Tab 1"}),e.jsx(a.Tab,{active:!0,children:"Tab 2"}),e.jsx(a.Tab,{children:"Tab 3"})]}),i=l.bind({}),r=l.bind({});r.args={variant:"bordered"};const n=l.bind({});n.args={variant:"lifted"};const T=l.bind({});T.args={variant:"boxed"};const b=({size:s,...d})=>e.jsxs("div",{className:"flex flex-col items-center gap-6",children:[e.jsxs(a,{...d,size:"xs",children:[e.jsx(a.Tab,{children:"Tiny"}),e.jsx(a.Tab,{active:!0,children:"Tiny"}),e.jsx(a.Tab,{children:"Tiny"})]}),e.jsxs(a,{...d,size:"sm",children:[e.jsx(a.Tab,{children:"Small"}),e.jsx(a.Tab,{active:!0,children:"Small"}),e.jsx(a.Tab,{children:"Small"})]}),e.jsxs(a,{...d,size:"md",children:[e.jsx(a.Tab,{children:"Normal"}),e.jsx(a.Tab,{active:!0,children:"Normal"}),e.jsx(a.Tab,{children:"Normal"})]}),e.jsxs(a,{...d,size:"lg",children:[e.jsx(a.Tab,{children:"Large"}),e.jsx(a.Tab,{active:!0,children:"Large"}),e.jsx(a.Tab,{children:"Large"})]})]});b.argTypes={size:{control:!1}};b.args={variant:"lifted"};const t=s=>e.jsxs(a,{...s,children:[e.jsx(a.RadioTab,{name:"my_tabs_1",label:"Tab 1",contentClassName:"p-10",children:"Tab content 1"}),e.jsx(a.RadioTab,{name:"my_tabs_1",label:"Tab 2",contentClassName:"p-10",defaultChecked:!0,children:"Tab content 2"}),e.jsx(a.RadioTab,{name:"my_tabs_1",label:"Tab 3",contentClassName:"p-10",children:"Tab content 3"})]});t.args={variant:"bordered"};const o=s=>e.jsxs(a,{...s,children:[e.jsx(a.RadioTab,{name:"my_tabs_2",label:"Tab 1",contentClassName:"bg-base-100 border-base-300 rounded-box p-6",children:"Tab content 1"}),e.jsx(a.RadioTab,{name:"my_tabs_2",label:"Tab 2",contentClassName:"bg-base-100 border-base-300 rounded-box p-6",defaultChecked:!0,children:"Tab content 2"}),e.jsx(a.RadioTab,{name:"my_tabs_2",label:"Tab 3",contentClassName:"bg-base-100 border-base-300 rounded-box p-6",children:"Tab content 3"})]});o.args={className:"w-full my-10 lg:mx-10",variant:"lifted"};const c=s=>e.jsxs(a,{...s,children:[e.jsx(a.Tab,{children:"Tab 1"}),e.jsx(a.Tab,{color:"primary",bgColor:"yellow",borderColor:"orange",active:!0,children:"Tab 2"}),e.jsx(a.Tab,{children:"Tab 3"})]});c.args={className:"w-full my-10 lg:mx-10",variant:"lifted"};var m,u,p;i.parameters={...i.parameters,docs:{...(m=i.parameters)==null?void 0:m.docs,source:{originalSource:`args => { + return + Tab 1 + Tab 2 + Tab 3 + ; +}`,...(p=(u=i.parameters)==null?void 0:u.docs)==null?void 0:p.source}}};var g,x,h;r.parameters={...r.parameters,docs:{...(g=r.parameters)==null?void 0:g.docs,source:{originalSource:`args => { + return + Tab 1 + Tab 2 + Tab 3 + ; +}`,...(h=(x=r.parameters)==null?void 0:x.docs)==null?void 0:h.source}}};var j,v,_;n.parameters={...n.parameters,docs:{...(j=n.parameters)==null?void 0:j.docs,source:{originalSource:`args => { + return + Tab 1 + Tab 2 + Tab 3 + ; +}`,...(_=(v=n.parameters)==null?void 0:v.docs)==null?void 0:_.source}}};var y,f,C;T.parameters={...T.parameters,docs:{...(y=T.parameters)==null?void 0:y.docs,source:{originalSource:`args => { + return + Tab 1 + Tab 2 + Tab 3 + ; +}`,...(C=(f=T.parameters)==null?void 0:f.docs)==null?void 0:C.source}}};var R,N,S;b.parameters={...b.parameters,docs:{...(R=b.parameters)==null?void 0:R.docs,source:{originalSource:`({ + size, + ...args +}) => { + return
    + {/*xs*/} + + Tiny + Tiny + Tiny + + {/*sm*/} + + Small + Small + Small + + {/*md*/} + + Normal + Normal + Normal + + {/*lg*/} + + Large + Large + Large + +
    ; +}`,...(S=(N=b.parameters)==null?void 0:N.docs)==null?void 0:S.source}}};var z,L,B;t.parameters={...t.parameters,docs:{...(z=t.parameters)==null?void 0:z.docs,source:{originalSource:`args => { + return + + Tab content 1 + + + Tab content 2 + + + Tab content 3 + + ; +}`,...(B=(L=t.parameters)==null?void 0:L.docs)==null?void 0:B.source}}};var k,w,D;o.parameters={...o.parameters,docs:{...(k=o.parameters)==null?void 0:k.docs,source:{originalSource:`args => { + return + + Tab content 1 + + + Tab content 2 + + + Tab content 3 + + ; +}`,...(D=(w=o.parameters)==null?void 0:w.docs)==null?void 0:D.source}}};var E,W,O;c.parameters={...c.parameters,docs:{...(E=c.parameters)==null?void 0:E.docs,source:{originalSource:`args => { + return + Tab 1 + Tab 2 + Tab 3 + ; +}`,...(O=(W=c.parameters)==null?void 0:W.docs)==null?void 0:O.source}}};const M=["Default","Bordered","Lifted","Boxed","Sizes","RadioTabBordered","RadioTabLifted","TabsWithCustomColor"];export{r as Bordered,T as Boxed,i as Default,n as Lifted,t as RadioTabBordered,o as RadioTabLifted,b as Sizes,c as TabsWithCustomColor,M as __namedExportsOrder,K as default}; diff --git a/docs/assets/Tabs.stories-de3b9a31.js b/docs/assets/Tabs.stories-de3b9a31.js deleted file mode 100644 index 03c57699..00000000 --- a/docs/assets/Tabs.stories-de3b9a31.js +++ /dev/null @@ -1,85 +0,0 @@ -import{a as b,j as e}from"./tw-merge-4486aaf0.js";import{T as a}from"./index-4b7ed1ca.js";import"./index-f46741a2.js";import"./clsx.m-1229b3e0.js";const I={title:"Navigation/Tabs",component:a},m=s=>b(a,{...s,children:[e(a.Tab,{children:"Tab 1"}),e(a.Tab,{active:!0,children:"Tab 2"}),e(a.Tab,{children:"Tab 3"})]}),i=m.bind({}),n=m.bind({});n.args={variant:"bordered"};const T=m.bind({});T.args={variant:"lifted"};const t=m.bind({});t.args={variant:"boxed"};const r=({size:s,...l})=>b("div",{className:"flex flex-col items-center gap-6",children:[b(a,{...l,size:"xs",children:[e(a.Tab,{children:"Tiny"}),e(a.Tab,{active:!0,children:"Tiny"}),e(a.Tab,{children:"Tiny"})]}),b(a,{...l,size:"sm",children:[e(a.Tab,{children:"Small"}),e(a.Tab,{active:!0,children:"Small"}),e(a.Tab,{children:"Small"})]}),b(a,{...l,size:"md",children:[e(a.Tab,{children:"Normal"}),e(a.Tab,{active:!0,children:"Normal"}),e(a.Tab,{children:"Normal"})]}),b(a,{...l,size:"lg",children:[e(a.Tab,{children:"Large"}),e(a.Tab,{active:!0,children:"Large"}),e(a.Tab,{children:"Large"})]})]});r.argTypes={size:{control:!1}};r.args={variant:"lifted"};const o=s=>b(a,{...s,children:[e(a.RadioTab,{name:"my_tabs_1",label:"Tab 1",contentClassName:"p-10",children:"Tab content 1"}),e(a.RadioTab,{name:"my_tabs_1",label:"Tab 2",contentClassName:"p-10",defaultChecked:!0,children:"Tab content 2"}),e(a.RadioTab,{name:"my_tabs_1",label:"Tab 3",contentClassName:"p-10",children:"Tab content 3"})]});o.args={variant:"bordered"};const c=s=>b(a,{...s,children:[e(a.RadioTab,{name:"my_tabs_2",label:"Tab 1",contentClassName:"bg-base-100 border-base-300 rounded-box p-6",children:"Tab content 1"}),e(a.RadioTab,{name:"my_tabs_2",label:"Tab 2",contentClassName:"bg-base-100 border-base-300 rounded-box p-6",defaultChecked:!0,children:"Tab content 2"}),e(a.RadioTab,{name:"my_tabs_2",label:"Tab 3",contentClassName:"bg-base-100 border-base-300 rounded-box p-6",children:"Tab content 3"})]});c.args={className:"w-full my-10 lg:mx-10",variant:"lifted"};const d=s=>b(a,{...s,children:[e(a.Tab,{children:"Tab 1"}),e(a.Tab,{color:"primary",bgColor:"yellow",borderColor:"orange",active:!0,children:"Tab 2"}),e(a.Tab,{children:"Tab 3"})]});d.args={className:"w-full my-10 lg:mx-10",variant:"lifted"};var u,p,g;i.parameters={...i.parameters,docs:{...(u=i.parameters)==null?void 0:u.docs,source:{originalSource:`args => { - return - Tab 1 - Tab 2 - Tab 3 - ; -}`,...(g=(p=i.parameters)==null?void 0:p.docs)==null?void 0:g.source}}};var h,v,_;n.parameters={...n.parameters,docs:{...(h=n.parameters)==null?void 0:h.docs,source:{originalSource:`args => { - return - Tab 1 - Tab 2 - Tab 3 - ; -}`,...(_=(v=n.parameters)==null?void 0:v.docs)==null?void 0:_.source}}};var y,f,C;T.parameters={...T.parameters,docs:{...(y=T.parameters)==null?void 0:y.docs,source:{originalSource:`args => { - return - Tab 1 - Tab 2 - Tab 3 - ; -}`,...(C=(f=T.parameters)==null?void 0:f.docs)==null?void 0:C.source}}};var N,x,R;t.parameters={...t.parameters,docs:{...(N=t.parameters)==null?void 0:N.docs,source:{originalSource:`args => { - return - Tab 1 - Tab 2 - Tab 3 - ; -}`,...(R=(x=t.parameters)==null?void 0:x.docs)==null?void 0:R.source}}};var S,z,L;r.parameters={...r.parameters,docs:{...(S=r.parameters)==null?void 0:S.docs,source:{originalSource:`({ - size, - ...args -}) => { - return
    - {/*xs*/} - - Tiny - Tiny - Tiny - - {/*sm*/} - - Small - Small - Small - - {/*md*/} - - Normal - Normal - Normal - - {/*lg*/} - - Large - Large - Large - -
    ; -}`,...(L=(z=r.parameters)==null?void 0:z.docs)==null?void 0:L.source}}};var B,k,w;o.parameters={...o.parameters,docs:{...(B=o.parameters)==null?void 0:B.docs,source:{originalSource:`args => { - return - - Tab content 1 - - - Tab content 2 - - - Tab content 3 - - ; -}`,...(w=(k=o.parameters)==null?void 0:k.docs)==null?void 0:w.source}}};var j,D,W;c.parameters={...c.parameters,docs:{...(j=c.parameters)==null?void 0:j.docs,source:{originalSource:`args => { - return - - Tab content 1 - - - Tab content 2 - - - Tab content 3 - - ; -}`,...(W=(D=c.parameters)==null?void 0:D.docs)==null?void 0:W.source}}};var E,O,q;d.parameters={...d.parameters,docs:{...(E=d.parameters)==null?void 0:E.docs,source:{originalSource:`args => { - return - Tab 1 - Tab 2 - Tab 3 - ; -}`,...(q=(O=d.parameters)==null?void 0:O.docs)==null?void 0:q.source}}};const J=["Default","Bordered","Lifted","Boxed","Sizes","RadioTabBordered","RadioTabLifted","TabsWithCustomColor"];export{n as Bordered,t as Boxed,i as Default,T as Lifted,o as RadioTabBordered,c as RadioTabLifted,r as Sizes,d as TabsWithCustomColor,J as __namedExportsOrder,I as default}; diff --git a/docs/assets/Textarea.stories-BlH9tIA5.js b/docs/assets/Textarea.stories-BlH9tIA5.js new file mode 100644 index 00000000..9b1fce5b --- /dev/null +++ b/docs/assets/Textarea.stories-BlH9tIA5.js @@ -0,0 +1,19 @@ +import{j as a}from"./jsx-runtime-BjG_zV1W.js";import{e as g}from"./iframe-DDnXVYpC.js";import{c as b}from"./clsx-B-dksMZM.js";import{t as y}from"./bundle-mjs-yGZq-iow.js";const l=g.forwardRef(({color:e,size:r,dataTheme:d,className:p,...x},f)=>{const v=y("textarea",p,b({"textarea-xl":r==="xl","textarea-lg":r==="lg","textarea-md":r==="md","textarea-sm":r==="sm","textarea-xs":r==="xs","textarea-primary":e==="primary","textarea-secondary":e==="secondary","textarea-accent":e==="accent","textarea-ghost":e==="ghost","textarea-info":e==="info","textarea-success":e==="success","textarea-warning":e==="warning","textarea-error":e==="error"}));return a.jsx("textarea",{...x,"data-theme":d,className:v,ref:f})});try{l.displayName="Textarea",l.__docgenInfo={description:"",displayName:"Textarea",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"ghost"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xl"'},{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}}}}}catch{}try{l.displayName="Textarea",l.__docgenInfo={description:"",displayName:"Textarea",props:{dataTheme:{defaultValue:null,description:"",name:"dataTheme",required:!1,type:{name:"string"}},color:{defaultValue:null,description:"",name:"color",required:!1,type:{name:"enum",value:[{value:'"neutral"'},{value:'"primary"'},{value:'"secondary"'},{value:'"accent"'},{value:'"ghost"'},{value:'"info"'},{value:'"success"'},{value:'"warning"'},{value:'"error"'}]}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"enum",value:[{value:'"xl"'},{value:'"lg"'},{value:'"md"'},{value:'"sm"'},{value:'"xs"'}]}}}}}catch{}const w={title:"Data Input/Textarea",component:l,args:{placeholder:"Bio",disabled:!1}},s=e=>a.jsx("div",{className:"flex w-full component-preview p-4 items-center justify-center gap-2 font-sans",children:a.jsx(l,{...e})}),t=e=>a.jsx("div",{className:"flex w-full component-preview p-4 items-center justify-center gap-2 font-sans",children:a.jsxs("div",{className:"form-control",children:[a.jsxs("label",{className:"label",children:[a.jsx("span",{className:"label-text",children:"Your bio"}),a.jsx("span",{className:"label-text-alt",children:"Alt label"})]}),a.jsx(l,{...e}),a.jsxs("label",{className:"label",children:[a.jsx("span",{className:"label-text-alt",children:"Your bio"}),a.jsx("span",{className:"label-text-alt",children:"Alt label"})]})]})});var n,c,o;s.parameters={...s.parameters,docs:{...(n=s.parameters)==null?void 0:n.docs,source:{originalSource:`args => { + return
    +