@stfrigerio/sito-template 0.1.36 → 0.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/setup.d.ts +2 -0
- package/dist/__tests__/setup.d.ts.map +1 -0
- package/dist/components/atoms/AllAtoms.stories.d.ts +1 -1
- package/dist/components/atoms/AllAtoms.stories.d.ts.map +1 -1
- package/dist/components/atoms/Button/Button.stories.d.ts +2 -14
- package/dist/components/atoms/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/atoms/Card/Card.stories.d.ts +4 -23
- package/dist/components/atoms/Card/Card.stories.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.stories.d.ts +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/dist/components/atoms/DateInput/DateInput.d.ts +1 -1
- package/dist/components/atoms/DateInput/DateInput.d.ts.map +1 -1
- package/dist/components/atoms/DateInput/DateInput.stories.d.ts +1 -1
- package/dist/components/atoms/DateInput/DateInput.stories.d.ts.map +1 -1
- package/dist/components/atoms/DecryptedText/DecryptedText.d.ts +50 -0
- package/dist/components/atoms/DecryptedText/DecryptedText.d.ts.map +1 -0
- package/dist/components/atoms/DecryptedText/index.d.ts +3 -0
- package/dist/components/atoms/DecryptedText/index.d.ts.map +1 -0
- package/dist/components/atoms/LoadingSpinner/LoadingSpinner.d.ts.map +1 -1
- package/dist/components/atoms/LoadingSpinner/LoadingSpinner.stories.d.ts +1 -1
- package/dist/components/atoms/LoadingSpinner/LoadingSpinner.stories.d.ts.map +1 -1
- package/dist/components/atoms/NumberStepper/NumberStepper.d.ts.map +1 -1
- package/dist/components/atoms/NumberStepper/NumberStepper.stories.d.ts +1 -1
- package/dist/components/atoms/NumberStepper/NumberStepper.stories.d.ts.map +1 -1
- package/dist/components/atoms/SearchableDropdown/SearchableDropdown.stories.d.ts +1 -1
- package/dist/components/atoms/SearchableDropdown/SearchableDropdown.stories.d.ts.map +1 -1
- package/dist/components/atoms/SelectInput/SelectInput.d.ts +4 -2
- package/dist/components/atoms/SelectInput/SelectInput.d.ts.map +1 -1
- package/dist/components/atoms/Slider/Slider.stories.d.ts +2 -10
- package/dist/components/atoms/Slider/Slider.stories.d.ts.map +1 -1
- package/dist/components/atoms/SoundDemo/SoundDemo.d.ts +11 -0
- package/dist/components/atoms/SoundDemo/SoundDemo.d.ts.map +1 -0
- package/dist/components/atoms/SoundDemo/SoundDemo.stories.d.ts +1 -1
- package/dist/components/atoms/SoundDemo/SoundDemo.stories.d.ts.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.d.ts.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.stories.d.ts +1 -1
- package/dist/components/atoms/TextArea/TextArea.stories.d.ts.map +1 -1
- package/dist/components/atoms/TextInput/TextInput.d.ts +1 -1
- package/dist/components/atoms/TextInput/TextInput.d.ts.map +1 -1
- package/dist/components/atoms/TextInput/TextInput.stories.d.ts +1 -4
- package/dist/components/atoms/TextInput/TextInput.stories.d.ts.map +1 -1
- package/dist/components/atoms/Toggle/Toggle.d.ts +5 -4
- package/dist/components/atoms/Toggle/Toggle.d.ts.map +1 -1
- package/dist/components/atoms/Toggle/Toggle.stories.d.ts +1 -1
- package/dist/components/atoms/Toggle/Toggle.stories.d.ts.map +1 -1
- package/dist/components/atoms/ToggleButton/ToggleButton.stories.d.ts +1 -1
- package/dist/components/atoms/ToggleButton/ToggleButton.stories.d.ts.map +1 -1
- package/dist/components/atoms/index.d.ts +2 -0
- package/dist/components/atoms/index.d.ts.map +1 -1
- package/dist/components/molecules/ArrayInput/ArrayInput.d.ts +3 -3
- package/dist/components/molecules/ArrayInput/ArrayInput.d.ts.map +1 -1
- package/dist/components/molecules/ArrayInput/ArrayInput.stories.d.ts +1 -1
- package/dist/components/molecules/ArrayInput/ArrayInput.stories.d.ts.map +1 -1
- package/dist/components/molecules/Breadcrumb/Breadcrumb.d.ts +28 -0
- package/dist/components/molecules/Breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/components/molecules/Breadcrumb/index.d.ts +3 -0
- package/dist/components/molecules/Breadcrumb/index.d.ts.map +1 -0
- package/dist/components/molecules/EditFAB/EditFAB.stories.d.ts +1 -1
- package/dist/components/molecules/EditFAB/EditFAB.stories.d.ts.map +1 -1
- package/dist/components/molecules/LiquidButton/LiquidButton.d.ts +33 -0
- package/dist/components/molecules/LiquidButton/LiquidButton.d.ts.map +1 -0
- package/dist/components/molecules/LiquidButton/index.d.ts +3 -0
- package/dist/components/molecules/LiquidButton/index.d.ts.map +1 -0
- package/dist/components/molecules/SearchBar/SearchBar.stories.d.ts +1 -1
- package/dist/components/molecules/SearchBar/SearchBar.stories.d.ts.map +1 -1
- package/dist/components/molecules/Tabs/Tabs.d.ts +1 -1
- package/dist/components/molecules/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/molecules/Tabs/Tabs.stories.d.ts +1 -1
- package/dist/components/molecules/Tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/components/molecules/ThemeSwitcher/ThemeSwitcher.d.ts +4 -3
- package/dist/components/molecules/ThemeSwitcher/ThemeSwitcher.d.ts.map +1 -1
- package/dist/components/molecules/ThemeSwitcher/ThemeSwitcher.stories.d.ts +1 -1
- package/dist/components/molecules/ThemeSwitcher/ThemeSwitcher.stories.d.ts.map +1 -1
- package/dist/components/molecules/TimeInput/TimeInput.stories.d.ts +1 -1
- package/dist/components/molecules/TimeInput/TimeInput.stories.d.ts.map +1 -1
- package/dist/components/molecules/Toast/Toast.d.ts +16 -0
- package/dist/components/molecules/Toast/Toast.d.ts.map +1 -0
- package/dist/components/molecules/Toast/index.d.ts +3 -0
- package/dist/components/molecules/Toast/index.d.ts.map +1 -0
- package/dist/components/molecules/index.d.ts +6 -0
- package/dist/components/molecules/index.d.ts.map +1 -1
- package/dist/components/organisms/Calendar/Calendar.d.ts +1 -1
- package/dist/components/organisms/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/organisms/Calendar/Calendar.stories.d.ts +1 -1
- package/dist/components/organisms/Calendar/Calendar.stories.d.ts.map +1 -1
- package/dist/components/organisms/ConfirmationModal/ConfirmationModal.d.ts +30 -0
- package/dist/components/organisms/ConfirmationModal/ConfirmationModal.d.ts.map +1 -0
- package/dist/components/organisms/ConfirmationModal/index.d.ts +3 -0
- package/dist/components/organisms/ConfirmationModal/index.d.ts.map +1 -0
- package/dist/components/organisms/ImageSlideshow/ImageSlideshow.d.ts +1 -1
- package/dist/components/organisms/ImageSlideshow/ImageSlideshow.d.ts.map +1 -1
- package/dist/components/organisms/ImageSlideshow/ImageSlideshow.stories.d.ts +1 -6
- package/dist/components/organisms/ImageSlideshow/ImageSlideshow.stories.d.ts.map +1 -1
- package/dist/components/organisms/Navbar/Navbar.d.ts +3 -2
- package/dist/components/organisms/Navbar/Navbar.d.ts.map +1 -1
- package/dist/components/organisms/Navbar/Navbar.stories.d.ts +1 -1
- package/dist/components/organisms/Navbar/Navbar.stories.d.ts.map +1 -1
- package/dist/components/organisms/Table/Table.d.ts +6 -6
- package/dist/components/organisms/Table/Table.d.ts.map +1 -1
- package/dist/components/organisms/Table/Table.stories.d.ts +26 -14
- package/dist/components/organisms/Table/Table.stories.d.ts.map +1 -1
- package/dist/components/organisms/ThemeProvider/ThemeProvider.d.ts +3 -1
- package/dist/components/organisms/ThemeProvider/ThemeProvider.d.ts.map +1 -1
- package/dist/components/organisms/charts/BooleansHeatmap/BooleansHeatmap.d.ts.map +1 -1
- package/dist/components/organisms/charts/BooleansHeatmap/BooleansHeatmap.stories.d.ts +1 -1
- package/dist/components/organisms/charts/BooleansHeatmap/BooleansHeatmap.stories.d.ts.map +1 -1
- package/dist/components/organisms/charts/MoodChart/MoodChart.stories.d.ts +1 -1
- package/dist/components/organisms/charts/MoodChart/MoodChart.stories.d.ts.map +1 -1
- package/dist/components/organisms/charts/PieChart/PieChart.d.ts.map +1 -1
- package/dist/components/organisms/charts/PieChart/PieChart.stories.d.ts +1 -1
- package/dist/components/organisms/charts/PieChart/PieChart.stories.d.ts.map +1 -1
- package/dist/components/organisms/charts/QuantifiableHabitsChart/QuantifiableHabitsChart.d.ts +2 -0
- package/dist/components/organisms/charts/QuantifiableHabitsChart/QuantifiableHabitsChart.d.ts.map +1 -1
- package/dist/components/organisms/charts/QuantifiableHabitsChart/QuantifiableHabitsChart.stories.d.ts +1 -1
- package/dist/components/organisms/charts/QuantifiableHabitsChart/QuantifiableHabitsChart.stories.d.ts.map +1 -1
- package/dist/components/organisms/charts/SleepChart/SleepChart.stories.d.ts +1 -1
- package/dist/components/organisms/charts/SleepChart/SleepChart.stories.d.ts.map +1 -1
- package/dist/components/organisms/charts/SunburstChart/SunburstChart.d.ts.map +1 -1
- package/dist/components/organisms/charts/SunburstChart/SunburstChart.stories.d.ts +1 -1
- package/dist/components/organisms/charts/SunburstChart/SunburstChart.stories.d.ts.map +1 -1
- package/dist/components/organisms/index.d.ts +3 -1
- package/dist/components/organisms/index.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +791 -490
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +809 -502
- package/dist/index.js.map +1 -1
- package/dist/stories/utils.d.ts +2 -2
- package/dist/stories/utils.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/themes/default.css +47 -0
- package/dist/themes/dmood.css +46 -0
- package/dist/themes/globals.css +110 -0
- package/dist/themes/lossito.css +52 -0
- package/dist/tokens/tokens.css +79 -0
- package/dist/utils/formUtils.d.ts +0 -5
- package/dist/utils/formUtils.d.ts.map +1 -1
- package/package.json +32 -10
- package/storybook-static/addon-visual-tests-assets/visual-test-illustration.mp4 +0 -0
- package/storybook-static/assets/3d/bar.glb +0 -0
- package/storybook-static/assets/3d/cube.glb +0 -0
- package/storybook-static/assets/3d/lens.glb +0 -0
- package/storybook-static/assets/ASCIIText.stories-C2xDENP3.js +82 -0
- package/storybook-static/assets/AllAtoms.stories-B6sDWol9.js +109 -0
- package/storybook-static/assets/AnimatedContent.stories-BsmULV3s.js +18 -0
- package/storybook-static/assets/AnimatedList-B3_lNwJZ.css +1 -0
- package/storybook-static/assets/AnimatedList.stories-CpaOS5Tg.js +26 -0
- package/storybook-static/assets/Antigravity.stories-Bt6bMzsu.js +19 -0
- package/storybook-static/assets/ArrayInput-CkUpk1TR.css +1 -0
- package/storybook-static/assets/ArrayInput.stories-DWAGBtBK.js +232 -0
- package/storybook-static/assets/Aurora-JSo3CGBi.css +1 -0
- package/storybook-static/assets/Aurora.stories-D2saYiRk.js +97 -0
- package/storybook-static/assets/Beams-BaZopjLr.css +1 -0
- package/storybook-static/assets/Beams.stories-BnM_wPsm.js +122 -0
- package/storybook-static/assets/BlobCursor-sr9FxN5W.css +1 -0
- package/storybook-static/assets/BlobCursor.stories-DDxFJs49.js +24 -0
- package/storybook-static/assets/BlurText.stories-Bpt2Pxty.js +11 -0
- package/storybook-static/assets/BooleansHeatmap-BV4VTyo6.css +1 -0
- package/storybook-static/assets/BooleansHeatmap.stories-3npXygec.js +123 -0
- package/storybook-static/assets/BorderGlow-BkXv9hP6.css +1 -0
- package/storybook-static/assets/BorderGlow.stories-Ctdci-vM.js +15 -0
- package/storybook-static/assets/BubbleMenu-C856-Amm.css +1 -0
- package/storybook-static/assets/BubbleMenu.stories-D0BfU9Sn.js +57 -0
- package/storybook-static/assets/Button-Bkr9S309.js +37 -0
- package/storybook-static/assets/Button-O-w2-ag3.css +1 -0
- package/storybook-static/assets/Button.stories-9jnfGkHf.js +93 -0
- package/storybook-static/assets/Calendar-BSjjdOp3.css +1 -0
- package/storybook-static/assets/Calendar.stories-Bv76X2vb.js +470 -0
- package/storybook-static/assets/Camera-BM3HOhP6.js +1 -0
- package/storybook-static/assets/Card-BLzDBn78.js +49 -0
- package/storybook-static/assets/Card-BxyVZ-1r.css +1 -0
- package/storybook-static/assets/Card.stories-BbHJW4z7.js +127 -0
- package/storybook-static/assets/CardNav-DJBuAE3a.css +1 -0
- package/storybook-static/assets/CardNav.stories-0AGDiezF.js +55 -0
- package/storybook-static/assets/Carousel-DQYq51gd.css +1 -0
- package/storybook-static/assets/Carousel.stories-TJ2kpedN.js +58 -0
- package/storybook-static/assets/Checkbox-CpADrZij.js +33 -0
- package/storybook-static/assets/Checkbox-DMUHtq9s.css +1 -0
- package/storybook-static/assets/Checkbox.stories-RTwjfwnG.js +83 -0
- package/storybook-static/assets/ChromaGrid-DuVAYWII.css +1 -0
- package/storybook-static/assets/ChromaGrid.stories-BQ3E28Hi.js +59 -0
- package/storybook-static/assets/CircularGallery-Dw0kM5fT.css +1 -0
- package/storybook-static/assets/CircularGallery.stories-DJqMMKX-.js +95 -0
- package/storybook-static/assets/CircularText-DofQkQcn.css +1 -0
- package/storybook-static/assets/CircularText.stories-BFdO2vvu.js +7 -0
- package/storybook-static/assets/ClickSpark.stories-C9eRAhrL.js +12 -0
- package/storybook-static/assets/Color-AVL7NMMY-_tP8XmFH.js +1 -0
- package/storybook-static/assets/Color-YRkaOI4u.js +1 -0
- package/storybook-static/assets/ColorBends-BkbPScKk.css +1 -0
- package/storybook-static/assets/ColorBends.stories-BzjHvboa.js +103 -0
- package/storybook-static/assets/CountUp.stories-C4KGivWd.js +11 -0
- package/storybook-static/assets/Counter-NM41Ofe9.css +1 -0
- package/storybook-static/assets/Counter.stories-D0YBBEvJ.js +15 -0
- package/storybook-static/assets/Crosshair.stories-DM0VkVrQ.js +6 -0
- package/storybook-static/assets/Cubes-BbZLRUsz.css +1 -0
- package/storybook-static/assets/Cubes.stories-CDK6pjAy.js +1 -0
- package/storybook-static/assets/CurvedLoop-DyoDI-mm.css +1 -0
- package/storybook-static/assets/CurvedLoop.stories-gsnw1c_E.js +9 -0
- package/storybook-static/assets/DarkVeil-CeIthsg1.css +1 -0
- package/storybook-static/assets/DarkVeil.stories-C5L7QoIF.js +79 -0
- package/storybook-static/assets/DateInput-C4-Rlnpy.css +1 -0
- package/storybook-static/assets/DateInput-DDPZqyBR.js +38 -0
- package/storybook-static/assets/DateInput.stories-B2N9buuW.js +119 -0
- package/storybook-static/assets/DecayCard-2Nc9J_8G.css +1 -0
- package/storybook-static/assets/DecayCard.stories-YGHrmyBt.js +8 -0
- package/storybook-static/assets/DecryptedText.stories-B5x1eEwu.js +15 -0
- package/storybook-static/assets/Dither-CDTFjgCl.css +1 -0
- package/storybook-static/assets/Dither.stories-1NJxvHAv.js +134 -0
- package/storybook-static/assets/Dock-DwLYexgF.css +1 -0
- package/storybook-static/assets/Dock.stories-BkL_Ddtn.js +40 -0
- package/storybook-static/assets/DocsRenderer-PQXLIZUC-e7izZ1Ax.js +1243 -0
- package/storybook-static/assets/EditFAB-CntUhqRB.css +1 -0
- package/storybook-static/assets/EditFAB.stories-CHva2s7W.js +378 -0
- package/storybook-static/assets/EvilEye-QIF3Ik1Y.css +1 -0
- package/storybook-static/assets/EvilEye.stories-QosS4nGr.js +103 -0
- package/storybook-static/assets/FadeContent.stories-CQDQC3hl.js +14 -0
- package/storybook-static/assets/FaultyTerminal-D6zQXJ-g.css +1 -0
- package/storybook-static/assets/FaultyTerminal.stories-CPrObG0w.js +224 -0
- package/storybook-static/assets/Fbo-CjO1EXQj.js +1 -0
- package/storybook-static/assets/FloatingLines-BPpNRsJk.css +1 -0
- package/storybook-static/assets/FloatingLines.stories-D3I_iw-g.js +187 -0
- package/storybook-static/assets/FlowingMenu-Cff-letA.css +1 -0
- package/storybook-static/assets/FlowingMenu.stories-BmR27_hE.js +27 -0
- package/storybook-static/assets/FluidGlass.stories-CrjfBTV6.js +490 -0
- package/storybook-static/assets/Folder-BFuU52Ao.css +1 -0
- package/storybook-static/assets/Folder.stories-DQJN6c0j.js +13 -0
- package/storybook-static/assets/FuzzyText.stories-zdwwY1Eh.js +22 -0
- package/storybook-static/assets/Galaxy-Cj2Xx-fN.css +1 -0
- package/storybook-static/assets/Galaxy.stories-B3moXy9j.js +184 -0
- package/storybook-static/assets/GhostCursor-CLKgvqwd.css +1 -0
- package/storybook-static/assets/GhostCursor.stories-l58_4Z7e.js +276 -0
- package/storybook-static/assets/GlareHover-D8gfoeb7.css +1 -0
- package/storybook-static/assets/GlareHover.stories-BRGDypMB.js +1 -0
- package/storybook-static/assets/GlassSurface-D51dj98P.css +1 -0
- package/storybook-static/assets/GlassSurface.stories-BghO_KVP.js +43 -0
- package/storybook-static/assets/GlitchText-CsL0nL6_.css +1 -0
- package/storybook-static/assets/GlitchText.stories-rGZAjXwr.js +8 -0
- package/storybook-static/assets/GooeyNav-8BBsSYWJ.css +1 -0
- package/storybook-static/assets/GooeyNav.stories-Ca-d0UXQ.js +24 -0
- package/storybook-static/assets/GradientBlinds-CBpfmlwu.css +1 -0
- package/storybook-static/assets/GradientBlinds.stories-BQDyziZr.js +136 -0
- package/storybook-static/assets/GradientText-Bsx4jZeS.css +1 -0
- package/storybook-static/assets/GradientText.stories-DgmckSCu.js +11 -0
- package/storybook-static/assets/Grainient.stories-8y3SuU8n.js +113 -0
- package/storybook-static/assets/GridMotion-GSkrJvrd.css +1 -0
- package/storybook-static/assets/GridMotion.stories-DbXQdTvS.js +6 -0
- package/storybook-static/assets/ImageSlideshow-CrquLxbj.css +1 -0
- package/storybook-static/assets/ImageSlideshow.stories-BXFPrrNl.js +385 -0
- package/storybook-static/assets/Iridescence-DkXB1G15.css +1 -0
- package/storybook-static/assets/Iridescence.stories-DuPTQ9Fo.js +47 -0
- package/storybook-static/assets/LaserFlow-YpDTX0s9.css +1 -0
- package/storybook-static/assets/LaserFlow.stories-DkwNBv4p.js +253 -0
- package/storybook-static/assets/LetterGlitch.stories-BqwpeJRY.js +1 -0
- package/storybook-static/assets/LightPillar-B1pSzH3x.css +1 -0
- package/storybook-static/assets/LightPillar.stories-BR4beWO5.js +103 -0
- package/storybook-static/assets/LightRays.stories-B3LIIkr4.js +114 -0
- package/storybook-static/assets/Lightning-Duov5diw.css +1 -0
- package/storybook-static/assets/Lightning.stories-DMfFw1rE.js +92 -0
- package/storybook-static/assets/LineWaves-CGZ5Tp0W.css +1 -0
- package/storybook-static/assets/LineWaves.stories-1wQVWsio.js +132 -0
- package/storybook-static/assets/LiquidChrome-C8jkHJD4.css +1 -0
- package/storybook-static/assets/LiquidChrome.stories-DjaXtUK6.js +60 -0
- package/storybook-static/assets/LiquidEther-BTKKmNQk.css +1 -0
- package/storybook-static/assets/LiquidEther.stories-CBrhorPT.js +161 -0
- package/storybook-static/assets/LoadingSpinner-1jvNgxlI.css +1 -0
- package/storybook-static/assets/LoadingSpinner-Cz1P0luX.js +49 -0
- package/storybook-static/assets/LoadingSpinner.stories-Es0dDszY.js +169 -0
- package/storybook-static/assets/MagicRings-B15iCWeD.css +1 -0
- package/storybook-static/assets/MagicRings.stories-BeLXvBv9.js +81 -0
- package/storybook-static/assets/Magnet.stories-CICXGf2j.js +12 -0
- package/storybook-static/assets/MagnetLines-BMVF8tvL.css +1 -0
- package/storybook-static/assets/MagnetLines.stories-D6mS1H0S.js +1 -0
- package/storybook-static/assets/Masonry-JijTuZ6o.css +1 -0
- package/storybook-static/assets/Masonry.stories-DeNkhLqR.js +53 -0
- package/storybook-static/assets/Mesh-CwXV3WjE.js +7 -0
- package/storybook-static/assets/MetaBalls-Do7Vo_Ig.css +1 -0
- package/storybook-static/assets/MetaBalls.stories-CJw3g9l_.js +63 -0
- package/storybook-static/assets/MetallicPaint-rQ3s8Y0v.css +1 -0
- package/storybook-static/assets/MetallicPaint.stories-DXrEd8Sz.js +159 -0
- package/storybook-static/assets/MoodChart-2hr_Y2GI.css +1 -0
- package/storybook-static/assets/MoodChart.stories-DYRAoHr7.js +40 -0
- package/storybook-static/assets/MotionConfigContext-C_Ro_xsO.js +1 -0
- package/storybook-static/assets/Navbar-BPWxCB-U.css +1 -0
- package/storybook-static/assets/Navbar.stories-B0_sa2Hr.js +325 -0
- package/storybook-static/assets/Noise-wMLTuki1.css +1 -0
- package/storybook-static/assets/Noise.stories-CFYN81ep.js +9 -0
- package/storybook-static/assets/NumberStepper-CWsYbCdm.js +110 -0
- package/storybook-static/assets/NumberStepper-C_00aeJp.css +1 -0
- package/storybook-static/assets/NumberStepper.stories-DtsWeT0-.js +436 -0
- package/storybook-static/assets/Orb-CS8T832d.css +1 -0
- package/storybook-static/assets/Orb.stories-CDw4x9GM.js +177 -0
- package/storybook-static/assets/OrbitImages-DqsOGdeH.css +1 -0
- package/storybook-static/assets/OrbitImages.stories-DLeS6BKi.js +26 -0
- package/storybook-static/assets/PieChart-OfDGlJ4g.css +1 -0
- package/storybook-static/assets/PieChart.stories-ByeJD3jM.js +199 -0
- package/storybook-static/assets/PixelBlast-xjKshbH4.css +1 -0
- package/storybook-static/assets/PixelBlast.stories-DZHlNBbC.js +211 -0
- package/storybook-static/assets/PixelCard-dyv8Jzsb.css +1 -0
- package/storybook-static/assets/PixelCard.stories-DD3uedTX.js +6 -0
- package/storybook-static/assets/PixelSnow-Mq8jFd6s.css +1 -0
- package/storybook-static/assets/PixelSnow.stories-GOOKq9Jo.js +155 -0
- package/storybook-static/assets/PixelTransition-4YlpcBIO.css +1 -0
- package/storybook-static/assets/PixelTransition.stories-7l0r4CEg.js +27 -0
- package/storybook-static/assets/Plasma-hc6I4S4K.css +1 -0
- package/storybook-static/assets/Plasma.stories-BNQMi2qs.js +78 -0
- package/storybook-static/assets/Prism-1A7MRUuH.css +1 -0
- package/storybook-static/assets/Prism.stories-DD-1CeHx.js +121 -0
- package/storybook-static/assets/PrismaticBurst-CJEX1JKp.css +1 -0
- package/storybook-static/assets/PrismaticBurst.stories-Bgr0PBrA.js +170 -0
- package/storybook-static/assets/ProfileCard-CO0Gk0e9.css +1 -0
- package/storybook-static/assets/ProfileCard.stories-DAHKcZT1.js +15 -0
- package/storybook-static/assets/QuantifiableHabitsChart-Bam6n9X_.css +1 -0
- package/storybook-static/assets/QuantifiableHabitsChart.stories-6RkqSLP7.js +105 -0
- package/storybook-static/assets/Radar-xwRKh0lP.css +1 -0
- package/storybook-static/assets/Radar.stories-BFyFeDmo.js +88 -0
- package/storybook-static/assets/Ribbons-CjSeVzzZ.css +1 -0
- package/storybook-static/assets/Ribbons.stories-D20uKPGq.js +132 -0
- package/storybook-static/assets/RippleGrid-NvomE-YP.css +1 -0
- package/storybook-static/assets/RippleGrid.stories-BKV-9TCI.js +113 -0
- package/storybook-static/assets/RotatingText-BGK56OzZ.css +1 -0
- package/storybook-static/assets/RotatingText.stories-BnBClUQv.js +12 -0
- package/storybook-static/assets/ScrollFloat-CuaI6iDB.css +1 -0
- package/storybook-static/assets/ScrollFloat.stories-tzqiOgHH.js +12 -0
- package/storybook-static/assets/ScrollReveal-7GSimuFY.css +1 -0
- package/storybook-static/assets/ScrollReveal.stories-4a1gyKmu.js +13 -0
- package/storybook-static/assets/ScrollTrigger-D1XJUMov.js +15 -0
- package/storybook-static/assets/ScrollVelocity-BQllEnJm.css +1 -0
- package/storybook-static/assets/ScrollVelocity.stories-1YFBGtbZ.js +9 -0
- package/storybook-static/assets/SearchBar-CYhuHFt7.css +1 -0
- package/storybook-static/assets/SearchBar.stories-T1tR-GmV.js +169 -0
- package/storybook-static/assets/SearchableDropdown-CLYLzeoj.css +1 -0
- package/storybook-static/assets/SearchableDropdown-DhEHRY6d.js +38 -0
- package/storybook-static/assets/SearchableDropdown.stories-E1pMIVn_.js +282 -0
- package/storybook-static/assets/SelectInput-BTPptV1H.css +1 -0
- package/storybook-static/assets/SelectInput-BrdH7gJ5.js +31 -0
- package/storybook-static/assets/SelectInput.stories-BJ8-v1VC.js +129 -0
- package/storybook-static/assets/ShapeBlur.stories-BD9LHX3y.js +131 -0
- package/storybook-static/assets/ShapeGrid-D5w-KuEm.css +1 -0
- package/storybook-static/assets/ShapeGrid.stories-MtqpqIIh.js +11 -0
- package/storybook-static/assets/ShinyText-D0_UmCBv.css +1 -0
- package/storybook-static/assets/ShinyText.stories-qP5FdChR.js +14 -0
- package/storybook-static/assets/Silk.stories-BHYeNKYP.js +62 -0
- package/storybook-static/assets/SleepChart-DBRb08s_.css +1 -0
- package/storybook-static/assets/SleepChart.stories-BcwHExRn.js +58 -0
- package/storybook-static/assets/Slider-A51SjNTF.js +32 -0
- package/storybook-static/assets/Slider-Bq7zObwV.css +1 -0
- package/storybook-static/assets/Slider.stories-lOqz9gMz.js +99 -0
- package/storybook-static/assets/SoftAurora-2A7ssVQp.css +1 -0
- package/storybook-static/assets/SoftAurora.stories-sSXHgJo6.js +147 -0
- package/storybook-static/assets/SoundDemo.stories-tUFyk4lU.js +3 -0
- package/storybook-static/assets/SplashCursor.stories-DerGqkHm.js +244 -0
- package/storybook-static/assets/SpotlightCard-Bi63T6N0.css +1 -0
- package/storybook-static/assets/SpotlightCard.stories-DBsgFOws.js +6 -0
- package/storybook-static/assets/Stack-CBKeDK5i.css +1 -0
- package/storybook-static/assets/Stack.stories-DAcB1tOU.js +32 -0
- package/storybook-static/assets/StaggeredMenu-DjV6Ra1C.css +1 -0
- package/storybook-static/assets/StaggeredMenu.stories-goFBD6nv.js +45 -0
- package/storybook-static/assets/StarBorder-isNlSycS.css +1 -0
- package/storybook-static/assets/StarBorder.stories-DBM6IkZW.js +9 -0
- package/storybook-static/assets/SunburstChart-ChXvU9py.css +1 -0
- package/storybook-static/assets/SunburstChart.stories-cY39K-7Q.js +285 -0
- package/storybook-static/assets/Table-DnhtoClE.css +1 -0
- package/storybook-static/assets/Table.stories-rAe1I70z.js +227 -0
- package/storybook-static/assets/Tabs-BfJ7skOE.css +1 -0
- package/storybook-static/assets/Tabs.stories-D3bsFZfU.js +64 -0
- package/storybook-static/assets/TargetCursor-CWS-TuGF.css +1 -0
- package/storybook-static/assets/TargetCursor.stories-uvcMTfQh.js +9 -0
- package/storybook-static/assets/TextArea-B2UrQsuf.css +1 -0
- package/storybook-static/assets/TextArea-CbqMjFCN.js +28 -0
- package/storybook-static/assets/TextArea.stories-CuMypTf4.js +155 -0
- package/storybook-static/assets/TextCursor-DDqF-3pV.css +1 -0
- package/storybook-static/assets/TextCursor.stories-Bu6iMunU.js +11 -0
- package/storybook-static/assets/TextInput-BjVJQEYN.css +1 -0
- package/storybook-static/assets/TextInput-BpsPIO3D.js +28 -0
- package/storybook-static/assets/TextInput.stories-C0oXgEQ2.js +203 -0
- package/storybook-static/assets/TextPressure.stories-DNGUmrTD.js +47 -0
- package/storybook-static/assets/TextType-BYHLKnc2.css +1 -0
- package/storybook-static/assets/TextType.stories-BKNycUNL.js +19 -0
- package/storybook-static/assets/Texture-BkQWYNP2.js +1 -0
- package/storybook-static/assets/ThemeSwitcher-XCVQ6hhy.css +1 -0
- package/storybook-static/assets/ThemeSwitcher.stories-D5lsOFPy.js +62 -0
- package/storybook-static/assets/Threads-C5ItmUMV.css +1 -0
- package/storybook-static/assets/Threads.stories-VyvPNiLc.js +121 -0
- package/storybook-static/assets/TimeInput-C3enPYoV.css +1 -0
- package/storybook-static/assets/TimeInput.stories-BC5vDv_Y.js +55 -0
- package/storybook-static/assets/Toggle-BZxwy2el.js +41 -0
- package/storybook-static/assets/Toggle-DhKq5lh5.css +1 -0
- package/storybook-static/assets/Toggle.stories-VQMzqzt7.js +199 -0
- package/storybook-static/assets/ToggleButton-CijvK4iQ.js +32 -0
- package/storybook-static/assets/ToggleButton-DJU3CV_i.css +1 -0
- package/storybook-static/assets/ToggleButton.stories-DY0c1Gny.js +163 -0
- package/storybook-static/assets/Triangle-64ffRKNB.js +1 -0
- package/storybook-static/assets/TrueFocus-C4c7GDsQ.css +1 -0
- package/storybook-static/assets/TrueFocus.stories-DEScRjfz.js +12 -0
- package/storybook-static/assets/VariableProximity-E64p6UBv.css +1 -0
- package/storybook-static/assets/VariableProximity.stories-DbTKbjW_.js +14 -0
- package/storybook-static/assets/Vec2-Cf1C3GIc.js +1 -0
- package/storybook-static/assets/Waves-C7txy_IO.css +1 -0
- package/storybook-static/assets/Waves.stories-tLQsX0Mg.js +1 -0
- package/storybook-static/assets/arc-DgcIQOLP.js +1 -0
- package/storybook-static/assets/array-BKyUJesY.js +1 -0
- package/storybook-static/assets/axis-D3QohQNI.js +1 -0
- package/storybook-static/assets/check-CAskjz10.js +6 -0
- package/storybook-static/assets/chevron-down-BI8IU4ZZ.js +6 -0
- package/storybook-static/assets/chevron-right-DUHx58vO.js +6 -0
- package/storybook-static/assets/client-DFRPWCQR.js +1 -0
- package/storybook-static/assets/createLucideIcon-C7zEcVM7.js +21 -0
- package/storybook-static/assets/defaultLocale-DJ2q5QjE.js +1 -0
- package/storybook-static/assets/demo/cs1.webp +0 -0
- package/storybook-static/assets/demo/cs2.webp +0 -0
- package/storybook-static/assets/demo/cs3.webp +0 -0
- package/storybook-static/assets/folder-CR6tETf-.js +6 -0
- package/storybook-static/assets/iconBase-AISesxwq.js +1 -0
- package/storybook-static/assets/iframe-Cz1R6gKZ.js +1087 -0
- package/storybook-static/assets/iframe-Df7_64QT.css +1 -0
- package/storybook-static/assets/index-C2Ys00st.js +1 -0
- package/storybook-static/assets/index-C8pce-KX.js +15 -0
- package/storybook-static/assets/index-CIvCfZMj.js +9 -0
- package/storybook-static/assets/index-DcRHiSf7.js +128 -0
- package/storybook-static/assets/index-jFY_uKTI.js +24 -0
- package/storybook-static/assets/layout-grid-CE52it1h.js +6 -0
- package/storybook-static/assets/linear-dkJHgUri.js +1 -0
- package/storybook-static/assets/monotone-DHdPkfDP.js +1 -0
- package/storybook-static/assets/path-CbwjOpE9.js +1 -0
- package/storybook-static/assets/preload-helper-C1FmrZbK.js +1 -0
- package/storybook-static/assets/proxy-CAwOFzsk.js +1 -0
- package/storybook-static/assets/react-18-DoKaDswt.js +1 -0
- package/storybook-static/assets/react-three-fiber.esm-t8sCLCER.js +43 -0
- package/storybook-static/assets/search-DcwY6Xta.js +6 -0
- package/storybook-static/assets/sun-DeCJTUMz.js +11 -0
- package/storybook-static/assets/three.module--_vTUKhS.js +4057 -0
- package/storybook-static/assets/transform-BKmuZieF.js +1 -0
- package/storybook-static/assets/use-animation-frame-DhanRv3Z.js +1 -0
- package/storybook-static/assets/use-in-view-D50EZJ4s.js +1 -0
- package/storybook-static/assets/use-motion-value-BgGWOnBX.js +1 -0
- package/storybook-static/assets/use-spring-CKPLi_a5.js +1 -0
- package/storybook-static/assets/use-transform-CJxjUEuh.js +1 -0
- package/storybook-static/assets/useSound-DOpt9DfD.js +1 -0
- package/storybook-static/assets/users-C7jpE6gP.js +6 -0
- package/storybook-static/assets/x-CP8OMUcV.js +6 -0
- package/storybook-static/favicon-wrapper.svg +46 -0
- package/storybook-static/favicon.svg +1 -0
- package/storybook-static/iframe.html +693 -0
- package/storybook-static/index.html +164 -0
- package/storybook-static/index.json +1 -0
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +1 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-4/manager-bundle.js +356 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-4/manager-bundle.js.LEGAL.txt +40 -0
- package/storybook-static/sb-addons/docs-2/manager-bundle.js +151 -0
- package/storybook-static/sb-addons/links-3/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +127 -0
- package/storybook-static/sb-addons/storybook-5/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +971 -0
- package/storybook-static/sb-common-assets/favicon-wrapper.svg +46 -0
- package/storybook-static/sb-common-assets/favicon.svg +1 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-module-info.js +797 -0
- package/storybook-static/sb-manager/globals-runtime.js +69653 -0
- package/storybook-static/sb-manager/globals.js +34 -0
- package/storybook-static/sb-manager/runtime.js +13181 -0
- package/storybook-static/vite-inject-mocker-entry.js +18 -0
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import{j as e,r as C}from"./iframe-Cz1R6gKZ.js";import{S as r}from"./SearchableDropdown-DhEHRY6d.js";import{U as q}from"./users-C7jpE6gP.js";import{S as Q}from"./search-DcwY6Xta.js";import"./preload-helper-C1FmrZbK.js";import"./proxy-CAwOFzsk.js";import"./MotionConfigContext-C_Ro_xsO.js";import"./chevron-down-BI8IU4ZZ.js";import"./createLucideIcon-C7zEcVM7.js";import"./index-CIvCfZMj.js";import"./check-CAskjz10.js";const ie={title:"Atoms/SearchableDropdown",component:r,parameters:{layout:"centered",docs:{description:{component:"A dropdown component with built-in search functionality and smooth animations."}}},tags:["autodocs"],argTypes:{label:{control:"text",description:"Label for the dropdown"},value:{control:"text",description:"Currently selected value"},placeholder:{control:"text",description:"Placeholder text when no option is selected"},allowEmpty:{control:"boolean",description:"Whether to allow empty/no selection"},onChange:{action:"changed"}}},t=[{label:"United States",value:"us"},{label:"United Kingdom",value:"uk"},{label:"Canada",value:"ca"},{label:"Germany",value:"de"},{label:"France",value:"fr"},{label:"Italy",value:"it"},{label:"Spain",value:"es"},{label:"Japan",value:"jp"},{label:"Australia",value:"au"},{label:"Brazil",value:"br"}],u=[{label:"New York",value:"ny"},{label:"Los Angeles",value:"la"},{label:"Chicago",value:"chi"},{label:"Houston",value:"hou"},{label:"Phoenix",value:"phx"},{label:"Philadelphia",value:"phi"},{label:"San Antonio",value:"sa"},{label:"San Diego",value:"sd"},{label:"Dallas",value:"dal"},{label:"San Jose",value:"sj"}],s=[{label:"React",value:"react"},{label:"Vue.js",value:"vue"},{label:"Angular",value:"angular"},{label:"Svelte",value:"svelte"},{label:"TypeScript",value:"typescript"},{label:"JavaScript",value:"javascript"},{label:"Node.js",value:"nodejs"},{label:"Python",value:"python"},{label:"Java",value:"java"},{label:"C#",value:"csharp"},{label:"Go",value:"go"},{label:"Rust",value:"rust"}],y={args:{label:"Select Country",value:"",options:t,placeholder:"Choose a country",allowEmpty:!0,onChange:()=>{}}},m={args:{label:"Selected Country",value:"us",options:t,placeholder:"Choose a country",allowEmpty:!0,onChange:()=>{}}},g={args:{label:"Technology Stack",value:"react",options:s,placeholder:"Select technology",allowEmpty:!1,onChange:()=>{}}},b={args:{label:"Choose City",value:"",options:u,placeholder:"Search for a city",allowEmpty:!0,onChange:()=>{}}},v={args:{label:"Country",value:"",options:t,placeholder:"Search countries...",allowEmpty:!0,onChange:()=>{}},render:()=>{var p,c;const[l,d]=C.useState(""),[n,i]=C.useState("react");return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",width:"300px"},children:[e.jsx(r,{label:"Country",value:l,onChange:d,options:t,placeholder:"Search countries...",allowEmpty:!0}),e.jsx(r,{label:"Technology",value:n,onChange:i,options:s,placeholder:"Search technologies...",allowEmpty:!1}),e.jsxs("div",{style:{marginTop:"1rem",padding:"1rem",background:"#f5f5f5",borderRadius:"4px"},children:[e.jsx("p",{style:{margin:0,fontSize:"0.875rem"},children:e.jsx("strong",{children:"Selected Values:"})}),e.jsxs("ul",{style:{margin:"0.5rem 0 0",paddingLeft:"1.5rem",fontSize:"0.875rem"},children:[e.jsxs("li",{children:["Country: ",l?(p=t.find(o=>o.value===l))==null?void 0:p.label:"None"]}),e.jsxs("li",{children:["Technology: ",(c=s.find(o=>o.value===n))==null?void 0:c.label]})]})]})]})},parameters:{controls:{disable:!0}}},f={args:{label:"Country",value:"",options:t,placeholder:"Search for your country",allowEmpty:!1,onChange:()=>{}},render:()=>{var i,p,c;const[l,d]=C.useState({country:"",city:"",skills:""}),n=(o,h)=>{d(a=>({...a,[o]:h}))};return e.jsxs("div",{style:{padding:"1.5rem",background:"#fff",border:"1px solid #e0e0e0",borderRadius:"8px",maxWidth:"400px"},children:[e.jsxs("h3",{style:{marginTop:0,display:"flex",alignItems:"center",gap:"0.5rem"},children:[e.jsx(q,{})," User Profile"]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[e.jsx(r,{label:"Country",value:l.country,onChange:o=>n("country",o),options:t,placeholder:"Search for your country",allowEmpty:!1}),e.jsx(r,{label:"City",value:l.city,onChange:o=>n("city",o),options:u,placeholder:"Search for your city",allowEmpty:!0}),e.jsx(r,{label:"Primary Skill",value:l.skills,onChange:o=>n("skills",o),options:s,placeholder:"Search technologies",allowEmpty:!0})]}),e.jsxs("div",{style:{marginTop:"1rem",padding:"0.75rem",background:"#f8f9fa",borderRadius:"4px",fontSize:"0.875rem"},children:[e.jsx("strong",{children:"Profile Summary:"}),e.jsx("br",{}),"🌍 Country: ",l.country?(i=t.find(o=>o.value===l.country))==null?void 0:i.label:"Not specified",e.jsx("br",{}),"📍 City: ",l.city?(p=u.find(o=>o.value===l.city))==null?void 0:p.label:"Not specified",e.jsx("br",{}),"💻 Skills: ",l.skills?(c=s.find(o=>o.value===l.skills))==null?void 0:c.label:"Not specified"]})]})},parameters:{controls:{disable:!0}}},x={args:{label:"Location",value:"",options:u,placeholder:"Search locations...",allowEmpty:!0,onChange:()=>{}},render:()=>{var c,o,h;const[l,d]=C.useState({location:"",technology:"",experience:""}),n=[{label:"Entry Level (0-2 years)",value:"entry"},{label:"Mid Level (3-5 years)",value:"mid"},{label:"Senior Level (6-10 years)",value:"senior"},{label:"Lead/Principal (10+ years)",value:"lead"}],i=(a,K)=>{d(Y=>({...Y,[a]:K}))},p=()=>{d({location:"",technology:"",experience:""})};return e.jsxs("div",{style:{padding:"1.5rem",background:"#f8f9fa",border:"1px solid #dee2e6",borderRadius:"8px",maxWidth:"500px"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"1rem"},children:[e.jsxs("h3",{style:{margin:0,display:"flex",alignItems:"center",gap:"0.5rem"},children:[e.jsx(Q,{})," Job Search Filters"]}),e.jsx("button",{onClick:p,style:{padding:"0.25rem 0.75rem",fontSize:"0.75rem",backgroundColor:"transparent",border:"1px solid #6c757d",borderRadius:"4px",cursor:"pointer"},children:"Clear All"})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[e.jsx(r,{label:"Location",value:l.location,onChange:a=>i("location",a),options:u,placeholder:"Search locations...",allowEmpty:!0}),e.jsx(r,{label:"Technology",value:l.technology,onChange:a=>i("technology",a),options:s,placeholder:"Search technologies...",allowEmpty:!0}),e.jsx(r,{label:"Experience Level",value:l.experience,onChange:a=>i("experience",a),options:n,placeholder:"Select experience level...",allowEmpty:!0})]}),e.jsxs("div",{style:{marginTop:"1rem",padding:"0.75rem",background:"#fff",borderRadius:"4px",fontSize:"0.875rem"},children:[e.jsx("strong",{children:"Active Filters:"}),e.jsx("br",{}),!l.location&&!l.technology&&!l.experience?e.jsx("em",{children:"No filters applied"}):e.jsxs("ul",{style:{margin:"0.5rem 0 0",paddingLeft:"1.5rem"},children:[l.location&&e.jsxs("li",{children:["📍 ",(c=u.find(a=>a.value===l.location))==null?void 0:c.label]}),l.technology&&e.jsxs("li",{children:["💻 ",(o=s.find(a=>a.value===l.technology))==null?void 0:o.label]}),l.experience&&e.jsxs("li",{children:["🎯 ",(h=n.find(a=>a.value===l.experience))==null?void 0:h.label]})]})]})]})},parameters:{controls:{disable:!0}}},S={args:{label:"With Empty Option",value:"",options:t.slice(0,5),placeholder:"Choose...",allowEmpty:!0,onChange:()=>{}},render:()=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",width:"300px"},children:[e.jsx(r,{label:"With Empty Option",value:"",onChange:()=>{},options:t.slice(0,5),placeholder:"Choose...",allowEmpty:!0}),e.jsx(r,{label:"No Empty Option",value:"react",onChange:()=>{},options:s.slice(0,5),placeholder:"Choose...",allowEmpty:!1}),e.jsx(r,{label:"Pre-selected",value:"us",onChange:()=>{},options:t.slice(0,5),placeholder:"Choose...",allowEmpty:!0}),e.jsx(r,{label:"Long Options List",value:"",onChange:()=>{},options:s,placeholder:"Search technologies...",allowEmpty:!0})]}),parameters:{controls:{disable:!0}}};var w,E,j;y.parameters={...y.parameters,docs:{...(w=y.parameters)==null?void 0:w.docs,source:{originalSource:`{
|
|
2
|
+
args: {
|
|
3
|
+
label: 'Select Country',
|
|
4
|
+
value: '',
|
|
5
|
+
options: countryOptions,
|
|
6
|
+
placeholder: 'Choose a country',
|
|
7
|
+
allowEmpty: true,
|
|
8
|
+
onChange: () => {}
|
|
9
|
+
}
|
|
10
|
+
}`,...(j=(E=y.parameters)==null?void 0:E.docs)==null?void 0:j.source}}};var k,O,L;m.parameters={...m.parameters,docs:{...(k=m.parameters)==null?void 0:k.docs,source:{originalSource:`{
|
|
11
|
+
args: {
|
|
12
|
+
label: 'Selected Country',
|
|
13
|
+
value: 'us',
|
|
14
|
+
options: countryOptions,
|
|
15
|
+
placeholder: 'Choose a country',
|
|
16
|
+
allowEmpty: true,
|
|
17
|
+
onChange: () => {}
|
|
18
|
+
}
|
|
19
|
+
}`,...(L=(O=m.parameters)==null?void 0:O.docs)==null?void 0:L.source}}};var D,T,F;g.parameters={...g.parameters,docs:{...(D=g.parameters)==null?void 0:D.docs,source:{originalSource:`{
|
|
20
|
+
args: {
|
|
21
|
+
label: 'Technology Stack',
|
|
22
|
+
value: 'react',
|
|
23
|
+
options: techStackOptions,
|
|
24
|
+
placeholder: 'Select technology',
|
|
25
|
+
allowEmpty: false,
|
|
26
|
+
onChange: () => {}
|
|
27
|
+
}
|
|
28
|
+
}`,...(F=(T=g.parameters)==null?void 0:T.docs)==null?void 0:F.source}}};var P,N,R;b.parameters={...b.parameters,docs:{...(P=b.parameters)==null?void 0:P.docs,source:{originalSource:`{
|
|
29
|
+
args: {
|
|
30
|
+
label: 'Choose City',
|
|
31
|
+
value: '',
|
|
32
|
+
options: cityOptions,
|
|
33
|
+
placeholder: 'Search for a city',
|
|
34
|
+
allowEmpty: true,
|
|
35
|
+
onChange: () => {}
|
|
36
|
+
}
|
|
37
|
+
}`,...(R=(N=b.parameters)==null?void 0:N.docs)==null?void 0:R.source}}};var A,z,W;v.parameters={...v.parameters,docs:{...(A=v.parameters)==null?void 0:A.docs,source:{originalSource:`{
|
|
38
|
+
args: {
|
|
39
|
+
label: 'Country',
|
|
40
|
+
value: '',
|
|
41
|
+
options: countryOptions,
|
|
42
|
+
placeholder: 'Search countries...',
|
|
43
|
+
allowEmpty: true,
|
|
44
|
+
onChange: () => {}
|
|
45
|
+
},
|
|
46
|
+
render: () => {
|
|
47
|
+
const [selectedCountry, setSelectedCountry] = useState('');
|
|
48
|
+
const [selectedTech, setSelectedTech] = useState('react');
|
|
49
|
+
return <div style={{
|
|
50
|
+
display: 'flex',
|
|
51
|
+
flexDirection: 'column',
|
|
52
|
+
gap: '1rem',
|
|
53
|
+
width: '300px'
|
|
54
|
+
}}>
|
|
55
|
+
<SearchableDropdown label="Country" value={selectedCountry} onChange={setSelectedCountry} options={countryOptions} placeholder="Search countries..." allowEmpty={true} />
|
|
56
|
+
<SearchableDropdown label="Technology" value={selectedTech} onChange={setSelectedTech} options={techStackOptions} placeholder="Search technologies..." allowEmpty={false} />
|
|
57
|
+
<div style={{
|
|
58
|
+
marginTop: '1rem',
|
|
59
|
+
padding: '1rem',
|
|
60
|
+
background: '#f5f5f5',
|
|
61
|
+
borderRadius: '4px'
|
|
62
|
+
}}>
|
|
63
|
+
<p style={{
|
|
64
|
+
margin: 0,
|
|
65
|
+
fontSize: '0.875rem'
|
|
66
|
+
}}>
|
|
67
|
+
<strong>Selected Values:</strong>
|
|
68
|
+
</p>
|
|
69
|
+
<ul style={{
|
|
70
|
+
margin: '0.5rem 0 0',
|
|
71
|
+
paddingLeft: '1.5rem',
|
|
72
|
+
fontSize: '0.875rem'
|
|
73
|
+
}}>
|
|
74
|
+
<li>Country: {selectedCountry ? countryOptions.find(c => c.value === selectedCountry)?.label : 'None'}</li>
|
|
75
|
+
<li>Technology: {techStackOptions.find(t => t.value === selectedTech)?.label}</li>
|
|
76
|
+
</ul>
|
|
77
|
+
</div>
|
|
78
|
+
</div>;
|
|
79
|
+
},
|
|
80
|
+
parameters: {
|
|
81
|
+
controls: {
|
|
82
|
+
disable: true
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}`,...(W=(z=v.parameters)==null?void 0:z.docs)==null?void 0:W.source}}};var I,J,U;f.parameters={...f.parameters,docs:{...(I=f.parameters)==null?void 0:I.docs,source:{originalSource:`{
|
|
86
|
+
args: {
|
|
87
|
+
label: 'Country',
|
|
88
|
+
value: '',
|
|
89
|
+
options: countryOptions,
|
|
90
|
+
placeholder: 'Search for your country',
|
|
91
|
+
allowEmpty: false,
|
|
92
|
+
onChange: () => {}
|
|
93
|
+
},
|
|
94
|
+
render: () => {
|
|
95
|
+
const [profile, setProfile] = useState({
|
|
96
|
+
country: '',
|
|
97
|
+
city: '',
|
|
98
|
+
skills: ''
|
|
99
|
+
});
|
|
100
|
+
const handleChange = (field: keyof typeof profile, value: string) => {
|
|
101
|
+
setProfile(prev => ({
|
|
102
|
+
...prev,
|
|
103
|
+
[field]: value
|
|
104
|
+
}));
|
|
105
|
+
};
|
|
106
|
+
return <div style={{
|
|
107
|
+
padding: '1.5rem',
|
|
108
|
+
background: '#fff',
|
|
109
|
+
border: '1px solid #e0e0e0',
|
|
110
|
+
borderRadius: '8px',
|
|
111
|
+
maxWidth: '400px'
|
|
112
|
+
}}>
|
|
113
|
+
<h3 style={{
|
|
114
|
+
marginTop: 0,
|
|
115
|
+
display: 'flex',
|
|
116
|
+
alignItems: 'center',
|
|
117
|
+
gap: '0.5rem'
|
|
118
|
+
}}>
|
|
119
|
+
<Users /> User Profile
|
|
120
|
+
</h3>
|
|
121
|
+
<div style={{
|
|
122
|
+
display: 'flex',
|
|
123
|
+
flexDirection: 'column',
|
|
124
|
+
gap: '1rem'
|
|
125
|
+
}}>
|
|
126
|
+
<SearchableDropdown label="Country" value={profile.country} onChange={value => handleChange('country', value)} options={countryOptions} placeholder="Search for your country" allowEmpty={false} />
|
|
127
|
+
<SearchableDropdown label="City" value={profile.city} onChange={value => handleChange('city', value)} options={cityOptions} placeholder="Search for your city" allowEmpty={true} />
|
|
128
|
+
<SearchableDropdown label="Primary Skill" value={profile.skills} onChange={value => handleChange('skills', value)} options={techStackOptions} placeholder="Search technologies" allowEmpty={true} />
|
|
129
|
+
</div>
|
|
130
|
+
<div style={{
|
|
131
|
+
marginTop: '1rem',
|
|
132
|
+
padding: '0.75rem',
|
|
133
|
+
background: '#f8f9fa',
|
|
134
|
+
borderRadius: '4px',
|
|
135
|
+
fontSize: '0.875rem'
|
|
136
|
+
}}>
|
|
137
|
+
<strong>Profile Summary:</strong><br />
|
|
138
|
+
🌍 Country: {profile.country ? countryOptions.find(c => c.value === profile.country)?.label : 'Not specified'}<br />
|
|
139
|
+
📍 City: {profile.city ? cityOptions.find(c => c.value === profile.city)?.label : 'Not specified'}<br />
|
|
140
|
+
💻 Skills: {profile.skills ? techStackOptions.find(s => s.value === profile.skills)?.label : 'Not specified'}
|
|
141
|
+
</div>
|
|
142
|
+
</div>;
|
|
143
|
+
},
|
|
144
|
+
parameters: {
|
|
145
|
+
controls: {
|
|
146
|
+
disable: true
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}`,...(U=(J=f.parameters)==null?void 0:J.docs)==null?void 0:U.source}}};var V,B,G;x.parameters={...x.parameters,docs:{...(V=x.parameters)==null?void 0:V.docs,source:{originalSource:`{
|
|
150
|
+
args: {
|
|
151
|
+
label: 'Location',
|
|
152
|
+
value: '',
|
|
153
|
+
options: cityOptions,
|
|
154
|
+
placeholder: 'Search locations...',
|
|
155
|
+
allowEmpty: true,
|
|
156
|
+
onChange: () => {}
|
|
157
|
+
},
|
|
158
|
+
render: () => {
|
|
159
|
+
const [filters, setFilters] = useState({
|
|
160
|
+
location: '',
|
|
161
|
+
technology: '',
|
|
162
|
+
experience: ''
|
|
163
|
+
});
|
|
164
|
+
const experienceOptions = [{
|
|
165
|
+
label: 'Entry Level (0-2 years)',
|
|
166
|
+
value: 'entry'
|
|
167
|
+
}, {
|
|
168
|
+
label: 'Mid Level (3-5 years)',
|
|
169
|
+
value: 'mid'
|
|
170
|
+
}, {
|
|
171
|
+
label: 'Senior Level (6-10 years)',
|
|
172
|
+
value: 'senior'
|
|
173
|
+
}, {
|
|
174
|
+
label: 'Lead/Principal (10+ years)',
|
|
175
|
+
value: 'lead'
|
|
176
|
+
}];
|
|
177
|
+
const updateFilter = (field: keyof typeof filters, value: string) => {
|
|
178
|
+
setFilters(prev => ({
|
|
179
|
+
...prev,
|
|
180
|
+
[field]: value
|
|
181
|
+
}));
|
|
182
|
+
};
|
|
183
|
+
const clearFilters = () => {
|
|
184
|
+
setFilters({
|
|
185
|
+
location: '',
|
|
186
|
+
technology: '',
|
|
187
|
+
experience: ''
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
return <div style={{
|
|
191
|
+
padding: '1.5rem',
|
|
192
|
+
background: '#f8f9fa',
|
|
193
|
+
border: '1px solid #dee2e6',
|
|
194
|
+
borderRadius: '8px',
|
|
195
|
+
maxWidth: '500px'
|
|
196
|
+
}}>
|
|
197
|
+
<div style={{
|
|
198
|
+
display: 'flex',
|
|
199
|
+
justifyContent: 'space-between',
|
|
200
|
+
alignItems: 'center',
|
|
201
|
+
marginBottom: '1rem'
|
|
202
|
+
}}>
|
|
203
|
+
<h3 style={{
|
|
204
|
+
margin: 0,
|
|
205
|
+
display: 'flex',
|
|
206
|
+
alignItems: 'center',
|
|
207
|
+
gap: '0.5rem'
|
|
208
|
+
}}>
|
|
209
|
+
<Search /> Job Search Filters
|
|
210
|
+
</h3>
|
|
211
|
+
<button onClick={clearFilters} style={{
|
|
212
|
+
padding: '0.25rem 0.75rem',
|
|
213
|
+
fontSize: '0.75rem',
|
|
214
|
+
backgroundColor: 'transparent',
|
|
215
|
+
border: '1px solid #6c757d',
|
|
216
|
+
borderRadius: '4px',
|
|
217
|
+
cursor: 'pointer'
|
|
218
|
+
}}>
|
|
219
|
+
Clear All
|
|
220
|
+
</button>
|
|
221
|
+
</div>
|
|
222
|
+
|
|
223
|
+
<div style={{
|
|
224
|
+
display: 'flex',
|
|
225
|
+
flexDirection: 'column',
|
|
226
|
+
gap: '1rem'
|
|
227
|
+
}}>
|
|
228
|
+
<SearchableDropdown label="Location" value={filters.location} onChange={value => updateFilter('location', value)} options={cityOptions} placeholder="Search locations..." allowEmpty={true} />
|
|
229
|
+
<SearchableDropdown label="Technology" value={filters.technology} onChange={value => updateFilter('technology', value)} options={techStackOptions} placeholder="Search technologies..." allowEmpty={true} />
|
|
230
|
+
<SearchableDropdown label="Experience Level" value={filters.experience} onChange={value => updateFilter('experience', value)} options={experienceOptions} placeholder="Select experience level..." allowEmpty={true} />
|
|
231
|
+
</div>
|
|
232
|
+
|
|
233
|
+
<div style={{
|
|
234
|
+
marginTop: '1rem',
|
|
235
|
+
padding: '0.75rem',
|
|
236
|
+
background: '#fff',
|
|
237
|
+
borderRadius: '4px',
|
|
238
|
+
fontSize: '0.875rem'
|
|
239
|
+
}}>
|
|
240
|
+
<strong>Active Filters:</strong><br />
|
|
241
|
+
{!filters.location && !filters.technology && !filters.experience ? <em>No filters applied</em> : <ul style={{
|
|
242
|
+
margin: '0.5rem 0 0',
|
|
243
|
+
paddingLeft: '1.5rem'
|
|
244
|
+
}}>
|
|
245
|
+
{filters.location && <li>📍 {cityOptions.find(c => c.value === filters.location)?.label}</li>}
|
|
246
|
+
{filters.technology && <li>💻 {techStackOptions.find(t => t.value === filters.technology)?.label}</li>}
|
|
247
|
+
{filters.experience && <li>🎯 {experienceOptions.find(e => e.value === filters.experience)?.label}</li>}
|
|
248
|
+
</ul>}
|
|
249
|
+
</div>
|
|
250
|
+
</div>;
|
|
251
|
+
},
|
|
252
|
+
parameters: {
|
|
253
|
+
controls: {
|
|
254
|
+
disable: true
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}`,...(G=(B=x.parameters)==null?void 0:B.docs)==null?void 0:G.source}}};var M,_,H;S.parameters={...S.parameters,docs:{...(M=S.parameters)==null?void 0:M.docs,source:{originalSource:`{
|
|
258
|
+
args: {
|
|
259
|
+
label: 'With Empty Option',
|
|
260
|
+
value: '',
|
|
261
|
+
options: countryOptions.slice(0, 5),
|
|
262
|
+
placeholder: 'Choose...',
|
|
263
|
+
allowEmpty: true,
|
|
264
|
+
onChange: () => {}
|
|
265
|
+
},
|
|
266
|
+
render: () => <div style={{
|
|
267
|
+
display: 'flex',
|
|
268
|
+
flexDirection: 'column',
|
|
269
|
+
gap: '1rem',
|
|
270
|
+
width: '300px'
|
|
271
|
+
}}>
|
|
272
|
+
<SearchableDropdown label="With Empty Option" value="" onChange={() => {}} options={countryOptions.slice(0, 5)} placeholder="Choose..." allowEmpty={true} />
|
|
273
|
+
<SearchableDropdown label="No Empty Option" value="react" onChange={() => {}} options={techStackOptions.slice(0, 5)} placeholder="Choose..." allowEmpty={false} />
|
|
274
|
+
<SearchableDropdown label="Pre-selected" value="us" onChange={() => {}} options={countryOptions.slice(0, 5)} placeholder="Choose..." allowEmpty={true} />
|
|
275
|
+
<SearchableDropdown label="Long Options List" value="" onChange={() => {}} options={techStackOptions} placeholder="Search technologies..." allowEmpty={true} />
|
|
276
|
+
</div>,
|
|
277
|
+
parameters: {
|
|
278
|
+
controls: {
|
|
279
|
+
disable: true
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}`,...(H=(_=S.parameters)==null?void 0:_.docs)==null?void 0:H.source}}};const ce=["Default","WithValue","NoEmptyOption","LongList","Interactive","ProfileForm","JobFilter","AllVariants"];export{S as AllVariants,y as Default,v as Interactive,x as JobFilter,b as LongList,g as NoEmptyOption,f as ProfileForm,m as WithValue,ce as __namedExportsOrder,ie as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._selectInput_evuah_1{margin-bottom:var(--spacing-lg);position:relative}._selectInput_evuah_1 label{display:block;font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);color:var(--color-text);margin-bottom:var(--spacing-sm);letter-spacing:var(--letter-spacing-wide);transition:color var(--transition-base)}._selectWrapper_evuah_16{position:relative;width:100%}._selectInput_evuah_1 select{width:100%;padding:var(--spacing-sm) var(--spacing-md);padding-right:48px;border:2px solid var(--color-border);border-radius:var(--radius-lg);background:linear-gradient(135deg,var(--color-background),var(--color-background-secondary));font-size:var(--font-size-base);font-weight:var(--font-weight-medium);color:var(--color-text);display:block;appearance:none;-webkit-appearance:none;-moz-appearance:none;cursor:pointer;transition:all var(--transition-base);min-height:44px;outline:none}._selectInput_evuah_1 select:hover:not(:focus):not(:disabled){border-color:var(--color-border-hover);background:var(--color-background);box-shadow:var(--shadow-sm);transform:translateY(-1px)}._selectInput_evuah_1 select:focus{border-color:var(--color-primary);background:var(--color-background);box-shadow:0 0 0 3px #7c3aed1a;transform:translateY(-2px)}._selectInput_evuah_1 select:disabled{background:var(--color-background-tertiary);border-color:var(--color-border);color:var(--color-text-tertiary);cursor:not-allowed;opacity:.6;transform:none}._selectIcon_evuah_68{position:absolute;right:var(--spacing-md);top:50%;transform:translateY(-50%);pointer-events:none;color:var(--color-primary);width:20px;height:20px;transition:color var(--transition-base)}._selectInput_evuah_1 select:hover:not(:disabled)~._selectIcon_evuah_68{color:var(--color-primary-hover)}._selectInput_evuah_1 select:focus~._selectIcon_evuah_68{color:var(--color-primary-hover)}._selectWrapper_evuah_16:before{content:"";position:absolute;right:8px;top:50%;transform:translateY(-50%);width:32px;height:32px;background:linear-gradient(135deg,#7c3aed0d,#7c3aed1a);border-radius:var(--radius-md);pointer-events:none;opacity:0;transition:opacity var(--transition-base)}._selectInput_evuah_1 select:focus~:before{opacity:1}._selectInput_evuah_1 select option{padding:var(--spacing-sm);background:var(--color-background);color:var(--color-text);font-weight:var(--font-weight-normal)}._selectInput_evuah_1 select option:checked{background:linear-gradient(135deg,var(--color-primary-lighter),var(--color-primary-light));color:var(--color-text)}._selectInput_evuah_1 select option[value=""]{color:var(--color-text-secondary);font-style:italic}._error_evuah_134 select{border-color:var(--color-error);background:linear-gradient(135deg,var(--color-error-bg),var(--color-background));animation:_shake_evuah_1 .3s cubic-bezier(.36,.07,.19,.97) both}._error_evuah_134 label{color:var(--color-error)}._error_evuah_134 select:focus{box-shadow:0 0 0 3px #f43f5e26}._error_evuah_134 ._selectIcon_evuah_68{color:var(--color-error)}@keyframes _shake_evuah_1{10%,90%{transform:translate(-1px)}20%,80%{transform:translate(2px)}30%,50%,70%{transform:translate(-3px)}40%,60%{transform:translate(3px)}}._success_evuah_163 select{border-color:var(--color-success)}._success_evuah_163:after{content:"✓";position:absolute;right:52px;top:50%;transform:translateY(-50%);color:var(--color-success);font-weight:700;animation:_checkIn_evuah_1 .3s ease-out}@keyframes _checkIn_evuah_1{0%{opacity:0;transform:translateY(-50%) scale(0)}to{opacity:1;transform:translateY(-50%) scale(1)}}._loading_evuah_190 select{position:relative;overflow:hidden}._loading_evuah_190:after{content:"";position:absolute;top:0;left:-100%;width:100%;height:100%;background:linear-gradient(90deg,transparent,rgba(124,58,237,.1),transparent);animation:_shimmer_evuah_1 2s infinite;pointer-events:none}@keyframes _shimmer_evuah_1{to{left:100%}}[data-theme=dark] ._selectInput_evuah_1 select{background:linear-gradient(135deg,var(--color-background-secondary),var(--color-background-tertiary));border-color:var(--color-border)}[data-theme=dark] ._selectInput_evuah_1 select:hover:not(:disabled){background:var(--color-background-secondary);border-color:var(--color-border-hover)}[data-theme=dark] ._selectInput_evuah_1 select:focus{background:var(--color-background-secondary);border-color:var(--color-primary-light);box-shadow:0 0 0 3px #a78bfa1a}[data-theme=dark] ._selectIcon_evuah_68{color:var(--color-primary-light)}[data-theme=dark] ._selectWrapper_evuah_16:before{background:linear-gradient(135deg,#a78bfa0d,#a78bfa1a)}[data-theme=dark] ._selectInput_evuah_1 select option{background:var(--color-background-secondary)}[data-theme=dark] ._selectInput_evuah_1 select option:checked{background:var(--color-primary)}@media (max-width: 768px){._selectInput_evuah_1{margin-bottom:var(--spacing-md)}._selectInput_evuah_1 label{font-size:var(--font-size-base);margin-bottom:var(--spacing-xs)}._selectInput_evuah_1 select{min-height:48px;padding:var(--spacing-md);padding-right:52px;font-size:16px}._selectIcon_evuah_68{right:var(--spacing-md);width:24px;height:24px}._selectWrapper_evuah_16:before{width:36px;height:36px;right:10px}._selectInput_evuah_1 select:active:not(:disabled){transform:translateY(0);background:var(--color-background-tertiary)}}@-moz-document url-prefix(){._selectInput_evuah_1 select{padding-top:calc(var(--spacing-sm) + 1px);padding-bottom:calc(var(--spacing-sm) + 1px)}}@media (prefers-contrast: high){._selectInput_evuah_1 select{border-width:3px}._selectInput_evuah_1 select:focus{outline:2px solid var(--color-primary);outline-offset:2px}}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import{j as s}from"./iframe-Cz1R6gKZ.js";import{u as g}from"./useSound-DOpt9DfD.js";import{C as I}from"./chevron-down-BI8IU4ZZ.js";const S="_selectInput_evuah_1",x="_selectWrapper_evuah_16",j="_selectIcon_evuah_68",C="_error_evuah_134",V="_success_evuah_163",q="_loading_evuah_190",l={selectInput:S,selectWrapper:x,selectIcon:j,error:C,success:V,loading:q};function w({label:r,value:c,onChange:u,options:i,placeholder:p="Select...",disabled:d=!1,error:f=!1,success:v=!1,loading:a=!1,required:t=!1,soundConfig:h,className:n}){const{handlers:m,playSound:_}=g(h),b=()=>{const e=[l.selectInput];return f&&e.push(l.error),v&&e.push(l.success),a&&e.push(l.loading),e.join(" ")};return s.jsxs("div",{className:`${b()}${n?` ${n}`:""}`,children:[s.jsxs("label",{children:[r,t&&s.jsx("span",{style:{color:"var(--color-error)"},children:" *"})]}),s.jsxs("div",{className:l.selectWrapper,children:[s.jsxs("select",{value:c,onChange:e=>{_("click"),u(e.target.value)},disabled:d||a,required:t,...m,children:[s.jsx("option",{value:"",children:p}),i.map(e=>{const o=typeof e=="string"?e:e.value,y=typeof e=="string"?e:e.label;return s.jsx("option",{value:o,children:y},o)})]}),s.jsx(I,{className:l.selectIcon})]})]})}w.__docgenInfo={description:`SelectInput component - Styled dropdown selector with flexible option format
|
|
2
|
+
|
|
3
|
+
@component
|
|
4
|
+
@description
|
|
5
|
+
A customizable select dropdown that accepts both simple string arrays and
|
|
6
|
+
label-value object arrays for options. Features custom styling that maintains
|
|
7
|
+
consistency across browsers while preserving native select functionality.
|
|
8
|
+
Includes a styled chevron icon for better visual feedback.
|
|
9
|
+
|
|
10
|
+
@example
|
|
11
|
+
// With simple string options
|
|
12
|
+
<SelectInput
|
|
13
|
+
label="Country"
|
|
14
|
+
value={country}
|
|
15
|
+
onChange={setCountry}
|
|
16
|
+
options={['Italy', 'France', 'Spain', 'Germany']}
|
|
17
|
+
placeholder="Select a country"
|
|
18
|
+
/>
|
|
19
|
+
|
|
20
|
+
@example
|
|
21
|
+
// With label-value pairs
|
|
22
|
+
<SelectInput
|
|
23
|
+
label="Status"
|
|
24
|
+
value={status}
|
|
25
|
+
onChange={setStatus}
|
|
26
|
+
options={[
|
|
27
|
+
{ label: 'Active', value: 'active' },
|
|
28
|
+
{ label: 'Pending', value: 'pending' },
|
|
29
|
+
{ label: 'Archived', value: 'archived' }
|
|
30
|
+
]}
|
|
31
|
+
/>`,methods:[],displayName:"SelectInput",props:{placeholder:{defaultValue:{value:'"Select..."',computed:!1},required:!1},disabled:{defaultValue:{value:"false",computed:!1},required:!1},error:{defaultValue:{value:"false",computed:!1},required:!1},success:{defaultValue:{value:"false",computed:!1},required:!1},loading:{defaultValue:{value:"false",computed:!1},required:!1},required:{defaultValue:{value:"false",computed:!1},required:!1}}};export{w as S};
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import{r as w,j as o}from"./iframe-Cz1R6gKZ.js";import{S as l}from"./SelectInput-BrdH7gJ5.js";import"./preload-helper-C1FmrZbK.js";import"./useSound-DOpt9DfD.js";import"./chevron-down-BI8IU4ZZ.js";import"./createLucideIcon-C7zEcVM7.js";const H={title:"Atoms/SelectInput",component:l,parameters:{layout:"centered",docs:{description:{component:"A simple dropdown select component with customizable options."}}},tags:["autodocs"],argTypes:{label:{control:"text",description:"Label for the select input"},value:{control:"text",description:"Currently selected value"},placeholder:{control:"text",description:"Placeholder text when no value is selected"},onChange:{action:"changed"}}},P=["Option 1","Option 2","Option 3","Option 4"],p=[{label:"United States",value:"us"},{label:"United Kingdom",value:"uk"},{label:"Canada",value:"ca"},{label:"Australia",value:"au"},{label:"Germany",value:"de"},{label:"France",value:"fr"},{label:"Italy",value:"it"},{label:"Spain",value:"es"}],r={args:{label:"Select an option",value:"",onChange:()=>{},options:P,placeholder:"Choose..."}},n={args:{label:"Choose your favorite",value:"Option 2",onChange:()=>{},options:P}},s={args:{label:"Country",value:"uk",onChange:()=>{},options:p,placeholder:"Select a country"}},i={args:{label:"Priority",value:"",onChange:()=>{},options:["Low","Medium","High","Critical"]}},c={args:{label:"Interactive Select",value:"",onChange:()=>{},options:p,placeholder:"Choose a country"},render:()=>{var a;const[e,t]=w.useState("");return o.jsxs("div",{children:[o.jsx(l,{label:"Select your country",value:e,onChange:t,options:p,placeholder:"Choose a country"}),e&&o.jsxs("p",{style:{marginTop:"1rem",fontSize:"0.875rem",color:"#666"},children:["Selected: ",((a=p.find(k=>k.value===e))==null?void 0:a.label)||e]})]})}},u={args:{label:"Form Example",value:"",onChange:()=>{},options:["Option 1","Option 2"]},render:()=>{const[e,t]=w.useState({title:"",category:"",priority:"",assignee:""});return o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",padding:"1.5rem",background:"#f9f9f9",borderRadius:"8px",minWidth:"300px"},children:[o.jsx("h3",{style:{marginTop:0},children:"Create Task"}),o.jsx(l,{label:"Title",value:e.title,onChange:a=>t({...e,title:a}),options:["Mr","Mrs","Ms","Dr","Prof"],placeholder:"Select title"}),o.jsx(l,{label:"Category",value:e.category,onChange:a=>t({...e,category:a}),options:[{label:"Bug",value:"bug"},{label:"Feature",value:"feature"},{label:"Documentation",value:"docs"},{label:"Testing",value:"test"}],placeholder:"Select category"}),o.jsx(l,{label:"Priority",value:e.priority,onChange:a=>t({...e,priority:a}),options:["Low","Medium","High","Critical"],placeholder:"Select priority"}),o.jsx(l,{label:"Assignee",value:e.assignee,onChange:a=>t({...e,assignee:a}),options:[{label:"John Doe",value:"john"},{label:"Jane Smith",value:"jane"},{label:"Bob Johnson",value:"bob"},{label:"Alice Brown",value:"alice"}],placeholder:"Select assignee"})]})},parameters:{controls:{disable:!0}}};var d,m,g;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:`{
|
|
2
|
+
args: {
|
|
3
|
+
label: 'Select an option',
|
|
4
|
+
value: '',
|
|
5
|
+
onChange: () => {},
|
|
6
|
+
options: simpleOptions,
|
|
7
|
+
placeholder: 'Choose...'
|
|
8
|
+
}
|
|
9
|
+
}`,...(g=(m=r.parameters)==null?void 0:m.docs)==null?void 0:g.source}}};var h,v,b;n.parameters={...n.parameters,docs:{...(h=n.parameters)==null?void 0:h.docs,source:{originalSource:`{
|
|
10
|
+
args: {
|
|
11
|
+
label: 'Choose your favorite',
|
|
12
|
+
value: 'Option 2',
|
|
13
|
+
onChange: () => {},
|
|
14
|
+
options: simpleOptions
|
|
15
|
+
}
|
|
16
|
+
}`,...(b=(v=n.parameters)==null?void 0:v.docs)==null?void 0:b.source}}};var y,C,S;s.parameters={...s.parameters,docs:{...(y=s.parameters)==null?void 0:y.docs,source:{originalSource:`{
|
|
17
|
+
args: {
|
|
18
|
+
label: 'Country',
|
|
19
|
+
value: 'uk',
|
|
20
|
+
onChange: () => {},
|
|
21
|
+
options: countryOptions,
|
|
22
|
+
placeholder: 'Select a country'
|
|
23
|
+
}
|
|
24
|
+
}`,...(S=(C=s.parameters)==null?void 0:C.docs)==null?void 0:S.source}}};var f,x,D;i.parameters={...i.parameters,docs:{...(f=i.parameters)==null?void 0:f.docs,source:{originalSource:`{
|
|
25
|
+
args: {
|
|
26
|
+
label: 'Priority',
|
|
27
|
+
value: '',
|
|
28
|
+
onChange: () => {},
|
|
29
|
+
options: ['Low', 'Medium', 'High', 'Critical']
|
|
30
|
+
}
|
|
31
|
+
}`,...(D=(x=i.parameters)==null?void 0:x.docs)==null?void 0:D.source}}};var O,j,F;c.parameters={...c.parameters,docs:{...(O=c.parameters)==null?void 0:O.docs,source:{originalSource:`{
|
|
32
|
+
args: {
|
|
33
|
+
label: 'Interactive Select',
|
|
34
|
+
value: '',
|
|
35
|
+
onChange: () => {},
|
|
36
|
+
options: countryOptions,
|
|
37
|
+
placeholder: 'Choose a country'
|
|
38
|
+
},
|
|
39
|
+
render: () => {
|
|
40
|
+
const [selectedCountry, setSelectedCountry] = useState('');
|
|
41
|
+
return <div>
|
|
42
|
+
<SelectInput label="Select your country" value={selectedCountry} onChange={setSelectedCountry} options={countryOptions} placeholder="Choose a country" />
|
|
43
|
+
{selectedCountry && <p style={{
|
|
44
|
+
marginTop: '1rem',
|
|
45
|
+
fontSize: '0.875rem',
|
|
46
|
+
color: '#666'
|
|
47
|
+
}}>
|
|
48
|
+
Selected: {countryOptions.find(opt => opt.value === selectedCountry)?.label || selectedCountry}
|
|
49
|
+
</p>}
|
|
50
|
+
</div>;
|
|
51
|
+
}
|
|
52
|
+
}`,...(F=(j=c.parameters)==null?void 0:j.docs)==null?void 0:F.source}}};var I,T,M;u.parameters={...u.parameters,docs:{...(I=u.parameters)==null?void 0:I.docs,source:{originalSource:`{
|
|
53
|
+
args: {
|
|
54
|
+
label: 'Form Example',
|
|
55
|
+
value: '',
|
|
56
|
+
onChange: () => {},
|
|
57
|
+
options: ['Option 1', 'Option 2']
|
|
58
|
+
},
|
|
59
|
+
render: () => {
|
|
60
|
+
const [formData, setFormData] = useState({
|
|
61
|
+
title: '',
|
|
62
|
+
category: '',
|
|
63
|
+
priority: '',
|
|
64
|
+
assignee: ''
|
|
65
|
+
});
|
|
66
|
+
return <div style={{
|
|
67
|
+
display: 'flex',
|
|
68
|
+
flexDirection: 'column',
|
|
69
|
+
gap: '1rem',
|
|
70
|
+
padding: '1.5rem',
|
|
71
|
+
background: '#f9f9f9',
|
|
72
|
+
borderRadius: '8px',
|
|
73
|
+
minWidth: '300px'
|
|
74
|
+
}}>
|
|
75
|
+
<h3 style={{
|
|
76
|
+
marginTop: 0
|
|
77
|
+
}}>Create Task</h3>
|
|
78
|
+
|
|
79
|
+
<SelectInput label="Title" value={formData.title} onChange={value => setFormData({
|
|
80
|
+
...formData,
|
|
81
|
+
title: value
|
|
82
|
+
})} options={['Mr', 'Mrs', 'Ms', 'Dr', 'Prof']} placeholder="Select title" />
|
|
83
|
+
|
|
84
|
+
<SelectInput label="Category" value={formData.category} onChange={value => setFormData({
|
|
85
|
+
...formData,
|
|
86
|
+
category: value
|
|
87
|
+
})} options={[{
|
|
88
|
+
label: 'Bug',
|
|
89
|
+
value: 'bug'
|
|
90
|
+
}, {
|
|
91
|
+
label: 'Feature',
|
|
92
|
+
value: 'feature'
|
|
93
|
+
}, {
|
|
94
|
+
label: 'Documentation',
|
|
95
|
+
value: 'docs'
|
|
96
|
+
}, {
|
|
97
|
+
label: 'Testing',
|
|
98
|
+
value: 'test'
|
|
99
|
+
}]} placeholder="Select category" />
|
|
100
|
+
|
|
101
|
+
<SelectInput label="Priority" value={formData.priority} onChange={value => setFormData({
|
|
102
|
+
...formData,
|
|
103
|
+
priority: value
|
|
104
|
+
})} options={['Low', 'Medium', 'High', 'Critical']} placeholder="Select priority" />
|
|
105
|
+
|
|
106
|
+
<SelectInput label="Assignee" value={formData.assignee} onChange={value => setFormData({
|
|
107
|
+
...formData,
|
|
108
|
+
assignee: value
|
|
109
|
+
})} options={[{
|
|
110
|
+
label: 'John Doe',
|
|
111
|
+
value: 'john'
|
|
112
|
+
}, {
|
|
113
|
+
label: 'Jane Smith',
|
|
114
|
+
value: 'jane'
|
|
115
|
+
}, {
|
|
116
|
+
label: 'Bob Johnson',
|
|
117
|
+
value: 'bob'
|
|
118
|
+
}, {
|
|
119
|
+
label: 'Alice Brown',
|
|
120
|
+
value: 'alice'
|
|
121
|
+
}]} placeholder="Select assignee" />
|
|
122
|
+
</div>;
|
|
123
|
+
},
|
|
124
|
+
parameters: {
|
|
125
|
+
controls: {
|
|
126
|
+
disable: true
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}`,...(M=(T=u.parameters)==null?void 0:T.docs)==null?void 0:M.source}}};const z=["Default","WithSimpleOptions","WithObjectOptions","NoPlaceholder","Interactive","FormExample"];export{r as Default,u as FormExample,c as Interactive,i as NoPlaceholder,s as WithObjectOptions,n as WithSimpleOptions,z as __namedExportsOrder,H as default};
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import{r as M,j}from"./iframe-Cz1R6gKZ.js";import{d as m,S as B,a as D,W as N,q as T,i as k,M as G,r as H}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const U=`
|
|
2
|
+
varying vec2 v_texcoord;
|
|
3
|
+
void main() {
|
|
4
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
5
|
+
v_texcoord = uv;
|
|
6
|
+
}
|
|
7
|
+
`,X=`
|
|
8
|
+
varying vec2 v_texcoord;
|
|
9
|
+
|
|
10
|
+
uniform vec2 u_mouse;
|
|
11
|
+
uniform vec2 u_resolution;
|
|
12
|
+
uniform float u_pixelRatio;
|
|
13
|
+
|
|
14
|
+
uniform float u_shapeSize;
|
|
15
|
+
uniform float u_roundness;
|
|
16
|
+
uniform float u_borderSize;
|
|
17
|
+
uniform float u_circleSize;
|
|
18
|
+
uniform float u_circleEdge;
|
|
19
|
+
|
|
20
|
+
#ifndef PI
|
|
21
|
+
#define PI 3.1415926535897932384626433832795
|
|
22
|
+
#endif
|
|
23
|
+
#ifndef TWO_PI
|
|
24
|
+
#define TWO_PI 6.2831853071795864769252867665590
|
|
25
|
+
#endif
|
|
26
|
+
|
|
27
|
+
#ifndef VAR
|
|
28
|
+
#define VAR 0
|
|
29
|
+
#endif
|
|
30
|
+
|
|
31
|
+
#ifndef FNC_COORD
|
|
32
|
+
#define FNC_COORD
|
|
33
|
+
vec2 coord(in vec2 p) {
|
|
34
|
+
p = p / u_resolution.xy;
|
|
35
|
+
if (u_resolution.x > u_resolution.y) {
|
|
36
|
+
p.x *= u_resolution.x / u_resolution.y;
|
|
37
|
+
p.x += (u_resolution.y - u_resolution.x) / u_resolution.y / 2.0;
|
|
38
|
+
} else {
|
|
39
|
+
p.y *= u_resolution.y / u_resolution.x;
|
|
40
|
+
p.y += (u_resolution.x - u_resolution.y) / u_resolution.x / 2.0;
|
|
41
|
+
}
|
|
42
|
+
p -= 0.5;
|
|
43
|
+
p *= vec2(-1.0, 1.0);
|
|
44
|
+
return p;
|
|
45
|
+
}
|
|
46
|
+
#endif
|
|
47
|
+
|
|
48
|
+
#define st0 coord(gl_FragCoord.xy)
|
|
49
|
+
#define mx coord(u_mouse * u_pixelRatio)
|
|
50
|
+
|
|
51
|
+
float sdRoundRect(vec2 p, vec2 b, float r) {
|
|
52
|
+
vec2 d = abs(p - 0.5) * 4.2 - b + vec2(r);
|
|
53
|
+
return min(max(d.x, d.y), 0.0) + length(max(d, 0.0)) - r;
|
|
54
|
+
}
|
|
55
|
+
float sdCircle(in vec2 st, in vec2 center) {
|
|
56
|
+
return length(st - center) * 2.0;
|
|
57
|
+
}
|
|
58
|
+
float sdPoly(in vec2 p, in float w, in int sides) {
|
|
59
|
+
float a = atan(p.x, p.y) + PI;
|
|
60
|
+
float r = TWO_PI / float(sides);
|
|
61
|
+
float d = cos(floor(0.5 + a / r) * r - a) * length(max(abs(p) * 1.0, 0.0));
|
|
62
|
+
return d * 2.0 - w;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
float aastep(float threshold, float value) {
|
|
66
|
+
float afwidth = length(vec2(dFdx(value), dFdy(value))) * 0.70710678118654757;
|
|
67
|
+
return smoothstep(threshold - afwidth, threshold + afwidth, value);
|
|
68
|
+
}
|
|
69
|
+
float fill(in float x) { return 1.0 - aastep(0.0, x); }
|
|
70
|
+
float fill(float x, float size, float edge) {
|
|
71
|
+
return 1.0 - smoothstep(size - edge, size + edge, x);
|
|
72
|
+
}
|
|
73
|
+
float stroke(in float d, in float t) { return (1.0 - aastep(t, abs(d))); }
|
|
74
|
+
float stroke(float x, float size, float w, float edge) {
|
|
75
|
+
float d = smoothstep(size - edge, size + edge, x + w * 0.5) - smoothstep(size - edge, size + edge, x - w * 0.5);
|
|
76
|
+
return clamp(d, 0.0, 1.0);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
float strokeAA(float x, float size, float w, float edge) {
|
|
80
|
+
float afwidth = length(vec2(dFdx(x), dFdy(x))) * 0.70710678;
|
|
81
|
+
float d = smoothstep(size - edge - afwidth, size + edge + afwidth, x + w * 0.5)
|
|
82
|
+
- smoothstep(size - edge - afwidth, size + edge + afwidth, x - w * 0.5);
|
|
83
|
+
return clamp(d, 0.0, 1.0);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
void main() {
|
|
87
|
+
vec2 st = st0 + 0.5;
|
|
88
|
+
vec2 posMouse = mx * vec2(1., -1.) + 0.5;
|
|
89
|
+
|
|
90
|
+
float size = u_shapeSize;
|
|
91
|
+
float roundness = u_roundness;
|
|
92
|
+
float borderSize = u_borderSize;
|
|
93
|
+
float circleSize = u_circleSize;
|
|
94
|
+
float circleEdge = u_circleEdge;
|
|
95
|
+
|
|
96
|
+
float sdfCircle = fill(
|
|
97
|
+
sdCircle(st, posMouse),
|
|
98
|
+
circleSize,
|
|
99
|
+
circleEdge
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
float sdf;
|
|
103
|
+
if (VAR == 0) {
|
|
104
|
+
sdf = sdRoundRect(st, vec2(size), roundness);
|
|
105
|
+
sdf = strokeAA(sdf, 0.0, borderSize, sdfCircle) * 4.0;
|
|
106
|
+
} else if (VAR == 1) {
|
|
107
|
+
sdf = sdCircle(st, vec2(0.5));
|
|
108
|
+
sdf = fill(sdf, 0.6, sdfCircle) * 1.2;
|
|
109
|
+
} else if (VAR == 2) {
|
|
110
|
+
sdf = sdCircle(st, vec2(0.5));
|
|
111
|
+
sdf = strokeAA(sdf, 0.58, 0.02, sdfCircle) * 4.0;
|
|
112
|
+
} else if (VAR == 3) {
|
|
113
|
+
sdf = sdPoly(st - vec2(0.5, 0.45), 0.3, 3);
|
|
114
|
+
sdf = fill(sdf, 0.05, sdfCircle) * 1.4;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
vec3 color = vec3(1.0);
|
|
118
|
+
float alpha = sdf;
|
|
119
|
+
gl_FragColor = vec4(color.rgb, alpha);
|
|
120
|
+
}
|
|
121
|
+
`,I=({className:L="",variation:p=0,pixelRatioProp:v=2,shapeSize:h=1.2,roundness:x=.4,borderSize:_=.05,circleSize:g=.3,circleEdge:z=.5})=>{const w=M.useRef();return M.useEffect(()=>{const t=w.current;if(!t)return;let l=!0,S,f=0,R=0;const y=new m,c=new m,C=new m;let s=1,a=1;const E=new B,r=new D;r.position.z=1;const e=new N({alpha:!0});e.setClearColor(0,0),t.appendChild(e.domElement);const W=new T(1,1),b=new k({vertexShader:U,fragmentShader:X,uniforms:{u_mouse:{value:c},u_resolution:{value:C},u_pixelRatio:{value:v},u_shapeSize:{value:h},u_roundness:{value:x},u_borderSize:{value:_},u_circleSize:{value:g},u_circleEdge:{value:z}},defines:{VAR:p},transparent:!0}),V=new G(W,b);E.add(V);const n=o=>{const i=t.getBoundingClientRect();y.set(o.clientX-i.left,o.clientY-i.top)};document.addEventListener("mousemove",n),document.addEventListener("pointermove",n);const d=()=>{if(!l)return;s=t.clientWidth,a=t.clientHeight;const o=Math.min(window.devicePixelRatio,2);e.setSize(s,a),e.setPixelRatio(o),r.left=-s/2,r.right=s/2,r.top=a/2,r.bottom=-a/2,r.updateProjectionMatrix(),V.scale.set(s,a,1),C.set(s,a).multiplyScalar(o),b.uniforms.u_pixelRatio.value=o};d(),window.addEventListener("resize",d);const A=new ResizeObserver(()=>{l&&d()});A.observe(t);const P=()=>{if(!l)return;f=performance.now()*.001;const o=f-R;R=f,["x","y"].forEach(i=>{c[i]=H.damp(c[i],y[i],8,o)}),e.render(E,r),S=requestAnimationFrame(P)};return P(),()=>{l=!1,cancelAnimationFrame(S),window.removeEventListener("resize",d),A.disconnect(),document.removeEventListener("mousemove",n),document.removeEventListener("pointermove",n),t.contains(e.domElement)&&t.removeChild(e.domElement),e.dispose(),e.forceContextLoss()}},[p,v,h,x,_,g,z]),j.jsx("div",{className:L,ref:w,style:{width:"100%",minHeight:"100vh",position:"relative"}})};I.__docgenInfo={description:"",methods:[],displayName:"ShapeBlur",props:{className:{defaultValue:{value:"''",computed:!1},required:!1},variation:{defaultValue:{value:"0",computed:!1},required:!1},pixelRatioProp:{defaultValue:{value:"2",computed:!1},required:!1},shapeSize:{defaultValue:{value:"1.2",computed:!1},required:!1},roundness:{defaultValue:{value:"0.4",computed:!1},required:!1},borderSize:{defaultValue:{value:"0.05",computed:!1},required:!1},circleSize:{defaultValue:{value:"0.3",computed:!1},required:!1},circleEdge:{defaultValue:{value:"0.5",computed:!1},required:!1}}};const Q={title:"ReactBits/Animations/ShapeBlur",component:I,parameters:{layout:"fullscreen"},tags:["autodocs"]},u={args:{variation:0,pixelRatioProp:2,shapeSize:1.2,roundness:.4,borderSize:.05,circleSize:.3,circleEdge:.5}};var q,F,O;u.parameters={...u.parameters,docs:{...(q=u.parameters)==null?void 0:q.docs,source:{originalSource:`{
|
|
122
|
+
args: {
|
|
123
|
+
variation: 0,
|
|
124
|
+
pixelRatioProp: 2,
|
|
125
|
+
shapeSize: 1.2,
|
|
126
|
+
roundness: 0.4,
|
|
127
|
+
borderSize: 0.05,
|
|
128
|
+
circleSize: 0.3,
|
|
129
|
+
circleEdge: 0.5
|
|
130
|
+
}
|
|
131
|
+
}`,...(O=(F=u.parameters)==null?void 0:F.docs)==null?void 0:O.source}}};const Z=["Default"];export{u as Default,Z as __namedExportsOrder,Q as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._shapegrid-canvas_ilyut_1{width:100%;min-height:100vh;border:none;display:block}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{r as v,j as q}from"./iframe-Cz1R6gKZ.js";import"./preload-helper-C1FmrZbK.js";const z={"shapegrid-canvas":"_shapegrid-canvas_ilyut_1"},J=({direction:P="right",speed:L=1,borderColor:k="#999",squareSize:t=40,hoverFillColor:b="#222",shape:X="square",hoverTrailAmount:y=0,className:Q=""})=>{const _=v.useRef(null),j=v.useRef(null),U=v.useRef(),Z=v.useRef(),r=v.useRef({x:0,y:0}),o=v.useRef(null),p=v.useRef([]),M=v.useRef(new Map);return v.useEffect(()=>{const s=_.current,n=s.getContext("2d"),Y=X==="hexagon",E=X==="triangle",w=t*1.5,m=t*Math.sqrt(3),V=()=>{s.width=s.offsetWidth,s.height=s.offsetHeight,U.current=Math.ceil(s.width/t)+1,Z.current=Math.ceil(s.height/t)+1};window.addEventListener("resize",V),V();const C=(l,e,c)=>{n.beginPath();for(let u=0;u<6;u++){const h=Math.PI/3*u,d=l+c*Math.cos(h),f=e+c*Math.sin(h);u===0?n.moveTo(d,f):n.lineTo(d,f)}n.closePath()},G=(l,e,c)=>{n.beginPath(),n.arc(l,e,c/2,0,Math.PI*2),n.closePath()},O=(l,e,c,u)=>{n.beginPath(),u?(n.moveTo(l,e+c/2),n.lineTo(l+c/2,e-c/2),n.lineTo(l-c/2,e-c/2)):(n.moveTo(l,e-c/2),n.lineTo(l+c/2,e+c/2),n.lineTo(l-c/2,e+c/2)),n.closePath()},A=()=>{if(n.clearRect(0,0,s.width,s.height),Y){const e=Math.floor(r.current.x/w),c=(r.current.x%w+w)%w,u=(r.current.y%m+m)%m,h=Math.ceil(s.width/w)+3,d=Math.ceil(s.height/m)+3;for(let f=-2;f<h;f++)for(let g=-2;g<d;g++){const i=f*w+c,a=g*m+((f+e)%2!==0?m/2:0)+u,x=`${f},${g}`,R=M.current.get(x);R&&(n.globalAlpha=R,C(i,a,t),n.fillStyle=b,n.fill(),n.globalAlpha=1),C(i,a,t),n.strokeStyle=k,n.stroke()}}else if(E){const e=t/2,c=Math.floor(r.current.x/e),u=Math.floor(r.current.y/t),h=(r.current.x%e+e)%e,d=(r.current.y%t+t)%t,f=Math.ceil(s.width/e)+4,g=Math.ceil(s.height/t)+4;for(let i=-2;i<f;i++)for(let a=-2;a<g;a++){const x=i*e+h,R=a*t+t/2+d,I=((i+c+a+u)%2+2)%2!==0,S=`${i},${a}`,N=M.current.get(S);N&&(n.globalAlpha=N,O(x,R,t,I),n.fillStyle=b,n.fill(),n.globalAlpha=1),O(x,R,t,I),n.strokeStyle=k,n.stroke()}}else if(X==="circle"){const e=(r.current.x%t+t)%t,c=(r.current.y%t+t)%t,u=Math.ceil(s.width/t)+3,h=Math.ceil(s.height/t)+3;for(let d=-2;d<u;d++)for(let f=-2;f<h;f++){const g=d*t+t/2+e,i=f*t+t/2+c,a=`${d},${f}`,x=M.current.get(a);x&&(n.globalAlpha=x,G(g,i,t),n.fillStyle=b,n.fill(),n.globalAlpha=1),G(g,i,t),n.strokeStyle=k,n.stroke()}}else{const e=(r.current.x%t+t)%t,c=(r.current.y%t+t)%t,u=Math.ceil(s.width/t)+3,h=Math.ceil(s.height/t)+3;for(let d=-2;d<u;d++)for(let f=-2;f<h;f++){const g=d*t+e,i=f*t+c,a=`${d},${f}`,x=M.current.get(a);x&&(n.globalAlpha=x,n.fillStyle=b,n.fillRect(g,i,t,t),n.globalAlpha=1),n.strokeStyle=k,n.strokeRect(g,i,t,t)}}const l=n.createRadialGradient(s.width/2,s.height/2,0,s.width/2,s.height/2,Math.sqrt(s.width**2+s.height**2)/2);l.addColorStop(0,"rgba(0, 0, 0, 0)"),n.fillStyle=l,n.fillRect(0,0,s.width,s.height)},H=()=>{const l=Math.max(L,.1),e=Y?w*2:t,c=Y?m:E?t*2:t;switch(P){case"right":r.current.x=(r.current.x-l+e)%e;break;case"left":r.current.x=(r.current.x+l+e)%e;break;case"up":r.current.y=(r.current.y+l+c)%c;break;case"down":r.current.y=(r.current.y-l+c)%c;break;case"diagonal":r.current.x=(r.current.x-l+e)%e,r.current.y=(r.current.y-l+c)%c;break}T(),A(),j.current=requestAnimationFrame(H)},T=()=>{const l=new Map;if(o.current&&l.set(`${o.current.x},${o.current.y}`,1),y>0)for(let e=0;e<p.current.length;e++){const c=p.current[e],u=`${c.x},${c.y}`;l.has(u)||l.set(u,(p.current.length-e)/(p.current.length+1))}for(const[e]of l)M.current.has(e)||M.current.set(e,0);for(const[e,c]of M.current){const u=l.get(e)||0,h=c+(u-c)*.15;h<.005?M.current.delete(e):M.current.set(e,h)}},K=l=>{const e=s.getBoundingClientRect(),c=l.clientX-e.left,u=l.clientY-e.top;if(Y){const h=Math.floor(r.current.x/w),d=(r.current.x%w+w)%w,f=(r.current.y%m+m)%m,g=c-d,i=u-f,a=Math.round(g/w),x=(a+h)%2!==0?m/2:0,R=Math.round((i-x)/m);(!o.current||o.current.x!==a||o.current.y!==R)&&(o.current&&y>0&&(p.current.unshift({...o.current}),p.current.length>y&&(p.current.length=y)),o.current={x:a,y:R})}else if(E){const h=t/2,d=(r.current.x%h+h)%h,f=(r.current.y%t+t)%t,g=c-d,i=u-f,a=Math.round(g/h),x=Math.floor(i/t);(!o.current||o.current.x!==a||o.current.y!==x)&&(o.current&&y>0&&(p.current.unshift({...o.current}),p.current.length>y&&(p.current.length=y)),o.current={x:a,y:x})}else if(X==="circle"){const h=(r.current.x%t+t)%t,d=(r.current.y%t+t)%t,f=c-h,g=u-d,i=Math.round(f/t),a=Math.round(g/t);(!o.current||o.current.x!==i||o.current.y!==a)&&(o.current&&y>0&&(p.current.unshift({...o.current}),p.current.length>y&&(p.current.length=y)),o.current={x:i,y:a})}else{const h=(r.current.x%t+t)%t,d=(r.current.y%t+t)%t,f=c-h,g=u-d,i=Math.floor(f/t),a=Math.floor(g/t);(!o.current||o.current.x!==i||o.current.y!==a)&&(o.current&&y>0&&(p.current.unshift({...o.current}),p.current.length>y&&(p.current.length=y)),o.current={x:i,y:a})}},B=()=>{o.current&&y>0&&(p.current.unshift({...o.current}),p.current.length>y&&(p.current.length=y)),o.current=null};return s.addEventListener("mousemove",K),s.addEventListener("mouseleave",B),j.current=requestAnimationFrame(H),()=>{window.removeEventListener("resize",V),cancelAnimationFrame(j.current),s.removeEventListener("mousemove",K),s.removeEventListener("mouseleave",B)}},[P,L,k,b,t,X,y]),q.jsx("canvas",{ref:_,className:`${z["shapegrid-canvas"]} ${Q}`})};J.__docgenInfo={description:"",methods:[],displayName:"ShapeGrid",props:{direction:{defaultValue:{value:"'right'",computed:!1},required:!1},speed:{defaultValue:{value:"1",computed:!1},required:!1},borderColor:{defaultValue:{value:"'#999'",computed:!1},required:!1},squareSize:{defaultValue:{value:"40",computed:!1},required:!1},hoverFillColor:{defaultValue:{value:"'#222'",computed:!1},required:!1},shape:{defaultValue:{value:"'square'",computed:!1},required:!1},hoverTrailAmount:{defaultValue:{value:"0",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1}}};const nt={title:"ReactBits/Backgrounds/ShapeGrid",component:J,parameters:{layout:"fullscreen"},tags:["autodocs"]},$={args:{direction:"right",speed:1,borderColor:"#999",squareSize:40,hoverFillColor:"#222",shape:"square",hoverTrailAmount:0}};var W,D,F;$.parameters={...$.parameters,docs:{...(W=$.parameters)==null?void 0:W.docs,source:{originalSource:`{
|
|
2
|
+
args: {
|
|
3
|
+
direction: 'right',
|
|
4
|
+
speed: 1,
|
|
5
|
+
borderColor: '#999',
|
|
6
|
+
squareSize: 40,
|
|
7
|
+
hoverFillColor: '#222',
|
|
8
|
+
shape: 'square',
|
|
9
|
+
hoverTrailAmount: 0
|
|
10
|
+
}
|
|
11
|
+
}`,...(F=(D=$.parameters)==null?void 0:D.docs)==null?void 0:F.source}}};const ct=["Default"];export{$ as Default,ct as __namedExportsOrder,nt as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._shiny-text_183zx_1{display:inline-block}
|