From 9f583d256e05371036ff0a74478c215a7da385d9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:01:05 -0400 Subject: [PATCH] chore(main): release 5.0.3 (#453) * chore(main): release 5.0.3 * docs: update storybook for latest release --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: benjitrosch --- CHANGELOG.md | 9 + ...ffdb7.js => Accordion.stories-4961aa02.js} | 2 +- ...-8fab7c9c.js => Alert.stories-066958fb.js} | 2 +- ...bdeecf.js => Artboard.stories-74886640.js} | 2 +- ...1d06148d.js => Avatar.stories-cd385f17.js} | 2 +- ...-7b666a07.js => Badge.stories-1e6185a7.js} | 2 +- ...s => BottomNavigation.stories-0f9a26f2.js} | 2 +- ...bfa.js => Breadcrumbs.stories-230ac743.js} | 2 +- ...f.js => BrowserMockup.stories-09f4d0d2.js} | 2 +- ...{Button-0a8fe609.js => Button-e31631bb.js} | 2 +- ...3b148e32.js => Button.stories-3c9570c5.js} | 2 +- ...s-378bd188.js => Card.stories-fc491d28.js} | 2 +- docs/assets/Carousel.stories-26686ca8.js | 76 ------ docs/assets/Carousel.stories-ee9a369c.js | 76 ++++++ ...27f7.js => ChatBubble.stories-9243605c.js} | 2 +- ...fcae51.js => Checkbox.stories-dd00ff2e.js} | 2 +- ...kup-5ec72808.js => CodeMockup-79bde71e.js} | 2 +- ...35b4.js => CodeMockup.stories-0e1270a0.js} | 2 +- ...97fe56.js => Collapse.stories-38f9c57c.js} | 2 +- ...035002f.js => CollapseContent-4c7c3cf3.js} | 2 +- ...js => CollapseDetails.stories-72a12026.js} | 2 +- ...fc611cf4.js => Color-6VNJS4EI-ed288457.js} | 2 +- ...995ac.js => Countdown.stories-af5338ba.js} | 2 +- ...s-35c5f12d.js => Diff.stories-e2916729.js} | 2 +- ...3400230.js => Divider.stories-001fec64.js} | 2 +- ...5.js => DocsRenderer-NNNQARDV-28daf507.js} | 2 +- ...b1cac731.js => Drawer.stories-a6f75e24.js} | 4 +- ...cb39ec.js => Dropdown.stories-6e700d32.js} | 2 +- ...js => DropdownDetails.stories-d1cc8002.js} | 2 +- ...2d76d.js => FileInput.stories-42f94857.js} | 2 +- ...1abc7582.js => Footer.stories-59363e51.js} | 2 +- .../{Hero-9639dab2.js => Hero-23d1d87a.js} | 2 +- ...s-c8982860.js => Hero.stories-0b1c8797.js} | 2 +- ...d02bd.js => Indicator.stories-e252f2de.js} | 2 +- ...-66d78c5c.js => Input.stories-978e40a8.js} | 2 +- .../{Join-47e05b2f.js => Join-455a80a9.js} | 2 +- ...s-7d97054f.js => Join.stories-8a733059.js} | 2 +- ...es-3e08ece8.js => Kbd.stories-31e5000d.js} | 2 +- ...s-a56412a8.js => Link.stories-8fcf5c31.js} | 2 +- ...d6dd8ad.js => Loading.stories-c583e0a9.js} | 2 +- ...s-7d824e09.js => Mask.stories-f37c3ece.js} | 2 +- ...s-1416ca38.js => Menu.stories-f9d7c6c6.js} | 2 +- ...-f09e75a4.js => Modal.stories-7069f46b.js} | 2 +- ...735.js => ModalLegacy.stories-841dd185.js} | 2 +- ...711af3b6.js => Navbar.stories-301a0ffe.js} | 2 +- ...e0df.js => Pagination.stories-a1632775.js} | 2 +- ...ddd.js => PhoneMockup.stories-9ec0dc15.js} | 2 +- ...a7b9ed.js => Progress.stories-e80e8fb7.js} | 2 +- ....js => RadialProgress.stories-d0a4fe39.js} | 2 +- ...-6447d64d.js => Radio.stories-e32ea42a.js} | 2 +- ...-5f9184f4.js => Range.stories-5da84674.js} | 2 +- ...ce64c5ed.js => Rating.stories-a9fc7b36.js} | 2 +- ...01a3e829.js => Select.stories-1015e6f6.js} | 2 +- ...bfd09f.js => Skeleton.stories-5010174e.js} | 2 +- ...-f5ed2702.js => Stack.stories-7a943654.js} | 2 +- ...-5e565e89.js => Stats.stories-2c14a0e7.js} | 2 +- ...-9bf95eaf.js => Steps.stories-d1823ecf.js} | 2 +- ...s-996cc5a4.js => Swap.stories-53784551.js} | 2 +- ...-110b5932.js => Table.stories-de6f1ca3.js} | 2 +- ...s-cfe6942c.js => Tabs.stories-de3b9a31.js} | 22 +- ...4e9d32.js => Textarea.stories-b5b3804b.js} | 2 +- ...-bdde02cb.js => Theme.stories-82c2a0e6.js} | 2 +- ...f3f07d.js => Timeline.stories-79fd806a.js} | 2 +- ...-a796136f.js => Toast.stories-ada5dfc8.js} | 2 +- ...2c7a644f.js => Toggle.stories-9c4f6579.js} | 2 +- ...4af35d5.js => Tooltip.stories-cb15cba9.js} | 2 +- ...elcome-91c679c4.js => Welcome-ca5e1982.js} | 2 +- ...be.js => WindowMockup.stories-4f05944e.js} | 2 +- docs/assets/WithTooltip-V3YHNWJZ-53a6b339.js | 1 - docs/assets/WithTooltip-V3YHNWJZ-c366436d.js | 1 + ...f0a10e90.js => chunk-6E673XPF-4294b5bd.js} | 4 +- ...-2845a20c.js => entry-preview-68f3d410.js} | 2 +- ...ea7c.js => entry-preview-docs-26e16aa4.js} | 2 +- ...f105.js => formatter-SWP5E3XI-1c1f4b29.js} | 2 +- docs/assets/iframe-79cad851.js | 1 - docs/assets/iframe-a2993c6a.js | 1 + docs/assets/index-0dd2673f.js | 1 - .../{index-6329c95a.js => index-13a2cfa3.js} | 2 +- .../{index-2ef8b458.js => index-13ca71f7.js} | 2 +- .../{index-44e44375.js => index-1453f494.js} | 2 +- docs/assets/index-1b03fe98.js | 9 - .../{index-0ee0d1a2.js => index-1b2f1137.js} | 2 +- .../{index-cdaabc1d.js => index-1d303440.js} | 2 +- docs/assets/index-269a29a7.js | 216 ------------------ .../{index-1c7a8ea4.js => index-31be5245.js} | 2 +- docs/assets/index-3dbaff96.js | 1 + .../{index-cdac515a.js => index-3ff73cf5.js} | 2 +- .../{index-1e3c83a2.js => index-44811f16.js} | 2 +- docs/assets/index-4b7ed1ca.js | 1 + .../{index-fa7a260c.js => index-57bfbf7f.js} | 2 +- .../{index-5a4bf744.js => index-7a860f54.js} | 2 +- .../{index-a55c3a76.js => index-8d7e61f2.js} | 2 +- .../{index-b7f38c25.js => index-8ea57d49.js} | 2 +- .../{index-c42c26b3.js => index-92e1ed70.js} | 2 +- .../{index-3802c17c.js => index-9795bb01.js} | 2 +- .../{index-6c8d164f.js => index-a3878ae0.js} | 2 +- .../{index-679b5f9b.js => index-b2a88d73.js} | 2 +- .../{index-d7bb098e.js => index-b7b0ffbb.js} | 2 +- docs/assets/index-c8ffa174.js | 216 ++++++++++++++++++ .../{index-6fd5a17b.js => index-d868a670.js} | 12 +- .../{index-147f7280.js => index-e214f816.js} | 2 +- .../{index-ccb0f6f2.js => index-e61e426b.js} | 2 +- .../{index-6ae1381f.js => index-e7261937.js} | 2 +- docs/assets/index-eb20e8d5.js | 1 - .../{index-e97e44e7.js => index-f4284876.js} | 2 +- docs/assets/index-f46741a2.js | 9 + docs/assets/preview-7e859ec2.js | 1 - docs/assets/preview-80d33a59.js | 1 + docs/assets/preview-a358fd5b.css | 1 + docs/assets/preview-aa8d89a8.css | 1 - ...review-92beb7da.js => preview-bd4e81b7.js} | 2 +- ...ct-18-5df836b6.js => react-18-3202c028.js} | 2 +- .../syntaxhighlighter-B5GMVT5T-47792712.js | 1 - .../syntaxhighlighter-MJWPISIS-7dca4051.js | 1 + ...merge-0a3648bd.js => tw-merge-4486aaf0.js} | 2 +- ...d47a597b.js => useGlobalTheme-43f467f6.js} | 2 +- .../{utils-25597068.js => utils-ae2eb491.js} | 2 +- docs/iframe.html | 2 +- docs/index.json | 2 +- docs/project.json | 2 +- .../essentials-actions-2/manager-bundle.js | 2 +- .../essentials-controls-1/manager-bundle.js | 50 ++-- .../WithTooltip-V3YHNWJZ-MXTFSDU5.js | 1 + .../WithTooltip-V3YHNWJZ-TRLNWEGW.js | 1 - .../{chunk-LVLAH4SI.js => chunk-5QAFKPS7.js} | 4 +- .../{chunk-CXYKRFSY.js => chunk-7PRFHFSS.js} | 2 +- .../{chunk-VFHDXWEA.js => chunk-XE6LDGTE.js} | 16 +- .../{chunk-4IYAVH3S.js => chunk-YDUB7CS6.js} | 8 +- docs/sb-manager/index.js | 2 +- docs/sb-manager/runtime.js | 2 +- ...=> syntaxhighlighter-MJWPISIS-JOSCT6CQ.js} | 2 +- docs/sb-preview/runtime.js | 2 +- docs/stories.json | 2 +- package-lock.json | 4 +- package.json | 2 +- 135 files changed, 486 insertions(+), 471 deletions(-) rename docs/assets/{Accordion.stories-153ffdb7.js => Accordion.stories-4961aa02.js} (97%) rename docs/assets/{Alert.stories-8fab7c9c.js => Alert.stories-066958fb.js} (96%) rename docs/assets/{Artboard.stories-82bdeecf.js => Artboard.stories-74886640.js} (97%) rename docs/assets/{Avatar.stories-1d06148d.js => Avatar.stories-cd385f17.js} (98%) rename docs/assets/{Badge.stories-7b666a07.js => Badge.stories-1e6185a7.js} (96%) rename docs/assets/{BottomNavigation.stories-e1b3f548.js => BottomNavigation.stories-0f9a26f2.js} (99%) rename docs/assets/{Breadcrumbs.stories-8ab9ebfa.js => Breadcrumbs.stories-230ac743.js} (97%) rename docs/assets/{BrowserMockup.stories-8fc338cf.js => BrowserMockup.stories-09f4d0d2.js} (96%) rename docs/assets/{Button-0a8fe609.js => Button-e31631bb.js} (94%) rename docs/assets/{Button.stories-3b148e32.js => Button.stories-3c9570c5.js} (98%) rename docs/assets/{Card.stories-378bd188.js => Card.stories-fc491d28.js} (94%) delete mode 100644 docs/assets/Carousel.stories-26686ca8.js create mode 100644 docs/assets/Carousel.stories-ee9a369c.js rename docs/assets/{ChatBubble.stories-7aae27f7.js => ChatBubble.stories-9243605c.js} (98%) rename docs/assets/{Checkbox.stories-c0fcae51.js => Checkbox.stories-dd00ff2e.js} (95%) rename docs/assets/{CodeMockup-5ec72808.js => CodeMockup-79bde71e.js} (93%) rename docs/assets/{CodeMockup.stories-c54235b4.js => CodeMockup.stories-0e1270a0.js} (96%) rename docs/assets/{Collapse.stories-6997fe56.js => Collapse.stories-38f9c57c.js} (98%) rename docs/assets/{CollapseContent-8035002f.js => CollapseContent-4c7c3cf3.js} (88%) rename docs/assets/{CollapseDetails.stories-af5e2dc5.js => CollapseDetails.stories-72a12026.js} (80%) rename docs/assets/{Color-6VNJS4EI-fc611cf4.js => Color-6VNJS4EI-ed288457.js} (99%) rename docs/assets/{Countdown.stories-efe995ac.js => Countdown.stories-af5338ba.js} (98%) rename docs/assets/{Diff.stories-35c5f12d.js => Diff.stories-e2916729.js} (94%) rename docs/assets/{Divider.stories-53400230.js => Divider.stories-001fec64.js} (97%) rename docs/assets/{DocsRenderer-NNNQARDV-c5cec535.js => DocsRenderer-NNNQARDV-28daf507.js} (56%) rename docs/assets/{Drawer.stories-b1cac731.js => Drawer.stories-a6f75e24.js} (81%) rename docs/assets/{Dropdown.stories-2acb39ec.js => Dropdown.stories-6e700d32.js} (94%) rename docs/assets/{DropdownDetails.stories-e877ce4a.js => DropdownDetails.stories-d1cc8002.js} (76%) rename docs/assets/{FileInput.stories-3482d76d.js => FileInput.stories-42f94857.js} (96%) rename docs/assets/{Footer.stories-1abc7582.js => Footer.stories-59363e51.js} (99%) rename docs/assets/{Hero-9639dab2.js => Hero-23d1d87a.js} (89%) rename docs/assets/{Hero.stories-c8982860.js => Hero.stories-0b1c8797.js} (94%) rename docs/assets/{Indicator.stories-337d02bd.js => Indicator.stories-e252f2de.js} (96%) rename docs/assets/{Input.stories-66d78c5c.js => Input.stories-978e40a8.js} (93%) rename docs/assets/{Join-47e05b2f.js => Join-455a80a9.js} (86%) rename docs/assets/{Join.stories-7d97054f.js => Join.stories-8a733059.js} (91%) rename docs/assets/{Kbd.stories-3e08ece8.js => Kbd.stories-31e5000d.js} (97%) rename docs/assets/{Link.stories-a56412a8.js => Link.stories-8fcf5c31.js} (87%) rename docs/assets/{Loading.stories-4d6dd8ad.js => Loading.stories-c583e0a9.js} (95%) rename docs/assets/{Mask.stories-7d824e09.js => Mask.stories-f37c3ece.js} (98%) rename docs/assets/{Menu.stories-1416ca38.js => Menu.stories-f9d7c6c6.js} (99%) rename docs/assets/{Modal.stories-f09e75a4.js => Modal.stories-7069f46b.js} (95%) rename docs/assets/{ModalLegacy.stories-3b3a8735.js => ModalLegacy.stories-841dd185.js} (94%) rename docs/assets/{Navbar.stories-711af3b6.js => Navbar.stories-301a0ffe.js} (97%) rename docs/assets/{Pagination.stories-a1f3e0df.js => Pagination.stories-a1632775.js} (96%) rename docs/assets/{PhoneMockup.stories-aaef4ddd.js => PhoneMockup.stories-9ec0dc15.js} (93%) rename docs/assets/{Progress.stories-c0a7b9ed.js => Progress.stories-e80e8fb7.js} (98%) rename docs/assets/{RadialProgress.stories-85b2e777.js => RadialProgress.stories-d0a4fe39.js} (95%) rename docs/assets/{Radio.stories-6447d64d.js => Radio.stories-e32ea42a.js} (95%) rename docs/assets/{Range.stories-5f9184f4.js => Range.stories-5da84674.js} (97%) rename docs/assets/{Rating.stories-ce64c5ed.js => Rating.stories-a9fc7b36.js} (98%) rename docs/assets/{Select.stories-01a3e829.js => Select.stories-1015e6f6.js} (96%) rename docs/assets/{Skeleton.stories-debfd09f.js => Skeleton.stories-5010174e.js} (95%) rename docs/assets/{Stack.stories-f5ed2702.js => Stack.stories-7a943654.js} (96%) rename docs/assets/{Stats.stories-5e565e89.js => Stats.stories-2c14a0e7.js} (97%) rename docs/assets/{Steps.stories-9bf95eaf.js => Steps.stories-d1823ecf.js} (98%) rename docs/assets/{Swap.stories-996cc5a4.js => Swap.stories-53784551.js} (97%) rename docs/assets/{Table.stories-110b5932.js => Table.stories-de6f1ca3.js} (99%) rename docs/assets/{Tabs.stories-cfe6942c.js => Tabs.stories-de3b9a31.js} (53%) rename docs/assets/{Textarea.stories-684e9d32.js => Textarea.stories-b5b3804b.js} (96%) rename docs/assets/{Theme.stories-bdde02cb.js => Theme.stories-82c2a0e6.js} (97%) rename docs/assets/{Timeline.stories-cbf3f07d.js => Timeline.stories-79fd806a.js} (99%) rename docs/assets/{Toast.stories-a796136f.js => Toast.stories-ada5dfc8.js} (95%) rename docs/assets/{Toggle.stories-2c7a644f.js => Toggle.stories-9c4f6579.js} (96%) rename docs/assets/{Tooltip.stories-f4af35d5.js => Tooltip.stories-cb15cba9.js} (94%) rename docs/assets/{Welcome-91c679c4.js => Welcome-ca5e1982.js} (85%) rename docs/assets/{WindowMockup.stories-636b25be.js => WindowMockup.stories-4f05944e.js} (97%) delete mode 100644 docs/assets/WithTooltip-V3YHNWJZ-53a6b339.js create mode 100644 docs/assets/WithTooltip-V3YHNWJZ-c366436d.js rename docs/assets/{chunk-EIRT5I3Z-f0a10e90.js => chunk-6E673XPF-4294b5bd.js} (79%) rename docs/assets/{entry-preview-2845a20c.js => entry-preview-68f3d410.js} (88%) rename docs/assets/{entry-preview-docs-829fea7c.js => entry-preview-docs-26e16aa4.js} (99%) rename docs/assets/{formatter-SWP5E3XI-9857f105.js => formatter-SWP5E3XI-1c1f4b29.js} (99%) delete mode 100644 docs/assets/iframe-79cad851.js create mode 100644 docs/assets/iframe-a2993c6a.js delete mode 100644 docs/assets/index-0dd2673f.js rename docs/assets/{index-6329c95a.js => index-13a2cfa3.js} (89%) rename docs/assets/{index-2ef8b458.js => index-13ca71f7.js} (86%) rename docs/assets/{index-44e44375.js => index-1453f494.js} (96%) delete mode 100644 docs/assets/index-1b03fe98.js rename docs/assets/{index-0ee0d1a2.js => index-1b2f1137.js} (94%) rename docs/assets/{index-cdaabc1d.js => index-1d303440.js} (88%) delete mode 100644 docs/assets/index-269a29a7.js rename docs/assets/{index-1c7a8ea4.js => index-31be5245.js} (96%) create mode 100644 docs/assets/index-3dbaff96.js rename docs/assets/{index-cdac515a.js => index-3ff73cf5.js} (94%) rename docs/assets/{index-1e3c83a2.js => index-44811f16.js} (91%) create mode 100644 docs/assets/index-4b7ed1ca.js rename docs/assets/{index-fa7a260c.js => index-57bfbf7f.js} (90%) rename docs/assets/{index-5a4bf744.js => index-7a860f54.js} (92%) rename docs/assets/{index-a55c3a76.js => index-8d7e61f2.js} (93%) rename docs/assets/{index-b7f38c25.js => index-8ea57d49.js} (97%) rename docs/assets/{index-c42c26b3.js => index-92e1ed70.js} (96%) rename docs/assets/{index-3802c17c.js => index-9795bb01.js} (94%) rename docs/assets/{index-6c8d164f.js => index-a3878ae0.js} (94%) rename docs/assets/{index-679b5f9b.js => index-b2a88d73.js} (94%) rename docs/assets/{index-d7bb098e.js => index-b7b0ffbb.js} (99%) create mode 100644 docs/assets/index-c8ffa174.js rename docs/assets/{index-6fd5a17b.js => index-d868a670.js} (65%) rename docs/assets/{index-147f7280.js => index-e214f816.js} (89%) rename docs/assets/{index-ccb0f6f2.js => index-e61e426b.js} (95%) rename docs/assets/{index-6ae1381f.js => index-e7261937.js} (96%) delete mode 100644 docs/assets/index-eb20e8d5.js rename docs/assets/{index-e97e44e7.js => index-f4284876.js} (93%) create mode 100644 docs/assets/index-f46741a2.js delete mode 100644 docs/assets/preview-7e859ec2.js create mode 100644 docs/assets/preview-80d33a59.js create mode 100644 docs/assets/preview-a358fd5b.css delete mode 100644 docs/assets/preview-aa8d89a8.css rename docs/assets/{preview-92beb7da.js => preview-bd4e81b7.js} (99%) rename docs/assets/{react-18-5df836b6.js => react-18-3202c028.js} (76%) delete mode 100644 docs/assets/syntaxhighlighter-B5GMVT5T-47792712.js create mode 100644 docs/assets/syntaxhighlighter-MJWPISIS-7dca4051.js rename docs/assets/{tw-merge-0a3648bd.js => tw-merge-4486aaf0.js} (99%) rename docs/assets/{useGlobalTheme-d47a597b.js => useGlobalTheme-43f467f6.js} (96%) rename docs/assets/{utils-25597068.js => utils-ae2eb491.js} (79%) create mode 100644 docs/sb-manager/WithTooltip-V3YHNWJZ-MXTFSDU5.js delete mode 100644 docs/sb-manager/WithTooltip-V3YHNWJZ-TRLNWEGW.js rename docs/sb-manager/{chunk-LVLAH4SI.js => chunk-5QAFKPS7.js} (94%) rename docs/sb-manager/{chunk-CXYKRFSY.js => chunk-7PRFHFSS.js} (99%) rename docs/sb-manager/{chunk-VFHDXWEA.js => chunk-XE6LDGTE.js} (86%) rename docs/sb-manager/{chunk-4IYAVH3S.js => chunk-YDUB7CS6.js} (97%) rename docs/sb-manager/{syntaxhighlighter-B5GMVT5T-EA5ASEYD.js => syntaxhighlighter-MJWPISIS-JOSCT6CQ.js} (54%) diff --git a/CHANGELOG.md b/CHANGELOG.md index e952b18c..04970489 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [5.0.3](https://github.com/daisyui/react-daisyui/compare/v5.0.2...v5.0.3) (2024-07-26) + + +### Miscellaneous + +* **Carousel:** added snap start utility ([50a5add](https://github.com/daisyui/react-daisyui/commit/50a5add71d22dff4b865135961d6e8124ea6e61b)) +* **Tab:** added bg and border colors (full support WIP) ([1cd081e](https://github.com/daisyui/react-daisyui/commit/1cd081e6a9a713c61ecdae73d0e9429bf82c16db)) +* upgraded daisyui version to 4.12.10 ([602bf54](https://github.com/daisyui/react-daisyui/commit/602bf54d8c3a3b7005faa083fe9890e24ef57e4a)) + ## [5.0.2](https://github.com/daisyui/react-daisyui/compare/v5.0.1...v5.0.2) (2024-07-26) diff --git a/docs/assets/Accordion.stories-153ffdb7.js b/docs/assets/Accordion.stories-4961aa02.js similarity index 97% rename from docs/assets/Accordion.stories-153ffdb7.js rename to docs/assets/Accordion.stories-4961aa02.js index a7f1b05a..378622c9 100644 --- a/docs/assets/Accordion.stories-153ffdb7.js +++ b/docs/assets/Accordion.stories-4961aa02.js @@ -1,4 +1,4 @@ -import{t as M,a as o,j as e,F as S}from"./tw-merge-0a3648bd.js";import{r as D}from"./index-1b03fe98.js";import{c as W}from"./clsx.m-1229b3e0.js";import{C as q,a as V}from"./CollapseContent-8035002f.js";import{J as E}from"./Join-47e05b2f.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 => { +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
diff --git a/docs/assets/Alert.stories-8fab7c9c.js b/docs/assets/Alert.stories-066958fb.js similarity index 96% rename from docs/assets/Alert.stories-8fab7c9c.js rename to docs/assets/Alert.stories-066958fb.js index 877051b9..63a87626 100644 --- a/docs/assets/Alert.stories-8fab7c9c.js +++ b/docs/assets/Alert.stories-066958fb.js @@ -1,4 +1,4 @@ -import{j as r,a as h}from"./tw-merge-0a3648bd.js";import{A as s}from"./index-fa7a260c.js";import{B as d}from"./Button-0a8fe609.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./index-a55c3a76.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 => { +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 }> diff --git a/docs/assets/Artboard.stories-82bdeecf.js b/docs/assets/Artboard.stories-74886640.js similarity index 97% rename from docs/assets/Artboard.stories-82bdeecf.js rename to docs/assets/Artboard.stories-74886640.js index 77d283f0..750537c3 100644 --- a/docs/assets/Artboard.stories-82bdeecf.js +++ b/docs/assets/Artboard.stories-74886640.js @@ -1,4 +1,4 @@ -import{t as dr,j as rr}from"./tw-merge-0a3648bd.js";import{r as ir}from"./index-1b03fe98.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:`({ +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 }) => { diff --git a/docs/assets/Avatar.stories-1d06148d.js b/docs/assets/Avatar.stories-cd385f17.js similarity index 98% rename from docs/assets/Avatar.stories-1d06148d.js rename to docs/assets/Avatar.stories-cd385f17.js index 5eafe93d..6de2eb12 100644 --- a/docs/assets/Avatar.stories-1d06148d.js +++ b/docs/assets/Avatar.stories-cd385f17.js @@ -1,4 +1,4 @@ -import{a as o,j as e}from"./tw-merge-0a3648bd.js";import{A as r}from"./index-6ae1381f.js";import{M as N}from"./index-3802c17c.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./utils-25597068.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 +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 diff --git a/docs/assets/Badge.stories-7b666a07.js b/docs/assets/Badge.stories-1e6185a7.js similarity index 96% rename from docs/assets/Badge.stories-7b666a07.js rename to docs/assets/Badge.stories-1e6185a7.js index 53f5d18a..15fe6beb 100644 --- a/docs/assets/Badge.stories-7b666a07.js +++ b/docs/assets/Badge.stories-1e6185a7.js @@ -1,4 +1,4 @@ -import{j as r,a as s}from"./tw-merge-0a3648bd.js";import{B as n}from"./index-ccb0f6f2.js";import{B as m}from"./Button-0a8fe609.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./index-a55c3a76.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 => { +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
diff --git a/docs/assets/BottomNavigation.stories-e1b3f548.js b/docs/assets/BottomNavigation.stories-0f9a26f2.js similarity index 99% rename from docs/assets/BottomNavigation.stories-e1b3f548.js rename to docs/assets/BottomNavigation.stories-0f9a26f2.js index 2ffb88a7..60375b25 100644 --- a/docs/assets/BottomNavigation.stories-e1b3f548.js +++ b/docs/assets/BottomNavigation.stories-0f9a26f2.js @@ -1,4 +1,4 @@ -import{t as x,j as o,a as e,F as u}from"./tw-merge-0a3648bd.js";import{r as L}from"./index-1b03fe98.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 => { +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 diff --git a/docs/assets/Breadcrumbs.stories-8ab9ebfa.js b/docs/assets/Breadcrumbs.stories-230ac743.js similarity index 97% rename from docs/assets/Breadcrumbs.stories-8ab9ebfa.js rename to docs/assets/Breadcrumbs.stories-230ac743.js index ba1392df..bfb427a3 100644 --- a/docs/assets/Breadcrumbs.stories-8ab9ebfa.js +++ b/docs/assets/Breadcrumbs.stories-230ac743.js @@ -1,4 +1,4 @@ -import{j as e,F as y,t as H,a}from"./tw-merge-0a3648bd.js";import{R as L}from"./index-1b03fe98.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 => { +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 diff --git a/docs/assets/BrowserMockup.stories-8fc338cf.js b/docs/assets/BrowserMockup.stories-09f4d0d2.js similarity index 96% rename from docs/assets/BrowserMockup.stories-8fc338cf.js rename to docs/assets/BrowserMockup.stories-09f4d0d2.js index eae5384f..3272a380 100644 --- a/docs/assets/BrowserMockup.stories-8fc338cf.js +++ b/docs/assets/BrowserMockup.stories-09f4d0d2.js @@ -1 +1 @@ -import{t as u,a as E,j as n}from"./tw-merge-0a3648bd.js";import{r as S}from"./index-1b03fe98.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}; +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/Button-0a8fe609.js b/docs/assets/Button-e31631bb.js similarity index 94% rename from docs/assets/Button-0a8fe609.js rename to docs/assets/Button-e31631bb.js index 2a8b2e56..feddbc54 100644 --- a/docs/assets/Button-0a8fe609.js +++ b/docs/assets/Button-e31631bb.js @@ -1 +1 @@ -import{t as _,j as y,a as N}from"./tw-merge-0a3648bd.js";import{r as B}from"./index-1b03fe98.js";import{c as E}from"./clsx.m-1229b3e0.js";import{L as R}from"./index-a55c3a76.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}; +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-3b148e32.js b/docs/assets/Button.stories-3c9570c5.js similarity index 98% rename from docs/assets/Button.stories-3b148e32.js rename to docs/assets/Button.stories-3c9570c5.js index 07d223b1..b545d067 100644 --- a/docs/assets/Button.stories-3b148e32.js +++ b/docs/assets/Button.stories-3c9570c5.js @@ -1,4 +1,4 @@ -import{j as t,a as n}from"./tw-merge-0a3648bd.js";import{B as e}from"./Button-0a8fe609.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./index-a55c3a76.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 => { +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
diff --git a/docs/assets/Card.stories-378bd188.js b/docs/assets/Card.stories-fc491d28.js similarity index 94% rename from docs/assets/Card.stories-378bd188.js rename to docs/assets/Card.stories-fc491d28.js index c3bee05c..ad48e9ea 100644 --- a/docs/assets/Card.stories-378bd188.js +++ b/docs/assets/Card.stories-fc491d28.js @@ -1,4 +1,4 @@ -import{a as o,j as e}from"./tw-merge-0a3648bd.js";import{C as s}from"./index-c42c26b3.js";import{B as d}from"./Button-0a8fe609.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./index-a55c3a76.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 => { +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 diff --git a/docs/assets/Carousel.stories-26686ca8.js b/docs/assets/Carousel.stories-26686ca8.js deleted file mode 100644 index c5bd800e..00000000 --- a/docs/assets/Carousel.stories-26686ca8.js +++ /dev/null @@ -1,76 +0,0 @@ -import{t as ie,a as i,j as t,F as E}from"./tw-merge-0a3648bd.js";import{r}from"./index-1b03fe98.js";import{c as R}from"./clsx.m-1229b3e0.js";import{B as F}from"./Button-0a8fe609.js";import"./index-a55c3a76.js";const B=({children:s,innerRef:c,src:m,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:[r.cloneElement(l("❮"),{onClick:w}),r.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:c,className:q,children:[m?t("img",{src:m,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=r.forwardRef(({children:s,display:c="slider",snap:m,vertical:v,width:x,buttonStyle:u,dataTheme:N,className:l,...w},C)=>{const _=ie("carousel",l,R({"carousel-center":m==="center","carousel-end":m==="end","carousel-vertical":v,"w-full":c!=="slider"})),[I,q]=r.useState([]),[S,V]=r.useState(0);r.useEffect(()=>{const o=[];s.map(a=>{o.push(r.createRef())}),q(o)},[s]);const k=o=>{var a;(a=I[o].current)==null||a.scrollIntoView({behavior:"smooth",block:"nearest",inline:m}),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)=>r.cloneElement(o,{key:a,innerRef:I[a],index:a+1,children:o.props.children,src:o.props.src,alt:o.props.alt,width:c!=="slider"?"full":x,hasButtons:c==="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}))}),c==="numbered"&&t("div",{className:"flex justify-center w-full py-2 gap-2",children:s.map((o,a)=>u!=null?r.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 c=m=>t(F,{color:"primary",children:m});return s.buttonStyle=c,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/Carousel.stories-ee9a369c.js b/docs/assets/Carousel.stories-ee9a369c.js new file mode 100644 index 00000000..f31e8a86 --- /dev/null +++ b/docs/assets/Carousel.stories-ee9a369c.js @@ -0,0 +1,76 @@ +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-7aae27f7.js b/docs/assets/ChatBubble.stories-9243605c.js similarity index 98% rename from docs/assets/ChatBubble.stories-7aae27f7.js rename to docs/assets/ChatBubble.stories-9243605c.js index 9d835f6b..ef2a1d26 100644 --- a/docs/assets/ChatBubble.stories-7aae27f7.js +++ b/docs/assets/ChatBubble.stories-9243605c.js @@ -1,4 +1,4 @@ -import{j as a,t as b,a as r,F as u}from"./tw-merge-0a3648bd.js";import{R as h,r as P}from"./index-1b03fe98.js";import{A as G}from"./index-6ae1381f.js";import{c as L}from"./clsx.m-1229b3e0.js";import"./utils-25597068.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:`({ +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, diff --git a/docs/assets/Checkbox.stories-c0fcae51.js b/docs/assets/Checkbox.stories-dd00ff2e.js similarity index 95% rename from docs/assets/Checkbox.stories-c0fcae51.js rename to docs/assets/Checkbox.stories-dd00ff2e.js index 1e5ae0db..2aa3d5d5 100644 --- a/docs/assets/Checkbox.stories-c0fcae51.js +++ b/docs/assets/Checkbox.stories-dd00ff2e.js @@ -1,4 +1,4 @@ -import{a as R,j as r}from"./tw-merge-0a3648bd.js";import{C as a}from"./index-5a4bf744.js";import{F as m}from"./index-cdaabc1d.js";import"./index-1b03fe98.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 => { +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 ; diff --git a/docs/assets/CodeMockup-5ec72808.js b/docs/assets/CodeMockup-79bde71e.js similarity index 93% rename from docs/assets/CodeMockup-5ec72808.js rename to docs/assets/CodeMockup-79bde71e.js index 282bd9ea..2bb6ab74 100644 --- a/docs/assets/CodeMockup-5ec72808.js +++ b/docs/assets/CodeMockup-79bde71e.js @@ -1 +1 @@ -import{t as m,j as d}from"./tw-merge-0a3648bd.js";import{r as f,R as u}from"./index-1b03fe98.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}; +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-c54235b4.js b/docs/assets/CodeMockup.stories-0e1270a0.js similarity index 96% rename from docs/assets/CodeMockup.stories-c54235b4.js rename to docs/assets/CodeMockup.stories-0e1270a0.js index 114946f1..6a26d486 100644 --- a/docs/assets/CodeMockup.stories-c54235b4.js +++ b/docs/assets/CodeMockup.stories-0e1270a0.js @@ -1,4 +1,4 @@ -import{j as r,a as b}from"./tw-merge-0a3648bd.js";import{C as e}from"./CodeMockup-5ec72808.js";import"./index-1b03fe98.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 => { +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 ; diff --git a/docs/assets/Collapse.stories-6997fe56.js b/docs/assets/Collapse.stories-38f9c57c.js similarity index 98% rename from docs/assets/Collapse.stories-6997fe56.js rename to docs/assets/Collapse.stories-38f9c57c.js index 565e4504..0285581c 100644 --- a/docs/assets/Collapse.stories-6997fe56.js +++ b/docs/assets/Collapse.stories-38f9c57c.js @@ -1,4 +1,4 @@ -import{a as n,j as s}from"./tw-merge-0a3648bd.js";import{r as Y}from"./index-1b03fe98.js";import{C as e}from"./index-679b5f9b.js";import"./clsx.m-1229b3e0.js";import"./CollapseContent-8035002f.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 => { +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 diff --git a/docs/assets/CollapseContent-8035002f.js b/docs/assets/CollapseContent-4c7c3cf3.js similarity index 88% rename from docs/assets/CollapseContent-8035002f.js rename to docs/assets/CollapseContent-4c7c3cf3.js index 91f949e7..5ff69fa1 100644 --- a/docs/assets/CollapseContent-8035002f.js +++ b/docs/assets/CollapseContent-4c7c3cf3.js @@ -1 +1 @@ -import{j as l,t as n}from"./tw-merge-0a3648bd.js";import{R as d}from"./index-1b03fe98.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}; +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/CollapseDetails.stories-af5e2dc5.js b/docs/assets/CollapseDetails.stories-72a12026.js similarity index 80% rename from docs/assets/CollapseDetails.stories-af5e2dc5.js rename to docs/assets/CollapseDetails.stories-72a12026.js index 7ae6669b..25818024 100644 --- a/docs/assets/CollapseDetails.stories-af5e2dc5.js +++ b/docs/assets/CollapseDetails.stories-72a12026.js @@ -1,4 +1,4 @@ -import{a as r,j as s}from"./tw-merge-0a3648bd.js";import{C as t}from"./index-679b5f9b.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./CollapseContent-8035002f.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 => { +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 diff --git a/docs/assets/Color-6VNJS4EI-fc611cf4.js b/docs/assets/Color-6VNJS4EI-ed288457.js similarity index 99% rename from docs/assets/Color-6VNJS4EI-fc611cf4.js rename to docs/assets/Color-6VNJS4EI-ed288457.js index 138c8999..6a1d9a2b 100644 --- a/docs/assets/Color-6VNJS4EI-fc611cf4.js +++ b/docs/assets/Color-6VNJS4EI-ed288457.js @@ -1 +1 @@ -import{n as M,d as ue,T as Me,F as Ce,I as $e,g as Ne}from"./index-269a29a7.js";import{R as h,r as b,g as fe}from"./index-1b03fe98.js";import{_ as Oe,i as J,a as Ie}from"./index-d7bb098e.js";import"./iframe-79cad851.js";import"../sb-preview/runtime.js";import"./chunk-EIRT5I3Z-f0a10e90.js";import"./index-6fd5a17b.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}; +import{n as M,d as ue,T as Me,F as Ce,I as $e,g as Ne}from"./index-c8ffa174.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-a2993c6a.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/Countdown.stories-efe995ac.js b/docs/assets/Countdown.stories-af5338ba.js similarity index 98% rename from docs/assets/Countdown.stories-efe995ac.js rename to docs/assets/Countdown.stories-af5338ba.js index f66c2099..94ee04bc 100644 --- a/docs/assets/Countdown.stories-efe995ac.js +++ b/docs/assets/Countdown.stories-af5338ba.js @@ -1,4 +1,4 @@ -import{t as S,j as a,a as o}from"./tw-merge-0a3648bd.js";import{r as u}from"./index-1b03fe98.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 => { +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(() => { diff --git a/docs/assets/Diff.stories-35c5f12d.js b/docs/assets/Diff.stories-e2916729.js similarity index 94% rename from docs/assets/Diff.stories-35c5f12d.js rename to docs/assets/Diff.stories-e2916729.js index 0eda9bc3..9ecc5709 100644 --- a/docs/assets/Diff.stories-35c5f12d.js +++ b/docs/assets/Diff.stories-e2916729.js @@ -1,4 +1,4 @@ -import{t as h,a as D,j as e}from"./tw-merge-0a3648bd.js";import{r as I}from"./index-1b03fe98.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:`({ +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 }) => }> diff --git a/docs/assets/Divider.stories-53400230.js b/docs/assets/Divider.stories-001fec64.js similarity index 97% rename from docs/assets/Divider.stories-53400230.js rename to docs/assets/Divider.stories-001fec64.js index a77bcd93..5bb7bc56 100644 --- a/docs/assets/Divider.stories-53400230.js +++ b/docs/assets/Divider.stories-001fec64.js @@ -1,4 +1,4 @@ -import{t as F,j as e,a as o}from"./tw-merge-0a3648bd.js";import{r as G}from"./index-1b03fe98.js";import{c as J}from"./clsx.m-1229b3e0.js";import{C as d}from"./index-c42c26b3.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:`({ +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 }) => { diff --git a/docs/assets/DocsRenderer-NNNQARDV-c5cec535.js b/docs/assets/DocsRenderer-NNNQARDV-28daf507.js similarity index 56% rename from docs/assets/DocsRenderer-NNNQARDV-c5cec535.js rename to docs/assets/DocsRenderer-NNNQARDV-28daf507.js index 8f6c0507..fdb2a2a0 100644 --- a/docs/assets/DocsRenderer-NNNQARDV-c5cec535.js +++ b/docs/assets/DocsRenderer-NNNQARDV-28daf507.js @@ -1 +1 @@ -import{_ as p}from"./iframe-79cad851.js";import{R as e,r as c}from"./index-1b03fe98.js";import{r as l,u}from"./react-18-5df836b6.js";import{C as h,A as E,H as d,D as x}from"./index-269a29a7.js";import"../sb-preview/runtime.js";import"./index-6fd5a17b.js";import"./chunk-EIRT5I3Z-f0a10e90.js";import"./index-d7bb098e.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-0dd2673f.js"),["./index-0dd2673f.js","./index-2ef8b458.js","./index-1b03fe98.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}; +import{_ as p}from"./iframe-a2993c6a.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-c8ffa174.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/Drawer.stories-b1cac731.js b/docs/assets/Drawer.stories-a6f75e24.js similarity index 81% rename from docs/assets/Drawer.stories-b1cac731.js rename to docs/assets/Drawer.stories-a6f75e24.js index 3f0eed4a..dd002156 100644 --- a/docs/assets/Drawer.stories-b1cac731.js +++ b/docs/assets/Drawer.stories-a6f75e24.js @@ -1,4 +1,4 @@ -import{t as T,a as i,j as e}from"./tw-merge-0a3648bd.js";import{r as o}from"./index-1b03fe98.js";import{c}from"./clsx.m-1229b3e0.js";import{B as g}from"./Button-0a8fe609.js";import{N as F}from"./index-1e3c83a2.js";import{M as a}from"./index-44e44375.js";import"./index-a55c3a76.js";const h=({children:s,side:r,open:l,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":l,...L,"data-theme":t,className:R,children:[e("input",{type:"checkbox",className:c("drawer-toggle",O),checked:l,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}),r]})]})},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[r,l]=o.useState(!1),n=o.useCallback(()=>{l(t=>!t)},[]);return e(p,{...s,open:r,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[r,l]=o.useState(!1),n=o.useCallback(()=>{l(t=>!t)},[]);return e(p,{...s,open:r,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[r,l]=o.useState(!1),n=o.useCallback(()=>{l(t=>!t)},[]);return i(p,{...s,open:r,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[r,l]=o.useState(!1),n=o.useCallback(()=>{l(t=>!t)},[]);return e(p,{...s,open:r,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",contentClassName:"flex h-56 items-center justify-center",end:!0};var f,v,N;d.parameters={...d.parameters,docs:{...(f=d.parameters)==null?void 0:f.docs,source:{originalSource:`args => { +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); @@ -15,7 +15,7 @@ import{t as T,a as i,j as e}from"./tw-merge-0a3648bd.js";import{r as o}from"./in Open drawer ; -}`,...(N=(v=d.parameters)==null?void 0:v.docs)==null?void 0:N.source}}};var w,I,C;m.parameters={...m.parameters,docs:{...(w=m.parameters)==null?void 0:w.docs,source:{originalSource:`args => { +}`,...(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); diff --git a/docs/assets/Dropdown.stories-2acb39ec.js b/docs/assets/Dropdown.stories-6e700d32.js similarity index 94% rename from docs/assets/Dropdown.stories-2acb39ec.js rename to docs/assets/Dropdown.stories-6e700d32.js index 58e807ba..3b5e90c8 100644 --- a/docs/assets/Dropdown.stories-2acb39ec.js +++ b/docs/assets/Dropdown.stories-6e700d32.js @@ -1,4 +1,4 @@ -import{j as e,a as r}from"./tw-merge-0a3648bd.js";import{D as n}from"./index-b7f38c25.js";import{C as c}from"./index-c42c26b3.js";import{N as l}from"./index-1e3c83a2.js";import{B as y}from"./Button-0a8fe609.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./index-a55c3a76.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 => { +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 diff --git a/docs/assets/DropdownDetails.stories-e877ce4a.js b/docs/assets/DropdownDetails.stories-d1cc8002.js similarity index 76% rename from docs/assets/DropdownDetails.stories-e877ce4a.js rename to docs/assets/DropdownDetails.stories-d1cc8002.js index 8dfa4d41..69357c40 100644 --- a/docs/assets/DropdownDetails.stories-e877ce4a.js +++ b/docs/assets/DropdownDetails.stories-d1cc8002.js @@ -1,4 +1,4 @@ -import{j as r,a as t}from"./tw-merge-0a3648bd.js";import{D as e}from"./index-b7f38c25.js";import"./index-1b03fe98.js";import"./clsx.m-1229b3e0.js";import"./Button-0a8fe609.js";import"./index-a55c3a76.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 => { +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 diff --git a/docs/assets/FileInput.stories-3482d76d.js b/docs/assets/FileInput.stories-42f94857.js similarity index 96% rename from docs/assets/FileInput.stories-3482d76d.js rename to docs/assets/FileInput.stories-42f94857.js index f0656af0..a401653d 100644 --- a/docs/assets/FileInput.stories-3482d76d.js +++ b/docs/assets/FileInput.stories-42f94857.js @@ -1,4 +1,4 @@ -import{t as q,j as a,a as o}from"./tw-merge-0a3648bd.js";import{c as S}from"./clsx.m-1229b3e0.js";import{r as V}from"./index-1b03fe98.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 => { +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
diff --git a/docs/assets/Footer.stories-1abc7582.js b/docs/assets/Footer.stories-59363e51.js similarity index 99% rename from docs/assets/Footer.stories-1abc7582.js rename to docs/assets/Footer.stories-59363e51.js index 1df92404..594f2b33 100644 --- a/docs/assets/Footer.stories-1abc7582.js +++ b/docs/assets/Footer.stories-59363e51.js @@ -1,4 +1,4 @@ -import{t as C,j as e,a as n}from"./tw-merge-0a3648bd.js";import{R as _}from"./index-1b03fe98.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 => { +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