@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
package/dist/index.js
CHANGED
|
@@ -1,58 +1,32 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var React = require('react');
|
|
5
4
|
var framerMotion = require('framer-motion');
|
|
5
|
+
var React = require('react');
|
|
6
6
|
var reactDom = require('react-dom');
|
|
7
7
|
var lucideReact = require('lucide-react');
|
|
8
8
|
var d3 = require('d3');
|
|
9
9
|
|
|
10
10
|
function _interopNamespaceDefault(e) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
11
|
+
var n = Object.create(null);
|
|
12
|
+
if (e) {
|
|
13
|
+
Object.keys(e).forEach(function (k) {
|
|
14
|
+
if (k !== 'default') {
|
|
15
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
16
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return e[k]; }
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n.default = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
var d3__namespace = /*#__PURE__*/_interopNamespaceDefault(d3);
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
const useTheme$1 = () => {
|
|
31
|
-
const context = React.useContext(ThemeContext$1);
|
|
32
|
-
if (!context) {
|
|
33
|
-
throw new Error('useTheme must be used within a ThemeProvider');
|
|
34
|
-
}
|
|
35
|
-
return context;
|
|
36
|
-
};
|
|
37
|
-
const ThemeProvider = ({ children, defaultTheme = 'light' }) => {
|
|
38
|
-
const [theme, setTheme] = React.useState(defaultTheme);
|
|
39
|
-
React.useEffect(() => {
|
|
40
|
-
const savedTheme = localStorage.getItem('theme');
|
|
41
|
-
if (savedTheme) {
|
|
42
|
-
setTheme(savedTheme);
|
|
43
|
-
}
|
|
44
|
-
}, []);
|
|
45
|
-
React.useEffect(() => {
|
|
46
|
-
document.documentElement.setAttribute('data-theme', theme);
|
|
47
|
-
localStorage.setItem('theme', theme);
|
|
48
|
-
}, [theme]);
|
|
49
|
-
const toggleTheme = () => {
|
|
50
|
-
setTheme(prevTheme => prevTheme === 'light' ? 'dark' : 'light');
|
|
51
|
-
};
|
|
52
|
-
return (jsxRuntime.jsx(ThemeContext$1.Provider, { value: { theme, toggleTheme, setTheme }, children: children }));
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
var styles$u = {"button":"Button-module_button__c6nkW","primary":"Button-module_primary__pMqAs","secondary":"Button-module_secondary__mBWx9","outline":"Button-module_outline__NGGGN","ghost":"Button-module_ghost__u2QBF","danger":"Button-module_danger__2ewhr","small":"Button-module_small__ZI9RX","medium":"Button-module_medium__Wnf9t","large":"Button-module_large__cQCpA","fullWidth":"Button-module_fullWidth__N8vYg","loading":"Button-module_loading__hcSI4","spinner":"Button-module_spinner__HtM96","spin":"Button-module_spin__jblrj","iconLeft":"Button-module_iconLeft__Fpz-y","iconRight":"Button-module_iconRight__kTfjS"};
|
|
29
|
+
var styles$z = {"button":"Button-module_button__c6nkW","primary":"Button-module_primary__pMqAs","secondary":"Button-module_secondary__mBWx9","outline":"Button-module_outline__NGGGN","ghost":"Button-module_ghost__u2QBF","danger":"Button-module_danger__2ewhr","small":"Button-module_small__ZI9RX","medium":"Button-module_medium__Wnf9t","large":"Button-module_large__cQCpA","fullWidth":"Button-module_fullWidth__N8vYg","loading":"Button-module_loading__hcSI4","spinner":"Button-module_spinner__HtM96","spin":"Button-module_spin__jblrj","iconLeft":"Button-module_iconLeft__Fpz-y","iconRight":"Button-module_iconRight__kTfjS"};
|
|
56
30
|
|
|
57
31
|
const SOUND_PACKS = {
|
|
58
32
|
digital: {
|
|
@@ -617,11 +591,11 @@ function useComponentSound(config, options) {
|
|
|
617
591
|
const Button = ({ variant = 'primary', size = 'medium', fullWidth = false, loading = false, iconLeft, iconRight, children, className = '', disabled, motionProps, soundConfig, onClick, onMouseEnter, onFocus, ...rest }) => {
|
|
618
592
|
const { handlers } = useComponentSound(soundConfig);
|
|
619
593
|
const buttonClasses = [
|
|
620
|
-
styles$
|
|
621
|
-
styles$
|
|
622
|
-
styles$
|
|
623
|
-
fullWidth && styles$
|
|
624
|
-
loading && styles$
|
|
594
|
+
styles$z.button,
|
|
595
|
+
styles$z[variant],
|
|
596
|
+
styles$z[size],
|
|
597
|
+
fullWidth && styles$z.fullWidth,
|
|
598
|
+
loading && styles$z.loading,
|
|
625
599
|
className
|
|
626
600
|
].filter(Boolean).join(' ');
|
|
627
601
|
const handleClick = (e) => {
|
|
@@ -632,10 +606,10 @@ const Button = ({ variant = 'primary', size = 'medium', fullWidth = false, loadi
|
|
|
632
606
|
handlers.onMouseEnter?.();
|
|
633
607
|
onMouseEnter?.(e);
|
|
634
608
|
};
|
|
635
|
-
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: buttonClasses, disabled: disabled || loading, whileHover: { scale: disabled || loading ? 1 : 1.02 }, whileTap: { scale: disabled || loading ? 1 : 0.98 }, transition: { type: "spring", stiffness: 400, damping: 17 }, onClick: handleClick, onMouseEnter: handleMouseEnter, onFocus: onFocus, ...motionProps, ...rest, children: [loading && jsxRuntime.jsx("span", { className: styles$
|
|
609
|
+
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: buttonClasses, disabled: disabled || loading, whileHover: { scale: disabled || loading ? 1 : 1.02 }, whileTap: { scale: disabled || loading ? 1 : 0.98 }, transition: { type: "spring", stiffness: 400, damping: 17 }, onClick: handleClick, onMouseEnter: handleMouseEnter, onFocus: onFocus, ...motionProps, ...rest, children: [loading && jsxRuntime.jsx("span", { className: styles$z.spinner }), iconLeft && jsxRuntime.jsx("span", { className: styles$z.iconLeft, children: iconLeft }), children, iconRight && jsxRuntime.jsx("span", { className: styles$z.iconRight, children: iconRight })] }));
|
|
636
610
|
};
|
|
637
611
|
|
|
638
|
-
var styles$
|
|
612
|
+
var styles$y = {"card":"Card-module_card__r2DB2","hoverable":"Card-module_hoverable__X3OpS","elevated":"Card-module_elevated__hGV6-","outlined":"Card-module_outlined__ngRag","flat":"Card-module_flat__xy-xt","glass":"Card-module_glass__Sv-Vs","imageContainer":"Card-module_imageContainer__L4ma6","image":"Card-module_image__bQBt6","header":"Card-module_header__0dtj3","headerContent":"Card-module_headerContent__W7-jD","expandButton":"Card-module_expandButton__I7f49","expandIcon":"Card-module_expandIcon__Lu-OY","expandableContent":"Card-module_expandableContent__BFgO5","expandable":"Card-module_expandable__GMXzo","body":"Card-module_body__K7eL3","footer":"Card-module_footer__L5wO-","title":"Card-module_title__pW9g8","subtitle":"Card-module_subtitle__gejH4","clickable":"Card-module_clickable__Y6fm8","padding":"Card-module_padding__wtyDo","noPadding":"Card-module_noPadding__r5Qq0","loading":"Card-module_loading__S4Wng","loadingShimmer":"Card-module_loadingShimmer__Q1Osr","loadingPulse":"Card-module_loadingPulse__bXQmC"};
|
|
639
613
|
|
|
640
614
|
/**
|
|
641
615
|
* Card Component
|
|
@@ -700,28 +674,28 @@ const Card = ({ variant = 'elevated', hoverable = false, clickable = false, padd
|
|
|
700
674
|
onExpandChange?.(newExpanded);
|
|
701
675
|
};
|
|
702
676
|
const cardClasses = [
|
|
703
|
-
styles$
|
|
704
|
-
styles$
|
|
705
|
-
hoverable && styles$
|
|
706
|
-
clickable && styles$
|
|
707
|
-
!padding && styles$
|
|
708
|
-
expandable && styles$
|
|
677
|
+
styles$y.card,
|
|
678
|
+
styles$y[variant],
|
|
679
|
+
hoverable && styles$y.hoverable,
|
|
680
|
+
clickable && styles$y.clickable,
|
|
681
|
+
!padding && styles$y.noPadding,
|
|
682
|
+
expandable && styles$y.expandable,
|
|
709
683
|
className
|
|
710
684
|
].filter(Boolean).join(' ');
|
|
711
685
|
const renderHeader = () => {
|
|
712
686
|
if (header) {
|
|
713
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
687
|
+
return (jsxRuntime.jsxs("div", { className: styles$y.header, children: [jsxRuntime.jsx("div", { className: styles$y.headerContent, children: header }), expandable && (jsxRuntime.jsx("button", { className: styles$y.expandButton, onClick: handleToggleExpand, "aria-label": isExpanded ? 'Collapse card' : 'Expand card', children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: styles$y.expandIcon, style: { transform: isExpanded ? 'rotate(180deg)' : 'rotate(0deg)' }, children: jsxRuntime.jsx("path", { d: "M6 9l6 6 6-6" }) }) }))] }));
|
|
714
688
|
}
|
|
715
689
|
if (title || subtitle) {
|
|
716
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
690
|
+
return (jsxRuntime.jsxs("div", { className: styles$y.header, children: [jsxRuntime.jsxs("div", { className: styles$y.headerContent, children: [title && jsxRuntime.jsx("h3", { className: styles$y.title, children: title }), subtitle && jsxRuntime.jsx("p", { className: styles$y.subtitle, children: subtitle })] }), expandable && (jsxRuntime.jsx("button", { className: styles$y.expandButton, onClick: handleToggleExpand, "aria-label": isExpanded ? 'Collapse card' : 'Expand card', children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: styles$y.expandIcon, style: { transform: isExpanded ? 'rotate(180deg)' : 'rotate(0deg)' }, children: jsxRuntime.jsx("path", { d: "M6 9l6 6 6-6" }) }) }))] }));
|
|
717
691
|
}
|
|
718
692
|
return null;
|
|
719
693
|
};
|
|
720
|
-
const cardContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [image && (jsxRuntime.jsx("div", { className: styles$
|
|
694
|
+
const cardContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [image && (jsxRuntime.jsx("div", { className: styles$y.imageContainer, children: jsxRuntime.jsx("img", { src: image, alt: imageAlt, className: styles$y.image }) })), renderHeader(), jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: false, children: (!expandable || isExpanded) && (jsxRuntime.jsxs(framerMotion.motion.div, { initial: expandable ? { height: 0, opacity: 0 } : undefined, animate: expandable ? { height: 'auto', opacity: 1 } : undefined, exit: expandable ? { height: 0, opacity: 0 } : undefined, transition: { duration: 0.3, ease: "easeInOut" }, className: styles$y.expandableContent, children: [children && (jsxRuntime.jsx("div", { className: padding ? styles$y.body : undefined, children: children })), footer && jsxRuntime.jsx("div", { className: styles$y.footer, children: footer })] }, "content")) })] }));
|
|
721
695
|
return (jsxRuntime.jsx(framerMotion.motion.div, { className: cardClasses, onClick: clickable ? onClick : undefined, whileHover: hoverable ? { y: -4 } : undefined, transition: { type: "spring", stiffness: 400, damping: 17 }, ...motionProps, ...rest, children: cardContent }));
|
|
722
696
|
};
|
|
723
697
|
|
|
724
|
-
var styles$
|
|
698
|
+
var styles$x = {"wrapper":"EmptyState-module_wrapper__h3Y2E","compact":"EmptyState-module_compact__HdYu1","default":"EmptyState-module_default__ACAbn","large":"EmptyState-module_large__H3ELo","icon":"EmptyState-module_icon__i7-3M","title":"EmptyState-module_title__xCyfH","message":"EmptyState-module_message__Bc5xK","action":"EmptyState-module_action__UpnvZ"};
|
|
725
699
|
|
|
726
700
|
/**
|
|
727
701
|
* EmptyState Component
|
|
@@ -758,11 +732,11 @@ var styles$s = {"wrapper":"EmptyState-module_wrapper__h3Y2E","compact":"EmptySta
|
|
|
758
732
|
* @returns {JSX.Element} The rendered EmptyState component
|
|
759
733
|
*/
|
|
760
734
|
const EmptyState = ({ icon, title, message, action, size = 'default', }) => {
|
|
761
|
-
const wrapperClass = [styles$
|
|
762
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClass, children: [icon && jsxRuntime.jsx("div", { className: styles$
|
|
735
|
+
const wrapperClass = [styles$x.wrapper, styles$x[size]].filter(Boolean).join(' ');
|
|
736
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClass, children: [icon && jsxRuntime.jsx("div", { className: styles$x.icon, children: icon }), title && jsxRuntime.jsx("h3", { className: styles$x.title, children: title }), jsxRuntime.jsx("p", { className: styles$x.message, children: message }), action && jsxRuntime.jsx("div", { className: styles$x.action, children: action })] }));
|
|
763
737
|
};
|
|
764
738
|
|
|
765
|
-
var styles$
|
|
739
|
+
var styles$w = {"backdrop":"Modal-module_backdrop__yOx-a","dialog":"Modal-module_dialog__yEXTq","dialogCompact":"Modal-module_dialogCompact__z1Wxp","dialogWide":"Modal-module_dialogWide__9PTXK","header":"Modal-module_header__NHHKd","title":"Modal-module_title__i3R0x","headerActions":"Modal-module_headerActions__g28UN","closeButton":"Modal-module_closeButton__siC-1","body":"Modal-module_body__U7jvM","bodyFlush":"Modal-module_bodyFlush__wtk3q"};
|
|
766
740
|
|
|
767
741
|
/**
|
|
768
742
|
* Modal Component
|
|
@@ -816,16 +790,16 @@ const Modal = ({ open, title, onClose, children, size = 'default', actions, padd
|
|
|
816
790
|
if (typeof document === 'undefined')
|
|
817
791
|
return null;
|
|
818
792
|
const dialogClass = [
|
|
819
|
-
styles$
|
|
820
|
-
size === 'compact' && styles$
|
|
821
|
-
size === 'wide' && styles$
|
|
793
|
+
styles$w.dialog,
|
|
794
|
+
size === 'compact' && styles$w.dialogCompact,
|
|
795
|
+
size === 'wide' && styles$w.dialogWide,
|
|
822
796
|
]
|
|
823
797
|
.filter(Boolean)
|
|
824
798
|
.join(' ');
|
|
825
|
-
return reactDom.createPortal(jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
799
|
+
return reactDom.createPortal(jsxRuntime.jsx(framerMotion.AnimatePresence, { children: open && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$w.backdrop, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.15 }, onClick: onClose, "aria-hidden": "true", children: jsxRuntime.jsxs(framerMotion.motion.div, { className: dialogClass, role: "dialog", "aria-modal": "true", "aria-label": title, initial: { opacity: 0, scale: 0.96, y: 8 }, animate: { opacity: 1, scale: 1, y: 0 }, exit: { opacity: 0, scale: 0.96, y: 8 }, transition: { duration: 0.15, ease: 'easeOut' }, onClick: (e) => e.stopPropagation(), children: [jsxRuntime.jsxs("div", { className: styles$w.header, children: [jsxRuntime.jsx("span", { className: styles$w.title, children: title }), actions && jsxRuntime.jsx("div", { className: styles$w.headerActions, children: actions }), jsxRuntime.jsx("button", { className: styles$w.closeButton, onClick: onClose, "aria-label": "Close modal", type: "button", children: jsxRuntime.jsx(lucideReact.X, { size: 16 }) })] }), jsxRuntime.jsx("div", { className: padding ? styles$w.body : styles$w.bodyFlush, children: children })] }) })) }), document.body);
|
|
826
800
|
};
|
|
827
801
|
|
|
828
|
-
var styles$
|
|
802
|
+
var styles$v = {"checkboxLabel":"Checkbox-module_checkboxLabel__4tBVg","checkbox":"Checkbox-module_checkbox__BbJul","checkboxText":"Checkbox-module_checkboxText__oJsc9"};
|
|
829
803
|
|
|
830
804
|
/**
|
|
831
805
|
* Checkbox component - Modern interactive checkbox with animations
|
|
@@ -864,126 +838,20 @@ var styles$q = {"checkboxLabel":"Checkbox-module_checkboxLabel__4tBVg","checkbox
|
|
|
864
838
|
*/
|
|
865
839
|
const Checkbox = ({ checked, onChange, label, disabled = false, indeterminate = false, id, name, value, soundConfig }) => {
|
|
866
840
|
const checkboxRef = React.useRef(null);
|
|
867
|
-
const {
|
|
841
|
+
const { playSound } = useComponentSound(soundConfig);
|
|
868
842
|
React.useEffect(() => {
|
|
869
843
|
if (checkboxRef.current) {
|
|
870
844
|
checkboxRef.current.indeterminate = indeterminate;
|
|
871
845
|
}
|
|
872
846
|
}, [indeterminate]);
|
|
873
|
-
return (jsxRuntime.jsxs("label", { className: styles$
|
|
847
|
+
return (jsxRuntime.jsxs("label", { className: styles$v.checkboxLabel, children: [jsxRuntime.jsx("input", { ref: checkboxRef, type: "checkbox", checked: checked, onChange: (e) => {
|
|
874
848
|
const isChecked = e.target.checked;
|
|
875
849
|
onChange(isChecked);
|
|
876
850
|
if (soundConfig?.onClick !== false) {
|
|
877
851
|
playSound('toggle');
|
|
878
852
|
}
|
|
879
|
-
}, className: styles$
|
|
880
|
-
};
|
|
881
|
-
|
|
882
|
-
var DefaultContext = {
|
|
883
|
-
color: undefined,
|
|
884
|
-
size: undefined,
|
|
885
|
-
className: undefined,
|
|
886
|
-
style: undefined,
|
|
887
|
-
attr: undefined
|
|
853
|
+
}, className: styles$v.checkbox, disabled: disabled, id: id, name: name, value: value, "aria-checked": indeterminate ? 'mixed' : checked }), label && jsxRuntime.jsx("span", { className: styles$v.checkboxText, children: label })] }));
|
|
888
854
|
};
|
|
889
|
-
var IconContext = React.createContext && /*#__PURE__*/React.createContext(DefaultContext);
|
|
890
|
-
|
|
891
|
-
var _excluded = ["attr", "size", "title"];
|
|
892
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
893
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
|
|
894
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
895
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
896
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
897
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
898
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
899
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
900
|
-
function Tree2Element(tree) {
|
|
901
|
-
return tree && tree.map((node, i) => /*#__PURE__*/React.createElement(node.tag, _objectSpread({
|
|
902
|
-
key: i
|
|
903
|
-
}, node.attr), Tree2Element(node.child)));
|
|
904
|
-
}
|
|
905
|
-
function GenIcon(data) {
|
|
906
|
-
return props => /*#__PURE__*/React.createElement(IconBase, _extends({
|
|
907
|
-
attr: _objectSpread({}, data.attr)
|
|
908
|
-
}, props), Tree2Element(data.child));
|
|
909
|
-
}
|
|
910
|
-
function IconBase(props) {
|
|
911
|
-
var elem = conf => {
|
|
912
|
-
var {
|
|
913
|
-
attr,
|
|
914
|
-
size,
|
|
915
|
-
title
|
|
916
|
-
} = props,
|
|
917
|
-
svgProps = _objectWithoutProperties(props, _excluded);
|
|
918
|
-
var computedSize = size || conf.size || "1em";
|
|
919
|
-
var className;
|
|
920
|
-
if (conf.className) className = conf.className;
|
|
921
|
-
if (props.className) className = (className ? className + " " : "") + props.className;
|
|
922
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
923
|
-
stroke: "currentColor",
|
|
924
|
-
fill: "currentColor",
|
|
925
|
-
strokeWidth: "0"
|
|
926
|
-
}, conf.attr, attr, svgProps, {
|
|
927
|
-
className: className,
|
|
928
|
-
style: _objectSpread(_objectSpread({
|
|
929
|
-
color: props.color || conf.color
|
|
930
|
-
}, conf.style), props.style),
|
|
931
|
-
height: computedSize,
|
|
932
|
-
width: computedSize,
|
|
933
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
934
|
-
}), title && /*#__PURE__*/React.createElement("title", null, title), props.children);
|
|
935
|
-
};
|
|
936
|
-
return IconContext !== undefined ? /*#__PURE__*/React.createElement(IconContext.Consumer, null, conf => elem(conf)) : elem(DefaultContext);
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
// THIS FILE IS AUTO GENERATED
|
|
940
|
-
function FiBook (props) {
|
|
941
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M4 19.5A2.5 2.5 0 0 1 6.5 17H20"},"child":[]},{"tag":"path","attr":{"d":"M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"},"child":[]}]})(props);
|
|
942
|
-
}function FiCalendar (props) {
|
|
943
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"rect","attr":{"x":"3","y":"4","width":"18","height":"18","rx":"2","ry":"2"},"child":[]},{"tag":"line","attr":{"x1":"16","y1":"2","x2":"16","y2":"6"},"child":[]},{"tag":"line","attr":{"x1":"8","y1":"2","x2":"8","y2":"6"},"child":[]},{"tag":"line","attr":{"x1":"3","y1":"10","x2":"21","y2":"10"},"child":[]}]})(props);
|
|
944
|
-
}function FiCheck (props) {
|
|
945
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"polyline","attr":{"points":"20 6 9 17 4 12"},"child":[]}]})(props);
|
|
946
|
-
}function FiChevronDown (props) {
|
|
947
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"polyline","attr":{"points":"6 9 12 15 18 9"},"child":[]}]})(props);
|
|
948
|
-
}function FiChevronLeft (props) {
|
|
949
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"polyline","attr":{"points":"15 18 9 12 15 6"},"child":[]}]})(props);
|
|
950
|
-
}function FiChevronRight (props) {
|
|
951
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"polyline","attr":{"points":"9 18 15 12 9 6"},"child":[]}]})(props);
|
|
952
|
-
}function FiClock (props) {
|
|
953
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"circle","attr":{"cx":"12","cy":"12","r":"10"},"child":[]},{"tag":"polyline","attr":{"points":"12 6 12 12 16 14"},"child":[]}]})(props);
|
|
954
|
-
}function FiDownload (props) {
|
|
955
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"},"child":[]},{"tag":"polyline","attr":{"points":"7 10 12 15 17 10"},"child":[]},{"tag":"line","attr":{"x1":"12","y1":"15","x2":"12","y2":"3"},"child":[]}]})(props);
|
|
956
|
-
}function FiFolder (props) {
|
|
957
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"},"child":[]}]})(props);
|
|
958
|
-
}function FiGithub (props) {
|
|
959
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"},"child":[]}]})(props);
|
|
960
|
-
}function FiInfo (props) {
|
|
961
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"circle","attr":{"cx":"12","cy":"12","r":"10"},"child":[]},{"tag":"line","attr":{"x1":"12","y1":"16","x2":"12","y2":"12"},"child":[]},{"tag":"line","attr":{"x1":"12","y1":"8","x2":"12.01","y2":"8"},"child":[]}]})(props);
|
|
962
|
-
}function FiMaximize (props) {
|
|
963
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"},"child":[]}]})(props);
|
|
964
|
-
}function FiMenu (props) {
|
|
965
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"line","attr":{"x1":"3","y1":"12","x2":"21","y2":"12"},"child":[]},{"tag":"line","attr":{"x1":"3","y1":"6","x2":"21","y2":"6"},"child":[]},{"tag":"line","attr":{"x1":"3","y1":"18","x2":"21","y2":"18"},"child":[]}]})(props);
|
|
966
|
-
}function FiMessageSquare (props) {
|
|
967
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"},"child":[]}]})(props);
|
|
968
|
-
}function FiMoon (props) {
|
|
969
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"},"child":[]}]})(props);
|
|
970
|
-
}function FiPause (props) {
|
|
971
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"rect","attr":{"x":"6","y":"4","width":"4","height":"16"},"child":[]},{"tag":"rect","attr":{"x":"14","y":"4","width":"4","height":"16"},"child":[]}]})(props);
|
|
972
|
-
}function FiPlay (props) {
|
|
973
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"polygon","attr":{"points":"5 3 19 12 5 21 5 3"},"child":[]}]})(props);
|
|
974
|
-
}function FiSearch (props) {
|
|
975
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"circle","attr":{"cx":"11","cy":"11","r":"8"},"child":[]},{"tag":"line","attr":{"x1":"21","y1":"21","x2":"16.65","y2":"16.65"},"child":[]}]})(props);
|
|
976
|
-
}function FiShare2 (props) {
|
|
977
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"circle","attr":{"cx":"18","cy":"5","r":"3"},"child":[]},{"tag":"circle","attr":{"cx":"6","cy":"12","r":"3"},"child":[]},{"tag":"circle","attr":{"cx":"18","cy":"19","r":"3"},"child":[]},{"tag":"line","attr":{"x1":"8.59","y1":"13.51","x2":"15.42","y2":"17.49"},"child":[]},{"tag":"line","attr":{"x1":"15.41","y1":"6.51","x2":"8.59","y2":"10.49"},"child":[]}]})(props);
|
|
978
|
-
}function FiSun (props) {
|
|
979
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"circle","attr":{"cx":"12","cy":"12","r":"5"},"child":[]},{"tag":"line","attr":{"x1":"12","y1":"1","x2":"12","y2":"3"},"child":[]},{"tag":"line","attr":{"x1":"12","y1":"21","x2":"12","y2":"23"},"child":[]},{"tag":"line","attr":{"x1":"4.22","y1":"4.22","x2":"5.64","y2":"5.64"},"child":[]},{"tag":"line","attr":{"x1":"18.36","y1":"18.36","x2":"19.78","y2":"19.78"},"child":[]},{"tag":"line","attr":{"x1":"1","y1":"12","x2":"3","y2":"12"},"child":[]},{"tag":"line","attr":{"x1":"21","y1":"12","x2":"23","y2":"12"},"child":[]},{"tag":"line","attr":{"x1":"4.22","y1":"19.78","x2":"5.64","y2":"18.36"},"child":[]},{"tag":"line","attr":{"x1":"18.36","y1":"5.64","x2":"19.78","y2":"4.22"},"child":[]}]})(props);
|
|
980
|
-
}function FiUserPlus (props) {
|
|
981
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"},"child":[]},{"tag":"circle","attr":{"cx":"8.5","cy":"7","r":"4"},"child":[]},{"tag":"line","attr":{"x1":"20","y1":"8","x2":"20","y2":"14"},"child":[]},{"tag":"line","attr":{"x1":"23","y1":"11","x2":"17","y2":"11"},"child":[]}]})(props);
|
|
982
|
-
}function FiUsers (props) {
|
|
983
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"path","attr":{"d":"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"},"child":[]},{"tag":"circle","attr":{"cx":"9","cy":"7","r":"4"},"child":[]},{"tag":"path","attr":{"d":"M23 21v-2a4 4 0 0 0-3-3.87"},"child":[]},{"tag":"path","attr":{"d":"M16 3.13a4 4 0 0 1 0 7.75"},"child":[]}]})(props);
|
|
984
|
-
}function FiX (props) {
|
|
985
|
-
return GenIcon({"attr":{"viewBox":"0 0 24 24","fill":"none","stroke":"currentColor","strokeWidth":"2","strokeLinecap":"round","strokeLinejoin":"round"},"child":[{"tag":"line","attr":{"x1":"18","y1":"6","x2":"6","y2":"18"},"child":[]},{"tag":"line","attr":{"x1":"6","y1":"6","x2":"18","y2":"18"},"child":[]}]})(props);
|
|
986
|
-
}
|
|
987
855
|
|
|
988
856
|
const formatDateToEuropean = (date) => {
|
|
989
857
|
if (!date)
|
|
@@ -1013,7 +881,7 @@ const parseEuropeanDate = (dateString) => {
|
|
|
1013
881
|
return '';
|
|
1014
882
|
};
|
|
1015
883
|
|
|
1016
|
-
var styles$
|
|
884
|
+
var styles$u = {"dateInput":"DateInput-module_dateInput__54VPD","label":"DateInput-module_label__yDdUw","inputWrapper":"DateInput-module_inputWrapper__x-r1d","textInput":"DateInput-module_textInput__ToOSX","calendarButton":"DateInput-module_calendarButton__JzDGD","hiddenDateInput":"DateInput-module_hiddenDateInput__IWNg3","error":"DateInput-module_error__ieuPO","success":"DateInput-module_success__rPA93","loading":"DateInput-module_loading__1DAmD"};
|
|
1017
885
|
|
|
1018
886
|
/**
|
|
1019
887
|
* DateInput component - European format date picker with manual input support
|
|
@@ -1102,19 +970,19 @@ function DateInput({ label, value, onChange, placeholder = "25/12/2024", onFocus
|
|
|
1102
970
|
}
|
|
1103
971
|
};
|
|
1104
972
|
const getClassName = () => {
|
|
1105
|
-
const classes = [styles$
|
|
973
|
+
const classes = [styles$u.dateInput];
|
|
1106
974
|
if (error)
|
|
1107
|
-
classes.push(styles$
|
|
975
|
+
classes.push(styles$u.error);
|
|
1108
976
|
if (success)
|
|
1109
|
-
classes.push(styles$
|
|
977
|
+
classes.push(styles$u.success);
|
|
1110
978
|
if (loading)
|
|
1111
|
-
classes.push(styles$
|
|
979
|
+
classes.push(styles$u.loading);
|
|
1112
980
|
return classes.join(' ');
|
|
1113
981
|
};
|
|
1114
|
-
return (jsxRuntime.jsxs("div", { className: getClassName(), children: [jsxRuntime.jsx("label", { className: styles$
|
|
982
|
+
return (jsxRuntime.jsxs("div", { className: getClassName(), children: [jsxRuntime.jsx("label", { className: styles$u.label, children: label }), jsxRuntime.jsxs("div", { className: styles$u.inputWrapper, children: [jsxRuntime.jsx("input", { type: "text", value: value.includes('-') ? formatDateToEuropean(value) : value, onChange: (e) => handleTextChange(e.target.value), onFocus: onFocus, onBlur: onBlur, placeholder: placeholder, className: styles$u.textInput, disabled: disabled || loading, ...handlers }), jsxRuntime.jsx("button", { type: "button", onClick: handleCalendarClick, className: styles$u.calendarButton, title: "Select date from calendar", disabled: disabled || loading, children: jsxRuntime.jsx(lucideReact.Calendar, {}) }), jsxRuntime.jsx("input", { ref: hiddenDateInputRef, type: "date", onChange: handleCalendarChange, className: styles$u.hiddenDateInput, tabIndex: -1, disabled: disabled || loading })] })] }));
|
|
1115
983
|
}
|
|
1116
984
|
|
|
1117
|
-
var styles$
|
|
985
|
+
var styles$t = {"searchableDropdown":"SearchableDropdown-module_searchableDropdown__S2Nh5","dropdownTrigger":"SearchableDropdown-module_dropdownTrigger__dihdr","open":"SearchableDropdown-module_open__P7mRt","dropdownValue":"SearchableDropdown-module_dropdownValue__ydrc2","placeholder":"SearchableDropdown-module_placeholder__BwM2W","dropdownArrow":"SearchableDropdown-module_dropdownArrow__yd5fp","dropdownMenu":"SearchableDropdown-module_dropdownMenu__2Z5cc","dropdownSearch":"SearchableDropdown-module_dropdownSearch__NRk7j","searchInput":"SearchableDropdown-module_searchInput__VS2Hw","searchIcon":"SearchableDropdown-module_searchIcon__2vKFF","dropdownOptions":"SearchableDropdown-module_dropdownOptions__6YXqF","dropdownOption":"SearchableDropdown-module_dropdownOption__YwDr-","selected":"SearchableDropdown-module_selected__31JeB","highlighted":"SearchableDropdown-module_highlighted__P0bBq","checkIcon":"SearchableDropdown-module_checkIcon__YxowK","dropdownNoResults":"SearchableDropdown-module_dropdownNoResults__WW-Da","loading":"SearchableDropdown-module_loading__xlYf0"};
|
|
1118
986
|
|
|
1119
987
|
/**
|
|
1120
988
|
* SearchableDropdown component - Modern filterable dropdown with animations
|
|
@@ -1219,23 +1087,23 @@ function SearchableDropdown({ label, value, onChange, options, placeholder = "Se
|
|
|
1219
1087
|
}
|
|
1220
1088
|
};
|
|
1221
1089
|
const getTriggerClassName = () => {
|
|
1222
|
-
const classes = [styles$
|
|
1090
|
+
const classes = [styles$t.dropdownTrigger];
|
|
1223
1091
|
if (isOpen)
|
|
1224
|
-
classes.push(styles$
|
|
1092
|
+
classes.push(styles$t.open);
|
|
1225
1093
|
if (loading)
|
|
1226
|
-
classes.push(styles$
|
|
1094
|
+
classes.push(styles$t.loading);
|
|
1227
1095
|
if (error)
|
|
1228
|
-
classes.push(styles$
|
|
1096
|
+
classes.push(styles$t.error);
|
|
1229
1097
|
return classes.join(' ');
|
|
1230
1098
|
};
|
|
1231
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1099
|
+
return (jsxRuntime.jsxs("div", { className: styles$t.searchableDropdown, ref: dropdownRef, onKeyDown: handleKeyDown, children: [jsxRuntime.jsx("label", { children: label }), jsxRuntime.jsxs(framerMotion.motion.button, { type: "button", className: getTriggerClassName(), onClick: () => !disabled && !loading && setIsOpen(!isOpen), whileTap: { scale: disabled ? 1 : 0.98 }, style: { willChange: 'transform' }, disabled: disabled, children: [jsxRuntime.jsx("span", { className: `${styles$t.dropdownValue} ${!displayValue ? styles$t.placeholder : ''}`, children: displayValue || placeholder }), jsxRuntime.jsx(lucideReact.ChevronDown, { className: styles$t.dropdownArrow })] }), jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isOpen && (jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$t.dropdownMenu, initial: { opacity: 0, y: -10, scale: 0.95 }, animate: { opacity: 1, y: 0, scale: 1 }, exit: { opacity: 0, y: -10, scale: 0.95 }, transition: { duration: 0.2, ease: "easeOut" }, children: [jsxRuntime.jsxs("div", { className: styles$t.dropdownSearch, children: [jsxRuntime.jsx(lucideReact.Search, { className: styles$t.searchIcon }), jsxRuntime.jsx("input", { ref: inputRef, type: "text", className: styles$t.searchInput, placeholder: "Cerca...", value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), onClick: (e) => e.stopPropagation() })] }), jsxRuntime.jsxs("div", { className: styles$t.dropdownOptions, children: [allOptions.map((opt, index) => {
|
|
1232
1100
|
const isSelected = value === opt.value;
|
|
1233
1101
|
const isHighlighted = highlightedIndex === index;
|
|
1234
|
-
return (jsxRuntime.jsxs(framerMotion.motion.button, { type: "button", className: `${styles$
|
|
1235
|
-
}), allOptions.length === 0 && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
1102
|
+
return (jsxRuntime.jsxs(framerMotion.motion.button, { type: "button", className: `${styles$t.dropdownOption} ${isSelected ? styles$t.selected : ''} ${isHighlighted ? styles$t.highlighted : ''}`, onClick: () => handleSelect(opt.value), onMouseEnter: () => setHighlightedIndex(index), initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { delay: index * 0.02 }, whileTap: { scale: 0.98 }, style: { willChange: 'transform' }, children: [jsxRuntime.jsx("span", { children: opt.label }), isSelected && jsxRuntime.jsx(lucideReact.Check, { className: styles$t.checkIcon })] }, `${opt.value}-${index}`));
|
|
1103
|
+
}), allOptions.length === 0 && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$t.dropdownNoResults, initial: { opacity: 0 }, animate: { opacity: 1 }, children: "No results found" }))] })] })) })] }));
|
|
1236
1104
|
}
|
|
1237
1105
|
|
|
1238
|
-
var styles$
|
|
1106
|
+
var styles$s = {"selectInput":"SelectInput-module_selectInput__s6zEg","selectWrapper":"SelectInput-module_selectWrapper__Qr4pl","selectIcon":"SelectInput-module_selectIcon__9pjhf","error":"SelectInput-module_error__3WNJc","success":"SelectInput-module_success__WJ5ga","loading":"SelectInput-module_loading__n35N9"};
|
|
1239
1107
|
|
|
1240
1108
|
/**
|
|
1241
1109
|
* SelectInput component - Styled dropdown selector with flexible option format
|
|
@@ -1270,29 +1138,29 @@ var styles$n = {"selectInput":"SelectInput-module_selectInput__s6zEg","selectWra
|
|
|
1270
1138
|
* ]}
|
|
1271
1139
|
* />
|
|
1272
1140
|
*/
|
|
1273
|
-
function SelectInput({ label, value, onChange, options, placeholder = "Select...", disabled = false, error = false, success = false, loading = false, required = false, soundConfig }) {
|
|
1141
|
+
function SelectInput({ label, value, onChange, options, placeholder = "Select...", disabled = false, error = false, success = false, loading = false, required = false, soundConfig, className }) {
|
|
1274
1142
|
const { handlers, playSound } = useComponentSound(soundConfig);
|
|
1275
1143
|
const getClassName = () => {
|
|
1276
|
-
const classes = [styles$
|
|
1144
|
+
const classes = [styles$s.selectInput];
|
|
1277
1145
|
if (error)
|
|
1278
|
-
classes.push(styles$
|
|
1146
|
+
classes.push(styles$s.error);
|
|
1279
1147
|
if (success)
|
|
1280
|
-
classes.push(styles$
|
|
1148
|
+
classes.push(styles$s.success);
|
|
1281
1149
|
if (loading)
|
|
1282
|
-
classes.push(styles$
|
|
1150
|
+
classes.push(styles$s.loading);
|
|
1283
1151
|
return classes.join(' ');
|
|
1284
1152
|
};
|
|
1285
|
-
return (jsxRuntime.jsxs("div", { className: getClassName()
|
|
1153
|
+
return (jsxRuntime.jsxs("div", { className: `${getClassName()}${className ? ` ${className}` : ''}`, children: [jsxRuntime.jsxs("label", { children: [label, required && jsxRuntime.jsx("span", { style: { color: 'var(--color-error)' }, children: " *" })] }), jsxRuntime.jsxs("div", { className: styles$s.selectWrapper, children: [jsxRuntime.jsxs("select", { value: value, onChange: e => {
|
|
1286
1154
|
playSound('click');
|
|
1287
1155
|
onChange(e.target.value);
|
|
1288
1156
|
}, disabled: disabled || loading, required: required, ...handlers, children: [jsxRuntime.jsx("option", { value: "", children: placeholder }), options.map(opt => {
|
|
1289
1157
|
const optionValue = typeof opt === 'string' ? opt : opt.value;
|
|
1290
1158
|
const optionLabel = typeof opt === 'string' ? opt : opt.label;
|
|
1291
1159
|
return (jsxRuntime.jsx("option", { value: optionValue, children: optionLabel }, optionValue));
|
|
1292
|
-
})] }), jsxRuntime.jsx(
|
|
1160
|
+
})] }), jsxRuntime.jsx(lucideReact.ChevronDown, { className: styles$s.selectIcon })] })] }));
|
|
1293
1161
|
}
|
|
1294
1162
|
|
|
1295
|
-
var styles$
|
|
1163
|
+
var styles$r = {"textareaContainer":"TextArea-module_textareaContainer__AquFj","compact":"TextArea-module_compact__U5lPn","textareaLabel":"TextArea-module_textareaLabel__7Vmyx","requiredIndicator":"TextArea-module_requiredIndicator__3Fxyy","textareaInput":"TextArea-module_textareaInput__VCDZA","characterCount":"TextArea-module_characterCount__9FO5N","nearLimit":"TextArea-module_nearLimit__cUdnw","atLimit":"TextArea-module_atLimit__GoWCC","error":"TextArea-module_error__ciHgb","success":"TextArea-module_success__a0-xD","loading":"TextArea-module_loading__CSFBR","focusMode":"TextArea-module_focusMode__9A8U-"};
|
|
1296
1164
|
|
|
1297
1165
|
/**
|
|
1298
1166
|
* TextArea component - Multi-line text input with character counting
|
|
@@ -1327,38 +1195,38 @@ var styles$m = {"textareaContainer":"TextArea-module_textareaContainer__AquFj","
|
|
|
1327
1195
|
function TextArea({ label, value, onChange, rows = 5, placeholder = "", required = false, maxLength, disabled = false, error = false, success = false, loading = false, focusMode = false, compact = false, className = "" }) {
|
|
1328
1196
|
const textareaId = `textarea-${Math.random().toString(36).substr(2, 9)}`;
|
|
1329
1197
|
const getContainerClassName = () => {
|
|
1330
|
-
const classes = [styles$
|
|
1198
|
+
const classes = [styles$r.textareaContainer];
|
|
1331
1199
|
if (error)
|
|
1332
|
-
classes.push(styles$
|
|
1200
|
+
classes.push(styles$r.error);
|
|
1333
1201
|
if (success)
|
|
1334
|
-
classes.push(styles$
|
|
1202
|
+
classes.push(styles$r.success);
|
|
1335
1203
|
if (loading)
|
|
1336
|
-
classes.push(styles$
|
|
1204
|
+
classes.push(styles$r.loading);
|
|
1337
1205
|
if (focusMode)
|
|
1338
|
-
classes.push(styles$
|
|
1206
|
+
classes.push(styles$r.focusMode);
|
|
1339
1207
|
if (compact)
|
|
1340
|
-
classes.push(styles$
|
|
1208
|
+
classes.push(styles$r.compact);
|
|
1341
1209
|
if (className)
|
|
1342
1210
|
classes.push(className);
|
|
1343
1211
|
return classes.join(' ');
|
|
1344
1212
|
};
|
|
1345
1213
|
const getCharCountClassName = () => {
|
|
1346
1214
|
if (!maxLength)
|
|
1347
|
-
return styles$
|
|
1348
|
-
const classes = [styles$
|
|
1215
|
+
return styles$r.characterCount;
|
|
1216
|
+
const classes = [styles$r.characterCount];
|
|
1349
1217
|
const percentage = (value.length / maxLength) * 100;
|
|
1350
1218
|
if (percentage >= 100) {
|
|
1351
|
-
classes.push(styles$
|
|
1219
|
+
classes.push(styles$r.atLimit);
|
|
1352
1220
|
}
|
|
1353
1221
|
else if (percentage >= 80) {
|
|
1354
|
-
classes.push(styles$
|
|
1222
|
+
classes.push(styles$r.nearLimit);
|
|
1355
1223
|
}
|
|
1356
1224
|
return classes.join(' ');
|
|
1357
1225
|
};
|
|
1358
|
-
return (jsxRuntime.jsxs("div", { className: getContainerClassName(), children: [label && (jsxRuntime.jsxs("label", { htmlFor: textareaId, className: styles$
|
|
1226
|
+
return (jsxRuntime.jsxs("div", { className: getContainerClassName(), children: [label && (jsxRuntime.jsxs("label", { htmlFor: textareaId, className: styles$r.textareaLabel, children: [label, required && jsxRuntime.jsx("span", { className: styles$r.requiredIndicator, children: "*" })] })), jsxRuntime.jsx("textarea", { id: textareaId, value: value, onChange: (e) => onChange(e.target.value), rows: rows, placeholder: placeholder, maxLength: maxLength, className: styles$r.textareaInput, "aria-required": required, disabled: disabled || loading, "aria-invalid": error }), maxLength && (jsxRuntime.jsxs("div", { className: getCharCountClassName(), children: [jsxRuntime.jsx("span", { children: value.length }), jsxRuntime.jsx("span", { style: { opacity: 0.7 }, children: " / " }), jsxRuntime.jsx("span", { children: maxLength })] }))] }));
|
|
1359
1227
|
}
|
|
1360
1228
|
|
|
1361
|
-
var styles$
|
|
1229
|
+
var styles$q = {"textInput":"TextInput-module_textInput__b2LVM","required":"TextInput-module_required__7uLiM","inputError":"TextInput-module_inputError__QD0a-","errorMessage":"TextInput-module_errorMessage__nIDoQ","success":"TextInput-module_success__KbSS3","loading":"TextInput-module_loading__qXaca","withIcon":"TextInput-module_withIcon__-8swm","inputIcon":"TextInput-module_inputIcon__B4czN","withAction":"TextInput-module_withAction__JD3ku","actionButton":"TextInput-module_actionButton__zFJel"};
|
|
1362
1230
|
|
|
1363
1231
|
/**
|
|
1364
1232
|
* TextInput component - A versatile text input field with label and error handling
|
|
@@ -1395,21 +1263,21 @@ function TextInput({ label, value, onChange, type = "text", onBlur, placeholder,
|
|
|
1395
1263
|
const { handlers, playSound } = useComponentSound(soundConfig);
|
|
1396
1264
|
const prevValueRef = React.useRef(value);
|
|
1397
1265
|
const getContainerClassName = () => {
|
|
1398
|
-
const classes = [styles$
|
|
1266
|
+
const classes = [styles$q.textInput];
|
|
1399
1267
|
if (success)
|
|
1400
|
-
classes.push(styles$
|
|
1268
|
+
classes.push(styles$q.success);
|
|
1401
1269
|
if (loading)
|
|
1402
|
-
classes.push(styles$
|
|
1270
|
+
classes.push(styles$q.loading);
|
|
1403
1271
|
if (icon)
|
|
1404
|
-
classes.push(styles$
|
|
1272
|
+
classes.push(styles$q.withIcon);
|
|
1405
1273
|
if (actionButton)
|
|
1406
|
-
classes.push(styles$
|
|
1274
|
+
classes.push(styles$q.withAction);
|
|
1407
1275
|
return classes.join(' ');
|
|
1408
1276
|
};
|
|
1409
1277
|
React.useEffect(() => {
|
|
1410
1278
|
prevValueRef.current = value;
|
|
1411
1279
|
}, [value]);
|
|
1412
|
-
return (jsxRuntime.jsxs("div", { className: getContainerClassName(), children: [jsxRuntime.jsxs("label", { htmlFor: inputId, children: [label, required && jsxRuntime.jsx("span", { className: styles$
|
|
1280
|
+
return (jsxRuntime.jsxs("div", { className: getContainerClassName(), children: [jsxRuntime.jsxs("label", { htmlFor: inputId, children: [label, required && jsxRuntime.jsx("span", { className: styles$q.required, children: "*" })] }), jsxRuntime.jsxs("div", { style: { position: 'relative' }, children: [icon && jsxRuntime.jsx("div", { className: styles$q.inputIcon, children: icon }), jsxRuntime.jsx("input", { id: inputId, type: type, value: value, onChange: (e) => {
|
|
1413
1281
|
const newValue = e.target.value;
|
|
1414
1282
|
const oldValue = prevValueRef.current;
|
|
1415
1283
|
onChange(newValue);
|
|
@@ -1425,13 +1293,13 @@ function TextInput({ label, value, onChange, type = "text", onBlur, placeholder,
|
|
|
1425
1293
|
if (error && soundConfig?.onError) {
|
|
1426
1294
|
playSound(typeof soundConfig.onError === 'string' ? soundConfig.onError : 'error');
|
|
1427
1295
|
}
|
|
1428
|
-
}, onBlur: onBlur, placeholder: placeholder, className: error ? styles$
|
|
1296
|
+
}, onBlur: onBlur, placeholder: placeholder, className: error ? styles$q.inputError : '', "aria-invalid": !!error, "aria-describedby": error ? `${inputId}-error` : undefined, disabled: disabled || loading, maxLength: maxLength, autoComplete: autoComplete }), actionButton && (jsxRuntime.jsx("button", { type: "button", className: styles$q.actionButton, onClick: () => {
|
|
1429
1297
|
handlers.onClick?.();
|
|
1430
1298
|
actionButton.onClick();
|
|
1431
|
-
}, disabled: disabled || loading, children: actionButton.label }))] }), error && (jsxRuntime.jsx("span", { id: `${inputId}-error`, className: styles$
|
|
1299
|
+
}, disabled: disabled || loading, children: actionButton.label }))] }), error && (jsxRuntime.jsx("span", { id: `${inputId}-error`, className: styles$q.errorMessage, children: error }))] }));
|
|
1432
1300
|
}
|
|
1433
1301
|
|
|
1434
|
-
var styles$
|
|
1302
|
+
var styles$p = {"toggleContainer":"Toggle-module_toggleContainer__QxqQb","toggleButton":"Toggle-module_toggleButton__WUUf-","active":"Toggle-module_active__fX6Io"};
|
|
1435
1303
|
|
|
1436
1304
|
/**
|
|
1437
1305
|
* Toggle Component
|
|
@@ -1449,7 +1317,7 @@ var styles$k = {"toggleContainer":"Toggle-module_toggleContainer__QxqQb","toggle
|
|
|
1449
1317
|
* onToggle={setDarkMode}
|
|
1450
1318
|
* leftLabel="Light"
|
|
1451
1319
|
* rightLabel="Dark"
|
|
1452
|
-
* soundTheme="
|
|
1320
|
+
* soundTheme="digital"
|
|
1453
1321
|
* enableCelebration={true}
|
|
1454
1322
|
* />
|
|
1455
1323
|
*
|
|
@@ -1477,14 +1345,14 @@ var styles$k = {"toggleContainer":"Toggle-module_toggleContainer__QxqQb","toggle
|
|
|
1477
1345
|
* @returns {JSX.Element} The rendered Toggle component
|
|
1478
1346
|
*/
|
|
1479
1347
|
function Toggle(props) {
|
|
1480
|
-
const { isOn, onToggle, leftLabel, rightLabel, leftIcon, rightIcon, className, style, soundConfig,
|
|
1348
|
+
const { isOn, onToggle, leftLabel, rightLabel, leftIcon, rightIcon, className, style, soundConfig, enableCelebration = false } = props;
|
|
1481
1349
|
const leftButtonRef = React.useRef(null);
|
|
1482
1350
|
const rightButtonRef = React.useRef(null);
|
|
1483
|
-
const { handlers, playSound
|
|
1351
|
+
const { handlers, playSound } = useComponentSound({
|
|
1484
1352
|
...soundConfig,
|
|
1485
|
-
|
|
1353
|
+
onClick: soundConfig?.onClick ?? 'toggle',
|
|
1486
1354
|
onHover: soundConfig?.onHover ?? 'hover'
|
|
1487
|
-
}
|
|
1355
|
+
});
|
|
1488
1356
|
// Ensure content stays centered by merging styles
|
|
1489
1357
|
const buttonStyle = {
|
|
1490
1358
|
display: 'flex',
|
|
@@ -1492,42 +1360,40 @@ function Toggle(props) {
|
|
|
1492
1360
|
justifyContent: 'center',
|
|
1493
1361
|
...style
|
|
1494
1362
|
};
|
|
1495
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1496
|
-
const element = leftButtonRef.current;
|
|
1363
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$p.toggleContainer} ${className || ''}`, children: [jsxRuntime.jsxs(framerMotion.motion.button, { ref: leftButtonRef, className: `${styles$p.toggleButton} ${!isOn ? styles$p.active : ''}`, whileHover: { scale: 1.05 }, whileTap: { scale: 0.95 }, transition: { type: "spring", stiffness: 400, damping: 17 }, onClick: () => {
|
|
1497
1364
|
if (!isOn) {
|
|
1498
|
-
// Already on left
|
|
1365
|
+
// Already on left
|
|
1499
1366
|
if (enableCelebration) {
|
|
1500
|
-
|
|
1367
|
+
playSound('success');
|
|
1501
1368
|
}
|
|
1502
1369
|
else {
|
|
1503
|
-
playSound('
|
|
1370
|
+
playSound('click');
|
|
1504
1371
|
}
|
|
1505
1372
|
}
|
|
1506
1373
|
else {
|
|
1507
1374
|
// Switching to left
|
|
1508
|
-
playSound('toggle'
|
|
1375
|
+
playSound('toggle');
|
|
1509
1376
|
}
|
|
1510
1377
|
onToggle(false);
|
|
1511
|
-
}, onMouseEnter: () => handlers.onMouseEnter?.(
|
|
1512
|
-
const element = rightButtonRef.current;
|
|
1378
|
+
}, onMouseEnter: () => handlers.onMouseEnter?.(), style: buttonStyle, children: [jsxRuntime.jsx(framerMotion.motion.div, { animate: { scale: !isOn ? 1.1 : 1, rotate: !isOn ? [0, -5, 5, 0] : 0 }, transition: { duration: 0.3 }, children: leftIcon }), leftLabel] }), jsxRuntime.jsxs(framerMotion.motion.button, { ref: rightButtonRef, className: `${styles$p.toggleButton} ${isOn ? styles$p.active : ''}`, whileHover: { scale: 1.05 }, whileTap: { scale: 0.95 }, transition: { type: "spring", stiffness: 400, damping: 17 }, onClick: () => {
|
|
1513
1379
|
if (isOn) {
|
|
1514
|
-
// Already on right
|
|
1380
|
+
// Already on right
|
|
1515
1381
|
if (enableCelebration) {
|
|
1516
|
-
|
|
1382
|
+
playSound('success');
|
|
1517
1383
|
}
|
|
1518
1384
|
else {
|
|
1519
|
-
playSound('
|
|
1385
|
+
playSound('click');
|
|
1520
1386
|
}
|
|
1521
1387
|
}
|
|
1522
1388
|
else {
|
|
1523
|
-
// Switching to right
|
|
1524
|
-
playSound('success'
|
|
1389
|
+
// Switching to right
|
|
1390
|
+
playSound('success');
|
|
1525
1391
|
}
|
|
1526
1392
|
onToggle(true);
|
|
1527
|
-
}, onMouseEnter: () => handlers.onMouseEnter?.(
|
|
1393
|
+
}, onMouseEnter: () => handlers.onMouseEnter?.(), style: buttonStyle, children: [jsxRuntime.jsx(framerMotion.motion.div, { animate: { scale: isOn ? 1.1 : 1, rotate: isOn ? [0, 5, -5, 0] : 0 }, transition: { duration: 0.3 }, children: rightIcon }), rightLabel] })] }));
|
|
1528
1394
|
}
|
|
1529
1395
|
|
|
1530
|
-
var styles$
|
|
1396
|
+
var styles$o = {"container":"NumberStepper-module_container__WSGlU","header":"NumberStepper-module_header__qXI1Y","icon":"NumberStepper-module_icon__vHgsw","label":"NumberStepper-module_label__AYr3g","stepper":"NumberStepper-module_stepper__oQhTp","disabled":"NumberStepper-module_disabled__kGB-g","button":"NumberStepper-module_button__YcjRt","buttonIcon":"NumberStepper-module_buttonIcon__odXec","valueContainer":"NumberStepper-module_valueContainer__87w2D","valueWrapper":"NumberStepper-module_valueWrapper__TH65N","value":"NumberStepper-module_value__BxJeD","limits":"NumberStepper-module_limits__-UrRE","limit":"NumberStepper-module_limit__7nbIP","small":"NumberStepper-module_small__P-k96","large":"NumberStepper-module_large__Lz6lk","outlined":"NumberStepper-module_outlined__CIXv7","filled":"NumberStepper-module_filled__IxOg-","minimal":"NumberStepper-module_minimal__y47-W","custom":"NumberStepper-module_custom__XGSVg","vertical":"NumberStepper-module_vertical__nBcL7","pulse":"NumberStepper-module_pulse__51oUo"};
|
|
1531
1397
|
|
|
1532
1398
|
/**
|
|
1533
1399
|
* NumberStepper Component
|
|
@@ -1664,16 +1530,18 @@ const NumberStepper = ({ value, onChange, min = -Infinity, max = Infinity, step
|
|
|
1664
1530
|
e.preventDefault();
|
|
1665
1531
|
handleDecrement();
|
|
1666
1532
|
break;
|
|
1667
|
-
case 'PageUp':
|
|
1533
|
+
case 'PageUp': {
|
|
1668
1534
|
e.preventDefault();
|
|
1669
1535
|
const bigIncrease = Math.min(value + (step * 10), max);
|
|
1670
1536
|
onChange(bigIncrease);
|
|
1671
1537
|
break;
|
|
1672
|
-
|
|
1538
|
+
}
|
|
1539
|
+
case 'PageDown': {
|
|
1673
1540
|
e.preventDefault();
|
|
1674
1541
|
const bigDecrease = Math.max(value - (step * 10), min);
|
|
1675
1542
|
onChange(bigDecrease);
|
|
1676
1543
|
break;
|
|
1544
|
+
}
|
|
1677
1545
|
case 'Home':
|
|
1678
1546
|
e.preventDefault();
|
|
1679
1547
|
if (min !== -Infinity)
|
|
@@ -1712,32 +1580,32 @@ const NumberStepper = ({ value, onChange, min = -Infinity, max = Infinity, step
|
|
|
1712
1580
|
setDisplayValue(finalValue);
|
|
1713
1581
|
}, [displayValue, min, max, step, onChange]);
|
|
1714
1582
|
const containerClasses = [
|
|
1715
|
-
styles$
|
|
1716
|
-
styles$
|
|
1717
|
-
styles$
|
|
1718
|
-
layout === 'vertical' && styles$
|
|
1719
|
-
disabled && styles$
|
|
1583
|
+
styles$o.container,
|
|
1584
|
+
styles$o[size],
|
|
1585
|
+
styles$o[variant],
|
|
1586
|
+
layout === 'vertical' && styles$o.vertical,
|
|
1587
|
+
disabled && styles$o.disabled,
|
|
1720
1588
|
className
|
|
1721
1589
|
].filter(Boolean).join(' ');
|
|
1722
1590
|
// Merge custom styles with hover states
|
|
1723
1591
|
const [isButtonHovered, setIsButtonHovered] = React.useState(null);
|
|
1724
1592
|
const isDecrementDisabled = disabled || value <= min;
|
|
1725
1593
|
const isIncrementDisabled = disabled || value >= max;
|
|
1726
|
-
const stepperContent = (jsxRuntime.jsxs("div", { className: styles$
|
|
1594
|
+
const stepperContent = (jsxRuntime.jsxs("div", { className: styles$o.stepper, style: customStyles.stepper, onKeyDown: handleKeyDown, tabIndex: disabled ? -1 : 0, ...handlers, children: [jsxRuntime.jsx(framerMotion.motion.button, { className: styles$o.button, style: {
|
|
1727
1595
|
...customStyles.button,
|
|
1728
1596
|
...(isButtonHovered === 'decrement' && customStyles.buttonHover)
|
|
1729
|
-
}, onMouseEnter: () => setIsButtonHovered('decrement'), onMouseLeave: () => setIsButtonHovered(null), onClick: handleDecrement, disabled: isDecrementDisabled, whileTap: !isDecrementDisabled ? { scale: 0.9 } : undefined, animate: isDecrementing ? { scale: [1, 1.2, 1] } : undefined, transition: { duration: 0.2 }, "aria-label": "Decrease value", children: customButtons.decrement || (showPlusMinus ? (jsxRuntime.jsx("span", { className: styles$
|
|
1597
|
+
}, onMouseEnter: () => setIsButtonHovered('decrement'), onMouseLeave: () => setIsButtonHovered(null), onClick: handleDecrement, disabled: isDecrementDisabled, whileTap: !isDecrementDisabled ? { scale: 0.9 } : undefined, animate: isDecrementing ? { scale: [1, 1.2, 1] } : undefined, transition: { duration: 0.2 }, "aria-label": "Decrease value", children: customButtons.decrement || (showPlusMinus ? (jsxRuntime.jsx("span", { className: styles$o.buttonIcon, style: customStyles.buttonIcon, children: "\u2212" })) : (jsxRuntime.jsx("svg", { className: styles$o.buttonIcon, style: customStyles.buttonIcon, viewBox: "0 0 24 24", fill: "none", children: jsxRuntime.jsx("path", { d: "M15 18L9 12L15 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }))) }), jsxRuntime.jsx("div", { className: styles$o.valueContainer, style: customStyles.valueContainer, children: jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: jsxRuntime.jsx(framerMotion.motion.div, { initial: { y: isIncrementing ? 10 : isDecrementing ? -10 : 0, opacity: 0 }, animate: { y: 0, opacity: 1 }, exit: { y: isIncrementing ? -10 : isDecrementing ? 10 : 0, opacity: 0 }, transition: { duration: 0.15 }, className: styles$o.valueWrapper, children: jsxRuntime.jsx("input", { type: "text", className: styles$o.value, style: customStyles.value, value: displayValue, onChange: handleInputChange, onBlur: handleInputBlur, disabled: disabled, "aria-label": label || "Number input", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value }) }, value) }) }), jsxRuntime.jsx(framerMotion.motion.button, { className: styles$o.button, style: {
|
|
1730
1598
|
...customStyles.button,
|
|
1731
1599
|
...(isButtonHovered === 'increment' && customStyles.buttonHover)
|
|
1732
|
-
}, onMouseEnter: () => setIsButtonHovered('increment'), onMouseLeave: () => setIsButtonHovered(null), onClick: handleIncrement, disabled: isIncrementDisabled, whileTap: !isIncrementDisabled ? { scale: 0.9 } : undefined, animate: isIncrementing ? { scale: [1, 1.2, 1] } : undefined, transition: { duration: 0.2 }, "aria-label": "Increase value", children: customButtons.increment || (showPlusMinus ? (jsxRuntime.jsx("span", { className: styles$
|
|
1600
|
+
}, onMouseEnter: () => setIsButtonHovered('increment'), onMouseLeave: () => setIsButtonHovered(null), onClick: handleIncrement, disabled: isIncrementDisabled, whileTap: !isIncrementDisabled ? { scale: 0.9 } : undefined, animate: isIncrementing ? { scale: [1, 1.2, 1] } : undefined, transition: { duration: 0.2 }, "aria-label": "Increase value", children: customButtons.increment || (showPlusMinus ? (jsxRuntime.jsx("span", { className: styles$o.buttonIcon, style: customStyles.buttonIcon, children: "+" })) : (jsxRuntime.jsx("svg", { className: styles$o.buttonIcon, style: customStyles.buttonIcon, viewBox: "0 0 24 24", fill: "none", children: jsxRuntime.jsx("path", { d: "M9 18L15 12L9 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }))) })] }));
|
|
1733
1601
|
// For custom variant with horizontal layout, render differently
|
|
1734
1602
|
if (variant === 'custom' && (label || icon)) {
|
|
1735
|
-
return (jsxRuntime.jsxs("div", { className: containerClasses, style: { ...customStyles.container, display: 'flex', alignItems: 'center' }, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
1603
|
+
return (jsxRuntime.jsxs("div", { className: containerClasses, style: { ...customStyles.container, display: 'flex', alignItems: 'center' }, children: [jsxRuntime.jsxs("div", { className: styles$o.header, style: { ...customStyles.header, flex: 1, marginBottom: 0 }, children: [icon && jsxRuntime.jsx("span", { className: styles$o.icon, style: customStyles.icon, children: icon }), label && jsxRuntime.jsx("label", { className: styles$o.label, style: customStyles.label, children: label })] }), stepperContent, !hideLimits && (min !== -Infinity || max !== Infinity) && (jsxRuntime.jsxs("div", { className: styles$o.limits, style: customStyles.limits, children: [jsxRuntime.jsx("span", { className: styles$o.limit, children: min !== -Infinity && `Min: ${min}` }), jsxRuntime.jsx("span", { className: styles$o.limit, children: max !== Infinity && `Max: ${max}` })] }))] }));
|
|
1736
1604
|
}
|
|
1737
|
-
return (jsxRuntime.jsxs("div", { className: containerClasses, style: customStyles.container, children: [(label || icon) && (jsxRuntime.jsxs("div", { className: styles$
|
|
1605
|
+
return (jsxRuntime.jsxs("div", { className: containerClasses, style: customStyles.container, children: [(label || icon) && (jsxRuntime.jsxs("div", { className: styles$o.header, style: customStyles.header, children: [icon && jsxRuntime.jsx("span", { className: styles$o.icon, style: customStyles.icon, children: icon }), label && jsxRuntime.jsx("label", { className: styles$o.label, style: customStyles.label, children: label })] })), stepperContent, !hideLimits && (min !== -Infinity || max !== Infinity) && (jsxRuntime.jsxs("div", { className: styles$o.limits, style: customStyles.limits, children: [jsxRuntime.jsx("span", { className: styles$o.limit, children: min !== -Infinity && `Min: ${min}` }), jsxRuntime.jsx("span", { className: styles$o.limit, children: max !== Infinity && `Max: ${max}` })] }))] }));
|
|
1738
1606
|
};
|
|
1739
1607
|
|
|
1740
|
-
var styles$
|
|
1608
|
+
var styles$n = {"button":"ToggleButton-module_button__DTuyY","background":"ToggleButton-module_background__NwfTp","content":"ToggleButton-module_content__NHqIN","iconWrapper":"ToggleButton-module_iconWrapper__yN4sP","icon":"ToggleButton-module_icon__r8juX","label":"ToggleButton-module_label__4mPJP","hideMobile":"ToggleButton-module_hideMobile__GFAc3","checkmark":"ToggleButton-module_checkmark__ZJwf-","ripple":"ToggleButton-module_ripple__2-faB","small":"ToggleButton-module_small__MhfoN","large":"ToggleButton-module_large__A3naL","default":"ToggleButton-module_default__q8QaZ","active":"ToggleButton-module_active__4DjlR","outlined":"ToggleButton-module_outlined__OtqJB","filled":"ToggleButton-module_filled__LySNn","ghost":"ToggleButton-module_ghost__9KXcb","active-primary":"ToggleButton-module_active-primary__vXMP7","active-secondary":"ToggleButton-module_active-secondary__9Ttdx","active-success":"ToggleButton-module_active-success__oi0rr","active-danger":"ToggleButton-module_active-danger__VUdxr","active-warning":"ToggleButton-module_active-warning__77nSu","animation-scale":"ToggleButton-module_animation-scale__j-3mJ","scaleAnimation":"ToggleButton-module_scaleAnimation__Ms1j2","animation-rotate":"ToggleButton-module_animation-rotate__pBmfc","rotateAnimation":"ToggleButton-module_rotateAnimation__xWZJ5","animation-flip":"ToggleButton-module_animation-flip__ErAbm","flipAnimation":"ToggleButton-module_flipAnimation__qwDTb","disabled":"ToggleButton-module_disabled__Gv5ji"};
|
|
1741
1609
|
|
|
1742
1610
|
/**
|
|
1743
1611
|
* ToggleButton Component
|
|
@@ -1776,18 +1644,18 @@ var styles$i = {"button":"ToggleButton-module_button__DTuyY","background":"Toggl
|
|
|
1776
1644
|
const ToggleButton = ({ active, onClick, icon, label, disabled = false, size = 'medium', variant = 'default', activeColor = 'primary', showCheckmark = false, animation = 'scale', className = '', style = {}, color, tooltip, hideLabelOnMobile = false, soundConfig }) => {
|
|
1777
1645
|
const { handlers, playSound } = useComponentSound(soundConfig);
|
|
1778
1646
|
const buttonClasses = [
|
|
1779
|
-
styles$
|
|
1780
|
-
styles$
|
|
1781
|
-
styles$
|
|
1782
|
-
active && styles$
|
|
1783
|
-
active && styles$
|
|
1784
|
-
disabled && styles$
|
|
1785
|
-
animation !== 'none' && styles$
|
|
1647
|
+
styles$n.button,
|
|
1648
|
+
styles$n[size],
|
|
1649
|
+
styles$n[variant],
|
|
1650
|
+
active && styles$n.active,
|
|
1651
|
+
active && styles$n[`active-${activeColor}`],
|
|
1652
|
+
disabled && styles$n.disabled,
|
|
1653
|
+
animation !== 'none' && styles$n[`animation-${animation}`],
|
|
1786
1654
|
className
|
|
1787
1655
|
].filter(Boolean).join(' ');
|
|
1788
1656
|
const labelClasses = [
|
|
1789
|
-
styles$
|
|
1790
|
-
hideLabelOnMobile && styles$
|
|
1657
|
+
styles$n.label,
|
|
1658
|
+
hideLabelOnMobile && styles$n.hideMobile
|
|
1791
1659
|
].filter(Boolean).join(' ');
|
|
1792
1660
|
const iconVariants = {
|
|
1793
1661
|
scale: {
|
|
@@ -1851,10 +1719,10 @@ const ToggleButton = ({ active, onClick, icon, label, disabled = false, size = '
|
|
|
1851
1719
|
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: buttonClasses, style: dynamicStyle, onClick: () => {
|
|
1852
1720
|
playSound('toggle');
|
|
1853
1721
|
onClick();
|
|
1854
|
-
}, disabled: disabled, whileHover: !disabled ? { scale: 1.05 } : undefined, whileTap: !disabled ? { scale: 0.95 } : undefined, title: tooltip, "aria-pressed": active, "aria-label": label, ...handlers, children: [jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
1722
|
+
}, disabled: disabled, whileHover: !disabled ? { scale: 1.05 } : undefined, whileTap: !disabled ? { scale: 0.95 } : undefined, title: tooltip, "aria-pressed": active, "aria-label": label, ...handlers, children: [jsxRuntime.jsx(framerMotion.motion.div, { className: styles$n.background, variants: backgroundVariants, initial: "inactive", animate: active ? "active" : "inactive" }), jsxRuntime.jsxs("div", { className: styles$n.content, children: [icon && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$n.iconWrapper, variants: iconVariants[animation], initial: "inactive", animate: active ? "active" : "inactive", transition: { duration: 0.3 }, children: typeof icon === 'string' ? (jsxRuntime.jsx("span", { className: styles$n.icon, children: icon })) : (jsxRuntime.jsx("div", { className: styles$n.icon, children: icon })) })), label && jsxRuntime.jsx("span", { className: labelClasses, children: label }), jsxRuntime.jsx(framerMotion.AnimatePresence, { children: showCheckmark && active && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$n.checkmark, variants: checkmarkVariants, initial: "hidden", animate: "visible", exit: "hidden", children: jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", children: jsxRuntime.jsx("path", { d: "M20 6L9 17L4 12", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }) }) })) })] }), jsxRuntime.jsx(framerMotion.AnimatePresence, { children: active && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$n.ripple, initial: { scale: 0, opacity: 0.5 }, animate: { scale: 2, opacity: 0 }, exit: { scale: 0, opacity: 0 }, transition: { duration: 0.6 } })) })] }));
|
|
1855
1723
|
};
|
|
1856
1724
|
|
|
1857
|
-
var styles$
|
|
1725
|
+
var styles$m = {"slider":"Slider-module_slider__RD4G7","label":"Slider-module_label__j4H8M","sliderContainer":"Slider-module_sliderContainer__kQICC","track":"Slider-module_track__fQ-oP","fill":"Slider-module_fill__AYR4-","shimmer":"Slider-module_shimmer__271tL","input":"Slider-module_input__fqY-G","thumb":"Slider-module_thumb__yQJho","ripple":"Slider-module_ripple__gVS04","tooltip":"Slider-module_tooltip__ZubHR","tooltipArrow":"Slider-module_tooltipArrow__1aV9s","valueDisplay":"Slider-module_valueDisplay__V6caL","labelsContainer":"Slider-module_labelsContainer__F6ojF","labelItem":"Slider-module_labelItem__FuEaY","size-sm":"Slider-module_size-sm__Y2bmS","size-lg":"Slider-module_size-lg__RSnPf","disabled":"Slider-module_disabled__gxYoH","loading":"Slider-module_loading__6FkKb","loadingTrack":"Slider-module_loadingTrack__8ItT2","loadingIndicator":"Slider-module_loadingIndicator__Elydq"};
|
|
1858
1726
|
|
|
1859
1727
|
/**
|
|
1860
1728
|
* Slider component - A beautiful, animated range input
|
|
@@ -1942,16 +1810,16 @@ function Slider({ value, onChange, min = 0, max = 100, step = 1, label, showValu
|
|
|
1942
1810
|
setShowTooltipState(false);
|
|
1943
1811
|
};
|
|
1944
1812
|
const dynamicColor = getDynamicColor();
|
|
1945
|
-
const sizeClass = styles$
|
|
1946
|
-
const stateClass = disabled ? styles$
|
|
1813
|
+
const sizeClass = styles$m[`size-${size}`];
|
|
1814
|
+
const stateClass = disabled ? styles$m.disabled : loading ? styles$m.loading : '';
|
|
1947
1815
|
if (loading) {
|
|
1948
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1816
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$m.slider} ${sizeClass} ${styles$m.loading} ${className}`, style: style, children: [label && jsxRuntime.jsx("label", { className: styles$m.label, children: label }), jsxRuntime.jsx("div", { className: styles$m.loadingTrack, children: jsxRuntime.jsx(framerMotion.motion.div, { className: styles$m.loadingIndicator, animate: { x: ['-100%', '200%'] }, transition: {
|
|
1949
1817
|
repeat: Infinity,
|
|
1950
1818
|
duration: 1.5,
|
|
1951
1819
|
ease: "easeInOut"
|
|
1952
1820
|
} }) })] }));
|
|
1953
1821
|
}
|
|
1954
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1822
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$m.slider} ${sizeClass} ${stateClass} ${className}`, style: style, children: [label && (jsxRuntime.jsx(framerMotion.motion.label, { className: styles$m.label, initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.3 }, children: label })), jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$m.sliderContainer, ref: sliderRef, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, whileHover: { scale: 1.02 }, transition: { duration: 0.1 }, children: [jsxRuntime.jsx(framerMotion.motion.div, { className: styles$m.track, whileHover: { height: 8, marginTop: -1 }, transition: { duration: 0.1 }, children: jsxRuntime.jsx(framerMotion.motion.div, { className: styles$m.fill, style: {
|
|
1955
1823
|
width: `${percentage}%`,
|
|
1956
1824
|
backgroundColor: dynamicColor
|
|
1957
1825
|
}, initial: { width: 0 }, animate: { width: `${percentage}%` }, transition: {
|
|
@@ -1961,7 +1829,7 @@ function Slider({ value, onChange, min = 0, max = 100, step = 1, label, showValu
|
|
|
1961
1829
|
damping: 30
|
|
1962
1830
|
}, whileHover: {
|
|
1963
1831
|
boxShadow: `inset 0 0 0 1px rgba(255,255,255,0.2)`
|
|
1964
|
-
} }) }), jsxRuntime.jsx("input", { type: "range", min: min, max: max, step: step, value: value, onChange: handleChange, onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, ...handlers, className: styles$
|
|
1832
|
+
} }) }), jsxRuntime.jsx("input", { type: "range", min: min, max: max, step: step, value: value, onChange: handleChange, onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, ...handlers, className: styles$m.input, disabled: disabled, "aria-label": label }), jsxRuntime.jsx(framerMotion.motion.div, { className: styles$m.thumb, style: {
|
|
1965
1833
|
left: `${percentage}%`,
|
|
1966
1834
|
backgroundColor: dynamicColor,
|
|
1967
1835
|
borderColor: colors.thumb || dynamicColor
|
|
@@ -1978,14 +1846,14 @@ function Slider({ value, onChange, min = 0, max = 100, step = 1, label, showValu
|
|
|
1978
1846
|
}, whileHover: {
|
|
1979
1847
|
scale: 1.1,
|
|
1980
1848
|
transition: { duration: 0.1 }
|
|
1981
|
-
}, children: isDragging && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
1849
|
+
}, children: isDragging && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$m.ripple, initial: { scale: 0, opacity: 0.6 }, animate: { scale: 2, opacity: 0 }, transition: { duration: 0.5 } })) }), jsxRuntime.jsx(framerMotion.AnimatePresence, { children: showTooltipState && (jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$m.tooltip, style: {
|
|
1982
1850
|
left: `${percentage}%`,
|
|
1983
1851
|
backgroundColor: dynamicColor
|
|
1984
|
-
}, initial: { opacity: 0, y: 10, scale: 0.8 }, animate: { opacity: 1, y: 0, scale: 1 }, exit: { opacity: 0, y: 10, scale: 0.8 }, transition: { duration: 0.2 }, children: [tooltipContent ? tooltipContent(value) : formatValue(value), jsxRuntime.jsx("div", { className: styles$
|
|
1852
|
+
}, initial: { opacity: 0, y: 10, scale: 0.8 }, animate: { opacity: 1, y: 0, scale: 1 }, exit: { opacity: 0, y: 10, scale: 0.8 }, transition: { duration: 0.2 }, children: [tooltipContent ? tooltipContent(value) : formatValue(value), jsxRuntime.jsx("div", { className: styles$m.tooltipArrow, style: { borderTopColor: dynamicColor } })] })) })] }), showValue && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$m.valueDisplay, style: { color: dynamicColor }, initial: { scale: 0.8 }, animate: { scale: 1 }, transition: {
|
|
1985
1853
|
duration: 0.2,
|
|
1986
1854
|
type: "spring",
|
|
1987
1855
|
stiffness: 300
|
|
1988
|
-
}, children: formatValue(value) }, value)), labels.length > 0 && (jsxRuntime.jsx("div", { className: styles$
|
|
1856
|
+
}, children: formatValue(value) }, value)), labels.length > 0 && (jsxRuntime.jsx("div", { className: styles$m.labelsContainer, children: labels.map((labelConfig, index) => {
|
|
1989
1857
|
let position = 0;
|
|
1990
1858
|
if (labelConfig.position === 'start')
|
|
1991
1859
|
position = 0;
|
|
@@ -1993,7 +1861,7 @@ function Slider({ value, onChange, min = 0, max = 100, step = 1, label, showValu
|
|
|
1993
1861
|
position = 100;
|
|
1994
1862
|
else if (typeof labelConfig.position === 'number')
|
|
1995
1863
|
position = labelConfig.position;
|
|
1996
|
-
return (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
1864
|
+
return (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$m.labelItem, style: {
|
|
1997
1865
|
left: `${position}%`,
|
|
1998
1866
|
color: labelConfig.color
|
|
1999
1867
|
}, initial: { opacity: 0, y: 5 }, animate: { opacity: 1, y: 0 }, transition: {
|
|
@@ -2006,7 +1874,7 @@ function Slider({ value, onChange, min = 0, max = 100, step = 1, label, showValu
|
|
|
2006
1874
|
}) }))] }));
|
|
2007
1875
|
}
|
|
2008
1876
|
|
|
2009
|
-
var styles$
|
|
1877
|
+
var styles$l = {"loadingContainer":"LoadingSpinner-module_loadingContainer__m5u51","fullScreen":"LoadingSpinner-module_fullScreen__TuAem","overlay":"LoadingSpinner-module_overlay__X7FTa","shimmer":"LoadingSpinner-module_shimmer__xw4AH","small":"LoadingSpinner-module_small__nq8A3","loadingText":"LoadingSpinner-module_loadingText__wWwna","medium":"LoadingSpinner-module_medium__3JC1S","large":"LoadingSpinner-module_large__4MvAc","dotsSpinner":"LoadingSpinner-module_dotsSpinner__PXtfs","dot1":"LoadingSpinner-module_dot1__5YKSi","dot2":"LoadingSpinner-module_dot2__l6Rbu","dot3":"LoadingSpinner-module_dot3__b9YPW","circleSpinner":"LoadingSpinner-module_circleSpinner__ZmmWs","pulseSpinner":"LoadingSpinner-module_pulseSpinner__wTtDJ","textGradient":"LoadingSpinner-module_textGradient__QDrTY","sparkleContainer":"LoadingSpinner-module_sparkleContainer__9XLJG","sparkle":"LoadingSpinner-module_sparkle__LtFFf"};
|
|
2010
1878
|
|
|
2011
1879
|
const defaultMessages = [
|
|
2012
1880
|
'Loading your content...',
|
|
@@ -2082,6 +1950,7 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
2082
1950
|
}, messageRotationInterval);
|
|
2083
1951
|
return () => clearInterval(interval);
|
|
2084
1952
|
}
|
|
1953
|
+
return undefined;
|
|
2085
1954
|
}, [message, showMessage, messagesToUse.length, messageRotationInterval]);
|
|
2086
1955
|
React.useEffect(() => {
|
|
2087
1956
|
if (!message && showMessage) {
|
|
@@ -2089,22 +1958,22 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
2089
1958
|
}
|
|
2090
1959
|
}, [currentMessageIndex, message, messagesToUse, showMessage]);
|
|
2091
1960
|
const containerClasses = [
|
|
2092
|
-
styles$
|
|
2093
|
-
styles$
|
|
2094
|
-
styles$
|
|
2095
|
-
fullScreen && styles$
|
|
2096
|
-
overlay && styles$
|
|
1961
|
+
styles$l.loadingContainer,
|
|
1962
|
+
styles$l[size],
|
|
1963
|
+
styles$l[variant],
|
|
1964
|
+
fullScreen && styles$l.fullScreen,
|
|
1965
|
+
overlay && styles$l.overlay,
|
|
2097
1966
|
className
|
|
2098
1967
|
].filter(Boolean).join(' ');
|
|
2099
1968
|
const customStyle = {
|
|
2100
1969
|
...(color && { '--spinner-color': color }),
|
|
2101
1970
|
...(backgroundColor && { '--spinner-background': backgroundColor }),
|
|
2102
1971
|
};
|
|
2103
|
-
const renderDots = () => (jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$
|
|
1972
|
+
const renderDots = () => (jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$l.dotsSpinner, animate: { rotate: 360 }, transition: {
|
|
2104
1973
|
duration: 2,
|
|
2105
1974
|
repeat: Infinity,
|
|
2106
1975
|
ease: 'linear'
|
|
2107
|
-
}, children: [jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
1976
|
+
}, children: [jsxRuntime.jsx(framerMotion.motion.div, { className: styles$l.dot1, animate: {
|
|
2108
1977
|
scale: [1, 1.3, 1],
|
|
2109
1978
|
y: [0, -6, 0]
|
|
2110
1979
|
}, transition: {
|
|
@@ -2112,7 +1981,7 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
2112
1981
|
repeat: Infinity,
|
|
2113
1982
|
ease: 'easeInOut',
|
|
2114
1983
|
delay: 0
|
|
2115
|
-
} }), jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
1984
|
+
} }), jsxRuntime.jsx(framerMotion.motion.div, { className: styles$l.dot2, animate: {
|
|
2116
1985
|
scale: [1, 1.3, 1],
|
|
2117
1986
|
y: [0, -6, 0]
|
|
2118
1987
|
}, transition: {
|
|
@@ -2120,7 +1989,7 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
2120
1989
|
repeat: Infinity,
|
|
2121
1990
|
ease: 'easeInOut',
|
|
2122
1991
|
delay: 0.5
|
|
2123
|
-
} }), jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
1992
|
+
} }), jsxRuntime.jsx(framerMotion.motion.div, { className: styles$l.dot3, animate: {
|
|
2124
1993
|
scale: [1, 1.3, 1],
|
|
2125
1994
|
y: [0, -6, 0]
|
|
2126
1995
|
}, transition: {
|
|
@@ -2129,12 +1998,12 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
2129
1998
|
ease: 'easeInOut',
|
|
2130
1999
|
delay: 1
|
|
2131
2000
|
} })] }));
|
|
2132
|
-
const renderSpinner = () => (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
2001
|
+
const renderSpinner = () => (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$l.circleSpinner, animate: { rotate: 360 }, transition: {
|
|
2133
2002
|
duration: 1,
|
|
2134
2003
|
repeat: Infinity,
|
|
2135
2004
|
ease: 'linear'
|
|
2136
2005
|
} }));
|
|
2137
|
-
const renderPulse = () => (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
2006
|
+
const renderPulse = () => (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$l.pulseSpinner, animate: {
|
|
2138
2007
|
scale: [1, 1.2, 1],
|
|
2139
2008
|
opacity: [1, 0.7, 1]
|
|
2140
2009
|
}, transition: {
|
|
@@ -2153,10 +2022,10 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
2153
2022
|
return renderDots();
|
|
2154
2023
|
}
|
|
2155
2024
|
};
|
|
2156
|
-
return (jsxRuntime.jsxs("div", { className: containerClasses, style: customStyle, children: [renderSpinnerVariant(), showMessage && (jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: jsxRuntime.jsx(framerMotion.motion.p, { className: styles$
|
|
2025
|
+
return (jsxRuntime.jsxs("div", { className: containerClasses, style: customStyle, children: [renderSpinnerVariant(), showMessage && (jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: jsxRuntime.jsx(framerMotion.motion.p, { className: styles$l.loadingText, initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 }, transition: {
|
|
2157
2026
|
duration: 0.4,
|
|
2158
2027
|
ease: 'easeOut'
|
|
2159
|
-
}, children: currentMessage }, currentMessage) })), showSparkles && (jsxRuntime.jsx("div", { className: styles$
|
|
2028
|
+
}, children: currentMessage }, currentMessage) })), showSparkles && (jsxRuntime.jsx("div", { className: styles$l.sparkleContainer, children: [...Array(4)].map((_, i) => (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$l.sparkle, animate: {
|
|
2160
2029
|
opacity: [0, 1, 0],
|
|
2161
2030
|
scale: [0.5, 1, 0.5],
|
|
2162
2031
|
rotate: [0, 180, 360]
|
|
@@ -2171,7 +2040,197 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
2171
2040
|
} }, i))) }))] }));
|
|
2172
2041
|
};
|
|
2173
2042
|
|
|
2174
|
-
var styles$
|
|
2043
|
+
var styles$k = {"wrapper":"DecryptedText-module_wrapper__tuLvf","srOnly":"DecryptedText-module_srOnly__A-K2T"};
|
|
2044
|
+
|
|
2045
|
+
/**
|
|
2046
|
+
* DecryptedText Component
|
|
2047
|
+
*
|
|
2048
|
+
* Creates an animated text reveal effect where characters progressively
|
|
2049
|
+
* decrypt from scrambled characters to the final text.
|
|
2050
|
+
*
|
|
2051
|
+
* @example
|
|
2052
|
+
* // Basic usage - animates on hover
|
|
2053
|
+
* <DecryptedText text="Hello World" />
|
|
2054
|
+
*
|
|
2055
|
+
* @example
|
|
2056
|
+
* // Animate when scrolled into view
|
|
2057
|
+
* <DecryptedText text="Welcome" animateOn="view" />
|
|
2058
|
+
*
|
|
2059
|
+
* @example
|
|
2060
|
+
* // Sequential reveal from center
|
|
2061
|
+
* <DecryptedText
|
|
2062
|
+
* text="Decrypt Me"
|
|
2063
|
+
* sequential
|
|
2064
|
+
* revealDirection="center"
|
|
2065
|
+
* speed={30}
|
|
2066
|
+
* />
|
|
2067
|
+
*/
|
|
2068
|
+
const DecryptedText = ({ text, speed = 50, maxIterations = 10, sequential = false, revealDirection = 'start', useOriginalCharsOnly = false, characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', className = '', parentClassName = '', encryptedClassName = '', animateOn = 'hover', ...props }) => {
|
|
2069
|
+
const [displayText, setDisplayText] = React.useState(text);
|
|
2070
|
+
const [isHovering, setIsHovering] = React.useState(false);
|
|
2071
|
+
const [isScrambling, setIsScrambling] = React.useState(false);
|
|
2072
|
+
const [revealedIndices, setRevealedIndices] = React.useState(new Set());
|
|
2073
|
+
const [hasAnimated, setHasAnimated] = React.useState(false);
|
|
2074
|
+
const containerRef = React.useRef(null);
|
|
2075
|
+
React.useEffect(() => {
|
|
2076
|
+
let interval;
|
|
2077
|
+
let currentIteration = 0;
|
|
2078
|
+
const getNextIndex = (revealedSet) => {
|
|
2079
|
+
const textLength = text.length;
|
|
2080
|
+
switch (revealDirection) {
|
|
2081
|
+
case 'start':
|
|
2082
|
+
return revealedSet.size;
|
|
2083
|
+
case 'end':
|
|
2084
|
+
return textLength - 1 - revealedSet.size;
|
|
2085
|
+
case 'center': {
|
|
2086
|
+
const middle = Math.floor(textLength / 2);
|
|
2087
|
+
const offset = Math.floor(revealedSet.size / 2);
|
|
2088
|
+
const nextIndex = revealedSet.size % 2 === 0 ? middle + offset : middle - offset - 1;
|
|
2089
|
+
if (nextIndex >= 0 && nextIndex < textLength && !revealedSet.has(nextIndex)) {
|
|
2090
|
+
return nextIndex;
|
|
2091
|
+
}
|
|
2092
|
+
for (let i = 0; i < textLength; i++) {
|
|
2093
|
+
if (!revealedSet.has(i))
|
|
2094
|
+
return i;
|
|
2095
|
+
}
|
|
2096
|
+
return 0;
|
|
2097
|
+
}
|
|
2098
|
+
default:
|
|
2099
|
+
return revealedSet.size;
|
|
2100
|
+
}
|
|
2101
|
+
};
|
|
2102
|
+
const availableChars = useOriginalCharsOnly
|
|
2103
|
+
? Array.from(new Set(text.split(''))).filter((char) => char !== ' ')
|
|
2104
|
+
: characters.split('');
|
|
2105
|
+
const shuffleText = (originalText, currentRevealed) => {
|
|
2106
|
+
if (useOriginalCharsOnly) {
|
|
2107
|
+
const positions = originalText.split('').map((char, i) => ({
|
|
2108
|
+
char,
|
|
2109
|
+
isSpace: char === ' ',
|
|
2110
|
+
index: i,
|
|
2111
|
+
isRevealed: currentRevealed.has(i),
|
|
2112
|
+
}));
|
|
2113
|
+
const nonSpaceChars = positions
|
|
2114
|
+
.filter((p) => !p.isSpace && !p.isRevealed)
|
|
2115
|
+
.map((p) => p.char);
|
|
2116
|
+
for (let i = nonSpaceChars.length - 1; i > 0; i--) {
|
|
2117
|
+
const j = Math.floor(Math.random() * (i + 1));
|
|
2118
|
+
[nonSpaceChars[i], nonSpaceChars[j]] = [nonSpaceChars[j], nonSpaceChars[i]];
|
|
2119
|
+
}
|
|
2120
|
+
let charIndex = 0;
|
|
2121
|
+
return positions
|
|
2122
|
+
.map((p) => {
|
|
2123
|
+
if (p.isSpace)
|
|
2124
|
+
return ' ';
|
|
2125
|
+
if (p.isRevealed)
|
|
2126
|
+
return originalText[p.index];
|
|
2127
|
+
return nonSpaceChars[charIndex++];
|
|
2128
|
+
})
|
|
2129
|
+
.join('');
|
|
2130
|
+
}
|
|
2131
|
+
else {
|
|
2132
|
+
return originalText
|
|
2133
|
+
.split('')
|
|
2134
|
+
.map((char, i) => {
|
|
2135
|
+
if (char === ' ')
|
|
2136
|
+
return ' ';
|
|
2137
|
+
if (currentRevealed.has(i))
|
|
2138
|
+
return originalText[i];
|
|
2139
|
+
return availableChars[Math.floor(Math.random() * availableChars.length)];
|
|
2140
|
+
})
|
|
2141
|
+
.join('');
|
|
2142
|
+
}
|
|
2143
|
+
};
|
|
2144
|
+
if (isHovering) {
|
|
2145
|
+
setIsScrambling(true);
|
|
2146
|
+
interval = setInterval(() => {
|
|
2147
|
+
setRevealedIndices((prevRevealed) => {
|
|
2148
|
+
if (sequential) {
|
|
2149
|
+
if (prevRevealed.size < text.length) {
|
|
2150
|
+
const nextIndex = getNextIndex(prevRevealed);
|
|
2151
|
+
const newRevealed = new Set(prevRevealed);
|
|
2152
|
+
newRevealed.add(nextIndex);
|
|
2153
|
+
setDisplayText(shuffleText(text, newRevealed));
|
|
2154
|
+
return newRevealed;
|
|
2155
|
+
}
|
|
2156
|
+
else {
|
|
2157
|
+
clearInterval(interval);
|
|
2158
|
+
setIsScrambling(false);
|
|
2159
|
+
return prevRevealed;
|
|
2160
|
+
}
|
|
2161
|
+
}
|
|
2162
|
+
else {
|
|
2163
|
+
setDisplayText(shuffleText(text, prevRevealed));
|
|
2164
|
+
currentIteration++;
|
|
2165
|
+
if (currentIteration >= maxIterations) {
|
|
2166
|
+
clearInterval(interval);
|
|
2167
|
+
setIsScrambling(false);
|
|
2168
|
+
setDisplayText(text);
|
|
2169
|
+
}
|
|
2170
|
+
return prevRevealed;
|
|
2171
|
+
}
|
|
2172
|
+
});
|
|
2173
|
+
}, speed);
|
|
2174
|
+
}
|
|
2175
|
+
else {
|
|
2176
|
+
setDisplayText(text);
|
|
2177
|
+
setRevealedIndices(new Set());
|
|
2178
|
+
setIsScrambling(false);
|
|
2179
|
+
}
|
|
2180
|
+
return () => {
|
|
2181
|
+
if (interval)
|
|
2182
|
+
clearInterval(interval);
|
|
2183
|
+
};
|
|
2184
|
+
}, [
|
|
2185
|
+
isHovering,
|
|
2186
|
+
text,
|
|
2187
|
+
speed,
|
|
2188
|
+
maxIterations,
|
|
2189
|
+
sequential,
|
|
2190
|
+
revealDirection,
|
|
2191
|
+
characters,
|
|
2192
|
+
useOriginalCharsOnly,
|
|
2193
|
+
]);
|
|
2194
|
+
React.useEffect(() => {
|
|
2195
|
+
if (animateOn !== 'view' && animateOn !== 'both')
|
|
2196
|
+
return;
|
|
2197
|
+
const observerCallback = (entries) => {
|
|
2198
|
+
entries.forEach((entry) => {
|
|
2199
|
+
if (entry.isIntersecting && !hasAnimated) {
|
|
2200
|
+
setIsHovering(true);
|
|
2201
|
+
setHasAnimated(true);
|
|
2202
|
+
}
|
|
2203
|
+
});
|
|
2204
|
+
};
|
|
2205
|
+
const observerOptions = {
|
|
2206
|
+
root: null,
|
|
2207
|
+
rootMargin: '0px',
|
|
2208
|
+
threshold: 0.1,
|
|
2209
|
+
};
|
|
2210
|
+
const observer = new IntersectionObserver(observerCallback, observerOptions);
|
|
2211
|
+
const currentRef = containerRef.current;
|
|
2212
|
+
if (currentRef) {
|
|
2213
|
+
observer.observe(currentRef);
|
|
2214
|
+
}
|
|
2215
|
+
return () => {
|
|
2216
|
+
if (currentRef) {
|
|
2217
|
+
observer.unobserve(currentRef);
|
|
2218
|
+
}
|
|
2219
|
+
};
|
|
2220
|
+
}, [animateOn, hasAnimated]);
|
|
2221
|
+
const hoverProps = animateOn === 'hover' || animateOn === 'both'
|
|
2222
|
+
? {
|
|
2223
|
+
onMouseEnter: () => setIsHovering(true),
|
|
2224
|
+
onMouseLeave: () => setIsHovering(false),
|
|
2225
|
+
}
|
|
2226
|
+
: {};
|
|
2227
|
+
return (jsxRuntime.jsxs(framerMotion.motion.span, { className: `${styles$k.wrapper} ${parentClassName}`, ref: containerRef, ...hoverProps, ...props, children: [jsxRuntime.jsx("span", { className: styles$k.srOnly, children: displayText }), jsxRuntime.jsx("span", { "aria-hidden": "true", children: displayText.split('').map((char, index) => {
|
|
2228
|
+
const isRevealedOrDone = revealedIndices.has(index) || !isScrambling || !isHovering;
|
|
2229
|
+
return (jsxRuntime.jsx("span", { className: isRevealedOrDone ? className : encryptedClassName, children: char }, index));
|
|
2230
|
+
}) })] }));
|
|
2231
|
+
};
|
|
2232
|
+
|
|
2233
|
+
var styles$j = {"arrayInput":"ArrayInput-module_arrayInput__q1x7A","arrayInputLabel":"ArrayInput-module_arrayInputLabel__HyUC7","arrayInputItem":"ArrayInput-module_arrayInputItem__bFtgl","inputWrapper":"ArrayInput-module_inputWrapper__ajhbW","input":"ArrayInput-module_input__1uywi","complexItem":"ArrayInput-module_complexItem__zr-Q-","fieldsWrapper":"ArrayInput-module_fieldsWrapper__7BVPa","removeButton":"ArrayInput-module_removeButton__gYf8Y","addButton":"ArrayInput-module_addButton__mia29"};
|
|
2175
2234
|
|
|
2176
2235
|
/**
|
|
2177
2236
|
* ArrayInput component - Versatile dynamic list manager
|
|
@@ -2238,11 +2297,11 @@ function SimpleArrayInput({ label, values, onChange, placeholder, itemStyle, inp
|
|
|
2238
2297
|
itemIdsRef.current.splice(index, 1);
|
|
2239
2298
|
onChange(newValues);
|
|
2240
2299
|
};
|
|
2241
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
2300
|
+
return (jsxRuntime.jsxs("div", { className: styles$j.arrayInput, children: [jsxRuntime.jsx("h3", { className: styles$j.arrayInputLabel, children: label }), jsxRuntime.jsx("div", { children: jsxRuntime.jsx(framerMotion.AnimatePresence, { children: values.map((value, index) => (jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$j.arrayInputItem, style: itemStyle, initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0 }, transition: {
|
|
2242
2301
|
duration: 0.3,
|
|
2243
2302
|
ease: "easeInOut",
|
|
2244
2303
|
layout: { duration: 0.2 }
|
|
2245
|
-
}, children: [jsxRuntime.jsx("div", { className: styles$
|
|
2304
|
+
}, children: [jsxRuntime.jsx("div", { className: styles$j.inputWrapper, children: multiline ? (jsxRuntime.jsx("div", { style: inputStyle, children: jsxRuntime.jsx(TextArea, { label: "", value: value, onChange: (newValue) => handleChange(index, newValue), placeholder: placeholder, rows: rows, compact: true }) })) : (jsxRuntime.jsx("input", { type: "text", value: value, onChange: (e) => handleChange(index, e.target.value), placeholder: placeholder, className: styles$j.input, style: inputStyle })) }), jsxRuntime.jsx(Button, { variant: "ghost", size: "small", onClick: () => handleRemove(index), "aria-label": "Remove item", className: styles$j.removeButton, children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) })] }, itemIdsRef.current[index]))) }) }), jsxRuntime.jsx(Button, { variant: buttonVariant, size: "small", onClick: handleAdd, className: styles$j.addButton, children: label })] }));
|
|
2246
2305
|
}
|
|
2247
2306
|
// Complex object array implementation
|
|
2248
2307
|
function ComplexArrayInput({ label, values, onChange, fields, getKey, itemStyle, inputStyle, buttonVariant = 'primary' }) {
|
|
@@ -2267,14 +2326,14 @@ function ComplexArrayInput({ label, values, onChange, fields, getKey, itemStyle,
|
|
|
2267
2326
|
// Generate key from all field values
|
|
2268
2327
|
return fields.map(f => item[f.name] || '').join('-') + `-${index}`;
|
|
2269
2328
|
};
|
|
2270
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
2329
|
+
return (jsxRuntime.jsxs("div", { className: styles$j.arrayInput, children: [jsxRuntime.jsx("h3", { className: styles$j.arrayInputLabel, children: label }), jsxRuntime.jsx("div", { children: jsxRuntime.jsx(framerMotion.AnimatePresence, { children: values.map((value, index) => (jsxRuntime.jsxs(framerMotion.motion.div, { className: `${styles$j.arrayInputItem} ${fields.length > 1 ? styles$j.complexItem : ''}`, style: itemStyle, initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0 }, transition: {
|
|
2271
2330
|
duration: 0.3,
|
|
2272
2331
|
ease: "easeInOut",
|
|
2273
2332
|
layout: { duration: 0.2 }
|
|
2274
|
-
}, children: [jsxRuntime.jsx("div", { className: styles$
|
|
2333
|
+
}, children: [jsxRuntime.jsx("div", { className: styles$j.fieldsWrapper, children: fields.map((field) => (jsxRuntime.jsx("div", { style: inputStyle, children: field.multiline ? (jsxRuntime.jsx(TextArea, { value: value[field.name] || '', onChange: (newValue) => handleChange(index, field.name, newValue), label: field.label, placeholder: field.placeholder, rows: field.rows, compact: true })) : (jsxRuntime.jsx(TextInput, { value: value[field.name] || '', onChange: (newValue) => handleChange(index, field.name, newValue), label: field.label, type: field.type, placeholder: field.placeholder })) }, field.name))) }), jsxRuntime.jsx(Button, { variant: "ghost", size: "small", onClick: () => handleRemove(index), "aria-label": "Remove item", className: styles$j.removeButton, children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) })] }, generateKey(value, index)))) }) }), jsxRuntime.jsxs(Button, { variant: buttonVariant, size: "small", onClick: handleAdd, className: styles$j.addButton, children: ["Add ", label] })] }));
|
|
2275
2334
|
}
|
|
2276
2335
|
|
|
2277
|
-
var styles$
|
|
2336
|
+
var styles$i = {"fab":"EditFAB-module_fab__nSrTJ","primary":"EditFAB-module_primary__zbA9n","secondary":"EditFAB-module_secondary__BnXs0","success":"EditFAB-module_success__kcLg3","loader":"EditFAB-module_loader__TaJOm","draggable":"EditFAB-module_draggable__eE2vE","dragging":"EditFAB-module_dragging__btRJe"};
|
|
2278
2337
|
|
|
2279
2338
|
const EditFAB = ({ canEdit, isEditMode, hasUnsavedChanges = false, isSaving = false, onEnterEditMode, onExitEditMode, position = { bottom: 32, right: 32 } }) => {
|
|
2280
2339
|
const [isMobile, setIsMobile] = React.useState(false);
|
|
@@ -2359,15 +2418,15 @@ const EditFAB = ({ canEdit, isEditMode, hasUnsavedChanges = false, isSaving = fa
|
|
|
2359
2418
|
};
|
|
2360
2419
|
const getVariantClass = () => {
|
|
2361
2420
|
if (isSaving)
|
|
2362
|
-
return styles$
|
|
2421
|
+
return styles$i.primary;
|
|
2363
2422
|
if (isEditMode) {
|
|
2364
|
-
return hasUnsavedChanges ? styles$
|
|
2423
|
+
return hasUnsavedChanges ? styles$i.success : styles$i.secondary;
|
|
2365
2424
|
}
|
|
2366
|
-
return styles$
|
|
2425
|
+
return styles$i.primary;
|
|
2367
2426
|
};
|
|
2368
2427
|
const getIcon = () => {
|
|
2369
2428
|
if (isSaving) {
|
|
2370
|
-
return jsxRuntime.jsx("div", { className: styles$
|
|
2429
|
+
return jsxRuntime.jsx("div", { className: styles$i.loader });
|
|
2371
2430
|
}
|
|
2372
2431
|
if (isEditMode) {
|
|
2373
2432
|
return hasUnsavedChanges ? jsxRuntime.jsx(lucideReact.Check, { size: 24 }) : jsxRuntime.jsx(lucideReact.X, { size: 24 });
|
|
@@ -2382,30 +2441,30 @@ const EditFAB = ({ canEdit, isEditMode, hasUnsavedChanges = false, isSaving = fa
|
|
|
2382
2441
|
}
|
|
2383
2442
|
return "Enter edit mode";
|
|
2384
2443
|
};
|
|
2385
|
-
return (jsxRuntime.jsx(framerMotion.motion.button, { ref: fabRef, className: `${styles$
|
|
2444
|
+
return (jsxRuntime.jsx(framerMotion.motion.button, { ref: fabRef, className: `${styles$i.fab} ${getVariantClass()} ${isMobile ? styles$i.draggable : ''} ${isDragging ? styles$i.dragging : ''}`, style: getPositionStyles(), onClick: handleClick, onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd, disabled: isSaving, "aria-label": getAriaLabel(), initial: { scale: 0, opacity: 0 }, animate: { scale: 1, opacity: 1 }, exit: { scale: 0, opacity: 0 }, whileHover: !isSaving && !isDragging ? { scale: 1.1 } : {}, whileTap: !isSaving && !isDragging ? { scale: 0.9 } : {}, transition: {
|
|
2386
2445
|
type: "spring",
|
|
2387
2446
|
stiffness: 260,
|
|
2388
2447
|
damping: 20
|
|
2389
2448
|
}, children: getIcon() }));
|
|
2390
2449
|
};
|
|
2391
2450
|
|
|
2392
|
-
var styles$
|
|
2451
|
+
var styles$h = {"searchContainer":"SearchBar-module_searchContainer__TdM1w","searchInputWrapper":"SearchBar-module_searchInputWrapper__kCZLU","searchIcon":"SearchBar-module_searchIcon__IIxEu","searchInput":"SearchBar-module_searchInput__V4gkE","clearButton":"SearchBar-module_clearButton__7fNIY","filterSelect":"SearchBar-module_filterSelect__xIVE4","resultsDropdown":"SearchBar-module_resultsDropdown__yh6NF","loadingState":"SearchBar-module_loadingState__4gidK","emptyState":"SearchBar-module_emptyState__RbI4s","spinner":"SearchBar-module_spinner__PMc6-","resultsGroups":"SearchBar-module_resultsGroups__U24DC","resultGroup":"SearchBar-module_resultGroup__SoTQH","groupHeader":"SearchBar-module_groupHeader__bFRHA","groupIcon":"SearchBar-module_groupIcon__9ENM-","groupTitle":"SearchBar-module_groupTitle__ZekZs","groupCount":"SearchBar-module_groupCount__PQIqw","groupResults":"SearchBar-module_groupResults__xTF52","resultItem":"SearchBar-module_resultItem__VaKKy","highlighted":"SearchBar-module_highlighted__Q-3sH","resultTitle":"SearchBar-module_resultTitle__i1uqL","resultSubtitle":"SearchBar-module_resultSubtitle__LQOJ1","resultMeta":"SearchBar-module_resultMeta__Kmkrn","resultContent":"SearchBar-module_resultContent__TzVzL","highlight":"SearchBar-module_highlight__Q3PSP"};
|
|
2393
2452
|
|
|
2394
2453
|
// Default filter options for backwards compatibility
|
|
2395
2454
|
const defaultFilterOptions = [
|
|
2396
|
-
{ value: 'all', label: 'All', icon:
|
|
2397
|
-
{ value: 'projects', label: 'Projects', icon:
|
|
2398
|
-
{ value: 'clients', label: 'Clients', icon:
|
|
2399
|
-
{ value: 'contacts', label: 'Contacts', icon:
|
|
2400
|
-
{ value: 'interactions', label: 'Interactions', icon:
|
|
2401
|
-
{ value: 'team', label: 'Team', icon:
|
|
2455
|
+
{ value: 'all', label: 'All', icon: lucideReact.Search },
|
|
2456
|
+
{ value: 'projects', label: 'Projects', icon: lucideReact.Folder },
|
|
2457
|
+
{ value: 'clients', label: 'Clients', icon: lucideReact.Users },
|
|
2458
|
+
{ value: 'contacts', label: 'Contacts', icon: lucideReact.Book },
|
|
2459
|
+
{ value: 'interactions', label: 'Interactions', icon: lucideReact.MessageSquare },
|
|
2460
|
+
{ value: 'team', label: 'Team', icon: lucideReact.UserPlus },
|
|
2402
2461
|
];
|
|
2403
2462
|
const defaultEntityIcons = {
|
|
2404
|
-
projects:
|
|
2405
|
-
clients:
|
|
2406
|
-
contacts:
|
|
2407
|
-
interactions:
|
|
2408
|
-
team:
|
|
2463
|
+
projects: lucideReact.Folder,
|
|
2464
|
+
clients: lucideReact.Users,
|
|
2465
|
+
contacts: lucideReact.Book,
|
|
2466
|
+
interactions: lucideReact.MessageSquare,
|
|
2467
|
+
team: lucideReact.UserPlus,
|
|
2409
2468
|
};
|
|
2410
2469
|
const SearchBar = ({ className, placeholder = "Search (Ctrl+Space)...", onSearch, onResultClick, onClear, debounceDelay = 300, minSearchLength = 2, showFilter = true, enableKeyboardShortcut = true, filterOptions: customFilterOptions, entityIcons: customEntityIcons }) => {
|
|
2411
2470
|
const filterOptions = customFilterOptions ?? defaultFilterOptions;
|
|
@@ -2582,18 +2641,18 @@ const SearchBar = ({ className, placeholder = "Search (Ctrl+Space)...", onSearch
|
|
|
2582
2641
|
return text || '';
|
|
2583
2642
|
const regex = new RegExp(`(${highlight.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')})`, 'gi');
|
|
2584
2643
|
const parts = text.split(regex);
|
|
2585
|
-
return parts.map((part, index) => regex.test(part) ? (jsxRuntime.jsx("mark", { className: styles$
|
|
2644
|
+
return parts.map((part, index) => regex.test(part) ? (jsxRuntime.jsx("mark", { className: styles$h.highlight, children: part }, index)) : (part));
|
|
2586
2645
|
};
|
|
2587
|
-
return (jsxRuntime.jsxs("div", { ref: searchRef, className: `${styles$
|
|
2646
|
+
return (jsxRuntime.jsxs("div", { ref: searchRef, className: `${styles$h.searchContainer} ${className || ''}`, children: [jsxRuntime.jsxs("div", { className: styles$h.searchInputWrapper, children: [jsxRuntime.jsx(lucideReact.Search, { className: styles$h.searchIcon }), jsxRuntime.jsx("input", { ref: inputRef, type: "text", value: query, onChange: (e) => setQuery(e.target.value), onKeyDown: handleKeyDown, onFocus: () => query.trim() && results.length > 0 && setIsDropdownOpen(true), placeholder: placeholder, className: styles$h.searchInput, "aria-label": "Search", "aria-expanded": isDropdownOpen, "aria-controls": "search-results", "aria-autocomplete": "list" }), query && (jsxRuntime.jsx(framerMotion.motion.button, { className: styles$h.clearButton, onClick: handleClear, whileHover: { scale: 1.1 }, whileTap: { scale: 0.9 }, initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.8 }, children: jsxRuntime.jsx(lucideReact.X, {}) })), showFilter && (jsxRuntime.jsx("select", { value: filter, onChange: (e) => setFilter(e.target.value), className: styles$h.filterSelect, "aria-label": "Filter search results", children: filterOptions.map(option => (jsxRuntime.jsx("option", { value: option.value, children: option.label }, option.value))) }))] }), jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isDropdownOpen && (jsxRuntime.jsx(framerMotion.motion.div, { ref: resultsRef, id: "search-results", className: styles$h.resultsDropdown, initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 }, transition: { duration: 0.2 }, children: isLoading ? (jsxRuntime.jsxs("div", { className: styles$h.loadingState, children: [jsxRuntime.jsx("div", { className: styles$h.spinner }), jsxRuntime.jsx("span", { children: "Searching..." })] })) : results.length === 0 ? (jsxRuntime.jsxs("div", { className: styles$h.emptyState, children: ["No results found for \"", query, "\""] })) : (jsxRuntime.jsx("div", { className: styles$h.resultsGroups, children: Object.entries(groupedResults).map(([type, groupResults]) => {
|
|
2588
2647
|
const Icon = entityIcons[type];
|
|
2589
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
2648
|
+
return (jsxRuntime.jsxs("div", { className: styles$h.resultGroup, children: [jsxRuntime.jsxs("div", { className: styles$h.groupHeader, children: [Icon && jsxRuntime.jsx(Icon, { className: styles$h.groupIcon }), jsxRuntime.jsx("span", { className: styles$h.groupTitle, children: type.charAt(0).toUpperCase() + type.slice(1) }), jsxRuntime.jsx("span", { className: styles$h.groupCount, children: groupResults.length })] }), jsxRuntime.jsx("div", { className: styles$h.groupResults, children: groupResults.map((result) => {
|
|
2590
2649
|
const globalIndex = results.indexOf(result);
|
|
2591
|
-
return (jsxRuntime.jsxs(framerMotion.motion.button, { "data-result-index": globalIndex, className: `${styles$
|
|
2650
|
+
return (jsxRuntime.jsxs(framerMotion.motion.button, { "data-result-index": globalIndex, className: `${styles$h.resultItem} ${highlightedIndex === globalIndex ? styles$h.highlighted : ''}`, onClick: () => handleResultClick(result), whileHover: { x: 4 }, onMouseEnter: () => setHighlightedIndex(globalIndex), children: [jsxRuntime.jsxs("div", { className: styles$h.resultContent, children: [jsxRuntime.jsx("div", { className: styles$h.resultTitle, children: highlightMatch(result.title || 'Untitled', query) }), result.subtitle && (jsxRuntime.jsx("div", { className: styles$h.resultSubtitle, children: highlightMatch(result.subtitle, query) }))] }), result.meta && (jsxRuntime.jsx("div", { className: styles$h.resultMeta, children: result.meta }))] }, `${result.type}-${result.id}`));
|
|
2592
2651
|
}) })] }, type));
|
|
2593
2652
|
}) })) })) })] }));
|
|
2594
2653
|
};
|
|
2595
2654
|
|
|
2596
|
-
var styles$
|
|
2655
|
+
var styles$g = {"modalOverlay":"TimePickerModal-module_modalOverlay__Cbq5-","modalContent":"TimePickerModal-module_modalContent__e6py2","modalHeader":"TimePickerModal-module_modalHeader__XhTgK","closeButton":"TimePickerModal-module_closeButton__qsRAG","timeDisplay":"TimePickerModal-module_timeDisplay__voGP4","pickerContainer":"TimePickerModal-module_pickerContainer__4qn3r","pickerColumn":"TimePickerModal-module_pickerColumn__0-kWf","pickerLabel":"TimePickerModal-module_pickerLabel__e7zQ2","pickerScroll":"TimePickerModal-module_pickerScroll__5Dcvw","pickerItem":"TimePickerModal-module_pickerItem__n8sC2","selected":"TimePickerModal-module_selected__oQA8Z","pickerDivider":"TimePickerModal-module_pickerDivider__eg83F","modalActions":"TimePickerModal-module_modalActions__eJRWU","cancelButton":"TimePickerModal-module_cancelButton__zri81","confirmButton":"TimePickerModal-module_confirmButton__q2p3Q"};
|
|
2597
2656
|
|
|
2598
2657
|
function TimePickerModal({ isOpen, onClose, value, onChange }) {
|
|
2599
2658
|
const [hours, minutes] = value ? value.split(':').map(Number) : [12, 0];
|
|
@@ -2614,10 +2673,10 @@ function TimePickerModal({ isOpen, onClose, value, onChange }) {
|
|
|
2614
2673
|
};
|
|
2615
2674
|
if (!isOpen)
|
|
2616
2675
|
return null;
|
|
2617
|
-
return (jsxRuntime.jsx("div", { className: styles$
|
|
2676
|
+
return (jsxRuntime.jsx("div", { className: styles$g.modalOverlay, onClick: onClose, children: jsxRuntime.jsxs("div", { className: styles$g.modalContent, onClick: (e) => e.stopPropagation(), children: [jsxRuntime.jsxs("div", { className: styles$g.modalHeader, children: [jsxRuntime.jsx("h3", { children: "Select Time" }), jsxRuntime.jsx("button", { className: styles$g.closeButton, onClick: onClose, "aria-label": "Close", children: jsxRuntime.jsx(lucideReact.X, {}) })] }), jsxRuntime.jsxs("div", { className: styles$g.timeDisplay, children: [selectedHour.toString().padStart(2, '0'), ":", selectedMinute.toString().padStart(2, '0')] }), jsxRuntime.jsxs("div", { className: styles$g.pickerContainer, children: [jsxRuntime.jsxs("div", { className: styles$g.pickerColumn, children: [jsxRuntime.jsx("div", { className: styles$g.pickerLabel, children: "Hours" }), jsxRuntime.jsx("div", { className: styles$g.pickerScroll, children: Array.from({ length: 24 }, (_, i) => (jsxRuntime.jsx("button", { className: `${styles$g.pickerItem} ${selectedHour === i ? styles$g.selected : ''}`, onClick: () => setSelectedHour(i), children: i.toString().padStart(2, '0') }, i))) })] }), jsxRuntime.jsx("div", { className: styles$g.pickerDivider, children: ":" }), jsxRuntime.jsxs("div", { className: styles$g.pickerColumn, children: [jsxRuntime.jsx("div", { className: styles$g.pickerLabel, children: "Minutes" }), jsxRuntime.jsx("div", { className: styles$g.pickerScroll, children: Array.from({ length: 60 }, (_, i) => (jsxRuntime.jsx("button", { className: `${styles$g.pickerItem} ${selectedMinute === i ? styles$g.selected : ''}`, onClick: () => setSelectedMinute(i), children: i.toString().padStart(2, '0') }, i))) })] })] }), jsxRuntime.jsxs("div", { className: styles$g.modalActions, children: [jsxRuntime.jsx("button", { className: styles$g.cancelButton, onClick: onClose, children: "Cancel" }), jsxRuntime.jsx("button", { className: styles$g.confirmButton, onClick: handleConfirm, children: "Confirm" })] })] }) }));
|
|
2618
2677
|
}
|
|
2619
2678
|
|
|
2620
|
-
var styles$
|
|
2679
|
+
var styles$f = {"timeInput":"TimeInput-module_timeInput__h1DpT","label":"TimeInput-module_label__d4rZw","required":"TimeInput-module_required__rc1vq","inputWrapper":"TimeInput-module_inputWrapper__4RPAn","textInput":"TimeInput-module_textInput__M3eBZ","clockButton":"TimeInput-module_clockButton__3qoub","error":"TimeInput-module_error__gJnpk","success":"TimeInput-module_success__np-lF","loading":"TimeInput-module_loading__Wb1DC","disabled":"TimeInput-module_disabled__wxiZ-"};
|
|
2621
2680
|
|
|
2622
2681
|
function TimeInput({ label, value, onChange, placeholder = "14:30", onFocus, onBlur, error = false, success = false, loading = false, disabled = false, required = false, className = "" }) {
|
|
2623
2682
|
const [showPicker, setShowPicker] = React.useState(false);
|
|
@@ -2670,20 +2729,20 @@ function TimeInput({ label, value, onChange, placeholder = "14:30", onFocus, onB
|
|
|
2670
2729
|
}
|
|
2671
2730
|
};
|
|
2672
2731
|
const getContainerClassName = () => {
|
|
2673
|
-
const classes = [styles$
|
|
2732
|
+
const classes = [styles$f.timeInput];
|
|
2674
2733
|
if (error)
|
|
2675
|
-
classes.push(styles$
|
|
2734
|
+
classes.push(styles$f.error);
|
|
2676
2735
|
if (success)
|
|
2677
|
-
classes.push(styles$
|
|
2736
|
+
classes.push(styles$f.success);
|
|
2678
2737
|
if (loading)
|
|
2679
|
-
classes.push(styles$
|
|
2738
|
+
classes.push(styles$f.loading);
|
|
2680
2739
|
if (disabled)
|
|
2681
|
-
classes.push(styles$
|
|
2740
|
+
classes.push(styles$f.disabled);
|
|
2682
2741
|
if (className)
|
|
2683
2742
|
classes.push(className);
|
|
2684
2743
|
return classes.join(' ');
|
|
2685
2744
|
};
|
|
2686
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: getContainerClassName(), children: [jsxRuntime.jsxs("label", { className: styles$
|
|
2745
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: getContainerClassName(), children: [jsxRuntime.jsxs("label", { className: styles$f.label, children: [label, required && jsxRuntime.jsx("span", { className: styles$f.required, children: "*" })] }), jsxRuntime.jsxs("div", { className: styles$f.inputWrapper, children: [jsxRuntime.jsx("input", { type: "text", value: value, onChange: (e) => handleTextChange(e.target.value), onFocus: onFocus, onBlur: onBlur, placeholder: placeholder, className: styles$f.textInput, maxLength: 5, disabled: disabled || loading, "aria-invalid": error, "aria-required": required, inputMode: "numeric", pattern: "[0-9:]*" }), jsxRuntime.jsx("button", { type: "button", onClick: handleClockClick, className: styles$f.clockButton, title: "Open time picker", disabled: disabled || loading, "aria-label": "Open time picker", children: jsxRuntime.jsx(lucideReact.Clock, { size: 20 }) })] })] }), jsxRuntime.jsx(TimePickerModal, { isOpen: showPicker, onClose: () => setShowPicker(false), value: value, onChange: onChange })] }));
|
|
2687
2746
|
}
|
|
2688
2747
|
|
|
2689
2748
|
const ThemeContext = React.createContext(undefined);
|
|
@@ -2694,24 +2753,70 @@ const useTheme = () => {
|
|
|
2694
2753
|
}
|
|
2695
2754
|
return context;
|
|
2696
2755
|
};
|
|
2756
|
+
/** Safe version of useTheme that returns null when outside a ThemeProvider */
|
|
2757
|
+
const useThemeSafe = () => {
|
|
2758
|
+
return React.useContext(ThemeContext) ?? null;
|
|
2759
|
+
};
|
|
2760
|
+
const ThemeProvider = ({ children, defaultTheme = 'light', storageKey = 'app-theme', }) => {
|
|
2761
|
+
const [theme, setThemeState] = React.useState(() => {
|
|
2762
|
+
// Check localStorage first
|
|
2763
|
+
const stored = localStorage.getItem(storageKey);
|
|
2764
|
+
if (stored && ['light', 'dark', 'lossito', 'lossito-dark', 'dmood', 'dmood-dark', 'crt'].includes(stored)) {
|
|
2765
|
+
return stored;
|
|
2766
|
+
}
|
|
2767
|
+
// Check system preference
|
|
2768
|
+
if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
|
2769
|
+
return 'dark';
|
|
2770
|
+
}
|
|
2771
|
+
return defaultTheme;
|
|
2772
|
+
});
|
|
2773
|
+
const setTheme = (newTheme) => {
|
|
2774
|
+
setThemeState(newTheme);
|
|
2775
|
+
localStorage.setItem(storageKey, newTheme);
|
|
2776
|
+
};
|
|
2777
|
+
const toggleTheme = () => {
|
|
2778
|
+
const themeOrder = ['light', 'dark', 'lossito', 'lossito-dark', 'dmood', 'dmood-dark', 'crt'];
|
|
2779
|
+
const currentIndex = themeOrder.indexOf(theme);
|
|
2780
|
+
const nextIndex = (currentIndex + 1) % themeOrder.length;
|
|
2781
|
+
setTheme(themeOrder[nextIndex]);
|
|
2782
|
+
};
|
|
2783
|
+
React.useEffect(() => {
|
|
2784
|
+
const root = document.documentElement;
|
|
2785
|
+
// Apply theme attribute
|
|
2786
|
+
root.setAttribute('data-theme', theme);
|
|
2787
|
+
// Apply dark class if needed
|
|
2788
|
+
if (theme.includes('dark')) {
|
|
2789
|
+
root.classList.add('dark');
|
|
2790
|
+
}
|
|
2791
|
+
else {
|
|
2792
|
+
root.classList.remove('dark');
|
|
2793
|
+
}
|
|
2794
|
+
}, [theme]);
|
|
2795
|
+
// Listen for system theme changes
|
|
2796
|
+
React.useEffect(() => {
|
|
2797
|
+
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
|
|
2798
|
+
const handleChange = (e) => {
|
|
2799
|
+
const stored = localStorage.getItem(storageKey);
|
|
2800
|
+
if (!stored) {
|
|
2801
|
+
setThemeState(e.matches ? 'dark' : 'light');
|
|
2802
|
+
}
|
|
2803
|
+
};
|
|
2804
|
+
mediaQuery.addEventListener('change', handleChange);
|
|
2805
|
+
return () => mediaQuery.removeEventListener('change', handleChange);
|
|
2806
|
+
}, [storageKey]);
|
|
2807
|
+
return (jsxRuntime.jsx(ThemeContext.Provider, { value: { theme, setTheme, toggleTheme }, children: children }));
|
|
2808
|
+
};
|
|
2697
2809
|
|
|
2698
|
-
var styles$
|
|
2810
|
+
var styles$e = {"button":"ThemeSwitcher-module_button__VfRjU","iconWrapper":"ThemeSwitcher-module_iconWrapper__FpHo8","label":"ThemeSwitcher-module_label__2Hfkp","toggle":"ThemeSwitcher-module_toggle__ATXx4","toggleTrack":"ThemeSwitcher-module_toggleTrack__x28Rv","toggleThumb":"ThemeSwitcher-module_toggleThumb__V8QeN","dropdown":"ThemeSwitcher-module_dropdown__3qLdt","dropdownTrigger":"ThemeSwitcher-module_dropdownTrigger__UzYV5","dropdownMenu":"ThemeSwitcher-module_dropdownMenu__3L5hT","dropdownItem":"ThemeSwitcher-module_dropdownItem__inw-K","active":"ThemeSwitcher-module_active__OHP19","icon":"ThemeSwitcher-module_icon__iRZiJ","text":"ThemeSwitcher-module_text__OCOoA"};
|
|
2699
2811
|
|
|
2700
2812
|
const ThemeSwitcher = ({ variant = 'button', showLabel = false, className = '', currentTheme, onThemeChange, themes: customThemes, }) => {
|
|
2701
|
-
//
|
|
2702
|
-
const contextTheme = (
|
|
2703
|
-
try {
|
|
2704
|
-
return useTheme();
|
|
2705
|
-
}
|
|
2706
|
-
catch {
|
|
2707
|
-
return null;
|
|
2708
|
-
}
|
|
2709
|
-
})();
|
|
2813
|
+
// Use safe version that returns null when outside a ThemeProvider
|
|
2814
|
+
const contextTheme = useThemeSafe();
|
|
2710
2815
|
const theme = currentTheme ?? contextTheme?.theme ?? 'light';
|
|
2711
2816
|
const setTheme = onThemeChange ?? contextTheme?.setTheme ?? (() => { });
|
|
2712
2817
|
const defaultThemes = [
|
|
2713
|
-
{ value: 'light', label: 'Light', icon: jsxRuntime.jsx(
|
|
2714
|
-
{ value: 'dark', label: 'Dark', icon: jsxRuntime.jsx(
|
|
2818
|
+
{ value: 'light', label: 'Light', icon: jsxRuntime.jsx(lucideReact.Sun, {}) },
|
|
2819
|
+
{ value: 'dark', label: 'Dark', icon: jsxRuntime.jsx(lucideReact.Moon, {}) },
|
|
2715
2820
|
{ value: 'lossito', label: 'Lossito Light', icon: '✨' },
|
|
2716
2821
|
{ value: 'lossito-dark', label: 'Lossito Dark', icon: '🌑' },
|
|
2717
2822
|
{ value: 'dmood', label: 'Dmood Light', icon: '💙' },
|
|
@@ -2723,48 +2828,154 @@ const ThemeSwitcher = ({ variant = 'button', showLabel = false, className = '',
|
|
|
2723
2828
|
if (variant === 'toggle') {
|
|
2724
2829
|
// Simple toggle between light and dark
|
|
2725
2830
|
const isDark = theme.includes('dark');
|
|
2726
|
-
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: `${styles$
|
|
2831
|
+
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: `${styles$e.toggle} ${className}`, onClick: () => setTheme(isDark ? 'light' : 'dark'), whileTap: { scale: 0.95 }, "aria-label": "Toggle theme", children: [jsxRuntime.jsx(framerMotion.motion.div, { className: styles$e.toggleTrack, animate: { backgroundColor: isDark ? 'var(--color-primary)' : 'var(--color-border)' }, children: jsxRuntime.jsx(framerMotion.motion.div, { className: styles$e.toggleThumb, animate: { x: isDark ? 24 : 0 }, transition: { type: 'spring', stiffness: 500, damping: 30 }, children: isDark ? jsxRuntime.jsx(lucideReact.Moon, { size: 14 }) : jsxRuntime.jsx(lucideReact.Sun, { size: 14 }) }) }), showLabel && jsxRuntime.jsx("span", { className: styles$e.label, children: isDark ? 'Dark' : 'Light' })] }));
|
|
2727
2832
|
}
|
|
2728
2833
|
if (variant === 'dropdown') {
|
|
2729
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
2834
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$e.dropdown} ${className}`, children: [jsxRuntime.jsxs(framerMotion.motion.button, { className: styles$e.dropdownTrigger, whileTap: { scale: 0.98 }, children: [currentThemeData.icon, showLabel && jsxRuntime.jsx("span", { className: styles$e.label, children: currentThemeData.label })] }), jsxRuntime.jsx(framerMotion.motion.div, { className: styles$e.dropdownMenu, initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, children: themes.map((t) => (jsxRuntime.jsxs(framerMotion.motion.button, { className: `${styles$e.dropdownItem} ${theme === t.value ? styles$e.active : ''}`, onClick: () => setTheme(t.value), whileHover: { x: 4 }, whileTap: { scale: 0.98 }, children: [jsxRuntime.jsx("span", { className: styles$e.icon, children: t.icon }), jsxRuntime.jsx("span", { className: styles$e.text, children: t.label })] }, t.value))) })] }));
|
|
2730
2835
|
}
|
|
2731
2836
|
// Default button variant - cycles through themes
|
|
2732
|
-
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: `${styles$
|
|
2837
|
+
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: `${styles$e.button} ${className}`, onClick: () => {
|
|
2733
2838
|
const nextIndex = (currentThemeIndex + 1) % themes.length;
|
|
2734
2839
|
setTheme(themes[nextIndex].value);
|
|
2735
|
-
}, whileTap: { scale: 0.95 }, whileHover: { scale: 1.05 }, "aria-label": `Current theme: ${currentThemeData.label}. Click to change.`, children: [jsxRuntime.jsx(framerMotion.motion.div, { initial: { rotate: -180, opacity: 0 }, animate: { rotate: 0, opacity: 1 }, exit: { rotate: 180, opacity: 0 }, transition: { duration: 0.3 }, className: styles$
|
|
2840
|
+
}, whileTap: { scale: 0.95 }, whileHover: { scale: 1.05 }, "aria-label": `Current theme: ${currentThemeData.label}. Click to change.`, children: [jsxRuntime.jsx(framerMotion.motion.div, { initial: { rotate: -180, opacity: 0 }, animate: { rotate: 0, opacity: 1 }, exit: { rotate: 180, opacity: 0 }, transition: { duration: 0.3 }, className: styles$e.iconWrapper, children: currentThemeData.icon }, theme), showLabel && jsxRuntime.jsx("span", { className: styles$e.label, children: currentThemeData.label })] }));
|
|
2736
2841
|
};
|
|
2737
2842
|
|
|
2738
|
-
|
|
2739
|
-
function SiJira (props) {
|
|
2740
|
-
return GenIcon({"attr":{"role":"img","viewBox":"0 0 24 24"},"child":[{"tag":"path","attr":{"d":"M11.571 11.513H0a5.218 5.218 0 0 0 5.232 5.215h2.13v2.057A5.215 5.215 0 0 0 12.575 24V12.518a1.005 1.005 0 0 0-1.005-1.005zm5.723-5.756H5.736a5.215 5.215 0 0 0 5.215 5.214h2.129v2.058a5.218 5.218 0 0 0 5.215 5.214V6.758a1.001 1.001 0 0 0-1.001-1.001zM23.013 0H11.455a5.215 5.215 0 0 0 5.215 5.215h2.129v2.057A5.215 5.215 0 0 0 24 12.483V1.005A1.001 1.001 0 0 0 23.013 0Z"},"child":[]}]})(props);
|
|
2741
|
-
}
|
|
2742
|
-
|
|
2743
|
-
var styles$9 = {"tabs":"Tabs-module_tabs__Vlvn7","tab":"Tabs-module_tab__uQKim","tabIcon":"Tabs-module_tabIcon__AgN-O"};
|
|
2843
|
+
var styles$d = {"tabs":"Tabs-module_tabs__Vlvn7","tab":"Tabs-module_tab__uQKim","tabIcon":"Tabs-module_tabIcon__AgN-O"};
|
|
2744
2844
|
|
|
2745
2845
|
// Default tabs for backwards compatibility
|
|
2746
2846
|
const defaultTabs = [
|
|
2747
|
-
{ id: 'details', icon:
|
|
2748
|
-
{ id: 'github', icon:
|
|
2749
|
-
{ id: 'jira', icon:
|
|
2750
|
-
{ id: 'functional', icon:
|
|
2847
|
+
{ id: 'details', icon: lucideReact.Info, label: 'Dettagli' },
|
|
2848
|
+
{ id: 'github', icon: lucideReact.Github, label: 'GitHub' },
|
|
2849
|
+
{ id: 'jira', icon: lucideReact.SquareKanban, label: 'Jira' },
|
|
2850
|
+
{ id: 'functional', icon: lucideReact.Info, label: 'Analisi funzionale' }
|
|
2751
2851
|
];
|
|
2752
2852
|
const Tabs = ({ activeTab, onTabChange, tabs: customTabs, className = '' }) => {
|
|
2753
2853
|
const tabs = customTabs ?? defaultTabs;
|
|
2754
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
2854
|
+
return (jsxRuntime.jsx("div", { className: `${styles$d.tabs} ${className}`, children: tabs.map((tab) => {
|
|
2755
2855
|
const isActive = activeTab === tab.id;
|
|
2756
|
-
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: styles$
|
|
2856
|
+
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: styles$d.tab, "data-active": isActive, onClick: () => onTabChange(tab.id), style: { position: 'relative' }, children: [jsxRuntime.jsx(framerMotion.motion.div, { animate: {
|
|
2757
2857
|
rotate: isActive ? [0, -10, 10, -5, 5, 0] : 0,
|
|
2758
2858
|
}, transition: {
|
|
2759
2859
|
rotate: {
|
|
2760
2860
|
duration: 0.5,
|
|
2761
2861
|
ease: 'easeInOut'
|
|
2762
2862
|
}
|
|
2763
|
-
}, children: tab.icon && (
|
|
2863
|
+
}, children: tab.icon && (React.isValidElement(tab.icon) ? (jsxRuntime.jsx("span", { className: styles$d.tabIcon, children: tab.icon })) : (jsxRuntime.jsx("span", { className: styles$d.tabIcon, children: React.createElement(tab.icon) }))) }), jsxRuntime.jsx("span", { children: tab.label })] }, tab.id));
|
|
2764
2864
|
}) }));
|
|
2765
2865
|
};
|
|
2766
2866
|
|
|
2767
|
-
var styles$
|
|
2867
|
+
var styles$c = {"toastContainer":"Toast-module_toastContainer__gp5C0","toast":"Toast-module_toast__eenNR","toastSuccess":"Toast-module_toastSuccess__e-cSx","toastError":"Toast-module_toastError__6JO9w","toastWarning":"Toast-module_toastWarning__pJoF1","toastInfo":"Toast-module_toastInfo__y33kR","icon":"Toast-module_icon__Z-D6i","iconSuccess":"Toast-module_iconSuccess__ehY27","iconError":"Toast-module_iconError__nXhZz","iconWarning":"Toast-module_iconWarning__Ie8oD","iconInfo":"Toast-module_iconInfo__8vOf5","content":"Toast-module_content__eBhK8","title":"Toast-module_title__EfUfZ","message":"Toast-module_message__l4pyr","closeButton":"Toast-module_closeButton__UWOVG","progressBar":"Toast-module_progressBar__fGwBU"};
|
|
2868
|
+
|
|
2869
|
+
const getIcon = (type) => {
|
|
2870
|
+
switch (type) {
|
|
2871
|
+
case 'success':
|
|
2872
|
+
return (jsxRuntime.jsx("svg", { className: `${styles$c.icon} ${styles$c.iconSuccess}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }));
|
|
2873
|
+
case 'error':
|
|
2874
|
+
return (jsxRuntime.jsx("svg", { className: `${styles$c.icon} ${styles$c.iconError}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }));
|
|
2875
|
+
case 'warning':
|
|
2876
|
+
return (jsxRuntime.jsx("svg", { className: `${styles$c.icon} ${styles$c.iconWarning}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }));
|
|
2877
|
+
case 'info':
|
|
2878
|
+
return (jsxRuntime.jsx("svg", { className: `${styles$c.icon} ${styles$c.iconInfo}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }));
|
|
2879
|
+
}
|
|
2880
|
+
};
|
|
2881
|
+
const getToastStyle = (type) => {
|
|
2882
|
+
switch (type) {
|
|
2883
|
+
case 'success': return styles$c.toastSuccess;
|
|
2884
|
+
case 'error': return styles$c.toastError;
|
|
2885
|
+
case 'warning': return styles$c.toastWarning;
|
|
2886
|
+
case 'info': return styles$c.toastInfo;
|
|
2887
|
+
default: return '';
|
|
2888
|
+
}
|
|
2889
|
+
};
|
|
2890
|
+
const ToastItem = ({ toast, removeToast, }) => {
|
|
2891
|
+
const [progress, setProgress] = React.useState(100);
|
|
2892
|
+
const duration = toast.duration || 5000;
|
|
2893
|
+
React.useEffect(() => {
|
|
2894
|
+
const timer = setTimeout(() => {
|
|
2895
|
+
removeToast(toast.id);
|
|
2896
|
+
}, duration);
|
|
2897
|
+
const interval = setInterval(() => {
|
|
2898
|
+
setProgress((prev) => {
|
|
2899
|
+
const newProgress = prev - 100 / (duration / 100);
|
|
2900
|
+
return newProgress <= 0 ? 0 : newProgress;
|
|
2901
|
+
});
|
|
2902
|
+
}, 100);
|
|
2903
|
+
return () => {
|
|
2904
|
+
clearTimeout(timer);
|
|
2905
|
+
clearInterval(interval);
|
|
2906
|
+
};
|
|
2907
|
+
}, [toast.id, duration, removeToast]);
|
|
2908
|
+
return (jsxRuntime.jsxs(framerMotion.motion.div, { className: `${styles$c.toast} ${getToastStyle(toast.type)}`, initial: { opacity: 0, x: 100, scale: 0.9 }, animate: { opacity: 1, x: 0, scale: 1 }, exit: { opacity: 0, x: 100, scale: 0.9 }, transition: { type: 'spring', stiffness: 500, damping: 40 }, layout: true, children: [getIcon(toast.type), jsxRuntime.jsxs("div", { className: styles$c.content, children: [toast.title && jsxRuntime.jsx("p", { className: styles$c.title, children: toast.title }), jsxRuntime.jsx("p", { className: styles$c.message, children: toast.message })] }), jsxRuntime.jsx("button", { className: styles$c.closeButton, onClick: () => removeToast(toast.id), "aria-label": "Close notification", children: jsxRuntime.jsx("svg", { width: "16", height: "16", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }), jsxRuntime.jsx(framerMotion.motion.div, { className: styles$c.progressBar, initial: { width: '100%' }, animate: { width: `${progress}%` }, style: {
|
|
2909
|
+
color: toast.type === 'success' ? '#10B981'
|
|
2910
|
+
: toast.type === 'error' ? '#EF4444'
|
|
2911
|
+
: toast.type === 'warning' ? '#F59E0B'
|
|
2912
|
+
: '#3B82F6',
|
|
2913
|
+
} })] }));
|
|
2914
|
+
};
|
|
2915
|
+
const ToastContainer = ({ toasts, removeToast }) => {
|
|
2916
|
+
if (typeof document === 'undefined')
|
|
2917
|
+
return null;
|
|
2918
|
+
return reactDom.createPortal(jsxRuntime.jsx("div", { className: styles$c.toastContainer, children: jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "sync", children: toasts.map((toast) => (jsxRuntime.jsx(ToastItem, { toast: toast, removeToast: removeToast }, toast.id))) }) }), document.body);
|
|
2919
|
+
};
|
|
2920
|
+
|
|
2921
|
+
var styles$b = {"breadcrumb":"Breadcrumb-module_breadcrumb__pGabz","separator":"Breadcrumb-module_separator__UCmyy","item":"Breadcrumb-module_item__0cLOg","link":"Breadcrumb-module_link__udp8M","current":"Breadcrumb-module_current__3DpQc"};
|
|
2922
|
+
|
|
2923
|
+
/**
|
|
2924
|
+
* Breadcrumb Component
|
|
2925
|
+
*
|
|
2926
|
+
* Navigation breadcrumb trail. Router-agnostic: pass onNavigate to handle
|
|
2927
|
+
* clicks on breadcrumb links (e.g. with react-router's navigate function).
|
|
2928
|
+
*
|
|
2929
|
+
* @example
|
|
2930
|
+
* <Breadcrumb
|
|
2931
|
+
* items={[
|
|
2932
|
+
* { label: 'Home', href: '/' },
|
|
2933
|
+
* { label: 'Settings', href: '/settings' },
|
|
2934
|
+
* { label: 'Profile' },
|
|
2935
|
+
* ]}
|
|
2936
|
+
* onNavigate={(href) => navigate(href)}
|
|
2937
|
+
* />
|
|
2938
|
+
*/
|
|
2939
|
+
const Breadcrumb = ({ items, onNavigate, className = '' }) => {
|
|
2940
|
+
return (jsxRuntime.jsx("nav", { className: `${styles$b.breadcrumb} ${className}`, "aria-label": "Breadcrumb", children: items.map((item, index) => {
|
|
2941
|
+
const isLast = index === items.length - 1;
|
|
2942
|
+
return (jsxRuntime.jsxs(React.Fragment, { children: [index > 0 && jsxRuntime.jsx(lucideReact.ChevronRight, { size: 14, className: styles$b.separator }), isLast || !item.href ? (jsxRuntime.jsx("span", { className: `${styles$b.item} ${isLast ? styles$b.current : ''}`, children: item.label })) : (jsxRuntime.jsx("button", { className: `${styles$b.item} ${styles$b.link}`, onClick: () => onNavigate?.(item.href), children: item.label }))] }, index));
|
|
2943
|
+
}) }));
|
|
2944
|
+
};
|
|
2945
|
+
|
|
2946
|
+
var styles$a = {"overlay":"LiquidButton-module_overlay__-P-xm","container":"LiquidButton-module_container__f1COS","actions":"LiquidButton-module_actions__XBz7p","actionButton":"LiquidButton-module_actionButton__PlEOk","actionLabel":"LiquidButton-module_actionLabel__tIGHE","button":"LiquidButton-module_button__znjyS"};
|
|
2947
|
+
|
|
2948
|
+
/**
|
|
2949
|
+
* LiquidButton Component
|
|
2950
|
+
*
|
|
2951
|
+
* A floating action button that expands to reveal quick action options.
|
|
2952
|
+
* The main button rotates 45 degrees when expanded (Plus becomes X).
|
|
2953
|
+
* Actions fan out above the button with staggered animations.
|
|
2954
|
+
*
|
|
2955
|
+
* @example
|
|
2956
|
+
* <LiquidButton
|
|
2957
|
+
* actions={[
|
|
2958
|
+
* { key: 'add', label: 'Add Item', icon: Plus, color: '#2196F3', onClick: () => {} },
|
|
2959
|
+
* { key: 'edit', label: 'Edit', icon: Edit, color: '#FF9800', onClick: () => {} },
|
|
2960
|
+
* ]}
|
|
2961
|
+
* />
|
|
2962
|
+
*/
|
|
2963
|
+
const LiquidButton = ({ actions, icon: Icon = lucideReact.Plus, className = '', }) => {
|
|
2964
|
+
const [expanded, setExpanded] = React.useState(false);
|
|
2965
|
+
const handleToggle = React.useCallback(() => {
|
|
2966
|
+
setExpanded((prev) => !prev);
|
|
2967
|
+
}, []);
|
|
2968
|
+
const handleAction = React.useCallback((action) => {
|
|
2969
|
+
setExpanded(false);
|
|
2970
|
+
action.onClick();
|
|
2971
|
+
}, []);
|
|
2972
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(framerMotion.AnimatePresence, { children: expanded && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$a.overlay, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: handleToggle })) }), jsxRuntime.jsxs("div", { className: `${styles$a.container} ${className}`, children: [jsxRuntime.jsx(framerMotion.AnimatePresence, { children: expanded && (jsxRuntime.jsx("div", { className: styles$a.actions, children: actions.map((action, index) => (jsxRuntime.jsxs(framerMotion.motion.button, { type: "button", className: styles$a.actionButton, initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.8 }, transition: {
|
|
2973
|
+
duration: 0.15,
|
|
2974
|
+
delay: (actions.length - 1 - index) * 0.05,
|
|
2975
|
+
}, onClick: () => handleAction(action), children: [jsxRuntime.jsx(action.icon, { size: 18, color: action.color }), jsxRuntime.jsx("span", { className: styles$a.actionLabel, children: action.label })] }, action.key))) })) }), jsxRuntime.jsx(framerMotion.motion.button, { type: "button", className: styles$a.button, onClick: handleToggle, animate: { rotate: expanded ? 45 : 0 }, transition: { duration: 0.2 }, "aria-label": expanded ? 'Close actions' : 'Open actions', children: jsxRuntime.jsx(Icon, { size: 24, strokeWidth: 2.5 }) })] })] }));
|
|
2976
|
+
};
|
|
2977
|
+
|
|
2978
|
+
var styles$9 = {"calendar":"Calendar-module_calendar__3mIJS","loading":"Calendar-module_loading__59Z9-","loadingSpinner":"Calendar-module_loadingSpinner__7MXqV","header":"Calendar-module_header__cZHNA","navigation":"Calendar-module_navigation__PGkpY","navButton":"Calendar-module_navButton__kOe-w","title":"Calendar-module_title__oJZ7m","controls":"Calendar-module_controls__i1Z38","todayButton":"Calendar-module_todayButton__Ac9zc","viewToggle":"Calendar-module_viewToggle__Fhg2t","viewButton":"Calendar-module_viewButton__J2WY6","active":"Calendar-module_active__lIqH-","weekDays":"Calendar-module_weekDays__4J-8f","weekNumberHeader":"Calendar-module_weekNumberHeader__xhKbB","weekDay":"Calendar-module_weekDay__cg8Gr","daysGrid":"Calendar-module_daysGrid__ER0GM","weekView":"Calendar-module_weekView__bdtGs","dayCell":"Calendar-module_dayCell__TV-HR","dayNumber":"Calendar-module_dayNumber__ICH-X","today":"Calendar-module_today__eGuUU","events":"Calendar-module_events__qdbs7","event":"Calendar-module_event__Q1Zq3","eventTitle":"Calendar-module_eventTitle__XU7Wd","eventTime":"Calendar-module_eventTime__pMGEB","otherMonth":"Calendar-module_otherMonth__r6VJK","weekNumber":"Calendar-module_weekNumber__nlo50","completed":"Calendar-module_completed__B-SHI","completedIcon":"Calendar-module_completedIcon__-oDZ9","moreEvents":"Calendar-module_moreEvents__TIKaT","emptyState":"Calendar-module_emptyState__2fcj7","dayView":"Calendar-module_dayView__PCIos","dayViewHeader":"Calendar-module_dayViewHeader__Gvxx2","timeColumnHeader":"Calendar-module_timeColumnHeader__B0btR","dayColumnHeader":"Calendar-module_dayColumnHeader__Rjqwg","dayViewScrollContainer":"Calendar-module_dayViewScrollContainer__84Byq","dayViewContent":"Calendar-module_dayViewContent__VU9JI","timeColumn":"Calendar-module_timeColumn__Sce-X","dayColumn":"Calendar-module_dayColumn__-j2oT","timeSlot":"Calendar-module_timeSlot__jldHq","timeLabel":"Calendar-module_timeLabel__9xLiK","hourSlot":"Calendar-module_hourSlot__z-80Q","hourLine":"Calendar-module_hourLine__fofdD","dayEvent":"Calendar-module_dayEvent__tSPFa","dayEventTitle":"Calendar-module_dayEventTitle__er03k","dayEventTime":"Calendar-module_dayEventTime__TlkeQ","currentTimeIndicator":"Calendar-module_currentTimeIndicator__GntOZ"};
|
|
2768
2979
|
|
|
2769
2980
|
/**
|
|
2770
2981
|
* Calendar component - A flexible, reusable calendar for displaying events
|
|
@@ -3012,11 +3223,11 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3012
3223
|
return Math.floor(diff / oneWeek) + 1;
|
|
3013
3224
|
};
|
|
3014
3225
|
if (loading) {
|
|
3015
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
3226
|
+
return (jsxRuntime.jsx("div", { className: `${styles$9.calendar} ${styles$9.loading} ${className}`, style: style, children: jsxRuntime.jsx("div", { className: styles$9.loadingSpinner, children: "Loading..." }) }));
|
|
3016
3227
|
}
|
|
3017
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
3228
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$9.calendar} ${className}`, style: style, children: [!hideHeader && (jsxRuntime.jsxs("div", { className: styles$9.header, children: [jsxRuntime.jsxs("div", { className: styles$9.navigation, children: [jsxRuntime.jsx("button", { onClick: handlePrevious, className: styles$9.navButton, "aria-label": "Previous", children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: jsxRuntime.jsx("polyline", { points: "15,18 9,12 15,6" }) }) }), jsxRuntime.jsx("h3", { className: styles$9.title, children: calendarData.displayTitle }), jsxRuntime.jsx("button", { onClick: handleNext, className: styles$9.navButton, "aria-label": "Next", children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: jsxRuntime.jsx("polyline", { points: "9,6 15,12 9,18" }) }) })] }), jsxRuntime.jsxs("div", { className: styles$9.controls, children: [jsxRuntime.jsx("button", { onClick: handleToday, className: styles$9.todayButton, children: "Today" }), jsxRuntime.jsxs("div", { className: styles$9.viewToggle, children: [jsxRuntime.jsx("button", { className: `${styles$9.viewButton} ${currentViewMode === 'month' ? styles$9.active : ''}`, onClick: () => setCurrentViewMode('month'), children: "Month" }), jsxRuntime.jsx("button", { className: `${styles$9.viewButton} ${currentViewMode === 'week' ? styles$9.active : ''}`, onClick: () => setCurrentViewMode('week'), children: "Week" }), jsxRuntime.jsx("button", { className: `${styles$9.viewButton} ${currentViewMode === 'day' ? styles$9.active : ''}`, onClick: () => setCurrentViewMode('day'), children: "Day" })] })] })] })), currentViewMode !== 'day' && (jsxRuntime.jsxs("div", { className: styles$9.weekDays, children: [showWeekNumbers && jsxRuntime.jsx("div", { className: styles$9.weekNumberHeader, children: "Week" }), finalDayLabels.map((day) => (jsxRuntime.jsx("div", { className: styles$9.weekDay, children: day }, day)))] })), currentViewMode === 'day' ? (
|
|
3018
3229
|
// Day view layout
|
|
3019
|
-
jsxRuntime.jsxs("div", { className: styles$
|
|
3230
|
+
jsxRuntime.jsxs("div", { className: styles$9.dayView, children: [jsxRuntime.jsxs("div", { className: styles$9.dayViewHeader, children: [jsxRuntime.jsx("div", { className: styles$9.timeColumnHeader }), jsxRuntime.jsx("div", { className: styles$9.dayColumnHeader, children: currentDate.toLocaleDateString(locale, { weekday: 'short', day: 'numeric' }) })] }), jsxRuntime.jsx("div", { className: styles$9.dayViewScrollContainer, ref: dayViewScrollRef, children: jsxRuntime.jsxs("div", { className: styles$9.dayViewContent, children: [(() => {
|
|
3020
3231
|
const now = new Date();
|
|
3021
3232
|
const currentHour = now.getHours();
|
|
3022
3233
|
const currentMinute = now.getMinutes();
|
|
@@ -3024,21 +3235,21 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3024
3235
|
const topPosition = (minutesSinceMidnight / 1440) * (24 * 60); // 24 hours * 60px per hour
|
|
3025
3236
|
// Only show if viewing today
|
|
3026
3237
|
const isToday = currentDate.toDateString() === now.toDateString();
|
|
3027
|
-
return isToday ? (jsxRuntime.jsx("div", { className: styles$
|
|
3028
|
-
})(), jsxRuntime.jsx("div", { className: styles$
|
|
3238
|
+
return isToday ? (jsxRuntime.jsx("div", { className: styles$9.currentTimeIndicator, style: { top: `${topPosition}px` } })) : null;
|
|
3239
|
+
})(), jsxRuntime.jsx("div", { className: styles$9.timeColumn, children: Array.from({ length: 24 }, (_, hour) => (jsxRuntime.jsx("div", { className: styles$9.timeSlot, children: jsxRuntime.jsxs("span", { className: styles$9.timeLabel, children: [hour.toString().padStart(2, '0'), ":00"] }) }, hour))) }), jsxRuntime.jsx("div", { className: styles$9.dayColumn, children: Array.from({ length: 24 }, (_, hour) => {
|
|
3029
3240
|
const hourEvents = getDayEvents(currentDate).filter(event => {
|
|
3030
3241
|
if (!event.time)
|
|
3031
3242
|
return false;
|
|
3032
3243
|
const eventHour = parseInt(event.time.split(':')[0]);
|
|
3033
3244
|
return eventHour === hour;
|
|
3034
3245
|
});
|
|
3035
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
3246
|
+
return (jsxRuntime.jsxs("div", { className: styles$9.hourSlot, onClick: (e) => {
|
|
3036
3247
|
// Only trigger if clicking on the slot itself, not on an event
|
|
3037
3248
|
if (e.target === e.currentTarget ||
|
|
3038
|
-
e.target.classList.contains(styles$
|
|
3249
|
+
e.target.classList.contains(styles$9.hourLine)) {
|
|
3039
3250
|
handleTimeSlotClick(hour);
|
|
3040
3251
|
}
|
|
3041
|
-
}, style: { cursor: 'pointer' }, children: [jsxRuntime.jsx("div", { className: styles$
|
|
3252
|
+
}, style: { cursor: 'pointer' }, children: [jsxRuntime.jsx("div", { className: styles$9.hourLine }), hourEvents.map((event, eventIndex) => (jsxRuntime.jsxs(framerMotion.motion.div, { className: `${styles$9.dayEvent} ${event.status === 'completed' ? styles$9.completed : ''}`, style: {
|
|
3042
3253
|
backgroundColor: getEventColor(event),
|
|
3043
3254
|
color: getEventTextColor(event),
|
|
3044
3255
|
opacity: event.status === 'completed' ? 0.7 : 1
|
|
@@ -3056,17 +3267,17 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3056
3267
|
}, whileTap: {
|
|
3057
3268
|
scale: 0.98,
|
|
3058
3269
|
transition: { duration: 0.1 }
|
|
3059
|
-
}, children: [iconRenderer && iconRenderer(event), jsxRuntime.jsxs("span", { className: styles$
|
|
3060
|
-
}) })] }) })] })) : (jsxRuntime.jsx("div", { className: `${styles$
|
|
3270
|
+
}, children: [iconRenderer && iconRenderer(event), jsxRuntime.jsxs("span", { className: styles$9.dayEventTitle, children: [jsxRuntime.jsx("span", { className: styles$9.dayEventTime, children: event.time }), event.title] }), event.status === 'completed' && (jsxRuntime.jsx("svg", { className: styles$9.completedIcon, width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: jsxRuntime.jsx("polyline", { points: "20,6 9,17 4,12" }) }))] }, event.id)))] }, hour));
|
|
3271
|
+
}) })] }) })] })) : (jsxRuntime.jsx("div", { className: `${styles$9.daysGrid} ${currentViewMode === 'week' ? styles$9.weekView : ''}`, children: calendarData.days.map((day, index) => {
|
|
3061
3272
|
const dayEvents = getDayEvents(day);
|
|
3062
3273
|
const dayIsToday = isToday(day);
|
|
3063
3274
|
const isInCurrentMonth = currentViewMode === 'week' || isCurrentMonth(day);
|
|
3064
3275
|
const isWeekStart = showWeekNumbers && (index % 7 === 0);
|
|
3065
|
-
return (jsxRuntime.jsxs(framerMotion.motion.div, { className: `${styles$
|
|
3276
|
+
return (jsxRuntime.jsxs(framerMotion.motion.div, { className: `${styles$9.dayCell} ${dayIsToday ? styles$9.today : ''} ${!isInCurrentMonth ? styles$9.otherMonth : ''}`, initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: {
|
|
3066
3277
|
duration: 0.3,
|
|
3067
3278
|
delay: index * 0.02,
|
|
3068
3279
|
ease: "easeOut"
|
|
3069
|
-
}, onClick: () => handleDateClick(day), children: [isWeekStart && (jsxRuntime.jsx("div", { className: styles$
|
|
3280
|
+
}, onClick: () => handleDateClick(day), children: [isWeekStart && (jsxRuntime.jsx("div", { className: styles$9.weekNumber, children: getWeekNumber(day) })), jsxRuntime.jsx("div", { className: styles$9.dayNumber, children: day.getDate() }), dayEvents.length > 0 && (jsxRuntime.jsxs("div", { className: styles$9.events, children: [dayEvents.slice(0, maxEventsPerDay).map((event, eventIndex) => (jsxRuntime.jsxs(framerMotion.motion.div, { className: `${styles$9.event} ${event.status === 'completed' ? styles$9.completed : ''}`, style: {
|
|
3070
3281
|
backgroundColor: getEventColor(event),
|
|
3071
3282
|
color: getEventTextColor(event),
|
|
3072
3283
|
opacity: event.status === 'completed' ? 0.7 : 1
|
|
@@ -3084,35 +3295,90 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3084
3295
|
}, whileTap: {
|
|
3085
3296
|
scale: 0.98,
|
|
3086
3297
|
transition: { duration: 0.1 }
|
|
3087
|
-
}, children: [iconRenderer && iconRenderer(event), jsxRuntime.jsxs("span", { className: styles$
|
|
3298
|
+
}, children: [iconRenderer && iconRenderer(event), jsxRuntime.jsxs("span", { className: styles$9.eventTitle, children: [event.time && (jsxRuntime.jsx("span", { className: styles$9.eventTime, children: event.time })), event.title] }), event.status === 'completed' && (jsxRuntime.jsx("svg", { className: styles$9.completedIcon, width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: jsxRuntime.jsx("polyline", { points: "20,6 9,17 4,12" }) }))] }, event.id))), dayEvents.length > maxEventsPerDay && (jsxRuntime.jsxs("div", { className: styles$9.moreEvents, children: ["+", dayEvents.length - maxEventsPerDay, " more"] }))] })), dayEvents.length === 0 && emptyState && (jsxRuntime.jsx("div", { className: styles$9.emptyState, children: emptyState }))] }, `${day.getFullYear()}-${day.getMonth()}-${day.getDate()}`));
|
|
3088
3299
|
}) }))] }));
|
|
3089
3300
|
}
|
|
3090
3301
|
|
|
3091
|
-
var desktopStyles = {"navbar":"Navbar-module_navbar__-SNiN","navbarSidebar":"Navbar-module_navbarSidebar__RVVL8","navbarTop":"Navbar-module_navbarTop__MLI-S","navList":"Navbar-module_navList__764oY","navItem":"Navbar-module_navItem__cbeLP","navbarMinimal":"Navbar-module_navbarMinimal__7gs0n","navLogo":"Navbar-module_navLogo__y0AxI","logoContainer":"Navbar-module_logoContainer__zJG3x","logoImage":"Navbar-module_logoImage__1Ptmz","logoPlaceholder":"Navbar-module_logoPlaceholder__aIREi","logoContent":"Navbar-module_logoContent__CjPyL","logoText":"Navbar-module_logoText__bTwI0","logoSubtitle":"Navbar-module_logoSubtitle__UA95I","subNavItem":"Navbar-module_subNavItem__WN9is","navLink":"Navbar-module_navLink__I-45k","
|
|
3302
|
+
var desktopStyles = {"navbar":"Navbar-module_navbar__-SNiN","navbarSidebar":"Navbar-module_navbarSidebar__RVVL8","navbarTop":"Navbar-module_navbarTop__MLI-S","navList":"Navbar-module_navList__764oY","navItem":"Navbar-module_navItem__cbeLP","navbarMinimal":"Navbar-module_navbarMinimal__7gs0n","navLogo":"Navbar-module_navLogo__y0AxI","logoContainer":"Navbar-module_logoContainer__zJG3x","logoImage":"Navbar-module_logoImage__1Ptmz","logoPlaceholder":"Navbar-module_logoPlaceholder__aIREi","logoContent":"Navbar-module_logoContent__CjPyL","logoText":"Navbar-module_logoText__bTwI0","logoSubtitle":"Navbar-module_logoSubtitle__UA95I","subNavItem":"Navbar-module_subNavItem__WN9is","navLink":"Navbar-module_navLink__I-45k","activeBackground":"Navbar-module_activeBackground__ikyOn","navIcon":"Navbar-module_navIcon__uU4yD","activeIcon":"Navbar-module_activeIcon__omRDk","navText":"Navbar-module_navText__4e0cK","activeText":"Navbar-module_activeText__zSzJC","navBadge":"Navbar-module_navBadge__mLur9","chevron":"Navbar-module_chevron__nmRNk","subNavList":"Navbar-module_subNavList__YsOQP","navFooter":"Navbar-module_navFooter__p1wMO","mobileMenuButton":"Navbar-module_mobileMenuButton__BrALw","mobileBackdrop":"Navbar-module_mobileBackdrop__bgxCV","mobileMenuOpen":"Navbar-module_mobileMenuOpen__oICVa"};
|
|
3092
3303
|
|
|
3093
|
-
var mobileStyles = {"navbar":"Navbar-mobile-module_navbar__-shkE","navLogo":"Navbar-mobile-module_navLogo__7Gnna","navList":"Navbar-mobile-module_navList__FBo8I","navItem":"Navbar-mobile-module_navItem__-9E9-","navLink":"Navbar-mobile-module_navLink__A8n8F","active":"Navbar-mobile-module_active__h3ajz","activeBackground":"Navbar-mobile-module_activeBackground__btXAN","navIcon":"Navbar-mobile-module_navIcon__4L17v","activeIcon":"Navbar-mobile-module_activeIcon__A8GF-","navText":"Navbar-mobile-module_navText__ewf-i","activeText":"Navbar-mobile-module_activeText__fNqcU","navBadge":"Navbar-mobile-module_navBadge__YccGx","chevron":"Navbar-mobile-module_chevron__nBPqn","subNavList":"Navbar-mobile-module_subNavList__8tINc","
|
|
3304
|
+
var mobileStyles = {"navbar":"Navbar-mobile-module_navbar__-shkE","navLogo":"Navbar-mobile-module_navLogo__7Gnna","logoContainer":"Navbar-mobile-module_logoContainer__JTw99","logoImage":"Navbar-mobile-module_logoImage__QwV5v","logoPlaceholder":"Navbar-mobile-module_logoPlaceholder__tSkOl","logoContent":"Navbar-mobile-module_logoContent__FVTxh","logoText":"Navbar-mobile-module_logoText__5XghQ","logoSubtitle":"Navbar-mobile-module_logoSubtitle__4Wf8p","mobileMenuButton":"Navbar-mobile-module_mobileMenuButton__Dx3t8","menuOpen":"Navbar-mobile-module_menuOpen__XEc1c","mobileBackdrop":"Navbar-mobile-module_mobileBackdrop__biYng","navList":"Navbar-mobile-module_navList__FBo8I","navItem":"Navbar-mobile-module_navItem__-9E9-","subNavItem":"Navbar-mobile-module_subNavItem__c-5IU","navLink":"Navbar-mobile-module_navLink__A8n8F","active":"Navbar-mobile-module_active__h3ajz","activeBackground":"Navbar-mobile-module_activeBackground__btXAN","navIcon":"Navbar-mobile-module_navIcon__4L17v","activeIcon":"Navbar-mobile-module_activeIcon__A8GF-","navText":"Navbar-mobile-module_navText__ewf-i","activeText":"Navbar-mobile-module_activeText__fNqcU","navBadge":"Navbar-mobile-module_navBadge__YccGx","chevron":"Navbar-mobile-module_chevron__nBPqn","subNavList":"Navbar-mobile-module_subNavList__8tINc","navActions":"Navbar-mobile-module_navActions__fpzOK","navFooter":"Navbar-mobile-module_navFooter__yijWu","navbarSidebar":"Navbar-mobile-module_navbarSidebar__HvB-K","navbarTop":"Navbar-mobile-module_navbarTop__oyfPE","navbarMinimal":"Navbar-mobile-module_navbarMinimal__cudny","mobileMenuOpen":"Navbar-mobile-module_mobileMenuOpen__zB4Gy"};
|
|
3094
3305
|
|
|
3095
|
-
const Navbar = ({ items, logo, onItemClick, variant = 'sidebar', isMobile = false, footer, className = '', soundConfig }) => {
|
|
3096
|
-
const styles = React.useMemo(() => isMobile ? mobileStyles : desktopStyles, [isMobile]);
|
|
3306
|
+
const Navbar = ({ items, logo, onItemClick, variant = 'sidebar', isMobile = false, footer, className = '', soundConfig, }) => {
|
|
3307
|
+
const styles = React.useMemo(() => (isMobile ? mobileStyles : desktopStyles), [isMobile]);
|
|
3097
3308
|
const [isMobileMenuOpen, setIsMobileMenuOpen] = React.useState(false);
|
|
3098
3309
|
const [expandedItems, setExpandedItems] = React.useState(new Set());
|
|
3099
3310
|
const { handlers, playSound } = useComponentSound(soundConfig);
|
|
3100
|
-
// Close mobile menu when
|
|
3311
|
+
// Close mobile menu when switching away from mobile
|
|
3101
3312
|
React.useEffect(() => {
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3313
|
+
if (!isMobile) {
|
|
3314
|
+
setIsMobileMenuOpen(false);
|
|
3315
|
+
}
|
|
3316
|
+
}, [isMobile]);
|
|
3317
|
+
// Swipe from left edge to open menu
|
|
3318
|
+
const touchStartRef = React.useRef(null);
|
|
3319
|
+
React.useEffect(() => {
|
|
3320
|
+
if (!isMobile)
|
|
3321
|
+
return;
|
|
3322
|
+
const handleTouchStart = (e) => {
|
|
3323
|
+
const touch = e.touches[0];
|
|
3324
|
+
if (touch.clientX < 30) {
|
|
3325
|
+
touchStartRef.current = { x: touch.clientX, y: touch.clientY };
|
|
3105
3326
|
}
|
|
3106
3327
|
};
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3328
|
+
const handleTouchEnd = (e) => {
|
|
3329
|
+
if (!touchStartRef.current)
|
|
3330
|
+
return;
|
|
3331
|
+
const touch = e.changedTouches[0];
|
|
3332
|
+
const dx = touch.clientX - touchStartRef.current.x;
|
|
3333
|
+
const dy = Math.abs(touch.clientY - touchStartRef.current.y);
|
|
3334
|
+
touchStartRef.current = null;
|
|
3335
|
+
if (dx > 60 && dy < dx) {
|
|
3336
|
+
setIsMobileMenuOpen(true);
|
|
3337
|
+
playSound('toggle');
|
|
3338
|
+
}
|
|
3339
|
+
};
|
|
3340
|
+
document.addEventListener('touchstart', handleTouchStart, { passive: true });
|
|
3341
|
+
document.addEventListener('touchend', handleTouchEnd, { passive: true });
|
|
3342
|
+
return () => {
|
|
3343
|
+
document.removeEventListener('touchstart', handleTouchStart);
|
|
3344
|
+
document.removeEventListener('touchend', handleTouchEnd);
|
|
3345
|
+
};
|
|
3346
|
+
}, [isMobile, playSound]);
|
|
3347
|
+
// Lock body scroll when overlay is open (position: fixed is more reliable on mobile)
|
|
3348
|
+
React.useEffect(() => {
|
|
3349
|
+
if (isMobileMenuOpen) {
|
|
3350
|
+
const scrollY = window.scrollY;
|
|
3351
|
+
document.body.style.position = 'fixed';
|
|
3352
|
+
document.body.style.top = `-${scrollY}px`;
|
|
3353
|
+
document.body.style.left = '0';
|
|
3354
|
+
document.body.style.right = '0';
|
|
3355
|
+
document.body.style.overflow = 'hidden';
|
|
3356
|
+
}
|
|
3357
|
+
else {
|
|
3358
|
+
const scrollY = document.body.style.top;
|
|
3359
|
+
document.body.style.position = '';
|
|
3360
|
+
document.body.style.top = '';
|
|
3361
|
+
document.body.style.left = '';
|
|
3362
|
+
document.body.style.right = '';
|
|
3363
|
+
document.body.style.overflow = '';
|
|
3364
|
+
if (scrollY) {
|
|
3365
|
+
window.scrollTo(0, parseInt(scrollY, 10) * -1);
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
return () => {
|
|
3369
|
+
document.body.style.position = '';
|
|
3370
|
+
document.body.style.top = '';
|
|
3371
|
+
document.body.style.left = '';
|
|
3372
|
+
document.body.style.right = '';
|
|
3373
|
+
document.body.style.overflow = '';
|
|
3374
|
+
};
|
|
3375
|
+
}, [isMobileMenuOpen]);
|
|
3110
3376
|
const toggleMobileMenu = () => {
|
|
3111
3377
|
playSound('toggle');
|
|
3112
3378
|
setIsMobileMenuOpen(!isMobileMenuOpen);
|
|
3113
3379
|
};
|
|
3114
3380
|
const toggleExpanded = (itemId) => {
|
|
3115
|
-
setExpandedItems(prev => {
|
|
3381
|
+
setExpandedItems((prev) => {
|
|
3116
3382
|
const newSet = new Set(prev);
|
|
3117
3383
|
if (newSet.has(itemId)) {
|
|
3118
3384
|
newSet.delete(itemId);
|
|
@@ -3145,19 +3411,22 @@ const Navbar = ({ items, logo, onItemClick, variant = 'sidebar', isMobile = fals
|
|
|
3145
3411
|
const isExpanded = expandedItems.has(item.id);
|
|
3146
3412
|
const hasChildren = item.children && item.children.length > 0;
|
|
3147
3413
|
return (jsxRuntime.jsxs(framerMotion.motion.li, { className: `${styles.navItem} ${depth > 0 ? styles.subNavItem : ''}`, initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { delay: index * 0.05 }, children: [jsxRuntime.jsxs(framerMotion.motion.button, { className: `${styles.navLink} ${item.isActive ? styles.active : ''}`, onClick: () => handleItemClick(item), onMouseEnter: handlers.onMouseEnter, whileHover: { x: 5 }, whileTap: { scale: 0.98 }, children: [item.isActive && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles.activeBackground, layoutId: "activeNavBackground", initial: false, transition: {
|
|
3148
|
-
type:
|
|
3414
|
+
type: 'spring',
|
|
3149
3415
|
stiffness: 500,
|
|
3150
|
-
damping: 35
|
|
3151
|
-
} })), Icon && (jsxRuntime.jsx(Icon, { className: `${styles.navIcon} ${item.isActive ? styles.activeIcon : ''}` })), jsxRuntime.jsx("span", { className: `${styles.navText} ${item.isActive ? styles.activeText : ''}`, children: item.label }), item.badge &&
|
|
3416
|
+
damping: 35,
|
|
3417
|
+
} })), Icon && (jsxRuntime.jsx(Icon, { className: `${styles.navIcon} ${item.isActive ? styles.activeIcon : ''}` })), jsxRuntime.jsx("span", { className: `${styles.navText} ${item.isActive ? styles.activeText : ''}`, children: item.label }), item.badge && jsxRuntime.jsx("span", { className: styles.navBadge, children: item.badge }), hasChildren && (jsxRuntime.jsx(framerMotion.motion.span, { className: styles.chevron, animate: { rotate: isExpanded ? 180 : 0 }, transition: { duration: 0.2 }, children: "\u25BC" }))] }), hasChildren && (jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isExpanded && (jsxRuntime.jsx(framerMotion.motion.ul, { className: styles.subNavList, initial: { height: 0, opacity: 0 }, animate: { height: 'auto', opacity: 1 }, exit: { height: 0, opacity: 0 }, transition: { duration: 0.2 }, children: item.children.map((child, childIndex) => renderNavItem(child, childIndex, depth + 1)) })) }))] }, item.id));
|
|
3152
3418
|
};
|
|
3153
|
-
const navContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [logo && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles.navLogo, initial: { opacity: 0, y: -20 }, animate: { opacity: 1, y: 0 }, transition: { delay: 0.1 }, children: jsxRuntime.jsxs("div", { className: styles.logoContainer, children: [logo.src ? (jsxRuntime.jsx(framerMotion.motion.img, { src: logo.src, alt: logo.alt || 'Logo', className: styles.logoImage, onMouseEnter: handlers.onMouseEnter, whileHover: { scale: 1.05 }, transition: { type:
|
|
3419
|
+
const navContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [logo && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles.navLogo, initial: { opacity: 0, y: -20 }, animate: { opacity: 1, y: 0 }, transition: { delay: 0.1 }, children: jsxRuntime.jsxs("div", { className: styles.logoContainer, children: [logo.src ? (jsxRuntime.jsx(framerMotion.motion.img, { src: logo.src, alt: logo.alt || 'Logo', className: styles.logoImage, onMouseEnter: handlers.onMouseEnter, whileHover: { scale: 1.05 }, transition: { type: 'spring', stiffness: 400 } })) : (jsxRuntime.jsx("div", { className: styles.logoPlaceholder, children: logo.text?.charAt(0) || 'L' })), (logo.text || logo.subtitle) && (jsxRuntime.jsxs("div", { className: styles.logoContent, children: [logo.text && jsxRuntime.jsx("span", { className: styles.logoText, children: logo.text }), logo.subtitle && (jsxRuntime.jsx("span", { className: styles.logoSubtitle, children: logo.subtitle }))] }))] }) })), jsxRuntime.jsx("ul", { className: styles.navList, children: items.map((item, index) => renderNavItem(item, index)) }), footer && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles.navFooter, initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { delay: 0.3 }, children: footer }))] }));
|
|
3154
3420
|
if (variant === 'top') {
|
|
3155
|
-
return (jsxRuntime.jsx(framerMotion.motion.nav, { className: `${styles.navbar} ${styles.navbarTop} ${className}`, initial: { y: -100 }, animate: { y: 0 }, transition: { type:
|
|
3421
|
+
return (jsxRuntime.jsx(framerMotion.motion.nav, { className: `${styles.navbar} ${styles.navbarTop} ${className}`, initial: { y: -100 }, animate: { y: 0 }, transition: { type: 'spring', stiffness: 300, damping: 30 }, children: navContent }));
|
|
3422
|
+
}
|
|
3423
|
+
if (isMobile) {
|
|
3424
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("nav", { className: `${styles.navbar} ${className}`, children: [logo && (jsxRuntime.jsx("div", { className: styles.navLogo, children: jsxRuntime.jsxs("div", { className: styles.logoContainer, children: [logo.src ? (jsxRuntime.jsx("img", { src: logo.src, alt: logo.alt || 'Logo', className: styles.logoImage })) : (jsxRuntime.jsx("div", { className: styles.logoPlaceholder, children: logo.text?.charAt(0) || 'L' })), logo.text && (jsxRuntime.jsx("div", { className: styles.logoContent, children: jsxRuntime.jsx("span", { className: styles.logoText, children: logo.text }) }))] }) })), jsxRuntime.jsxs("div", { className: styles.navActions, children: [footer && jsxRuntime.jsx("div", { className: styles.navFooter, children: footer }), jsxRuntime.jsx("button", { className: `${styles.mobileMenuButton} ${isMobileMenuOpen ? styles.menuOpen : ''}`, onClick: toggleMobileMenu, "aria-label": "Toggle navigation menu", children: isMobileMenuOpen ? jsxRuntime.jsx(lucideReact.X, {}) : jsxRuntime.jsx(lucideReact.Menu, {}) })] })] }), jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isMobileMenuOpen && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles.mobileBackdrop, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, transition: { duration: 0.2 }, onClick: () => setIsMobileMenuOpen(false), children: jsxRuntime.jsx(framerMotion.motion.div, { initial: { y: -20, opacity: 0 }, animate: { y: 0, opacity: 1 }, exit: { y: -20, opacity: 0 }, transition: { duration: 0.2 }, onClick: (e) => e.stopPropagation(), children: jsxRuntime.jsx("ul", { className: styles.navList, children: items.map((item, index) => renderNavItem(item, index)) }) }) })) })] }));
|
|
3156
3425
|
}
|
|
3157
|
-
return (jsxRuntime.
|
|
3426
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(framerMotion.motion.nav, { className: `${styles.navbar} ${styles[`navbar${variant.charAt(0).toUpperCase() + variant.slice(1)}`]} ${className}`, initial: variant === 'sidebar' ? { x: -300 } : { opacity: 0 }, animate: variant === 'sidebar' ? { x: 0 } : { opacity: 1 }, transition: { type: 'spring', stiffness: 300, damping: 30 }, children: navContent }) }));
|
|
3158
3427
|
};
|
|
3159
3428
|
|
|
3160
|
-
var styles$
|
|
3429
|
+
var styles$8 = {"container":"MoodChart-module_container__MB1Vr","chart":"MoodChart-module_chart__4-spu","gridLine":"MoodChart-module_gridLine__YJpZ8","line":"MoodChart-module_line__LfeUX","xAxis":"MoodChart-module_xAxis__SeIWG","yAxis":"MoodChart-module_yAxis__sRjjE","dataPoint":"MoodChart-module_dataPoint__112P1","tooltip":"MoodChart-module_tooltip__vW59y","tooltipHeader":"MoodChart-module_tooltipHeader__U7yvN","tooltipDate":"MoodChart-module_tooltipDate__6Jjeu","tooltipRating":"MoodChart-module_tooltipRating__5A2Yx","ratingValue":"MoodChart-module_ratingValue__7Gpfx","ratingMax":"MoodChart-module_ratingMax__10WcJ","tooltipTags":"MoodChart-module_tooltipTags__FUQrU","tag":"MoodChart-module_tag__QhCh5","tooltipComment":"MoodChart-module_tooltipComment__6driJ"};
|
|
3161
3430
|
|
|
3162
3431
|
const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
3163
3432
|
const svgRef = React.useRef(null);
|
|
@@ -3166,7 +3435,7 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
3166
3435
|
const [selectedMood, setSelectedMood] = React.useState(null);
|
|
3167
3436
|
const [tooltipPosition, setTooltipPosition] = React.useState({ x: 0, y: 0 });
|
|
3168
3437
|
const [isHoveringTooltip, setIsHoveringTooltip] = React.useState(false);
|
|
3169
|
-
const margin = { top: 20, right: 20, bottom: 50, left: 40 };
|
|
3438
|
+
const margin = React.useMemo(() => ({ top: 20, right: 20, bottom: 50, left: 40 }), []);
|
|
3170
3439
|
const chartWidth = width - margin.left - margin.right;
|
|
3171
3440
|
const chartHeight = height - margin.top - margin.bottom;
|
|
3172
3441
|
const processedData = React.useMemo(() => {
|
|
@@ -3215,27 +3484,27 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
3215
3484
|
g.selectAll('.grid-line-y')
|
|
3216
3485
|
.data(yScale.ticks(5))
|
|
3217
3486
|
.enter().append('line')
|
|
3218
|
-
.attr('class', styles$
|
|
3487
|
+
.attr('class', styles$8.gridLine)
|
|
3219
3488
|
.attr('x1', 0)
|
|
3220
3489
|
.attr('y1', d => yScale(d))
|
|
3221
3490
|
.attr('x2', chartWidth)
|
|
3222
3491
|
.attr('y2', d => yScale(d));
|
|
3223
3492
|
g.append('path')
|
|
3224
3493
|
.datum(processedData)
|
|
3225
|
-
.attr('class', styles$
|
|
3494
|
+
.attr('class', styles$8.line)
|
|
3226
3495
|
.attr('d', line);
|
|
3227
3496
|
g.append('g')
|
|
3228
|
-
.attr('class', styles$
|
|
3497
|
+
.attr('class', styles$8.xAxis)
|
|
3229
3498
|
.attr('transform', `translate(0,${chartHeight})`)
|
|
3230
3499
|
.call(d3__namespace.axisBottom(xScale)
|
|
3231
3500
|
.tickFormat(d => d3__namespace.timeFormat('%m/%d')(d)));
|
|
3232
3501
|
g.append('g')
|
|
3233
|
-
.attr('class', styles$
|
|
3502
|
+
.attr('class', styles$8.yAxis)
|
|
3234
3503
|
.call(d3__namespace.axisLeft(yScale));
|
|
3235
3504
|
g.selectAll('.mood-circle')
|
|
3236
3505
|
.data(processedData)
|
|
3237
3506
|
.enter().append('circle')
|
|
3238
|
-
.attr('class', styles$
|
|
3507
|
+
.attr('class', styles$8.dataPoint)
|
|
3239
3508
|
.attr('cx', d => xScale(d.date))
|
|
3240
3509
|
.attr('cy', d => yScale(d.rating))
|
|
3241
3510
|
.attr('r', 5)
|
|
@@ -3289,7 +3558,7 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
3289
3558
|
setSelectedMood(null);
|
|
3290
3559
|
};
|
|
3291
3560
|
}, []);
|
|
3292
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
3561
|
+
return (jsxRuntime.jsxs("div", { className: styles$8.container, ref: containerRef, children: [jsxRuntime.jsx("svg", { ref: svgRef, width: width, height: height, className: styles$8.chart }), selectedMood && (jsxRuntime.jsxs("div", { ref: tooltipRef, className: styles$8.tooltip, style: {
|
|
3293
3562
|
position: 'absolute',
|
|
3294
3563
|
pointerEvents: 'auto',
|
|
3295
3564
|
left: tooltipPosition.x,
|
|
@@ -3298,10 +3567,10 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
3298
3567
|
}, onMouseEnter: () => setIsHoveringTooltip(true), onMouseLeave: () => {
|
|
3299
3568
|
setIsHoveringTooltip(false);
|
|
3300
3569
|
setSelectedMood(null);
|
|
3301
|
-
}, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
3570
|
+
}, children: [jsxRuntime.jsxs("div", { className: styles$8.tooltipHeader, children: [jsxRuntime.jsx("div", { className: styles$8.tooltipDate, children: selectedMood.date.toLocaleDateString() }), jsxRuntime.jsxs("div", { className: styles$8.tooltipRating, children: [jsxRuntime.jsx("span", { className: styles$8.ratingValue, children: selectedMood.rating }), jsxRuntime.jsx("span", { className: styles$8.ratingMax, children: "/10" })] })] }), selectedMood.tags.length > 0 && (jsxRuntime.jsx("div", { className: styles$8.tooltipTags, children: selectedMood.tags.map((tag, index) => (jsxRuntime.jsx("span", { className: styles$8.tag, children: tag }, index))) })), selectedMood.comment && (jsxRuntime.jsx("div", { className: styles$8.tooltipComment, children: selectedMood.comment }))] }))] }));
|
|
3302
3571
|
};
|
|
3303
3572
|
|
|
3304
|
-
var styles$
|
|
3573
|
+
var styles$7 = {"container":"QuantifiableHabitsChart-module_container__X5SBp","controls":"QuantifiableHabitsChart-module_controls__O-ObQ","viewToggle":"QuantifiableHabitsChart-module_viewToggle__24hKA","viewButton":"QuantifiableHabitsChart-module_viewButton__WFU6j","active":"QuantifiableHabitsChart-module_active__Pjqy9","viewIcon":"QuantifiableHabitsChart-module_viewIcon__b2mfk","viewLabel":"QuantifiableHabitsChart-module_viewLabel__9MjCU","aggregationToggle":"QuantifiableHabitsChart-module_aggregationToggle__WnxwB","aggregationButton":"QuantifiableHabitsChart-module_aggregationButton__sGCxX","aggregationIcon":"QuantifiableHabitsChart-module_aggregationIcon__HIaEf","aggregationLabel":"QuantifiableHabitsChart-module_aggregationLabel__Yc-S-","legend":"QuantifiableHabitsChart-module_legend__3Ki7c","compactLegend":"QuantifiableHabitsChart-module_compactLegend__jMpLB","legendItem":"QuantifiableHabitsChart-module_legendItem__Zl7fz","legendEmoji":"QuantifiableHabitsChart-module_legendEmoji__HG9CZ","legendLabel":"QuantifiableHabitsChart-module_legendLabel__H3oFL","inactive":"QuantifiableHabitsChart-module_inactive__TzZC-","legendColor":"QuantifiableHabitsChart-module_legendColor__zbPoV","chart":"QuantifiableHabitsChart-module_chart__FMeA-","gridLine":"QuantifiableHabitsChart-module_gridLine__CTNIq","line":"QuantifiableHabitsChart-module_line__CpYip","xAxis":"QuantifiableHabitsChart-module_xAxis__lbgBG","yAxis":"QuantifiableHabitsChart-module_yAxis__Y6WeV","dataPoint":"QuantifiableHabitsChart-module_dataPoint__s8UMX","tooltip":"QuantifiableHabitsChart-module_tooltip__Fay8N","visible":"QuantifiableHabitsChart-module_visible__-KSJq","tooltipHeader":"QuantifiableHabitsChart-module_tooltipHeader__7Q2up","tooltipEmoji":"QuantifiableHabitsChart-module_tooltipEmoji__atV3T","tooltipDot":"QuantifiableHabitsChart-module_tooltipDot__YbdFh","tooltipInfo":"QuantifiableHabitsChart-module_tooltipInfo__XC7WF","tooltipDate":"QuantifiableHabitsChart-module_tooltipDate__6V6Xi","tooltipValue":"QuantifiableHabitsChart-module_tooltipValue__ldASB"};
|
|
3305
3574
|
|
|
3306
3575
|
// Default colors as fallback
|
|
3307
3576
|
const DEFAULT_HABIT_COLORS = {
|
|
@@ -3314,7 +3583,7 @@ const DEFAULT_HABIT_COLORS = {
|
|
|
3314
3583
|
'Calories': '#FF9F1C',
|
|
3315
3584
|
'Study': '#C774E8'
|
|
3316
3585
|
};
|
|
3317
|
-
const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewType = 'daily', periodType = 'month', habitColors: customHabitColors = {}, habitEmojis: customHabitEmojis = {}, onDataPointClick }) => {
|
|
3586
|
+
const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewType = 'daily', periodType = 'month', habitColors: customHabitColors = {}, habitEmojis: customHabitEmojis = {}, onDataPointClick, hideControls = false, compactLegend = false }) => {
|
|
3318
3587
|
const svgRef = React.useRef(null);
|
|
3319
3588
|
const tooltipRef = React.useRef(null);
|
|
3320
3589
|
const [viewType, setViewType] = React.useState(defaultViewType);
|
|
@@ -3322,7 +3591,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
3322
3591
|
const [hoveredHabit, setHoveredHabit] = React.useState(null);
|
|
3323
3592
|
const [tooltipData, setTooltipData] = React.useState(null);
|
|
3324
3593
|
const [aggregationMode, setAggregationMode] = React.useState('average');
|
|
3325
|
-
const margin = { top: 20, right: 20, bottom: 50, left: 50 };
|
|
3594
|
+
const margin = React.useMemo(() => ({ top: 20, right: 20, bottom: 50, left: 50 }), []);
|
|
3326
3595
|
const chartWidth = width - margin.left - margin.right;
|
|
3327
3596
|
const chartHeight = height - margin.top - margin.bottom;
|
|
3328
3597
|
const habits = React.useMemo(() => Object.keys(data).filter(key => key !== 'dates'), [data]);
|
|
@@ -3355,10 +3624,10 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
3355
3624
|
return ['daily'];
|
|
3356
3625
|
}
|
|
3357
3626
|
}, [periodType]);
|
|
3358
|
-
const getColor = (habit) => {
|
|
3627
|
+
const getColor = React.useCallback((habit) => {
|
|
3359
3628
|
// First check custom colors, then defaults, then generate deterministic color
|
|
3360
3629
|
return customHabitColors[habit] || DEFAULT_HABIT_COLORS[habit] || `hsl(${Math.abs(habit.split('').reduce((a, b) => a + b.charCodeAt(0), 0)) % 360}, 70%, 50%)`;
|
|
3361
|
-
};
|
|
3630
|
+
}, [customHabitColors]);
|
|
3362
3631
|
// Aggregate data based on view type
|
|
3363
3632
|
const aggregateData = React.useMemo(() => {
|
|
3364
3633
|
if (viewType === 'daily' || !data.dates.length) {
|
|
@@ -3454,7 +3723,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
3454
3723
|
g.selectAll('.grid-line-y')
|
|
3455
3724
|
.data(yScale.ticks(5))
|
|
3456
3725
|
.enter().append('line')
|
|
3457
|
-
.attr('class', styles$
|
|
3726
|
+
.attr('class', styles$7.gridLine)
|
|
3458
3727
|
.attr('x1', 0)
|
|
3459
3728
|
.attr('y1', d => yScale(d))
|
|
3460
3729
|
.attr('x2', chartWidth)
|
|
@@ -3467,7 +3736,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
3467
3736
|
const habitData = dates.map((date, i) => [date, aggregateData[habit][i]]).filter(d => typeof d[1] === 'number');
|
|
3468
3737
|
g.append('path')
|
|
3469
3738
|
.datum(habitData)
|
|
3470
|
-
.attr('class', styles$
|
|
3739
|
+
.attr('class', styles$7.line)
|
|
3471
3740
|
.attr('d', line)
|
|
3472
3741
|
.attr('stroke', getColor(habit))
|
|
3473
3742
|
.attr('opacity', hoveredHabit && hoveredHabit !== habit ? 0.3 : 1);
|
|
@@ -3514,7 +3783,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
3514
3783
|
g.selectAll(`.circle-${habit}`)
|
|
3515
3784
|
.data(habitData)
|
|
3516
3785
|
.enter().append('circle')
|
|
3517
|
-
.attr('class', (_d, i) => `${styles$
|
|
3786
|
+
.attr('class', (_d, i) => `${styles$7.dataPoint} circle-${habit}-${i}`)
|
|
3518
3787
|
.attr('cx', d => xScale(d[0]))
|
|
3519
3788
|
.attr('cy', d => yScale(d[1]))
|
|
3520
3789
|
.attr('r', 4)
|
|
@@ -3576,7 +3845,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
3576
3845
|
xAxisGenerator.ticks(tickCount);
|
|
3577
3846
|
}
|
|
3578
3847
|
const xAxis = g.append('g')
|
|
3579
|
-
.attr('class', styles$
|
|
3848
|
+
.attr('class', styles$7.xAxis)
|
|
3580
3849
|
.attr('transform', `translate(0,${chartHeight})`)
|
|
3581
3850
|
.call(xAxisGenerator);
|
|
3582
3851
|
// Rotate labels for better readability if needed
|
|
@@ -3588,9 +3857,9 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
3588
3857
|
.attr('transform', 'rotate(-45)');
|
|
3589
3858
|
}
|
|
3590
3859
|
g.append('g')
|
|
3591
|
-
.attr('class', styles$
|
|
3860
|
+
.attr('class', styles$7.yAxis)
|
|
3592
3861
|
.call(d3__namespace.axisLeft(yScale));
|
|
3593
|
-
}, [aggregateData, activeHabits, chartWidth, chartHeight, margin, hoveredHabit,
|
|
3862
|
+
}, [aggregateData, activeHabits, chartWidth, chartHeight, margin, hoveredHabit, onDataPointClick, getColor, height, viewType, width]);
|
|
3594
3863
|
// Format date for tooltip display
|
|
3595
3864
|
const formatTooltipDate = (dateStr, viewType) => {
|
|
3596
3865
|
const date = new Date(dateStr);
|
|
@@ -3620,13 +3889,13 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
3620
3889
|
quarterly: { icon: '📊', label: 'Quarterly' }
|
|
3621
3890
|
};
|
|
3622
3891
|
const shouldShowAggregationToggle = viewType !== 'daily';
|
|
3623
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
3892
|
+
return (jsxRuntime.jsxs("div", { className: styles$7.container, children: [!hideControls && (jsxRuntime.jsxs("div", { className: styles$7.controls, children: [jsxRuntime.jsx("div", { className: styles$7.viewToggle, children: availableViewTypes.map(type => (jsxRuntime.jsxs("button", { className: `${styles$7.viewButton} ${viewType === type ? styles$7.active : ''}`, onClick: () => setViewType(type), title: viewTypeConfig[type].label, children: [jsxRuntime.jsx("span", { className: styles$7.viewIcon, children: viewTypeConfig[type].icon }), jsxRuntime.jsx("span", { className: styles$7.viewLabel, children: viewTypeConfig[type].label })] }, type))) }), shouldShowAggregationToggle && (jsxRuntime.jsxs("div", { className: styles$7.aggregationToggle, children: [jsxRuntime.jsxs("button", { className: `${styles$7.aggregationButton} ${aggregationMode === 'average' ? styles$7.active : ''}`, onClick: () => setAggregationMode('average'), title: "Show average values for each period", children: [jsxRuntime.jsx("span", { className: styles$7.aggregationIcon, children: "\uD83D\uDCCA" }), jsxRuntime.jsx("span", { className: styles$7.aggregationLabel, children: "Average" })] }), jsxRuntime.jsxs("button", { className: `${styles$7.aggregationButton} ${aggregationMode === 'sum' ? styles$7.active : ''}`, onClick: () => setAggregationMode('sum'), title: "Show total values for each period", children: [jsxRuntime.jsx("span", { className: styles$7.aggregationIcon, children: "\u2795" }), jsxRuntime.jsx("span", { className: styles$7.aggregationLabel, children: "Sum" })] })] }))] })), jsxRuntime.jsx("div", { className: `${styles$7.legend}${compactLegend ? ` ${styles$7.compactLegend}` : ''}`, children: habits.map(habit => (jsxRuntime.jsxs("button", { className: `${styles$7.legendItem} ${!activeHabits.includes(habit) ? styles$7.inactive : ''}`, onClick: () => toggleHabit(habit), onMouseEnter: () => setHoveredHabit(habit), onMouseLeave: () => setHoveredHabit(null), children: [jsxRuntime.jsx("span", { className: styles$7.legendEmoji, children: customHabitEmojis[habit] || '📊' }), jsxRuntime.jsx("span", { className: styles$7.legendColor, style: { backgroundColor: getColor(habit) } }), jsxRuntime.jsx("span", { className: styles$7.legendLabel, children: habit })] }, habit))) }), jsxRuntime.jsx("svg", { ref: svgRef, width: width, height: height, className: styles$7.chart }), tooltipData && (jsxRuntime.jsxs("div", { ref: tooltipRef, className: `${styles$7.tooltip} ${tooltipData ? styles$7.visible : ''}`, style: {
|
|
3624
3893
|
left: `${tooltipData.x}px`,
|
|
3625
3894
|
top: `${tooltipData.y - 80}px`
|
|
3626
|
-
}, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
3895
|
+
}, children: [jsxRuntime.jsxs("div", { className: styles$7.tooltipHeader, children: [jsxRuntime.jsx("span", { className: styles$7.tooltipEmoji, children: customHabitEmojis[tooltipData.habit] || '📊' }), jsxRuntime.jsx("span", { className: styles$7.tooltipDot, style: { backgroundColor: getColor(tooltipData.habit) } }), jsxRuntime.jsx("span", { children: tooltipData.habit })] }), jsxRuntime.jsxs("div", { className: styles$7.tooltipInfo, children: [jsxRuntime.jsx("div", { className: styles$7.tooltipDate, children: formatTooltipDate(tooltipData.date, viewType) }), jsxRuntime.jsxs("div", { className: styles$7.tooltipValue, children: [jsxRuntime.jsx("strong", { children: Math.round(tooltipData.value * 10) / 10 }), jsxRuntime.jsx("span", { style: { fontSize: '12px', fontWeight: 'normal', opacity: 0.6 }, children: "units" })] })] })] }))] }));
|
|
3627
3896
|
};
|
|
3628
3897
|
|
|
3629
|
-
var styles$
|
|
3898
|
+
var styles$6 = {"container":"SleepChart-module_container__RjHVU","header":"SleepChart-module_header__bcoWe","title":"SleepChart-module_title__6-QII","legend":"SleepChart-module_legend__VsqQj","legendItem":"SleepChart-module_legendItem__2c1nd","sleepDot":"SleepChart-module_sleepDot__qCY6O","wakeDot":"SleepChart-module_wakeDot__-RcrT","chart":"SleepChart-module_chart__jC1nL","gridLine":"SleepChart-module_gridLine__hi715","sleepBar":"SleepChart-module_sleepBar__Hk76f","xAxis":"SleepChart-module_xAxis__xzXyM","yAxis":"SleepChart-module_yAxis__7N-LA","tooltip":"SleepChart-module_tooltip__jQBv1","visible":"SleepChart-module_visible__wy0ck","tooltipHeader":"SleepChart-module_tooltipHeader__5BdPL","tooltipEmoji":"SleepChart-module_tooltipEmoji__c5vtz","tooltipInfo":"SleepChart-module_tooltipInfo__9Yrno","tooltipRow":"SleepChart-module_tooltipRow__CuDaE","tooltipLabel":"SleepChart-module_tooltipLabel__7SNzQ","tooltipValue":"SleepChart-module_tooltipValue__FoAVy","tooltipDuration":"SleepChart-module_tooltipDuration__d2wBW"};
|
|
3630
3899
|
|
|
3631
3900
|
const parseTimeToDecimal = (time) => {
|
|
3632
3901
|
const [hours, minutes] = time.split(':').map(Number);
|
|
@@ -3684,7 +3953,7 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick }) => {
|
|
|
3684
3953
|
g.selectAll('.grid-line-x')
|
|
3685
3954
|
.data(d3__namespace.range(18, 43, 1))
|
|
3686
3955
|
.enter().append('line')
|
|
3687
|
-
.attr('class', styles$
|
|
3956
|
+
.attr('class', styles$6.gridLine)
|
|
3688
3957
|
.attr('x1', d => xScale(d))
|
|
3689
3958
|
.attr('y1', 0)
|
|
3690
3959
|
.attr('x2', d => xScale(d))
|
|
@@ -3717,7 +3986,7 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick }) => {
|
|
|
3717
3986
|
return;
|
|
3718
3987
|
const barHeight = yScale.bandwidth();
|
|
3719
3988
|
const sleepGroup = g.append('g')
|
|
3720
|
-
.attr('class', styles$
|
|
3989
|
+
.attr('class', styles$6.sleepBar)
|
|
3721
3990
|
.style('cursor', 'pointer')
|
|
3722
3991
|
.on('click', () => onDateClick?.(dayData.date));
|
|
3723
3992
|
// Handle sleep time and wake hour separately
|
|
@@ -3883,7 +4152,7 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick }) => {
|
|
|
3883
4152
|
(hour % 24) === 12 ? '12 PM' : `${(hour % 24) - 12} PM`
|
|
3884
4153
|
}));
|
|
3885
4154
|
const xAxis = g.append('g')
|
|
3886
|
-
.attr('class', styles$
|
|
4155
|
+
.attr('class', styles$6.xAxis)
|
|
3887
4156
|
.attr('transform', `translate(0,${chartHeight})`)
|
|
3888
4157
|
.call(d3__namespace.axisBottom(xScale)
|
|
3889
4158
|
.tickValues(xAxisTicks.map(t => t.value))
|
|
@@ -3900,25 +4169,25 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick }) => {
|
|
|
3900
4169
|
});
|
|
3901
4170
|
const yAxisTicks = yDomain.filter((_, i) => i % Math.ceil(yDomain.length / 10) === 0);
|
|
3902
4171
|
g.append('g')
|
|
3903
|
-
.attr('class', styles$
|
|
4172
|
+
.attr('class', styles$6.yAxis)
|
|
3904
4173
|
.call(d3__namespace.axisLeft(yScale)
|
|
3905
4174
|
.tickValues(yAxisTicks)
|
|
3906
4175
|
.tickFormat(d => {
|
|
3907
4176
|
const date = new Date(d);
|
|
3908
4177
|
return `${(date.getMonth() + 1).toString().padStart(2, '0')}/${date.getDate().toString().padStart(2, '0')}`;
|
|
3909
4178
|
}));
|
|
3910
|
-
}, [sleepData, chartWidth, chartHeight, margin, onDateClick]);
|
|
3911
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
4179
|
+
}, [sleepData, chartWidth, chartHeight, margin, onDateClick, height, width]);
|
|
4180
|
+
return (jsxRuntime.jsxs("div", { className: styles$6.container, children: [jsxRuntime.jsxs("div", { className: styles$6.header, children: [jsxRuntime.jsx("h3", { className: styles$6.title, children: "Sleep Pattern" }), jsxRuntime.jsxs("div", { className: styles$6.legend, children: [jsxRuntime.jsxs("div", { className: styles$6.legendItem, children: [jsxRuntime.jsx("span", { className: styles$6.sleepDot }), jsxRuntime.jsx("span", { children: "Sleep Time" })] }), jsxRuntime.jsxs("div", { className: styles$6.legendItem, children: [jsxRuntime.jsx("span", { className: styles$6.wakeDot }), jsxRuntime.jsx("span", { children: "Wake Time" })] })] })] }), jsxRuntime.jsx("svg", { ref: svgRef, width: width, height: height, className: styles$6.chart }), tooltipData && (jsxRuntime.jsxs("div", { className: `${styles$6.tooltip} ${tooltipData ? styles$6.visible : ''}`, style: {
|
|
3912
4181
|
left: `${tooltipData.x}px`,
|
|
3913
4182
|
top: `${tooltipData.y}px`
|
|
3914
|
-
}, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
4183
|
+
}, children: [jsxRuntime.jsxs("div", { className: styles$6.tooltipHeader, children: [jsxRuntime.jsx("span", { className: styles$6.tooltipEmoji, children: "\uD83D\uDE34" }), jsxRuntime.jsx("span", { children: new Date(tooltipData.date).toLocaleDateString('en-US', {
|
|
3915
4184
|
weekday: 'short',
|
|
3916
4185
|
month: 'short',
|
|
3917
4186
|
day: 'numeric'
|
|
3918
|
-
}) })] }), jsxRuntime.jsxs("div", { className: styles$
|
|
4187
|
+
}) })] }), jsxRuntime.jsxs("div", { className: styles$6.tooltipInfo, children: [tooltipData.sleepTime && (jsxRuntime.jsxs("div", { className: styles$6.tooltipRow, children: [jsxRuntime.jsxs("span", { className: styles$6.tooltipLabel, children: [jsxRuntime.jsx("span", { children: "\uD83C\uDF19" }), jsxRuntime.jsx("span", { children: "Sleep:" })] }), jsxRuntime.jsx("span", { className: styles$6.tooltipValue, children: tooltipData.sleepTime })] })), tooltipData.wakeTime && (jsxRuntime.jsxs("div", { className: styles$6.tooltipRow, children: [jsxRuntime.jsxs("span", { className: styles$6.tooltipLabel, children: [jsxRuntime.jsx("span", { children: "\u2600\uFE0F" }), jsxRuntime.jsx("span", { children: "Wake:" })] }), jsxRuntime.jsx("span", { className: styles$6.tooltipValue, children: tooltipData.wakeTime })] })), tooltipData.duration !== null && (jsxRuntime.jsxs("div", { className: styles$6.tooltipDuration, children: [jsxRuntime.jsx("span", { children: "\u23F1\uFE0F" }), jsxRuntime.jsxs("span", { children: [Math.floor(tooltipData.duration), "h ", Math.round((tooltipData.duration % 1) * 60), "m"] })] }))] })] }))] }));
|
|
3919
4188
|
};
|
|
3920
4189
|
|
|
3921
|
-
var styles$
|
|
4190
|
+
var styles$5 = {"container":"BooleansHeatmap-module_container__IOyeU","title":"BooleansHeatmap-module_title__8DRRQ","habitEmoji":"BooleansHeatmap-module_habitEmoji__Mawv-","chart":"BooleansHeatmap-module_chart__-q0Pc","monthLabel":"BooleansHeatmap-module_monthLabel__MXbIg","dayLabel":"BooleansHeatmap-module_dayLabel__2RRtm","cell":"BooleansHeatmap-module_cell__WADVB","legend":"BooleansHeatmap-module_legend__WqGF8","legendItem":"BooleansHeatmap-module_legendItem__rDE2g","legendColor":"BooleansHeatmap-module_legendColor__Z34-d","tooltip":"BooleansHeatmap-module_tooltip__-fHl7"};
|
|
3922
4191
|
|
|
3923
4192
|
const DAYS_OF_WEEK = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
|
|
3924
4193
|
const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
@@ -3972,20 +4241,20 @@ const BooleansHeatmap = ({ data, habitName, width = 800, height = 200, habitColo
|
|
|
3972
4241
|
g.append('text')
|
|
3973
4242
|
.attr('x', weekIndex * (cellSize + cellGap))
|
|
3974
4243
|
.attr('y', -10)
|
|
3975
|
-
.attr('class', styles$
|
|
4244
|
+
.attr('class', styles$5.monthLabel)
|
|
3976
4245
|
.text(MONTHS[month]);
|
|
3977
4246
|
});
|
|
3978
4247
|
DAYS_OF_WEEK.forEach((day, index) => {
|
|
3979
4248
|
g.append('text')
|
|
3980
4249
|
.attr('x', -10)
|
|
3981
4250
|
.attr('y', index * (cellSize + cellGap) + cellSize / 2)
|
|
3982
|
-
.attr('class', styles$
|
|
4251
|
+
.attr('class', styles$5.dayLabel)
|
|
3983
4252
|
.attr('text-anchor', 'end')
|
|
3984
4253
|
.attr('alignment-baseline', 'middle')
|
|
3985
4254
|
.text(day);
|
|
3986
4255
|
});
|
|
3987
4256
|
const tooltip = d3__namespace.select('body').append('div')
|
|
3988
|
-
.attr('class', styles$
|
|
4257
|
+
.attr('class', styles$5.tooltip)
|
|
3989
4258
|
.style('opacity', 0)
|
|
3990
4259
|
.style('position', 'absolute');
|
|
3991
4260
|
const daysToShow = weeksToShow * 7;
|
|
@@ -4004,7 +4273,7 @@ const BooleansHeatmap = ({ data, habitName, width = 800, height = 200, habitColo
|
|
|
4004
4273
|
.attr('width', cellSize)
|
|
4005
4274
|
.attr('height', cellSize)
|
|
4006
4275
|
.attr('rx', 3)
|
|
4007
|
-
.attr('class', styles$
|
|
4276
|
+
.attr('class', styles$5.cell)
|
|
4008
4277
|
.attr('data-date', dateString)
|
|
4009
4278
|
.attr('data-value', isTrue ? 'true' : 'false')
|
|
4010
4279
|
.style('fill', isTrue ? habitColor : '#4D4D4DFF');
|
|
@@ -4032,10 +4301,10 @@ const BooleansHeatmap = ({ data, habitName, width = 800, height = 200, habitColo
|
|
|
4032
4301
|
tooltip.remove();
|
|
4033
4302
|
};
|
|
4034
4303
|
}, [data, habitName, width, height, startDate, endDate, weeksToShow, habitColor, habitEmoji]);
|
|
4035
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
4304
|
+
return (jsxRuntime.jsxs("div", { className: styles$5.container, children: [jsxRuntime.jsxs("h3", { className: styles$5.title, children: [jsxRuntime.jsx("span", { className: styles$5.habitEmoji, children: habitEmoji }), habitName] }), jsxRuntime.jsx("svg", { ref: svgRef, width: width, height: height, className: styles$5.chart }), jsxRuntime.jsxs("div", { className: styles$5.legend, children: [jsxRuntime.jsxs("span", { className: styles$5.legendItem, children: [jsxRuntime.jsx("span", { className: styles$5.legendColor, style: { backgroundColor: habitColor } }), "Done"] }), jsxRuntime.jsxs("span", { className: styles$5.legendItem, children: [jsxRuntime.jsx("span", { className: styles$5.legendColor, style: { backgroundColor: '#4D4D4DFF' } }), "Not done"] })] })] }));
|
|
4036
4305
|
};
|
|
4037
4306
|
|
|
4038
|
-
var styles$
|
|
4307
|
+
var styles$4 = {"container":"SunburstChart-module_container__w1ZYc","title":"SunburstChart-module_title__T6Ak7","chart":"SunburstChart-module_chart__BFM6E","tooltip":"SunburstChart-module_tooltip__TuTAN"};
|
|
4039
4308
|
|
|
4040
4309
|
const COLOR_PALETTE = [
|
|
4041
4310
|
'#6366f1', '#8b5cf6', '#06b6d4', '#10b981',
|
|
@@ -4062,6 +4331,15 @@ const getTextColor$1 = (backgroundColor) => {
|
|
|
4062
4331
|
// Use a threshold of 0.5 for better contrast
|
|
4063
4332
|
return luminance > 0.5 ? '#000000' : '#ffffff';
|
|
4064
4333
|
};
|
|
4334
|
+
// Helper to create an interpolated arc generator for transitions
|
|
4335
|
+
const createInterpolatedArc = (currX0, currX1, currY0, currY1, radius) => {
|
|
4336
|
+
return d3__namespace.arc()
|
|
4337
|
+
.startAngle(() => currX0)
|
|
4338
|
+
.endAngle(() => currX1)
|
|
4339
|
+
.innerRadius(() => Math.min(radius, Math.sqrt(Math.max(0, currY0))))
|
|
4340
|
+
.outerRadius(() => Math.min(radius, Math.sqrt(Math.max(0, currY1))))
|
|
4341
|
+
.cornerRadius(3);
|
|
4342
|
+
};
|
|
4065
4343
|
const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Chart', tagColors = {}, unit = 'items', centerLabel }) => {
|
|
4066
4344
|
const svgRef = React.useRef(null);
|
|
4067
4345
|
const colorMap = React.useRef(new Map()).current;
|
|
@@ -4102,6 +4380,7 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
4102
4380
|
const partition = d3__namespace.partition()
|
|
4103
4381
|
.size([2 * Math.PI, radius * radius]);
|
|
4104
4382
|
const nodes = partition(root).descendants();
|
|
4383
|
+
// Store original positions for reset
|
|
4105
4384
|
nodes.forEach((d) => {
|
|
4106
4385
|
const node = d;
|
|
4107
4386
|
node.x0Original = d.x0;
|
|
@@ -4116,7 +4395,7 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
4116
4395
|
.outerRadius(d => Math.sqrt(d.y1))
|
|
4117
4396
|
.cornerRadius(3);
|
|
4118
4397
|
const tooltip = d3__namespace.select('body').append('div')
|
|
4119
|
-
.attr('class', styles$
|
|
4398
|
+
.attr('class', styles$4.tooltip)
|
|
4120
4399
|
.style('opacity', 0)
|
|
4121
4400
|
.style('position', 'absolute');
|
|
4122
4401
|
// Function to reset to original view
|
|
@@ -4141,12 +4420,7 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
4141
4420
|
node.x1 = currX1;
|
|
4142
4421
|
node.y0 = currY0;
|
|
4143
4422
|
node.y1 = currY1;
|
|
4144
|
-
const interpolatedArc =
|
|
4145
|
-
.startAngle(() => currX0)
|
|
4146
|
-
.endAngle(() => currX1)
|
|
4147
|
-
.innerRadius(() => Math.min(radius, Math.sqrt(Math.max(0, currY0))))
|
|
4148
|
-
.outerRadius(() => Math.min(radius, Math.sqrt(Math.max(0, currY1))))
|
|
4149
|
-
.cornerRadius(3);
|
|
4423
|
+
const interpolatedArc = createInterpolatedArc(currX0, currX1, currY0, currY1, radius);
|
|
4150
4424
|
return interpolatedArc(node) || '';
|
|
4151
4425
|
};
|
|
4152
4426
|
});
|
|
@@ -4202,7 +4476,7 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
4202
4476
|
}
|
|
4203
4477
|
// Calculate new positions based on the original positions
|
|
4204
4478
|
// ALWAYS scale to fill the full circle, no minimum size preservation
|
|
4205
|
-
|
|
4479
|
+
const newX0 = xScale(node.x0Original);
|
|
4206
4480
|
let newX1 = xScale(node.x1Original);
|
|
4207
4481
|
// Ensure proper scaling even for very small segments
|
|
4208
4482
|
// The clicked node's extent should always map to full circle
|
|
@@ -4247,12 +4521,7 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
4247
4521
|
node.x1 = currX1;
|
|
4248
4522
|
node.y0 = currY0;
|
|
4249
4523
|
node.y1 = currY1;
|
|
4250
|
-
const interpolatedArc =
|
|
4251
|
-
.startAngle(() => currX0)
|
|
4252
|
-
.endAngle(() => currX1)
|
|
4253
|
-
.innerRadius(() => Math.min(radius, Math.sqrt(Math.max(0, currY0))))
|
|
4254
|
-
.outerRadius(() => Math.min(radius, Math.sqrt(Math.max(0, currY1))))
|
|
4255
|
-
.cornerRadius(3);
|
|
4524
|
+
const interpolatedArc = createInterpolatedArc(currX0, currX1, currY0, currY1, radius);
|
|
4256
4525
|
return interpolatedArc(node) || '';
|
|
4257
4526
|
};
|
|
4258
4527
|
});
|
|
@@ -4278,7 +4547,7 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
4278
4547
|
const paths = g.selectAll('path')
|
|
4279
4548
|
.data(nodes.filter(d => d.depth > 0 && d.value && d.value > 0))
|
|
4280
4549
|
.enter().append('path')
|
|
4281
|
-
.attr('d', arc)
|
|
4550
|
+
.attr('d', d => arc(d) || '')
|
|
4282
4551
|
.attr('fill', d => {
|
|
4283
4552
|
let ancestor = d;
|
|
4284
4553
|
while (ancestor.depth > 1 && ancestor.parent) {
|
|
@@ -4299,7 +4568,7 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
4299
4568
|
if (focusedNodeRef.current) {
|
|
4300
4569
|
return;
|
|
4301
4570
|
}
|
|
4302
|
-
const hoveredElement =
|
|
4571
|
+
const hoveredElement = event.currentTarget;
|
|
4303
4572
|
// Show tooltip for all nodes
|
|
4304
4573
|
tooltip.transition()
|
|
4305
4574
|
.duration(200)
|
|
@@ -4545,11 +4814,11 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
4545
4814
|
return () => {
|
|
4546
4815
|
tooltip.remove();
|
|
4547
4816
|
};
|
|
4548
|
-
}, [data, width, height, colorMap, radius, tagColors, unit, centerLabel]);
|
|
4549
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
4817
|
+
}, [data, width, height, colorMap, radius, tagColors, unit, centerLabel, getColor]);
|
|
4818
|
+
return (jsxRuntime.jsxs("div", { className: styles$4.container, children: [jsxRuntime.jsx("h3", { className: styles$4.title, children: title }), jsxRuntime.jsx("svg", { ref: svgRef, width: width, height: height, className: styles$4.chart })] }));
|
|
4550
4819
|
};
|
|
4551
4820
|
|
|
4552
|
-
var styles$
|
|
4821
|
+
var styles$3 = {"container":"PieChart-module_container__tXjbe","title":"PieChart-module_title__61o0R","chartContainer":"PieChart-module_chartContainer__uLmOz","chart":"PieChart-module_chart__3nqON","legend":"PieChart-module_legend__rAWgh","legendItem":"PieChart-module_legendItem__Nb031","legendColor":"PieChart-module_legendColor__fLuv9","legendLabel":"PieChart-module_legendLabel__xbjBr","legendValue":"PieChart-module_legendValue__h2WS2","tooltip":"PieChart-module_tooltip__140RU"};
|
|
4553
4822
|
|
|
4554
4823
|
const DEFAULT_COLORS = [
|
|
4555
4824
|
'#6366f1', '#8b5cf6', '#06b6d4', '#10b981',
|
|
@@ -4589,7 +4858,7 @@ const PieChart = ({ data, width = 400, height = 400, title = 'Distribution', sho
|
|
|
4589
4858
|
.innerRadius(radius * 0.7)
|
|
4590
4859
|
.outerRadius(radius * 0.7);
|
|
4591
4860
|
const tooltip = d3__namespace.select('body').append('div')
|
|
4592
|
-
.attr('class', styles$
|
|
4861
|
+
.attr('class', styles$3.tooltip)
|
|
4593
4862
|
.style('opacity', 0)
|
|
4594
4863
|
.style('position', 'absolute');
|
|
4595
4864
|
const pieData = pie(data);
|
|
@@ -4613,7 +4882,7 @@ const PieChart = ({ data, width = 400, height = 400, title = 'Distribution', sho
|
|
|
4613
4882
|
d3__namespace.select(this)
|
|
4614
4883
|
.transition()
|
|
4615
4884
|
.duration(200)
|
|
4616
|
-
.attr('d', d => hoverArc(d))
|
|
4885
|
+
.attr('d', (d) => hoverArc(d))
|
|
4617
4886
|
.style('filter', 'drop-shadow(0 4px 12px rgba(0,0,0,0.25))');
|
|
4618
4887
|
tooltip.transition()
|
|
4619
4888
|
.duration(200)
|
|
@@ -4627,18 +4896,21 @@ const PieChart = ({ data, width = 400, height = 400, title = 'Distribution', sho
|
|
|
4627
4896
|
.style('left', (event.pageX + 10) + 'px')
|
|
4628
4897
|
.style('top', (event.pageY - 28) + 'px');
|
|
4629
4898
|
})
|
|
4630
|
-
.on('mouseout', function (
|
|
4899
|
+
.on('mouseout', function (_event, _d) {
|
|
4631
4900
|
d3__namespace.select(this)
|
|
4632
4901
|
.transition()
|
|
4633
4902
|
.duration(200)
|
|
4634
|
-
.attr('d', d => arc(d))
|
|
4903
|
+
.attr('d', (d) => arc(d))
|
|
4635
4904
|
.style('filter', 'drop-shadow(0 2px 8px rgba(0,0,0,0.15))');
|
|
4636
4905
|
tooltip.transition()
|
|
4637
4906
|
.duration(500)
|
|
4638
4907
|
.style('opacity', 0);
|
|
4639
4908
|
});
|
|
4640
4909
|
// Calculate average background color for center text contrast
|
|
4641
|
-
const
|
|
4910
|
+
const colors = data.map((d, i) => d.color || DEFAULT_COLORS[i % DEFAULT_COLORS.length]);
|
|
4911
|
+
const avgColor = colors.length >= 2
|
|
4912
|
+
? d3__namespace.interpolateRgb.gamma(2.2)(colors[0], colors[1])(0.5)
|
|
4913
|
+
: colors[0] || '#ffffff';
|
|
4642
4914
|
const centerTextColor = getTextColor(avgColor);
|
|
4643
4915
|
// Add center text for donut
|
|
4644
4916
|
g.append('text')
|
|
@@ -4684,13 +4956,13 @@ const PieChart = ({ data, width = 400, height = 400, title = 'Distribution', sho
|
|
|
4684
4956
|
return () => {
|
|
4685
4957
|
tooltip.remove();
|
|
4686
4958
|
};
|
|
4687
|
-
}, [data, width, height, radius]);
|
|
4688
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
4959
|
+
}, [data, width, height, radius, centerLabel, unit]);
|
|
4960
|
+
return (jsxRuntime.jsxs("div", { className: styles$3.container, children: [jsxRuntime.jsx("h3", { className: styles$3.title, children: title }), jsxRuntime.jsxs("div", { className: styles$3.chartContainer, children: [jsxRuntime.jsx("svg", { ref: svgRef, width: width, height: height, className: styles$3.chart }), showLegend && (jsxRuntime.jsx("div", { className: styles$3.legend, children: data.map((item, index) => (jsxRuntime.jsxs("div", { className: styles$3.legendItem, children: [jsxRuntime.jsx("span", { className: styles$3.legendColor, style: {
|
|
4689
4961
|
backgroundColor: item.color || DEFAULT_COLORS[index % DEFAULT_COLORS.length]
|
|
4690
|
-
} }), jsxRuntime.jsx("span", { className: styles$
|
|
4962
|
+
} }), jsxRuntime.jsx("span", { className: styles$3.legendLabel, children: item.name }), jsxRuntime.jsx("span", { className: styles$3.legendValue, children: item.value.toLocaleString() })] }, item.name))) }))] })] }));
|
|
4691
4963
|
};
|
|
4692
4964
|
|
|
4693
|
-
var styles$
|
|
4965
|
+
var styles$2 = {"slideshow":"ImageSlideshow-module_slideshow__Ku43h","fullscreen":"ImageSlideshow-module_fullscreen__YhVju","empty":"ImageSlideshow-module_empty__XaCpW","emptyState":"ImageSlideshow-module_emptyState__caEwx","mainContainer":"ImageSlideshow-module_mainContainer__E9aZ3","slide":"ImageSlideshow-module_slide__Wt0U-","image":"ImageSlideshow-module_image__aLHJX","imageLoader":"ImageSlideshow-module_imageLoader__5oAf5","spinner":"ImageSlideshow-module_spinner__fmIFu","control":"ImageSlideshow-module_control__WF7Lz","controlPrev":"ImageSlideshow-module_controlPrev__PCSgw","controlNext":"ImageSlideshow-module_controlNext__RMVX2","controlPlay":"ImageSlideshow-module_controlPlay__183mX","topControls":"ImageSlideshow-module_topControls__AIEJT","controlAction":"ImageSlideshow-module_controlAction__NCD7t","caption":"ImageSlideshow-module_caption__9a3JW","captionTitle":"ImageSlideshow-module_captionTitle__w5Izi","captionText":"ImageSlideshow-module_captionText__FvPyQ","imageMetadata":"ImageSlideshow-module_imageMetadata__5RF2N","metadataItem":"ImageSlideshow-module_metadataItem__6MJDP","indicators":"ImageSlideshow-module_indicators__2cH2G","hasThumbnails":"ImageSlideshow-module_hasThumbnails__0B1N-","indicator":"ImageSlideshow-module_indicator__4zGqm","indicatorActive":"ImageSlideshow-module_indicatorActive__oLeK2","thumbnails":"ImageSlideshow-module_thumbnails__zwiUz","thumbnail":"ImageSlideshow-module_thumbnail__3YyIx","thumbnailActive":"ImageSlideshow-module_thumbnailActive__aADJh","thumbnailImage":"ImageSlideshow-module_thumbnailImage__Ft7Iq"};
|
|
4694
4966
|
|
|
4695
4967
|
const ImageSlideshow = ({ images, autoPlay = false, autoPlayInterval = 3000, showThumbnails = true, showControls = true, showIndicators = true, showCaptions = true, loop = true, fadeTransition = false, enableFullscreen = true, enableDownload = false, enableShare = false, enableDragReorder = false, lazyLoading = true, preloadAdjacent = true, className = '', onImageChange, onDownload, onShare, onImageReorder, initialIndex = 0, }) => {
|
|
4696
4968
|
const [currentIndex, setCurrentIndex] = React.useState(initialIndex);
|
|
@@ -4729,9 +5001,9 @@ const ImageSlideshow = ({ images, autoPlay = false, autoPlayInterval = 3000, sho
|
|
|
4729
5001
|
goToSlide(imageOrder.length - 1);
|
|
4730
5002
|
}
|
|
4731
5003
|
}, [currentIndex, imageOrder.length, loop, goToSlide]);
|
|
4732
|
-
const togglePlayPause = () => {
|
|
4733
|
-
setIsPlaying(!
|
|
4734
|
-
};
|
|
5004
|
+
const togglePlayPause = React.useCallback(() => {
|
|
5005
|
+
setIsPlaying(prev => !prev);
|
|
5006
|
+
}, []);
|
|
4735
5007
|
const toggleFullscreen = () => {
|
|
4736
5008
|
if (!document.fullscreenElement) {
|
|
4737
5009
|
slideshowRef.current?.requestFullscreen();
|
|
@@ -4855,7 +5127,7 @@ const ImageSlideshow = ({ images, autoPlay = false, autoPlayInterval = 3000, sho
|
|
|
4855
5127
|
}
|
|
4856
5128
|
});
|
|
4857
5129
|
}
|
|
4858
|
-
}, [currentIndex, images, loop, preloadAdjacent]);
|
|
5130
|
+
}, [currentIndex, imageOrder, images, loop, preloadAdjacent]);
|
|
4859
5131
|
React.useEffect(() => {
|
|
4860
5132
|
const handleFullscreenChange = () => {
|
|
4861
5133
|
setIsFullscreen(!!document.fullscreenElement);
|
|
@@ -4906,9 +5178,9 @@ const ImageSlideshow = ({ images, autoPlay = false, autoPlayInterval = 3000, sho
|
|
|
4906
5178
|
};
|
|
4907
5179
|
document.addEventListener('keydown', handleKeyDown);
|
|
4908
5180
|
return () => document.removeEventListener('keydown', handleKeyDown);
|
|
4909
|
-
}, [goToPrevious, goToNext]);
|
|
5181
|
+
}, [goToPrevious, goToNext, enableFullscreen, togglePlayPause]);
|
|
4910
5182
|
if (!imageOrder || imageOrder.length === 0) {
|
|
4911
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
5183
|
+
return (jsxRuntime.jsx("div", { className: `${styles$2.slideshow} ${styles$2.empty} ${className}`, children: jsxRuntime.jsx("div", { className: styles$2.emptyState, children: jsxRuntime.jsx("span", { children: "No images to display" }) }) }));
|
|
4912
5184
|
}
|
|
4913
5185
|
const slideVariants = {
|
|
4914
5186
|
enter: (direction) => ({
|
|
@@ -4928,16 +5200,16 @@ const ImageSlideshow = ({ images, autoPlay = false, autoPlayInterval = 3000, sho
|
|
|
4928
5200
|
};
|
|
4929
5201
|
const currentImage = imageOrder[currentIndex];
|
|
4930
5202
|
const isImageLoaded = loadedImages.has(currentImage.id);
|
|
4931
|
-
return (jsxRuntime.jsxs("div", { ref: slideshowRef, className: `${styles$
|
|
5203
|
+
return (jsxRuntime.jsxs("div", { ref: slideshowRef, className: `${styles$2.slideshow} ${isFullscreen ? styles$2.fullscreen : ''} ${showThumbnails && imageOrder.length > 1 ? styles$2.hasThumbnails : ''} ${className}`, children: [jsxRuntime.jsxs("div", { className: styles$2.mainContainer, onTouchStart: onTouchStart, onTouchMove: onTouchMove, onTouchEnd: onTouchEnd, children: [jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", custom: 1, children: jsxRuntime.jsxs(framerMotion.motion.div, { custom: 1, variants: slideVariants, initial: "enter", animate: "center", exit: "exit", transition: {
|
|
4932
5204
|
x: { type: "spring", stiffness: 300, damping: 30 },
|
|
4933
5205
|
opacity: { duration: 0.3 }
|
|
4934
|
-
}, className: styles$
|
|
5206
|
+
}, className: styles$2.slide, children: [jsxRuntime.jsx("img", { ref: imageRef, src: lazyLoading && !isImageLoaded ? undefined : currentImage.src, "data-src": lazyLoading ? currentImage.src : undefined, srcSet: currentImage.srcSet, sizes: currentImage.sizes, alt: currentImage.alt, className: styles$2.image, draggable: false, onLoad: () => handleImageLoad(currentImage.id), style: {
|
|
4935
5207
|
opacity: lazyLoading && !isImageLoaded ? 0 : 1,
|
|
4936
5208
|
transition: 'opacity 0.3s ease'
|
|
4937
|
-
} }), lazyLoading && !isImageLoaded && (jsxRuntime.jsx("div", { className: styles$
|
|
5209
|
+
} }), lazyLoading && !isImageLoaded && (jsxRuntime.jsx("div", { className: styles$2.imageLoader, children: jsxRuntime.jsx("div", { className: styles$2.spinner }) }))] }, currentIndex) }), showControls && imageOrder.length > 1 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("button", { className: `${styles$2.control} ${styles$2.controlPrev}`, onClick: goToPrevious, disabled: !loop && currentIndex === 0, "aria-label": "Previous image", children: jsxRuntime.jsx(lucideReact.ChevronLeft, {}) }), jsxRuntime.jsx("button", { className: `${styles$2.control} ${styles$2.controlNext}`, onClick: goToNext, disabled: !loop && currentIndex === imageOrder.length - 1, "aria-label": "Next image", children: jsxRuntime.jsx(lucideReact.ChevronRight, {}) })] })), jsxRuntime.jsxs("div", { className: styles$2.topControls, children: [enableFullscreen && (jsxRuntime.jsx("button", { className: `${styles$2.control} ${styles$2.controlAction}`, onClick: toggleFullscreen, "aria-label": isFullscreen ? 'Exit fullscreen' : 'Enter fullscreen', title: isFullscreen ? 'Exit fullscreen (F)' : 'Enter fullscreen (F)', children: jsxRuntime.jsx("span", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center', width: '100%', height: '100%' }, children: jsxRuntime.jsx(lucideReact.Maximize, {}) }) })), enableDownload && (jsxRuntime.jsx("button", { className: `${styles$2.control} ${styles$2.controlAction}`, onClick: handleDownload, "aria-label": "Download image", title: "Download image", children: jsxRuntime.jsx("span", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center', width: '100%', height: '100%' }, children: jsxRuntime.jsx(lucideReact.Download, {}) }) })), enableShare && (jsxRuntime.jsx("button", { className: `${styles$2.control} ${styles$2.controlAction}`, onClick: handleShare, "aria-label": "Share image", title: "Share image", children: jsxRuntime.jsx("span", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center', width: '100%', height: '100%' }, children: jsxRuntime.jsx(lucideReact.Share2, {}) }) }))] }), autoPlay && imageOrder.length > 1 && (jsxRuntime.jsx("button", { className: `${styles$2.control} ${styles$2.controlPlay}`, onClick: togglePlayPause, "aria-label": isPlaying ? 'Pause slideshow' : 'Play slideshow', title: isPlaying ? 'Pause slideshow (Space)' : 'Play slideshow (Space)', children: isPlaying ? jsxRuntime.jsx(lucideReact.Pause, {}) : jsxRuntime.jsx(lucideReact.Play, {}) })), showCaptions && (currentImage.caption || currentImage.title) && (jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$2.caption, initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { delay: 0.3 }, children: [currentImage.title && (jsxRuntime.jsx("h3", { className: styles$2.captionTitle, children: currentImage.title })), currentImage.caption && (jsxRuntime.jsx("p", { className: styles$2.captionText, children: currentImage.caption })), currentImage.metadata && (jsxRuntime.jsxs("div", { className: styles$2.imageMetadata, children: [currentImage.metadata.photographer && (jsxRuntime.jsxs("span", { className: styles$2.metadataItem, children: ["\uD83D\uDCF7 ", currentImage.metadata.photographer] })), currentImage.metadata.location && (jsxRuntime.jsxs("span", { className: styles$2.metadataItem, children: ["\uD83D\uDCCD ", currentImage.metadata.location] })), currentImage.metadata.camera && (jsxRuntime.jsxs("span", { className: styles$2.metadataItem, children: ["\uD83D\uDCF9 ", currentImage.metadata.camera] }))] }))] }))] }), showIndicators && imageOrder.length > 1 && (jsxRuntime.jsx("div", { className: styles$2.indicators, children: imageOrder.map((_, index) => (jsxRuntime.jsx(framerMotion.motion.button, { className: `${styles$2.indicator} ${index === currentIndex ? styles$2.indicatorActive : ''}`, onClick: () => goToSlide(index), whileHover: { scale: 1.2 }, whileTap: { scale: 0.8 }, "aria-label": `Go to slide ${index + 1}` }, index))) })), showThumbnails && imageOrder.length > 1 && (jsxRuntime.jsx("div", { className: `${styles$2.thumbnails} ${isDragging ? styles$2.thumbnailsDragging : ''}`, children: imageOrder.map((image, index) => (jsxRuntime.jsx(framerMotion.motion.button, { className: `${styles$2.thumbnail} ${index === currentIndex ? styles$2.thumbnailActive : ''} ${draggedIndex === index ? styles$2.thumbnailDragged : ''}`, onClick: () => goToSlide(index), whileHover: { scale: 1.05 }, whileTap: { scale: 0.95 }, "aria-label": `Go to ${image.alt}`, draggable: enableDragReorder, onDragStart: (e) => handleDragStart(e, index), onDragOver: handleDragOver, onDrop: (e) => handleDrop(e, index), title: image.title || image.alt, children: jsxRuntime.jsx("img", { src: image.src, alt: image.alt, className: styles$2.thumbnailImage, draggable: false }) }, image.id))) }))] }));
|
|
4938
5210
|
};
|
|
4939
5211
|
|
|
4940
|
-
var styles = {"container":"Table-module_container__CH3T9","header":"Table-module_header__qVoF2","title":"Table-module_title__DSZgm","actions":"Table-module_actions__2J1i0","controls":"Table-module_controls__3WToN","searchBox":"Table-module_searchBox__bh3f3","searchIcon":"Table-module_searchIcon__1pQ5l","searchInput":"Table-module_searchInput__SrK6l","clearButton":"Table-module_clearButton__4Fysz","clearFiltersButton":"Table-module_clearFiltersButton__yFLI9","resultCount":"Table-module_resultCount__RR7Z6","loading":"Table-module_loading__xxSIa","spinner":"Table-module_spinner__T8mdH","empty":"Table-module_empty__-qPi2","emptyIcon":"Table-module_emptyIcon__FLViS","tableWrapper":"Table-module_tableWrapper__LvHGH","stickyHeader":"Table-module_stickyHeader__Dz0O8","table":"Table-module_table__4T9xo","striped":"Table-module_striped__TBcT6","compact":"Table-module_compact__w-QVs","th":"Table-module_th__bpKfX","td":"Table-module_td__HaytM","hoverable":"Table-module_hoverable__4aHgq","headerCell":"Table-module_headerCell__WUy2w","headerText":"Table-module_headerText__WGAqz","sortButton":"Table-module_sortButton__CJwYq","sortIcon":"Table-module_sortIcon__G48h1","columnFilter":"Table-module_columnFilter__hwNd2","tr":"Table-module_tr__-j8Fa","selected":"Table-module_selected__pjiMr","clickable":"Table-module_clickable__9R5oq","checkboxColumn":"Table-module_checkboxColumn__SpbCr","actionsColumn":"Table-module_actionsColumn__7x--N","actionButtons":"Table-module_actionButtons__8JQhr","actionButton":"Table-module_actionButton__9EQZu","actionButtonPrimary":"Table-module_actionButtonPrimary__Xyzgu","actionButtonSecondary":"Table-module_actionButtonSecondary__RiR1E","actionButtonDanger":"Table-module_actionButtonDanger__7aX-2","actionButtonWarning":"Table-module_actionButtonWarning__2s73k","actionButtonSuccess":"Table-module_actionButtonSuccess__DvbtN","checkbox":"Table-module_checkbox__9LC-f","nullValue":"Table-module_nullValue__TVTmT","badge":"Table-module_badge__OO-UL","badgeSuccess":"Table-module_badgeSuccess__uIJVY","badgeDanger":"Table-module_badgeDanger__Y6RPD","code":"Table-module_code__SIFLQ","pagination":"Table-module_pagination__UVcSr","pageInfo":"Table-module_pageInfo__e-k17","pageControls":"Table-module_pageControls__htKNN","pageButton":"Table-module_pageButton__9ukDT","pageNumber":"Table-module_pageNumber__qpnbj","pageSizeSelect":"Table-module_pageSizeSelect__GbSKL","bulkActions":"Table-module_bulkActions__7Rz-X","bulkActionButtons":"Table-module_bulkActionButtons__pb8M2","bulkActionButton":"Table-module_bulkActionButton__UOTDm","selectionCount":"Table-module_selectionCount__ZwGuQ","bulkPrimary":"Table-module_bulkPrimary__qx71n","bulkSecondary":"Table-module_bulkSecondary__WNEOF","bulkDanger":"Table-module_bulkDanger__Aqmye","bulkWarning":"Table-module_bulkWarning__jEkYC","bulkSuccess":"Table-module_bulkSuccess__VQd5s","bulkCustom":"Table-module_bulkCustom__BP47V","horizontalScroll":"Table-module_horizontalScroll__Cgx7N"};
|
|
5212
|
+
var styles$1 = {"container":"Table-module_container__CH3T9","header":"Table-module_header__qVoF2","title":"Table-module_title__DSZgm","actions":"Table-module_actions__2J1i0","controls":"Table-module_controls__3WToN","searchBox":"Table-module_searchBox__bh3f3","searchIcon":"Table-module_searchIcon__1pQ5l","searchInput":"Table-module_searchInput__SrK6l","clearButton":"Table-module_clearButton__4Fysz","clearFiltersButton":"Table-module_clearFiltersButton__yFLI9","resultCount":"Table-module_resultCount__RR7Z6","loading":"Table-module_loading__xxSIa","spinner":"Table-module_spinner__T8mdH","empty":"Table-module_empty__-qPi2","emptyIcon":"Table-module_emptyIcon__FLViS","tableWrapper":"Table-module_tableWrapper__LvHGH","stickyHeader":"Table-module_stickyHeader__Dz0O8","table":"Table-module_table__4T9xo","striped":"Table-module_striped__TBcT6","compact":"Table-module_compact__w-QVs","th":"Table-module_th__bpKfX","td":"Table-module_td__HaytM","hoverable":"Table-module_hoverable__4aHgq","headerCell":"Table-module_headerCell__WUy2w","headerText":"Table-module_headerText__WGAqz","sortButton":"Table-module_sortButton__CJwYq","sortIcon":"Table-module_sortIcon__G48h1","columnFilter":"Table-module_columnFilter__hwNd2","tr":"Table-module_tr__-j8Fa","selected":"Table-module_selected__pjiMr","clickable":"Table-module_clickable__9R5oq","checkboxColumn":"Table-module_checkboxColumn__SpbCr","actionsColumn":"Table-module_actionsColumn__7x--N","actionButtons":"Table-module_actionButtons__8JQhr","actionButton":"Table-module_actionButton__9EQZu","actionButtonPrimary":"Table-module_actionButtonPrimary__Xyzgu","actionButtonSecondary":"Table-module_actionButtonSecondary__RiR1E","actionButtonDanger":"Table-module_actionButtonDanger__7aX-2","actionButtonWarning":"Table-module_actionButtonWarning__2s73k","actionButtonSuccess":"Table-module_actionButtonSuccess__DvbtN","checkbox":"Table-module_checkbox__9LC-f","nullValue":"Table-module_nullValue__TVTmT","badge":"Table-module_badge__OO-UL","badgeSuccess":"Table-module_badgeSuccess__uIJVY","badgeDanger":"Table-module_badgeDanger__Y6RPD","code":"Table-module_code__SIFLQ","pagination":"Table-module_pagination__UVcSr","pageInfo":"Table-module_pageInfo__e-k17","pageControls":"Table-module_pageControls__htKNN","pageButton":"Table-module_pageButton__9ukDT","pageNumber":"Table-module_pageNumber__qpnbj","pageSizeSelect":"Table-module_pageSizeSelect__GbSKL","bulkActions":"Table-module_bulkActions__7Rz-X","bulkActionButtons":"Table-module_bulkActionButtons__pb8M2","bulkActionButton":"Table-module_bulkActionButton__UOTDm","selectionCount":"Table-module_selectionCount__ZwGuQ","bulkPrimary":"Table-module_bulkPrimary__qx71n","bulkSecondary":"Table-module_bulkSecondary__WNEOF","bulkDanger":"Table-module_bulkDanger__Aqmye","bulkWarning":"Table-module_bulkWarning__jEkYC","bulkSuccess":"Table-module_bulkSuccess__VQd5s","bulkCustom":"Table-module_bulkCustom__BP47V","horizontalScroll":"Table-module_horizontalScroll__Cgx7N"};
|
|
4941
5213
|
|
|
4942
5214
|
/**
|
|
4943
5215
|
* A comprehensive table component with sorting, filtering, pagination, selection, and row actions.
|
|
@@ -5138,7 +5410,7 @@ const TableComponent = function Table({ data, columns, keyField = 'id', title, s
|
|
|
5138
5410
|
...action.style,
|
|
5139
5411
|
...action.buttonStyles?.style
|
|
5140
5412
|
};
|
|
5141
|
-
// Handle icon size -
|
|
5413
|
+
// Handle icon size - set CSS custom property
|
|
5142
5414
|
if (action.buttonStyles?.iconSize || actionButtonStyles?.iconSize) {
|
|
5143
5415
|
baseStyles['--icon-size'] = typeof (action.buttonStyles?.iconSize || actionButtonStyles?.iconSize) === 'number'
|
|
5144
5416
|
? `${action.buttonStyles?.iconSize || actionButtonStyles?.iconSize}px`
|
|
@@ -5147,13 +5419,13 @@ const TableComponent = function Table({ data, columns, keyField = 'id', title, s
|
|
|
5147
5419
|
return baseStyles;
|
|
5148
5420
|
}, [actionButtonStyles]);
|
|
5149
5421
|
const getButtonClassName = React.useCallback((action) => {
|
|
5150
|
-
const baseClass = styles.actionButton;
|
|
5151
|
-
const variantClass = action.variant === 'primary' ? styles.actionButtonPrimary :
|
|
5152
|
-
action.variant === 'danger' ? styles.actionButtonDanger :
|
|
5153
|
-
action.variant === 'warning' ? styles.actionButtonWarning :
|
|
5154
|
-
action.variant === 'success' ? styles.actionButtonSuccess :
|
|
5422
|
+
const baseClass = styles$1.actionButton;
|
|
5423
|
+
const variantClass = action.variant === 'primary' ? styles$1.actionButtonPrimary :
|
|
5424
|
+
action.variant === 'danger' ? styles$1.actionButtonDanger :
|
|
5425
|
+
action.variant === 'warning' ? styles$1.actionButtonWarning :
|
|
5426
|
+
action.variant === 'success' ? styles$1.actionButtonSuccess :
|
|
5155
5427
|
action.variant === 'custom' ? '' :
|
|
5156
|
-
styles.actionButtonSecondary;
|
|
5428
|
+
styles$1.actionButtonSecondary;
|
|
5157
5429
|
const globalCustomClass = actionButtonStyles?.className || '';
|
|
5158
5430
|
const actionCustomClass = action.className || '';
|
|
5159
5431
|
const buttonCustomClass = action.buttonStyles?.className || '';
|
|
@@ -5161,23 +5433,23 @@ const TableComponent = function Table({ data, columns, keyField = 'id', title, s
|
|
|
5161
5433
|
}, [actionButtonStyles]);
|
|
5162
5434
|
// Loading state
|
|
5163
5435
|
if (loading) {
|
|
5164
|
-
return (jsxRuntime.jsx("div", { className: `${styles.container} ${className}`, children: jsxRuntime.jsxs("div", { className: styles.loading, children: [jsxRuntime.jsx("div", { className: styles.spinner }), jsxRuntime.jsx("span", { children: "Loading..." })] }) }));
|
|
5436
|
+
return (jsxRuntime.jsx("div", { className: `${styles$1.container} ${className}`, children: jsxRuntime.jsxs("div", { className: styles$1.loading, children: [jsxRuntime.jsx("div", { className: styles$1.spinner }), jsxRuntime.jsx("span", { children: "Loading..." })] }) }));
|
|
5165
5437
|
}
|
|
5166
5438
|
// Empty state
|
|
5167
5439
|
if (data.length === 0) {
|
|
5168
|
-
return (jsxRuntime.jsxs("div", { className: `${styles.container} ${className}`, children: [title && jsxRuntime.jsx("h2", { className: styles.title, children: title }), jsxRuntime.jsxs("div", { className: styles.empty, children: [jsxRuntime.jsx("span", { className: styles.emptyIcon, children: "\uD83D\uDCCA" }), jsxRuntime.jsx("p", { children: emptyMessage })] })] }));
|
|
5440
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$1.container} ${className}`, children: [title && jsxRuntime.jsx("h2", { className: styles$1.title, children: title }), jsxRuntime.jsxs("div", { className: styles$1.empty, children: [jsxRuntime.jsx("span", { className: styles$1.emptyIcon, children: "\uD83D\uDCCA" }), jsxRuntime.jsx("p", { children: emptyMessage })] })] }));
|
|
5169
5441
|
}
|
|
5170
|
-
return (jsxRuntime.jsxs("div", { className: `${styles.container} ${className}`, children: [(title || actions || bulkActions) && (jsxRuntime.jsxs("div", { className: styles.header, children: [title && jsxRuntime.jsx("h2", { className: styles.title, children: title }), (actions || bulkActions) && (jsxRuntime.jsxs("div", { className: styles.bulkActions, children: [actions && selectedItems.length > 0 && (jsxRuntime.jsx("div", { className: styles.actions, children: actions(selectedItems) })), bulkActions && bulkActions.length > 0 && selectedItems.length > 0 && (jsxRuntime.jsx("div", { className: styles.bulkActionButtons, children: bulkActions.map((bulkAction, index) => {
|
|
5442
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$1.container} ${className}`, children: [(title || actions || bulkActions) && (jsxRuntime.jsxs("div", { className: styles$1.header, children: [title && jsxRuntime.jsx("h2", { className: styles$1.title, children: title }), (actions || bulkActions) && (jsxRuntime.jsxs("div", { className: styles$1.bulkActions, children: [actions && selectedItems.length > 0 && (jsxRuntime.jsx("div", { className: styles$1.actions, children: actions(selectedItems) })), bulkActions && bulkActions.length > 0 && selectedItems.length > 0 && (jsxRuntime.jsx("div", { className: styles$1.bulkActionButtons, children: bulkActions.map((bulkAction, index) => {
|
|
5171
5443
|
const isDisabled = (bulkAction.disabled && bulkAction.disabled(selectedItems)) ||
|
|
5172
5444
|
(bulkAction.minSelection && selectedItems.length < bulkAction.minSelection) ||
|
|
5173
5445
|
(bulkAction.maxSelection && selectedItems.length > bulkAction.maxSelection);
|
|
5174
|
-
return (jsxRuntime.jsxs("button", { className: `${styles.bulkActionButton} ${bulkAction.variant === 'primary' ? styles.bulkPrimary :
|
|
5175
|
-
bulkAction.variant === 'secondary' ? styles.bulkSecondary :
|
|
5176
|
-
bulkAction.variant === 'danger' ? styles.bulkDanger :
|
|
5177
|
-
bulkAction.variant === 'warning' ? styles.bulkWarning :
|
|
5178
|
-
bulkAction.variant === 'success' ? styles.bulkSuccess :
|
|
5179
|
-
bulkAction.variant === 'custom' ? styles.bulkCustom :
|
|
5180
|
-
styles.bulkPrimary} ${bulkAction.className || ''}`, style: bulkAction.style, disabled: !!isDisabled, onClick: async () => {
|
|
5446
|
+
return (jsxRuntime.jsxs("button", { className: `${styles$1.bulkActionButton} ${bulkAction.variant === 'primary' ? styles$1.bulkPrimary :
|
|
5447
|
+
bulkAction.variant === 'secondary' ? styles$1.bulkSecondary :
|
|
5448
|
+
bulkAction.variant === 'danger' ? styles$1.bulkDanger :
|
|
5449
|
+
bulkAction.variant === 'warning' ? styles$1.bulkWarning :
|
|
5450
|
+
bulkAction.variant === 'success' ? styles$1.bulkSuccess :
|
|
5451
|
+
bulkAction.variant === 'custom' ? styles$1.bulkCustom :
|
|
5452
|
+
styles$1.bulkPrimary} ${bulkAction.className || ''}`, style: bulkAction.style, disabled: !!isDisabled, onClick: async () => {
|
|
5181
5453
|
if (bulkAction.confirmMessage) {
|
|
5182
5454
|
const message = typeof bulkAction.confirmMessage === 'function'
|
|
5183
5455
|
? bulkAction.confirmMessage(selectedItems)
|
|
@@ -5186,27 +5458,27 @@ const TableComponent = function Table({ data, columns, keyField = 'id', title, s
|
|
|
5186
5458
|
return;
|
|
5187
5459
|
}
|
|
5188
5460
|
await bulkAction.onClick(selectedItems);
|
|
5189
|
-
}, title: bulkAction.label, "aria-label": bulkAction.label, children: [bulkAction.icon, jsxRuntime.jsx("span", { children: bulkAction.label }), jsxRuntime.jsxs("span", { className: styles.selectionCount, children: ["(", selectedItems.length, ")"] })] }, index));
|
|
5190
|
-
}) }))] }))] })), (searchable || hasActiveFilters) && (jsxRuntime.jsxs("div", { className: styles.controls, children: [searchable && (jsxRuntime.jsxs("div", { className: styles.searchBox, children: [jsxRuntime.jsx("span", { className: styles.searchIcon, children: "\uD83D\uDD0D" }), jsxRuntime.jsx("input", { type: "text", placeholder: "Search...", value: searchQuery, onChange: e => {
|
|
5461
|
+
}, title: bulkAction.label, "aria-label": bulkAction.label, children: [bulkAction.icon, jsxRuntime.jsx("span", { children: bulkAction.label }), jsxRuntime.jsxs("span", { className: styles$1.selectionCount, children: ["(", selectedItems.length, ")"] })] }, index));
|
|
5462
|
+
}) }))] }))] })), (searchable || hasActiveFilters) && (jsxRuntime.jsxs("div", { className: styles$1.controls, children: [searchable && (jsxRuntime.jsxs("div", { className: styles$1.searchBox, children: [jsxRuntime.jsx("span", { className: styles$1.searchIcon, children: "\uD83D\uDD0D" }), jsxRuntime.jsx("input", { type: "text", placeholder: "Search...", value: searchQuery, onChange: e => {
|
|
5191
5463
|
setSearchQuery(e.target.value);
|
|
5192
5464
|
setCurrentPage(1);
|
|
5193
|
-
}, className: styles.searchInput }), searchQuery && (jsxRuntime.jsx("button", { className: styles.clearButton, onClick: () => setSearchQuery(''), children: "\u2715" }))] })), hasActiveFilters && (jsxRuntime.jsx("button", { className: styles.clearFiltersButton, onClick: clearFilters, children: "Clear All Filters" })), jsxRuntime.jsxs("div", { className: styles.resultCount, children: [filteredData.length, " ", filteredData.length === 1 ? 'result' : 'results'] })] })), jsxRuntime.jsx("div", { className: `${styles.tableWrapper} ${stickyHeader ? styles.stickyHeader : ''} ${horizontalScroll ? styles.horizontalScroll : ''}`, children: jsxRuntime.jsxs("table", { className: `
|
|
5194
|
-
${styles.table}
|
|
5195
|
-
${striped ? styles.striped : ''}
|
|
5196
|
-
${hoverable ? styles.hoverable : ''}
|
|
5197
|
-
${compact ? styles.compact : ''}
|
|
5198
|
-
`, role: "table", "aria-label": title || 'Data table', "aria-rowcount": sortedData.length, "aria-describedby": title ? `${title.replace(/\s+/g, '-').toLowerCase()}-summary` : undefined, children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [selectable && (jsxRuntime.jsx("th", { className: styles.checkboxColumn, scope: "col", children: jsxRuntime.jsx("input", { type: "checkbox", checked: allCurrentPageSelected, ref: input => {
|
|
5465
|
+
}, className: styles$1.searchInput }), searchQuery && (jsxRuntime.jsx("button", { className: styles$1.clearButton, onClick: () => setSearchQuery(''), children: "\u2715" }))] })), hasActiveFilters && (jsxRuntime.jsx("button", { className: styles$1.clearFiltersButton, onClick: clearFilters, children: "Clear All Filters" })), jsxRuntime.jsxs("div", { className: styles$1.resultCount, children: [filteredData.length, " ", filteredData.length === 1 ? 'result' : 'results'] })] })), jsxRuntime.jsx("div", { className: `${styles$1.tableWrapper} ${stickyHeader ? styles$1.stickyHeader : ''} ${horizontalScroll ? styles$1.horizontalScroll : ''}`, children: jsxRuntime.jsxs("table", { className: `
|
|
5466
|
+
${styles$1.table}
|
|
5467
|
+
${striped ? styles$1.striped : ''}
|
|
5468
|
+
${hoverable ? styles$1.hoverable : ''}
|
|
5469
|
+
${compact ? styles$1.compact : ''}
|
|
5470
|
+
`, role: "table", "aria-label": title || 'Data table', "aria-rowcount": sortedData.length, "aria-describedby": title ? `${title.replace(/\s+/g, '-').toLowerCase()}-summary` : undefined, children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [selectable && (jsxRuntime.jsx("th", { className: styles$1.checkboxColumn, scope: "col", children: jsxRuntime.jsx("input", { type: "checkbox", checked: allCurrentPageSelected, ref: input => {
|
|
5199
5471
|
if (input) {
|
|
5200
5472
|
input.indeterminate = !allCurrentPageSelected && someCurrentPageSelected;
|
|
5201
5473
|
}
|
|
5202
|
-
}, onChange: handleSelectAll, className: styles.checkbox, "aria-label": "Select all rows" }) })), columns.map(column => (jsxRuntime.jsx("th", { className: `${styles.th} ${column.className || ''}`, style: {
|
|
5474
|
+
}, onChange: handleSelectAll, className: styles$1.checkbox, "aria-label": "Select all rows" }) })), columns.map(column => (jsxRuntime.jsx("th", { className: `${styles$1.th} ${column.className || ''}`, style: {
|
|
5203
5475
|
width: column.width,
|
|
5204
5476
|
textAlign: column.align || 'left'
|
|
5205
5477
|
}, scope: "col", role: "columnheader", "aria-sort": sortConfig.key === column.key
|
|
5206
5478
|
? sortConfig.direction === 'asc' ? 'ascending' : 'descending'
|
|
5207
|
-
: column.sortable ? 'none' : undefined, children: jsxRuntime.jsxs("div", { className: styles.headerCell, children: [column.sortable ? (jsxRuntime.jsxs("button", { className: styles.sortButton, onClick: () => handleSort(column.key), "aria-label": `Sort by ${column.header} ${sortConfig.key === column.key
|
|
5479
|
+
: column.sortable ? 'none' : undefined, children: jsxRuntime.jsxs("div", { className: styles$1.headerCell, children: [column.sortable ? (jsxRuntime.jsxs("button", { className: styles$1.sortButton, onClick: () => handleSort(column.key), "aria-label": `Sort by ${column.header} ${sortConfig.key === column.key
|
|
5208
5480
|
? sortConfig.direction === 'asc' ? '(descending)' : '(ascending)'
|
|
5209
|
-
: '(ascending)'}`, children: [jsxRuntime.jsx("span", { children: column.header }), jsxRuntime.jsx("span", { className: styles.sortIcon, "aria-hidden": "true", children: sortConfig.key === column.key ? (sortConfig.direction === 'asc' ? '↑' : '↓') : '↕' })] })) : (jsxRuntime.jsx("span", { className: styles.headerText, children: column.header })), column.filterable && (jsxRuntime.jsx("input", { type: "text", placeholder: "Filter...", value: columnFilters[column.key] || '', onChange: e => handleColumnFilter(column.key, e.target.value), onClick: e => e.stopPropagation(), className: styles.columnFilter, "aria-label": `Filter ${column.header}` }))] }) }, column.key))), rowActions && rowActions.length > 0 && (jsxRuntime.jsx("th", { className: styles.actionsColumn, scope: "col", children: jsxRuntime.jsx("span", { className: styles.headerText, children: "Actions" }) }))] }) }), jsxRuntime.jsx("tbody", { children: animated ? (jsxRuntime.jsx(framerMotion.LayoutGroup, { children: jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "popLayout", children: paginatedData.map((item, index) => (jsxRuntime.jsxs(framerMotion.motion.tr, { layout: "position", initial: { opacity: 0, scale: 0.98 }, animate: {
|
|
5481
|
+
: '(ascending)'}`, children: [jsxRuntime.jsx("span", { children: column.header }), jsxRuntime.jsx("span", { className: styles$1.sortIcon, "aria-hidden": "true", children: sortConfig.key === column.key ? (sortConfig.direction === 'asc' ? '↑' : '↓') : '↕' })] })) : (jsxRuntime.jsx("span", { className: styles$1.headerText, children: column.header })), column.filterable && (jsxRuntime.jsx("input", { type: "text", placeholder: "Filter...", value: columnFilters[column.key] || '', onChange: e => handleColumnFilter(column.key, e.target.value), onClick: e => e.stopPropagation(), className: styles$1.columnFilter, "aria-label": `Filter ${column.header}` }))] }) }, column.key))), rowActions && rowActions.length > 0 && (jsxRuntime.jsx("th", { className: styles$1.actionsColumn, scope: "col", children: jsxRuntime.jsx("span", { className: styles$1.headerText, children: "Actions" }) }))] }) }), jsxRuntime.jsx("tbody", { children: animated ? (jsxRuntime.jsx(framerMotion.LayoutGroup, { children: jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "popLayout", children: paginatedData.map((item, index) => (jsxRuntime.jsxs(framerMotion.motion.tr, { layout: "position", initial: { opacity: 0, scale: 0.98 }, animate: {
|
|
5210
5482
|
opacity: 1,
|
|
5211
5483
|
scale: 1,
|
|
5212
5484
|
transition: {
|
|
@@ -5219,18 +5491,18 @@ const TableComponent = function Table({ data, columns, keyField = 'id', title, s
|
|
|
5219
5491
|
scale: 0.98,
|
|
5220
5492
|
transition: { duration: 0.08 }
|
|
5221
5493
|
}, className: `
|
|
5222
|
-
${styles.tr}
|
|
5223
|
-
${selectedRows.has(item[keyField]) ? styles.selected : ''}
|
|
5224
|
-
${onRowClick ? styles.clickable : ''}
|
|
5225
|
-
`, onClick: () => onRowClick?.(item, index), children: [selectable && (jsxRuntime.jsx("td", { className: styles.checkboxColumn, children: jsxRuntime.jsx("input", { type: "checkbox", checked: selectedRows.has(item[keyField]), onChange: () => handleSelectRow(item[keyField]), onClick: e => e.stopPropagation(), className: styles.checkbox }) })), columns.map(column => (jsxRuntime.jsx("td", { className: `${styles.td} ${column.className || ''}`, style: { textAlign: column.align || 'left' }, children: column.render
|
|
5494
|
+
${styles$1.tr}
|
|
5495
|
+
${selectedRows.has(item[keyField]) ? styles$1.selected : ''}
|
|
5496
|
+
${onRowClick ? styles$1.clickable : ''}
|
|
5497
|
+
`, onClick: () => onRowClick?.(item, index), children: [selectable && (jsxRuntime.jsx("td", { className: styles$1.checkboxColumn, children: jsxRuntime.jsx("input", { type: "checkbox", checked: selectedRows.has(item[keyField]), onChange: () => handleSelectRow(item[keyField]), onClick: e => e.stopPropagation(), className: styles$1.checkbox }) })), columns.map(column => (jsxRuntime.jsx("td", { className: `${styles$1.td} ${column.className || ''}`, style: { textAlign: column.align || 'left' }, children: column.render
|
|
5226
5498
|
? column.render(item[column.key], item, index)
|
|
5227
|
-
: formatValue(item[column.key]) }, column.key))), rowActions && rowActions.length > 0 && (jsxRuntime.jsx("td", { className: styles.actionsColumn, onClick: e => e.stopPropagation(), children: jsxRuntime.jsx("div", { className: styles.actionButtons, children: rowActions.map((action, actionIndex) => (jsxRuntime.jsx("button", { className: getButtonClassName(action), style: getButtonStyles(action), onClick: () => action.onClick(item, index), disabled: action.disabled ? action.disabled(item) : false, title: action.label, "aria-label": action.label, children: action.icon }, actionIndex))) }) }))] }, `${item[keyField]}-${currentPage}`))) }) })) : (paginatedData.map((item, index) => (jsxRuntime.jsxs("tr", { className: `
|
|
5228
|
-
${styles.tr}
|
|
5229
|
-
${selectedRows.has(item[keyField]) ? styles.selected : ''}
|
|
5230
|
-
${onRowClick ? styles.clickable : ''}
|
|
5231
|
-
`, onClick: () => onRowClick?.(item, index), children: [selectable && (jsxRuntime.jsx("td", { className: styles.checkboxColumn, children: jsxRuntime.jsx("input", { type: "checkbox", checked: selectedRows.has(item[keyField]), onChange: () => handleSelectRow(item[keyField]), onClick: e => e.stopPropagation(), className: styles.checkbox }) })), columns.map(column => (jsxRuntime.jsx("td", { className: `${styles.td} ${column.className || ''}`, style: { textAlign: column.align || 'left' }, children: column.render
|
|
5499
|
+
: formatValue(item[column.key]) }, column.key))), rowActions && rowActions.length > 0 && (jsxRuntime.jsx("td", { className: styles$1.actionsColumn, onClick: e => e.stopPropagation(), children: jsxRuntime.jsx("div", { className: styles$1.actionButtons, children: rowActions.map((action, actionIndex) => (jsxRuntime.jsx("button", { className: getButtonClassName(action), style: getButtonStyles(action), onClick: () => action.onClick(item, index), disabled: action.disabled ? action.disabled(item) : false, title: action.label, "aria-label": action.label, children: action.icon }, actionIndex))) }) }))] }, `${String(item[keyField])}-${currentPage}`))) }) })) : (paginatedData.map((item, index) => (jsxRuntime.jsxs("tr", { className: `
|
|
5500
|
+
${styles$1.tr}
|
|
5501
|
+
${selectedRows.has(item[keyField]) ? styles$1.selected : ''}
|
|
5502
|
+
${onRowClick ? styles$1.clickable : ''}
|
|
5503
|
+
`, onClick: () => onRowClick?.(item, index), children: [selectable && (jsxRuntime.jsx("td", { className: styles$1.checkboxColumn, children: jsxRuntime.jsx("input", { type: "checkbox", checked: selectedRows.has(item[keyField]), onChange: () => handleSelectRow(item[keyField]), onClick: e => e.stopPropagation(), className: styles$1.checkbox }) })), columns.map(column => (jsxRuntime.jsx("td", { className: `${styles$1.td} ${column.className || ''}`, style: { textAlign: column.align || 'left' }, children: column.render
|
|
5232
5504
|
? column.render(item[column.key], item, index)
|
|
5233
|
-
: formatValue(item[column.key]) }, column.key))), rowActions && rowActions.length > 0 && (jsxRuntime.jsx("td", { className: styles.actionsColumn, onClick: e => e.stopPropagation(), children: jsxRuntime.jsx("div", { className: styles.actionButtons, children: rowActions.map((action, actionIndex) => (jsxRuntime.jsx("button", { className: getButtonClassName(action), style: getButtonStyles(action), onClick: () => action.onClick(item, index), disabled: action.disabled ? action.disabled(item) : false, title: action.label, "aria-label": action.label, children: action.icon }, actionIndex))) }) }))] }, item[keyField])))) })] }) }), pagination && totalPages > 1 && (jsxRuntime.jsxs("div", { className: styles.pagination, children: [jsxRuntime.jsxs("div", { className: styles.pageInfo, children: ["Showing ", ((currentPage - 1) * pageSize) + 1, "-", Math.min(currentPage * pageSize, sortedData.length), " of ", sortedData.length] }), jsxRuntime.jsxs("div", { className: styles.pageControls, children: [jsxRuntime.jsx("button", { className: styles.pageButton, onClick: () => setCurrentPage(1), disabled: currentPage === 1, children: "\u27E8\u27E8" }), jsxRuntime.jsx("button", { className: styles.pageButton, onClick: () => setCurrentPage(prev => Math.max(1, prev - 1)), disabled: currentPage === 1, children: "\u27E8" }), jsxRuntime.jsxs("span", { className: styles.pageNumber, children: ["Page ", currentPage, " of ", totalPages] }), jsxRuntime.jsx("button", { className: styles.pageButton, onClick: () => setCurrentPage(prev => Math.min(totalPages, prev + 1)), disabled: currentPage === totalPages, children: "\u27E9" }), jsxRuntime.jsx("button", { className: styles.pageButton, onClick: () => setCurrentPage(totalPages), disabled: currentPage === totalPages, children: "\u27E9\u27E9" })] }), typeof pagination === 'object' && (jsxRuntime.jsx("select", { className: styles.pageSizeSelect, value: pageSize, onChange: e => {
|
|
5505
|
+
: formatValue(item[column.key]) }, column.key))), rowActions && rowActions.length > 0 && (jsxRuntime.jsx("td", { className: styles$1.actionsColumn, onClick: e => e.stopPropagation(), children: jsxRuntime.jsx("div", { className: styles$1.actionButtons, children: rowActions.map((action, actionIndex) => (jsxRuntime.jsx("button", { className: getButtonClassName(action), style: getButtonStyles(action), onClick: () => action.onClick(item, index), disabled: action.disabled ? action.disabled(item) : false, title: action.label, "aria-label": action.label, children: action.icon }, actionIndex))) }) }))] }, String(item[keyField]))))) })] }) }), pagination && totalPages > 1 && (jsxRuntime.jsxs("div", { className: styles$1.pagination, children: [jsxRuntime.jsxs("div", { className: styles$1.pageInfo, children: ["Showing ", ((currentPage - 1) * pageSize) + 1, "-", Math.min(currentPage * pageSize, sortedData.length), " of ", sortedData.length] }), jsxRuntime.jsxs("div", { className: styles$1.pageControls, children: [jsxRuntime.jsx("button", { className: styles$1.pageButton, onClick: () => setCurrentPage(1), disabled: currentPage === 1, children: "\u27E8\u27E8" }), jsxRuntime.jsx("button", { className: styles$1.pageButton, onClick: () => setCurrentPage(prev => Math.max(1, prev - 1)), disabled: currentPage === 1, children: "\u27E8" }), jsxRuntime.jsxs("span", { className: styles$1.pageNumber, children: ["Page ", currentPage, " of ", totalPages] }), jsxRuntime.jsx("button", { className: styles$1.pageButton, onClick: () => setCurrentPage(prev => Math.min(totalPages, prev + 1)), disabled: currentPage === totalPages, children: "\u27E9" }), jsxRuntime.jsx("button", { className: styles$1.pageButton, onClick: () => setCurrentPage(totalPages), disabled: currentPage === totalPages, children: "\u27E9\u27E9" })] }), typeof pagination === 'object' && (jsxRuntime.jsx("select", { className: styles$1.pageSizeSelect, value: pageSize, onChange: e => {
|
|
5234
5506
|
setPageSize(Number(e.target.value));
|
|
5235
5507
|
setCurrentPage(1);
|
|
5236
5508
|
}, children: pageSizeOptions.map(size => (jsxRuntime.jsxs("option", { value: size, children: [size, " per page"] }, size))) }))] }))] }));
|
|
@@ -5238,32 +5510,65 @@ const TableComponent = function Table({ data, columns, keyField = 'id', title, s
|
|
|
5238
5510
|
// Helper function to format values
|
|
5239
5511
|
function formatValue(value) {
|
|
5240
5512
|
if (value === null || value === undefined) {
|
|
5241
|
-
return jsxRuntime.jsx("span", { className: styles.nullValue, children: "\u2014" });
|
|
5513
|
+
return jsxRuntime.jsx("span", { className: styles$1.nullValue, children: "\u2014" });
|
|
5242
5514
|
}
|
|
5243
5515
|
if (typeof value === 'boolean') {
|
|
5244
|
-
return (jsxRuntime.jsx("span", { className: `${styles.badge} ${value ? styles.badgeSuccess : styles.badgeDanger}`, children: value ? '✓' : '✗' }));
|
|
5516
|
+
return (jsxRuntime.jsx("span", { className: `${styles$1.badge} ${value ? styles$1.badgeSuccess : styles$1.badgeDanger}`, children: value ? '✓' : '✗' }));
|
|
5245
5517
|
}
|
|
5246
5518
|
if (value instanceof Date) {
|
|
5247
5519
|
return value.toLocaleDateString();
|
|
5248
5520
|
}
|
|
5249
5521
|
if (typeof value === 'object') {
|
|
5250
|
-
return jsxRuntime.jsx("code", { className: styles.code, children: JSON.stringify(value, null, 2) });
|
|
5522
|
+
return jsxRuntime.jsx("code", { className: styles$1.code, children: JSON.stringify(value, null, 2) });
|
|
5251
5523
|
}
|
|
5252
5524
|
return String(value);
|
|
5253
5525
|
}
|
|
5254
5526
|
// Memoized Table component to prevent unnecessary re-renders
|
|
5255
5527
|
const Table = React.memo(TableComponent);
|
|
5256
5528
|
|
|
5529
|
+
var styles = {"overlay":"ConfirmationModal-module_overlay__wzOO0","positioner":"ConfirmationModal-module_positioner__JbYiu","modal":"ConfirmationModal-module_modal__yG0nB","header":"ConfirmationModal-module_header__-mH-7","warning":"ConfirmationModal-module_warning__DbqCv","danger":"ConfirmationModal-module_danger__RGtlr","info":"ConfirmationModal-module_info__cyle2","title":"ConfirmationModal-module_title__-x6BK","closeButton":"ConfirmationModal-module_closeButton__NStBA","content":"ConfirmationModal-module_content__kFMOl","message":"ConfirmationModal-module_message__eOvmj","footer":"ConfirmationModal-module_footer__m41Eh"};
|
|
5530
|
+
|
|
5531
|
+
/**
|
|
5532
|
+
* ConfirmationModal Component
|
|
5533
|
+
*
|
|
5534
|
+
* A specialized modal for confirm/cancel flows with variant styling.
|
|
5535
|
+
*
|
|
5536
|
+
* @example
|
|
5537
|
+
* <ConfirmationModal
|
|
5538
|
+
* isOpen={showDelete}
|
|
5539
|
+
* onClose={() => setShowDelete(false)}
|
|
5540
|
+
* onConfirm={handleDelete}
|
|
5541
|
+
* title="Delete item?"
|
|
5542
|
+
* message="This action cannot be undone."
|
|
5543
|
+
* variant="danger"
|
|
5544
|
+
* confirmText="Delete"
|
|
5545
|
+
* />
|
|
5546
|
+
*/
|
|
5547
|
+
const ConfirmationModal = ({ isOpen, onClose, onConfirm, title, message, confirmText = 'Confirm', cancelText = 'Cancel', isLoading = false, variant = 'info', }) => {
|
|
5548
|
+
const handleConfirm = (e) => {
|
|
5549
|
+
if (!isLoading) {
|
|
5550
|
+
e.preventDefault();
|
|
5551
|
+
e.stopPropagation();
|
|
5552
|
+
onConfirm();
|
|
5553
|
+
}
|
|
5554
|
+
};
|
|
5555
|
+
return (jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isOpen && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(framerMotion.motion.div, { className: styles.overlay, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: !isLoading ? onClose : undefined }), jsxRuntime.jsx("div", { className: styles.positioner, children: jsxRuntime.jsxs(framerMotion.motion.div, { className: styles.modal, initial: { opacity: 0, scale: 0.9, y: 20 }, animate: { opacity: 1, scale: 1, y: 0 }, exit: { opacity: 0, scale: 0.9, y: 20 }, transition: { type: 'spring', stiffness: 300, damping: 30 }, children: [jsxRuntime.jsxs("div", { className: `${styles.header} ${styles[variant]}`, children: [jsxRuntime.jsx("h2", { className: styles.title, children: title }), !isLoading && (jsxRuntime.jsx("button", { className: styles.closeButton, onClick: onClose, type: "button", "aria-label": "Close", children: "\u2715" }))] }), jsxRuntime.jsx("div", { className: styles.content, children: jsxRuntime.jsx("p", { className: styles.message, children: message }) }), jsxRuntime.jsxs("div", { className: styles.footer, children: [jsxRuntime.jsx(Button, { type: "button", variant: "ghost", onClick: onClose, disabled: isLoading, children: cancelText }), jsxRuntime.jsx(Button, { type: "button", variant: variant === 'danger' ? 'danger' : 'primary', onClick: handleConfirm, disabled: isLoading, loading: isLoading, children: confirmText })] })] }) })] })) }));
|
|
5556
|
+
};
|
|
5557
|
+
|
|
5257
5558
|
exports.ArrayInput = ArrayInput;
|
|
5258
5559
|
exports.BooleansHeatmap = BooleansHeatmap;
|
|
5560
|
+
exports.Breadcrumb = Breadcrumb;
|
|
5259
5561
|
exports.Button = Button;
|
|
5260
5562
|
exports.Calendar = Calendar;
|
|
5261
5563
|
exports.Card = Card;
|
|
5262
5564
|
exports.Checkbox = Checkbox;
|
|
5565
|
+
exports.ConfirmationModal = ConfirmationModal;
|
|
5263
5566
|
exports.DateInput = DateInput;
|
|
5567
|
+
exports.DecryptedText = DecryptedText;
|
|
5264
5568
|
exports.EditFAB = EditFAB;
|
|
5265
5569
|
exports.EmptyState = EmptyState;
|
|
5266
5570
|
exports.ImageSlideshow = ImageSlideshow;
|
|
5571
|
+
exports.LiquidButton = LiquidButton;
|
|
5267
5572
|
exports.LoadingSpinner = LoadingSpinner;
|
|
5268
5573
|
exports.Modal = Modal;
|
|
5269
5574
|
exports.MoodChart = MoodChart;
|
|
@@ -5284,10 +5589,12 @@ exports.TextInput = TextInput;
|
|
|
5284
5589
|
exports.ThemeProvider = ThemeProvider;
|
|
5285
5590
|
exports.ThemeSwitcher = ThemeSwitcher;
|
|
5286
5591
|
exports.TimeInput = TimeInput;
|
|
5592
|
+
exports.ToastContainer = ToastContainer;
|
|
5287
5593
|
exports.Toggle = Toggle;
|
|
5288
5594
|
exports.ToggleButton = ToggleButton;
|
|
5289
5595
|
exports.soundManager = soundManager;
|
|
5290
5596
|
exports.useComponentSound = useComponentSound;
|
|
5291
5597
|
exports.useSound = useSound;
|
|
5292
|
-
exports.useTheme = useTheme
|
|
5598
|
+
exports.useTheme = useTheme;
|
|
5599
|
+
exports.useThemeSafe = useThemeSafe;
|
|
5293
5600
|
//# sourceMappingURL=index.js.map
|