@stfrigerio/sito-template 0.1.37 → 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/components/organisms/Navbar/Navbar.d.ts.map +1 -1
- package/dist/index.esm.js +76 -18
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +76 -18
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +2 -2
- 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.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.stories-2u4SThph.js → BooleansHeatmap.stories-3npXygec.js} +8 -8
- 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-VfdDKp2T.js → Button-Bkr9S309.js} +2 -2
- 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-BHwlDfRP.js → Checkbox-CpADrZij.js} +2 -2
- package/storybook-static/assets/{Checkbox.stories-DxTQrFgm.js → Checkbox.stories-RTwjfwnG.js} +2 -2
- 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-DDPZqyBR.js +38 -0
- package/storybook-static/assets/{DateInput.stories-BGB5zJBm.js → DateInput.stories-B2N9buuW.js} +2 -2
- 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-q9kcQxfH.js → DocsRenderer-PQXLIZUC-e7izZ1Ax.js} +8 -8
- package/storybook-static/assets/{EditFAB.stories-CmfJxWns.js → EditFAB.stories-CHva2s7W.js} +12 -42
- 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.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.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.stories-DmHIaDZB.js → SearchBar.stories-T1tR-GmV.js} +30 -15
- package/storybook-static/assets/SearchableDropdown-DhEHRY6d.js +38 -0
- package/storybook-static/assets/{SearchableDropdown.stories-ByZj6lJu.js → SearchableDropdown.stories-E1pMIVn_.js} +8 -8
- 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.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.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-CbqMjFCN.js +28 -0
- package/storybook-static/assets/{TextArea.stories-CCqRRpwq.js → TextArea.stories-CuMypTf4.js} +18 -8
- 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-BpsPIO3D.js +28 -0
- package/storybook-static/assets/{TextInput.stories-CtvOb60q.js → TextInput.stories-C0oXgEQ2.js} +7 -7
- 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.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.stories-BC5vDv_Y.js +55 -0
- package/storybook-static/assets/Toggle-BZxwy2el.js +41 -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/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/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-BUaP2gIF.js → iframe-Cz1R6gKZ.js} +192 -192
- package/storybook-static/assets/iframe-Df7_64QT.css +1 -0
- package/storybook-static/assets/{index-CBmvvqzc.js → index-C2Ys00st.js} +1 -1
- 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-BYG7Mesf.js → monotone-DHdPkfDP.js} +1 -1
- 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-NloTqvdv.js → transform-BKmuZieF.js} +1 -1
- 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/iframe.html +7 -40
- package/storybook-static/index.json +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/sb-addons/chromatic-com-storybook-4/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/docs-2/manager-bundle.js +2 -2
- package/storybook-static/sb-addons/links-3/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/storybook-5/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +3 -3
- package/storybook-static/assets/AllAtoms.stories-DBoQZmq-.js +0 -109
- package/storybook-static/assets/AnimationPlayer-UXJjBKtF.css +0 -1
- package/storybook-static/assets/AnimationPlayer.stories-yXQ8fqUT.js +0 -379
- package/storybook-static/assets/ArrayInput.stories-CRqKExgm.js +0 -221
- package/storybook-static/assets/Button.stories-BeeBKHoX.js +0 -117
- package/storybook-static/assets/Calendar-BTQfDDfP.css +0 -1
- package/storybook-static/assets/Calendar.stories-CKOG4XAn.js +0 -545
- package/storybook-static/assets/Card-Bc7TyfBx.css +0 -1
- package/storybook-static/assets/Card-D-kcaQHV.js +0 -49
- package/storybook-static/assets/Card.stories-CpcboxKs.js +0 -130
- package/storybook-static/assets/Color-AVL7NMMY-BzNNgCT5.js +0 -1
- package/storybook-static/assets/DateInput-Cu3PZYc0.js +0 -33
- package/storybook-static/assets/MoodChart.stories-V-wKOSu-.js +0 -40
- package/storybook-static/assets/Navbar-B8vEvGnB.css +0 -1
- package/storybook-static/assets/Navbar.stories-Dkf77idX.js +0 -235
- package/storybook-static/assets/NumberStepper-BVHPJutJ.css +0 -1
- package/storybook-static/assets/NumberStepper-BZGlrWCN.js +0 -30
- package/storybook-static/assets/NumberStepper.stories-NZw7r4Oh.js +0 -127
- package/storybook-static/assets/PieChart.stories-BkfNODjW.js +0 -199
- package/storybook-static/assets/QuantifiableHabitsChart-BEfzqND4.css +0 -1
- package/storybook-static/assets/QuantifiableHabitsChart.stories-Df6rcrdD.js +0 -105
- package/storybook-static/assets/SearchableDropdown-ByAXm1md.js +0 -38
- package/storybook-static/assets/SelectInput-D-AwfWVz.js +0 -31
- package/storybook-static/assets/SelectInput.stories-MyE-GqOw.js +0 -112
- package/storybook-static/assets/SleepChart-yGsG5RlQ.css +0 -1
- package/storybook-static/assets/SleepChart.stories-Dsz1U6F9.js +0 -58
- package/storybook-static/assets/SunburstChart.stories-CphfyDsR.js +0 -285
- package/storybook-static/assets/Tabs.stories-c24Ffu3K.js +0 -49
- package/storybook-static/assets/TextArea-B_sATPlw.js +0 -28
- package/storybook-static/assets/TextInput-ZGg8LTL_.js +0 -28
- package/storybook-static/assets/ThemeSwitcher.stories-BvkX1SDm.js +0 -62
- package/storybook-static/assets/TimeInput.stories-BchhRfKo.js +0 -50
- package/storybook-static/assets/Toggle-BQ2KHBDr.js +0 -39
- package/storybook-static/assets/Toggle.stories-BUSZc6m3.js +0 -194
- package/storybook-static/assets/ToggleButton-Dl6hvkJv.js +0 -32
- package/storybook-static/assets/ToggleButton-gfPoPxTQ.css +0 -1
- package/storybook-static/assets/ToggleButton.stories-BKN4zU3N.js +0 -143
- package/storybook-static/assets/iframe-BOc1hSA-.css +0 -1
- package/storybook-static/assets/index-5bdJXrkD.js +0 -1
- package/storybook-static/assets/index-CZs7_DA6.js +0 -9
- package/storybook-static/assets/linear-4t_RuQok.js +0 -1
- package/storybook-static/assets/proxy-9Y4F2rF8.js +0 -1
- package/storybook-static/assets/react-18-D4c-_GAk.js +0 -24
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import{j as e}from"./iframe-Cz1R6gKZ.js";import{B as t}from"./Button-Bkr9S309.js";import{s as i}from"./useSound-DOpt9DfD.js";import{c as s}from"./createLucideIcon-C7zEcVM7.js";import{C as l}from"./chevron-right-DUHx58vO.js";import"./preload-helper-C1FmrZbK.js";import"./proxy-CAwOFzsk.js";import"./MotionConfigContext-C_Ro_xsO.js";/**
|
|
2
|
+
* @license lucide-react v0.539.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const b=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],S=s("plus",b);/**
|
|
7
|
+
* @license lucide-react v0.539.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const k=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],M=s("save",k);/**
|
|
12
|
+
* @license lucide-react v0.539.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const z=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],I=s("trash-2",z),A={title:"Atoms/Button",component:t,parameters:{layout:"centered",docs:{description:{component:"A versatile button component with multiple variants, sizes, and animation support."}}},tags:["autodocs"],argTypes:{variant:{control:"select",options:["primary","secondary","outline","ghost","danger"],description:"The visual style variant of the button"},size:{control:"select",options:["small","medium","large"],description:"The size of the button"},fullWidth:{control:"boolean",description:"Whether the button should take full width of its container"},loading:{control:"boolean",description:"Shows loading spinner and disables the button"},disabled:{control:"boolean",description:"Disables the button"},onClick:{action:"clicked"}}},r={args:{children:"Click me",variant:"primary",size:"medium"}},n={render:()=>e.jsxs("div",{style:{display:"flex",gap:"1rem",alignItems:"center",flexWrap:"wrap"},children:[e.jsx(t,{iconLeft:e.jsx(M,{}),children:"Save"}),e.jsx(t,{iconRight:e.jsx(l,{}),children:"Next"}),e.jsx(t,{iconLeft:e.jsx(S,{}),iconRight:e.jsx(l,{}),children:"Add Item"}),e.jsx(t,{variant:"ghost",size:"small",children:e.jsx(I,{})})]}),parameters:{controls:{disable:!0}}},a={render:()=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[e.jsxs("div",{style:{display:"flex",gap:"1rem",alignItems:"center"},children:[e.jsx(t,{variant:"primary",children:"Primary"}),e.jsx(t,{variant:"secondary",children:"Secondary"}),e.jsx(t,{variant:"outline",children:"Outline"}),e.jsx(t,{variant:"ghost",children:"Ghost"}),e.jsx(t,{variant:"danger",children:"Danger"})]}),e.jsxs("div",{style:{display:"flex",gap:"1rem",alignItems:"center"},children:[e.jsx(t,{size:"small",children:"Small"}),e.jsx(t,{size:"medium",children:"Medium"}),e.jsx(t,{size:"large",children:"Large"})]}),e.jsxs("div",{style:{display:"flex",gap:"1rem",alignItems:"center"},children:[e.jsx(t,{loading:!0,children:"Loading"}),e.jsx(t,{disabled:!0,children:"Disabled"})]})]}),parameters:{controls:{disable:!0}}},o={args:{children:"Button with Sound",variant:"primary",soundConfig:{onClick:!0,onHover:!0}},decorators:[j=>(i.setEnabled(!0),i.setVolume(.5),e.jsx(j,{}))]};var d,c,u;r.parameters={...r.parameters,docs:{...(d=r.parameters)==null?void 0:d.docs,source:{originalSource:`{
|
|
17
|
+
args: {
|
|
18
|
+
children: 'Click me',
|
|
19
|
+
variant: 'primary',
|
|
20
|
+
size: 'medium'
|
|
21
|
+
}
|
|
22
|
+
}`,...(u=(c=r.parameters)==null?void 0:c.docs)==null?void 0:u.source}}};var m,p,h;n.parameters={...n.parameters,docs:{...(m=n.parameters)==null?void 0:m.docs,source:{originalSource:`{
|
|
23
|
+
render: () => <div style={{
|
|
24
|
+
display: 'flex',
|
|
25
|
+
gap: '1rem',
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
flexWrap: 'wrap'
|
|
28
|
+
}}>
|
|
29
|
+
<Button iconLeft={<Save />}>Save</Button>
|
|
30
|
+
<Button iconRight={<ChevronRight />}>Next</Button>
|
|
31
|
+
<Button iconLeft={<Plus />} iconRight={<ChevronRight />}>Add Item</Button>
|
|
32
|
+
<Button variant="ghost" size="small"><Trash2 /></Button>
|
|
33
|
+
</div>,
|
|
34
|
+
parameters: {
|
|
35
|
+
controls: {
|
|
36
|
+
disable: true
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}`,...(h=(p=n.parameters)==null?void 0:p.docs)==null?void 0:h.source}}};var g,v,y;a.parameters={...a.parameters,docs:{...(g=a.parameters)==null?void 0:g.docs,source:{originalSource:`{
|
|
40
|
+
render: () => <div style={{
|
|
41
|
+
display: 'flex',
|
|
42
|
+
flexDirection: 'column',
|
|
43
|
+
gap: '1rem'
|
|
44
|
+
}}>
|
|
45
|
+
<div style={{
|
|
46
|
+
display: 'flex',
|
|
47
|
+
gap: '1rem',
|
|
48
|
+
alignItems: 'center'
|
|
49
|
+
}}>
|
|
50
|
+
<Button variant="primary">Primary</Button>
|
|
51
|
+
<Button variant="secondary">Secondary</Button>
|
|
52
|
+
<Button variant="outline">Outline</Button>
|
|
53
|
+
<Button variant="ghost">Ghost</Button>
|
|
54
|
+
<Button variant="danger">Danger</Button>
|
|
55
|
+
</div>
|
|
56
|
+
<div style={{
|
|
57
|
+
display: 'flex',
|
|
58
|
+
gap: '1rem',
|
|
59
|
+
alignItems: 'center'
|
|
60
|
+
}}>
|
|
61
|
+
<Button size="small">Small</Button>
|
|
62
|
+
<Button size="medium">Medium</Button>
|
|
63
|
+
<Button size="large">Large</Button>
|
|
64
|
+
</div>
|
|
65
|
+
<div style={{
|
|
66
|
+
display: 'flex',
|
|
67
|
+
gap: '1rem',
|
|
68
|
+
alignItems: 'center'
|
|
69
|
+
}}>
|
|
70
|
+
<Button loading>Loading</Button>
|
|
71
|
+
<Button disabled>Disabled</Button>
|
|
72
|
+
</div>
|
|
73
|
+
</div>,
|
|
74
|
+
parameters: {
|
|
75
|
+
controls: {
|
|
76
|
+
disable: true
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}`,...(y=(v=a.parameters)==null?void 0:v.docs)==null?void 0:y.source}}};var x,f,B;o.parameters={...o.parameters,docs:{...(x=o.parameters)==null?void 0:x.docs,source:{originalSource:`{
|
|
80
|
+
args: {
|
|
81
|
+
children: 'Button with Sound',
|
|
82
|
+
variant: 'primary',
|
|
83
|
+
soundConfig: {
|
|
84
|
+
onClick: true,
|
|
85
|
+
onHover: true
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
decorators: [Story => {
|
|
89
|
+
soundManager.setEnabled(true);
|
|
90
|
+
soundManager.setVolume(0.5);
|
|
91
|
+
return <Story />;
|
|
92
|
+
}]
|
|
93
|
+
}`,...(B=(f=o.parameters)==null?void 0:f.docs)==null?void 0:B.source}}};const H=["Default","WithIcons","AllVariants","WithSound"];export{a as AllVariants,r as Default,n as WithIcons,o as WithSound,H as __namedExportsOrder,A as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._calendar_1mf94_2{background:var(--color-background);border-radius:var(--radius-lg);padding:var(--spacing-lg);box-shadow:var(--shadow-md);font-family:var(--font-primary);color:var(--color-text);width:100%;max-width:100%}._loading_1mf94_14{display:flex;align-items:center;justify-content:center;min-height:400px}._loadingSpinner_1mf94_21{color:var(--color-text-secondary);font-size:var(--font-size-lg)}._header_1mf94_27{display:flex;align-items:center;justify-content:space-between;margin-bottom:var(--spacing-lg);gap:var(--spacing-md)}._navigation_1mf94_35{display:flex;align-items:center;gap:var(--spacing-md)}._navButton_1mf94_41{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-background);color:var(--color-text);cursor:pointer;transition:all .2s ease}._navButton_1mf94_41:hover{background:var(--color-background-secondary);border-color:var(--color-border-hover)}._title_1mf94_60{font-size:var(--font-size-xl);font-weight:600;color:var(--color-text);margin:0;text-transform:capitalize;min-width:200px;text-align:center}._controls_1mf94_70{display:flex;align-items:center;gap:var(--spacing-md)}._todayButton_1mf94_76{padding:var(--spacing-sm) var(--spacing-md);border:1px solid var(--color-primary);border-radius:var(--radius-md);background:var(--color-background);color:var(--color-primary);font-weight:500;cursor:pointer;transition:all .2s ease}._todayButton_1mf94_76:hover{background:var(--color-primary);color:var(--color-text-inverse)}._viewToggle_1mf94_92{display:flex;border:1px solid var(--color-border);border-radius:var(--radius-md);overflow:hidden}._viewButton_1mf94_99{padding:var(--spacing-sm) var(--spacing-md);border:none;background:var(--color-background);color:var(--color-text);cursor:pointer;transition:all .2s ease;font-size:var(--font-size-sm)}._viewButton_1mf94_99:hover{background:var(--color-background-secondary)}._viewButton_1mf94_99._active_1mf94_113{background:var(--color-primary);color:var(--color-text-inverse)}._viewButton_1mf94_99+._viewButton_1mf94_99{border-left:1px solid var(--color-border)}._weekDays_1mf94_123{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--spacing-xs);margin-bottom:var(--spacing-md)}._weekDays_1mf94_123._withWeekNumbers_1mf94_130{grid-template-columns:40px repeat(7,1fr)}._weekNumberHeader_1mf94_134,._weekDay_1mf94_123{text-align:center;font-size:var(--font-size-sm);font-weight:600;color:var(--color-text-secondary);padding:var(--spacing-sm) 0}._daysGrid_1mf94_151{display:grid;grid-template-columns:repeat(7,1fr);gap:var(--spacing-xs)}._daysGrid_1mf94_151._withWeekNumbers_1mf94_130{grid-template-columns:40px repeat(7,1fr)}._weekView_1mf94_161{grid-template-rows:repeat(1,minmax(300px,1fr))}._weekView_1mf94_161 ._dayCell_1mf94_165{min-height:300px;display:flex;flex-direction:column;border-left:1px solid var(--color-border);position:relative}._weekView_1mf94_161 ._dayCell_1mf94_165:first-child{border-left:none}._weekView_1mf94_161 ._dayCell_1mf94_165:before{content:"";position:absolute;top:60px;left:0;right:0;height:1px;background:repeating-linear-gradient(to right,var(--color-border) 0px,var(--color-border) 1px,transparent 1px,transparent 20px);opacity:.3}._weekView_1mf94_161 ._dayNumber_1mf94_194{font-size:var(--font-size-lg);font-weight:700;margin-bottom:var(--spacing-sm);text-align:center;padding:var(--spacing-sm);border-bottom:2px solid var(--color-border);background:var(--color-background-secondary);position:sticky;top:0;z-index:2}._weekView_1mf94_161 ._dayCell_1mf94_165._today_1mf94_76 ._dayNumber_1mf94_194{background:var(--color-primary);color:var(--color-text-inverse);border-bottom-color:var(--color-primary)}._weekView_1mf94_161 ._events_1mf94_213{flex:1;padding:var(--spacing-sm);gap:var(--spacing-xs);position:relative}._weekView_1mf94_161 ._event_1mf94_213{padding:var(--spacing-sm);font-size:var(--font-size-sm);border-radius:var(--radius-md);box-shadow:var(--shadow-sm);border-left:3px solid rgba(0,0,0,.2);margin-bottom:var(--spacing-xs);position:relative;overflow:visible;white-space:normal;text-overflow:unset;min-height:auto;height:auto}._weekView_1mf94_161 ._event_1mf94_213:hover{box-shadow:var(--shadow-md);transform:translate(2px)}._weekView_1mf94_161 ._eventTitle_1mf94_240{font-weight:600;line-height:1.2;white-space:normal;text-overflow:unset;overflow:visible;word-wrap:break-word}._weekView_1mf94_161 ._eventTime_1mf94_249{font-size:var(--font-size-xs);font-weight:700;background:var(--color-background-secondary);color:var(--color-text);padding:2px 6px;border-radius:var(--radius-sm);margin-right:var(--spacing-xs);border:1px solid var(--color-border);display:inline-block}._dayCell_1mf94_165{min-height:100px;padding:var(--spacing-xs);border:1px solid var(--color-border);border-radius:var(--radius-sm);background:var(--color-background);position:relative;overflow:hidden;cursor:pointer}._dayCell_1mf94_165:hover{border-color:var(--color-border-hover);box-shadow:var(--shadow-sm)}._dayCell_1mf94_165._today_1mf94_76{background:var(--color-primary-light);border-color:var(--color-primary)}._dayCell_1mf94_165._today_1mf94_76 ._dayNumber_1mf94_194{color:var(--color-primary);font-weight:700}._dayCell_1mf94_165._otherMonth_1mf94_289{background:var(--color-background-tertiary);opacity:.5}._weekNumber_1mf94_134{position:absolute;top:2px;left:2px;font-size:10px;color:var(--color-text-tertiary);background:var(--color-background-secondary);padding:2px 4px;border-radius:var(--radius-xs)}._dayNumber_1mf94_194{font-size:var(--font-size-sm);font-weight:500;color:var(--color-text);margin-bottom:var(--spacing-xs)}._events_1mf94_213{display:flex;flex-direction:column;gap:2px}._event_1mf94_213{display:flex;align-items:center;gap:4px;padding:2px 6px;border-radius:var(--radius-xs);font-size:11px;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:1.3}._event_1mf94_213._completed_1mf94_338{opacity:.7;text-decoration:line-through}._eventTitle_1mf94_240{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:flex;align-items:center;gap:4px}._eventTime_1mf94_249{font-weight:600;margin-right:4px;font-size:10px}._completedIcon_1mf94_359{width:12px;height:12px;flex-shrink:0;stroke-width:2}._moreEvents_1mf94_366{padding:2px 6px;background:var(--color-background-secondary);color:var(--color-text-secondary);font-size:10px;text-align:center;border-radius:var(--radius-xs);margin-top:2px}._emptyState_1mf94_376{display:flex;align-items:center;justify-content:center;height:100%;color:var(--color-text-tertiary);font-size:var(--font-size-xs)}._dayView_1mf94_386{display:flex;flex-direction:column;height:600px;border:1px solid var(--color-border);border-radius:var(--radius-md);overflow:hidden}._dayViewHeader_1mf94_395{display:flex;border-bottom:2px solid var(--color-border);background:var(--color-background-secondary);position:sticky;top:0;z-index:5;width:100%}._timeColumnHeader_1mf94_405{width:80px;flex-shrink:0;border-right:1px solid var(--color-border);background:var(--color-background-secondary)}._dayColumnHeader_1mf94_412{flex:1;padding:var(--spacing-md);text-align:center;font-weight:600;color:var(--color-text);background:var(--color-background)}._dayViewScrollContainer_1mf94_421{flex:1;overflow-y:auto;overflow-x:hidden;position:relative;width:100%}._dayViewContent_1mf94_429{display:flex;min-height:100%;width:100%}._timeColumn_1mf94_405{width:80px;border-right:1px solid var(--color-border);background:var(--color-background-secondary);flex-shrink:0}._dayColumn_1mf94_412{flex:1;position:relative}._timeSlot_1mf94_447{height:60px;display:flex;align-items:flex-start;justify-content:center;padding-top:var(--spacing-xs);border-bottom:1px solid var(--color-border)}._timeLabel_1mf94_456{font-size:var(--font-size-xs);color:var(--color-text-secondary);font-weight:500}._hourSlot_1mf94_462{height:60px;position:relative;border-bottom:1px solid var(--color-border);padding:var(--spacing-xs);cursor:pointer;transition:background-color .2s ease}._hourSlot_1mf94_462:hover{background-color:#00000005}._hourLine_1mf94_475{position:absolute;top:0;left:0;right:0;height:1px;background:var(--color-border);z-index:1}._dayEvent_1mf94_485{display:flex;align-items:center;gap:var(--spacing-xs);padding:var(--spacing-xs) var(--spacing-sm);margin-bottom:var(--spacing-xs);border-radius:var(--radius-sm);font-size:var(--font-size-sm);cursor:pointer;position:relative;min-height:32px;box-shadow:var(--shadow-sm);border-left:3px solid rgba(0,0,0,.2);z-index:2}._dayEvent_1mf94_485:hover{box-shadow:var(--shadow-md);transform:translate(2px)}._dayEventTitle_1mf94_506{flex:1;display:flex;flex-direction:column;gap:2px;line-height:1.2}._dayEventTime_1mf94_514{font-size:var(--font-size-xs);font-weight:700;opacity:.9}._dayEvent_1mf94_485._completed_1mf94_338{opacity:.7;text-decoration:line-through}._currentTimeIndicator_1mf94_526{position:absolute;left:0;right:0;height:2px;background:var(--color-primary);z-index:10;border-radius:1px;pointer-events:none;box-shadow:0 1px 3px #0003}._currentTimeIndicator_1mf94_526:before{content:"";position:absolute;left:-8px;top:-4px;width:10px;height:10px;background:var(--color-primary);border-radius:50%;box-shadow:0 0 0 2px var(--color-background);animation:_pulse_1mf94_1 2s ease-in-out infinite}@keyframes _pulse_1mf94_1{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.2);opacity:.8}}@media (max-width: 768px){._calendar_1mf94_2{padding:var(--spacing-md);border-radius:var(--radius-md)}._header_1mf94_27{flex-direction:column;gap:var(--spacing-sm);margin-bottom:var(--spacing-md)}._navigation_1mf94_35{order:2;width:100%;justify-content:center}._controls_1mf94_70{order:1;width:100%;justify-content:center;flex-wrap:wrap}._navButton_1mf94_41{width:32px;height:32px}._title_1mf94_60{font-size:var(--font-size-lg);min-width:auto}._todayButton_1mf94_76{padding:var(--spacing-xs) var(--spacing-sm);font-size:var(--font-size-sm)}._viewButton_1mf94_99{padding:var(--spacing-xs) var(--spacing-sm);font-size:var(--font-size-xs)}._weekDays_1mf94_123{gap:1px;margin-bottom:var(--spacing-sm)}._weekDay_1mf94_123{font-size:11px;padding:var(--spacing-xs) 0}._daysGrid_1mf94_151{gap:1px}._dayCell_1mf94_165{min-height:70px;padding:4px}._weekView_1mf94_161 ._dayCell_1mf94_165{min-height:180px}._weekView_1mf94_161 ._dayNumber_1mf94_194{font-size:var(--font-size-md);padding:var(--spacing-xs);margin-bottom:var(--spacing-xs)}._weekView_1mf94_161 ._events_1mf94_213{gap:2px;padding:4px}._weekView_1mf94_161 ._event_1mf94_213{padding:4px 6px;font-size:10px}._weekView_1mf94_161 ._eventTime_1mf94_249{font-size:8px;padding:1px 3px}._dayNumber_1mf94_194{font-size:12px;margin-bottom:2px;font-weight:600}._events_1mf94_213{gap:1px}._event_1mf94_213{font-size:9px;padding:1px 4px;border-radius:2px}._eventTime_1mf94_249{font-size:8px;margin-right:2px}._moreEvents_1mf94_366{font-size:8px;padding:1px 4px}._completedIcon_1mf94_359{width:10px;height:10px}._weekNumber_1mf94_134{font-size:8px;padding:1px 3px}._dayView_1mf94_386{height:500px}._timeColumn_1mf94_405,._timeColumnHeader_1mf94_405{width:60px}._timeLabel_1mf94_456{font-size:10px}._dayEvent_1mf94_485{padding:4px 6px;font-size:12px;min-height:28px}._dayEventTime_1mf94_514{font-size:10px}}@media (max-width: 480px){._calendar_1mf94_2{padding:var(--spacing-sm);border-radius:var(--radius-sm)}._header_1mf94_27{gap:var(--spacing-xs)}._navButton_1mf94_41{width:28px;height:28px}._title_1mf94_60{font-size:var(--font-size-md)}._todayButton_1mf94_76{padding:var(--spacing-xs);font-size:11px}._viewButton_1mf94_99{padding:var(--spacing-xs);font-size:10px}._weekDay_1mf94_123{font-size:10px;padding:4px 0}._dayCell_1mf94_165{min-height:60px;padding:2px}._weekView_1mf94_161 ._dayCell_1mf94_165{min-height:100px}._dayNumber_1mf94_194{font-size:11px;margin-bottom:1px}._event_1mf94_213{font-size:8px;padding:1px 2px}._eventTime_1mf94_249{font-size:7px;margin-right:1px}._moreEvents_1mf94_366{font-size:7px;padding:1px 2px}._completedIcon_1mf94_359{width:8px;height:8px}}@media (prefers-color-scheme: dark){._calendar_1mf94_2{box-shadow:var(--shadow-dark-md)}._event_1mf94_213{box-shadow:none}._event_1mf94_213:hover{box-shadow:var(--shadow-dark-sm)}}@media (prefers-contrast: high){._dayCell_1mf94_165{border-width:2px}._dayCell_1mf94_165._today_1mf94_76{border-width:3px}._event_1mf94_213{border:1px solid var(--color-text-inverse)}}@media (prefers-reduced-motion: reduce){._calendar_1mf94_2 *{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
|
|
@@ -0,0 +1,470 @@
|
|
|
1
|
+
import{r as _,j as e}from"./iframe-Cz1R6gKZ.js";import{m as q}from"./proxy-CAwOFzsk.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-C_Ro_xsO.js";const ze="_calendar_1mf94_2",Fe="_loading_1mf94_14",Pe="_loadingSpinner_1mf94_21",Ae="_header_1mf94_27",We="_navigation_1mf94_35",qe="_navButton_1mf94_41",Ge="_title_1mf94_60",Oe="_controls_1mf94_70",Ue="_todayButton_1mf94_76",Ye="_viewToggle_1mf94_92",Ke="_viewButton_1mf94_99",Je="_active_1mf94_113",Qe="_weekDays_1mf94_123",Xe="_weekNumberHeader_1mf94_134",Ze="_weekDay_1mf94_123",et="_daysGrid_1mf94_151",tt="_weekView_1mf94_161",nt="_dayCell_1mf94_165",at="_dayNumber_1mf94_194",it="_today_1mf94_76",ot="_events_1mf94_213",st="_event_1mf94_213",rt="_eventTitle_1mf94_240",dt="_eventTime_1mf94_249",lt="_otherMonth_1mf94_289",ct="_weekNumber_1mf94_134",mt="_completed_1mf94_338",pt="_completedIcon_1mf94_359",ut="_moreEvents_1mf94_366",vt="_emptyState_1mf94_376",gt="_dayView_1mf94_386",yt="_dayViewHeader_1mf94_395",ht="_timeColumnHeader_1mf94_405",wt="_dayColumnHeader_1mf94_412",ft="_dayViewScrollContainer_1mf94_421",Dt="_dayViewContent_1mf94_429",xt="_timeColumn_1mf94_405",Ct="_dayColumn_1mf94_412",kt="_timeSlot_1mf94_447",_t="_timeLabel_1mf94_456",St="_hourSlot_1mf94_462",Et="_hourLine_1mf94_475",bt="_dayEvent_1mf94_485",jt="_dayEventTitle_1mf94_506",Tt="_dayEventTime_1mf94_514",Mt="_currentTimeIndicator_1mf94_526",n={calendar:ze,loading:Fe,loadingSpinner:Pe,header:Ae,navigation:We,navButton:qe,title:Ge,controls:Oe,todayButton:Ue,viewToggle:Ye,viewButton:Ke,active:Je,weekDays:Qe,weekNumberHeader:Xe,weekDay:Ze,daysGrid:et,weekView:tt,dayCell:nt,dayNumber:at,today:it,events:ot,event:st,eventTitle:rt,eventTime:dt,otherMonth:lt,weekNumber:ct,completed:mt,completedIcon:pt,moreEvents:ut,emptyState:vt,dayView:gt,dayViewHeader:yt,timeColumnHeader:ht,dayColumnHeader:wt,dayViewScrollContainer:ft,dayViewContent:Dt,timeColumn:xt,dayColumn:Ct,timeSlot:kt,timeLabel:_t,hourSlot:St,hourLine:Et,dayEvent:bt,dayEventTitle:jt,dayEventTime:Tt,currentTimeIndicator:Mt};function x({events:s,onEventClick:l,onDateClick:d,onEventClickByView:u,onDateClickByView:y,onTimeSlotClick:f,viewMode:v="month",initialDate:g=new Date,config:C={},className:w="",style:G={},loading:Ee=!1,emptyState:O,hideHeader:be=!1}){const[c,I]=_.useState(g),[r,z]=_.useState(v),b=_.useRef(null),{eventColors:U={},iconRenderer:j,maxEventsPerDay:F=3,mondayStart:E=!1,showWeekNumbers:Y=!1,dateFormat:K={month:"long",year:"numeric"},locale:S="en-US",dayLabels:je,monthNames:T}=C,Te=je||(E?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]);_.useEffect(()=>{if(r==="day"&&b.current){const t=new Date;if(c.toDateString()===t.toDateString()){const i=t.getHours(),a=t.getMinutes(),h=(i*60+a)/60*60-100;setTimeout(()=>{b.current&&(b.current.scrollTop=Math.max(0,h))},0)}}},[r,c]);const J=_.useMemo(()=>{const t=c.getFullYear(),o=c.getMonth();let i,a,m;if(r==="week"){i=new Date(c);const D=i.getDay(),k=E?i.getDate()-D+(D===0?-6:1):i.getDate()-D;i=new Date(i.setDate(k)),i.setHours(0,0,0,0),a=new Date(i),a.setDate(a.getDate()+6);const A=i.toLocaleDateString(S,{day:"numeric",month:"short"}),W=a.toLocaleDateString(S,{day:"numeric",month:"short"});m=`${A} - ${W}`}else if(r==="day")i=new Date(c),i.setHours(0,0,0,0),a=new Date(c),a.setHours(23,59,59,999),m=c.toLocaleDateString(S,{weekday:"long",year:"numeric",month:"long",day:"numeric"});else{const D=new Date(t,o,1),k=new Date(t,o+1,0);i=new Date(D);const A=E?(D.getDay()+6)%7:D.getDay();i.setDate(i.getDate()-A),a=new Date(k);const W=E?(k.getDay()+6)%7:k.getDay();a.setDate(a.getDate()+(6-W)),T&&T[o]?m=`${T[o]} ${t}`:m=c.toLocaleDateString(S,K)}const h=[],p=new Date(i);for(;p<=a;)h.push(new Date(p)),p.setDate(p.getDate()+1);return{days:h,displayTitle:m}},[c,r,E,S,K,T]),Q=t=>{const o=s.filter(i=>new Date(i.date).toDateString()===t.toDateString());return r==="week"?o.sort((i,a)=>{const m=i.time?X(i.time):999999,h=a.time?X(a.time):999999;return m-h}):o},X=t=>{const[o,i]=t.split(":").map(Number);return o*60+i},Me=()=>{const t=new Date(c);r==="week"?t.setDate(t.getDate()-7):r==="day"?t.setDate(t.getDate()-1):t.setMonth(t.getMonth()-1),I(t)},Ne=()=>{const t=new Date(c);r==="week"?t.setDate(t.getDate()+7):r==="day"?t.setDate(t.getDate()+1):t.setMonth(t.getMonth()+1),I(t)},$e=()=>{I(new Date)},P=t=>{if(t.color)return t.color;if(t.type&&U[t.type])return U[t.type];const o={high:"#FF4444",medium:"#FFA500",low:"#4A90E2"};return t.priority&&o[t.priority]?o[t.priority]:"#4A90E2"},Be=t=>{const o=t.replace("#",""),i=parseInt(o.substring(0,2),16),a=parseInt(o.substring(2,4),16),m=parseInt(o.substring(4,6),16);return(.299*i+.587*a+.114*m)/255>.5?"#000000":"#FFFFFF"},Z=t=>{if(t.textColor)return t.textColor;const o=P(t);return Be(o)},ee=t=>{u&&u[r]?u[r](t):l&&l(t)},Ve=t=>{y&&y[r]?y[r](t):d&&d(t)},Le=t=>{if(f){const o=new Date(c);o.setHours(t,0,0,0);const i=`${t.toString().padStart(2,"0")}:00`;f(o,t,i)}},He=t=>{const o=new Date;return t.toDateString()===o.toDateString()},Re=t=>t.getMonth()===c.getMonth(),Ie=t=>{const o=new Date(t.getFullYear(),0,1),i=t.getTime()-o.getTime(),a=1e3*60*60*24*7;return Math.floor(i/a)+1};return Ee?e.jsx("div",{className:`${n.calendar} ${n.loading} ${w}`,style:G,children:e.jsx("div",{className:n.loadingSpinner,children:"Loading..."})}):e.jsxs("div",{className:`${n.calendar} ${w}`,style:G,children:[!be&&e.jsxs("div",{className:n.header,children:[e.jsxs("div",{className:n.navigation,children:[e.jsx("button",{onClick:Me,className:n.navButton,"aria-label":"Previous",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:e.jsx("polyline",{points:"15,18 9,12 15,6"})})}),e.jsx("h3",{className:n.title,children:J.displayTitle}),e.jsx("button",{onClick:Ne,className:n.navButton,"aria-label":"Next",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:e.jsx("polyline",{points:"9,6 15,12 9,18"})})})]}),e.jsxs("div",{className:n.controls,children:[e.jsx("button",{onClick:$e,className:n.todayButton,children:"Today"}),e.jsxs("div",{className:n.viewToggle,children:[e.jsx("button",{className:`${n.viewButton} ${r==="month"?n.active:""}`,onClick:()=>z("month"),children:"Month"}),e.jsx("button",{className:`${n.viewButton} ${r==="week"?n.active:""}`,onClick:()=>z("week"),children:"Week"}),e.jsx("button",{className:`${n.viewButton} ${r==="day"?n.active:""}`,onClick:()=>z("day"),children:"Day"})]})]})]}),r!=="day"&&e.jsxs("div",{className:n.weekDays,children:[Y&&e.jsx("div",{className:n.weekNumberHeader,children:"Week"}),Te.map(t=>e.jsx("div",{className:n.weekDay,children:t},t))]}),r==="day"?e.jsxs("div",{className:n.dayView,children:[e.jsxs("div",{className:n.dayViewHeader,children:[e.jsx("div",{className:n.timeColumnHeader}),e.jsx("div",{className:n.dayColumnHeader,children:c.toLocaleDateString(S,{weekday:"short",day:"numeric"})})]}),e.jsx("div",{className:n.dayViewScrollContainer,ref:b,children:e.jsxs("div",{className:n.dayViewContent,children:[(()=>{const t=new Date,o=t.getHours(),i=t.getMinutes(),m=(o*60+i)/1440*(24*60);return c.toDateString()===t.toDateString()?e.jsx("div",{className:n.currentTimeIndicator,style:{top:`${m}px`}}):null})(),e.jsx("div",{className:n.timeColumn,children:Array.from({length:24},(t,o)=>e.jsx("div",{className:n.timeSlot,children:e.jsxs("span",{className:n.timeLabel,children:[o.toString().padStart(2,"0"),":00"]})},o))}),e.jsx("div",{className:n.dayColumn,children:Array.from({length:24},(t,o)=>{const i=Q(c).filter(a=>a.time?parseInt(a.time.split(":")[0])===o:!1);return e.jsxs("div",{className:n.hourSlot,onClick:a=>{(a.target===a.currentTarget||a.target.classList.contains(n.hourLine))&&Le(o)},style:{cursor:"pointer"},children:[e.jsx("div",{className:n.hourLine}),i.map((a,m)=>e.jsxs(q.div,{className:`${n.dayEvent} ${a.status==="completed"?n.completed:""}`,style:{backgroundColor:P(a),color:Z(a),opacity:a.status==="completed"?.7:1},onClick:h=>{h.stopPropagation(),ee(a)},initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.2,delay:m*.05,ease:"easeOut"},whileHover:{scale:1.02,y:-1,transition:{duration:.1}},whileTap:{scale:.98,transition:{duration:.1}},children:[j&&j(a),e.jsxs("span",{className:n.dayEventTitle,children:[e.jsx("span",{className:n.dayEventTime,children:a.time}),a.title]}),a.status==="completed"&&e.jsx("svg",{className:n.completedIcon,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:e.jsx("polyline",{points:"20,6 9,17 4,12"})})]},a.id))]},o)})})]})})]}):e.jsx("div",{className:`${n.daysGrid} ${r==="week"?n.weekView:""}`,children:J.days.map((t,o)=>{const i=Q(t),a=He(t),m=r==="week"||Re(t),h=Y&&o%7===0;return e.jsxs(q.div,{className:`${n.dayCell} ${a?n.today:""} ${m?"":n.otherMonth}`,initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,delay:o*.02,ease:"easeOut"},onClick:()=>Ve(t),children:[h&&e.jsx("div",{className:n.weekNumber,children:Ie(t)}),e.jsx("div",{className:n.dayNumber,children:t.getDate()}),i.length>0&&e.jsxs("div",{className:n.events,children:[i.slice(0,F).map((p,D)=>e.jsxs(q.div,{className:`${n.event} ${p.status==="completed"?n.completed:""}`,style:{backgroundColor:P(p),color:Z(p),opacity:p.status==="completed"?.7:1},onClick:k=>{k.stopPropagation(),ee(p)},initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.2,delay:D*.05,ease:"easeOut"},whileHover:{scale:1.02,y:-1,transition:{duration:.1}},whileTap:{scale:.98,transition:{duration:.1}},children:[j&&j(p),e.jsxs("span",{className:n.eventTitle,children:[p.time&&e.jsx("span",{className:n.eventTime,children:p.time}),p.title]}),p.status==="completed"&&e.jsx("svg",{className:n.completedIcon,width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",children:e.jsx("polyline",{points:"20,6 9,17 4,12"})})]},p.id)),i.length>F&&e.jsxs("div",{className:n.moreEvents,children:["+",i.length-F," more"]})]}),i.length===0&&O&&e.jsx("div",{className:n.emptyState,children:O})]},`${t.getFullYear()}-${t.getMonth()}-${t.getDate()}`)})})]})}x.__docgenInfo={description:`Calendar component - A flexible, reusable calendar for displaying events
|
|
2
|
+
|
|
3
|
+
@component
|
|
4
|
+
@description
|
|
5
|
+
A highly customizable calendar component that can display events in month or week view.
|
|
6
|
+
Supports custom event types, colors, icons, and localization. Perfect for scheduling,
|
|
7
|
+
project management, habit tracking, or any date-based data visualization.
|
|
8
|
+
|
|
9
|
+
@example
|
|
10
|
+
// Basic usage
|
|
11
|
+
<Calendar
|
|
12
|
+
events={myEvents}
|
|
13
|
+
onEventClick={handleEventClick}
|
|
14
|
+
viewMode="month"
|
|
15
|
+
/>
|
|
16
|
+
|
|
17
|
+
@example
|
|
18
|
+
// With custom configuration
|
|
19
|
+
<Calendar
|
|
20
|
+
events={projectEvents}
|
|
21
|
+
config={{
|
|
22
|
+
eventColors: { task: '#4A90E2', meeting: '#7ED321' },
|
|
23
|
+
maxEventsPerDay: 5,
|
|
24
|
+
mondayStart: true
|
|
25
|
+
}}
|
|
26
|
+
onEventClick={handleEventClick}
|
|
27
|
+
/>`,methods:[],displayName:"Calendar",props:{events:{required:!0,tsType:{name:"Array",elements:[{name:"CalendarEvent"}],raw:"CalendarEvent[]"},description:"Array of events to display"},onEventClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(event: CalendarEvent) => void",signature:{arguments:[{type:{name:"CalendarEvent"},name:"event"}],return:{name:"void"}}},description:"Callback when an event is clicked"},onDateClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(date: Date) => void",signature:{arguments:[{type:{name:"Date"},name:"date"}],return:{name:"void"}}},description:"Callback when a date is clicked"},onEventClickByView:{required:!1,tsType:{name:"signature",type:"object",raw:`{
|
|
28
|
+
month?: (event: CalendarEvent) => void;
|
|
29
|
+
week?: (event: CalendarEvent) => void;
|
|
30
|
+
day?: (event: CalendarEvent) => void;
|
|
31
|
+
}`,signature:{properties:[{key:"month",value:{name:"signature",type:"function",raw:"(event: CalendarEvent) => void",signature:{arguments:[{type:{name:"CalendarEvent"},name:"event"}],return:{name:"void"}},required:!1}},{key:"week",value:{name:"signature",type:"function",raw:"(event: CalendarEvent) => void",signature:{arguments:[{type:{name:"CalendarEvent"},name:"event"}],return:{name:"void"}},required:!1}},{key:"day",value:{name:"signature",type:"function",raw:"(event: CalendarEvent) => void",signature:{arguments:[{type:{name:"CalendarEvent"},name:"event"}],return:{name:"void"}},required:!1}}]}},description:"View-specific event click handlers"},onDateClickByView:{required:!1,tsType:{name:"signature",type:"object",raw:`{
|
|
32
|
+
month?: (date: Date) => void;
|
|
33
|
+
week?: (date: Date) => void;
|
|
34
|
+
day?: (date: Date) => void;
|
|
35
|
+
}`,signature:{properties:[{key:"month",value:{name:"signature",type:"function",raw:"(date: Date) => void",signature:{arguments:[{type:{name:"Date"},name:"date"}],return:{name:"void"}},required:!1}},{key:"week",value:{name:"signature",type:"function",raw:"(date: Date) => void",signature:{arguments:[{type:{name:"Date"},name:"date"}],return:{name:"void"}},required:!1}},{key:"day",value:{name:"signature",type:"function",raw:"(date: Date) => void",signature:{arguments:[{type:{name:"Date"},name:"date"}],return:{name:"void"}},required:!1}}]}},description:"View-specific date click handlers"},onTimeSlotClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(date: Date, hour: number, time: string) => void",signature:{arguments:[{type:{name:"Date"},name:"date"},{type:{name:"number"},name:"hour"},{type:{name:"string"},name:"time"}],return:{name:"void"}}},description:"Callback when a time slot is clicked in day view"},viewMode:{required:!1,tsType:{name:"union",raw:"'month' | 'week' | 'day'",elements:[{name:"literal",value:"'month'"},{name:"literal",value:"'week'"},{name:"literal",value:"'day'"}]},description:"Initial view mode",defaultValue:{value:"'month'",computed:!1}},initialDate:{required:!1,tsType:{name:"Date"},description:"Initial date to display",defaultValue:{value:"new Date()",computed:!1}},config:{required:!1,tsType:{name:"CalendarConfig"},description:"Configuration options",defaultValue:{value:"{}",computed:!1}},className:{required:!1,tsType:{name:"string"},description:"Custom CSS class",defaultValue:{value:"''",computed:!1}},style:{required:!1,tsType:{name:"ReactCSSProperties",raw:"React.CSSProperties"},description:"Custom styles",defaultValue:{value:"{}",computed:!1}},loading:{required:!1,tsType:{name:"boolean"},description:"Loading state",defaultValue:{value:"false",computed:!1}},emptyState:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:"Custom empty state component"},hideHeader:{required:!1,tsType:{name:"boolean"},description:"Hide the calendar header (navigation, title, view controls)",defaultValue:{value:"false",computed:!1}}}};const Ht={title:"Organisms/Calendar",component:x,parameters:{layout:"padded",docs:{description:{component:"A flexible, customizable calendar component for displaying events in month or week view. Perfect for scheduling, project management, habit tracking, or any date-based data visualization."}}},tags:["autodocs"],argTypes:{events:{control:"object",description:"Array of events to display on the calendar"},viewMode:{control:"radio",options:["month","week"],description:"Initial view mode for the calendar"},onEventClick:{action:"event-clicked"},onDateClick:{action:"date-clicked"}}},Se=()=>{const s=new Date,l=[];for(let d=0;d<12;d++){const u=new Date(s);u.setDate(s.getDate()+Math.floor(Math.random()*30)-15),l.push({id:`event-${d}`,title:`Event ${d+1}`,date:u,time:Math.random()>.5?`${9+Math.floor(Math.random()*8)}:${Math.random()>.5?"00":"30"}`:void 0,type:["meeting","task","deadline","milestone"][Math.floor(Math.random()*4)],status:Math.random()>.7?"completed":"pending",priority:["high","medium","low"][Math.floor(Math.random()*3)]})}return l},M={args:{events:Se(),viewMode:"month"}},N={args:{events:Se(),viewMode:"week"}},$={args:{events:[{id:"1",title:"Morning Standup",date:new Date,time:"09:00",type:"meeting",status:"pending",priority:"high"},{id:"2",title:"Code Review",date:new Date,time:"10:30",type:"task",status:"pending",priority:"medium"},{id:"3",title:"Lunch Break",date:new Date,time:"12:00",type:"break",status:"pending",priority:"low"},{id:"4",title:"Team Sync",date:new Date,time:"14:00",type:"meeting",status:"completed",priority:"medium"},{id:"5",title:"Development Work",date:new Date,time:"15:30",type:"task",status:"pending",priority:"high"},{id:"6",title:"Documentation",date:new Date,time:"17:00",type:"task",status:"pending",priority:"low"}],viewMode:"day"}},B={args:{events:[]},render:()=>{const[s,l]=_.useState([{id:"1",title:"Sprint Planning",date:new Date,time:"09:00",type:"meeting",status:"pending",priority:"high"},{id:"2",title:"Code Review",date:new Date(Date.now()+864e5),time:"14:30",type:"review",status:"completed",priority:"medium"},{id:"3",title:"Design Sprint",date:new Date(Date.now()+1728e5),type:"workshop",status:"pending",priority:"medium"}]),[d,u]=_.useState([]),y=v=>{const g=new Date().toLocaleTimeString();l(C=>C.map(w=>w.id===v.id?{...w,status:w.status==="completed"?"pending":"completed"}:w)),u(C=>[`[${g}] 🔄 Toggled "${v.title}" status`,...C.slice(0,4)])},f=v=>{const g=new Date().toLocaleTimeString(),C={id:`new-${Date.now()}`,title:"New Event",date:v,time:"15:00",type:"meeting",status:"pending",priority:"medium"};l(w=>[...w,C]),u(w=>[`[${g}] ➕ Added event on ${v.toLocaleDateString()}`,...w.slice(0,4)])};return e.jsxs("div",{children:[e.jsxs("div",{style:{padding:"var(--spacing-md)",background:"var(--color-primary-light)",borderRadius:"var(--radius-md)",marginBottom:"var(--spacing-lg)"},children:[e.jsx("h4",{style:{margin:"0 0 var(--spacing-xs) 0",color:"var(--color-primary)"},children:"🎯 Interactive Demo"}),e.jsx("p",{style:{margin:0,fontSize:"var(--font-size-sm)",color:"var(--color-text-secondary)"},children:"• Click events to toggle status • Click dates to add new events"})]}),e.jsx(x,{events:s,onEventClick:y,onDateClick:f,config:{eventColors:{meeting:"#4A90E2",review:"#BD10E0",workshop:"#4ECDC4"},iconRenderer:v=>{const g={meeting:"👥",review:"👀",workshop:"🎨"};return e.jsx("span",{style:{fontSize:"11px"},children:g[v.type]||"📅"})}},viewMode:"month"}),d.length>0&&e.jsxs("div",{style:{marginTop:"var(--spacing-lg)",padding:"var(--spacing-md)",background:"var(--color-background-secondary)",borderRadius:"var(--radius-md)"},children:[e.jsx("h5",{style:{margin:"0 0 var(--spacing-sm) 0",color:"var(--color-text)"},children:"Recent Actions:"}),d.map((v,g)=>e.jsx("div",{style:{padding:"var(--spacing-xs)",margin:"2px 0",background:"var(--color-background)",borderRadius:"var(--radius-xs)",fontSize:"var(--font-size-xs)",fontFamily:"monospace"},children:v},g))]})]})}},V={args:{events:[]},render:()=>{const s=[],l=new Date,d=["Exercise","Meditation","Reading","Water","Sleep"],u=["💪","🧘","📚","💧","😴"];for(let y=-7;y<=7;y++){const f=new Date(l);f.setDate(l.getDate()+y),d.forEach((v,g)=>{Math.random()>.3&&s.push({id:`habit-${y}-${g}`,title:v,date:new Date(f),type:"habit",status:Math.random()>.1?"completed":"pending",color:`hsl(${g*70}, 70%, 50%)`,metadata:{icon:u[g]}})})}return e.jsxs("div",{children:[e.jsx("h3",{style:{marginBottom:"var(--spacing-md)",color:"var(--color-text)"},children:"🎯 Habit Tracking Use Case"}),e.jsx(x,{events:s,config:{iconRenderer:y=>{var f;return e.jsx("span",{style:{fontSize:"10px"},children:((f=y.metadata)==null?void 0:f.icon)||"✓"})},maxEventsPerDay:8,mondayStart:!0},viewMode:"month"})]})}},L={args:{events:[]},render:()=>{const s=new Date,l=[{id:"schedule-1",title:"Team Standup and a very long text for a task that never ends",date:new Date(s.getTime()-(s.getDay()-1)*24*60*60*1e3),time:"09:00",type:"meeting",status:"pending",priority:"medium"},{id:"schedule-2",title:"Code Review",date:new Date(s.getTime()-(s.getDay()-1)*24*60*60*1e3),time:"11:30",type:"review",status:"completed",priority:"high"},{id:"schedule-3",title:"Client Call",date:new Date(s.getTime()-(s.getDay()-2)*24*60*60*1e3),time:"10:00",type:"call",status:"pending",priority:"high"},{id:"schedule-4",title:"Sprint Planning",date:new Date(s.getTime()-(s.getDay()-2)*24*60*60*1e3),time:"14:00",type:"meeting",status:"pending",priority:"high"},{id:"schedule-5",title:"Demo Day",date:new Date(s.getTime()-(s.getDay()-5)*24*60*60*1e3),time:"13:00",type:"presentation",status:"pending",priority:"high"}];return e.jsxs("div",{children:[e.jsx("h3",{style:{marginBottom:"var(--spacing-md)",color:"var(--color-text)"},children:"📅 Event Scheduling (Week View)"}),e.jsx(x,{events:l,config:{eventColors:{meeting:"#4A90E2",call:"#7ED321",review:"#BD10E0",presentation:"#FF6B6B"},iconRenderer:d=>{const u={meeting:"👥",call:"📞",review:"👀",presentation:"🎯"};return e.jsx("span",{style:{fontSize:"12px"},children:u[d.type]||"📅"})},maxEventsPerDay:6,mondayStart:!0},viewMode:"week"})]})}},H={args:{events:[]},render:()=>{const s=[{id:"custom-1",title:"VIP Client Meeting",date:new Date,time:"10:00",type:"vip",status:"pending",priority:"high"},{id:"custom-2",title:"Design Sprint",date:new Date(Date.now()+864e5),type:"workshop",status:"pending",priority:"medium"},{id:"custom-3",title:"Project Milestone ✓",date:new Date(Date.now()-864e5),type:"milestone",status:"completed",priority:"high"}];return e.jsxs("div",{children:[e.jsx("h3",{style:{marginBottom:"var(--spacing-md)",color:"var(--color-text)"},children:"🎨 Custom Colors, Icons & Configuration"}),e.jsx(x,{events:s,config:{eventColors:{vip:"#FF6B6B",workshop:"#4ECDC4",milestone:"#F39C12"},iconRenderer:l=>l.type==="vip"?e.jsx("span",{style:{fontSize:"12px"},children:"⭐"}):l.type==="workshop"?e.jsx("span",{style:{fontSize:"12px"},children:"🎨"}):l.type==="milestone"?e.jsx("span",{style:{fontSize:"12px"},children:"🎯"}):e.jsx("span",{style:{fontSize:"12px"},children:"📅"}),maxEventsPerDay:6,mondayStart:!0,showWeekNumbers:!0,locale:"en-US"},viewMode:"month"})]})}},R={args:{events:[]},render:()=>{const s=[],l=new Date;for(let d=0;d<6;d++)s.push({id:`many-${d}`,title:`Meeting ${d+1}`,date:l,time:`${9+d}:00`,type:"meeting",status:"pending",priority:"medium"});return e.jsxs("div",{style:{display:"grid",gap:"var(--spacing-xl)"},children:[e.jsxs("div",{children:[e.jsx("h4",{style:{margin:"0 0 var(--spacing-md) 0",color:"var(--color-text)"},children:'📊 Many Events (shows "more" indicator)'}),e.jsx(x,{events:s,config:{maxEventsPerDay:3},viewMode:"month"})]}),e.jsxs("div",{children:[e.jsx("h4",{style:{margin:"0 0 var(--spacing-md) 0",color:"var(--color-text)"},children:"💨 Loading State"}),e.jsx(x,{events:[],loading:!0})]}),e.jsxs("div",{children:[e.jsx("h4",{style:{margin:"0 0 var(--spacing-md) 0",color:"var(--color-text)"},children:"📭 Empty State"}),e.jsx(x,{events:[],emptyState:e.jsx("span",{style:{color:"var(--color-text-tertiary)",fontSize:"11px"},children:"No events"})})]})]})}};var te,ne,ae;M.parameters={...M.parameters,docs:{...(te=M.parameters)==null?void 0:te.docs,source:{originalSource:`{
|
|
36
|
+
args: {
|
|
37
|
+
events: generateSampleEvents(),
|
|
38
|
+
viewMode: 'month'
|
|
39
|
+
}
|
|
40
|
+
}`,...(ae=(ne=M.parameters)==null?void 0:ne.docs)==null?void 0:ae.source}}};var ie,oe,se;N.parameters={...N.parameters,docs:{...(ie=N.parameters)==null?void 0:ie.docs,source:{originalSource:`{
|
|
41
|
+
args: {
|
|
42
|
+
events: generateSampleEvents(),
|
|
43
|
+
viewMode: 'week'
|
|
44
|
+
}
|
|
45
|
+
}`,...(se=(oe=N.parameters)==null?void 0:oe.docs)==null?void 0:se.source}}};var re,de,le;$.parameters={...$.parameters,docs:{...(re=$.parameters)==null?void 0:re.docs,source:{originalSource:`{
|
|
46
|
+
args: {
|
|
47
|
+
events: [{
|
|
48
|
+
id: '1',
|
|
49
|
+
title: 'Morning Standup',
|
|
50
|
+
date: new Date(),
|
|
51
|
+
time: '09:00',
|
|
52
|
+
type: 'meeting',
|
|
53
|
+
status: 'pending',
|
|
54
|
+
priority: 'high'
|
|
55
|
+
}, {
|
|
56
|
+
id: '2',
|
|
57
|
+
title: 'Code Review',
|
|
58
|
+
date: new Date(),
|
|
59
|
+
time: '10:30',
|
|
60
|
+
type: 'task',
|
|
61
|
+
status: 'pending',
|
|
62
|
+
priority: 'medium'
|
|
63
|
+
}, {
|
|
64
|
+
id: '3',
|
|
65
|
+
title: 'Lunch Break',
|
|
66
|
+
date: new Date(),
|
|
67
|
+
time: '12:00',
|
|
68
|
+
type: 'break',
|
|
69
|
+
status: 'pending',
|
|
70
|
+
priority: 'low'
|
|
71
|
+
}, {
|
|
72
|
+
id: '4',
|
|
73
|
+
title: 'Team Sync',
|
|
74
|
+
date: new Date(),
|
|
75
|
+
time: '14:00',
|
|
76
|
+
type: 'meeting',
|
|
77
|
+
status: 'completed',
|
|
78
|
+
priority: 'medium'
|
|
79
|
+
}, {
|
|
80
|
+
id: '5',
|
|
81
|
+
title: 'Development Work',
|
|
82
|
+
date: new Date(),
|
|
83
|
+
time: '15:30',
|
|
84
|
+
type: 'task',
|
|
85
|
+
status: 'pending',
|
|
86
|
+
priority: 'high'
|
|
87
|
+
}, {
|
|
88
|
+
id: '6',
|
|
89
|
+
title: 'Documentation',
|
|
90
|
+
date: new Date(),
|
|
91
|
+
time: '17:00',
|
|
92
|
+
type: 'task',
|
|
93
|
+
status: 'pending',
|
|
94
|
+
priority: 'low'
|
|
95
|
+
}],
|
|
96
|
+
viewMode: 'day'
|
|
97
|
+
}
|
|
98
|
+
}`,...(le=(de=$.parameters)==null?void 0:de.docs)==null?void 0:le.source}}};var ce,me,pe;B.parameters={...B.parameters,docs:{...(ce=B.parameters)==null?void 0:ce.docs,source:{originalSource:`{
|
|
99
|
+
args: {
|
|
100
|
+
events: []
|
|
101
|
+
},
|
|
102
|
+
render: () => {
|
|
103
|
+
const [events, setEvents] = useState<CalendarEvent[]>([{
|
|
104
|
+
id: '1',
|
|
105
|
+
title: 'Sprint Planning',
|
|
106
|
+
date: new Date(),
|
|
107
|
+
time: '09:00',
|
|
108
|
+
type: 'meeting',
|
|
109
|
+
status: 'pending',
|
|
110
|
+
priority: 'high'
|
|
111
|
+
}, {
|
|
112
|
+
id: '2',
|
|
113
|
+
title: 'Code Review',
|
|
114
|
+
date: new Date(Date.now() + 24 * 60 * 60 * 1000),
|
|
115
|
+
time: '14:30',
|
|
116
|
+
type: 'review',
|
|
117
|
+
status: 'completed',
|
|
118
|
+
priority: 'medium'
|
|
119
|
+
}, {
|
|
120
|
+
id: '3',
|
|
121
|
+
title: 'Design Sprint',
|
|
122
|
+
date: new Date(Date.now() + 2 * 24 * 60 * 60 * 1000),
|
|
123
|
+
type: 'workshop',
|
|
124
|
+
status: 'pending',
|
|
125
|
+
priority: 'medium'
|
|
126
|
+
}]);
|
|
127
|
+
const [actionLog, setActionLog] = useState<string[]>([]);
|
|
128
|
+
const handleEventClick = (event: CalendarEvent) => {
|
|
129
|
+
const timestamp = new Date().toLocaleTimeString();
|
|
130
|
+
|
|
131
|
+
// Toggle status and log action
|
|
132
|
+
setEvents(prev => prev.map(e => e.id === event.id ? {
|
|
133
|
+
...e,
|
|
134
|
+
status: e.status === 'completed' ? 'pending' : 'completed'
|
|
135
|
+
} : e));
|
|
136
|
+
setActionLog(prev => [\`[\${timestamp}] 🔄 Toggled "\${event.title}" status\`, ...prev.slice(0, 4) // Keep only last 5 logs
|
|
137
|
+
]);
|
|
138
|
+
};
|
|
139
|
+
const handleDateClick = (date: Date) => {
|
|
140
|
+
const timestamp = new Date().toLocaleTimeString();
|
|
141
|
+
const newEvent: CalendarEvent = {
|
|
142
|
+
id: \`new-\${Date.now()}\`,
|
|
143
|
+
title: 'New Event',
|
|
144
|
+
date: date,
|
|
145
|
+
time: '15:00',
|
|
146
|
+
type: 'meeting',
|
|
147
|
+
status: 'pending',
|
|
148
|
+
priority: 'medium'
|
|
149
|
+
};
|
|
150
|
+
setEvents(prev => [...prev, newEvent]);
|
|
151
|
+
setActionLog(prev => [\`[\${timestamp}] ➕ Added event on \${date.toLocaleDateString()}\`, ...prev.slice(0, 4)]);
|
|
152
|
+
};
|
|
153
|
+
return <div>
|
|
154
|
+
<div style={{
|
|
155
|
+
padding: 'var(--spacing-md)',
|
|
156
|
+
background: 'var(--color-primary-light)',
|
|
157
|
+
borderRadius: 'var(--radius-md)',
|
|
158
|
+
marginBottom: 'var(--spacing-lg)'
|
|
159
|
+
}}>
|
|
160
|
+
<h4 style={{
|
|
161
|
+
margin: '0 0 var(--spacing-xs) 0',
|
|
162
|
+
color: 'var(--color-primary)'
|
|
163
|
+
}}>
|
|
164
|
+
🎯 Interactive Demo
|
|
165
|
+
</h4>
|
|
166
|
+
<p style={{
|
|
167
|
+
margin: 0,
|
|
168
|
+
fontSize: 'var(--font-size-sm)',
|
|
169
|
+
color: 'var(--color-text-secondary)'
|
|
170
|
+
}}>
|
|
171
|
+
• Click events to toggle status • Click dates to add new events
|
|
172
|
+
</p>
|
|
173
|
+
</div>
|
|
174
|
+
|
|
175
|
+
<Calendar events={events} onEventClick={handleEventClick} onDateClick={handleDateClick} config={{
|
|
176
|
+
eventColors: {
|
|
177
|
+
meeting: '#4A90E2',
|
|
178
|
+
review: '#BD10E0',
|
|
179
|
+
workshop: '#4ECDC4'
|
|
180
|
+
},
|
|
181
|
+
iconRenderer: event => {
|
|
182
|
+
const icons = {
|
|
183
|
+
meeting: '👥',
|
|
184
|
+
review: '👀',
|
|
185
|
+
workshop: '🎨'
|
|
186
|
+
};
|
|
187
|
+
return <span style={{
|
|
188
|
+
fontSize: '11px'
|
|
189
|
+
}}>{icons[event.type as keyof typeof icons] || '📅'}</span>;
|
|
190
|
+
}
|
|
191
|
+
}} viewMode="month" />
|
|
192
|
+
|
|
193
|
+
{actionLog.length > 0 && <div style={{
|
|
194
|
+
marginTop: 'var(--spacing-lg)',
|
|
195
|
+
padding: 'var(--spacing-md)',
|
|
196
|
+
background: 'var(--color-background-secondary)',
|
|
197
|
+
borderRadius: 'var(--radius-md)'
|
|
198
|
+
}}>
|
|
199
|
+
<h5 style={{
|
|
200
|
+
margin: '0 0 var(--spacing-sm) 0',
|
|
201
|
+
color: 'var(--color-text)'
|
|
202
|
+
}}>
|
|
203
|
+
Recent Actions:
|
|
204
|
+
</h5>
|
|
205
|
+
{actionLog.map((log, index) => <div key={index} style={{
|
|
206
|
+
padding: 'var(--spacing-xs)',
|
|
207
|
+
margin: '2px 0',
|
|
208
|
+
background: 'var(--color-background)',
|
|
209
|
+
borderRadius: 'var(--radius-xs)',
|
|
210
|
+
fontSize: 'var(--font-size-xs)',
|
|
211
|
+
fontFamily: 'monospace'
|
|
212
|
+
}}>
|
|
213
|
+
{log}
|
|
214
|
+
</div>)}
|
|
215
|
+
</div>}
|
|
216
|
+
</div>;
|
|
217
|
+
}
|
|
218
|
+
}`,...(pe=(me=B.parameters)==null?void 0:me.docs)==null?void 0:pe.source}}};var ue,ve,ge;V.parameters={...V.parameters,docs:{...(ue=V.parameters)==null?void 0:ue.docs,source:{originalSource:`{
|
|
219
|
+
args: {
|
|
220
|
+
events: []
|
|
221
|
+
},
|
|
222
|
+
render: () => {
|
|
223
|
+
const habitEvents: CalendarEvent[] = [];
|
|
224
|
+
const today = new Date();
|
|
225
|
+
const habits = ['Exercise', 'Meditation', 'Reading', 'Water', 'Sleep'];
|
|
226
|
+
const habitIcons = ['💪', '🧘', '📚', '💧', '😴'];
|
|
227
|
+
for (let i = -7; i <= 7; i++) {
|
|
228
|
+
const date = new Date(today);
|
|
229
|
+
date.setDate(today.getDate() + i);
|
|
230
|
+
habits.forEach((habit, index) => {
|
|
231
|
+
if (Math.random() > 0.3) {
|
|
232
|
+
// 70% completion rate
|
|
233
|
+
habitEvents.push({
|
|
234
|
+
id: \`habit-\${i}-\${index}\`,
|
|
235
|
+
title: habit,
|
|
236
|
+
date: new Date(date),
|
|
237
|
+
type: 'habit',
|
|
238
|
+
status: Math.random() > 0.1 ? 'completed' : 'pending',
|
|
239
|
+
color: \`hsl(\${index * 70}, 70%, 50%)\`,
|
|
240
|
+
metadata: {
|
|
241
|
+
icon: habitIcons[index]
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
return <div>
|
|
248
|
+
<h3 style={{
|
|
249
|
+
marginBottom: 'var(--spacing-md)',
|
|
250
|
+
color: 'var(--color-text)'
|
|
251
|
+
}}>
|
|
252
|
+
🎯 Habit Tracking Use Case
|
|
253
|
+
</h3>
|
|
254
|
+
<Calendar events={habitEvents} config={{
|
|
255
|
+
iconRenderer: event => <span style={{
|
|
256
|
+
fontSize: '10px'
|
|
257
|
+
}}>{event.metadata?.icon as string || '✓'}</span>,
|
|
258
|
+
maxEventsPerDay: 8,
|
|
259
|
+
mondayStart: true
|
|
260
|
+
}} viewMode="month" />
|
|
261
|
+
</div>;
|
|
262
|
+
}
|
|
263
|
+
}`,...(ge=(ve=V.parameters)==null?void 0:ve.docs)==null?void 0:ge.source}}};var ye,he,we;L.parameters={...L.parameters,docs:{...(ye=L.parameters)==null?void 0:ye.docs,source:{originalSource:`{
|
|
264
|
+
args: {
|
|
265
|
+
events: []
|
|
266
|
+
},
|
|
267
|
+
render: () => {
|
|
268
|
+
const today = new Date();
|
|
269
|
+
const scheduleEvents: CalendarEvent[] = [
|
|
270
|
+
// Monday
|
|
271
|
+
{
|
|
272
|
+
id: 'schedule-1',
|
|
273
|
+
title: 'Team Standup and a very long text for a task that never ends',
|
|
274
|
+
date: new Date(today.getTime() - (today.getDay() - 1) * 24 * 60 * 60 * 1000),
|
|
275
|
+
time: '09:00',
|
|
276
|
+
type: 'meeting',
|
|
277
|
+
status: 'pending',
|
|
278
|
+
priority: 'medium'
|
|
279
|
+
}, {
|
|
280
|
+
id: 'schedule-2',
|
|
281
|
+
title: 'Code Review',
|
|
282
|
+
date: new Date(today.getTime() - (today.getDay() - 1) * 24 * 60 * 60 * 1000),
|
|
283
|
+
time: '11:30',
|
|
284
|
+
type: 'review',
|
|
285
|
+
status: 'completed',
|
|
286
|
+
priority: 'high'
|
|
287
|
+
},
|
|
288
|
+
// Tuesday
|
|
289
|
+
{
|
|
290
|
+
id: 'schedule-3',
|
|
291
|
+
title: 'Client Call',
|
|
292
|
+
date: new Date(today.getTime() - (today.getDay() - 2) * 24 * 60 * 60 * 1000),
|
|
293
|
+
time: '10:00',
|
|
294
|
+
type: 'call',
|
|
295
|
+
status: 'pending',
|
|
296
|
+
priority: 'high'
|
|
297
|
+
}, {
|
|
298
|
+
id: 'schedule-4',
|
|
299
|
+
title: 'Sprint Planning',
|
|
300
|
+
date: new Date(today.getTime() - (today.getDay() - 2) * 24 * 60 * 60 * 1000),
|
|
301
|
+
time: '14:00',
|
|
302
|
+
type: 'meeting',
|
|
303
|
+
status: 'pending',
|
|
304
|
+
priority: 'high'
|
|
305
|
+
},
|
|
306
|
+
// Friday
|
|
307
|
+
{
|
|
308
|
+
id: 'schedule-5',
|
|
309
|
+
title: 'Demo Day',
|
|
310
|
+
date: new Date(today.getTime() - (today.getDay() - 5) * 24 * 60 * 60 * 1000),
|
|
311
|
+
time: '13:00',
|
|
312
|
+
type: 'presentation',
|
|
313
|
+
status: 'pending',
|
|
314
|
+
priority: 'high'
|
|
315
|
+
}];
|
|
316
|
+
return <div>
|
|
317
|
+
<h3 style={{
|
|
318
|
+
marginBottom: 'var(--spacing-md)',
|
|
319
|
+
color: 'var(--color-text)'
|
|
320
|
+
}}>
|
|
321
|
+
📅 Event Scheduling (Week View)
|
|
322
|
+
</h3>
|
|
323
|
+
<Calendar events={scheduleEvents} config={{
|
|
324
|
+
eventColors: {
|
|
325
|
+
meeting: '#4A90E2',
|
|
326
|
+
call: '#7ED321',
|
|
327
|
+
review: '#BD10E0',
|
|
328
|
+
presentation: '#FF6B6B'
|
|
329
|
+
},
|
|
330
|
+
iconRenderer: event => {
|
|
331
|
+
const icons = {
|
|
332
|
+
meeting: '👥',
|
|
333
|
+
call: '📞',
|
|
334
|
+
review: '👀',
|
|
335
|
+
presentation: '🎯'
|
|
336
|
+
};
|
|
337
|
+
return <span style={{
|
|
338
|
+
fontSize: '12px'
|
|
339
|
+
}}>{icons[event.type as keyof typeof icons] || '📅'}</span>;
|
|
340
|
+
},
|
|
341
|
+
maxEventsPerDay: 6,
|
|
342
|
+
mondayStart: true
|
|
343
|
+
}} viewMode="week" />
|
|
344
|
+
</div>;
|
|
345
|
+
}
|
|
346
|
+
}`,...(we=(he=L.parameters)==null?void 0:he.docs)==null?void 0:we.source}}};var fe,De,xe;H.parameters={...H.parameters,docs:{...(fe=H.parameters)==null?void 0:fe.docs,source:{originalSource:`{
|
|
347
|
+
args: {
|
|
348
|
+
events: []
|
|
349
|
+
},
|
|
350
|
+
render: () => {
|
|
351
|
+
const customEvents: CalendarEvent[] = [{
|
|
352
|
+
id: 'custom-1',
|
|
353
|
+
title: 'VIP Client Meeting',
|
|
354
|
+
date: new Date(),
|
|
355
|
+
time: '10:00',
|
|
356
|
+
type: 'vip',
|
|
357
|
+
status: 'pending',
|
|
358
|
+
priority: 'high'
|
|
359
|
+
}, {
|
|
360
|
+
id: 'custom-2',
|
|
361
|
+
title: 'Design Sprint',
|
|
362
|
+
date: new Date(Date.now() + 24 * 60 * 60 * 1000),
|
|
363
|
+
type: 'workshop',
|
|
364
|
+
status: 'pending',
|
|
365
|
+
priority: 'medium'
|
|
366
|
+
}, {
|
|
367
|
+
id: 'custom-3',
|
|
368
|
+
title: 'Project Milestone ✓',
|
|
369
|
+
date: new Date(Date.now() - 24 * 60 * 60 * 1000),
|
|
370
|
+
type: 'milestone',
|
|
371
|
+
status: 'completed',
|
|
372
|
+
priority: 'high'
|
|
373
|
+
}];
|
|
374
|
+
return <div>
|
|
375
|
+
<h3 style={{
|
|
376
|
+
marginBottom: 'var(--spacing-md)',
|
|
377
|
+
color: 'var(--color-text)'
|
|
378
|
+
}}>
|
|
379
|
+
🎨 Custom Colors, Icons & Configuration
|
|
380
|
+
</h3>
|
|
381
|
+
<Calendar events={customEvents} config={{
|
|
382
|
+
eventColors: {
|
|
383
|
+
vip: '#FF6B6B',
|
|
384
|
+
workshop: '#4ECDC4',
|
|
385
|
+
milestone: '#F39C12'
|
|
386
|
+
},
|
|
387
|
+
iconRenderer: event => {
|
|
388
|
+
if (event.type === 'vip') return <span style={{
|
|
389
|
+
fontSize: '12px'
|
|
390
|
+
}}>⭐</span>;
|
|
391
|
+
if (event.type === 'workshop') return <span style={{
|
|
392
|
+
fontSize: '12px'
|
|
393
|
+
}}>🎨</span>;
|
|
394
|
+
if (event.type === 'milestone') return <span style={{
|
|
395
|
+
fontSize: '12px'
|
|
396
|
+
}}>🎯</span>;
|
|
397
|
+
return <span style={{
|
|
398
|
+
fontSize: '12px'
|
|
399
|
+
}}>📅</span>;
|
|
400
|
+
},
|
|
401
|
+
maxEventsPerDay: 6,
|
|
402
|
+
mondayStart: true,
|
|
403
|
+
showWeekNumbers: true,
|
|
404
|
+
locale: 'en-US'
|
|
405
|
+
}} viewMode="month" />
|
|
406
|
+
</div>;
|
|
407
|
+
}
|
|
408
|
+
}`,...(xe=(De=H.parameters)==null?void 0:De.docs)==null?void 0:xe.source}}};var Ce,ke,_e;R.parameters={...R.parameters,docs:{...(Ce=R.parameters)==null?void 0:Ce.docs,source:{originalSource:`{
|
|
409
|
+
args: {
|
|
410
|
+
events: []
|
|
411
|
+
},
|
|
412
|
+
render: () => {
|
|
413
|
+
const manyEvents: CalendarEvent[] = [];
|
|
414
|
+
const today = new Date();
|
|
415
|
+
|
|
416
|
+
// Generate multiple events for a single day
|
|
417
|
+
for (let i = 0; i < 6; i++) {
|
|
418
|
+
manyEvents.push({
|
|
419
|
+
id: \`many-\${i}\`,
|
|
420
|
+
title: \`Meeting \${i + 1}\`,
|
|
421
|
+
date: today,
|
|
422
|
+
time: \`\${9 + i}:00\`,
|
|
423
|
+
type: 'meeting',
|
|
424
|
+
status: 'pending',
|
|
425
|
+
priority: 'medium'
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
return <div style={{
|
|
429
|
+
display: 'grid',
|
|
430
|
+
gap: 'var(--spacing-xl)'
|
|
431
|
+
}}>
|
|
432
|
+
<div>
|
|
433
|
+
<h4 style={{
|
|
434
|
+
margin: '0 0 var(--spacing-md) 0',
|
|
435
|
+
color: 'var(--color-text)'
|
|
436
|
+
}}>
|
|
437
|
+
📊 Many Events (shows "more" indicator)
|
|
438
|
+
</h4>
|
|
439
|
+
<Calendar events={manyEvents} config={{
|
|
440
|
+
maxEventsPerDay: 3
|
|
441
|
+
}} viewMode="month" />
|
|
442
|
+
</div>
|
|
443
|
+
|
|
444
|
+
<div>
|
|
445
|
+
<h4 style={{
|
|
446
|
+
margin: '0 0 var(--spacing-md) 0',
|
|
447
|
+
color: 'var(--color-text)'
|
|
448
|
+
}}>
|
|
449
|
+
💨 Loading State
|
|
450
|
+
</h4>
|
|
451
|
+
<Calendar events={[]} loading={true} />
|
|
452
|
+
</div>
|
|
453
|
+
|
|
454
|
+
<div>
|
|
455
|
+
<h4 style={{
|
|
456
|
+
margin: '0 0 var(--spacing-md) 0',
|
|
457
|
+
color: 'var(--color-text)'
|
|
458
|
+
}}>
|
|
459
|
+
📭 Empty State
|
|
460
|
+
</h4>
|
|
461
|
+
<Calendar events={[]} emptyState={<span style={{
|
|
462
|
+
color: 'var(--color-text-tertiary)',
|
|
463
|
+
fontSize: '11px'
|
|
464
|
+
}}>
|
|
465
|
+
No events
|
|
466
|
+
</span>} />
|
|
467
|
+
</div>
|
|
468
|
+
</div>;
|
|
469
|
+
}
|
|
470
|
+
}`,...(_e=(ke=R.parameters)==null?void 0:ke.docs)==null?void 0:_e.source}}};const Rt=["MonthView","WeekView","DayView","ClickInteractions","HabitTracker","EventScheduler","CustomConfiguration","ComponentStates"];export{B as ClickInteractions,R as ComponentStates,H as CustomConfiguration,$ as DayView,L as EventScheduler,V as HabitTracker,M as MonthView,N as WeekView,Rt as __namedExportsOrder,Ht as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as m,a as h,V as e}from"./Mesh-CwXV3WjE.js";const f=new h,M=new e,l=new e;class y extends m{constructor(t,{near:s=.1,far:i=100,fov:r=45,aspect:n=1,left:a,right:o,bottom:u,top:p,zoom:c=1}={}){super(),Object.assign(this,{near:s,far:i,fov:r,aspect:n,left:a,right:o,bottom:u,top:p,zoom:c}),this.projectionMatrix=new h,this.viewMatrix=new h,this.projectionViewMatrix=new h,this.worldPosition=new e,this.type=a||o?"orthographic":"perspective",this.type==="orthographic"?this.orthographic():this.perspective()}perspective({near:t=this.near,far:s=this.far,fov:i=this.fov,aspect:r=this.aspect}={}){return Object.assign(this,{near:t,far:s,fov:i,aspect:r}),this.projectionMatrix.fromPerspective({fov:i*(Math.PI/180),aspect:r,near:t,far:s}),this.type="perspective",this}orthographic({near:t=this.near,far:s=this.far,left:i=this.left||-1,right:r=this.right||1,bottom:n=this.bottom||-1,top:a=this.top||1,zoom:o=this.zoom}={}){return Object.assign(this,{near:t,far:s,left:i,right:r,bottom:n,top:a,zoom:o}),i/=o,r/=o,n/=o,a/=o,this.projectionMatrix.fromOrthogonal({left:i,right:r,bottom:n,top:a,near:t,far:s}),this.type="orthographic",this}updateMatrixWorld(){return super.updateMatrixWorld(),this.viewMatrix.inverse(this.worldMatrix),this.worldMatrix.getTranslation(this.worldPosition),this.projectionViewMatrix.multiply(this.projectionMatrix,this.viewMatrix),this}updateProjectionMatrix(){return this.type==="perspective"?this.perspective():this.orthographic()}lookAt(t){return super.lookAt(t,!0),this}project(t){return t.applyMatrix4(this.viewMatrix),t.applyMatrix4(this.projectionMatrix),this}unproject(t){return t.applyMatrix4(f.inverse(this.projectionMatrix)),t.applyMatrix4(this.worldMatrix),this}updateFrustum(){this.frustum||(this.frustum=[new e,new e,new e,new e,new e,new e]);const t=this.projectionViewMatrix;this.frustum[0].set(t[3]-t[0],t[7]-t[4],t[11]-t[8]).constant=t[15]-t[12],this.frustum[1].set(t[3]+t[0],t[7]+t[4],t[11]+t[8]).constant=t[15]+t[12],this.frustum[2].set(t[3]+t[1],t[7]+t[5],t[11]+t[9]).constant=t[15]+t[13],this.frustum[3].set(t[3]-t[1],t[7]-t[5],t[11]-t[9]).constant=t[15]-t[13],this.frustum[4].set(t[3]-t[2],t[7]-t[6],t[11]-t[10]).constant=t[15]-t[14],this.frustum[5].set(t[3]+t[2],t[7]+t[6],t[11]+t[10]).constant=t[15]+t[14];for(let s=0;s<6;s++){const i=1/this.frustum[s].distance();this.frustum[s].multiply(i),this.frustum[s].constant*=i}}frustumIntersectsMesh(t,s=t.worldMatrix){if(!t.geometry.attributes.position||((!t.geometry.bounds||t.geometry.bounds.radius===1/0)&&t.geometry.computeBoundingSphere(),!t.geometry.bounds))return!0;const i=M;i.copy(t.geometry.bounds.center),i.applyMatrix4(s);const r=t.geometry.bounds.radius*s.getMaxScaleOnAxis();return this.frustumIntersectsSphere(i,r)}frustumIntersectsSphere(t,s){const i=l;for(let r=0;r<6;r++){const n=this.frustum[r];if(i.copy(n).dot(t)+n.constant<-s)return!1}return!0}}export{y as C};
|