@stfrigerio/sito-template 0.1.66 → 0.1.68
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/molecules/StreamConsole/StreamConsole.d.ts +29 -0
- package/dist/components/molecules/StreamConsole/StreamConsole.d.ts.map +1 -0
- package/dist/components/molecules/StreamConsole/index.d.ts +3 -0
- package/dist/components/molecules/StreamConsole/index.d.ts.map +1 -0
- package/dist/components/molecules/index.d.ts +2 -0
- package/dist/components/molecules/index.d.ts.map +1 -1
- package/dist/index.esm.js +251 -173
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +253 -174
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/storybook-static/assets/{ASCIIText.stories-BQt8B6As.js → ASCIIText.stories-CsmAJN-2.js} +1 -1
- package/storybook-static/assets/{AllAtoms.stories-8mBdcCeY.js → AllAtoms.stories-D4rQ-wy1.js} +1 -1
- package/storybook-static/assets/{AnimatedContent.stories-iIqm9cZL.js → AnimatedContent.stories-D3N3SO6o.js} +1 -1
- package/storybook-static/assets/{AnimatedList.stories-Duey4ijf.js → AnimatedList.stories-BKAHhF-d.js} +1 -1
- package/storybook-static/assets/{Antigravity.stories-CuJYSpj7.js → Antigravity.stories-CvGHJqQE.js} +1 -1
- package/storybook-static/assets/{ArrayInput.stories-CqXFEZSr.js → ArrayInput.stories-jrA1o5Ea.js} +1 -1
- package/storybook-static/assets/{Aurora.stories-Ccg1Zxc3.js → Aurora.stories-5UjwTJms.js} +1 -1
- package/storybook-static/assets/{Beams.stories-D50tODHz.js → Beams.stories-iu6YAOVD.js} +1 -1
- package/storybook-static/assets/{BlobCursor.stories-BqwP46t8.js → BlobCursor.stories-a0oYcNSe.js} +1 -1
- package/storybook-static/assets/{BlurText.stories-BuDb8a2q.js → BlurText.stories-GYpg5JPE.js} +1 -1
- package/storybook-static/assets/{BooleansHeatmap.stories-Byhs6Zes.js → BooleansHeatmap.stories-BGwP1qOw.js} +1 -1
- package/storybook-static/assets/{BorderGlow.stories-hxlNhbIt.js → BorderGlow.stories-CfJyZ5FD.js} +1 -1
- package/storybook-static/assets/{BubbleMenu.stories-DT9s0HGy.js → BubbleMenu.stories-BoL7fzPd.js} +1 -1
- package/storybook-static/assets/{Button-CHt05Jbq.js → Button-XXleA-vf.js} +1 -1
- package/storybook-static/assets/{Button.stories-CDGEs6zV.js → Button.stories-B5CWQCIN.js} +1 -1
- package/storybook-static/assets/Calendar-E_-F3UEV.css +1 -0
- package/storybook-static/assets/{Calendar.stories-D6K4DcbO.js → Calendar.stories-BV4SkIwi.js} +18 -18
- package/storybook-static/assets/{Card-Bj2f3gkT.js → Card-OLMSKhVR.js} +1 -1
- package/storybook-static/assets/{Card.stories-C1A8NBTN.js → Card.stories-BNK1tsEb.js} +1 -1
- package/storybook-static/assets/{CardNav.stories-BSezT2Mu.js → CardNav.stories-BcVq-zqM.js} +1 -1
- package/storybook-static/assets/{Carousel.stories-CdOtBTqT.js → Carousel.stories-RbJHXJL2.js} +1 -1
- package/storybook-static/assets/{Checkbox-BZw1-CjZ.js → Checkbox-BTElgaSY.js} +1 -1
- package/storybook-static/assets/{Checkbox.stories-CP7266xH.js → Checkbox.stories-CAd4f8K3.js} +1 -1
- package/storybook-static/assets/{ChromaGrid.stories-BrS0NLKl.js → ChromaGrid.stories-D_aDPvzD.js} +1 -1
- package/storybook-static/assets/{CircularGallery.stories-CsDrteyz.js → CircularGallery.stories-dnngbgLP.js} +1 -1
- package/storybook-static/assets/{CircularText.stories-DNkBFKK7.js → CircularText.stories-LSAafadL.js} +1 -1
- package/storybook-static/assets/{ClickSpark.stories-BqJSrjeV.js → ClickSpark.stories-DGBempBs.js} +1 -1
- package/storybook-static/assets/{ColorBends.stories-tjTDyHin.js → ColorBends.stories-DcK3_sn1.js} +1 -1
- package/storybook-static/assets/{CountUp.stories-Wz9xxsr8.js → CountUp.stories-BMtv_jPx.js} +1 -1
- package/storybook-static/assets/{Counter.stories-BYSWP3Ry.js → Counter.stories-CyMUXbmN.js} +1 -1
- package/storybook-static/assets/{Crosshair.stories-Bt7Ee7MB.js → Crosshair.stories-BNFAHXYf.js} +1 -1
- package/storybook-static/assets/{Cubes.stories-Ds4ynqYx.js → Cubes.stories-CQC4LEGr.js} +1 -1
- package/storybook-static/assets/{CurvedLoop.stories-M2vftkyO.js → CurvedLoop.stories-Bbtj3443.js} +1 -1
- package/storybook-static/assets/{DarkVeil.stories-PeZl2yff.js → DarkVeil.stories-Ce-0FIT7.js} +1 -1
- package/storybook-static/assets/{DateInput-BX5D1pMg.js → DateInput-U7LprMtG.js} +1 -1
- package/storybook-static/assets/{DateInput.stories-Bb5zGjzs.js → DateInput.stories-CTnYmtUu.js} +1 -1
- package/storybook-static/assets/{DecayCard.stories-Dxa_Vqrc.js → DecayCard.stories-C3NSEnfj.js} +1 -1
- package/storybook-static/assets/{DecryptedText.stories-yUFdFIFO.js → DecryptedText.stories-DS3kmr3h.js} +1 -1
- package/storybook-static/assets/{Dither.stories-DiyNOgY2.js → Dither.stories-DThgTxwS.js} +1 -1
- package/storybook-static/assets/{Dock.stories-XNu7kNIX.js → Dock.stories-BejWrev2.js} +1 -1
- package/storybook-static/assets/{EditFAB.stories-D_ZD4rSm.js → EditFAB.stories-B20NpuSi.js} +1 -1
- package/storybook-static/assets/{EvilEye.stories-C0S3sEvk.js → EvilEye.stories-DulC_ljn.js} +1 -1
- package/storybook-static/assets/{FadeContent.stories-C-ipTGqJ.js → FadeContent.stories-BpeE-89g.js} +1 -1
- package/storybook-static/assets/{FaultyTerminal.stories-10c-i_01.js → FaultyTerminal.stories-BbqaYCD4.js} +1 -1
- package/storybook-static/assets/{Fbo-Cr10jzQa.js → Fbo-C81uYqf5.js} +1 -1
- package/storybook-static/assets/{FloatingLines.stories-DkZO2qzt.js → FloatingLines.stories-BhCV-IEL.js} +1 -1
- package/storybook-static/assets/{FlowingMenu.stories-DS10XeZI.js → FlowingMenu.stories-DYmo4hlL.js} +1 -1
- package/storybook-static/assets/{FluidGlass.stories-B-R5wDkB.js → FluidGlass.stories-Hkc16HcI.js} +1 -1
- package/storybook-static/assets/{Folder.stories-BUmZH2ka.js → Folder.stories-sb348QG_.js} +1 -1
- package/storybook-static/assets/{FuzzyText.stories-BRnWU0yr.js → FuzzyText.stories-B9oCWh_m.js} +1 -1
- package/storybook-static/assets/{Galaxy.stories-hqhjEO_R.js → Galaxy.stories-BGZSxsRg.js} +1 -1
- package/storybook-static/assets/{GhostCursor.stories-BB2e8hmO.js → GhostCursor.stories-BH1RyEhC.js} +1 -1
- package/storybook-static/assets/{GlareHover.stories-BF6kB7EN.js → GlareHover.stories-BxKKigvA.js} +1 -1
- package/storybook-static/assets/{GlassSurface.stories-iF01agCe.js → GlassSurface.stories-BThkx8mW.js} +1 -1
- package/storybook-static/assets/{GlitchText.stories-CITlEyXQ.js → GlitchText.stories-D4RJYPMa.js} +1 -1
- package/storybook-static/assets/{GooeyNav.stories-vYR6zhI-.js → GooeyNav.stories-BTYUo3KQ.js} +1 -1
- package/storybook-static/assets/{GradientBlinds.stories-DSf-fXuF.js → GradientBlinds.stories-olxhUbmu.js} +1 -1
- package/storybook-static/assets/{GradientText.stories-DncdPs2z.js → GradientText.stories-Bh69B8hF.js} +1 -1
- package/storybook-static/assets/{Grainient.stories-BP35oJuG.js → Grainient.stories-BphTbaj0.js} +1 -1
- package/storybook-static/assets/{GridMotion.stories-Ck8lERpS.js → GridMotion.stories-DOr_siA6.js} +1 -1
- package/storybook-static/assets/{ImageSlideshow.stories-D5CGI0M5.js → ImageSlideshow.stories-B-hGzyOU.js} +1 -1
- package/storybook-static/assets/{Iridescence.stories-DSEIJRrO.js → Iridescence.stories-Rk7o1aTS.js} +1 -1
- package/storybook-static/assets/{LaserFlow.stories-B-m7sVx7.js → LaserFlow.stories-BcUFYXjR.js} +1 -1
- package/storybook-static/assets/{LetterGlitch.stories-D2KK0k49.js → LetterGlitch.stories-BMwuzHhW.js} +1 -1
- package/storybook-static/assets/{LightPillar.stories-0fWLIQfM.js → LightPillar.stories-jRFcnXWR.js} +1 -1
- package/storybook-static/assets/{LightRays.stories-U8mBgBFu.js → LightRays.stories-DlJZn0uj.js} +1 -1
- package/storybook-static/assets/{Lightning.stories-qzK5B63O.js → Lightning.stories-B3crwXQU.js} +1 -1
- package/storybook-static/assets/{LineWaves.stories-Dh0hHXd-.js → LineWaves.stories-BT2wiuIx.js} +1 -1
- package/storybook-static/assets/{LiquidChrome.stories-D-nD2mFo.js → LiquidChrome.stories-BAHqF7Fe.js} +1 -1
- package/storybook-static/assets/{LiquidEther.stories-DO-bW-67.js → LiquidEther.stories-Btht6LYV.js} +1 -1
- package/storybook-static/assets/{LoadingSpinner-D2u7X2s9.js → LoadingSpinner-Bfs3FDv3.js} +1 -1
- package/storybook-static/assets/{LoadingSpinner.stories-CASjGJF0.js → LoadingSpinner.stories-DQrjNBi0.js} +1 -1
- package/storybook-static/assets/{MagicRings.stories-CYDU5wlq.js → MagicRings.stories-wOj093RE.js} +1 -1
- package/storybook-static/assets/{Magnet.stories-BzWFxE-V.js → Magnet.stories-DUVmVySV.js} +1 -1
- package/storybook-static/assets/{MagnetLines.stories-BLt0dpNN.js → MagnetLines.stories-Q8XadhhN.js} +1 -1
- package/storybook-static/assets/{Masonry.stories-CdsgD1y4.js → Masonry.stories-D03ww_ZA.js} +1 -1
- package/storybook-static/assets/{MetaBalls.stories-1ggXqut_.js → MetaBalls.stories-CDdVkcY6.js} +1 -1
- package/storybook-static/assets/{MetallicPaint.stories-5ZCaxSOk.js → MetallicPaint.stories-DXs7ik4I.js} +1 -1
- package/storybook-static/assets/{MoodChart.stories-Bv5VWVvQ.js → MoodChart.stories-Rw-AGXno.js} +1 -1
- package/storybook-static/assets/{MotionConfigContext-BPeKZQwM.js → MotionConfigContext-C14_78av.js} +1 -1
- package/storybook-static/assets/{Navbar.stories-PxIAocvK.js → Navbar.stories-FrLzsznk.js} +1 -1
- package/storybook-static/assets/{Noise.stories-qu_z-yQ8.js → Noise.stories-BA3Ih5s0.js} +1 -1
- package/storybook-static/assets/{NumberStepper-CnpXSMIl.js → NumberStepper-tZiXGmat.js} +1 -1
- package/storybook-static/assets/NumberStepper-vsuSLafY.css +1 -0
- package/storybook-static/assets/{NumberStepper.stories-Cw-zOdLi.js → NumberStepper.stories-BhC8EKxm.js} +1 -1
- package/storybook-static/assets/{Orb.stories-DgKOlXK_.js → Orb.stories-AuD5iCC3.js} +1 -1
- package/storybook-static/assets/{OrbitImages.stories-Bv5vyiHA.js → OrbitImages.stories-BXvJZ0-F.js} +1 -1
- package/storybook-static/assets/{PieChart.stories-2s1TKZIh.js → PieChart.stories-C3r6LcY8.js} +1 -1
- package/storybook-static/assets/{PixelBlast.stories-C28Fm0cc.js → PixelBlast.stories-Cr-O1JRj.js} +1 -1
- package/storybook-static/assets/{PixelCard.stories-DSmyTgrk.js → PixelCard.stories-2lQKPfR5.js} +1 -1
- package/storybook-static/assets/{PixelSnow.stories-D0XEmW1E.js → PixelSnow.stories-D_D3QKFz.js} +1 -1
- package/storybook-static/assets/{PixelTransition.stories-CG2BkKyJ.js → PixelTransition.stories-B3ZARstC.js} +1 -1
- package/storybook-static/assets/{Plasma.stories-BK2e28Ch.js → Plasma.stories-B1DaK_sM.js} +1 -1
- package/storybook-static/assets/{Prism.stories-BEUiZCms.js → Prism.stories-DbqM5YZb.js} +1 -1
- package/storybook-static/assets/{PrismaticBurst.stories-COY077W0.js → PrismaticBurst.stories-y-HXF5cV.js} +1 -1
- package/storybook-static/assets/{ProfileCard.stories-BPB50mBw.js → ProfileCard.stories-DsmTybWU.js} +1 -1
- package/storybook-static/assets/{QuantifiableHabitsChart.stories-Dh4BO8wA.js → QuantifiableHabitsChart.stories-DCI49f9X.js} +1 -1
- package/storybook-static/assets/{Radar.stories-C9TRaVRk.js → Radar.stories-CEEkO42v.js} +1 -1
- package/storybook-static/assets/{Ribbons.stories-BK6afGL-.js → Ribbons.stories-CCA_yr4B.js} +1 -1
- package/storybook-static/assets/{RippleGrid.stories-CLkgzs8T.js → RippleGrid.stories-BTwh4_2U.js} +1 -1
- package/storybook-static/assets/{RotatingText.stories-BqRKm4Pk.js → RotatingText.stories-DHo8TfPe.js} +1 -1
- package/storybook-static/assets/{ScrollFloat.stories-CyVus5Hn.js → ScrollFloat.stories-BJZSf4VI.js} +1 -1
- package/storybook-static/assets/{ScrollReveal.stories-HNSNKMZC.js → ScrollReveal.stories-CiEFtSxi.js} +1 -1
- package/storybook-static/assets/{ScrollVelocity.stories-Bl2UPKz8.js → ScrollVelocity.stories-DfnkAXxG.js} +1 -1
- package/storybook-static/assets/{SearchBar.stories-zTNrUibf.js → SearchBar.stories-CSXGQoV5.js} +1 -1
- package/storybook-static/assets/{SearchableDropdown-jZtEQYje.js → SearchableDropdown-DUPy8rUp.js} +1 -1
- package/storybook-static/assets/{SearchableDropdown.stories-DeTNwt1p.js → SearchableDropdown.stories-CBxJFtvC.js} +1 -1
- package/storybook-static/assets/{SelectInput-CTOoI-ar.js → SelectInput-CYkoLmDl.js} +1 -1
- package/storybook-static/assets/{SelectInput.stories-CXKqi4k2.js → SelectInput.stories-CfvmOPeB.js} +1 -1
- package/storybook-static/assets/{ShapeBlur.stories-on96JVhG.js → ShapeBlur.stories-pc0wljrV.js} +1 -1
- package/storybook-static/assets/{ShapeGrid.stories-BRxQh7UX.js → ShapeGrid.stories-B4vId6lz.js} +1 -1
- package/storybook-static/assets/{ShinyText.stories-BSiGTTuW.js → ShinyText.stories-BXJJ29di.js} +1 -1
- package/storybook-static/assets/{Silk.stories-DLh6h5sr.js → Silk.stories-CDD33YEC.js} +1 -1
- package/storybook-static/assets/{SleepChart.stories-CqgT_xSG.js → SleepChart.stories-DdlAZqOr.js} +1 -1
- package/storybook-static/assets/{Slider-DkwynjlW.js → Slider-D658yr8V.js} +1 -1
- package/storybook-static/assets/{Slider.stories-xzy9LCKq.js → Slider.stories-eskyLxXJ.js} +1 -1
- package/storybook-static/assets/{SoftAurora.stories-BEGlyxv2.js → SoftAurora.stories-BdYYDM27.js} +1 -1
- package/storybook-static/assets/{SoundDemo.stories-lnHQaZRf.js → SoundDemo.stories-BgMuuQjq.js} +1 -1
- package/storybook-static/assets/{SplashCursor.stories-BLuoT7bI.js → SplashCursor.stories-CZtK7e_O.js} +1 -1
- package/storybook-static/assets/{SpotlightCard.stories-8rbsIN_x.js → SpotlightCard.stories-J0JZ-0RI.js} +1 -1
- package/storybook-static/assets/{Stack.stories-rXRU4bV_.js → Stack.stories-C0wOmqrH.js} +1 -1
- package/storybook-static/assets/{StaggeredMenu.stories-CTOihDVq.js → StaggeredMenu.stories-BLwQYHyu.js} +1 -1
- package/storybook-static/assets/{StarBorder.stories-D42G2awE.js → StarBorder.stories-Bc1fmorI.js} +1 -1
- package/storybook-static/assets/{SunburstChart.stories-CqJjS5Ra.js → SunburstChart.stories-CAmK3nor.js} +1 -1
- package/storybook-static/assets/{Table.stories-DpQG-25p.js → Table.stories-DGMjAm4t.js} +1 -1
- package/storybook-static/assets/{Tabs.stories-YHLNdl7B.js → Tabs.stories-Bb40tIYe.js} +1 -1
- package/storybook-static/assets/{TargetCursor.stories-DRsMwPSK.js → TargetCursor.stories-CGwUiD7J.js} +1 -1
- package/storybook-static/assets/{TextArea-CngqtNxw.js → TextArea-DXQ_EBgX.js} +1 -1
- package/storybook-static/assets/{TextArea.stories-D1_hrHZS.js → TextArea.stories-BLrrmB4z.js} +1 -1
- package/storybook-static/assets/{TextCursor.stories-UtxhqemP.js → TextCursor.stories-BHNu5tz7.js} +1 -1
- package/storybook-static/assets/{TextInput-BehfCmY5.js → TextInput-DV7WwA-D.js} +1 -1
- package/storybook-static/assets/{TextInput.stories-BvXJYvPz.js → TextInput.stories-CuWrd6gR.js} +1 -1
- package/storybook-static/assets/{TextPressure.stories-CVxoipZx.js → TextPressure.stories-vmUtkLCW.js} +1 -1
- package/storybook-static/assets/{TextType.stories-Wbl-e4FH.js → TextType.stories-DRh6fQi6.js} +1 -1
- package/storybook-static/assets/{ThemeSwitcher.stories-DJtkbIsv.js → ThemeSwitcher.stories-Cn69Ji6g.js} +1 -1
- package/storybook-static/assets/{Threads.stories-lWTZV9-e.js → Threads.stories-CydzcV1L.js} +1 -1
- package/storybook-static/assets/{TimeInput.stories-BRAnNdr7.js → TimeInput.stories-DszOIZMM.js} +1 -1
- package/storybook-static/assets/{Toggle-Cox_9XI4.js → Toggle-DRxEA46V.js} +1 -1
- package/storybook-static/assets/{Toggle.stories-D-LdkyEg.js → Toggle.stories-hRngPp0x.js} +1 -1
- package/storybook-static/assets/{ToggleButton-CJKNj0SW.js → ToggleButton-doH1twHO.js} +1 -1
- package/storybook-static/assets/{ToggleButton.stories-1ap-eMVz.js → ToggleButton.stories-B8nvf77b.js} +1 -1
- package/storybook-static/assets/{TrueFocus.stories-HdARUvZK.js → TrueFocus.stories-CfKH3kUZ.js} +1 -1
- package/storybook-static/assets/{VariableProximity.stories-Bs1ntmHm.js → VariableProximity.stories-D9qK9mvY.js} +1 -1
- package/storybook-static/assets/{Waves.stories-DZefHbtX.js → Waves.stories-ChiEHqOk.js} +1 -1
- package/storybook-static/assets/{check-C2eSkRHq.js → check-oj_6B7vS.js} +1 -1
- package/storybook-static/assets/{chevron-down-C-70uzgo.js → chevron-down-BWokfil4.js} +1 -1
- package/storybook-static/assets/{chevron-right-wsLgLx3I.js → chevron-right-Bdzt2d70.js} +1 -1
- package/storybook-static/assets/client-B8LLU4_U.js +1 -0
- package/storybook-static/assets/{createLucideIcon-DaHCgKFX.js → createLucideIcon-BWMoBn57.js} +1 -1
- package/storybook-static/assets/{download--Xa2UKO-.js → download-BLiA0tpF.js} +1 -1
- package/storybook-static/assets/{folder-DCpVGUxB.js → folder-DqKZ_0EF.js} +1 -1
- package/storybook-static/assets/{iconBase-B-RSH0v3.js → iconBase-DwjO8aD6.js} +1 -1
- package/storybook-static/assets/{iframe-BVoBDGkl.js → iframe-Bzk7a4jE.js} +3 -3
- package/storybook-static/assets/{index-C5uOIRS9.js → index-B9IQ2veq.js} +1 -1
- package/storybook-static/assets/{index-DufMyQUu.js → index-CFq2Sj1X.js} +1 -1
- package/storybook-static/assets/{index-CyoTMuJi.js → index-D75c7fgA.js} +1 -1
- package/storybook-static/assets/{proxy-DTYfJ2to.js → proxy-DWSRYAjq.js} +1 -1
- package/storybook-static/assets/{react-18-Blvw7U7X.js → react-18-EohdNo4M.js} +1 -1
- package/storybook-static/assets/{react-three-fiber.esm-C85N-HX5.js → react-three-fiber.esm-CbOYykzu.js} +1 -1
- package/storybook-static/assets/{search-MU52wG37.js → search-BQFiVrSa.js} +1 -1
- package/storybook-static/assets/{settings-s6BFzNVN.js → settings-fMTZia7j.js} +1 -1
- package/storybook-static/assets/{sun-CEL81Yx2.js → sun-DRUPjcvH.js} +1 -1
- package/storybook-static/assets/{trash-2-DEEOdkJB.js → trash-2-Cs3jaKGo.js} +1 -1
- package/storybook-static/assets/{use-animation-frame-BdekcKuM.js → use-animation-frame-D0dvJGOL.js} +1 -1
- package/storybook-static/assets/{use-in-view-vaSz56VM.js → use-in-view-DHLaPX9x.js} +1 -1
- package/storybook-static/assets/{use-motion-value-Cruaf_HC.js → use-motion-value-DqT2_cFi.js} +1 -1
- package/storybook-static/assets/{use-spring-QrlvhiwT.js → use-spring-Iib2BnkK.js} +1 -1
- package/storybook-static/assets/{use-transform-I-in6IUD.js → use-transform-CfDt55IP.js} +1 -1
- package/storybook-static/assets/{useSound-D3odJ6j_.js → useSound-BpN96I3Q.js} +1 -1
- package/storybook-static/assets/{users-V3YzqUXe.js → users-DuVIER1_.js} +1 -1
- package/storybook-static/assets/{x-CIfb6lfQ.js → x-BsIImlvB.js} +1 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/assets/Calendar-CYo2UzOE.css +0 -1
- package/storybook-static/assets/NumberStepper-C_00aeJp.css +0 -1
- package/storybook-static/assets/client-BF4QBMW1.js +0 -1
package/storybook-static/assets/{Calendar.stories-D6K4DcbO.js → Calendar.stories-BV4SkIwi.js}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as x,j as e}from"./iframe-Bzk7a4jE.js";import{u as st}from"./use-motion-value-DqT2_cFi.js";import{u as nn}from"./use-transform-CfDt55IP.js";import{m as Ie}from"./proxy-DWSRYAjq.js";import{T as an}from"./trash-2-Cs3jaKGo.js";import{c as Rt}from"./createLucideIcon-BWMoBn57.js";import{C as on}from"./check-oj_6B7vS.js";import{a as be}from"./index-B9IQ2veq.js";import{D as rn}from"./download-BLiA0tpF.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-C14_78av.js";/**
|
|
2
2
|
* @license lucide-react v0.539.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const sn=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],ln=
|
|
6
|
+
*/const sn=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],ln=Rt("grip-vertical",sn);/**
|
|
7
7
|
* @license lucide-react v0.539.0 - ISC
|
|
8
8
|
*
|
|
9
9
|
* This source code is licensed under the ISC license.
|
|
10
10
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const
|
|
12
|
-
`)},Va=o=>JSON.stringify(o.map(Ge),null,2),za=o=>{if(o==null)return"";const a=String(o);return/[",\n\r]/.test(a)?`"${a.replace(/"/g,'""')}"`:a},Ga=o=>{const a=`events[${o.length}]{${
|
|
13
|
-
`)},Ua={csv:"text/csv;charset=utf-8;",json:"application/json;charset=utf-8;",toon:"text/plain;charset=utf-8;"},Ya={csv:"csv",json:"json",toon:"toon"},Xa=(o,a)=>a==="csv"?qa(o):a==="json"?Va(o):Ga(o),Ja=(o,a,s)=>{const l=Xa(o,a),c=new Blob([l],{type:Ua[a]}),u=URL.createObjectURL(c),d=document.createElement("a");d.href=u,d.download=`events-${new Date().toISOString().slice(0,10)}.${Ya[a]}`,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(u)};function se({events:o,onEventClick:a,onDateClick:s,onEventClickByView:l,onDateClickByView:c,onTimeSlotClick:u,onEventDrop:d,onEventComplete:f,onEventDelete:w,onEventEdit:_,viewMode:x="month",initialDate:T=new Date,config:j={},className:I="",style:H={},loading:K=!1,emptyState:q,hideHeader:Z=!1,compact:le=!1,selectedDate:ee,selectedCategoryId:ce,onCategoryChange:V,exportFormats:de}){const[p,z]=S.useState(T),[D,Fe]=S.useState(x),[zt,Gt]=S.useState(null),Ue=ce!==void 0,te=Ue?ce??null:zt,Ye=t=>{Ue||Gt(t),V==null||V(t)},We=S.useRef(null),Ae=S.useRef(null),[ge,Oe]=S.useState(!1),Re=S.useRef(null);S.useEffect(()=>{if(!ge)return;const t=r=>{Re.current&&!Re.current.contains(r.target)&&Oe(!1)};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[ge]);const{eventColors:Xe={},iconRenderer:Je,maxEventsPerDay:G=3,mondayStart:me=!1,showWeekNumbers:ve=!1,dateFormat:Qe={month:"long",year:"numeric"},locale:U="en-US",dayLabels:Ut,monthNames:fe,startHour:P=0,endHour:Ke=24,hourHeight:E=60,halfHourSlots:B=!1,categories:ne}=j,Ze=S.useMemo(()=>!ne||ne.length===0||te===null?o:o.filter(t=>!t.category||t.category===te),[o,ne,te]),Yt=Ut||(me?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),et=(j==null?void 0:j.hourHeight)??60,tt=(j==null?void 0:j.startHour)??0,ue=S.useMemo(()=>{const t=p.getFullYear(),r=p.getMonth();let h,m,k;if(D==="week"){h=new Date(p);const $=h.getDay(),y=me?h.getDate()-$+($===0?-6:1):h.getDate()-$;h=new Date(h.setDate(y)),h.setHours(0,0,0,0),m=new Date(h),m.setDate(m.getDate()+6);const A=h.toLocaleDateString(U,{day:"numeric",month:"short"}),L=m.toLocaleDateString(U,{day:"numeric",month:"short"});k=`${A} - ${L}`}else if(D==="day")h=new Date(p),h.setHours(0,0,0,0),m=new Date(p),m.setHours(23,59,59,999),k=p.toLocaleDateString(U,{weekday:"long",year:"numeric",month:"long",day:"numeric"});else{const $=new Date(t,r,1),y=new Date(t,r+1,0);h=new Date($);const A=me?($.getDay()+6)%7:$.getDay();h.setDate(h.getDate()-A),m=new Date(y);const L=me?(y.getDay()+6)%7:y.getDay();m.setDate(m.getDate()+(6-L)),fe&&fe[r]?k=`${fe[r]} ${t}`:k=p.toLocaleDateString(U,Qe)}const N=[],M=new Date(h);for(;M<=m;)N.push(new Date(M)),M.setDate(M.getDate()+1);return{days:N,displayTitle:k}},[p,D,me,U,Qe,fe]);S.useEffect(()=>{const t=D==="day"?We:D==="week"?Ae:null;if(!(t!=null&&t.current))return;const r=new Date;if(!(D==="day"?p.toDateString()===r.toDateString():ue.days.some(N=>N.toDateString()===r.toDateString())))return;const m=(r.getHours()-tt)*60+r.getMinutes(),k=Math.max(0,m/60*et-100);setTimeout(()=>{t.current&&(t.current.scrollTop=k)},0)},[D,p,tt,et,ue]);const qe=t=>{const r=Ze.filter(h=>new Date(h.date).toDateString()===t.toDateString());return D==="week"?r.sort((h,m)=>{const k=h.time?nt(h.time):999999,N=m.time?nt(m.time):999999;return k-N}):r},nt=t=>{const[r,h]=t.split(":").map(Number);return r*60+h},Xt=()=>{const t=new Date(p);D==="week"?t.setDate(t.getDate()-7):D==="day"?t.setDate(t.getDate()-1):t.setMonth(t.getMonth()-1),z(t)},Jt=()=>{const t=new Date(p);D==="week"?t.setDate(t.getDate()+7):D==="day"?t.setDate(t.getDate()+1):t.setMonth(t.getMonth()+1),z(t)},Qt=()=>{z(new Date)},ae=t=>{if(t.color)return t.color;if(t.type&&Xe[t.type])return Xe[t.type];const r={high:"#FF4444",medium:"#FFA500",low:"#4A90E2"};return t.priority&&r[t.priority]?r[t.priority]:"#4A90E2"},Kt=t=>{const r=t.replace("#",""),h=parseInt(r.substring(0,2),16),m=parseInt(r.substring(2,4),16),k=parseInt(r.substring(4,6),16);return(.299*h+.587*m+.114*k)/255>.5?"#000000":"#FFFFFF"},ye=t=>{if(t.textColor)return t.textColor;const r=ae(t);return Kt(r)},we=t=>{l&&l[D]?l[D](t):a&&a(t)},at=t=>{c&&c[D]?c[D](t):s&&s(t)},Zt=t=>{const r=new Date;return t.toDateString()===r.toDateString()},en=t=>t.getMonth()===p.getMonth(),tn=t=>{const r=new Date(t.getFullYear(),0,1),h=t.getTime()-r.getTime(),m=1e3*60*60*24*7;return Math.floor(h/m)+1};return K?e.jsx("div",{className:`${n.calendar} ${n.loading} ${I}`,style:H,children:e.jsx("div",{className:n.loadingSpinner,children:"Loading..."})}):e.jsxs("div",{className:`${n.calendar} ${le?n.compact:""} ${I}`,style:H,children:[!Z&&e.jsxs("div",{className:n.header,children:[e.jsxs("div",{className:n.navigation,children:[e.jsx("button",{onClick:Xt,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:ue.displayTitle}),e.jsx("button",{onClick:Jt,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"})})})]}),ne&&ne.length>0&&e.jsxs("div",{className:n.filterBar,role:"tablist","aria-label":"Filter by category",children:[e.jsx("button",{type:"button",role:"tab","aria-selected":te===null,className:`${n.filterPill} ${te===null?n.filterPillActive:""}`,onClick:()=>Ye(null),children:"All"}),ne.map(t=>{const r=te===t.id;return e.jsxs("button",{type:"button",role:"tab","aria-selected":r,className:`${n.filterPill} ${r?n.filterPillActive:""}`,style:r?{background:t.color,borderColor:t.color,color:"#ffffff"}:void 0,onClick:()=>Ye(t.id),children:[!r&&e.jsx("span",{className:n.filterDot,style:{background:t.color}}),t.label]},t.id)})]}),e.jsxs("div",{className:n.controls,children:[de&&de.length>0&&e.jsxs("div",{className:n.exportDropdown,ref:Re,children:[e.jsx("button",{type:"button",className:n.exportButton,onClick:()=>Oe(t=>!t),"aria-haspopup":"menu","aria-expanded":ge,"aria-label":"Export events",title:"Export events",children:e.jsx(rn,{size:16})}),ge&&e.jsx("div",{className:n.exportMenu,role:"menu",children:de.map(t=>e.jsx("button",{type:"button",role:"menuitem",className:n.exportMenuItem,onClick:()=>{Ja(Ze,t),Oe(!1)},children:t.toUpperCase()},t))})]}),e.jsx("button",{onClick:Qt,className:n.todayButton,children:"Today"}),e.jsxs("div",{className:n.viewToggle,children:[e.jsx("button",{className:`${n.viewButton} ${D==="month"?n.active:""}`,onClick:()=>Fe("month"),children:"Month"}),e.jsx("button",{className:`${n.viewButton} ${D==="week"?n.active:""}`,onClick:()=>Fe("week"),children:"Week"}),e.jsx("button",{className:`${n.viewButton} ${D==="day"?n.active:""}`,onClick:()=>Fe("day"),children:"Day"})]})]})]}),D==="month"&&e.jsxs("div",{className:`${n.weekDays} ${ve?n.withWeekNumbers:""}`,children:[ve&&e.jsx("div",{className:n.weekNumberHeader,children:"Wk"}),Yt.map(t=>e.jsx("div",{className:n.weekDay,children:t},t))]}),D==="day"?(()=>{const t=qe(p),r=t.filter(i=>!i.allDay&&i.time),h=t.filter(i=>i.allDay||!i.time),m=Array.from({length:Ke-P},(i,g)=>P+g),k=m.length*E,N=new Date,M=p.toDateString()===N.toDateString(),y=((N.getHours()-P)*60+N.getMinutes())/60*E,A=M&&y>=0&&y<=k,L=i=>{const[g,b]=i.split(":").map(Number);return g*60+b},Ve=i=>{if(!i.time||!i.endTime)return 30;const g=L(i.endTime)-L(i.time);return g>0?g:30},v=(i,g)=>{if(u){const b=new Date(p);b.setHours(i,g,0,0);const O=`${i.toString().padStart(2,"0")}:${g.toString().padStart(2,"0")}`;u(b,i,O)}},C=(i,g)=>{var De;if(!d)return;const b=(De=We.current)==null?void 0:De.querySelector(`.${n.dayTimelineGrid}`);if(!b)return;const O=b.getBoundingClientRect(),Y=g-O.top,X=B?E/2:E,R=Math.max(0,Math.floor(Y/X)),J=B?m.length*2:m.length,Q=Math.min(J-1,R),ze=P+Math.floor(B?Q/2:Q),pe=B&&Q%2===1?30:0,xe=new Date(p);xe.setHours(ze,pe,0,0),d(i,xe)};return 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:p.toLocaleDateString(U,{weekday:"short",day:"numeric"})})]}),h.length>0&&e.jsxs("div",{className:n.allDayStrip,children:[e.jsx("span",{className:n.allDayLabel,children:"All day"}),e.jsx("div",{className:n.allDayList,children:h.map(i=>e.jsx(Ie,{event:i,color:ae(i),textColor:ye(i),onComplete:f??(a?we:void 0),onEdit:_,onDelete:w,draggable:!1},i.id))})]}),e.jsx("div",{className:n.dayViewScrollContainer,ref:We,children:e.jsxs("div",{className:n.dayTimelineGrid,style:{height:k},children:[m.map(i=>e.jsxs("div",{className:n.hourRow,style:{height:E},children:[e.jsxs("span",{className:n.hourLabel,children:[i.toString().padStart(2,"0"),":00"]}),e.jsx("div",{className:n.hourSlots,children:B?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:n.halfHourSlot,onClick:()=>v(i,0)}),e.jsx("div",{className:`${n.halfHourSlot} ${n.halfHourSlotBottom}`,onClick:()=>v(i,30)})]}):e.jsx("div",{className:n.halfHourSlot,onClick:()=>v(i,0)})})]},i)),r.map(i=>{const[g,b]=i.time.split(":").map(Number),O=(g-P)*E+b/60*E,Y=Ve(i),X=Math.max(24,Y/60*E-2);return e.jsx("div",{className:n.dayEventAnchor,style:{top:O,height:X},onClick:R=>R.stopPropagation(),children:e.jsx(Ie,{event:i,color:ae(i),textColor:ye(i),onComplete:f??(a?we:void 0),onEdit:_,onDelete:w,onDragEnd:d?R=>C(i,R):void 0})},i.id)}),A&&e.jsx("div",{className:n.currentTimeIndicator,style:{top:`${y}px`}})]})})]})})():D==="week"?(()=>{const t=ue.days,r=Array.from({length:Ke-P},(v,C)=>P+C),h=r.length*E,m=new Date,k=t.findIndex(v=>v.toDateString()===m.toDateString()),M=((m.getHours()-P)*60+m.getMinutes())/60*E,$=k>=0&&M>=0&&M<=h,y=v=>{const[C,i]=v.split(":").map(Number);return C*60+i},A=v=>{if(!v.time||!v.endTime)return 30;const C=y(v.endTime)-y(v.time);return C>0?C:30},L=(v,C,i)=>{if(!u)return;const g=new Date(v);g.setHours(C,i,0,0);const b=`${C.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`;u(g,C,b)},Ve=(v,C,i)=>{var rt;if(!d)return;const g=(rt=Ae.current)==null?void 0:rt.querySelector(`.${n.weekDayColumns}`);if(!g)return;const b=g.getBoundingClientRect(),O=i-b.left,Y=C-b.top,X=b.width/7,R=Math.min(6,Math.max(0,Math.floor(O/X))),J=t[R],Q=B?E/2:E,ze=B?r.length*2:r.length,pe=Math.min(ze-1,Math.max(0,Math.floor(Y/Q))),xe=P+Math.floor(B?pe/2:pe),De=B&&pe%2===1?30:0,ot=new Date(J);ot.setHours(xe,De,0,0),d(v,ot)};return e.jsxs("div",{className:n.weekTimeline,children:[e.jsxs("div",{className:n.weekTimelineHeader,children:[e.jsx("div",{className:n.timeColumnHeader}),t.map(v=>{const C=v.toDateString()===m.toDateString(),i=ee&&v.toDateString()===ee.toDateString();return e.jsxs("button",{type:"button",className:`${n.weekDayColumnHeader} ${C?n.today:""} ${i?n.selected:""}`,onClick:()=>at(v),children:[e.jsx("span",{className:n.weekDayLabel,children:v.toLocaleDateString(U,{weekday:"short"})}),e.jsx("span",{className:n.weekDayNumber,children:v.getDate()})]},v.toISOString())})]}),e.jsx("div",{className:n.weekTimelineScroll,ref:Ae,children:e.jsxs("div",{className:n.weekTimelineGrid,style:{height:h},children:[e.jsx("div",{className:n.weekTimeColumn,children:r.map(v=>e.jsx("div",{className:n.weekTimeSlot,style:{height:E},children:e.jsxs("span",{className:n.weekHourLabel,children:[v.toString().padStart(2,"0"),":00"]})},v))}),e.jsx("div",{className:n.weekDayColumns,children:t.map(v=>{const C=qe(v).filter(g=>!g.allDay&&g.time),i=v.toDateString()===m.toDateString();return e.jsxs("div",{className:n.weekDayColumn,children:[r.map(g=>e.jsx("div",{className:n.weekHourRow,style:{height:E},children:B?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:n.halfHourSlot,onClick:()=>L(v,g,0)}),e.jsx("div",{className:`${n.halfHourSlot} ${n.halfHourSlotBottom}`,onClick:()=>L(v,g,30)})]}):e.jsx("div",{className:n.halfHourSlot,onClick:()=>L(v,g,0)})},g)),C.map(g=>{const[b,O]=g.time.split(":").map(Number),Y=(b-P)*E+O/60*E,X=A(g),R=Math.max(24,X/60*E-2);return e.jsx("div",{className:n.weekEventAnchor,style:{top:Y,height:R},onClick:J=>J.stopPropagation(),children:e.jsx(Ie,{event:g,color:ae(g),textColor:ye(g),onComplete:f??(a?we:void 0),onEdit:_,onDelete:w,onDragEnd:d?(J,Q)=>Ve(g,J,Q):void 0})},g.id)}),i&&$&&e.jsx("div",{className:n.currentTimeIndicator,style:{top:`${M}px`,left:0}})]},v.toISOString())})})]})})]})})():(()=>{const t=le?void 0:40+G*24;return e.jsx("div",{className:`${n.daysGrid} ${ve?n.withWeekNumbers:""}`,children:ue.days.map((r,h)=>{const m=qe(r),k=Zt(r),N=en(r),M=ve&&h%7===0,$=ee&&r.toDateString()===ee.toDateString();return e.jsxs(S.Fragment,{children:[M&&e.jsx("div",{className:n.weekNumberCell,style:t!==void 0?{height:t,minHeight:t}:void 0,children:tn(r)}),e.jsxs(Pe.div,{className:`${n.dayCell} ${k?n.today:""} ${N?"":n.otherMonth} ${$?n.selected:""}`,style:t!==void 0?{height:t,minHeight:t}:void 0,initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,delay:h*.02,ease:"easeOut"},onClick:()=>at(r),children:[e.jsx("div",{className:n.dayNumber,children:r.getDate()}),m.length>0&&le&&D==="month"?e.jsxs("div",{className:n.dots,children:[m.slice(0,G).map(y=>e.jsx("span",{className:n.dot,style:{backgroundColor:ae(y)}},y.id)),m.length>G&&e.jsxs("span",{className:n.dotMore,children:["+",m.length-G]})]}):m.length>0?e.jsxs("div",{className:n.events,children:[m.slice(0,G).map((y,A)=>e.jsxs(Pe.div,{className:`${n.event} ${y.status==="completed"?n.completed:""}`,style:{backgroundColor:ae(y),color:ye(y),opacity:y.status==="completed"?.7:1},onClick:L=>{L.stopPropagation(),we(y)},initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.2,delay:A*.05,ease:"easeOut"},whileHover:{scale:1.02,y:-1,transition:{duration:.1}},whileTap:{scale:.98,transition:{duration:.1}},children:[Je&&Je(y),e.jsxs("span",{className:n.eventTitle,children:[y.time&&e.jsx("span",{className:n.eventTime,children:y.time}),y.title]}),y.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"})})]},y.id)),m.length>G&&e.jsxs("div",{className:n.moreEvents,children:["+",m.length-G," more"]})]}):q?e.jsx("div",{className:n.emptyState,children:q}):null]})]},`${r.getFullYear()}-${r.getMonth()}-${r.getDate()}`)})})})()]})}se.__docgenInfo={description:`Calendar component - A flexible, reusable calendar for displaying events
|
|
11
|
+
*/const dn=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],cn=Rt("pencil",dn),mn="_calendar_abdfq_2",un="_loading_abdfq_14",pn="_loadingSpinner_abdfq_21",fn="_header_abdfq_27",gn="_navigation_abdfq_35",vn="_navButton_abdfq_41",hn="_title_abdfq_60",yn="_controls_abdfq_70",wn="_exportDropdown_abdfq_76",Dn="_exportButton_abdfq_80",_n="_exportMenu_abdfq_98",bn="_exportMenuItem_abdfq_113",xn="_todayButton_abdfq_130",Sn="_viewToggle_abdfq_146",kn="_viewButton_abdfq_153",Cn="_active_abdfq_167",Tn="_filterBar_abdfq_177",En="_filterPill_abdfq_186",jn="_filterPillActive_abdfq_205",Nn="_filterDot_abdfq_211",Hn="_weekDays_abdfq_219",Mn="_withWeekNumbers_abdfq_226",qn="_weekNumberHeader_abdfq_230",$n="_weekDay_abdfq_219",Ln="_daysGrid_abdfq_247",In="_dayCell_abdfq_263",Pn="_dayNumber_abdfq_292",Bn="_today_abdfq_130",Fn="_events_abdfq_311",Wn="_event_abdfq_311",An="_eventTitle_abdfq_338",On="_eventTime_abdfq_347",Rn="_otherMonth_abdfq_392",Vn="_selected_abdfq_397",zn="_compact_abdfq_409",Gn="_dots_abdfq_432",Un="_dot_abdfq_432",Yn="_dotMore_abdfq_447",Xn="_weekNumberCell_abdfq_454",Jn="_completed_abdfq_500",Qn="_completedIcon_abdfq_521",Kn="_moreEvents_abdfq_528",Zn="_emptyState_abdfq_538",ea="_dayView_abdfq_548",ta="_dayViewHeader_abdfq_557",na="_timeColumnHeader_abdfq_567",aa="_dayColumnHeader_abdfq_574",oa="_allDayStrip_abdfq_584",ra="_allDayLabel_abdfq_592",sa="_allDayList_abdfq_603",ia="_dayViewScrollContainer_abdfq_626",la="_dayTimelineGrid_abdfq_635",da="_hourRow_abdfq_640",ca="_hourLabel_abdfq_646",ma="_hourSlots_abdfq_657",ua="_halfHourSlot_abdfq_664",pa="_halfHourSlotBottom_abdfq_674",fa="_dayEventAnchor_abdfq_679",ga="_weekTimeline_abdfq_687",va="_weekTimelineHeader_abdfq_696",ha="_weekDayColumnHeader_abdfq_708",ya="_weekDayLabel_abdfq_742",wa="_weekDayNumber_abdfq_750",Da="_weekTimelineScroll_abdfq_755",_a="_weekTimelineGrid_abdfq_763",ba="_weekTimeColumn_abdfq_769",xa="_weekTimeSlot_abdfq_777",Sa="_weekHourLabel_abdfq_784",ka="_weekDayColumns_abdfq_790",Ca="_weekDayColumn_abdfq_708",Ta="_weekHourRow_abdfq_808",Ea="_weekEventAnchor_abdfq_814",ja="_currentTimeIndicator_abdfq_822",n={calendar:mn,loading:un,loadingSpinner:pn,header:fn,navigation:gn,navButton:vn,title:hn,controls:yn,exportDropdown:wn,exportButton:Dn,exportMenu:_n,exportMenuItem:bn,todayButton:xn,viewToggle:Sn,viewButton:kn,active:Cn,filterBar:Tn,filterPill:En,filterPillActive:jn,filterDot:Nn,weekDays:Hn,withWeekNumbers:Mn,weekNumberHeader:qn,weekDay:$n,daysGrid:Ln,dayCell:In,dayNumber:Pn,today:Bn,events:Fn,event:Wn,eventTitle:An,eventTime:On,otherMonth:Rn,selected:Vn,compact:zn,dots:Gn,dot:Un,dotMore:Yn,weekNumberCell:Xn,completed:Jn,completedIcon:Qn,moreEvents:Kn,emptyState:Zn,dayView:ea,dayViewHeader:ta,timeColumnHeader:na,dayColumnHeader:aa,allDayStrip:oa,allDayLabel:ra,allDayList:sa,dayViewScrollContainer:ia,dayTimelineGrid:la,hourRow:da,hourLabel:ca,hourSlots:ma,halfHourSlot:ua,halfHourSlotBottom:pa,dayEventAnchor:fa,weekTimeline:ga,weekTimelineHeader:va,weekDayColumnHeader:ha,weekDayLabel:ya,weekDayNumber:wa,weekTimelineScroll:Da,weekTimelineGrid:_a,weekTimeColumn:ba,weekTimeSlot:xa,weekHourLabel:Sa,weekDayColumns:ka,weekDayColumn:Ca,weekHourRow:Ta,weekEventAnchor:Ea,currentTimeIndicator:ja},Na="_wrapper_nyv1b_1",Ha="_deleteUnderlay_nyv1b_7",Ma="_card_nyv1b_23",qa="_dragging_nyv1b_43",$a="_completed_nyv1b_49",La="_text_nyv1b_53",Ia="_grip_nyv1b_57",Pa="_checkIcon_nyv1b_77",Ba="_time_nyv1b_89",Fa="_editButton_nyv1b_96",B={wrapper:Na,deleteUnderlay:Ha,card:Ma,dragging:qa,completed:$a,text:La,grip:Ia,checkIcon:Pa,time:Ba,editButton:Fa},Wa=-80,Le=({event:o,color:a,textColor:s,onComplete:l,onEdit:d,onDelete:u,onDragEnd:c,draggable:h=!0})=>{const w=st(0),b=st(0),D=nn(w,[-80,0],[1,0]),[C,j]=x.useState(!1),L=x.useRef(!1),H=x.useRef(null),K=o.status==="completed",R=(p,z)=>{u&&z.offset.x<Wa?be(w,-1e3,{duration:.2,onComplete:()=>u(o)}):be(w,0,{type:"spring",stiffness:400,damping:30})},Z=()=>{if(L.current){L.current=!1;return}C||l==null||l(o)},le=p=>{!h||!c||(p.stopPropagation(),p.preventDefault(),H.current={x:p.clientX,y:p.clientY,pointerId:p.pointerId},p.currentTarget.setPointerCapture(p.pointerId),j(!0))},ee=p=>{H.current&&(w.set(p.clientX-H.current.x),b.set(p.clientY-H.current.y))},de=p=>{if(!H.current)return;const z=p.clientY,_=p.clientX;try{p.currentTarget.releasePointerCapture(H.current.pointerId)}catch{}H.current=null,j(!1),be(b,0,{type:"spring",stiffness:400,damping:30}),be(w,0,{type:"spring",stiffness:400,damping:30}),c==null||c(z,_)},V=!!u,ce=h&&!!c;return e.jsxs("div",{className:B.wrapper,children:[V&&e.jsxs(Ie.div,{className:B.deleteUnderlay,style:{opacity:D},children:[e.jsx(an,{size:16}),e.jsx("span",{children:"Delete"})]}),e.jsxs(Ie.div,{className:`${B.card} ${K?B.completed:""} ${C?B.dragging:""}`,style:{x:w,y:b,background:a,color:s,borderLeftColor:a},drag:V&&!C?"x":!1,dragConstraints:V?{left:-200,right:0}:void 0,dragElastic:.15,dragDirectionLock:!0,onDragStart:()=>{L.current=!0},onDragEnd:R,whileTap:C?void 0:{scale:.98},animate:C?{scale:1.03}:{scale:1},onClick:Z,children:[ce&&e.jsx("div",{className:B.grip,onPointerDown:le,onPointerMove:ee,onPointerUp:de,onPointerCancel:de,onClick:p=>p.stopPropagation(),children:e.jsx(ln,{size:14})}),K&&e.jsx(on,{size:14,className:B.checkIcon,strokeWidth:3}),e.jsx("span",{className:B.text,children:o.title}),o.time&&e.jsx("span",{className:B.time,children:o.time}),d&&e.jsx("button",{className:B.editButton,onClick:p=>{p.stopPropagation(),d(o)},"aria-label":"Edit event",children:e.jsx(cn,{size:13})})]})]})};Le.__docgenInfo={description:"",methods:[],displayName:"DayEventCard",props:{draggable:{defaultValue:{value:"true",computed:!1},required:!1}}};const fe=["id","title","date","time","endTime","allDay","type","status","priority","category"],Aa=o=>(typeof o=="string"?new Date(o):o).toISOString(),Ge=o=>{const a={};for(const s of fe){const l=o[s];l!==void 0&&(a[s]=s==="date"?Aa(l):l)}return a},Oa=o=>{if(o==null)return"";const a=String(o);return/[",\n\r]/.test(a)?`"${a.replace(/"/g,'""')}"`:a},Ra=o=>{const a=fe.join(","),s=o.map(l=>{const d=Ge(l);return fe.map(u=>Oa(d[u])).join(",")});return[a,...s].join(`
|
|
12
|
+
`)},Va=o=>JSON.stringify(o.map(Ge),null,2),za=o=>{if(o==null)return"";const a=String(o);return/[",\n\r]/.test(a)?`"${a.replace(/"/g,'""')}"`:a},Ga=o=>{const a=`events[${o.length}]{${fe.join(",")}}:`,s=o.map(l=>{const d=Ge(l);return" "+fe.map(u=>za(d[u])).join(",")});return[a,...s].join(`
|
|
13
|
+
`)},Ua={csv:"text/csv;charset=utf-8;",json:"application/json;charset=utf-8;",toon:"text/plain;charset=utf-8;"},Ya={csv:"csv",json:"json",toon:"toon"},Xa=(o,a)=>a==="csv"?Ra(o):a==="json"?Va(o):Ga(o),Ja=(o,a,s)=>{const l=Xa(o,a),d=new Blob([l],{type:Ua[a]}),u=URL.createObjectURL(d),c=document.createElement("a");c.href=u,c.download=`events-${new Date().toISOString().slice(0,10)}.${Ya[a]}`,document.body.appendChild(c),c.click(),document.body.removeChild(c),URL.revokeObjectURL(u)};function se({events:o,onEventClick:a,onDateClick:s,onEventClickByView:l,onDateClickByView:d,onTimeSlotClick:u,onEventDrop:c,onEventComplete:h,onEventDelete:w,onEventEdit:b,viewMode:D="month",initialDate:C=new Date,config:j={},className:L="",style:H={},loading:K=!1,emptyState:R,hideHeader:Z=!1,compact:le=!1,selectedDate:ee,selectedCategoryId:de,onCategoryChange:V,exportFormats:ce}){const[p,z]=x.useState(C),[_,Be]=x.useState(D),[zt,Gt]=x.useState(null),Ue=de!==void 0,te=Ue?de??null:zt,Ye=t=>{Ue||Gt(t),V==null||V(t)},Fe=x.useRef(null),We=x.useRef(null),[ge,Ae]=x.useState(!1),Oe=x.useRef(null);x.useEffect(()=>{if(!ge)return;const t=r=>{Oe.current&&!Oe.current.contains(r.target)&&Ae(!1)};return document.addEventListener("mousedown",t),()=>document.removeEventListener("mousedown",t)},[ge]);const{eventColors:Xe={},iconRenderer:Je,maxEventsPerDay:G=3,mondayStart:me=!1,showWeekNumbers:ve=!1,dateFormat:Qe={month:"long",year:"numeric"},locale:U="en-US",dayLabels:Ut,monthNames:he,startHour:I=0,endHour:Ke=24,hourHeight:T=60,halfHourSlots:P=!1,categories:ne}=j,Ze=x.useMemo(()=>!ne||ne.length===0||te===null?o:o.filter(t=>!t.category||t.category===te),[o,ne,te]),Yt=Ut||(me?["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),et=(j==null?void 0:j.hourHeight)??60,tt=(j==null?void 0:j.startHour)??0,ue=x.useMemo(()=>{const t=p.getFullYear(),r=p.getMonth();let f,m,S;if(_==="week"){f=new Date(p);const q=f.getDay(),y=me?f.getDate()-q+(q===0?-6:1):f.getDate()-q;f=new Date(f.setDate(y)),f.setHours(0,0,0,0),m=new Date(f),m.setDate(m.getDate()+6);const W=f.toLocaleDateString(U,{day:"numeric",month:"short"}),$=m.toLocaleDateString(U,{day:"numeric",month:"short"});S=`${W} - ${$}`}else if(_==="day")f=new Date(p),f.setHours(0,0,0,0),m=new Date(p),m.setHours(23,59,59,999),S=p.toLocaleDateString(U,{weekday:"long",year:"numeric",month:"long",day:"numeric"});else{const q=new Date(t,r,1),y=new Date(t,r+1,0);f=new Date(q);const W=me?(q.getDay()+6)%7:q.getDay();f.setDate(f.getDate()-W),m=new Date(y);const $=me?(y.getDay()+6)%7:y.getDay();m.setDate(m.getDate()+(6-$)),he&&he[r]?S=`${he[r]} ${t}`:S=p.toLocaleDateString(U,Qe)}const N=[],M=new Date(f);for(;M<=m;)N.push(new Date(M)),M.setDate(M.getDate()+1);return{days:N,displayTitle:S}},[p,_,me,U,Qe,he]);x.useEffect(()=>{const t=_==="day"?Fe:_==="week"?We:null;if(!(t!=null&&t.current))return;const r=new Date;if(!(_==="day"?p.toDateString()===r.toDateString():ue.days.some(N=>N.toDateString()===r.toDateString())))return;const m=(r.getHours()-tt)*60+r.getMinutes(),S=Math.max(0,m/60*et-100);setTimeout(()=>{t.current&&(t.current.scrollTop=S)},0)},[_,p,tt,et,ue]);const Re=t=>{const r=Ze.filter(f=>new Date(f.date).toDateString()===t.toDateString());return _==="week"?r.sort((f,m)=>{const S=f.time?nt(f.time):999999,N=m.time?nt(m.time):999999;return S-N}):r},nt=t=>{const[r,f]=t.split(":").map(Number);return r*60+f},Xt=()=>{const t=new Date(p);_==="week"?t.setDate(t.getDate()-7):_==="day"?t.setDate(t.getDate()-1):t.setMonth(t.getMonth()-1),z(t)},Jt=()=>{const t=new Date(p);_==="week"?t.setDate(t.getDate()+7):_==="day"?t.setDate(t.getDate()+1):t.setMonth(t.getMonth()+1),z(t)},Qt=()=>{z(new Date)},ae=t=>{if(t.color)return t.color;if(t.type&&Xe[t.type])return Xe[t.type];const r={high:"#FF4444",medium:"#FFA500",low:"#4A90E2"};return t.priority&&r[t.priority]?r[t.priority]:"#4A90E2"},Kt=t=>{const r=t.replace("#",""),f=parseInt(r.substring(0,2),16),m=parseInt(r.substring(2,4),16),S=parseInt(r.substring(4,6),16);return(.299*f+.587*m+.114*S)/255>.5?"#000000":"#FFFFFF"},ye=t=>{if(t.textColor)return t.textColor;const r=ae(t);return Kt(r)},we=t=>{l&&l[_]?l[_](t):a&&a(t)},at=t=>{d&&d[_]?d[_](t):s&&s(t)},Zt=t=>{const r=new Date;return t.toDateString()===r.toDateString()},en=t=>t.getMonth()===p.getMonth(),tn=t=>{const r=new Date(t.getFullYear(),0,1),f=t.getTime()-r.getTime(),m=1e3*60*60*24*7;return Math.floor(f/m)+1};return K?e.jsx("div",{className:`${n.calendar} ${n.loading} ${L}`,style:H,children:e.jsx("div",{className:n.loadingSpinner,children:"Loading..."})}):e.jsxs("div",{className:`${n.calendar} ${le?n.compact:""} ${L}`,style:H,children:[!Z&&e.jsxs("div",{className:n.header,children:[e.jsxs("div",{className:n.navigation,children:[e.jsx("button",{onClick:Xt,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:ue.displayTitle}),e.jsx("button",{onClick:Jt,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"})})})]}),ne&&ne.length>0&&e.jsxs("div",{className:n.filterBar,role:"tablist","aria-label":"Filter by category",children:[e.jsx("button",{type:"button",role:"tab","aria-selected":te===null,className:`${n.filterPill} ${te===null?n.filterPillActive:""}`,onClick:()=>Ye(null),children:"All"}),ne.map(t=>{const r=te===t.id;return e.jsxs("button",{type:"button",role:"tab","aria-selected":r,className:`${n.filterPill} ${r?n.filterPillActive:""}`,style:r?{background:t.color,borderColor:t.color,color:"#ffffff"}:void 0,onClick:()=>Ye(t.id),children:[!r&&e.jsx("span",{className:n.filterDot,style:{background:t.color}}),t.label]},t.id)})]}),e.jsxs("div",{className:n.controls,children:[ce&&ce.length>0&&e.jsxs("div",{className:n.exportDropdown,ref:Oe,children:[e.jsx("button",{type:"button",className:n.exportButton,onClick:()=>Ae(t=>!t),"aria-haspopup":"menu","aria-expanded":ge,"aria-label":"Export events",title:"Export events",children:e.jsx(rn,{size:16})}),ge&&e.jsx("div",{className:n.exportMenu,role:"menu",children:ce.map(t=>e.jsx("button",{type:"button",role:"menuitem",className:n.exportMenuItem,onClick:()=>{Ja(Ze,t),Ae(!1)},children:t.toUpperCase()},t))})]}),e.jsx("button",{onClick:Qt,className:n.todayButton,children:"Today"}),e.jsxs("div",{className:n.viewToggle,children:[e.jsx("button",{className:`${n.viewButton} ${_==="month"?n.active:""}`,onClick:()=>Be("month"),children:"Month"}),e.jsx("button",{className:`${n.viewButton} ${_==="week"?n.active:""}`,onClick:()=>Be("week"),children:"Week"}),e.jsx("button",{className:`${n.viewButton} ${_==="day"?n.active:""}`,onClick:()=>Be("day"),children:"Day"})]})]})]}),_==="month"&&e.jsxs("div",{className:`${n.weekDays} ${ve?n.withWeekNumbers:""}`,children:[ve&&e.jsx("div",{className:n.weekNumberHeader,children:"Wk"}),Yt.map(t=>e.jsx("div",{className:n.weekDay,children:t},t))]}),_==="day"?(()=>{const t=Re(p),r=t.filter(i=>!i.allDay&&i.time),f=t.filter(i=>i.allDay||!i.time),m=Array.from({length:Ke-I},(i,g)=>I+g),S=m.length*T,N=new Date,M=p.toDateString()===N.toDateString(),y=((N.getHours()-I)*60+N.getMinutes())/60*T,W=M&&y>=0&&y<=S,$=i=>{const[g,E]=i.split(":").map(Number);return g*60+E},Ve=i=>{if(!i.time||!i.endTime)return 30;const g=$(i.endTime)-$(i.time);return g>0?g:30},v=(i,g)=>{if(u){const E=new Date(p);E.setHours(i,g,0,0);const A=`${i.toString().padStart(2,"0")}:${g.toString().padStart(2,"0")}`;u(E,i,A)}},k=(i,g)=>{var _e;if(!c)return;const E=(_e=Fe.current)==null?void 0:_e.querySelector(`.${n.dayTimelineGrid}`);if(!E)return;const A=E.getBoundingClientRect(),Y=g-A.top,X=P?T/2:T,O=Math.max(0,Math.floor(Y/X)),J=P?m.length*2:m.length,Q=Math.min(J-1,O),ze=I+Math.floor(P?Q/2:Q),pe=P&&Q%2===1?30:0,De=new Date(p);De.setHours(ze,pe,0,0),c(i,De)};return 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:p.toLocaleDateString(U,{weekday:"short",day:"numeric"})})]}),f.length>0&&e.jsxs("div",{className:n.allDayStrip,children:[e.jsx("span",{className:n.allDayLabel,children:"All day"}),e.jsx("div",{className:n.allDayList,children:f.map(i=>e.jsx(Le,{event:i,color:ae(i),textColor:ye(i),onComplete:h??(a?we:void 0),onEdit:b,onDelete:w,draggable:!1},i.id))})]}),e.jsx("div",{className:n.dayViewScrollContainer,ref:Fe,children:e.jsxs("div",{className:n.dayTimelineGrid,style:{height:S},children:[m.map(i=>e.jsxs("div",{className:n.hourRow,style:{height:T},children:[e.jsxs("span",{className:n.hourLabel,children:[i.toString().padStart(2,"0"),":00"]}),e.jsx("div",{className:n.hourSlots,children:P?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:n.halfHourSlot,onClick:()=>v(i,0)}),e.jsx("div",{className:`${n.halfHourSlot} ${n.halfHourSlotBottom}`,onClick:()=>v(i,30)})]}):e.jsx("div",{className:n.halfHourSlot,onClick:()=>v(i,0)})})]},i)),r.map(i=>{const[g,E]=i.time.split(":").map(Number),A=(g-I)*T+E/60*T,Y=Ve(i),X=Math.max(24,Y/60*T-2);return e.jsx("div",{className:n.dayEventAnchor,style:{top:A,height:X},onClick:O=>O.stopPropagation(),children:e.jsx(Le,{event:i,color:ae(i),textColor:ye(i),onComplete:h??(a?we:void 0),onEdit:b,onDelete:w,onDragEnd:c?O=>k(i,O):void 0})},i.id)}),W&&e.jsx("div",{className:n.currentTimeIndicator,style:{top:`${y}px`}})]})})]})})():_==="week"?(()=>{const t=ue.days,r=Array.from({length:Ke-I},(v,k)=>I+k),f=r.length*T,m=new Date,S=t.findIndex(v=>v.toDateString()===m.toDateString()),M=((m.getHours()-I)*60+m.getMinutes())/60*T,q=S>=0&&M>=0&&M<=f,y=v=>{const[k,i]=v.split(":").map(Number);return k*60+i},W=v=>{if(!v.time||!v.endTime)return 30;const k=y(v.endTime)-y(v.time);return k>0?k:30},$=(v,k,i)=>{if(!u)return;const g=new Date(v);g.setHours(k,i,0,0);const E=`${k.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`;u(g,k,E)},Ve=(v,k,i)=>{var rt;if(!c)return;const g=(rt=We.current)==null?void 0:rt.querySelector(`.${n.weekDayColumns}`);if(!g)return;const E=g.getBoundingClientRect(),A=i-E.left,Y=k-E.top,X=E.width/7,O=Math.min(6,Math.max(0,Math.floor(A/X))),J=t[O],Q=P?T/2:T,ze=P?r.length*2:r.length,pe=Math.min(ze-1,Math.max(0,Math.floor(Y/Q))),De=I+Math.floor(P?pe/2:pe),_e=P&&pe%2===1?30:0,ot=new Date(J);ot.setHours(De,_e,0,0),c(v,ot)};return e.jsxs("div",{className:n.weekTimeline,children:[e.jsxs("div",{className:n.weekTimelineHeader,children:[e.jsx("div",{className:n.timeColumnHeader}),t.map(v=>{const k=v.toDateString()===m.toDateString(),i=ee&&v.toDateString()===ee.toDateString();return e.jsxs("button",{type:"button",className:`${n.weekDayColumnHeader} ${k?n.today:""} ${i?n.selected:""}`,onClick:()=>at(v),children:[e.jsx("span",{className:n.weekDayLabel,children:v.toLocaleDateString(U,{weekday:"short"})}),e.jsx("span",{className:n.weekDayNumber,children:v.getDate()})]},v.toISOString())})]}),e.jsx("div",{className:n.weekTimelineScroll,ref:We,children:e.jsxs("div",{className:n.weekTimelineGrid,style:{height:f},children:[e.jsx("div",{className:n.weekTimeColumn,children:r.map(v=>e.jsx("div",{className:n.weekTimeSlot,style:{height:T},children:e.jsxs("span",{className:n.weekHourLabel,children:[v.toString().padStart(2,"0"),":00"]})},v))}),e.jsx("div",{className:n.weekDayColumns,children:t.map(v=>{const k=Re(v).filter(g=>!g.allDay&&g.time),i=v.toDateString()===m.toDateString();return e.jsxs("div",{className:n.weekDayColumn,children:[r.map(g=>e.jsx("div",{className:n.weekHourRow,style:{height:T},children:P?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:n.halfHourSlot,onClick:()=>$(v,g,0)}),e.jsx("div",{className:`${n.halfHourSlot} ${n.halfHourSlotBottom}`,onClick:()=>$(v,g,30)})]}):e.jsx("div",{className:n.halfHourSlot,onClick:()=>$(v,g,0)})},g)),k.map(g=>{const[E,A]=g.time.split(":").map(Number),Y=(E-I)*T+A/60*T,X=W(g),O=Math.max(24,X/60*T-2);return e.jsx("div",{className:n.weekEventAnchor,style:{top:Y,height:O},onClick:J=>J.stopPropagation(),children:e.jsx(Le,{event:g,color:ae(g),textColor:ye(g),onComplete:h??(a?we:void 0),onEdit:b,onDelete:w,onDragEnd:c?(J,Q)=>Ve(g,J,Q):void 0})},g.id)}),i&&q&&e.jsx("div",{className:n.currentTimeIndicator,style:{top:`${M}px`,left:0}})]},v.toISOString())})})]})})]})})():(()=>{const t=le?void 0:40+G*24;return e.jsx("div",{className:`${n.daysGrid} ${ve?n.withWeekNumbers:""}`,children:ue.days.map((r,f)=>{const m=Re(r),S=Zt(r),N=en(r),M=ve&&f%7===0,q=ee&&r.toDateString()===ee.toDateString();return e.jsxs(x.Fragment,{children:[M&&e.jsx("div",{className:n.weekNumberCell,style:t!==void 0?{height:t,minHeight:t}:void 0,children:tn(r)}),e.jsxs(Ie.div,{className:`${n.dayCell} ${S?n.today:""} ${N?"":n.otherMonth} ${q?n.selected:""}`,style:t!==void 0?{height:t,minHeight:t}:void 0,initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,delay:f*.02,ease:"easeOut"},onClick:()=>at(r),children:[e.jsx("div",{className:n.dayNumber,children:r.getDate()}),m.length>0&&le&&_==="month"?e.jsxs("div",{className:n.dots,children:[m.slice(0,G).map(y=>e.jsx("span",{className:n.dot,style:{backgroundColor:ae(y)}},y.id)),m.length>G&&e.jsxs("span",{className:n.dotMore,children:["+",m.length-G]})]}):m.length>0?e.jsxs("div",{className:n.events,children:[m.slice(0,G).map((y,W)=>e.jsxs(Ie.div,{className:`${n.event} ${y.status==="completed"?n.completed:""}`,style:{backgroundColor:ae(y),color:ye(y),opacity:y.status==="completed"?.7:1},onClick:$=>{$.stopPropagation(),we(y)},initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{duration:.2,delay:W*.05,ease:"easeOut"},whileHover:{scale:1.02,y:-1,transition:{duration:.1}},whileTap:{scale:.98,transition:{duration:.1}},children:[Je&&Je(y),e.jsxs("span",{className:n.eventTitle,children:[y.time&&e.jsx("span",{className:n.eventTime,children:y.time}),y.title]}),y.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"})})]},y.id)),m.length>G&&e.jsxs("div",{className:n.moreEvents,children:["+",m.length-G," more"]})]}):R?e.jsx("div",{className:n.emptyState,children:R}):null]})]},`${r.getFullYear()}-${r.getMonth()}-${r.getDate()}`)})})})()]})}se.__docgenInfo={description:`Calendar component - A flexible, reusable calendar for displaying events
|
|
14
14
|
|
|
15
15
|
@component
|
|
16
16
|
@description
|
|
@@ -44,7 +44,7 @@ project management, habit tracking, or any date-based data visualization.
|
|
|
44
44
|
month?: (date: Date) => void;
|
|
45
45
|
week?: (date: Date) => void;
|
|
46
46
|
day?: (date: Date) => void;
|
|
47
|
-
}`,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"},onEventDrop:{required:!1,tsType:{name:"signature",type:"function",raw:"(event: CalendarEvent, newDate: Date) => void",signature:{arguments:[{type:{name:"CalendarEvent"},name:"event"},{type:{name:"Date"},name:"newDate"}],return:{name:"void"}}},description:"Callback when an event is dropped (drag-rescheduled) in day view"},onEventComplete:{required:!1,tsType:{name:"signature",type:"function",raw:"(event: CalendarEvent) => void",signature:{arguments:[{type:{name:"CalendarEvent"},name:"event"}],return:{name:"void"}}},description:"Day view: callback when an event body is tapped to toggle complete"},onEventDelete:{required:!1,tsType:{name:"signature",type:"function",raw:"(event: CalendarEvent) => void",signature:{arguments:[{type:{name:"CalendarEvent"},name:"event"}],return:{name:"void"}}},description:"Day view: callback when an event is swiped left to delete"},onEventEdit:{required:!1,tsType:{name:"signature",type:"function",raw:"(event: CalendarEvent) => void",signature:{arguments:[{type:{name:"CalendarEvent"},name:"event"}],return:{name:"void"}}},description:"Day view: callback when an event's edit button is clicked"},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}},compact:{required:!1,tsType:{name:"boolean"},description:"Compact mode - renders colored dots instead of event blocks in month view",defaultValue:{value:"false",computed:!1}},selectedDate:{required:!1,tsType:{name:"Date"},description:"Externally controlled selected date highlight (distinct from initialDate which controls navigation)"},selectedCategoryId:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:'Controlled category filter selection. `null` means "All". Omit for uncontrolled.'},onCategoryChange:{required:!1,tsType:{name:"signature",type:"function",raw:"(categoryId: string | null) => void",signature:{arguments:[{type:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},name:"categoryId"}],return:{name:"void"}}},description:'Called when the user picks a pill in the category filter. `null` = "All".'},exportFormats:{required:!1,tsType:{name:"Array",elements:[{name:"union",raw:"'csv' | 'json' | 'toon'",elements:[{name:"literal",value:"'csv'"},{name:"literal",value:"'json'"},{name:"literal",value:"'toon'"}]}],raw:"ExportFormat[]"},description:'Offer an "Export" dropdown in the header with the given formats. Exports the currently\nfiltered events (respects category filter). Omit or pass `[]` to hide the button.'}}};const uo={title:"Organisms/Calendar",component:se,parameters:{layout:"padded"},argTypes:{viewMode:{control:"radio",options:["month","week","day"]},compact:{control:"boolean"},config:{control:"object"},onEventClick:{action:"event-clicked"},onDateClick:{action:"date-clicked"},onTimeSlotClick:{action:"slot-clicked"}}},oe=["#4A90E2","#7ED321","#BD10E0","#F5B829","#FF6B6B","#4ECDC4","#7C6FBF"],re=["Morning standup","Sprint planning","Code review","1:1 with manager","Design critique","Client demo","Deep work","Lunch with Ava","Architecture review","Release sign-off","Interview (FE)","Write weekly summary","Bug triage","Pairing session","Retro","Security debrief"],Be=["meeting","task","review","deadline"],W=(o,a=0)=>`${o.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`,Qa=o=>{let a=o;return()=>{a|=0,a=a+1831565813|0;let s=Math.imul(a^a>>>15,1|a);return s=s+Math.imul(s^s>>>7,61|s)^s,((s^s>>>14)>>>0)/4294967296}},ie=(o=42)=>{const a=Qa(o),s=new Date,l=[];for(let c=0;c<28;c++){const u=new Date(s);u.setDate(s.getDate()+Math.floor(a()*30)-15);const d=8+Math.floor(a()*10),f=a()>.5?0:30;l.push({id:`m-${c}`,title:re[c%re.length],date:u,time:a()>.35?W(d,f):void 0,type:Be[Math.floor(a()*Be.length)],status:a()>.75?"completed":"pending",color:oe[c%oe.length],textColor:"#ffffff"})}return l},Vt=()=>{const o=new Date,a=(s,l=0)=>{const c=new Date(o);return c.setHours(s,l,0,0),c};return[{id:"ad-1",title:"Offsite — Q2 planning",date:a(0),allDay:!0,color:"#7C6FBF",textColor:"#ffffff"},{id:"d-1",title:"Morning standup",date:a(9),time:"09:00",endTime:"09:30",status:"completed",color:"#4A90E2",textColor:"#ffffff"},{id:"d-2",title:"Deep work: refactor auth",date:a(10),time:"10:00",endTime:"12:00",color:"#F5B829",textColor:"#1a1a1a"},{id:"d-3",title:"Lunch with Ava",date:a(12,30),time:"12:30",endTime:"13:30",color:"#4ECDC4",textColor:"#1a1a1a"},{id:"d-4",title:"1:1 with manager",date:a(14),time:"14:00",endTime:"14:30",color:"#BD10E0",textColor:"#ffffff"},{id:"d-5",title:"Design review",date:a(15),time:"15:00",endTime:"16:30",color:"#FF6B6B",textColor:"#ffffff"},{id:"d-6",title:"Write weekly summary",date:a(17,30),time:"17:30",endTime:"18:00",color:"#10b981",textColor:"#ffffff"}]},Ka=o=>{const a={meeting:"👥",task:"✓",review:"👀",deadline:"⏰"};return e.jsx("span",{style:{fontSize:11},children:a[o.type??""]??"📅"})},Se={args:{events:ie(),viewMode:"month",config:{mondayStart:!0,maxEventsPerDay:3,iconRenderer:Ka}},render:o=>{const[a,s]=S.useState(o.events??[]);return e.jsx(se,{...o,events:a,onEventClick:l=>{s(c=>c.map(u=>u.id===l.id?{...u,status:u.status==="completed"?"pending":"completed"}:u))},onDateClick:l=>{s(c=>[...c,{id:`new-${Date.now()}`,title:"New event",date:l,time:"15:00",type:"task",status:"pending",color:"#6366f1",textColor:"#ffffff"}])}})}},ke={args:{events:[],viewMode:"week",config:{mondayStart:!0,startHour:7,endHour:22,hourHeight:56,halfHourSlots:!0}},render:o=>{const a=new Date,s=(a.getDay()+6)%7,l=new Date(a);l.setDate(a.getDate()-s),l.setHours(0,0,0,0);const c=[];for(let f=0;f<7;f++){const w=new Date(l);w.setDate(l.getDate()+f);const _=f*2%3+1;for(let x=0;x<_;x++){const T=9+x*3+f%2;c.push({id:`w-${f}-${x}`,title:re[(f*3+x)%re.length],date:new Date(w),time:W(T,x%2===0?0:30),endTime:W(T+1,x%2===0?0:30),color:oe[(f+x)%oe.length],textColor:"#ffffff"})}}const[u,d]=S.useState(c);return e.jsx(se,{...o,events:u,onTimeSlotClick:(f,w,_)=>{const x=Math.min(23,f.getHours()+1);d(T=>[...T,{id:`new-${Date.now()}`,title:`New @ ${_}`,date:f,time:_,endTime:W(x,f.getMinutes()),color:"#6366f1",textColor:"#ffffff"}])},onEventComplete:f=>d(w=>w.map(_=>_.id===f.id?{..._,status:_.status==="completed"?"pending":"completed"}:_)),onEventDelete:f=>d(w=>w.filter(_=>_.id!==f.id)),onEventDrop:(f,w)=>{d(_=>_.map(x=>{if(x.id!==f.id)return x;const T=new Date(x.date),j=w.getTime()-T.getTime(),I=(()=>{if(!x.endTime||!x.time)return x.endTime;const[H,K]=x.endTime.split(":").map(Number),q=new Date(T);q.setHours(H,K,0,0);const Z=new Date(q.getTime()+j);return W(Z.getHours(),Z.getMinutes())})();return{...x,date:w,time:W(w.getHours(),w.getMinutes()),endTime:I}}))}})}},Ce={args:{events:[],viewMode:"day",config:{startHour:6,endHour:24,hourHeight:72,halfHourSlots:!0,mondayStart:!0}},render:o=>{const[a,s]=S.useState(Vt());return e.jsx(se,{...o,events:a,onTimeSlotClick:(l,c,u)=>{const d=Math.min(23,l.getHours()+1);s(f=>[...f,{id:`new-${Date.now()}`,title:`New @ ${u}`,date:l,time:u,endTime:W(d,l.getMinutes()),color:"#6366f1",textColor:"#ffffff"}])},onEventComplete:l=>s(c=>c.map(u=>u.id===l.id?{...u,status:u.status==="completed"?"pending":"completed"}:u)),onEventDelete:l=>s(c=>c.filter(u=>u.id!==l.id)),onEventEdit:l=>{const c=window.prompt("Rename event",l.title);c&&s(u=>u.map(d=>d.id===l.id?{...d,title:c}:d))},onEventDrop:(l,c)=>{s(u=>u.map(d=>{if(d.id!==l.id)return d;const f=new Date(d.date),w=c.getTime()-f.getTime(),_=(()=>{if(!d.endTime||!d.time)return d.endTime;const[x,T]=d.endTime.split(":").map(Number),j=new Date(f);j.setHours(x,T,0,0);const I=new Date(j.getTime()+w);return W(I.getHours(),I.getMinutes())})();return{...d,date:c,time:W(c.getHours(),c.getMinutes()),endTime:_}}))}})}},Te={args:{events:ie(1).map((a,s)=>({...a,category:s%3===0?"work":s%3===1?"life":"side"})),viewMode:"month",compact:!0,config:{mondayStart:!0,maxEventsPerDay:4,categories:[{id:"life",label:"Life",color:"#F5B829"},{id:"work",label:"Work",color:"#7C6FBF"},{id:"side",label:"Side",color:"#4ECDC4"}]},style:{maxWidth:420}}},Ee={args:{events:Vt(),viewMode:"day",compact:!0,config:{startHour:7,endHour:22,hourHeight:56,halfHourSlots:!0},style:{maxWidth:520}}},be={args:{events:ie(3),viewMode:"month",config:{mondayStart:!0,showWeekNumbers:!0,maxEventsPerDay:3}}},je={args:{events:(()=>{const o=new Date;return Array.from({length:9},(a,s)=>({id:`over-${s}`,title:re[s%re.length],date:new Date(o),time:W(8+s),type:Be[s%Be.length],color:oe[s%oe.length],textColor:"#ffffff"}))})(),viewMode:"month",config:{mondayStart:!0,maxEventsPerDay:3}}},Ne={args:{events:[],loading:!0}},He={args:{events:[],viewMode:"month",config:{mondayStart:!0},emptyState:e.jsx("span",{style:{color:"var(--color-text-tertiary)",fontSize:11},children:"No events"})}},Me={args:{events:ie(5),viewMode:"month",exportFormats:["csv","json","toon"],config:{mondayStart:!0,maxEventsPerDay:3}}},$e={args:{events:ie(11).map((a,s)=>({...a,category:s%3===0?"work":s%3===1?"life":"side"})),viewMode:"month",config:{mondayStart:!0,maxEventsPerDay:3,categories:[{id:"life",label:"Life",color:"#F5B829"},{id:"work",label:"Work",color:"#7C6FBF"},{id:"side",label:"Side projects",color:"#4ECDC4"}]}}},Le={args:{events:[]},render:()=>{const[o,a]=S.useState(new Date),s=S.useMemo(()=>ie(9),[]);return e.jsxs("div",{style:{display:"grid",gap:"var(--spacing-md)"},children:[e.jsxs("div",{style:{fontSize:"var(--font-size-sm)",color:"var(--color-text-secondary)"},children:["Selected: ",e.jsx("strong",{children:o.toLocaleDateString()})]}),e.jsx(se,{events:s,viewMode:"month",selectedDate:o,onDateClick:a,config:{mondayStart:!0,maxEventsPerDay:3}})]})}};var it,lt,ct;Se.parameters={...Se.parameters,docs:{...(it=Se.parameters)==null?void 0:it.docs,source:{originalSource:`{
|
|
47
|
+
}`,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"},onEventDrop:{required:!1,tsType:{name:"signature",type:"function",raw:"(event: CalendarEvent, newDate: Date) => void",signature:{arguments:[{type:{name:"CalendarEvent"},name:"event"},{type:{name:"Date"},name:"newDate"}],return:{name:"void"}}},description:"Callback when an event is dropped (drag-rescheduled) in day view"},onEventComplete:{required:!1,tsType:{name:"signature",type:"function",raw:"(event: CalendarEvent) => void",signature:{arguments:[{type:{name:"CalendarEvent"},name:"event"}],return:{name:"void"}}},description:"Day view: callback when an event body is tapped to toggle complete"},onEventDelete:{required:!1,tsType:{name:"signature",type:"function",raw:"(event: CalendarEvent) => void",signature:{arguments:[{type:{name:"CalendarEvent"},name:"event"}],return:{name:"void"}}},description:"Day view: callback when an event is swiped left to delete"},onEventEdit:{required:!1,tsType:{name:"signature",type:"function",raw:"(event: CalendarEvent) => void",signature:{arguments:[{type:{name:"CalendarEvent"},name:"event"}],return:{name:"void"}}},description:"Day view: callback when an event's edit button is clicked"},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}},compact:{required:!1,tsType:{name:"boolean"},description:"Compact mode - renders colored dots instead of event blocks in month view",defaultValue:{value:"false",computed:!1}},selectedDate:{required:!1,tsType:{name:"Date"},description:"Externally controlled selected date highlight (distinct from initialDate which controls navigation)"},selectedCategoryId:{required:!1,tsType:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},description:'Controlled category filter selection. `null` means "All". Omit for uncontrolled.'},onCategoryChange:{required:!1,tsType:{name:"signature",type:"function",raw:"(categoryId: string | null) => void",signature:{arguments:[{type:{name:"union",raw:"string | null",elements:[{name:"string"},{name:"null"}]},name:"categoryId"}],return:{name:"void"}}},description:'Called when the user picks a pill in the category filter. `null` = "All".'},exportFormats:{required:!1,tsType:{name:"Array",elements:[{name:"union",raw:"'csv' | 'json' | 'toon'",elements:[{name:"literal",value:"'csv'"},{name:"literal",value:"'json'"},{name:"literal",value:"'toon'"}]}],raw:"ExportFormat[]"},description:'Offer an "Export" dropdown in the header with the given formats. Exports the currently\nfiltered events (respects category filter). Omit or pass `[]` to hide the button.'}}};const uo={title:"Organisms/Calendar",component:se,parameters:{layout:"padded"},argTypes:{viewMode:{control:"radio",options:["month","week","day"]},compact:{control:"boolean"},config:{control:"object"},onEventClick:{action:"event-clicked"},onDateClick:{action:"date-clicked"},onTimeSlotClick:{action:"slot-clicked"}}},oe=["#4A90E2","#7ED321","#BD10E0","#F5B829","#FF6B6B","#4ECDC4","#7C6FBF"],re=["Morning standup","Sprint planning","Code review","1:1 with manager","Design critique","Client demo","Deep work","Lunch with Ava","Architecture review","Release sign-off","Interview (FE)","Write weekly summary","Bug triage","Pairing session","Retro","Security debrief"],Pe=["meeting","task","review","deadline"],F=(o,a=0)=>`${o.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}`,Qa=o=>{let a=o;return()=>{a|=0,a=a+1831565813|0;let s=Math.imul(a^a>>>15,1|a);return s=s+Math.imul(s^s>>>7,61|s)^s,((s^s>>>14)>>>0)/4294967296}},ie=(o=42)=>{const a=Qa(o),s=new Date,l=[];for(let d=0;d<28;d++){const u=new Date(s);u.setDate(s.getDate()+Math.floor(a()*30)-15);const c=8+Math.floor(a()*10),h=a()>.5?0:30;l.push({id:`m-${d}`,title:re[d%re.length],date:u,time:a()>.35?F(c,h):void 0,type:Pe[Math.floor(a()*Pe.length)],status:a()>.75?"completed":"pending",color:oe[d%oe.length],textColor:"#ffffff"})}return l},Vt=()=>{const o=new Date,a=(s,l=0)=>{const d=new Date(o);return d.setHours(s,l,0,0),d};return[{id:"ad-1",title:"Offsite — Q2 planning",date:a(0),allDay:!0,color:"#7C6FBF",textColor:"#ffffff"},{id:"d-1",title:"Morning standup",date:a(9),time:"09:00",endTime:"09:30",status:"completed",color:"#4A90E2",textColor:"#ffffff"},{id:"d-2",title:"Deep work: refactor auth",date:a(10),time:"10:00",endTime:"12:00",color:"#F5B829",textColor:"#1a1a1a"},{id:"d-3",title:"Lunch with Ava",date:a(12,30),time:"12:30",endTime:"13:30",color:"#4ECDC4",textColor:"#1a1a1a"},{id:"d-4",title:"1:1 with manager",date:a(14),time:"14:00",endTime:"14:30",color:"#BD10E0",textColor:"#ffffff"},{id:"d-5",title:"Design review",date:a(15),time:"15:00",endTime:"16:30",color:"#FF6B6B",textColor:"#ffffff"},{id:"d-6",title:"Write weekly summary",date:a(17,30),time:"17:30",endTime:"18:00",color:"#10b981",textColor:"#ffffff"}]},Ka=o=>{const a={meeting:"👥",task:"✓",review:"👀",deadline:"⏰"};return e.jsx("span",{style:{fontSize:11},children:a[o.type??""]??"📅"})},xe={args:{events:ie(),viewMode:"month",config:{mondayStart:!0,maxEventsPerDay:3,iconRenderer:Ka}},render:o=>{const[a,s]=x.useState(o.events??[]);return e.jsx(se,{...o,events:a,onEventClick:l=>{s(d=>d.map(u=>u.id===l.id?{...u,status:u.status==="completed"?"pending":"completed"}:u))},onDateClick:l=>{s(d=>[...d,{id:`new-${Date.now()}`,title:"New event",date:l,time:"15:00",type:"task",status:"pending",color:"#6366f1",textColor:"#ffffff"}])}})}},Se={args:{events:[],viewMode:"week",config:{mondayStart:!0,startHour:7,endHour:22,hourHeight:56,halfHourSlots:!0}},render:o=>{const a=new Date,s=(a.getDay()+6)%7,l=new Date(a);l.setDate(a.getDate()-s),l.setHours(0,0,0,0);const d=[];for(let h=0;h<7;h++){const w=new Date(l);w.setDate(l.getDate()+h);const b=h*2%3+1;for(let D=0;D<b;D++){const C=9+D*3+h%2;d.push({id:`w-${h}-${D}`,title:re[(h*3+D)%re.length],date:new Date(w),time:F(C,D%2===0?0:30),endTime:F(C+1,D%2===0?0:30),color:oe[(h+D)%oe.length],textColor:"#ffffff"})}}const[u,c]=x.useState(d);return e.jsx(se,{...o,events:u,onTimeSlotClick:(h,w,b)=>{const D=Math.min(23,h.getHours()+1);c(C=>[...C,{id:`new-${Date.now()}`,title:`New @ ${b}`,date:h,time:b,endTime:F(D,h.getMinutes()),color:"#6366f1",textColor:"#ffffff"}])},onEventComplete:h=>c(w=>w.map(b=>b.id===h.id?{...b,status:b.status==="completed"?"pending":"completed"}:b)),onEventDelete:h=>c(w=>w.filter(b=>b.id!==h.id)),onEventDrop:(h,w)=>{c(b=>b.map(D=>{if(D.id!==h.id)return D;const C=new Date(D.date),j=w.getTime()-C.getTime(),L=(()=>{if(!D.endTime||!D.time)return D.endTime;const[H,K]=D.endTime.split(":").map(Number),R=new Date(C);R.setHours(H,K,0,0);const Z=new Date(R.getTime()+j);return F(Z.getHours(),Z.getMinutes())})();return{...D,date:w,time:F(w.getHours(),w.getMinutes()),endTime:L}}))}})}},ke={args:{events:[],viewMode:"day",config:{startHour:6,endHour:24,hourHeight:72,halfHourSlots:!0,mondayStart:!0}},render:o=>{const[a,s]=x.useState(Vt());return e.jsx(se,{...o,events:a,onTimeSlotClick:(l,d,u)=>{const c=Math.min(23,l.getHours()+1);s(h=>[...h,{id:`new-${Date.now()}`,title:`New @ ${u}`,date:l,time:u,endTime:F(c,l.getMinutes()),color:"#6366f1",textColor:"#ffffff"}])},onEventComplete:l=>s(d=>d.map(u=>u.id===l.id?{...u,status:u.status==="completed"?"pending":"completed"}:u)),onEventDelete:l=>s(d=>d.filter(u=>u.id!==l.id)),onEventEdit:l=>{const d=window.prompt("Rename event",l.title);d&&s(u=>u.map(c=>c.id===l.id?{...c,title:d}:c))},onEventDrop:(l,d)=>{s(u=>u.map(c=>{if(c.id!==l.id)return c;const h=new Date(c.date),w=d.getTime()-h.getTime(),b=(()=>{if(!c.endTime||!c.time)return c.endTime;const[D,C]=c.endTime.split(":").map(Number),j=new Date(h);j.setHours(D,C,0,0);const L=new Date(j.getTime()+w);return F(L.getHours(),L.getMinutes())})();return{...c,date:d,time:F(d.getHours(),d.getMinutes()),endTime:b}}))}})}},Ce={args:{events:ie(1).map((a,s)=>({...a,category:s%3===0?"work":s%3===1?"life":"side"})),viewMode:"month",compact:!0,config:{mondayStart:!0,maxEventsPerDay:4,categories:[{id:"life",label:"Life",color:"#F5B829"},{id:"work",label:"Work",color:"#7C6FBF"},{id:"side",label:"Side",color:"#4ECDC4"}]},style:{maxWidth:420}}},Te={args:{events:Vt(),viewMode:"day",compact:!0,config:{startHour:7,endHour:22,hourHeight:56,halfHourSlots:!0},style:{maxWidth:520}}},Ee={args:{events:ie(3),viewMode:"month",config:{mondayStart:!0,showWeekNumbers:!0,maxEventsPerDay:3}}},je={args:{events:(()=>{const o=new Date;return Array.from({length:9},(a,s)=>({id:`over-${s}`,title:re[s%re.length],date:new Date(o),time:F(8+s),type:Pe[s%Pe.length],color:oe[s%oe.length],textColor:"#ffffff"}))})(),viewMode:"month",config:{mondayStart:!0,maxEventsPerDay:3}}},Ne={args:{events:[],loading:!0}},He={args:{events:[],viewMode:"month",config:{mondayStart:!0},emptyState:e.jsx("span",{style:{color:"var(--color-text-tertiary)",fontSize:11},children:"No events"})}},Me={args:{events:ie(5),viewMode:"month",exportFormats:["csv","json","toon"],config:{mondayStart:!0,maxEventsPerDay:3}}},qe={args:{events:ie(11).map((a,s)=>({...a,category:s%3===0?"work":s%3===1?"life":"side"})),viewMode:"month",config:{mondayStart:!0,maxEventsPerDay:3,categories:[{id:"life",label:"Life",color:"#F5B829"},{id:"work",label:"Work",color:"#7C6FBF"},{id:"side",label:"Side projects",color:"#4ECDC4"}]}}},$e={args:{events:[]},render:()=>{const[o,a]=x.useState(new Date),s=x.useMemo(()=>ie(9),[]);return e.jsxs("div",{style:{display:"grid",gap:"var(--spacing-md)"},children:[e.jsxs("div",{style:{fontSize:"var(--font-size-sm)",color:"var(--color-text-secondary)"},children:["Selected: ",e.jsx("strong",{children:o.toLocaleDateString()})]}),e.jsx(se,{events:s,viewMode:"month",selectedDate:o,onDateClick:a,config:{mondayStart:!0,maxEventsPerDay:3}})]})}};var it,lt,dt;xe.parameters={...xe.parameters,docs:{...(it=xe.parameters)==null?void 0:it.docs,source:{originalSource:`{
|
|
48
48
|
args: {
|
|
49
49
|
events: buildMonthEvents(),
|
|
50
50
|
viewMode: 'month',
|
|
@@ -74,7 +74,7 @@ project management, habit tracking, or any date-based data visualization.
|
|
|
74
74
|
}]);
|
|
75
75
|
}} />;
|
|
76
76
|
}
|
|
77
|
-
}`,...(
|
|
77
|
+
}`,...(dt=(lt=xe.parameters)==null?void 0:lt.docs)==null?void 0:dt.source}}};var ct,mt,ut;Se.parameters={...Se.parameters,docs:{...(ct=Se.parameters)==null?void 0:ct.docs,source:{originalSource:`{
|
|
78
78
|
args: {
|
|
79
79
|
events: [],
|
|
80
80
|
viewMode: 'week',
|
|
@@ -148,7 +148,7 @@ project management, habit tracking, or any date-based data visualization.
|
|
|
148
148
|
}));
|
|
149
149
|
}} />;
|
|
150
150
|
}
|
|
151
|
-
}`,...(ut=(mt=
|
|
151
|
+
}`,...(ut=(mt=Se.parameters)==null?void 0:mt.docs)==null?void 0:ut.source}}};var pt,ft,gt;ke.parameters={...ke.parameters,docs:{...(pt=ke.parameters)==null?void 0:pt.docs,source:{originalSource:`{
|
|
152
152
|
args: {
|
|
153
153
|
events: [],
|
|
154
154
|
viewMode: 'day',
|
|
@@ -205,7 +205,7 @@ project management, habit tracking, or any date-based data visualization.
|
|
|
205
205
|
}));
|
|
206
206
|
}} />;
|
|
207
207
|
}
|
|
208
|
-
}`,...(gt=(
|
|
208
|
+
}`,...(gt=(ft=ke.parameters)==null?void 0:ft.docs)==null?void 0:gt.source}}};var vt,ht,yt;Ce.parameters={...Ce.parameters,docs:{...(vt=Ce.parameters)==null?void 0:vt.docs,source:{originalSource:`{
|
|
209
209
|
args: {
|
|
210
210
|
events: (() => {
|
|
211
211
|
const base = buildMonthEvents(1);
|
|
@@ -237,7 +237,7 @@ project management, habit tracking, or any date-based data visualization.
|
|
|
237
237
|
maxWidth: 420
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
}`,...(yt=(
|
|
240
|
+
}`,...(yt=(ht=Ce.parameters)==null?void 0:ht.docs)==null?void 0:yt.source}}};var wt,Dt,_t;Te.parameters={...Te.parameters,docs:{...(wt=Te.parameters)==null?void 0:wt.docs,source:{originalSource:`{
|
|
241
241
|
args: {
|
|
242
242
|
events: buildDayEvents(),
|
|
243
243
|
viewMode: 'day',
|
|
@@ -252,7 +252,7 @@ project management, habit tracking, or any date-based data visualization.
|
|
|
252
252
|
maxWidth: 520
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
|
-
}`,...(
|
|
255
|
+
}`,...(_t=(Dt=Te.parameters)==null?void 0:Dt.docs)==null?void 0:_t.source}}};var bt,xt,St;Ee.parameters={...Ee.parameters,docs:{...(bt=Ee.parameters)==null?void 0:bt.docs,source:{originalSource:`{
|
|
256
256
|
args: {
|
|
257
257
|
events: buildMonthEvents(3),
|
|
258
258
|
viewMode: 'month',
|
|
@@ -262,7 +262,7 @@ project management, habit tracking, or any date-based data visualization.
|
|
|
262
262
|
maxEventsPerDay: 3
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
}`,...(
|
|
265
|
+
}`,...(St=(xt=Ee.parameters)==null?void 0:xt.docs)==null?void 0:St.source}}};var kt,Ct,Tt;je.parameters={...je.parameters,docs:{...(kt=je.parameters)==null?void 0:kt.docs,source:{originalSource:`{
|
|
266
266
|
args: {
|
|
267
267
|
events: (() => {
|
|
268
268
|
const today = new Date();
|
|
@@ -284,12 +284,12 @@ project management, habit tracking, or any date-based data visualization.
|
|
|
284
284
|
maxEventsPerDay: 3
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
}`,...(
|
|
287
|
+
}`,...(Tt=(Ct=je.parameters)==null?void 0:Ct.docs)==null?void 0:Tt.source}}};var Et,jt,Nt;Ne.parameters={...Ne.parameters,docs:{...(Et=Ne.parameters)==null?void 0:Et.docs,source:{originalSource:`{
|
|
288
288
|
args: {
|
|
289
289
|
events: [],
|
|
290
290
|
loading: true
|
|
291
291
|
}
|
|
292
|
-
}`,...(Nt=(jt=Ne.parameters)==null?void 0:jt.docs)==null?void 0:Nt.source}}};var Ht,Mt
|
|
292
|
+
}`,...(Nt=(jt=Ne.parameters)==null?void 0:jt.docs)==null?void 0:Nt.source}}};var Ht,Mt,qt;He.parameters={...He.parameters,docs:{...(Ht=He.parameters)==null?void 0:Ht.docs,source:{originalSource:`{
|
|
293
293
|
args: {
|
|
294
294
|
events: [],
|
|
295
295
|
viewMode: 'month',
|
|
@@ -303,7 +303,7 @@ project management, habit tracking, or any date-based data visualization.
|
|
|
303
303
|
No events
|
|
304
304
|
</span>
|
|
305
305
|
}
|
|
306
|
-
}`,...(
|
|
306
|
+
}`,...(qt=(Mt=He.parameters)==null?void 0:Mt.docs)==null?void 0:qt.source}}};var $t,Lt,It;Me.parameters={...Me.parameters,docs:{...($t=Me.parameters)==null?void 0:$t.docs,source:{originalSource:`{
|
|
307
307
|
args: {
|
|
308
308
|
events: buildMonthEvents(5),
|
|
309
309
|
viewMode: 'month',
|
|
@@ -313,7 +313,7 @@ project management, habit tracking, or any date-based data visualization.
|
|
|
313
313
|
maxEventsPerDay: 3
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
-
}`,...(
|
|
316
|
+
}`,...(It=(Lt=Me.parameters)==null?void 0:Lt.docs)==null?void 0:It.source}}};var Pt,Bt,Ft;qe.parameters={...qe.parameters,docs:{...(Pt=qe.parameters)==null?void 0:Pt.docs,source:{originalSource:`{
|
|
317
317
|
args: {
|
|
318
318
|
events: (() => {
|
|
319
319
|
const base = buildMonthEvents(11);
|
|
@@ -341,7 +341,7 @@ project management, habit tracking, or any date-based data visualization.
|
|
|
341
341
|
}]
|
|
342
342
|
}
|
|
343
343
|
}
|
|
344
|
-
}`,...(
|
|
344
|
+
}`,...(Ft=(Bt=qe.parameters)==null?void 0:Bt.docs)==null?void 0:Ft.source}}};var Wt,At,Ot;$e.parameters={...$e.parameters,docs:{...(Wt=$e.parameters)==null?void 0:Wt.docs,source:{originalSource:`{
|
|
345
345
|
args: {
|
|
346
346
|
events: []
|
|
347
347
|
},
|
|
@@ -364,4 +364,4 @@ project management, habit tracking, or any date-based data visualization.
|
|
|
364
364
|
}} />
|
|
365
365
|
</div>;
|
|
366
366
|
}
|
|
367
|
-
}`,...(
|
|
367
|
+
}`,...(Ot=(At=$e.parameters)==null?void 0:At.docs)==null?void 0:Ot.source}}};const po=["Default","WeekView","DayView","CompactMonth","CompactDay","WithWeekNumbers","OverflowDay","Loading","Empty","WithExport","WithCategoryFilter","ControlledSelection"];export{Te as CompactDay,Ce as CompactMonth,$e as ControlledSelection,ke as DayView,xe as Default,He as Empty,Ne as Loading,je as OverflowDay,Se as WeekView,qe as WithCategoryFilter,Me as WithExport,Ee as WithWeekNumbers,po as __namedExportsOrder,uo as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as I,j as e}from"./iframe-
|
|
1
|
+
import{r as I,j as e}from"./iframe-Bzk7a4jE.js";import{A as M}from"./index-CFq2Sj1X.js";import{m as _}from"./proxy-DWSRYAjq.js";const B="_card_k0xft_1",V="_hoverable_k0xft_50",A="_elevated_k0xft_65",L="_outlined_k0xft_78",S="_flat_k0xft_111",E="_glass_k0xft_156",W="_imageContainer_k0xft_187",F="_image_k0xft_187",H="_header_k0xft_233",R="_headerContent_k0xft_248",O="_expandButton_k0xft_254",D="_expandIcon_k0xft_285",J="_expandableContent_k0xft_289",U="_expandable_k0xft_289",X="_body_k0xft_313",z="_footer_k0xft_319",G="_title_k0xft_350",K="_subtitle_k0xft_366",Q="_clickable_k0xft_380",Y="_padding_k0xft_394",Z="_noPadding_k0xft_398",$="_loading_k0xft_403",ee="_loadingShimmer_k0xft_1",ae="_loadingPulse_k0xft_1",a={card:B,hoverable:V,elevated:A,outlined:L,flat:S,glass:E,imageContainer:W,image:F,header:H,headerContent:R,expandButton:O,expandIcon:D,expandableContent:J,expandable:U,body:X,footer:z,title:G,subtitle:K,clickable:Q,padding:Y,noPadding:Z,loading:$,loadingShimmer:ee,loadingPulse:ae},te=({variant:g="elevated",hoverable:d=!1,clickable:l=!1,padding:c=!0,image:p,imageAlt:v="",title:o,subtitle:s,header:u,footer:m,children:f,expandable:t=!1,defaultExpanded:C=!1,expanded:i,onExpandChange:r,className:b="",onClick:k,motionProps:y,...j})=>{const[T,N]=I.useState(C),n=i!==void 0?i:T,h=()=>{const x=!n;i===void 0&&N(x),r==null||r(x)},q=[a.card,a[g],d&&a.hoverable,l&&a.clickable,!c&&a.noPadding,t&&a.expandable,b].filter(Boolean).join(" "),w=()=>u?e.jsxs("div",{className:a.header,children:[e.jsx("div",{className:a.headerContent,children:u}),t&&e.jsx("button",{className:a.expandButton,onClick:h,"aria-label":n?"Collapse card":"Expand card",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:a.expandIcon,style:{transform:n?"rotate(180deg)":"rotate(0deg)"},children:e.jsx("path",{d:"M6 9l6 6 6-6"})})})]}):o||s?e.jsxs("div",{className:a.header,children:[e.jsxs("div",{className:a.headerContent,children:[o&&e.jsx("h3",{className:a.title,children:o}),s&&e.jsx("p",{className:a.subtitle,children:s})]}),t&&e.jsx("button",{className:a.expandButton,onClick:h,"aria-label":n?"Collapse card":"Expand card",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:a.expandIcon,style:{transform:n?"rotate(180deg)":"rotate(0deg)"},children:e.jsx("path",{d:"M6 9l6 6 6-6"})})})]}):null,P=e.jsxs(e.Fragment,{children:[p&&e.jsx("div",{className:a.imageContainer,children:e.jsx("img",{src:p,alt:v,className:a.image})}),w(),e.jsx(M,{initial:!1,children:(!t||n)&&e.jsxs(_.div,{initial:t?{height:0,opacity:0}:void 0,animate:t?{height:"auto",opacity:1}:void 0,exit:t?{height:0,opacity:0}:void 0,transition:{duration:.3,ease:"easeInOut"},className:a.expandableContent,children:[f&&e.jsx("div",{className:c?a.body:void 0,children:f}),m&&e.jsx("div",{className:a.footer,children:m})]},"content")})]});return e.jsx(_.div,{className:q,onClick:l?k:void 0,whileHover:d?{y:-4}:void 0,transition:{type:"spring",stiffness:400,damping:17},...y,...j,children:P})};te.__docgenInfo={description:`Card Component
|
|
2
2
|
|
|
3
3
|
@component
|
|
4
4
|
@description
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,r as T}from"./iframe-
|
|
1
|
+
import{j as e,r as T}from"./iframe-Bzk7a4jE.js";import{C as a}from"./Card-OLMSKhVR.js";import{B as t}from"./Button-XXleA-vf.js";import"./preload-helper-C1FmrZbK.js";import"./index-CFq2Sj1X.js";import"./proxy-DWSRYAjq.js";import"./MotionConfigContext-C14_78av.js";import"./useSound-BpN96I3Q.js";const D={title:"Atoms/Card",component:a,parameters:{layout:"centered",docs:{description:{component:"A flexible container component with various styling options and animation support."}}},argTypes:{variant:{control:"select",options:["elevated","outlined","flat","glass"],description:"Visual style variant of the card"},padding:{control:"boolean"},hoverable:{control:"boolean"},clickable:{control:"boolean"},expandable:{control:"boolean"},defaultExpanded:{control:"boolean"},title:{control:"text"},subtitle:{control:"text"},onClick:{action:"clicked"},onExpandChange:{action:"expand-changed"}}},r={args:{title:"Card Title",subtitle:"Optional subtitle",hoverable:!0,children:e.jsx("p",{children:"Card content goes here. Use controls to switch between elevated, outlined, flat, and glass variants."})}},n={args:{variant:"elevated",hoverable:!0,image:"https://via.placeholder.com/350x200",imageAlt:"Feature image",children:e.jsxs("div",{style:{maxWidth:"350px"},children:[e.jsx("h2",{style:{marginBottom:"0.5rem"},children:"Feature Card"}),e.jsx("p",{style:{marginBottom:"1rem",color:"#666"},children:"Image, title, description, and action buttons composed together."}),e.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[e.jsx(t,{variant:"primary",size:"small",children:"Learn More"}),e.jsx(t,{variant:"outline",size:"small",children:"Share"})]})]})}},l={render:()=>e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"1rem",maxWidth:"800px"},children:[e.jsxs(a,{variant:"elevated",hoverable:!0,children:[e.jsx("h4",{children:"Elevated"}),e.jsx("p",{children:"With shadow"})]}),e.jsxs(a,{variant:"outlined",hoverable:!0,children:[e.jsx("h4",{children:"Outlined"}),e.jsx("p",{children:"With border"})]}),e.jsxs(a,{variant:"glass",hoverable:!0,children:[e.jsx("h4",{children:"Glass"}),e.jsx("p",{children:"Glassmorphism"})]})]}),parameters:{controls:{disable:!0},layout:"padded"}},s={args:{title:"Expandable Card",subtitle:"Click the arrow to expand",expandable:!0,variant:"outlined",children:e.jsxs("div",{children:[e.jsx("p",{children:"This content is collapsible. Useful for FAQ sections, settings panels, or progressive disclosure."}),e.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"1rem"},children:[e.jsx(t,{variant:"primary",size:"small",children:"Action"}),e.jsx(t,{variant:"outline",size:"small",children:"Secondary"})]})]})}},i={render:()=>{const[d,p]=T.useState(!1);return e.jsxs("div",{style:{width:"400px"},children:[e.jsxs(a,{title:"Controlled Expandable",subtitle:"State managed externally",expandable:!0,expanded:d,onExpandChange:p,variant:"glass",hoverable:!0,children:[e.jsx("p",{children:"Expanded state is controlled via props."}),e.jsxs("p",{children:["Current: ",e.jsx("strong",{children:d?"Expanded":"Collapsed"})]})]}),e.jsx("div",{style:{marginTop:"1rem",textAlign:"center"},children:e.jsx(t,{variant:"primary",onClick:()=>p(!d),children:"External Toggle"})})]})},parameters:{controls:{disable:!0}}},o={render:()=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",maxWidth:"600px"},children:[e.jsx(a,{title:"Getting Started",expandable:!0,variant:"outlined",children:e.jsx("p",{children:"Create an account and follow the onboarding tutorial to get started."})}),e.jsx(a,{title:"Account Management",expandable:!0,variant:"outlined",children:e.jsx("p",{children:"Manage settings from the profile page: personal info, password, notifications."})}),e.jsx(a,{title:"Billing & Payments",expandable:!0,defaultExpanded:!0,variant:"outlined",children:e.jsx("p",{children:"We accept all major credit cards and PayPal. Billing is monthly or annual."})})]}),parameters:{controls:{disable:!0},layout:"padded"}};var c,m,u;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
title: 'Card Title',
|
|
4
4
|
subtitle: 'Optional subtitle',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as o,j as t}from"./iframe-
|
|
1
|
+
import{r as o,j as t}from"./iframe-Bzk7a4jE.js";import{g as u}from"./index-C8pce-KX.js";import{G as M}from"./iconBase-DwjO8aD6.js";import"./preload-helper-C1FmrZbK.js";function U(f){return M({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18.25 15.5a.75.75 0 0 1-.75-.75V7.56L7.28 17.78a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L16.44 6.5H9.25a.75.75 0 0 1 0-1.5h9a.75.75 0 0 1 .75.75v9a.75.75 0 0 1-.75.75Z"},child:[]}]})(f)}const G="_open_87iwp_63",O="_logo_87iwp_71",n={"card-nav-container":"_card-nav-container_87iwp_1","card-nav":"_card-nav_87iwp_1","card-nav-top":"_card-nav-top_87iwp_25","hamburger-menu":"_hamburger-menu_87iwp_38","hamburger-line":"_hamburger-line_87iwp_48",open:G,"logo-container":"_logo-container_87iwp_71",logo:O,"card-nav-cta-button":"_card-nav-cta-button_87iwp_84","card-nav-content":"_card-nav-content_87iwp_101","nav-card":"_nav-card_87iwp_121","nav-card-label":"_nav-card-label_87iwp_134","nav-card-links":"_nav-card-links_87iwp_140","nav-card-link":"_nav-card-link_87iwp_140"},L=({logo:f,logoAlt:$="Logo",items:m,className:N="",ease:b="power3.out",baseColor:k="#fff",menuColor:R,buttonBgColor:j,buttonTextColor:E})=>{const[A,g]=o.useState(!1),[s,_]=o.useState(!1),c=o.useRef(null),p=o.useRef([]),l=o.useRef(null),C=()=>{const e=c.current;if(!e)return 260;if(window.matchMedia("(max-width: 768px)").matches){const a=e.querySelector(".card-nav-content");if(a){const i=a.style.visibility,v=a.style.pointerEvents,S=a.style.position,T=a.style.height;a.style.visibility="visible",a.style.pointerEvents="auto",a.style.position="static",a.style.height="auto",a.offsetHeight;const V=60,q=16,I=a.scrollHeight;return a.style.visibility=i,a.style.pointerEvents=v,a.style.position=S,a.style.height=T,V+I+q}}return 260},h=()=>{const e=c.current;if(!e)return null;u.set(e,{height:60,overflow:"hidden"}),u.set(p.current,{y:50,opacity:0});const r=u.timeline({paused:!0});return r.to(e,{height:C,duration:.4,ease:b}),r.to(p.current,{y:0,opacity:1,duration:.4,ease:b,stagger:.08},"-=0.1"),r};o.useLayoutEffect(()=>{const e=h();return l.current=e,()=>{e==null||e.kill(),l.current=null}},[b,m]),o.useLayoutEffect(()=>{const e=()=>{if(l.current)if(s){const r=C();u.set(c.current,{height:r}),l.current.kill();const a=h();a&&(a.progress(1),l.current=a)}else{l.current.kill();const r=h();r&&(l.current=r)}};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[s]);const D=()=>{const e=l.current;e&&(s?(g(!1),e.eventCallback("onReverseComplete",()=>_(!1)),e.reverse()):(g(!0),_(!0),e.play(0)))},H=e=>r=>{r&&(p.current[e]=r)};return t.jsx("div",{className:`${n["card-nav-container"]} ${N}`,children:t.jsxs("nav",{ref:c,className:`${n["card-nav"]} ${s?n.open:""}`,style:{backgroundColor:k},children:[t.jsxs("div",{className:`${n["card-nav-top"]}`,children:[t.jsxs("div",{className:`${n["hamburger-menu"]} ${A?n.open:""}`,onClick:D,role:"button","aria-label":s?"Close menu":"Open menu",tabIndex:0,style:{color:R||"#000"},children:[t.jsx("div",{className:`${n["hamburger-line"]}`}),t.jsx("div",{className:`${n["hamburger-line"]}`})]}),t.jsx("div",{className:`${n["logo-container"]}`,children:t.jsx("img",{src:f,alt:$,className:`${n.logo}`})}),t.jsx("button",{type:"button",className:`${n["card-nav-cta-button"]}`,style:{backgroundColor:j,color:E},children:"Get Started"})]}),t.jsx("div",{className:`${n["card-nav-content"]}`,"aria-hidden":!s,children:(m||[]).slice(0,3).map((e,r)=>{var a;return t.jsxs("div",{className:`${n["nav-card"]}`,ref:H(r),style:{backgroundColor:e.bgColor,color:e.textColor},children:[t.jsx("div",{className:`${n["nav-card-label"]}`,children:e.label}),t.jsx("div",{className:`${n["nav-card-links"]}`,children:(a=e.links)==null?void 0:a.map((i,v)=>t.jsxs("a",{className:`${n["nav-card-link"]}`,href:i.href,"aria-label":i.ariaLabel,children:[t.jsx(U,{className:"nav-card-link-icon","aria-hidden":"true"}),i.label]},`${i.label}-${v}`))})]},`${e.label}-${r}`)})})]})})};L.__docgenInfo={description:"",methods:[],displayName:"CardNav",props:{logoAlt:{defaultValue:{value:"'Logo'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},ease:{defaultValue:{value:"'power3.out'",computed:!1},required:!1},baseColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1}}};const Z={title:"ReactBits/Components/CardNav",component:L,parameters:{layout:"fullscreen"}},d={args:{logoAlt:"Logo",items:[{label:"Products",bgColor:"#1a1a2e",textColor:"#fff",links:[{label:"Analytics",href:"#",ariaLabel:"Analytics"},{label:"Dashboard",href:"#",ariaLabel:"Dashboard"},{label:"Reports",href:"#",ariaLabel:"Reports"}]},{label:"Resources",bgColor:"#16213e",textColor:"#fff",links:[{label:"Documentation",href:"#",ariaLabel:"Documentation"},{label:"Tutorials",href:"#",ariaLabel:"Tutorials"}]},{label:"Company",bgColor:"#0f3460",textColor:"#fff",links:[{label:"About Us",href:"#",ariaLabel:"About Us"},{label:"Careers",href:"#",ariaLabel:"Careers"},{label:"Contact",href:"#",ariaLabel:"Contact"}]}],ease:"power3.out",baseColor:"#fff"}};var y,w,x;d.parameters={...d.parameters,docs:{...(y=d.parameters)==null?void 0:y.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
logoAlt: 'Logo',
|
|
4
4
|
items: [{
|
package/storybook-static/assets/{Carousel.stories-CdOtBTqT.js → Carousel.stories-RbJHXJL2.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,j as i}from"./iframe-
|
|
1
|
+
import{r as c,j as i}from"./iframe-Bzk7a4jE.js";import{G as v}from"./iconBase-DwjO8aD6.js";import{u as Y}from"./use-motion-value-DqT2_cFi.js";import{m as k}from"./proxy-DWSRYAjq.js";import{u as z}from"./use-transform-CfDt55IP.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-C14_78av.js";function K(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"},child:[]},{tag:"line",attr:{x1:"3",y1:"9",x2:"21",y2:"9"},child:[]},{tag:"line",attr:{x1:"9",y1:"21",x2:"9",y2:"9"},child:[]}]})(e)}function Q(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"12 2 2 7 12 12 22 7 12 2"},child:[]},{tag:"polyline",attr:{points:"2 17 12 22 22 17"},child:[]},{tag:"polyline",attr:{points:"2 12 12 17 22 12"},child:[]}]})(e)}function X(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"line",attr:{x1:"16",y1:"13",x2:"8",y2:"13"},child:[]},{tag:"line",attr:{x1:"16",y1:"17",x2:"8",y2:"17"},child:[]},{tag:"polyline",attr:{points:"10 9 9 9 8 9"},child:[]}]})(e)}function Z(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"16 18 22 12 16 6"},child:[]},{tag:"polyline",attr:{points:"8 6 2 12 8 18"},child:[]}]})(e)}function ee(e){return v({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:[]}]})(e)}const te="_round_14jni_33",ne="_active_14jni_60",oe="_inactive_14jni_64",n={"carousel-container":"_carousel-container_14jni_1","carousel-track":"_carousel-track_14jni_11","carousel-item":"_carousel-item_14jni_15",round:te,"carousel-item-header":"_carousel-item-header_14jni_47","carousel-indicators-container":"_carousel-indicators-container_14jni_52","carousel-indicator":"_carousel-indicator_14jni_52",active:ne,inactive:oe,"carousel-icon-container":"_carousel-icon-container_14jni_74","carousel-icon":"_carousel-icon_14jni_74","carousel-item-content":"_carousel-item-content_14jni_90","carousel-item-title":"_carousel-item-title_14jni_95","carousel-item-description":"_carousel-item-description_14jni_102","carousel-indicators":"_carousel-indicators_14jni_52"},ie=[{title:"Text Animations",description:"Cool text animations for your projects.",id:1,icon:i.jsx(X,{className:`${n["carousel-icon"]}`})},{title:"Animations",description:"Smooth animations for your projects.",id:2,icon:i.jsx(ee,{className:`${n["carousel-icon"]}`})},{title:"Components",description:"Reusable components for your projects.",id:3,icon:i.jsx(Q,{className:`${n["carousel-icon"]}`})},{title:"Backgrounds",description:"Beautiful backgrounds and patterns for your projects.",id:4,icon:i.jsx(K,{className:`${n["carousel-icon"]}`})},{title:"Common UI",description:"Common UI components are coming soon!",id:5,icon:i.jsx(Z,{className:`${n["carousel-icon"]}`})}],S=0,B=500,T=16,se={type:"spring",stiffness:300,damping:30};function ae({item:e,index:l,itemWidth:g,round:m,trackItemOffset:u,x:s,transition:f}){const N=[-(l+1)*u,-l*u,-(l-1)*u],r=z(s,N,[90,0,-90],{clamp:!1});return i.jsxs(k.div,{className:`${n["carousel-item"]} ${m?n.round:""}`,style:{width:g,height:m?g:"100%",rotateY:r,...m&&{borderRadius:"50%"}},transition:f,children:[i.jsx("div",{className:`${n["carousel-item-header"]} ${m?n.round:""}`,children:i.jsx("span",{className:`${n["carousel-icon-container"]}`,children:e.icon})}),i.jsxs("div",{className:`${n["carousel-item-content"]}`,children:[i.jsx("div",{className:`${n["carousel-item-title"]}`,children:e.title}),i.jsx("p",{className:`${n["carousel-item-description"]}`,children:e.description})]})]},`${(e==null?void 0:e.id)??l}-${l}`)}function V({items:e=ie,baseWidth:l=300,autoplay:g=!1,autoplayDelay:m=3e3,pauseOnHover:u=!1,loop:s=!1,round:f=!1}){const x=l-32,r=x+T,a=c.useMemo(()=>s?e.length===0?[]:[e[e.length-1],...e,e[0]]:e,[e,s]),[d,p]=c.useState(s?1:0),h=Y(0),[L,A]=c.useState(!1),[q,j]=c.useState(!1),[w,_]=c.useState(!1),C=c.useRef(null);c.useEffect(()=>{if(u&&C.current){const o=C.current,t=()=>A(!0),y=()=>A(!1);return o.addEventListener("mouseenter",t),o.addEventListener("mouseleave",y),()=>{o.removeEventListener("mouseenter",t),o.removeEventListener("mouseleave",y)}}},[u]),c.useEffect(()=>{if(!g||a.length<=1||u&&L)return;const o=setInterval(()=>{p(t=>Math.min(t+1,a.length-1))},m);return()=>clearInterval(o)},[g,m,L,u,a.length]),c.useEffect(()=>{const o=s?1:0;p(o),h.set(-o*r)},[e.length,s,r,h]),c.useEffect(()=>{!s&&d>a.length-1&&p(Math.max(0,a.length-1))},[a.length,s,d]);const E=q?{duration:0}:se,P=()=>{_(!0)},U=()=>{if(!s||a.length<=1){_(!1);return}const o=a.length-1;if(d===o){j(!0);const t=1;p(t),h.set(-t*r),requestAnimationFrame(()=>{j(!1),_(!1)});return}if(d===0){j(!0);const t=e.length;p(t),h.set(-t*r),requestAnimationFrame(()=>{j(!1),_(!1)});return}_(!1)},W=(o,t)=>{const{offset:y,velocity:I}=t,R=y.x<-S||I.x<-B?1:y.x>S||I.x>B?-1:0;R!==0&&p(H=>{const O=H+R,J=a.length-1;return Math.max(0,Math.min(O,J))})},G=s?{}:{dragConstraints:{left:-r*Math.max(a.length-1,0),right:0}},F=e.length===0?0:s?(d-1+e.length)%e.length:Math.min(d,e.length-1);return i.jsxs("div",{ref:C,className:`${n["carousel-container"]} ${f?n.round:""}`,style:{width:`${l}px`,...f&&{height:`${l}px`,borderRadius:"50%"}},children:[i.jsx(k.div,{className:`${n["carousel-track"]}`,drag:w?!1:"x",...G,style:{width:x,gap:`${T}px`,perspective:1e3,perspectiveOrigin:`${d*r+x/2}px 50%`,x:h},onDragEnd:W,animate:{x:-(d*r)},transition:E,onAnimationStart:P,onAnimationComplete:U,children:a.map((o,t)=>i.jsx(ae,{item:o,index:t,itemWidth:x,round:f,trackItemOffset:r,x:h,transition:E},`${(o==null?void 0:o.id)??t}-${t}`))}),i.jsx("div",{className:`${n["carousel-indicators-container"]} ${f?n.round:""}`,children:i.jsx("div",{className:`${n["carousel-indicators"]}`,children:e.map((o,t)=>i.jsx(k.div,{className:`${n["carousel-indicator"]} ${F===t?n.active:n.inactive}`,animate:{scale:F===t?1.2:1},onClick:()=>p(s?t+1:t),transition:{duration:.15}},t))})})]})}V.__docgenInfo={description:"",methods:[],displayName:"Carousel",props:{items:{defaultValue:{value:`[
|
|
2
2
|
{
|
|
3
3
|
title: 'Text Animations',
|
|
4
4
|
description: 'Cool text animations for your projects.',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as i,j as a}from"./iframe-
|
|
1
|
+
import{r as i,j as a}from"./iframe-Bzk7a4jE.js";import{u as k}from"./useSound-BpN96I3Q.js";const x="_checkboxLabel_kh8g9_1",f="_checkbox_kh8g9_1",g="_checkboxText_kh8g9_92",c={checkboxLabel:x,checkbox:f,checkboxText:g},C=({checked:o,onChange:r,label:s,disabled:h=!1,indeterminate:n=!1,id:l,name:d,value:b,soundConfig:e})=>{const t=i.useRef(null),{playSound:u}=k(e);return i.useEffect(()=>{t.current&&(t.current.indeterminate=n)},[n]),a.jsxs("label",{className:c.checkboxLabel,children:[a.jsx("input",{ref:t,type:"checkbox",checked:o,onChange:m=>{const p=m.target.checked;r(p),(e==null?void 0:e.onClick)!==!1&&u("toggle")},className:c.checkbox,disabled:h,id:l,name:d,value:b,"aria-checked":n?"mixed":o}),s&&a.jsx("span",{className:c.checkboxText,children:s})]})};C.__docgenInfo={description:`Checkbox component - Modern interactive checkbox with animations
|
|
2
2
|
|
|
3
3
|
@component
|
|
4
4
|
@description
|
package/storybook-static/assets/{Checkbox.stories-CP7266xH.js → Checkbox.stories-CAd4f8K3.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as g,j as t}from"./iframe-
|
|
1
|
+
import{r as g,j as t}from"./iframe-Bzk7a4jE.js";import{C as s}from"./Checkbox-BTElgaSY.js";import"./preload-helper-C1FmrZbK.js";import"./useSound-BpN96I3Q.js";const E={title:"Atoms/Checkbox",component:s,parameters:{layout:"centered",docs:{description:{component:"A simple checkbox component with optional label."}}},tags:["autodocs"],argTypes:{checked:{control:"boolean"},label:{control:"text"},disabled:{control:"boolean"},onChange:{action:"changed"}}},n={args:{checked:!1,label:"Accept terms and conditions",onChange:()=>{}}},c={args:{checked:!1,label:"This option is disabled",disabled:!0,onChange:()=>{}}},i={args:{checked:!1,label:"Multiple checkboxes example",onChange:()=>{}},render:()=>{const[e,a]=g.useState({option1:!1,option2:!0,option3:!1,option4:!1});return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem"},children:[t.jsx(s,{checked:e.option1,onChange:o=>a({...e,option1:o}),label:"Enable notifications"}),t.jsx(s,{checked:e.option2,onChange:o=>a({...e,option2:o}),label:"Receive marketing emails"}),t.jsx(s,{checked:e.option3,onChange:o=>a({...e,option3:o}),label:"Share usage statistics"}),t.jsx(s,{checked:e.option4,onChange:o=>a({...e,option4:o}),label:"Enable dark mode",disabled:!0})]})},parameters:{controls:{disable:!0}}};var l,r,p;n.parameters={...n.parameters,docs:{...(l=n.parameters)==null?void 0:l.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
checked: false,
|
|
4
4
|
label: 'Accept terms and conditions',
|
package/storybook-static/assets/{ChromaGrid.stories-BrS0NLKl.js → ChromaGrid.stories-D_aDPvzD.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as a}from"./iframe-
|
|
1
|
+
import{r as l,j as a}from"./iframe-Bzk7a4jE.js";import{g as d}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const M="_role_1xucs_102",q="_handle_1xucs_103",t={"chroma-grid":"_chroma-grid_1xucs_1","chroma-card":"_chroma-card_1xucs_36","chroma-img-wrapper":"_chroma-img-wrapper_1xucs_72","chroma-info":"_chroma-info_1xucs_90",role:M,handle:q,"chroma-overlay":"_chroma-overlay_1xucs_107","chroma-fade":"_chroma-fade_1xucs_140"},b=({items:c,className:C="",radius:x=300,columns:y=3,rows:B=2,damping:_=.45,fadeOut:F=.6,ease:k="power3.out"})=>{const m=l.useRef(null),p=l.useRef(null),o=l.useRef(null),s=l.useRef(null),i=l.useRef({x:0,y:0}),E=[{image:"https://i.pravatar.cc/300?img=8",title:"Alex Rivera",subtitle:"Full Stack Developer",handle:"@alexrivera",borderColor:"#4F46E5",gradient:"linear-gradient(145deg, #4F46E5, #000)",url:"https://github.com/"},{image:"https://i.pravatar.cc/300?img=11",title:"Jordan Chen",subtitle:"DevOps Engineer",handle:"@jordanchen",borderColor:"#10B981",gradient:"linear-gradient(210deg, #10B981, #000)",url:"https://linkedin.com/in/"},{image:"https://i.pravatar.cc/300?img=3",title:"Morgan Blake",subtitle:"UI/UX Designer",handle:"@morganblake",borderColor:"#F59E0B",gradient:"linear-gradient(165deg, #F59E0B, #000)",url:"https://dribbble.com/"},{image:"https://i.pravatar.cc/300?img=16",title:"Casey Park",subtitle:"Data Scientist",handle:"@caseypark",borderColor:"#EF4444",gradient:"linear-gradient(195deg, #EF4444, #000)",url:"https://kaggle.com/"},{image:"https://i.pravatar.cc/300?img=25",title:"Sam Kim",subtitle:"Mobile Developer",handle:"@thesamkim",borderColor:"#8B5CF6",gradient:"linear-gradient(225deg, #8B5CF6, #000)",url:"https://github.com/"},{image:"https://i.pravatar.cc/300?img=60",title:"Tyler Rodriguez",subtitle:"Cloud Architect",handle:"@tylerrod",borderColor:"#06B6D4",gradient:"linear-gradient(135deg, #06B6D4, #000)",url:"https://aws.amazon.com/"}],D=c!=null&&c.length?c:E;l.useEffect(()=>{const e=m.current;if(!e)return;o.current=d.quickSetter(e,"--x","px"),s.current=d.quickSetter(e,"--y","px");const{width:r,height:n}=e.getBoundingClientRect();i.current={x:r/2,y:n/2},o.current(i.current.x),s.current(i.current.y)},[]);const w=(e,r)=>{d.to(i.current,{x:e,y:r,duration:_,ease:k,onUpdate:()=>{var n,u;(n=o.current)==null||n.call(o,i.current.x),(u=s.current)==null||u.call(s,i.current.y)},overwrite:!0})},R=e=>{const r=m.current.getBoundingClientRect();w(e.clientX-r.left,e.clientY-r.top),d.to(p.current,{opacity:0,duration:.25,overwrite:!0})},j=()=>{d.to(p.current,{opacity:1,duration:F,overwrite:!0})},S=e=>{e&&window.open(e,"_blank","noopener,noreferrer")},N=e=>{const r=e.currentTarget,n=r.getBoundingClientRect(),u=e.clientX-n.left,$=e.clientY-n.top;r.style.setProperty("--mouse-x",`${u}px`),r.style.setProperty("--mouse-y",`${$}px`)};return a.jsxs("div",{ref:m,className:`${t["chroma-grid"]} ${C}`,style:{"--r":`${x}px`,"--cols":y,"--rows":B},onPointerMove:R,onPointerLeave:j,children:[D.map((e,r)=>a.jsxs("article",{className:`${t["chroma-card"]}`,onMouseMove:N,onClick:()=>S(e.url),style:{"--card-border":e.borderColor||"transparent","--card-gradient":e.gradient,cursor:e.url?"pointer":"default"},children:[a.jsx("div",{className:`${t["chroma-img-wrapper"]}`,children:a.jsx("img",{src:e.image,alt:e.title,loading:"lazy"})}),a.jsxs("footer",{className:`${t["chroma-info"]}`,children:[a.jsx("h3",{className:"name",children:e.title}),e.handle&&a.jsx("span",{className:`${t.handle}`,children:e.handle}),a.jsx("p",{className:`${t.role}`,children:e.subtitle}),e.location&&a.jsx("span",{className:"location",children:e.location})]})]},r)),a.jsx("div",{className:`${t["chroma-overlay"]}`}),a.jsx("div",{ref:p,className:`${t["chroma-fade"]}`})]})};b.__docgenInfo={description:"",methods:[],displayName:"ChromaGrid",props:{className:{defaultValue:{value:"''",computed:!1},required:!1},radius:{defaultValue:{value:"300",computed:!1},required:!1},columns:{defaultValue:{value:"3",computed:!1},required:!1},rows:{defaultValue:{value:"2",computed:!1},required:!1},damping:{defaultValue:{value:"0.45",computed:!1},required:!1},fadeOut:{defaultValue:{value:"0.6",computed:!1},required:!1},ease:{defaultValue:{value:"'power3.out'",computed:!1},required:!1}}};const V={title:"ReactBits/Components/ChromaGrid",component:b,parameters:{layout:"fullscreen"}},g={args:{items:[{image:"https://i.pravatar.cc/300?img=8",title:"Alex Rivera",subtitle:"Full Stack Developer",handle:"@alexrivera",borderColor:"#4F46E5",gradient:"linear-gradient(145deg, #4F46E5, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=11",title:"Jordan Chen",subtitle:"DevOps Engineer",handle:"@jordanchen",borderColor:"#10B981",gradient:"linear-gradient(210deg, #10B981, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=3",title:"Morgan Blake",subtitle:"UI/UX Designer",handle:"@morganblake",borderColor:"#F59E0B",gradient:"linear-gradient(165deg, #F59E0B, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=16",title:"Casey Park",subtitle:"Data Scientist",handle:"@caseypark",borderColor:"#EF4444",gradient:"linear-gradient(195deg, #EF4444, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=25",title:"Sam Kim",subtitle:"Mobile Developer",handle:"@thesamkim",borderColor:"#8B5CF6",gradient:"linear-gradient(225deg, #8B5CF6, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=60",title:"Tyler Rodriguez",subtitle:"Cloud Architect",handle:"@tylerrod",borderColor:"#06B6D4",gradient:"linear-gradient(135deg, #06B6D4, #000)",url:"#"}],radius:300,columns:3,rows:2,damping:.45,fadeOut:.6,ease:"power3.out"}};var h,v,f;g.parameters={...g.parameters,docs:{...(h=g.parameters)==null?void 0:h.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
items: [{
|
|
4
4
|
image: 'https://i.pravatar.cc/300?img=8',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as S,j as A}from"./iframe-
|
|
1
|
+
import{r as S,j as A}from"./iframe-Bzk7a4jE.js";import{G as V,R as j,T as _,P as C,M as R}from"./Mesh-CwXV3WjE.js";import{C as G}from"./Camera-BM3HOhP6.js";import{T as D}from"./Texture-BkQWYNP2.js";import"./preload-helper-C1FmrZbK.js";class b extends V{constructor(e,{width:t=1,height:i=1,widthSegments:s=1,heightSegments:n=1,attributes:a={}}={}){const r=s,o=n,h=(r+1)*(o+1),l=r*o*6,m=new Float32Array(h*3),g=new Float32Array(h*3),v=new Float32Array(h*2),w=l>65536?new Uint32Array(l):new Uint16Array(l);b.buildPlane(m,g,v,w,t,i,0,r,o),Object.assign(a,{position:{size:3,data:m},normal:{size:3,data:g},uv:{size:2,data:v},index:{data:w}}),super(e,a)}static buildPlane(e,t,i,s,n,a,r,o,h,l=0,m=1,g=2,v=1,w=-1,d=0,f=0){const x=d,P=n/o,U=a/h;for(let u=0;u<=h;u++){let I=u*U-a/2;for(let p=0;p<=o;p++,d++){let B=p*P-n/2;if(e[d*3+l]=B*v,e[d*3+m]=I*w,e[d*3+g]=r/2,t[d*3+l]=0,t[d*3+m]=0,t[d*3+g]=r>=0?1:-1,i[d*2]=p/o,i[d*2+1]=1-u/h,u===h||p===o)continue;let F=x+p+u*(o+1),M=x+p+(u+1)*(o+1),W=x+p+(u+1)*(o+1)+1,T=x+p+u*(o+1)+1;s[f*6]=F,s[f*6+1]=M,s[f*6+2]=T,s[f*6+3]=M,s[f*6+4]=W,s[f*6+5]=T,f++}}}}const q={"circular-gallery":"_circular-gallery_p9017_1"};function k(c,e){let t;return function(...i){clearTimeout(t),t=setTimeout(()=>c.apply(this,i),e)}}function H(c,e,t){return c+(e-c)*t}function N(c){const e=Object.getPrototypeOf(c);Object.getOwnPropertyNames(e).forEach(t=>{t!=="constructor"&&typeof c[t]=="function"&&(c[t]=c[t].bind(c))})}function X(c,e,t="bold 30px monospace",i="black"){const s=document.createElement("canvas"),n=s.getContext("2d");n.font=t;const a=n.measureText(e),r=Math.ceil(a.width),o=Math.ceil(parseInt(t,10)*1.2);s.width=r+20,s.height=o+20,n.font=t,n.fillStyle=i,n.textBaseline="middle",n.textAlign="center",n.clearRect(0,0,s.width,s.height),n.fillText(e,s.width/2,s.height/2);const h=new D(c,{generateMipmaps:!1});return h.image=s,{texture:h,width:s.width,height:s.height}}class Y{constructor({gl:e,plane:t,renderer:i,text:s,textColor:n="#545050",font:a="30px sans-serif"}){N(this),this.gl=e,this.plane=t,this.renderer=i,this.text=s,this.textColor=n,this.font=a,this.createMesh()}createMesh(){const{texture:e,width:t,height:i}=X(this.gl,this.text,this.font,this.textColor),s=new b(this.gl),n=new C(this.gl,{vertex:`
|
|
2
2
|
attribute vec3 position;
|
|
3
3
|
attribute vec2 uv;
|
|
4
4
|
uniform mat4 modelViewMatrix;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as A,j as g}from"./iframe-
|
|
1
|
+
import{r as A,j as g}from"./iframe-Bzk7a4jE.js";import{U as _,u as k}from"./MotionConfigContext-C14_78av.js";import{g as w,s as b,m as U}from"./proxy-DWSRYAjq.js";import{u as H}from"./use-motion-value-DqT2_cFi.js";import"./preload-helper-C1FmrZbK.js";function $(t){t.values.forEach(e=>e.stop())}function f(t,e){[...e].reverse().forEach(c=>{const o=t.getVariant(c);o&&b(t,o),t.variantChildren&&t.variantChildren.forEach(n=>{f(n,e)})})}function j(t,e){if(Array.isArray(e))return f(t,e);if(typeof e=="string")return f(t,[e]);b(t,e)}function I(){const t=new Set,e={subscribe(s){return t.add(s),()=>void t.delete(s)},start(s,c){const o=[];return t.forEach(n=>{o.push(w(n,s,{transitionOverride:c}))}),Promise.all(o)},set(s){return t.forEach(c=>{j(c,s)})},stop(){t.forEach(s=>{$(s)})},mount(){return()=>{e.stop()}}};return e}function M(){const t=_(I);return k(t.mount,[]),t}const q=M,L={"circular-text":"_circular-text_2sef0_1"},N=(t,e,s=!0)=>({from:e,to:e+360,ease:"linear",duration:t,type:"tween",repeat:s?1/0:0}),i=(t,e)=>({rotate:N(t,e),scale:{type:"spring",damping:20,stiffness:300}}),C=({text:t,spinDuration:e=20,onHover:s="speedUp",className:c=""})=>{const o=Array.from(t),n=q(),l=H(0);A.useEffect(()=>{const r=l.get();n.start({rotate:r+360,scale:1,transition:i(e,r)})},[e,t,s,n,l]);const v=()=>{const r=l.get();if(console.log("CircularText mounted with text:",t),!s)return;let a,u=1;switch(s){case"slowDown":a=i(e*2,r);break;case"speedUp":a=i(e/4,r);break;case"pause":a={rotate:{type:"spring",damping:20,stiffness:300},scale:{type:"spring",damping:20,stiffness:300}},u=1;break;case"goBonkers":a=i(e/20,r),u=.8;break;default:a=i(e,r)}n.start({rotate:r+360,scale:u,transition:a})},T=()=>{const r=l.get();n.start({rotate:r+360,scale:1,transition:i(e,r)})};return g.jsx(U.div,{className:`${L["circular-text"]} ${c}`,style:{rotate:l},initial:{rotate:0},animate:n,onMouseEnter:v,onMouseLeave:T,children:o.map((r,a)=>{const u=360/o.length*a,d=Math.PI/o.length,V=d*a,E=d*a,m=`rotateZ(${u}deg) translate3d(${V}px, ${E}px, 0)`;return g.jsx("span",{style:{transform:m,WebkitTransform:m},children:r},a)})})};C.__docgenInfo={description:"",methods:[],displayName:"CircularText",props:{spinDuration:{defaultValue:{value:"20",computed:!1},required:!1},onHover:{defaultValue:{value:"'speedUp'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1}}};const D={title:"ReactBits/TextAnimations/CircularText",component:C,parameters:{layout:"fullscreen"}},p={args:{text:"Hello World",spinDuration:20,onHover:"speedUp"}};var h,x,y;p.parameters={...p.parameters,docs:{...(h=p.parameters)==null?void 0:h.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
text: 'Hello World',
|
|
4
4
|
spinDuration: 20,
|
package/storybook-static/assets/{ClickSpark.stories-BqJSrjeV.js → ClickSpark.stories-DGBempBs.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as S}from"./iframe-
|
|
1
|
+
import{r as l,j as S}from"./iframe-Bzk7a4jE.js";import"./preload-helper-C1FmrZbK.js";const V=({sparkColor:g="#fff",sparkSize:v=10,sparkRadius:x=15,sparkCount:m=8,duration:p=400,easing:R="ease-out",extraScale:k=1,children:b})=>{const i=l.useRef(null),h=l.useRef([]),C=l.useRef(null);l.useEffect(()=>{const e=i.current;if(!e)return;const t=e.parentElement;if(!t)return;let a;const s=()=>{const{width:r,height:c}=t.getBoundingClientRect();(e.width!==r||e.height!==c)&&(e.width=r,e.height=c)},o=()=>{clearTimeout(a),a=setTimeout(s,100)},n=new ResizeObserver(o);return n.observe(t),s(),()=>{n.disconnect(),clearTimeout(a)}},[]);const w=l.useCallback(e=>{switch(R){case"linear":return e;case"ease-in":return e*e;case"ease-in-out":return e<.5?2*e*e:-1+(4-2*e)*e;default:return e*(2-e)}},[R]);l.useEffect(()=>{const e=i.current;if(!e)return;const t=e.getContext("2d");let a;const s=o=>{C.current||(C.current=o),t.clearRect(0,0,e.width,e.height),h.current=h.current.filter(n=>{const r=o-n.startTime;if(r>=p)return!1;const c=r/p,u=w(c),f=u*x*k,y=v*(1-u),A=n.x+f*Math.cos(n.angle),M=n.y+f*Math.sin(n.angle),_=n.x+(f+y)*Math.cos(n.angle),j=n.y+(f+y)*Math.sin(n.angle);return t.strokeStyle=g,t.lineWidth=2,t.beginPath(),t.moveTo(A,M),t.lineTo(_,j),t.stroke(),!0}),a=requestAnimationFrame(s)};return a=requestAnimationFrame(s),()=>{cancelAnimationFrame(a)}},[g,v,x,m,p,w,k]);const z=e=>{const t=i.current;if(!t)return;const a=t.getBoundingClientRect(),s=e.clientX-a.left,o=e.clientY-a.top,n=performance.now(),r=Array.from({length:m},(c,u)=>({x:s,y:o,angle:2*Math.PI*u/m,startTime:n}));h.current.push(...r)};return S.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},onClick:z,children:[S.jsx("canvas",{ref:i,style:{width:"100%",height:"100%",display:"block",userSelect:"none",position:"absolute",top:0,left:0,pointerEvents:"none"}}),b]})};V.__docgenInfo={description:"",methods:[],displayName:"ClickSpark",props:{sparkColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1},sparkSize:{defaultValue:{value:"10",computed:!1},required:!1},sparkRadius:{defaultValue:{value:"15",computed:!1},required:!1},sparkCount:{defaultValue:{value:"8",computed:!1},required:!1},duration:{defaultValue:{value:"400",computed:!1},required:!1},easing:{defaultValue:{value:"'ease-out'",computed:!1},required:!1},extraScale:{defaultValue:{value:"1.0",computed:!1},required:!1}}};const I={title:"ReactBits/Animations/ClickSpark",component:V,parameters:{layout:"fullscreen"}},d={args:{sparkColor:"#fff",sparkSize:10,sparkRadius:15,sparkCount:8,duration:400,easing:"ease-out",extraScale:1,children:"Hello World"}};var q,T,E;d.parameters={...d.parameters,docs:{...(q=d.parameters)==null?void 0:q.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
sparkColor: '#fff',
|
|
4
4
|
sparkSize: 10,
|