@stfrigerio/sito-template 0.1.87 → 0.1.89
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/ThemeSwitcher/ThemeSwitcher.d.ts +1 -1
- package/dist/components/molecules/ThemeSwitcher/ThemeSwitcher.d.ts.map +1 -1
- package/dist/components/organisms/charts/QuantifiableHabitsChart/QuantifiableHabitsChart.d.ts.map +1 -1
- package/dist/index.esm.js +16 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +15 -6
- 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-B8RWNnlP.js → ASCIIText.stories-DqfIEc4D.js} +1 -1
- package/storybook-static/assets/AllAtoms.stories-BapCmZF4.js +109 -0
- package/storybook-static/assets/{AnimatedContent.stories-Dj-clC7A.js → AnimatedContent.stories-Bmwe7KqR.js} +1 -1
- package/storybook-static/assets/{AnimatedList.stories-2A8KQvHb.js → AnimatedList.stories-jioQ6Ifb.js} +1 -1
- package/storybook-static/assets/{Antigravity.stories-DGZButWX.js → Antigravity.stories-BNebeREi.js} +1 -1
- package/storybook-static/assets/{ArrayInput.stories-DMY81mz8.js → ArrayInput.stories-DDFl4ohp.js} +1 -1
- package/storybook-static/assets/{Aurora.stories-Cew2p4oN.js → Aurora.stories-CHbrxJc2.js} +1 -1
- package/storybook-static/assets/{Beams.stories-BbXiw7sj.js → Beams.stories-BtUFui-7.js} +1 -1
- package/storybook-static/assets/{BlobCursor.stories-DEYcVo2S.js → BlobCursor.stories-BOFPnl-M.js} +1 -1
- package/storybook-static/assets/{BlurText.stories-CyEHztB3.js → BlurText.stories-BFDFocJZ.js} +1 -1
- package/storybook-static/assets/{BooleansHeatmap.stories-Bq4sX7xA.js → BooleansHeatmap.stories-mEDhiaag.js} +1 -1
- package/storybook-static/assets/{BorderGlow.stories-DfeM2qWZ.js → BorderGlow.stories-Cv1nHqH_.js} +1 -1
- package/storybook-static/assets/{BubbleMenu.stories-DFzci-hw.js → BubbleMenu.stories-DN2Jm2dx.js} +1 -1
- package/storybook-static/assets/{Button-C-a8mtOA.js → Button-DBcEd-5z.js} +1 -1
- package/storybook-static/assets/{Button.stories-DAXH1kBW.js → Button.stories-CFIl_s9j.js} +1 -1
- package/storybook-static/assets/{Calendar.stories-CVsYYT3_.js → Calendar.stories-Dez66O9S.js} +1 -1
- package/storybook-static/assets/{Card-Ch19Z9Ml.js → Card-pTLwzKiA.js} +1 -1
- package/storybook-static/assets/{Card.stories-BrklfhWT.js → Card.stories-lgA8u5pK.js} +1 -1
- package/storybook-static/assets/{CardNav.stories-BCqLQ4ri.js → CardNav.stories-DlIUSY91.js} +1 -1
- package/storybook-static/assets/{Carousel.stories-JueaqCHX.js → Carousel.stories-C_Yhe2YO.js} +1 -1
- package/storybook-static/assets/{Checkbox-nvnYBusW.js → Checkbox-aVacz-Sy.js} +1 -1
- package/storybook-static/assets/{Checkbox.stories-BSH5kSeM.js → Checkbox.stories-NIHVKz6Z.js} +1 -1
- package/storybook-static/assets/{ChromaGrid.stories-BAi7KYEd.js → ChromaGrid.stories-CD_4IrYr.js} +1 -1
- package/storybook-static/assets/{CircularGallery.stories-yaLvN4jl.js → CircularGallery.stories-BknZX_uP.js} +1 -1
- package/storybook-static/assets/{CircularText.stories-ByKDIjAk.js → CircularText.stories-BJgeZ57n.js} +1 -1
- package/storybook-static/assets/{ClickSpark.stories-CAOOYgZg.js → ClickSpark.stories-Cdodd2t7.js} +1 -1
- package/storybook-static/assets/{ColorBends.stories-r944bmlL.js → ColorBends.stories-DfA4HJ3y.js} +1 -1
- package/storybook-static/assets/{CountUp.stories-BsGweeR_.js → CountUp.stories-DvzARnFg.js} +1 -1
- package/storybook-static/assets/{Counter.stories-CFSscU3f.js → Counter.stories-O0r087zN.js} +1 -1
- package/storybook-static/assets/{Crosshair.stories-C59SEdPS.js → Crosshair.stories-Cnxr_EQu.js} +1 -1
- package/storybook-static/assets/{Cubes.stories-DnfmbK9a.js → Cubes.stories-CUfPPwjc.js} +1 -1
- package/storybook-static/assets/{CurvedLoop.stories-DIfO-R6F.js → CurvedLoop.stories-DE3nB8ls.js} +1 -1
- package/storybook-static/assets/{DarkVeil.stories-C_B8qGw3.js → DarkVeil.stories-KZYpXu4O.js} +1 -1
- package/storybook-static/assets/DateInput-DG_qgLrC.js +33 -0
- package/storybook-static/assets/DateInput.stories-oUg3RCLU.js +51 -0
- package/storybook-static/assets/{DecayCard.stories-DAfiVDJo.js → DecayCard.stories-B4rk0k2A.js} +1 -1
- package/storybook-static/assets/{DecryptedText.stories-BFQqLZom.js → DecryptedText.stories-DuBGGkyW.js} +1 -1
- package/storybook-static/assets/{Dither.stories-pYoIjt1W.js → Dither.stories-StamF1Kb.js} +1 -1
- package/storybook-static/assets/{Dock.stories-DId8unUm.js → Dock.stories-cqN-6kGf.js} +1 -1
- package/storybook-static/assets/{EditFAB.stories-DdXJT2Ey.js → EditFAB.stories-DB32wTjJ.js} +1 -1
- package/storybook-static/assets/{EvilEye.stories-B78l-JlO.js → EvilEye.stories-BAbVn5qQ.js} +1 -1
- package/storybook-static/assets/{FadeContent.stories-DSYRU32z.js → FadeContent.stories-WQmRai5y.js} +1 -1
- package/storybook-static/assets/{FaultyTerminal.stories-Bhho_FyM.js → FaultyTerminal.stories-C6tY8BV7.js} +1 -1
- package/storybook-static/assets/{Fbo-CA8Cugqs.js → Fbo-fiRvNB1I.js} +1 -1
- package/storybook-static/assets/{FloatingLines.stories-DIvV-AYZ.js → FloatingLines.stories-CnsttPQG.js} +1 -1
- package/storybook-static/assets/{FlowingMenu.stories-CxjRJuNG.js → FlowingMenu.stories-WYOhUM5m.js} +1 -1
- package/storybook-static/assets/{FluidGlass.stories-B6ubplry.js → FluidGlass.stories-CrWwYh3X.js} +1 -1
- package/storybook-static/assets/{Folder.stories-BhHE7ak6.js → Folder.stories-Dnhngr_O.js} +1 -1
- package/storybook-static/assets/{FuzzyText.stories-BFPLmDNh.js → FuzzyText.stories-DcCeG3hL.js} +1 -1
- package/storybook-static/assets/{Galaxy.stories-N6XWjdrt.js → Galaxy.stories-C-OH2aAx.js} +1 -1
- package/storybook-static/assets/{GhostCursor.stories-CU2PH1pt.js → GhostCursor.stories-CHIetqUz.js} +1 -1
- package/storybook-static/assets/{GlareHover.stories-DifFj1HZ.js → GlareHover.stories-CRgl-CP4.js} +1 -1
- package/storybook-static/assets/{GlassSurface.stories-DXYOGkmX.js → GlassSurface.stories-HNRVh3fN.js} +1 -1
- package/storybook-static/assets/{GlitchText.stories-Cmpvl2vz.js → GlitchText.stories-BQP2YAOm.js} +1 -1
- package/storybook-static/assets/{GooeyNav.stories-BOyECO_g.js → GooeyNav.stories-DwIGqWt5.js} +1 -1
- package/storybook-static/assets/{GradientBlinds.stories-D7xA00Rd.js → GradientBlinds.stories-CyT1IYBB.js} +1 -1
- package/storybook-static/assets/{GradientText.stories-D4vR7tCq.js → GradientText.stories-B-lggDt8.js} +1 -1
- package/storybook-static/assets/{Grainient.stories-Cl3kQ9aP.js → Grainient.stories-BVEEYLWq.js} +1 -1
- package/storybook-static/assets/{GridMotion.stories-BU9Lfsce.js → GridMotion.stories-2uRljW7I.js} +1 -1
- package/storybook-static/assets/{HabitTimeOfDayChart.stories-CJ7KDfkC.js → HabitTimeOfDayChart.stories-CRJXqGJv.js} +6 -11
- package/storybook-static/assets/{ImageSlideshow.stories-RqoQL8yF.js → ImageSlideshow.stories-DML4vy_x.js} +1 -1
- package/storybook-static/assets/{Iridescence.stories-BG_i0J0Z.js → Iridescence.stories-DajiIgVe.js} +1 -1
- package/storybook-static/assets/{LaserFlow.stories-BhMyQ1qt.js → LaserFlow.stories-CZaPNLLW.js} +1 -1
- package/storybook-static/assets/{LetterGlitch.stories-BvdwV5_E.js → LetterGlitch.stories-CUNR5EiC.js} +1 -1
- package/storybook-static/assets/{LightPillar.stories-BPp_Ag-Y.js → LightPillar.stories-D7tyGuXB.js} +1 -1
- package/storybook-static/assets/{LightRays.stories-dch_JRlb.js → LightRays.stories-4_oXRqRg.js} +1 -1
- package/storybook-static/assets/{Lightning.stories-DwMh9GPf.js → Lightning.stories-PCjxymXv.js} +1 -1
- package/storybook-static/assets/{LineWaves.stories-AqiMM0Ls.js → LineWaves.stories-DE1JOtSU.js} +1 -1
- package/storybook-static/assets/{LiquidChrome.stories-CHphvyVd.js → LiquidChrome.stories-BZuyyouo.js} +1 -1
- package/storybook-static/assets/{LiquidEther.stories-LA0heskA.js → LiquidEther.stories-unHa0rXs.js} +1 -1
- package/storybook-static/assets/{LoadingSpinner-Y9Z3DeEK.js → LoadingSpinner-B5pZk-F-.js} +1 -1
- package/storybook-static/assets/{LoadingSpinner.stories-CME438c5.js → LoadingSpinner.stories-DCBZaGUw.js} +1 -1
- package/storybook-static/assets/{MagicRings.stories-CEszTJL9.js → MagicRings.stories-Cyic3B5B.js} +1 -1
- package/storybook-static/assets/{Magnet.stories-CjGVTw3S.js → Magnet.stories-B1F_NWep.js} +1 -1
- package/storybook-static/assets/{MagnetLines.stories-ahvkL9SY.js → MagnetLines.stories-s6j_3m3S.js} +1 -1
- package/storybook-static/assets/{Masonry.stories-Bc3kTpwh.js → Masonry.stories-BzIHWGfI.js} +1 -1
- package/storybook-static/assets/{MetaBalls.stories-CjszCimV.js → MetaBalls.stories-CMvhgTHK.js} +1 -1
- package/storybook-static/assets/{MetallicPaint.stories-DBJfpHWq.js → MetallicPaint.stories-CtPSBklG.js} +1 -1
- package/storybook-static/assets/{MoodChart.stories-B-mIiG6S.js → MoodChart.stories-Df86ifsA.js} +1 -1
- package/storybook-static/assets/{MotionConfigContext-ej6g39cv.js → MotionConfigContext--4MeZeHl.js} +1 -1
- package/storybook-static/assets/{Navbar.stories-QmXtlqhy.js → Navbar.stories-iiMx1jgL.js} +1 -1
- package/storybook-static/assets/{Noise.stories-DzgN3MWd.js → Noise.stories-CRvmP8hX.js} +1 -1
- package/storybook-static/assets/{NumberStepper-DVpOvggK.js → NumberStepper-DiCCESC2.js} +1 -1
- package/storybook-static/assets/{NumberStepper.stories-DjiSsncP.js → NumberStepper.stories-WLZvvNE_.js} +1 -1
- package/storybook-static/assets/{Orb.stories-PL0Leb0V.js → Orb.stories-dhvuScH_.js} +1 -1
- package/storybook-static/assets/{OrbitImages.stories-Ct7kFkO8.js → OrbitImages.stories-cReXIFdN.js} +1 -1
- package/storybook-static/assets/{PieChart.stories-D1k8xoHn.js → PieChart.stories-DzS7Xa3H.js} +1 -1
- package/storybook-static/assets/{PixelBlast.stories-DWr7zhSY.js → PixelBlast.stories-BIJcZn3Y.js} +1 -1
- package/storybook-static/assets/{PixelCard.stories-CBNsvoWF.js → PixelCard.stories-DcWyzEzN.js} +1 -1
- package/storybook-static/assets/{PixelSnow.stories-CibmTFVc.js → PixelSnow.stories-DA7TaJeH.js} +1 -1
- package/storybook-static/assets/{PixelTransition.stories-HeKQCyZU.js → PixelTransition.stories-DqZ3iQXA.js} +1 -1
- package/storybook-static/assets/{Plasma.stories-DRkfw_SH.js → Plasma.stories-BhkOGLqF.js} +1 -1
- package/storybook-static/assets/{Prism.stories-D5hsr7bf.js → Prism.stories-DfyQ9X1g.js} +1 -1
- package/storybook-static/assets/{PrismaticBurst.stories-BSURP5pW.js → PrismaticBurst.stories-ZGotri7c.js} +1 -1
- package/storybook-static/assets/{ProfileCard.stories-Bf0IPDE7.js → ProfileCard.stories-CF1aCfGU.js} +1 -1
- package/storybook-static/assets/QuantifiableHabitsChart-JSu1fVKW.css +1 -0
- package/storybook-static/assets/QuantifiableHabitsChart.stories-D-rINJ6D.js +125 -0
- package/storybook-static/assets/{Radar.stories-BvOZJPcs.js → Radar.stories-BMqTlUKl.js} +1 -1
- package/storybook-static/assets/{Ribbons.stories-gxmZ1o6j.js → Ribbons.stories-De59b80l.js} +1 -1
- package/storybook-static/assets/{RippleGrid.stories-DUv5tTLR.js → RippleGrid.stories-CZD_7q7X.js} +1 -1
- package/storybook-static/assets/{RotatingText.stories--zZCwdj0.js → RotatingText.stories-E-ZfUVEu.js} +1 -1
- package/storybook-static/assets/{ScrollFloat.stories-BAQkGt4u.js → ScrollFloat.stories-DpRyGAoK.js} +1 -1
- package/storybook-static/assets/{ScrollReveal.stories-D8v2-KSO.js → ScrollReveal.stories-BZ41i1W7.js} +1 -1
- package/storybook-static/assets/{ScrollVelocity.stories-CgYbZ2me.js → ScrollVelocity.stories-5KS6YyKN.js} +1 -1
- package/storybook-static/assets/{SearchBar.stories-DErg4W0Z.js → SearchBar.stories-Ctyql2sU.js} +1 -1
- package/storybook-static/assets/{SearchableDropdown-Gc-plVss.js → SearchableDropdown-NR18DlW0.js} +1 -1
- package/storybook-static/assets/{SearchableDropdown.stories-CF98LHIA.js → SearchableDropdown.stories-aCkmh5mS.js} +1 -1
- package/storybook-static/assets/{SelectInput-weMQrv1H.js → SelectInput-BmPOR7w3.js} +1 -1
- package/storybook-static/assets/{SelectInput.stories-DFEPS00c.js → SelectInput.stories-CkEIMp4y.js} +1 -1
- package/storybook-static/assets/{ShapeBlur.stories-CLJf-eGQ.js → ShapeBlur.stories-z9K8sMp8.js} +1 -1
- package/storybook-static/assets/{ShapeGrid.stories-B4tRqjit.js → ShapeGrid.stories-DEWebK9m.js} +1 -1
- package/storybook-static/assets/{ShinyText.stories-nODOhFpc.js → ShinyText.stories-DIkVUyzd.js} +1 -1
- package/storybook-static/assets/{Silk.stories-hK-hAkGr.js → Silk.stories-CIxMmzjV.js} +1 -1
- package/storybook-static/assets/{SleepChart.stories-Dhk97VZ2.js → SleepChart.stories-0Jmjrlg3.js} +1 -1
- package/storybook-static/assets/{Slider-BQQGQnnC.js → Slider-Bc1lFUw9.js} +1 -1
- package/storybook-static/assets/{Slider.stories-DXg1IclV.js → Slider.stories-CFEmk3AG.js} +1 -1
- package/storybook-static/assets/{SoftAurora.stories-Bxt4IudL.js → SoftAurora.stories-Df72ydt4.js} +1 -1
- package/storybook-static/assets/{SoundDemo.stories-D78IcwX2.js → SoundDemo.stories-DK_k58gi.js} +1 -1
- package/storybook-static/assets/{SplashCursor.stories-Cdnlvghg.js → SplashCursor.stories-CefqvNRc.js} +1 -1
- package/storybook-static/assets/{SpotlightCard.stories-DhXeXKct.js → SpotlightCard.stories-B4yPHPlH.js} +1 -1
- package/storybook-static/assets/{Stack.stories-Dr_tAl9c.js → Stack.stories-CT-yOi8e.js} +1 -1
- package/storybook-static/assets/{StaggeredMenu.stories-CI4Z8v_T.js → StaggeredMenu.stories-Gd9mshkB.js} +1 -1
- package/storybook-static/assets/{StarBorder.stories-OYm48Xwl.js → StarBorder.stories-COeMTOb4.js} +1 -1
- package/storybook-static/assets/{SunburstChart.stories-DIg4CtSd.js → SunburstChart.stories-C-2AGYPc.js} +1 -1
- package/storybook-static/assets/{Table.stories-wu_XBMsB.js → Table.stories-BQEFDH7D.js} +1 -1
- package/storybook-static/assets/{Tabs.stories-Bbq7lutx.js → Tabs.stories-CsquuO8e.js} +1 -1
- package/storybook-static/assets/{TargetCursor.stories-CXjfHbiQ.js → TargetCursor.stories-DAefRC4e.js} +1 -1
- package/storybook-static/assets/{TextArea-B4dx0-GZ.js → TextArea-Ogi9yBes.js} +1 -1
- package/storybook-static/assets/{TextArea.stories-CUoma4q4.js → TextArea.stories-DpB-3k2O.js} +1 -1
- package/storybook-static/assets/{TextCursor.stories-DrHqGdoB.js → TextCursor.stories-DZUN0u8I.js} +1 -1
- package/storybook-static/assets/{TextInput-vzJb5S9G.js → TextInput-DFgonmie.js} +1 -1
- package/storybook-static/assets/{TextInput.stories-DA17HvCl.js → TextInput.stories-BHSXZ_SI.js} +1 -1
- package/storybook-static/assets/{TextPressure.stories-b2f8dOId.js → TextPressure.stories-UMMx0orx.js} +1 -1
- package/storybook-static/assets/{TextType.stories-8fsi62No.js → TextType.stories-CtoIUPLH.js} +1 -1
- package/storybook-static/assets/ThemeSwitcher-DWTmXKK8.css +1 -0
- package/storybook-static/assets/ThemeSwitcher.stories-D_OKIYeD.js +47 -0
- package/storybook-static/assets/{Threads.stories-C7_zvrfb.js → Threads.stories-DAhe1Oil.js} +1 -1
- package/storybook-static/assets/{TimeInput.stories-WFbT0Wqk.js → TimeInput.stories--rEPa6-A.js} +1 -1
- package/storybook-static/assets/{Toggle-BplZnrXA.js → Toggle-ZeBAtc8u.js} +1 -1
- package/storybook-static/assets/{Toggle.stories-BvoI_JPS.js → Toggle.stories-uXsjdbKk.js} +1 -1
- package/storybook-static/assets/{ToggleButton-D6UxL2BW.js → ToggleButton-fcuqc-U3.js} +1 -1
- package/storybook-static/assets/{ToggleButton.stories-C56NQ0vt.js → ToggleButton.stories-BEBnDGXo.js} +1 -1
- package/storybook-static/assets/{TrueFocus.stories-C5puxF0U.js → TrueFocus.stories-DPfyzlz3.js} +1 -1
- package/storybook-static/assets/{VariableProximity.stories-BxLhsUUt.js → VariableProximity.stories-CtVAQ19e.js} +1 -1
- package/storybook-static/assets/{Waves.stories-BcNpqLux.js → Waves.stories-rK_7fHiv.js} +1 -1
- package/storybook-static/assets/calendar-gj4nrcYx.js +6 -0
- package/storybook-static/assets/chart-column-Djx9piD1.js +6 -0
- package/storybook-static/assets/{check-CR9a77oQ.js → check-BuOkTG8Q.js} +1 -1
- package/storybook-static/assets/{chevron-down-CKSuQQRN.js → chevron-down-DtpxhV6T.js} +1 -1
- package/storybook-static/assets/{chevron-right-ds1xZi3C.js → chevron-right-C7ogoSMg.js} +1 -1
- package/storybook-static/assets/client-e6aYB0To.js +1 -0
- package/storybook-static/assets/{createLucideIcon-CrHgDpuU.js → createLucideIcon-B0MG6HAs.js} +1 -1
- package/storybook-static/assets/{download-BeoqTvSy.js → download-DbfQZSot.js} +1 -1
- package/storybook-static/assets/{folder-BHA3voKu.js → folder-CrHzRSTl.js} +1 -1
- package/storybook-static/assets/{iconBase-B_uptLfL.js → iconBase-WFp_1KYF.js} +1 -1
- package/storybook-static/assets/{iframe-zy5fIh42.js → iframe-DKgP8ePJ.js} +3 -3
- package/storybook-static/assets/{index-DJjHRi0h.js → index-C-qIoU0_.js} +1 -1
- package/storybook-static/assets/{index-CtGjEf3g.js → index-CAfFcpR0.js} +1 -1
- package/storybook-static/assets/{index-DRj5Sqdq.js → index-DvhxcNMG.js} +1 -1
- package/storybook-static/assets/{proxy-CPPwweV0.js → proxy-BowLazAQ.js} +1 -1
- package/storybook-static/assets/{react-18-nleSC2lJ.js → react-18-Be1RDA5e.js} +1 -1
- package/storybook-static/assets/{react-three-fiber.esm-CgMr3Oln.js → react-three-fiber.esm-B9LxaTkn.js} +1 -1
- package/storybook-static/assets/{search-DMsFQVtb.js → search-DsfdMjao.js} +1 -1
- package/storybook-static/assets/{settings-CaeoBL2V.js → settings-B5Srheqv.js} +1 -1
- package/storybook-static/assets/{sun-j_wDVUAd.js → sun--I8-6cgL.js} +1 -1
- package/storybook-static/assets/{trash-2-CFV2VbGB.js → trash-2-Cx9DK1oy.js} +1 -1
- package/storybook-static/assets/{use-animation-frame-CJ4LJccZ.js → use-animation-frame-D4TWdWMe.js} +1 -1
- package/storybook-static/assets/{use-in-view-BYqN4HOb.js → use-in-view-DqAwPbRI.js} +1 -1
- package/storybook-static/assets/{use-motion-value-Bd5F4Q1X.js → use-motion-value-CcCAM0jJ.js} +1 -1
- package/storybook-static/assets/{use-spring-y2nlsCu3.js → use-spring-BUwFFZZK.js} +1 -1
- package/storybook-static/assets/{use-transform-Cdf8113N.js → use-transform-B5QCn53b.js} +1 -1
- package/storybook-static/assets/{useSound-CQEaCYuh.js → useSound-jrNQ4676.js} +1 -1
- package/storybook-static/assets/{users-D86bmf3J.js → users-hZu3RJwc.js} +1 -1
- package/storybook-static/assets/{x-DL7PRtd7.js → x-DT75KqLw.js} +1 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/assets/AllAtoms.stories-BeZBc0RJ.js +0 -109
- package/storybook-static/assets/DateInput-BcmeICjH.js +0 -38
- package/storybook-static/assets/DateInput.stories-CsuBNd7o.js +0 -51
- package/storybook-static/assets/QuantifiableHabitsChart-ClF-TBgP.css +0 -1
- package/storybook-static/assets/QuantifiableHabitsChart.stories-DlkEZwYa.js +0 -115
- package/storybook-static/assets/ThemeSwitcher-XCVQ6hhy.css +0 -1
- package/storybook-static/assets/ThemeSwitcher.stories-DbrfPqUY.js +0 -47
- package/storybook-static/assets/client-BLhnv49m.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as v,j as _}from"./iframe-
|
|
1
|
+
import{r as v,j as _}from"./iframe-DKgP8ePJ.js";import"./preload-helper-C1FmrZbK.js";const q={"noise-overlay":"_noise-overlay_1esbx_1"},S=({patternSize:x=250,patternScaleX:y=1,patternScaleY:z=1,patternRefreshInterval:i=2,patternAlpha:c=15})=>{const u=v.useRef(null);return v.useEffect(()=>{const e=u.current;if(!e)return;const s=e.getContext("2d",{alpha:!0});if(!s)return;let d=0,p;const r=1024,o=()=>{e&&(e.width=r,e.height=r,e.style.width="100vw",e.style.height="100vh")},R=()=>{const m=s.createImageData(r,r),a=m.data;for(let t=0;t<a.length;t+=4){const l=Math.random()*255;a[t]=l,a[t+1]=l,a[t+2]=l,a[t+3]=c}s.putImageData(m,0,0)},f=()=>{d%i===0&&R(),d++,p=window.requestAnimationFrame(f)};return window.addEventListener("resize",o),o(),f(),()=>{window.removeEventListener("resize",o),window.cancelAnimationFrame(p)}},[x,y,z,i,c]),_.jsx("canvas",{className:`${q["noise-overlay"]}`,ref:u,style:{imageRendering:"pixelated"}})};S.__docgenInfo={description:"",methods:[],displayName:"Noise",props:{patternSize:{defaultValue:{value:"250",computed:!1},required:!1},patternScaleX:{defaultValue:{value:"1",computed:!1},required:!1},patternScaleY:{defaultValue:{value:"1",computed:!1},required:!1},patternRefreshInterval:{defaultValue:{value:"2",computed:!1},required:!1},patternAlpha:{defaultValue:{value:"15",computed:!1},required:!1}}};const A={title:"ReactBits/Animations/Noise",component:S,parameters:{layout:"fullscreen"}},n={args:{patternSize:250,patternScaleX:1,patternScaleY:1,patternRefreshInterval:2,patternAlpha:15}};var h,g,w;n.parameters={...n.parameters,docs:{...(h=n.parameters)==null?void 0:h.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
patternSize: 250,
|
|
4
4
|
patternScaleX: 1,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,j as e}from"./iframe-
|
|
1
|
+
import{r as c,j as e}from"./iframe-DKgP8ePJ.js";import{u as F}from"./useSound-jrNQ4676.js";import{m as C}from"./proxy-BowLazAQ.js";import{A as K}from"./index-C-qIoU0_.js";const U="_container_qxl8r_1",J="_header_qxl8r_8",Q="_icon_qxl8r_14",X="_label_qxl8r_22",G="_stepper_qxl8r_31",O="_disabled_qxl8r_49",Y="_button_qxl8r_55",Z="_buttonIcon_qxl8r_105",ee="_valueContainer_qxl8r_116",ae="_valueWrapper_qxl8r_126",te="_value_qxl8r_116",ne="_limits_qxl8r_152",re="_limit_qxl8r_152",le="_small_qxl8r_165",ie="_large_qxl8r_189",se="_outlined_qxl8r_214",oe="_filled_qxl8r_227",ue="_minimal_qxl8r_298",ce="_custom_qxl8r_334",pe="_vertical_qxl8r_357",de="_pulse_qxl8r_1",a={container:U,header:J,icon:Q,label:X,stepper:G,disabled:O,button:Y,buttonIcon:Z,valueContainer:ee,valueWrapper:ae,value:te,limits:ne,limit:re,small:le,large:ie,outlined:se,filled:oe,minimal:ue,custom:ce,vertical:pe,pulse:de},me=({value:i,onChange:s,min:r=-1/0,max:l=1/0,step:o=1,label:d,icon:f,disabled:u=!1,size:L="medium",variant:q="default",showPlusMinus:g=!1,allowKeyboard:N=!0,className:W="",customStyles:n={},customButtons:R={},hideLimits:w=!1,layout:B="horizontal",soundConfig:H})=>{const{handlers:z,playSound:v}=F(H),[y,k]=c.useState(!1),[S,I]=c.useState(!1),[m,b]=c.useState(i);c.useEffect(()=>{b(i)},[i]);const x=c.useCallback(()=>{if(u||i>=l)return;v("click");const t=Math.min(i+o,l);s(t),k(!0),setTimeout(()=>k(!1),200)},[i,s,l,o,u,v]),_=c.useCallback(()=>{if(u||i<=r)return;v("click");const t=Math.max(i-o,r);s(t),I(!0),setTimeout(()=>I(!1),200)},[i,s,r,o,u,v]),E=c.useCallback(t=>{if(!(!N||u))switch(t.key){case"ArrowUp":t.preventDefault(),x();break;case"ArrowDown":t.preventDefault(),_();break;case"PageUp":{t.preventDefault();const p=Math.min(i+o*10,l);s(p);break}case"PageDown":{t.preventDefault();const p=Math.max(i-o*10,r);s(p);break}case"Home":t.preventDefault(),r!==-1/0&&s(r);break;case"End":t.preventDefault(),l!==1/0&&s(l);break}},[N,u,x,_,i,o,r,l,s]),A=c.useCallback(t=>{const p=t.target.value;if(p===""||p==="-"){b(p);return}const M=parseFloat(p);isNaN(M)||b(M)},[]),$=c.useCallback(()=>{let t=typeof m=="string"?m===""||m==="-"?r:parseFloat(m):m;isNaN(t)&&(t=r),t=Math.max(r,Math.min(l,t)),o!==1&&(t=Math.round(t/o)*o),s(t),b(t)},[m,r,l,o,s]),P=[a.container,a[L],a[q],B==="vertical"&&a.vertical,u&&a.disabled,W].filter(Boolean).join(" "),[j,h]=c.useState(null),T=u||i<=r,V=u||i>=l,D=e.jsxs("div",{className:a.stepper,style:n.stepper,onKeyDown:E,tabIndex:u?-1:0,...z,children:[e.jsx(C.button,{className:a.button,style:{...n.button,...j==="decrement"&&n.buttonHover},onMouseEnter:()=>h("decrement"),onMouseLeave:()=>h(null),onClick:_,disabled:T,whileTap:T?void 0:{scale:.9},animate:S?{scale:[1,1.2,1]}:void 0,transition:{duration:.2},"aria-label":"Decrease value",children:R.decrement||(g?e.jsx("span",{className:a.buttonIcon,style:n.buttonIcon,children:"−"}):e.jsx("svg",{className:a.buttonIcon,style:n.buttonIcon,viewBox:"0 0 24 24",fill:"none",children:e.jsx("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))}),e.jsx("div",{className:a.valueContainer,style:n.valueContainer,children:e.jsx(K,{mode:"wait",children:e.jsx(C.div,{initial:{y:y?10:S?-10:0,opacity:0},animate:{y:0,opacity:1},exit:{y:y?-10:S?10:0,opacity:0},transition:{duration:.15},className:a.valueWrapper,children:e.jsx("input",{type:"text",className:a.value,style:n.value,value:m,onChange:A,onBlur:$,disabled:u,"aria-label":d||"Number input","aria-valuemin":r,"aria-valuemax":l,"aria-valuenow":i})},i)})}),e.jsx(C.button,{className:a.button,style:{...n.button,...j==="increment"&&n.buttonHover},onMouseEnter:()=>h("increment"),onMouseLeave:()=>h(null),onClick:x,disabled:V,whileTap:V?void 0:{scale:.9},animate:y?{scale:[1,1.2,1]}:void 0,transition:{duration:.2},"aria-label":"Increase value",children:R.increment||(g?e.jsx("span",{className:a.buttonIcon,style:n.buttonIcon,children:"+"}):e.jsx("svg",{className:a.buttonIcon,style:n.buttonIcon,viewBox:"0 0 24 24",fill:"none",children:e.jsx("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))})]});return q==="custom"&&(d||f)?e.jsxs("div",{className:P,style:{...n.container,display:"flex",alignItems:"center"},children:[e.jsxs("div",{className:a.header,style:{...n.header,flex:1,marginBottom:0},children:[f&&e.jsx("span",{className:a.icon,style:n.icon,children:f}),d&&e.jsx("label",{className:a.label,style:n.label,children:d})]}),D,!w&&(r!==-1/0||l!==1/0)&&e.jsxs("div",{className:a.limits,style:n.limits,children:[e.jsx("span",{className:a.limit,children:r!==-1/0&&`Min: ${r}`}),e.jsx("span",{className:a.limit,children:l!==1/0&&`Max: ${l}`})]})]}):e.jsxs("div",{className:P,style:n.container,children:[(d||f)&&e.jsxs("div",{className:a.header,style:n.header,children:[f&&e.jsx("span",{className:a.icon,style:n.icon,children:f}),d&&e.jsx("label",{className:a.label,style:n.label,children:d})]}),D,!w&&(r!==-1/0||l!==1/0)&&e.jsxs("div",{className:a.limits,style:n.limits,children:[e.jsx("span",{className:a.limit,children:r!==-1/0&&`Min: ${r}`}),e.jsx("span",{className:a.limit,children:l!==1/0&&`Max: ${l}`})]})]})};me.__docgenInfo={description:`NumberStepper Component
|
|
2
2
|
|
|
3
3
|
@component
|
|
4
4
|
@description
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n,r as p}from"./iframe-
|
|
1
|
+
import{j as n,r as p}from"./iframe-DKgP8ePJ.js";import{N as r}from"./NumberStepper-DiCCESC2.js";import"./preload-helper-C1FmrZbK.js";import"./useSound-jrNQ4676.js";import"./proxy-BowLazAQ.js";import"./MotionConfigContext--4MeZeHl.js";import"./index-C-qIoU0_.js";const T={title:"Atoms/NumberStepper",component:r,parameters:{layout:"centered"},argTypes:{value:{control:{type:"number"}},onChange:{action:"changed"},min:{control:{type:"number"}},max:{control:{type:"number"}},step:{control:{type:"number"}},label:{control:"text"},icon:{control:"text"},disabled:{control:"boolean"},size:{control:{type:"select"},options:["small","medium","large"]},variant:{control:{type:"select"},options:["default","outlined","filled","minimal","custom"]},showPlusMinus:{control:"boolean"},allowKeyboard:{control:"boolean"}}},m=e=>{const[c,u]=p.useState(e.value||0);return n.jsx(r,{...e,value:c,onChange:a=>{var t;u(a),(t=e.onChange)==null||t.call(e,a)}})},o={render:e=>n.jsx(m,{...e}),args:{value:5,min:0,max:10,step:1}},s={render:e=>n.jsx(m,{...e}),args:{value:5,min:0,max:100,step:1,label:"Cigarettes",icon:"🚬"}},l={render:()=>{const[e,c]=p.useState(0),[u,a]=p.useState(0),[t,j]=p.useState(7);return n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:[n.jsx(r,{value:e,onChange:c,min:0,max:10,step:1,label:"Glasses of Water",icon:"💧",variant:"filled"}),n.jsx(r,{value:u,onChange:a,min:0,max:120,step:15,label:"Exercise (minutes)",icon:"🏃",variant:"outlined"}),n.jsx(r,{value:t,onChange:j,min:0,max:12,step:.5,label:"Hours of Sleep",icon:"😴"})]})}},i={render:e=>n.jsx(m,{...e}),args:{value:100,min:0,max:999,step:1,label:"Health Points",icon:"❤️",showPlusMinus:!0,customStyles:{container:{background:"#1a1a2e",border:"2px solid #16213e",borderRadius:"12px",padding:"16px"},header:{marginBottom:"12px"},label:{color:"#eaeaea",fontSize:"14px",textTransform:"uppercase",letterSpacing:"1px"},icon:{filter:"drop-shadow(0 0 10px rgba(255, 0, 0, 0.5))"},stepper:{background:"#0f3460",borderRadius:"8px",padding:"8px"},button:{background:"#e94560",color:"white",border:"none",borderRadius:"6px",transition:"all 0.3s ease"},buttonHover:{background:"#ff4666",boxShadow:"0 0 20px rgba(233, 69, 96, 0.5)"},value:{color:"#00ff00",fontSize:"28px",fontFamily:"monospace",fontWeight:"bold",textShadow:"0 0 10px rgba(0, 255, 0, 0.5)"}}}};var d,x,b;o.parameters={...o.parameters,docs:{...(d=o.parameters)==null?void 0:d.docs,source:{originalSource:`{
|
|
2
2
|
render: args => <NumberStepperWrapper {...args} />,
|
|
3
3
|
args: {
|
|
4
4
|
value: 5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as E,j as D}from"./iframe-
|
|
1
|
+
import{r as E,j as D}from"./iframe-DKgP8ePJ.js";import{R as P,P as U,V as g,M as W}from"./Mesh-CwXV3WjE.js";import{T as X}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const Y={"orb-container":"_orb-container_r9fzx_1"};function j({hue:o=0,hoverIntensity:a=.2,rotateOnHover:n=!0,forceHoverState:c=!1,backgroundColor:i="#000000"}){const l=E.useRef(null),h=`
|
|
2
2
|
precision highp float;
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
attribute vec2 uv;
|
package/storybook-static/assets/{OrbitImages.stories-Ct7kFkO8.js → OrbitImages.stories-cReXIFdN.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as j,j as c}from"./iframe-
|
|
1
|
+
import{r as j,j as c}from"./iframe-DKgP8ePJ.js";import{u as K}from"./use-motion-value-CcCAM0jJ.js";import{a as Q}from"./index-DvhxcNMG.js";import{u as U}from"./use-transform-B5QCn53b.js";import{m as X}from"./proxy-BowLazAQ.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext--4MeZeHl.js";const g={"orbit-container":"_orbit-container_tujj3_1","orbit-scaling-container":"_orbit-scaling-container_tujj3_7","orbit-rotation-wrapper":"_orbit-rotation-wrapper_tujj3_20","orbit-path-svg":"_orbit-path-svg_tujj3_27","orbit-item":"_orbit-item_tujj3_33","orbit-center-content":"_orbit-center-content_tujj3_39","orbit-image":"_orbit-image_tujj3_48"};function P(e,t,r,a){return`M ${e-r} ${t} A ${r} ${a} 0 1 0 ${e+r} ${t} A ${r} ${a} 0 1 0 ${e-r} ${t}`}function S(e,t,r){return P(e,t,r,r)}function Y(e,t,r){const a=r/2;return`M ${e-a} ${t-a} L ${e+a} ${t-a} L ${e+a} ${t+a} L ${e-a} ${t+a} Z`}function x(e,t,r,a){const s=r/2,n=a/2;return`M ${e-s} ${t-n} L ${e+s} ${t-n} L ${e+s} ${t+n} L ${e-s} ${t+n} Z`}function y(e,t,r){const a=r*Math.sqrt(3)/2,s=r/2;return`M ${e} ${t-a/1.5} L ${e+s} ${t+a/3} L ${e-s} ${t+a/3} Z`}function ee(e,t,r,a,s){const n=Math.PI/s;let l="";for(let o=0;o<2*s;o++){const i=o%2===0?r:a,u=o*n-Math.PI/2,f=e+i*Math.cos(u),b=t+i*Math.sin(u);l+=o===0?`M ${f} ${b}`:` L ${f} ${b}`}return l+" Z"}function te(e,t,r){const a=r/30;return`M ${e} ${t+12*a} C ${e-20*a} ${t-5*a}, ${e-12*a} ${t-18*a}, ${e} ${t-8*a} C ${e+12*a} ${t-18*a}, ${e+20*a} ${t-5*a}, ${e} ${t+12*a}`}function ae(e,t,r,a){const s=r/2,n=a/2;return`M ${e} ${t} C ${e+s*.5} ${t-n}, ${e+s} ${t-n}, ${e+s} ${t} C ${e+s} ${t+n}, ${e+s*.5} ${t+n}, ${e} ${t} C ${e-s*.5} ${t+n}, ${e-s} ${t+n}, ${e-s} ${t} C ${e-s} ${t-n}, ${e-s*.5} ${t-n}, ${e} ${t}`}function se(e,t,r,a,s){const n=[],l=s*20,o=r/2;for(let i=0;i<=l;i++){const u=e-o+r*i/l,f=t+Math.sin(i/l*s*2*Math.PI)*a;n.push(i===0?`M ${u} ${f}`:`L ${u} ${f}`)}for(let i=l;i>=0;i--){const u=e-o+r*i/l,f=t-Math.sin(i/l*s*2*Math.PI)*a;n.push(`L ${u} ${f}`)}return n.join(" ")+" Z"}function re({item:e,index:t,totalItems:r,path:a,itemSize:s,rotation:n,progress:l,fill:o}){const i=o?t/r*100:0,u=U(l,f=>`${((f+i)%100+100)%100}%`);return c.jsx(X.div,{className:`${g["orbit-item"]}`,style:{width:s,height:s,offsetPath:`path("${a}")`,offsetRotate:"0deg",offsetAnchor:"center center",offsetDistance:u},children:c.jsx("div",{style:{transform:`rotate(${-n}deg)`},children:e})})}function D({images:e=[],altPrefix:t="Orbiting image",shape:r="ellipse",customPath:a,baseWidth:s=1400,radiusX:n=700,radiusY:l=170,radius:o=300,starPoints:i=5,starInnerRatio:u=.5,rotation:f=-8,duration:b=40,itemSize:T=64,direction:M="normal",fill:W=!0,width:q=100,height:I=100,className:k="",showPath:z=!1,pathColor:B="rgba(0,0,0,0.1)",pathWidth:H=2,easing:w="linear",paused:C=!1,centerContent:L,responsive:h=!1}){const v=j.useRef(null),[O,F]=j.useState(1),d=s/2,p=s/2,R=j.useMemo(()=>{switch(r){case"circle":return S(d,p,o);case"ellipse":return P(d,p,n,l);case"square":return Y(d,p,o*2);case"rectangle":return x(d,p,n*2,l*2);case"triangle":return y(d,p,o*2);case"star":return ee(d,p,o,o*u,i);case"heart":return te(d,p,o*2);case"infinity":return ae(d,p,n*2,l*2);case"wave":return se(d,p,n*2,l,3);case"custom":return a||S(d,p,o);default:return P(d,p,n,l)}},[r,a,d,p,n,l,o,i,u]);j.useEffect(()=>{if(!h||!v.current)return;const m=()=>{v.current&&F(v.current.clientWidth/s)};m();const $=new ResizeObserver(m);return $.observe(v.current),()=>$.disconnect()},[h,s]);const V=K(0);j.useEffect(()=>{if(C)return;const m=Q(V,M==="reverse"?-100:100,{duration:b,ease:w,repeat:1/0,repeatType:"loop"});return()=>m.stop()},[V,b,w,M,C]);const G=h?"100%":typeof q=="number"?q:"100%",J=h?"auto":typeof I=="number"?I:typeof q=="number"?q:"auto",N=e.map((m,$)=>c.jsx("img",{src:m,alt:`${t} ${$+1}`,draggable:!1,className:`${g["orbit-image"]}`},m));return c.jsxs("div",{ref:v,className:`${g["orbit-container"]} ${k}`,style:{width:G,height:J,aspectRatio:h?"1 / 1":void 0},"aria-hidden":"true",children:[c.jsx("div",{className:h?"orbit-scaling-container orbit-scaling-container--responsive":g["orbit-scaling-container"],style:{width:h?s:"100%",height:h?s:"100%",transform:h?`translate(-50%, -50%) scale(${O})`:void 0},children:c.jsxs("div",{className:`${g["orbit-rotation-wrapper"]}`,style:{transform:`rotate(${f}deg)`},children:[z&&c.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${s} ${s}`,className:`${g["orbit-path-svg"]}`,children:c.jsx("path",{d:R,fill:"none",stroke:B,strokeWidth:H/O})}),N.map((m,$)=>c.jsx(re,{item:m,index:$,totalItems:N.length,path:R,itemSize:T,rotation:f,progress:V,fill:W},$))]})}),L&&c.jsx("div",{className:`${g["orbit-center-content"]}`,children:L})]})}D.__docgenInfo={description:"",methods:[],displayName:"OrbitImages",props:{images:{defaultValue:{value:"[]",computed:!1},required:!1},altPrefix:{defaultValue:{value:"'Orbiting image'",computed:!1},required:!1},shape:{defaultValue:{value:"'ellipse'",computed:!1},required:!1},baseWidth:{defaultValue:{value:"1400",computed:!1},required:!1},radiusX:{defaultValue:{value:"700",computed:!1},required:!1},radiusY:{defaultValue:{value:"170",computed:!1},required:!1},radius:{defaultValue:{value:"300",computed:!1},required:!1},starPoints:{defaultValue:{value:"5",computed:!1},required:!1},starInnerRatio:{defaultValue:{value:"0.5",computed:!1},required:!1},rotation:{defaultValue:{value:"-8",computed:!1},required:!1},duration:{defaultValue:{value:"40",computed:!1},required:!1},itemSize:{defaultValue:{value:"64",computed:!1},required:!1},direction:{defaultValue:{value:"'normal'",computed:!1},required:!1},fill:{defaultValue:{value:"true",computed:!1},required:!1},width:{defaultValue:{value:"100",computed:!1},required:!1},height:{defaultValue:{value:"100",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},showPath:{defaultValue:{value:"false",computed:!1},required:!1},pathColor:{defaultValue:{value:"'rgba(0,0,0,0.1)'",computed:!1},required:!1},pathWidth:{defaultValue:{value:"2",computed:!1},required:!1},easing:{defaultValue:{value:"'linear'",computed:!1},required:!1},paused:{defaultValue:{value:"false",computed:!1},required:!1},responsive:{defaultValue:{value:"false",computed:!1},required:!1}}};const pe={title:"ReactBits/Animations/OrbitImages",component:D,parameters:{layout:"fullscreen"}},_={args:{images:["https://picsum.photos/seed/a/200/200","https://picsum.photos/seed/b/200/200","https://picsum.photos/seed/c/200/200","https://picsum.photos/seed/d/200/200","https://picsum.photos/seed/e/200/200","https://picsum.photos/seed/f/200/200"],altPrefix:"Orbiting image",shape:"ellipse",baseWidth:1400,radiusX:700,radiusY:170,radius:300,starPoints:5,starInnerRatio:.5,rotation:-8,duration:40,itemSize:64,direction:"normal",fill:!0,width:100,height:100,showPath:!1,pathColor:"rgba(0,0,0,0.1)",pathWidth:2,easing:"linear",paused:!1,responsive:!1}};var E,Z,A;_.parameters={..._.parameters,docs:{...(E=_.parameters)==null?void 0:E.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
images: ['https://picsum.photos/seed/a/200/200', 'https://picsum.photos/seed/b/200/200', 'https://picsum.photos/seed/c/200/200', 'https://picsum.photos/seed/d/200/200', 'https://picsum.photos/seed/e/200/200', 'https://picsum.photos/seed/f/200/200'],
|
|
4
4
|
altPrefix: 'Orbiting image',
|
package/storybook-static/assets/{PieChart.stories-D1k8xoHn.js → PieChart.stories-DzS7Xa3H.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as q,j as v}from"./iframe-
|
|
1
|
+
import{r as q,j as v}from"./iframe-DKgP8ePJ.js";import{s as S,i as K,c as X}from"./transform-QOf3tDlt.js";import{a as H}from"./array-BKyUJesY.js";import{c as b}from"./path-CbwjOpE9.js";import{t as z,a as P}from"./arc-DgcIQOLP.js";import"./preload-helper-C1FmrZbK.js";function Q(n,a){let l=0;if(a===void 0)for(let c of n)(c=+c)&&(l+=c);else{let c=-1;for(let g of n)(g=+a(g,++c,n))&&(l+=g)}return l}function W(n,a){return a<n?-1:a>n?1:a>=n?0:NaN}function Z(n){return n}function ee(){var n=Z,a=W,l=null,c=b(0),g=b(z),w=b(0);function s(e){var r,i=(e=H(e)).length,m,L,C=0,_=new Array(i),u=new Array(i),A=+c.apply(this,arguments),h=Math.min(z,Math.max(-z,g.apply(this,arguments)-A)),T,x=Math.min(Math.abs(h)/i,w.apply(this,arguments)),R=x*(h<0?-1:1),d;for(r=0;r<i;++r)(d=u[_[r]=r]=+n(e[r],r,e))>0&&(C+=d);for(a!=null?_.sort(function(t,o){return a(u[t],u[o])}):l!=null&&_.sort(function(t,o){return l(e[t],e[o])}),r=0,L=C?(h-i*R)/C:0;r<i;++r,A=T)m=_[r],d=u[m],T=A+(d>0?d*L:0)+R,u[m]={data:e[m],index:r,value:d,startAngle:A,endAngle:T,padAngle:x};return u}return s.value=function(e){return arguments.length?(n=typeof e=="function"?e:b(+e),s):n},s.sortValues=function(e){return arguments.length?(a=e,l=null,s):a},s.sort=function(e){return arguments.length?(l=e,a=null,s):l},s.startAngle=function(e){return arguments.length?(c=typeof e=="function"?e:b(+e),s):c},s.endAngle=function(e){return arguments.length?(g=typeof e=="function"?e:b(+e),s):g},s.padAngle=function(e){return arguments.length?(w=typeof e=="function"?e:b(+e),s):w},s}const te="_container_1d3zv_1",ne="_title_1d3zv_7",ae="_chartContainer_1d3zv_15",re="_chart_1d3zv_15",oe="_legend_1d3zv_26",le="_legendItem_1d3zv_31",se="_legendColor_1d3zv_45",ie="_legendLabel_1d3zv_52",ce="_legendValue_1d3zv_59",ue="_tooltip_1d3zv_65",p={container:te,title:ne,chartContainer:ae,chart:re,legend:oe,legendItem:le,legendColor:se,legendLabel:ie,legendValue:ce,tooltip:ue},f=["#6366f1","#8b5cf6","#06b6d4","#10b981","#f59e0b","#ef4444","#ec4899","#84cc16","#f97316","#3b82f6","#8b5cf6","#14b8a6","#f59e0b","#ef4444","#06b6d4","#10b981"],$=n=>{const a=X(n);if(!a)return"#ffffff";const l=a.rgb();return(.299*l.r+.587*l.g+.114*l.b)/255>.5?"#000000":"#ffffff"},G=({data:n,width:a=400,height:l=400,title:c="Distribution",showLegend:g=!0,unit:w="items",centerLabel:s})=>{const e=q.useRef(null),r=Math.min(a,l)/2-20;return q.useEffect(()=>{if(!e.current||!n.length)return;const i=S(e.current);i.selectAll("*").remove();const m=i.append("g").attr("transform",`translate(${a/2},${l/2})`),L=ee().value(t=>t.value).sort(null),C=P().innerRadius(r*.4).outerRadius(r).cornerRadius(4),_=P().innerRadius(r*.7).outerRadius(r*.7),u=S("body").append("div").attr("class",p.tooltip).style("opacity",0).style("position","absolute"),A=L(n),h=Q(n,t=>t.value),T=m.selectAll(".arc").data(A).enter().append("g").attr("class","arc");T.append("path").attr("d",t=>C(t)).attr("fill",(t,o)=>t.data.color||f[o%f.length]).attr("stroke","var(--bg-primary)").attr("stroke-width",3).style("cursor","pointer").style("filter","drop-shadow(0 2px 8px rgba(0,0,0,0.15))").on("mouseover",function(t,o){const y=P().innerRadius(r*.4).outerRadius(r*1.05).cornerRadius(4);S(this).transition().duration(200).attr("d",M=>y(M)).style("filter","drop-shadow(0 4px 12px rgba(0,0,0,0.25))"),u.transition().duration(200).style("opacity",1);const V=(o.data.value/h*100).toFixed(1);u.html(`
|
|
2
2
|
<div><strong>${o.data.name}</strong></div>
|
|
3
3
|
<div>Value: ${o.data.value.toLocaleString()}</div>
|
|
4
4
|
<div>${V}% of total</div>
|
package/storybook-static/assets/{PixelBlast.stories-DWr7zhSY.js → PixelBlast.stories-BIJcZn3Y.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as z,j as Ee}from"./iframe-
|
|
1
|
+
import{r as z,j as Ee}from"./iframe-DKgP8ePJ.js";import{E as re,R as le,b as ie,a as me}from"./index-DcRHiSf7.js";import{W as we,d as ne,n as Re,S as Ce,a as Pe,i as qe,a9 as Te,q as be,M as Ae,f as ze,G as M,a2 as Me,z as se}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const Fe={"pixel-blast-container":"_pixel-blast-container_a95g7_1"},ke=()=>{const l=document.createElement("canvas");l.width=64,l.height=64;const i=l.getContext("2d");if(!i)throw new Error("2D context not available");i.fillStyle="black",i.fillRect(0,0,l.width,l.height);const T=new Me(l);T.minFilter=se,T.magFilter=se,T.generateMipmaps=!1;const E=[];let w=null;const m=64;let R=.1*64;const F=1/m,k=()=>{i.fillStyle="black",i.fillRect(0,0,l.width,l.height)},I=a=>{const n={x:a.x*64,y:(1-a.y)*64};let c=1;const C=v=>Math.sin(v*Math.PI/2),g=v=>-v*(v-2);a.age<m*.3?c=C(a.age/(m*.3)):c=g(1-(a.age-m*.3)/(m*.7))||0,c*=a.force;const h=`${(a.vx+1)/2*255}, ${(a.vy+1)/2*255}, ${c*255}`,p=64*5;i.shadowOffsetX=p,i.shadowOffsetY=p,i.shadowBlur=R,i.shadowColor=`rgba(${h},${.22*c})`,i.beginPath(),i.fillStyle="rgba(255,0,0,1)",i.arc(n.x-p,n.y-p,R,0,Math.PI*2),i.fill()};return{canvas:l,texture:T,addTouch:a=>{let n=0,c=0,C=0;if(w){const g=a.x-w.x,h=a.y-w.y;if(g===0&&h===0)return;const p=g*g+h*h,v=Math.sqrt(p);c=g/(v||1),C=h/(v||1),n=Math.min(p*1e4,1)}w={x:a.x,y:a.y},E.push({x:a.x,y:a.y,age:0,force:n,vx:c,vy:C})},update:()=>{k();for(let a=E.length-1;a>=0;a--){const n=E[a],c=n.force*F*(1-n.age/m);n.x+=n.vx*c,n.y+=n.vy*c,n.age++,n.age>m&&E.splice(a,1)}for(let a=0;a<E.length;a++)I(E[a]);T.needsUpdate=!0},set radiusScale(a){R=.1*64*a},get radiusScale(){return R/(.1*64)},size:64}},Ie=(b,l)=>{const i=`
|
|
2
2
|
uniform sampler2D uTexture;
|
|
3
3
|
uniform float uStrength;
|
|
4
4
|
uniform float uTime;
|
package/storybook-static/assets/{PixelCard.stories-CBNsvoWF.js → PixelCard.stories-DcWyzEzN.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as V}from"./iframe-
|
|
1
|
+
import{r as l,j as V}from"./iframe-DKgP8ePJ.js";import"./preload-helper-C1FmrZbK.js";const q={"pixel-canvas":"_pixel-canvas_wo94u_1","pixel-card":"_pixel-card_wo94u_7"};class J{constructor(t,u,p,x,i,y,n){this.width=t.width,this.height=t.height,this.ctx=u,this.x=p,this.y=x,this.color=i,this.speed=this.getRandomValue(.1,.9)*y,this.size=0,this.sizeStep=Math.random()*.4,this.minSize=.5,this.maxSizeInteger=2,this.maxSize=this.getRandomValue(this.minSize,this.maxSizeInteger),this.delay=n,this.counter=0,this.counterStep=Math.random()*4+(this.width+this.height)*.01,this.isIdle=!1,this.isReverse=!1,this.isShimmer=!1}getRandomValue(t,u){return Math.random()*(u-t)+t}draw(){const t=this.maxSizeInteger*.5-this.size*.5;this.ctx.fillStyle=this.color,this.ctx.fillRect(this.x+t,this.y+t,this.size,this.size)}appear(){if(this.isIdle=!1,this.counter<=this.delay){this.counter+=this.counterStep;return}this.size>=this.maxSize&&(this.isShimmer=!0),this.isShimmer?this.shimmer():this.size+=this.sizeStep,this.draw()}disappear(){if(this.isShimmer=!1,this.counter=0,this.size<=0){this.isIdle=!0;return}else this.size-=.1;this.draw()}shimmer(){this.size>=this.maxSize?this.isReverse=!0:this.size<=this.minSize&&(this.isReverse=!1),this.isReverse?this.size-=this.speed:this.size+=this.speed}}function K(m,t){const i=parseInt(m,10);return i<=0||t?0:i>=100?100*.001:i*.001}const T={default:{activeColor:null,gap:5,speed:35,colors:"#f8fafc,#f1f5f9,#cbd5e1",noFocus:!1},blue:{activeColor:"#e0f2fe",gap:10,speed:25,colors:"#e0f2fe,#7dd3fc,#0ea5e9",noFocus:!1},yellow:{activeColor:"#fef08a",gap:3,speed:20,colors:"#fef08a,#fde047,#eab308",noFocus:!1},pink:{activeColor:"#fecdd3",gap:6,speed:80,colors:"#fecdd3,#fda4af,#e11d48",noFocus:!0}};function O({variant:m="default",gap:t,speed:u,colors:p,noFocus:x,className:i="",children:y}){const n=l.useRef(null),s=l.useRef(null),I=l.useRef([]),h=l.useRef(null),F=l.useRef(performance.now()),M=l.useRef(window.matchMedia("(prefers-reduced-motion: reduce)").matches).current,g=T[m]||T.default,C=t??g.gap,A=u??g.speed,_=p??g.colors,v=x??g.noFocus,b=()=>{if(!n.current||!s.current)return;const e=n.current.getBoundingClientRect(),a=Math.floor(e.width),o=Math.floor(e.height),z=s.current.getContext("2d");s.current.width=a,s.current.height=o,s.current.style.width=`${a}px`,s.current.style.height=`${o}px`;const d=_.split(","),f=[];for(let c=0;c<a;c+=parseInt(C,10))for(let r=0;r<o;r+=parseInt(C,10)){const S=d[Math.floor(Math.random()*d.length)],E=c-a/2,N=r-o/2,G=Math.sqrt(E*E+N*N),L=M?0:G;f.push(new J(s.current,z,c,r,S,K(A,M),L))}I.current=f},P=e=>{var c;h.current=requestAnimationFrame(()=>P(e));const a=performance.now(),o=a-F.current,z=1e3/60;if(o<z)return;F.current=a-o%z;const d=(c=s.current)==null?void 0:c.getContext("2d");if(!d||!s.current)return;d.clearRect(0,0,s.current.width,s.current.height);let f=!0;for(let r=0;r<I.current.length;r++){const S=I.current[r];S[e](),S.isIdle||(f=!1)}f&&cancelAnimationFrame(h.current)},R=e=>{cancelAnimationFrame(h.current),h.current=requestAnimationFrame(()=>P(e))},D=()=>R("appear"),H=()=>R("disappear"),W=e=>{e.currentTarget.contains(e.relatedTarget)||R("appear")},k=e=>{e.currentTarget.contains(e.relatedTarget)||R("disappear")};return l.useEffect(()=>{b();const e=new ResizeObserver(()=>{b()});return n.current&&e.observe(n.current),()=>{e.disconnect(),cancelAnimationFrame(h.current)}},[C,A,_,v]),V.jsxs("div",{ref:n,className:`${q["pixel-card"]} ${i}`,onMouseEnter:D,onMouseLeave:H,onFocus:v?void 0:W,onBlur:v?void 0:k,tabIndex:v?-1:0,children:[V.jsx("canvas",{className:`${q["pixel-canvas"]}`,ref:s}),y]})}O.__docgenInfo={description:"",methods:[],displayName:"PixelCard",props:{variant:{defaultValue:{value:"'default'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1}}};const X={title:"ReactBits/Components/PixelCard",component:O,parameters:{layout:"fullscreen"}},w={args:{variant:"default",children:"Hello World"}};var $,j,B;w.parameters={...w.parameters,docs:{...($=w.parameters)==null?void 0:$.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
variant: 'default',
|
|
4
4
|
children: 'Hello World'
|
package/storybook-static/assets/{PixelSnow.stories-CibmTFVc.js → PixelSnow.stories-DA7TaJeH.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,j as B}from"./iframe-
|
|
1
|
+
import{r as t,j as B}from"./iframe-DKgP8ePJ.js";import{n as K,e as O,S as T,a as U,W as X,i as G,d as H,q as W,M as Y}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const J={"pixel-snow-container":"_pixel-snow-container_udm6i_1"},L=`
|
|
2
2
|
void main() {
|
|
3
3
|
gl_Position = vec4(position, 1.0);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r,j as l}from"./iframe-
|
|
1
|
+
import{r,j as l}from"./iframe-DKgP8ePJ.js";import{g as d}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const c={"pixelated-image-card":"_pixelated-image-card_12og9_1","pixelated-image-card__default":"_pixelated-image-card__default_12og9_12","pixelated-image-card__active":"_pixelated-image-card__active_12og9_13","pixelated-image-card__pixels":"_pixelated-image-card__pixels_12og9_14","pixelated-image-card__pixel":"_pixelated-image-card__pixel_12og9_14"};function E({firstContent:b,secondContent:F,gridSize:u=7,pixelColor:_="currentColor",animationStepDuration:m=.3,once:v=!1,aspectRatio:$="100%",className:q="",style:S={}}){const T=r.useRef(null),x=r.useRef(null),h=r.useRef(null),g=r.useRef(null),[i,I]=r.useState(!1),o="ontouchstart"in window||navigator.maxTouchPoints>0||window.matchMedia("(pointer: coarse)").matches;r.useEffect(()=>{const t=x.current;if(t){t.innerHTML="";for(let n=0;n<u;n++)for(let a=0;a<u;a++){const e=document.createElement("div");e.classList.add(c["pixelated-image-card__pixel"]),e.setAttribute("data-pixel",""),e.style.backgroundColor=_;const s=100/u;e.style.width=`${s}%`,e.style.height=`${s}%`,e.style.left=`${a*s}%`,e.style.top=`${n*s}%`,t.appendChild(e)}}},[u,_]);const f=t=>{I(t);const n=x.current,a=h.current;if(!n||!a)return;const e=n.querySelectorAll("[data-pixel]");if(!e.length)return;d.killTweensOf(e),g.current&&g.current.kill(),d.set(e,{display:"none"});const s=e.length,R=m/s;d.to(e,{display:"block",duration:0,stagger:{each:R,from:"random"}}),g.current=d.delayedCall(m,()=>{a.style.display=t?"block":"none",a.style.pointerEvents=t?"none":""}),d.to(e,{display:"none",duration:0,delay:m,stagger:{each:R,from:"random"}})},y=()=>{i||f(!0)},C=()=>{i&&!v&&f(!1)},V=()=>{i?i&&!v&&f(!1):f(!0)};return l.jsxs("div",{ref:T,className:`${c["pixelated-image-card"]} ${q}`,style:S,onMouseEnter:o?void 0:y,onMouseLeave:o?void 0:C,onClick:o?V:void 0,onFocus:o?void 0:y,onBlur:o?void 0:C,tabIndex:0,children:[l.jsx("div",{style:{paddingTop:$}}),l.jsx("div",{className:`${c["pixelated-image-card__default"]}`,"aria-hidden":i,children:b}),l.jsx("div",{className:`${c["pixelated-image-card__active"]}`,ref:h,"aria-hidden":!i,children:F}),l.jsx("div",{className:`${c["pixelated-image-card__pixels"]}`,ref:x})]})}E.__docgenInfo={description:"",methods:[],displayName:"PixelTransition",props:{gridSize:{defaultValue:{value:"7",computed:!1},required:!1},pixelColor:{defaultValue:{value:"'currentColor'",computed:!1},required:!1},animationStepDuration:{defaultValue:{value:"0.3",computed:!1},required:!1},once:{defaultValue:{value:"false",computed:!1},required:!1},aspectRatio:{defaultValue:{value:"'100%'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},style:{defaultValue:{value:"{}",computed:!1},required:!1}}};const A={title:"ReactBits/Animations/PixelTransition",component:E,parameters:{layout:"fullscreen"}},p={args:{firstContent:l.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"#1a1a2e",color:"#fff",fontSize:"2rem"},children:"Hover me"}),secondContent:l.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"#5227FF",color:"#fff",fontSize:"2rem"},children:"Revealed!"}),gridSize:7,pixelColor:"#5227FF",aspectRatio:"100%"}};var j,k,w;p.parameters={...p.parameters,docs:{...(j=p.parameters)==null?void 0:j.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
firstContent: <div style={{
|
|
4
4
|
width: '100%',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as y,j as U}from"./iframe-
|
|
1
|
+
import{r as y,j as U}from"./iframe-DKgP8ePJ.js";import{R as E,P as Q,M as j}from"./Mesh-CwXV3WjE.js";import{T as k}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const L={"plasma-container":"_plasma-container_4c6hx_1"},N=n=>{const o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return o?[parseInt(o[1],16)/255,parseInt(o[2],16)/255,parseInt(o[3],16)/255]:[1,.5,.2]},$=`#version 300 es
|
|
2
2
|
precision highp float;
|
|
3
3
|
in vec2 position;
|
|
4
4
|
in vec2 uv;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as le,j as Ne}from"./iframe-
|
|
1
|
+
import{r as le,j as Ne}from"./iframe-DKgP8ePJ.js";import{R as Ye,P as je,M as De}from"./Mesh-CwXV3WjE.js";import{T as Ge}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const Xe={"prism-container":"_prism-container_sjqpx_1"},ce=({height:T=3.5,baseWidth:z=5.5,animationType:h="rotate",glow:W=1,offset:s={x:0,y:0},noise:U=.5,transparent:E=!0,scale:N=3.6,hueShift:Y=0,colorFrequency:j=1,hoverStrength:D=2,inertia:G=.05,bloom:X=1,suspendWhenOffscreen:P=!1,timeScale:Z=.5})=>{const k=le.useRef(null);return le.useEffect(()=>{const r=k.current;if(!r)return;const b=Math.max(.001,T),H=Math.max(.001,z)*.5,fe=Math.max(0,W),Q=Math.max(0,U),me=(s==null?void 0:s.x)??0,de=(s==null?void 0:s.y)??0,ve=E?1.5:1,I=Math.max(.001,N),he=Y||0,pe=Math.max(0,j||1),xe=Math.max(0,X||1),we=1,Me=1,Se=1,R=Math.max(0,Z||1),$=Math.max(0,D||1),J=Math.max(0,Math.min(1,G||.12)),_=Math.min(2,window.devicePixelRatio||1),A=new Ye({dpr:_,alpha:E,antialias:!1}),a=A.gl;a.disable(a.DEPTH_TEST),a.disable(a.CULL_FACE),a.disable(a.BLEND),Object.assign(a.canvas.style,{position:"absolute",inset:"0",width:"100%",height:"100%",display:"block"}),r.appendChild(a.canvas);const ge=`
|
|
2
2
|
attribute vec2 position;
|
|
3
3
|
void main() {
|
|
4
4
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as n,j as te}from"./iframe-
|
|
1
|
+
import{r as n,j as te}from"./iframe-DKgP8ePJ.js";import{R as re,P as ae,M as ne}from"./Mesh-CwXV3WjE.js";import{T as oe}from"./Texture-BkQWYNP2.js";import{T as se}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const ue={"prismatic-burst-container":"_prismatic-burst-container_u2n5x_1"},ce=`#version 300 es
|
|
2
2
|
in vec2 position;
|
|
3
3
|
in vec2 uv;
|
|
4
4
|
out vec2 vUv;
|
package/storybook-static/assets/{ProfileCard.stories-Bf0IPDE7.js → ProfileCard.stories-CF1aCfGU.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as ve,r as o,j as r}from"./iframe-
|
|
1
|
+
import{R as ve,r as o,j as r}from"./iframe-DKgP8ePJ.js";import"./preload-helper-C1FmrZbK.js";const he="_active_uxwt3_56",_e="_entering_uxwt3_84",xe="_avatar_uxwt3_252",n={"pc-behind":"_pc-behind_uxwt3_40",active:he,"pc-card":"_pc-card_uxwt3_33","pc-card-shell":"_pc-card-shell_uxwt3_84",entering:_e,"pc-inside":"_pc-inside_uxwt3_100","pc-shine":"_pc-shine_uxwt3_108","pc-glare":"_pc-glare_uxwt3_232","pc-avatar-content":"_pc-avatar-content_uxwt3_245",avatar:xe,"pc-user-info":"_pc-user-info_uxwt3_274","pc-user-details":"_pc-user-details_uxwt3_293","pc-mini-avatar":"_pc-mini-avatar_uxwt3_299","pc-user-text":"_pc-user-text_uxwt3_315","pc-handle":"_pc-handle_uxwt3_322","pc-status":"_pc-status_uxwt3_329","pc-contact-btn":"_pc-contact-btn_uxwt3_335","pc-content":"_pc-content_uxwt3_353","pc-details":"_pc-details_uxwt3_367"},ge="linear-gradient(145deg,#60496e8c 0%,#71C4FF44 100%)",L={INITIAL_DURATION:1200,INITIAL_X_OFFSET:70,INITIAL_Y_OFFSET:60,DEVICE_BETA_OFFSET:20,ENTER_TRANSITION_MS:180},$=(p,d=0,v=100)=>Math.min(Math.max(p,d),v),C=(p,d=3)=>parseFloat(p.toFixed(d)),z=(p,d,v,x,O)=>C(x+(O-x)*(p-d)/(v-d)),Z=({avatarUrl:p="<Placeholder for avatar URL>",iconUrl:d="<Placeholder for icon URL>",grainUrl:v="<Placeholder for grain URL>",innerGradient:x,behindGlowEnabled:O=!0,behindGlowColor:S,behindGlowSize:U,className:ee="",enableTilt:A=!0,enableMobileTilt:V=!1,mobileTiltSensitivity:q=5,miniAvatarUrl:te,name:y="Javi A. Torres",title:ne="Software Engineer",handle:ae="javicodes",status:re="Online",contactText:se="Contact",showUserInfo:ce=!0,onContactClick:F})=>{const M=o.useRef(null),m=o.useRef(null),g=o.useRef(null),h=o.useRef(null),s=o.useMemo(()=>{if(!A)return null;let e=null,t=!1,a=0,c=0,i=0,u=0,f=0;const E=.14,T=.6;let j=0;const H=(l,_)=>{const w=m.current,I=M.current;if(!w||!I)return;const J=w.clientWidth||1,oe=w.clientHeight||1,N=$(100/J*l),b=$(100/oe*_),ue=N-50,de=b-50,pe={"--pointer-x":`${N}%`,"--pointer-y":`${b}%`,"--background-x":`${z(N,0,100,35,65)}%`,"--background-y":`${z(b,0,100,35,65)}%`,"--pointer-from-center":`${$(Math.hypot(b-50,N-50)/50,0,1)}`,"--pointer-from-top":`${b/100}`,"--pointer-from-left":`${N/100}`,"--rotate-x":`${C(-(ue/5))}deg`,"--rotate-y":`${C(de/4)}deg`};for(const[fe,me]of Object.entries(pe))I.style.setProperty(fe,me)},W=l=>{if(!t)return;a===0&&(a=l);const _=(l-a)/1e3;a=l;const w=l<j?T:E,I=1-Math.exp(-_/w);c+=(u-c)*I,i+=(f-i)*I,H(c,i),Math.abs(u-c)>.05||Math.abs(f-i)>.05||document.hasFocus()?e=requestAnimationFrame(W):(t=!1,a=0,e&&(cancelAnimationFrame(e),e=null))},B=()=>{t||(t=!0,a=0,e=requestAnimationFrame(W))};return{setImmediate(l,_){c=l,i=_,H(c,i)},setTarget(l,_){u=l,f=_,B()},toCenter(){const l=m.current;l&&this.setTarget(l.clientWidth/2,l.clientHeight/2)},beginInitial(l){j=performance.now()+l,B()},getCurrent(){return{x:c,y:i,tx:u,ty:f}},cancel(){e&&cancelAnimationFrame(e),e=null,t=!1,a=0}}},[A]),P=(e,t)=>{const a=t.getBoundingClientRect();return{x:e.clientX-a.left,y:e.clientY-a.top}},D=o.useCallback(e=>{const t=m.current;if(!t||!s)return;const{x:a,y:c}=P(e,t);s.setTarget(a,c)},[s]),k=o.useCallback(e=>{const t=m.current;if(!t||!s)return;t.classList.add(n.active),t.classList.add(n.entering),g.current&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{t.classList.remove(n.entering)},L.ENTER_TRANSITION_MS);const{x:a,y:c}=P(e,t);s.setTarget(a,c)},[s]),X=o.useCallback(()=>{const e=m.current;if(!e||!s)return;s.toCenter();const t=()=>{const{x:a,y:c,tx:i,ty:u}=s.getCurrent();Math.hypot(i-a,u-c)<.6?(e.classList.remove(n.active),h.current=null):h.current=requestAnimationFrame(t)};h.current&&cancelAnimationFrame(h.current),h.current=requestAnimationFrame(t)},[s]),Y=o.useCallback(e=>{const t=m.current;if(!t||!s)return;const{beta:a,gamma:c}=e;if(a==null||c==null)return;const i=t.clientWidth/2,u=t.clientHeight/2,f=$(i+c*q,0,t.clientWidth),E=$(u+(a-L.DEVICE_BETA_OFFSET)*q,0,t.clientHeight);s.setTarget(f,E)},[s,q]);o.useEffect(()=>{if(!A||!s)return;const e=m.current;if(!e)return;const t=D,a=k,c=X,i=Y;e.addEventListener("pointerenter",a),e.addEventListener("pointermove",t),e.addEventListener("pointerleave",c);const u=()=>{if(!V||location.protocol!=="https:")return;const T=window.DeviceMotionEvent;T&&typeof T.requestPermission=="function"?T.requestPermission().then(j=>{j==="granted"&&window.addEventListener("deviceorientation",i)}).catch(console.error):window.addEventListener("deviceorientation",i)};e.addEventListener("click",u);const f=(e.clientWidth||0)-L.INITIAL_X_OFFSET,E=L.INITIAL_Y_OFFSET;return s.setImmediate(f,E),s.toCenter(),s.beginInitial(L.INITIAL_DURATION),()=>{e.removeEventListener("pointerenter",a),e.removeEventListener("pointermove",t),e.removeEventListener("pointerleave",c),e.removeEventListener("click",u),window.removeEventListener("deviceorientation",i),g.current&&window.clearTimeout(g.current),h.current&&cancelAnimationFrame(h.current),s.cancel(),e.classList.remove(n.entering)}},[A,V,s,D,k,X,Y]);const le=o.useMemo(()=>({"--icon":d?`url(${d})`:"none","--grain":v?`url(${v})`:"none","--inner-gradient":x??ge,"--behind-glow-color":S??"rgba(125, 190, 255, 0.67)","--behind-glow-size":U??"50%"}),[d,v,x,S,U]),ie=o.useCallback(()=>{F==null||F()},[F]);return r.jsxs("div",{ref:M,className:`pc-card-wrapper ${ee}`.trim(),style:le,children:[O&&r.jsx("div",{className:`${n["pc-behind"]}`}),r.jsx("div",{ref:m,className:`${n["pc-card-shell"]}`,children:r.jsx("section",{className:`${n["pc-card"]}`,children:r.jsxs("div",{className:`${n["pc-inside"]}`,children:[r.jsx("div",{className:`${n["pc-shine"]}`}),r.jsx("div",{className:`${n["pc-glare"]}`}),r.jsxs("div",{className:`${n["pc-content"]} ${n["pc-avatar-content"]}`,children:[r.jsx("img",{className:`${n.avatar}`,src:p,alt:`${y||"User"} avatar`,loading:"lazy",onError:e=>{const t=e.target;t.style.display="none"}}),ce&&r.jsxs("div",{className:`${n["pc-user-info"]}`,children:[r.jsxs("div",{className:`${n["pc-user-details"]}`,children:[r.jsx("div",{className:`${n["pc-mini-avatar"]}`,children:r.jsx("img",{src:te||p,alt:`${y||"User"} mini avatar`,loading:"lazy",onError:e=>{const t=e.target;t.style.opacity="0.5",t.src=p}})}),r.jsxs("div",{className:`${n["pc-user-text"]}`,children:[r.jsxs("div",{className:`${n["pc-handle"]}`,children:["@",ae]}),r.jsx("div",{className:`${n["pc-status"]}`,children:re})]})]}),r.jsx("button",{className:`${n["pc-contact-btn"]}`,onClick:ie,style:{pointerEvents:"auto"},type:"button","aria-label":`Contact ${y||"user"}`,children:se})]})]}),r.jsx("div",{className:`${n["pc-content"]}`,children:r.jsxs("div",{className:`${n["pc-details"]}`,children:[r.jsx("h3",{children:y}),r.jsx("p",{children:ne})]})})]})})})]})},Ee=ve.memo(Z);Z.__docgenInfo={description:"",methods:[],displayName:"ProfileCardComponent",props:{avatarUrl:{defaultValue:{value:"'<Placeholder for avatar URL>'",computed:!1},required:!1},iconUrl:{defaultValue:{value:"'<Placeholder for icon URL>'",computed:!1},required:!1},grainUrl:{defaultValue:{value:"'<Placeholder for grain URL>'",computed:!1},required:!1},behindGlowEnabled:{defaultValue:{value:"true",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},enableTilt:{defaultValue:{value:"true",computed:!1},required:!1},enableMobileTilt:{defaultValue:{value:"false",computed:!1},required:!1},mobileTiltSensitivity:{defaultValue:{value:"5",computed:!1},required:!1},name:{defaultValue:{value:"'Javi A. Torres'",computed:!1},required:!1},title:{defaultValue:{value:"'Software Engineer'",computed:!1},required:!1},handle:{defaultValue:{value:"'javicodes'",computed:!1},required:!1},status:{defaultValue:{value:"'Online'",computed:!1},required:!1},contactText:{defaultValue:{value:"'Contact'",computed:!1},required:!1},showUserInfo:{defaultValue:{value:"true",computed:!1},required:!1}}};const Ie={title:"ReactBits/Components/ProfileCard",component:Ee,parameters:{layout:"fullscreen"}},R={args:{avatarUrl:"https://i.pravatar.cc/300?img=12",behindGlowEnabled:!0,enableTilt:!0,enableMobileTilt:!1,mobileTiltSensitivity:5,name:"Javi A. Torres",title:"Software Engineer",handle:"javicodes",status:"Online",contactText:"Contact",showUserInfo:!0}};var G,K,Q;R.parameters={...R.parameters,docs:{...(G=R.parameters)==null?void 0:G.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
avatarUrl: 'https://i.pravatar.cc/300?img=12',
|
|
4
4
|
behindGlowEnabled: true,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._container_1nm5s_1{background:transparent;border-radius:var(--radius-lg);padding:var(--spacing-xl);display:flex;flex-direction:column;align-items:center;width:100%;max-width:100%;box-sizing:border-box}@media (max-width: 640px){._container_1nm5s_1{padding:var(--spacing-sm)}}._controls_1nm5s_19{display:flex;justify-content:center;align-items:center;gap:var(--spacing-md);margin-bottom:var(--spacing-xl)}._viewToggle_1nm5s_27{display:flex;gap:4px;background:var(--color-background-tertiary);padding:4px;border-radius:12px;border:1px solid var(--color-border)}._viewButton_1nm5s_36{display:flex;align-items:center;gap:6px;padding:8px 12px;background:transparent;border:none;border-radius:8px;color:var(--color-text-secondary);font-size:13px;font-weight:500;cursor:pointer;transition:all .2s ease;position:relative}._viewButton_1nm5s_36:hover{background:var(--color-surface-hover);transform:translateY(-1px)}._viewButton_1nm5s_36._active_1nm5s_57{background:var(--color-primary);color:var(--color-text-inverse);box-shadow:0 4px 12px #d4af374d}._viewIcon_1nm5s_63{display:inline-flex;align-items:center}._viewLabel_1nm5s_68{display:inline-block}@media (max-width: 640px){._viewLabel_1nm5s_68{display:none}}._aggregationToggle_1nm5s_78{display:flex;gap:4px;background:var(--color-background-tertiary);padding:4px;border-radius:12px;border:1px solid var(--color-border)}._aggregationButton_1nm5s_87{display:flex;align-items:center;gap:6px;padding:8px 12px;background:transparent;border:none;border-radius:8px;color:var(--color-text-secondary);font-size:13px;font-weight:500;cursor:pointer;transition:all .2s ease;position:relative}._aggregationButton_1nm5s_87:hover{background:var(--color-surface-hover);transform:translateY(-1px)}._aggregationButton_1nm5s_87._active_1nm5s_57{background:var(--color-accent);color:var(--color-text-inverse);box-shadow:0 4px 12px #d4af374d}._aggregationIcon_1nm5s_114{font-size:16px;display:inline-block}._aggregationLabel_1nm5s_119{display:inline-block}@media (max-width: 640px){._aggregationLabel_1nm5s_119{display:none}}._legend_1nm5s_129{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:var(--spacing-xl);padding:0;background:transparent;border:none;justify-content:center}._compactLegend_1nm5s_140{gap:4px;padding:6px 8px}._compactLegend_1nm5s_140 ._legendItem_1nm5s_145{padding:3px 8px;gap:4px}._compactLegend_1nm5s_140 ._legendEmoji_1nm5s_150{font-size:14px}._compactLegend_1nm5s_140 ._legendLabel_1nm5s_154{font-size:11px}._legendItem_1nm5s_145{display:flex;align-items:center;gap:8px;padding:10px 14px;min-height:44px;background:transparent;border:none;border-radius:8px;cursor:pointer;transition:opacity .2s ease;position:relative}@media (hover: hover){._legendItem_1nm5s_145:hover{opacity:.75}}._legendItem_1nm5s_145._inactive_1nm5s_178{opacity:.4}@media (hover: hover){._legendItem_1nm5s_145._inactive_1nm5s_178:hover{opacity:.6}}._legendItem_1nm5s_145._inactive_1nm5s_178 ._legendColor_1nm5s_188{background:var(--color-text-tertiary)!important}._legendEmoji_1nm5s_150{font-size:18px;display:inline-block;animation:_bounce_1nm5s_1 2s infinite;animation-delay:var(--animation-delay, 0s)}@keyframes _bounce_1nm5s_1{0%,to{transform:translateY(0)}50%{transform:translateY(-2px)}}._legendColor_1nm5s_188{width:12px;height:12px;border-radius:50%;transition:all .2s ease;box-shadow:0 2px 4px #0003;position:relative}@media (hover: hover){._legendItem_1nm5s_145:hover ._legendColor_1nm5s_188{transform:scale(1.2)}}._legendLabel_1nm5s_154{font-size:13px;font-weight:500;color:var(--color-text);position:relative;z-index:1}._chart_1nm5s_227{display:block;margin:0 auto;width:100%;height:auto;max-width:100%}._gridLine_1nm5s_235{stroke:var(--color-border);stroke-opacity:.15;stroke-dasharray:4,4}._line_1nm5s_241{fill:none;stroke-width:2.5;transition:opacity .3s ease;filter:drop-shadow(0 2px 4px rgba(0,0,0,.1))}._xAxis_1nm5s_248,._yAxis_1nm5s_249{color:var(--color-text-secondary);font-size:11px;font-weight:500}._xAxis_1nm5s_248 line,._xAxis_1nm5s_248 path,._yAxis_1nm5s_249 line,._yAxis_1nm5s_249 path{stroke:var(--color-border);stroke-opacity:.3}._xAxis_1nm5s_248 text,._yAxis_1nm5s_249 text{fill:var(--color-text-secondary)}._dataPoint_1nm5s_268{transition:all .3s ease;filter:drop-shadow(0 2px 4px rgba(0,0,0,.2))}._dataPoint_1nm5s_268:hover{r:6;filter:drop-shadow(0 4px 8px rgba(0,0,0,.3))}._tooltip_1nm5s_278{position:fixed;pointer-events:none;background:var(--color-background-primary);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--color-border);border-radius:12px;padding:12px 16px;font-size:13px;font-weight:500;z-index:10000;box-shadow:0 0 0 1px var(--color-border),0 10px 20px #00000026,0 4px 8px #0000001a;transition:opacity .15s ease,transform .15s ease;opacity:0;transform:translateY(-8px) translate(-50%)}._tooltip_1nm5s_278._visible_1nm5s_299{opacity:1;transform:translateY(-4px) translate(-50%)}._tooltipHeader_1nm5s_304{display:flex;align-items:center;gap:8px;margin-bottom:8px;padding-bottom:8px;border-bottom:1px solid var(--color-border);font-weight:600;color:var(--color-text)}._tooltipEmoji_1nm5s_315{font-size:18px;filter:drop-shadow(0 1px 2px rgba(0,0,0,.1))}._tooltipDot_1nm5s_320{width:10px;height:10px;border-radius:50%;box-shadow:0 2px 4px #0003}._tooltipInfo_1nm5s_327{display:flex;flex-direction:column;gap:6px}._tooltipDate_1nm5s_333{color:var(--color-text-secondary);font-size:12px;font-weight:500}._tooltipValue_1nm5s_339{color:var(--color-text);font-weight:700;font-size:16px;display:flex;align-items:baseline;gap:6px}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import{r as d,j as n}from"./iframe-DKgP8ePJ.js";import{s as Y}from"./transform-QOf3tDlt.js";import{t as be,e as ke,l as Se,m as Te}from"./monotone-DouxdRGd.js";import{l as je}from"./linear-DhrdWH9x.js";import{C as De}from"./chart-column-Djx9piD1.js";import{c as H}from"./createLucideIcon-B0MG6HAs.js";import{C as Ce}from"./calendar-gj4nrcYx.js";import{t as Q}from"./defaultLocale-DJ2q5QjE.js";import{a as Ee,b as qe}from"./axis-D3QohQNI.js";import"./preload-helper-C1FmrZbK.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";/**
|
|
2
|
+
* @license lucide-react v0.539.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const $e=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],Le=H("calendar-days",$e);/**
|
|
7
|
+
* @license lucide-react v0.539.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const Ne=[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M17 14h-6",key:"bkmgh3"}],["path",{d:"M13 18H7",key:"bb0bb7"}],["path",{d:"M7 14h.01",key:"1qa3f1"}],["path",{d:"M17 18h.01",key:"1bdyru"}]],Ie=H("calendar-range",Ne);/**
|
|
12
|
+
* @license lucide-react v0.539.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const Ae=[["circle",{cx:"12",cy:"6",r:"1",key:"1bh7o1"}],["line",{x1:"5",x2:"19",y1:"12",y2:"12",key:"13b5wn"}],["circle",{cx:"12",cy:"18",r:"1",key:"lqb9t5"}]],Ve=H("divide",Ae);/**
|
|
17
|
+
* @license lucide-react v0.539.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const He=[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]],Re=H("sigma",He),We="_container_1nm5s_1",Be="_controls_1nm5s_19",Fe="_viewToggle_1nm5s_27",Oe="_viewButton_1nm5s_36",ze="_active_1nm5s_57",Ye="_viewIcon_1nm5s_63",Qe="_viewLabel_1nm5s_68",Ue="_aggregationToggle_1nm5s_78",Pe="_aggregationButton_1nm5s_87",Ge="_aggregationIcon_1nm5s_114",Ke="_aggregationLabel_1nm5s_119",Xe="_legend_1nm5s_129",Je="_compactLegend_1nm5s_140",Ze="_legendItem_1nm5s_145",et="_legendEmoji_1nm5s_150",tt="_legendLabel_1nm5s_154",at="_inactive_1nm5s_178",nt="_legendColor_1nm5s_188",rt="_chart_1nm5s_227",ot="_gridLine_1nm5s_235",st="_line_1nm5s_241",it="_xAxis_1nm5s_248",lt="_yAxis_1nm5s_249",ct="_dataPoint_1nm5s_268",dt="_tooltip_1nm5s_278",mt="_visible_1nm5s_299",ut="_tooltipHeader_1nm5s_304",gt="_tooltipEmoji_1nm5s_315",pt="_tooltipDot_1nm5s_320",ht="_tooltipInfo_1nm5s_327",yt="_tooltipDate_1nm5s_333",ft="_tooltipValue_1nm5s_339",t={container:We,controls:Be,viewToggle:Fe,viewButton:Oe,active:ze,viewIcon:Ye,viewLabel:Qe,aggregationToggle:Ue,aggregationButton:Pe,aggregationIcon:Ge,aggregationLabel:Ke,legend:Xe,compactLegend:Je,legendItem:Ze,legendEmoji:et,legendLabel:tt,inactive:at,legendColor:nt,chart:rt,gridLine:ot,line:st,xAxis:it,yAxis:lt,dataPoint:ct,tooltip:dt,visible:mt,tooltipHeader:ut,tooltipEmoji:gt,tooltipDot:pt,tooltipInfo:ht,tooltipDate:yt,tooltipValue:ft},_t={Exercise:"#6BCB77",Meditation:"#4D96FF",Reading:"#FFB319",Water:"#00D9FF",Steps:"#FF6B6B",Sleep:"#9B59B6",Calories:"#FF9F1C",Study:"#C774E8"},ue=({data:r,width:_=800,height:v=400,defaultViewType:b="daily",periodType:w="month",habitColors:U={},habitEmojis:P={},onDataPointClick:W,hideControls:ge=!1,compactLegend:pe=!1})=>{const D=d.useRef(null),he=d.useRef(null),[u,ye]=d.useState(b),[C,G]=d.useState([]),[k,K]=d.useState(null),[h,E]=d.useState(null),[q,X]=d.useState("average"),y=d.useMemo(()=>({top:20,right:20,bottom:50,left:50}),[]),B=_-y.left-y.right,F=v-y.top-y.bottom,S=d.useMemo(()=>Object.keys(r).filter(e=>e!=="dates"),[r]);d.useEffect(()=>{G(S)},[S]),d.useEffect(()=>{const e=()=>{E(null)};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[]);const fe=d.useMemo(()=>{switch(w){case"week":return["daily"];case"month":return["daily","weekly"];case"quarter":return["weekly","monthly"];case"year":return["daily","weekly","monthly","quarterly"];case"allTime":return["monthly","quarterly"];default:return["daily"]}},[w]),T=d.useCallback(e=>U[e]||_t[e]||`hsl(${Math.abs(e.split("").reduce((s,o)=>s+o.charCodeAt(0),0))%360}, 70%, 50%)`,[U]),f=d.useMemo(()=>{if(u==="daily"||!r.dates.length)return r;const e={dates:[]},s=new Map;return r.dates.forEach((o,g)=>{const M=new Date(o);let i;switch(u){case"weekly":{const c=new Date(M),p=c.getDay(),$=c.getDate()-p+(p===0?-6:1);c.setDate($),i=c.toISOString().split("T")[0];break}case"monthly":i=`${M.getFullYear()}-${String(M.getMonth()+1).padStart(2,"0")}-01`;break;case"quarterly":{const p=(Math.floor(M.getMonth()/3)+1-1)*3;i=new Date(M.getFullYear(),p,1).toISOString().split("T")[0];break}default:i=o}s.has(i)||s.set(i,[]),s.get(i).push(g)}),e.dates=Array.from(s.keys()).sort(),S.forEach(o=>{e[o]=e.dates.map(g=>{const i=s.get(g).map(c=>r[o][c]).filter(c=>typeof c=="number"&&!isNaN(c));return i.length===0?0:Math.round(q==="sum"?i.reduce((c,p)=>c+p,0):i.reduce((c,p)=>c+p,0)/i.length)})}),e},[r,u,S,q]),_e=e=>{G(s=>s.includes(e)?s.filter(o=>o!==e):[...s,e])};d.useEffect(()=>{if(!D.current||f.dates.length===0)return;const e=Y(D.current);e.selectAll("*").remove(),e.append("rect").attr("width",_).attr("height",v).attr("fill","transparent").style("pointer-events","all").on("mouseleave",()=>{E(null)});const s=e.append("g").attr("transform",`translate(${y.left},${y.top})`),o=f.dates.map(a=>new Date(a)),g=be().domain(ke(o)).range([0,B]),M=Math.max(...C.flatMap(a=>f[a].filter(m=>typeof m=="number"))),i=je().domain([0,M*1.1]).range([F,0]);s.selectAll(".grid-line-y").data(i.ticks(5)).enter().append("line").attr("class",t.gridLine).attr("x1",0).attr("y1",a=>i(a)).attr("x2",B).attr("y2",a=>i(a));const c=Se().x(a=>g(a[0])).y(a=>i(a[1])).curve(Te);C.forEach(a=>{const m=o.map((l,x)=>[l,f[a][x]]).filter(l=>typeof l[1]=="number");s.append("path").datum(m).attr("class",t.line).attr("d",c).attr("stroke",T(a)).attr("opacity",k&&k!==a?.3:1),s.selectAll(`.hover-circle-${a}`).data(m).enter().append("circle").attr("cx",l=>g(l[0])).attr("cy",l=>i(l[1])).attr("r",10).attr("fill","transparent").style("cursor","pointer").on("mouseenter",function(l,x){var Z;const[j,L]=x,z=(Z=D.current)==null?void 0:Z.getBoundingClientRect();z&&E({habit:a,date:j.toISOString().split("T")[0],value:L,x:g(j)+y.left+z.left,y:i(L)+y.top+z.top}),Y(s.node()).selectAll(`.circle-${a}-${o.indexOf(j)}`).attr("r",6)}).on("mouseleave",function(l,x){E(null),Y(s.node()).selectAll('[class*="circle-'+a+'"]').attr("r",4)}).on("click",function(l,x){const[j,L]=x;W&&W(a,j.toISOString().split("T")[0],L)}),s.selectAll(`.circle-${a}`).data(m).enter().append("circle").attr("class",(l,x)=>`${t.dataPoint} circle-${a}-${x}`).attr("cx",l=>g(l[0])).attr("cy",l=>i(l[1])).attr("r",4).attr("fill",T(a)).attr("opacity",k&&k!==a?.3:1).style("pointer-events","none")});const p=a=>{const m=new Date(a);m.setHours(0,0,0,0),m.setDate(m.getDate()+3-(m.getDay()+6)%7);const l=new Date(m.getFullYear(),0,4);return 1+Math.round(((m.getTime()-l.getTime())/864e5-3+(l.getDay()+6)%7)/7)},$=(()=>{switch(u){case"daily":return Q("%m-%d");case"weekly":return a=>`W${p(a).toString().padStart(2,"0")}`;case"monthly":return Q("%b");case"quarterly":return a=>`Q${Math.floor(a.getMonth()/3)+1}`;default:return Q("%m-%d")}})(),J=(()=>{switch(u){case"daily":return Math.min(10,f.dates.length);case"weekly":return Math.min(12,f.dates.length);case"monthly":return Math.min(12,f.dates.length);case"quarterly":return f.dates.length;default:return}})(),O=Ee(g).tickFormat(a=>$(a));u==="quarterly"?O.tickValues(o):J&&O.ticks(J);const we=s.append("g").attr("class",t.xAxis).attr("transform",`translate(0,${F})`).call(O);(u==="daily"||u==="weekly")&&we.selectAll("text").style("text-anchor","end").attr("dx","-.8em").attr("dy",".15em").attr("transform","rotate(-45)"),s.append("g").attr("class",t.yAxis).call(qe(i))},[f,C,B,F,y,k,W,T,v,u,_]);const ve=(e,s)=>{const o=new Date(e);switch(s){case"daily":return o.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});case"weekly":return new Date(o).setDate(o.getDate()+6),`Week of ${o.toLocaleDateString("en-US",{month:"short",day:"numeric"})}`;case"monthly":return o.toLocaleDateString("en-US",{month:"long",year:"numeric"});case"quarterly":return`Q${Math.floor(o.getMonth()/3)+1} ${o.getFullYear()}`;default:return e}},Me={daily:{Icon:Ce,label:"Daily"},weekly:{Icon:Le,label:"Weekly"},monthly:{Icon:Ie,label:"Monthly"},quarterly:{Icon:De,label:"Quarterly"}},xe=u!=="daily";return n.jsxs("div",{className:t.container,children:[!ge&&n.jsxs("div",{className:t.controls,children:[n.jsx("div",{className:t.viewToggle,children:fe.map(e=>{const{Icon:s,label:o}=Me[e];return n.jsxs("button",{className:`${t.viewButton} ${u===e?t.active:""}`,onClick:()=>ye(e),title:o,children:[n.jsx("span",{className:t.viewIcon,children:n.jsx(s,{size:16})}),n.jsx("span",{className:t.viewLabel,children:o})]},e)})}),xe&&n.jsxs("div",{className:t.aggregationToggle,children:[n.jsxs("button",{className:`${t.aggregationButton} ${q==="average"?t.active:""}`,onClick:()=>X("average"),title:"Show average values for each period",children:[n.jsx("span",{className:t.aggregationIcon,children:n.jsx(Ve,{size:16})}),n.jsx("span",{className:t.aggregationLabel,children:"Average"})]}),n.jsxs("button",{className:`${t.aggregationButton} ${q==="sum"?t.active:""}`,onClick:()=>X("sum"),title:"Show total values for each period",children:[n.jsx("span",{className:t.aggregationIcon,children:n.jsx(Re,{size:16})}),n.jsx("span",{className:t.aggregationLabel,children:"Sum"})]})]})]}),n.jsx("div",{className:`${t.legend}${pe?` ${t.compactLegend}`:""}`,children:S.map(e=>n.jsxs("button",{className:`${t.legendItem} ${C.includes(e)?"":t.inactive}`,onClick:()=>_e(e),onMouseEnter:()=>K(e),onMouseLeave:()=>K(null),children:[n.jsx("span",{className:t.legendEmoji,children:P[e]||"📊"}),n.jsx("span",{className:t.legendColor,style:{backgroundColor:T(e)}}),n.jsx("span",{className:t.legendLabel,children:e})]},e))}),n.jsx("svg",{ref:D,viewBox:`0 0 ${_} ${v}`,preserveAspectRatio:"xMidYMid meet",className:t.chart}),h&&n.jsxs("div",{ref:he,className:`${t.tooltip} ${h?t.visible:""}`,style:{left:`${h.x}px`,top:`${h.y-80}px`},children:[n.jsxs("div",{className:t.tooltipHeader,children:[n.jsx("span",{className:t.tooltipEmoji,children:P[h.habit]||"📊"}),n.jsx("span",{className:t.tooltipDot,style:{backgroundColor:T(h.habit)}}),n.jsx("span",{children:h.habit})]}),n.jsxs("div",{className:t.tooltipInfo,children:[n.jsx("div",{className:t.tooltipDate,children:ve(h.date,u)}),n.jsxs("div",{className:t.tooltipValue,children:[n.jsx("strong",{children:Math.round(h.value*10)/10}),n.jsx("span",{style:{fontSize:"12px",fontWeight:"normal",opacity:.6},children:"units"})]})]})]})]})};ue.__docgenInfo={description:"",methods:[],displayName:"QuantifiableHabitsChart",props:{data:{required:!0,tsType:{name:"ChartData"},description:""},width:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"800",computed:!1}},height:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}},defaultViewType:{required:!1,tsType:{name:"union",raw:"'daily' | 'weekly' | 'monthly' | 'quarterly'",elements:[{name:"literal",value:"'daily'"},{name:"literal",value:"'weekly'"},{name:"literal",value:"'monthly'"},{name:"literal",value:"'quarterly'"}]},description:"",defaultValue:{value:"'daily'",computed:!1}},periodType:{required:!1,tsType:{name:"union",raw:"'week' | 'month' | 'quarter' | 'year' | 'allTime'",elements:[{name:"literal",value:"'week'"},{name:"literal",value:"'month'"},{name:"literal",value:"'quarter'"},{name:"literal",value:"'year'"},{name:"literal",value:"'allTime'"}]},description:"",defaultValue:{value:"'month'",computed:!1}},habitColors:{required:!1,tsType:{name:"signature",type:"object",raw:"{ [key: string]: string }",signature:{properties:[{key:{name:"string"},value:{name:"string",required:!0}}]}},description:"",defaultValue:{value:"{}",computed:!1}},habitEmojis:{required:!1,tsType:{name:"signature",type:"object",raw:"{ [key: string]: string }",signature:{properties:[{key:{name:"string"},value:{name:"string",required:!0}}]}},description:"",defaultValue:{value:"{}",computed:!1}},onDataPointClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(habit: string, date: string, value: number) => void",signature:{arguments:[{type:{name:"string"},name:"habit"},{type:{name:"string"},name:"date"},{type:{name:"number"},name:"value"}],return:{name:"void"}}},description:""},hideControls:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},compactLegend:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}}}};const qt={title:"Organisms/Charts/QuantifiableHabitsChart",component:ue,parameters:{layout:"centered"},argTypes:{width:{control:{type:"number",min:400,max:1200,step:50}},height:{control:{type:"number",min:200,max:600,step:50}},defaultViewType:{control:{type:"select"},options:["daily","weekly","monthly","quarterly"]},periodType:{control:{type:"select"},options:["week","month","quarter","year","allTime"]}}},R=r=>{const _=[],v=new Date;for(let b=r-1;b>=0;b--){const w=new Date(v);w.setDate(w.getDate()-b),_.push(w.toISOString().split("T")[0])}return _},N={args:{data:(()=>{const r=R(30);return{dates:r,Exercise:r.map(()=>Math.floor(Math.random()*60)+20),Reading:r.map(()=>Math.floor(Math.random()*120)+30),Water:r.map(()=>Math.floor(Math.random()*8)+2),Steps:r.map(()=>Math.floor(Math.random()*15e3)+5e3)}})(),width:900,height:400,defaultViewType:"daily",periodType:"month",habitColors:{Exercise:"#10b981",Reading:"#8b5cf6",Water:"#3b82f6",Steps:"#f59e0b"},habitEmojis:{Exercise:"🏃",Reading:"📚",Water:"💧",Steps:"👟"}}},I={args:{data:(()=>{const r=R(90);return{dates:r,Meditation:r.map(()=>Math.floor(Math.random()*30)+10),Study:r.map(()=>Math.floor(Math.random()*180)+60),Sleep:r.map(()=>Math.floor(Math.random()*3)+6)}})(),width:900,height:400,defaultViewType:"weekly",periodType:"quarter",habitColors:{Meditation:"#a78bfa",Study:"#34d399",Sleep:"#60a5fa"},habitEmojis:{Meditation:"🧘",Study:"📖",Sleep:"😴"}}},A={args:{data:(()=>{const r=R(365);return{dates:r,Coding:r.map(()=>Math.floor(Math.random()*240)+120),Exercise:r.map(()=>Math.floor(Math.random()*90)+30),Learning:r.map(()=>Math.floor(Math.random()*120)+60),Socializing:r.map(()=>Math.floor(Math.random()*180)+60)}})(),width:1e3,height:450,defaultViewType:"monthly",periodType:"year",habitColors:{Coding:"#7c3aed",Exercise:"#10b981",Learning:"#f59e0b",Socializing:"#ec4899"},habitEmojis:{Coding:"💻",Exercise:"💪",Learning:"🎓",Socializing:"👥"}}},V={args:{data:(()=>{const r=R(30);return{dates:r,Weight:r.map((_,v)=>70+Math.sin(v/5)*2+Math.random())}})(),width:800,height:300,defaultViewType:"daily",periodType:"month",habitColors:{Weight:"#3b82f6"},habitEmojis:{Weight:"⚖️"}}};var ee,te,ae;N.parameters={...N.parameters,docs:{...(ee=N.parameters)==null?void 0:ee.docs,source:{originalSource:`{
|
|
22
|
+
args: {
|
|
23
|
+
data: (() => {
|
|
24
|
+
const dates = generateDateRange(30);
|
|
25
|
+
return {
|
|
26
|
+
dates,
|
|
27
|
+
Exercise: dates.map(() => Math.floor(Math.random() * 60) + 20),
|
|
28
|
+
Reading: dates.map(() => Math.floor(Math.random() * 120) + 30),
|
|
29
|
+
Water: dates.map(() => Math.floor(Math.random() * 8) + 2),
|
|
30
|
+
Steps: dates.map(() => Math.floor(Math.random() * 15000) + 5000)
|
|
31
|
+
};
|
|
32
|
+
})(),
|
|
33
|
+
width: 900,
|
|
34
|
+
height: 400,
|
|
35
|
+
defaultViewType: 'daily',
|
|
36
|
+
periodType: 'month',
|
|
37
|
+
habitColors: {
|
|
38
|
+
Exercise: '#10b981',
|
|
39
|
+
Reading: '#8b5cf6',
|
|
40
|
+
Water: '#3b82f6',
|
|
41
|
+
Steps: '#f59e0b'
|
|
42
|
+
},
|
|
43
|
+
habitEmojis: {
|
|
44
|
+
Exercise: '🏃',
|
|
45
|
+
Reading: '📚',
|
|
46
|
+
Water: '💧',
|
|
47
|
+
Steps: '👟'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}`,...(ae=(te=N.parameters)==null?void 0:te.docs)==null?void 0:ae.source}}};var ne,re,oe;I.parameters={...I.parameters,docs:{...(ne=I.parameters)==null?void 0:ne.docs,source:{originalSource:`{
|
|
51
|
+
args: {
|
|
52
|
+
data: (() => {
|
|
53
|
+
const dates = generateDateRange(90);
|
|
54
|
+
return {
|
|
55
|
+
dates,
|
|
56
|
+
Meditation: dates.map(() => Math.floor(Math.random() * 30) + 10),
|
|
57
|
+
Study: dates.map(() => Math.floor(Math.random() * 180) + 60),
|
|
58
|
+
Sleep: dates.map(() => Math.floor(Math.random() * 3) + 6)
|
|
59
|
+
};
|
|
60
|
+
})(),
|
|
61
|
+
width: 900,
|
|
62
|
+
height: 400,
|
|
63
|
+
defaultViewType: 'weekly',
|
|
64
|
+
periodType: 'quarter',
|
|
65
|
+
habitColors: {
|
|
66
|
+
Meditation: '#a78bfa',
|
|
67
|
+
Study: '#34d399',
|
|
68
|
+
Sleep: '#60a5fa'
|
|
69
|
+
},
|
|
70
|
+
habitEmojis: {
|
|
71
|
+
Meditation: '🧘',
|
|
72
|
+
Study: '📖',
|
|
73
|
+
Sleep: '😴'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}`,...(oe=(re=I.parameters)==null?void 0:re.docs)==null?void 0:oe.source}}};var se,ie,le;A.parameters={...A.parameters,docs:{...(se=A.parameters)==null?void 0:se.docs,source:{originalSource:`{
|
|
77
|
+
args: {
|
|
78
|
+
data: (() => {
|
|
79
|
+
const dates = generateDateRange(365);
|
|
80
|
+
return {
|
|
81
|
+
dates,
|
|
82
|
+
Coding: dates.map(() => Math.floor(Math.random() * 240) + 120),
|
|
83
|
+
Exercise: dates.map(() => Math.floor(Math.random() * 90) + 30),
|
|
84
|
+
Learning: dates.map(() => Math.floor(Math.random() * 120) + 60),
|
|
85
|
+
Socializing: dates.map(() => Math.floor(Math.random() * 180) + 60)
|
|
86
|
+
};
|
|
87
|
+
})(),
|
|
88
|
+
width: 1000,
|
|
89
|
+
height: 450,
|
|
90
|
+
defaultViewType: 'monthly',
|
|
91
|
+
periodType: 'year',
|
|
92
|
+
habitColors: {
|
|
93
|
+
Coding: '#7c3aed',
|
|
94
|
+
Exercise: '#10b981',
|
|
95
|
+
Learning: '#f59e0b',
|
|
96
|
+
Socializing: '#ec4899'
|
|
97
|
+
},
|
|
98
|
+
habitEmojis: {
|
|
99
|
+
Coding: '💻',
|
|
100
|
+
Exercise: '💪',
|
|
101
|
+
Learning: '🎓',
|
|
102
|
+
Socializing: '👥'
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}`,...(le=(ie=A.parameters)==null?void 0:ie.docs)==null?void 0:le.source}}};var ce,de,me;V.parameters={...V.parameters,docs:{...(ce=V.parameters)==null?void 0:ce.docs,source:{originalSource:`{
|
|
106
|
+
args: {
|
|
107
|
+
data: (() => {
|
|
108
|
+
const dates = generateDateRange(30);
|
|
109
|
+
return {
|
|
110
|
+
dates,
|
|
111
|
+
Weight: dates.map((_, i) => 70 + Math.sin(i / 5) * 2 + Math.random())
|
|
112
|
+
};
|
|
113
|
+
})(),
|
|
114
|
+
width: 800,
|
|
115
|
+
height: 300,
|
|
116
|
+
defaultViewType: 'daily',
|
|
117
|
+
periodType: 'month',
|
|
118
|
+
habitColors: {
|
|
119
|
+
Weight: '#3b82f6'
|
|
120
|
+
},
|
|
121
|
+
habitEmojis: {
|
|
122
|
+
Weight: '⚖️'
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}`,...(me=(de=V.parameters)==null?void 0:de.docs)==null?void 0:me.source}}};const $t=["DailyHabits","WeeklyAverages","YearlyOverview","SingleHabit"];export{N as DailyHabits,V as SingleHabit,I as WeeklyAverages,A as YearlyOverview,$t as __namedExportsOrder,qt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as y,j as W}from"./iframe-
|
|
1
|
+
import{r as y,j as W}from"./iframe-DKgP8ePJ.js";import{R as D,P as G,M as U}from"./Mesh-CwXV3WjE.js";import{T as z}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const j={"radar-container":"_radar-container_51ksp_1"};function L(n){const o=n.replace("#","");return[parseInt(o.slice(0,2),16)/255,parseInt(o.slice(2,4),16)/255,parseInt(o.slice(4,6),16)/255]}const N=`
|
|
2
2
|
attribute vec2 uv;
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
varying vec2 vUv;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as D,j as X}from"./iframe-
|
|
1
|
+
import{r as D,j as X}from"./iframe-DKgP8ePJ.js";import{G as Y,P as $,M as J,V as m,R as K,T as Q}from"./Mesh-CwXV3WjE.js";import{V as Z}from"./Vec2-Cf1C3GIc.js";import{C as j}from"./Color-YRkaOI4u.js";import"./preload-helper-C1FmrZbK.js";const v=new m;class ee{constructor(o,{points:t,vertex:w=te,fragment:E=oe,uniforms:r={},attributes:R={}}){this.gl=o,this.points=t,this.count=t.length,this.position=new Float32Array(this.count*3*2),this.prev=new Float32Array(this.count*3*2),this.next=new Float32Array(this.count*3*2);const h=new Float32Array(this.count*1*2),y=new Float32Array(this.count*2*2),p=new Uint16Array((this.count-1)*3*2);for(let l=0;l<this.count;l++){h.set([-1,1],l*2);const n=l/(this.count-1);if(y.set([0,n,1,n],l*4),l===this.count-1)continue;const s=l*2;p.set([s+0,s+1,s+2],(s+0)*3),p.set([s+2,s+1,s+3],(s+1)*3)}const A=this.geometry=new Y(o,Object.assign(R,{position:{size:3,data:this.position},prev:{size:3,data:this.prev},next:{size:3,data:this.next},side:{size:1,data:h},uv:{size:2,data:y},index:{size:1,data:p}}));this.updateGeometry(),r.uResolution||(this.resolution=r.uResolution={value:new Z}),r.uDPR||(this.dpr=r.uDPR={value:1}),r.uThickness||(this.thickness=r.uThickness={value:1}),r.uColor||(this.color=r.uColor={value:new j("#000")}),r.uMiter||(this.miter=r.uMiter={value:1}),this.resize();const u=this.program=new $(o,{vertex:w,fragment:E,uniforms:r});this.mesh=new J(o,{geometry:A,program:u})}updateGeometry(){this.points.forEach((o,t)=>{o.toArray(this.position,t*3*2),o.toArray(this.position,t*3*2+3),t?(o.toArray(this.next,(t-1)*3*2),o.toArray(this.next,(t-1)*3*2+3)):(v.copy(o).sub(this.points[t+1]).add(o),v.toArray(this.prev,t*3*2),v.toArray(this.prev,t*3*2+3)),t===this.points.length-1?(v.copy(o).sub(this.points[t-1]).add(o),v.toArray(this.next,t*3*2),v.toArray(this.next,t*3*2+3)):(o.toArray(this.prev,(t+1)*3*2),o.toArray(this.prev,(t+1)*3*2+3))}),this.geometry.attributes.position.needsUpdate=!0,this.geometry.attributes.prev.needsUpdate=!0,this.geometry.attributes.next.needsUpdate=!0}resize(){this.resolution&&this.resolution.value.set(this.gl.canvas.width,this.gl.canvas.height),this.dpr&&(this.dpr.value=this.gl.renderer.dpr)}}const te=`
|
|
2
2
|
precision highp float;
|
|
3
3
|
|
|
4
4
|
attribute vec3 position;
|
package/storybook-static/assets/{RippleGrid.stories-DUv5tTLR.js → RippleGrid.stories-CZD_7q7X.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,j as N}from"./iframe-
|
|
1
|
+
import{r as u,j as N}from"./iframe-DKgP8ePJ.js";import{R as G,P as j,M as H}from"./Mesh-CwXV3WjE.js";import{T as $}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const O={"ripple-grid-container":"_ripple-grid-container_1783h_1"},P=({enableRainbow:d=!1,gridColor:v="#ffffff",rippleIntensity:m=.05,gridSize:p=10,gridThickness:g=15,fadeDistance:h=1.5,vignetteStrength:R=2,glowIntensity:y=.1,opacity:x=1,gridRotation:I=0,mouseInteraction:i=!0,mouseInteractionRadius:w=1})=>{const r=u.useRef(null),l=u.useRef({x:.5,y:.5}),T=u.useRef({x:.5,y:.5}),b=u.useRef(0),n=u.useRef(null);return u.useEffect(()=>{if(!r.current)return;const E=o=>{const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o);return t?[parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255]:[1,1,1]},c=new G({dpr:Math.min(window.devicePixelRatio,2),alpha:!0}),e=c.gl;e.enable(e.BLEND),e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA),e.canvas.style.width="100%",e.canvas.style.height="100%",r.current.appendChild(e.canvas);const z=`
|
|
2
2
|
attribute vec2 position;
|
|
3
3
|
varying vec2 vUv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as s,j as c}from"./iframe-
|
|
1
|
+
import{r as s,j as c}from"./iframe-DKgP8ePJ.js";import{m as C}from"./proxy-BowLazAQ.js";import{A as Q}from"./index-C-qIoU0_.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext--4MeZeHl.js";const i={"text-rotate":"_text-rotate_1n8cd_1","text-rotate-sr-only":"_text-rotate-sr-only_1n8cd_8","text-rotate-word":"_text-rotate-word_1n8cd_20","text-rotate-lines":"_text-rotate-lines_1n8cd_24","text-rotate-element":"_text-rotate-element_1n8cd_30","text-rotate-space":"_text-rotate-space_1n8cd_34"};function h(...y){return y.filter(Boolean).join(" ")}const v=s.forwardRef((y,D)=>{const{texts:o,transition:N={type:"spring",damping:25,stiffness:300},initial:w={y:"100%",opacity:0},animate:A={y:0,opacity:1},exit:E={y:"-120%",opacity:0},animatePresenceMode:F="wait",animatePresenceInitial:H=!1,rotationInterval:j=2e3,staggerDuration:m=0,staggerFrom:u="first",loop:d=!0,auto:M=!0,splitBy:p="characters",onNext:_,mainClassName:P,splitLevelClassName:L,elementLevelClassName:W,...$}=y,[e,q]=s.useState(0),z=t=>{if(typeof Intl<"u"&&Intl.Segmenter){const a=new Intl.Segmenter("en",{granularity:"grapheme"});return Array.from(a.segment(t),r=>r.segment)}return Array.from(t)},G=s.useMemo(()=>{const t=o[e];if(p==="characters"){const a=t.split(" ");return a.map((r,n)=>({characters:z(r),needsSpace:n!==a.length-1}))}return p==="words"?t.split(" ").map((a,r,n)=>({characters:[a],needsSpace:r!==n.length-1})):p==="lines"?t.split(`
|
|
2
2
|
`).map((a,r,n)=>({characters:[a],needsSpace:r!==n.length-1})):t.split(p).map((a,r,n)=>({characters:[a],needsSpace:r!==n.length-1}))},[o,e,p]),J=s.useCallback((t,a)=>{const r=a;if(u==="first")return t*m;if(u==="last")return(r-1-t)*m;if(u==="center"){const n=Math.floor(r/2);return Math.abs(n-t)*m}if(u==="random"){const n=Math.floor(Math.random()*r);return Math.abs(n-t)*m}return Math.abs(u-t)*m},[u,m]),l=s.useCallback(t=>{q(t),_&&_(t)},[_]),x=s.useCallback(()=>{const t=e===o.length-1?d?0:e:e+1;t!==e&&l(t)},[e,o.length,d,l]),S=s.useCallback(()=>{const t=e===0?d?o.length-1:e:e-1;t!==e&&l(t)},[e,o.length,d,l]),R=s.useCallback(t=>{const a=Math.max(0,Math.min(t,o.length-1));a!==e&&l(a)},[o.length,e,l]),T=s.useCallback(()=>{e!==0&&l(0)},[e,l]);return s.useImperativeHandle(D,()=>({next:x,previous:S,jumpTo:R,reset:T}),[x,S,R,T]),s.useEffect(()=>{if(!M)return;const t=setInterval(x,j);return()=>clearInterval(t)},[x,j,M]),c.jsxs(C.span,{className:h(i["text-rotate"],P),...$,layout:!0,transition:N,children:[c.jsx("span",{className:`${i["text-rotate-sr-only"]}`,children:o[e]}),c.jsx(Q,{mode:F,initial:H,children:c.jsx(C.span,{className:h(p==="lines"?i["text-rotate-lines"]:i["text-rotate"]),layout:!0,"aria-hidden":"true",children:G.map((t,a,r)=>{const n=r.slice(0,a).reduce((I,g)=>I+g.characters.length,0);return c.jsxs("span",{className:h(i["text-rotate-word"],L),children:[t.characters.map((I,g)=>c.jsx(C.span,{initial:w,animate:A,exit:E,transition:{...N,delay:J(n+g,r.reduce((K,O)=>K+O.characters.length,0))},className:h(i["text-rotate-element"],W),children:I},g)),t.needsSpace&&c.jsx("span",{className:`${i["text-rotate-space"]}`,children:" "})]},a)})},e)})]})});v.displayName="RotatingText";v.__docgenInfo={description:"",methods:[],displayName:"RotatingText"};const tt={title:"ReactBits/TextAnimations/RotatingText",component:v,parameters:{layout:"fullscreen"}},f={args:{texts:["Hello","World","React","Bits"],rotationInterval:2e3,loop:!0,auto:!0,splitBy:"characters",staggerDuration:0,staggerFrom:"first"}};var b,B,k;f.parameters={...f.parameters,docs:{...(b=f.parameters)==null?void 0:b.docs,source:{originalSource:`{
|
|
3
3
|
args: {
|
|
4
4
|
texts: ['Hello', 'World', 'React', 'Bits'],
|
package/storybook-static/assets/{ScrollFloat.stories-BAQkGt4u.js → ScrollFloat.stories-DpRyGAoK.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as s,j as c}from"./iframe-
|
|
1
|
+
import{r as s,j as c}from"./iframe-DKgP8ePJ.js";import{g as _}from"./index-C8pce-KX.js";import{S as q}from"./ScrollTrigger-D1XJUMov.js";import"./preload-helper-C1FmrZbK.js";const v="_char_46mmt_13",n={"scroll-float":"_scroll-float_46mmt_1","scroll-float-text":"_scroll-float-text_46mmt_5",char:v};_.registerPlugin(q);const h=({children:l,scrollContainerRef:e,containerClassName:S="",textClassName:y="",animationDuration:u=1,ease:m="back.inOut(2)",scrollStart:i="center bottom+=50%",scrollEnd:f="bottom bottom-=40%",stagger:d=.03})=>{const p=s.useRef(null),N=s.useMemo(()=>(typeof l=="string"?l:"").split("").map((a,o)=>c.jsx("span",{className:`${n.char}`,children:a===" "?" ":a},o)),[l]);return s.useEffect(()=>{const t=p.current;if(!t)return;const a=e&&e.current?e.current:window,o=t.querySelectorAll(".char");_.fromTo(o,{willChange:"opacity, transform",opacity:0,yPercent:120,scaleY:2.3,scaleX:.7,transformOrigin:"50% 0%"},{duration:u,ease:m,opacity:1,yPercent:0,scaleY:1,scaleX:1,stagger:d,scrollTrigger:{trigger:t,scroller:a,start:i,end:f,scrub:!0}})},[e,u,m,i,f,d]),c.jsx("h2",{ref:p,className:`${n["scroll-float"]} ${S}`,children:c.jsx("span",{className:`${n["scroll-float-text"]} ${y}`,children:N})})};h.__docgenInfo={description:"",methods:[],displayName:"ScrollFloat",props:{containerClassName:{defaultValue:{value:"''",computed:!1},required:!1},textClassName:{defaultValue:{value:"''",computed:!1},required:!1},animationDuration:{defaultValue:{value:"1",computed:!1},required:!1},ease:{defaultValue:{value:"'back.inOut(2)'",computed:!1},required:!1},scrollStart:{defaultValue:{value:"'center bottom+=50%'",computed:!1},required:!1},scrollEnd:{defaultValue:{value:"'bottom bottom-=40%'",computed:!1},required:!1},stagger:{defaultValue:{value:"0.03",computed:!1},required:!1}}};const C={title:"ReactBits/TextAnimations/ScrollFloat",component:h,parameters:{layout:"fullscreen"}},r={args:{children:"Hello World",containerClassName:"",textClassName:"",animationDuration:1,ease:"back.inOut(2)",scrollStart:"center bottom+=50%",scrollEnd:"bottom bottom-=40%",stagger:.03}};var g,x,b;r.parameters={...r.parameters,docs:{...(g=r.parameters)==null?void 0:g.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
children: 'Hello World',
|
|
4
4
|
containerClassName: '',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,j as c}from"./iframe-
|
|
1
|
+
import{r as u,j as c}from"./iframe-DKgP8ePJ.js";import{g as l}from"./index-C8pce-KX.js";import{S as _}from"./ScrollTrigger-D1XJUMov.js";import"./preload-helper-C1FmrZbK.js";const T="_word_1yrz7_11",m={"scroll-reveal":"_scroll-reveal_1yrz7_1","scroll-reveal-text":"_scroll-reveal-text_1yrz7_5",word:T};l.registerPlugin(_);const h=({children:s,scrollContainerRef:r,enableBlur:i=!0,baseOpacity:d=.1,baseRotation:f=3,blurStrength:p=4,containerClassName:S="",textClassName:N="",rotationEnd:b="bottom bottom",wordAnimationEnd:n="bottom bottom"})=>{const g=u.useRef(null),q=u.useMemo(()=>(typeof s=="string"?s:"").split(/(\s+)/).map((t,o)=>t.match(/^\s+$/)?t:c.jsx("span",{className:`${m.word}`,children:t},o)),[s]);return u.useEffect(()=>{const e=g.current;if(!e)return;const t=r&&r.current?r.current:window;l.fromTo(e,{transformOrigin:"0% 50%",rotate:f},{ease:"none",rotate:0,scrollTrigger:{trigger:e,scroller:t,start:"top bottom",end:b,scrub:!0}});const o=e.querySelectorAll(".word");return l.fromTo(o,{opacity:d,willChange:"opacity"},{ease:"none",opacity:1,stagger:.05,scrollTrigger:{trigger:e,scroller:t,start:"top bottom-=20%",end:n,scrub:!0}}),i&&l.fromTo(o,{filter:`blur(${p}px)`},{ease:"none",filter:"blur(0px)",stagger:.05,scrollTrigger:{trigger:e,scroller:t,start:"top bottom-=20%",end:n,scrub:!0}}),()=>{_.getAll().forEach(E=>E.kill())}},[r,i,f,d,b,n,p]),c.jsx("h2",{ref:g,className:`${m["scroll-reveal"]} ${S}`,children:c.jsx("p",{className:`${m["scroll-reveal-text"]} ${N}`,children:q})})};h.__docgenInfo={description:"",methods:[],displayName:"ScrollReveal",props:{enableBlur:{defaultValue:{value:"true",computed:!1},required:!1},baseOpacity:{defaultValue:{value:"0.1",computed:!1},required:!1},baseRotation:{defaultValue:{value:"3",computed:!1},required:!1},blurStrength:{defaultValue:{value:"4",computed:!1},required:!1},containerClassName:{defaultValue:{value:"''",computed:!1},required:!1},textClassName:{defaultValue:{value:"''",computed:!1},required:!1},rotationEnd:{defaultValue:{value:"'bottom bottom'",computed:!1},required:!1},wordAnimationEnd:{defaultValue:{value:"'bottom bottom'",computed:!1},required:!1}}};const j={title:"ReactBits/TextAnimations/ScrollReveal",component:h,parameters:{layout:"fullscreen"}},a={args:{children:"Hello World",enableBlur:!0,baseOpacity:.1,baseRotation:3,blurStrength:4,containerClassName:"",textClassName:"",rotationEnd:"bottom bottom",wordAnimationEnd:"bottom bottom"}};var x,v,y;a.parameters={...a.parameters,docs:{...(x=a.parameters)==null?void 0:x.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
children: 'Hello World',
|
|
4
4
|
enableBlur: true,
|