@stfrigerio/sito-template 0.1.70 → 0.1.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/organisms/Navbar/Navbar.d.ts +3 -3
- package/dist/components/organisms/Navbar/Navbar.d.ts.map +1 -1
- package/dist/index.esm.js +11 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/storybook-static/assets/{ASCIIText.stories-C_E6WqxJ.js → ASCIIText.stories-BJyiZESR.js} +1 -1
- package/storybook-static/assets/{AllAtoms.stories-D8lJdJTn.js → AllAtoms.stories-CgOD8m3f.js} +1 -1
- package/storybook-static/assets/{AnimatedContent.stories-1MCKn7I6.js → AnimatedContent.stories-DH-SARB9.js} +1 -1
- package/storybook-static/assets/{AnimatedList.stories-w6ygU4Y7.js → AnimatedList.stories-Ry_skUA3.js} +1 -1
- package/storybook-static/assets/{Antigravity.stories-DZHkPI5n.js → Antigravity.stories-BicJnuw8.js} +1 -1
- package/storybook-static/assets/{ArrayInput.stories-DF18RFAN.js → ArrayInput.stories-DYpCCBNb.js} +1 -1
- package/storybook-static/assets/{Aurora.stories-BPN0g1t_.js → Aurora.stories-DPq2ByaS.js} +1 -1
- package/storybook-static/assets/{Beams.stories-ubs6iIVw.js → Beams.stories-C-BOpddV.js} +1 -1
- package/storybook-static/assets/{BlobCursor.stories-Dt1hw7VD.js → BlobCursor.stories-DD-byYja.js} +1 -1
- package/storybook-static/assets/{BlurText.stories-BDfVmthS.js → BlurText.stories-CI-bIIKc.js} +1 -1
- package/storybook-static/assets/{BooleansHeatmap.stories-CNi01fQ3.js → BooleansHeatmap.stories-CEV0eftd.js} +1 -1
- package/storybook-static/assets/{BorderGlow.stories-4blQ2ZIG.js → BorderGlow.stories-BE-ilp94.js} +1 -1
- package/storybook-static/assets/{BubbleMenu.stories-BUUKSmxc.js → BubbleMenu.stories-D30td5QP.js} +1 -1
- package/storybook-static/assets/{Button-uch7JY56.js → Button-B8IhEFx4.js} +1 -1
- package/storybook-static/assets/{Button.stories-CPmDlHTx.js → Button.stories-DE36U0Qh.js} +1 -1
- package/storybook-static/assets/{Calendar.stories-C9kS2wiY.js → Calendar.stories-BgzQTcGv.js} +1 -1
- package/storybook-static/assets/{Card-BxSWq2cL.js → Card-BBPiO_B4.js} +1 -1
- package/storybook-static/assets/{Card.stories-BKs5mVhX.js → Card.stories-TNOJS00N.js} +1 -1
- package/storybook-static/assets/{CardNav.stories-Ddif7_C1.js → CardNav.stories-t1Bp6iKB.js} +1 -1
- package/storybook-static/assets/{Carousel.stories-gSjQQSmh.js → Carousel.stories-D3TV54aM.js} +1 -1
- package/storybook-static/assets/{Checkbox-BVAPRb3Q.js → Checkbox-5p-zbzmi.js} +1 -1
- package/storybook-static/assets/{Checkbox.stories-CYjBSXuM.js → Checkbox.stories-8znsCJhi.js} +1 -1
- package/storybook-static/assets/{ChromaGrid.stories-4xdtpP-B.js → ChromaGrid.stories-o3p8Qdx1.js} +1 -1
- package/storybook-static/assets/{CircularGallery.stories-dooaosfS.js → CircularGallery.stories-BEcnb56N.js} +1 -1
- package/storybook-static/assets/{CircularText.stories-Ce3HMpST.js → CircularText.stories-Cac0HQ7O.js} +1 -1
- package/storybook-static/assets/{ClickSpark.stories-CjPkNaGv.js → ClickSpark.stories-DS6RKm32.js} +1 -1
- package/storybook-static/assets/{ColorBends.stories-DX0xyvYg.js → ColorBends.stories-BLXOpDDP.js} +1 -1
- package/storybook-static/assets/{CountUp.stories-BPoymL8y.js → CountUp.stories-D0hVlNjf.js} +1 -1
- package/storybook-static/assets/{Counter.stories-DMp-XD93.js → Counter.stories-D-AgJaFb.js} +1 -1
- package/storybook-static/assets/{Crosshair.stories-D_JpnLW9.js → Crosshair.stories-DuRxpkAA.js} +1 -1
- package/storybook-static/assets/{Cubes.stories-gzAXJlGV.js → Cubes.stories-B2K-6Pv7.js} +1 -1
- package/storybook-static/assets/{CurvedLoop.stories-8hR8H1td.js → CurvedLoop.stories-EBWj-ut7.js} +1 -1
- package/storybook-static/assets/{DarkVeil.stories-VUvmquu3.js → DarkVeil.stories-BJfxCPIF.js} +1 -1
- package/storybook-static/assets/{DateInput-BC6xkFXH.js → DateInput-Bl7y2Kqk.js} +1 -1
- package/storybook-static/assets/{DateInput.stories-T6dG31fY.js → DateInput.stories-C2Lar4bv.js} +1 -1
- package/storybook-static/assets/{DecayCard.stories-BLXv-ZNv.js → DecayCard.stories-DS3y0loD.js} +1 -1
- package/storybook-static/assets/{DecryptedText.stories-DqrfDBWU.js → DecryptedText.stories-B5vYLMUi.js} +1 -1
- package/storybook-static/assets/{Dither.stories-CyDQQ-cj.js → Dither.stories-CmPrb3rv.js} +1 -1
- package/storybook-static/assets/{Dock.stories-BGGuhOa7.js → Dock.stories-CakFuVyb.js} +1 -1
- package/storybook-static/assets/{EditFAB.stories-mFxP6Rx5.js → EditFAB.stories-CFhxg94J.js} +1 -1
- package/storybook-static/assets/{EvilEye.stories-y5orXwZp.js → EvilEye.stories-BleX83nU.js} +1 -1
- package/storybook-static/assets/{FadeContent.stories-DJGMs8n6.js → FadeContent.stories-D2-4qOlC.js} +1 -1
- package/storybook-static/assets/{FaultyTerminal.stories-C40zFzGr.js → FaultyTerminal.stories-CFARBPp4.js} +1 -1
- package/storybook-static/assets/{Fbo-DbNnD30i.js → Fbo-CfnU58r6.js} +1 -1
- package/storybook-static/assets/{FloatingLines.stories-1U_DUdVr.js → FloatingLines.stories-Bc0U4qae.js} +1 -1
- package/storybook-static/assets/{FlowingMenu.stories-CyKsv1eM.js → FlowingMenu.stories-BKmUrbe6.js} +1 -1
- package/storybook-static/assets/{FluidGlass.stories-C1lSPoT2.js → FluidGlass.stories-BLJOG8Vu.js} +1 -1
- package/storybook-static/assets/{Folder.stories-CDXA39jz.js → Folder.stories-Cxdi_wWi.js} +1 -1
- package/storybook-static/assets/{FuzzyText.stories-DQSEGdvt.js → FuzzyText.stories-CUpUQ6nZ.js} +1 -1
- package/storybook-static/assets/{Galaxy.stories-DSxKFUB9.js → Galaxy.stories-D7DFTFa9.js} +1 -1
- package/storybook-static/assets/{GhostCursor.stories-Z2MpLzNi.js → GhostCursor.stories-7NVzAeAI.js} +1 -1
- package/storybook-static/assets/{GlareHover.stories-BBWmITwI.js → GlareHover.stories-DZiYzLd8.js} +1 -1
- package/storybook-static/assets/{GlassSurface.stories-HqlP3046.js → GlassSurface.stories-CGVfI4xp.js} +1 -1
- package/storybook-static/assets/{GlitchText.stories-Bc0GvHEP.js → GlitchText.stories-DHeDmX4A.js} +1 -1
- package/storybook-static/assets/{GooeyNav.stories-_XjSiVnG.js → GooeyNav.stories-CM8SswAh.js} +1 -1
- package/storybook-static/assets/{GradientBlinds.stories-Duc81Yzz.js → GradientBlinds.stories-dLv1UfQ7.js} +1 -1
- package/storybook-static/assets/{GradientText.stories-DGiaXX2s.js → GradientText.stories-1BJgOxi2.js} +1 -1
- package/storybook-static/assets/{Grainient.stories-C9vqiJGI.js → Grainient.stories-CzG5cjll.js} +1 -1
- package/storybook-static/assets/{GridMotion.stories-DLgDYVV2.js → GridMotion.stories-ItIwnA44.js} +1 -1
- package/storybook-static/assets/{ImageSlideshow.stories-C6_x9V7u.js → ImageSlideshow.stories-C-_yjmyr.js} +1 -1
- package/storybook-static/assets/{Iridescence.stories-CBLnLp2l.js → Iridescence.stories-B1aSL1Oh.js} +1 -1
- package/storybook-static/assets/{LaserFlow.stories-C3j_ezx0.js → LaserFlow.stories-CRvKzX4a.js} +1 -1
- package/storybook-static/assets/{LetterGlitch.stories-C1rHsKFl.js → LetterGlitch.stories-iTeRYMuB.js} +1 -1
- package/storybook-static/assets/{LightPillar.stories-DbjodoLB.js → LightPillar.stories-XpkpeiMs.js} +1 -1
- package/storybook-static/assets/{LightRays.stories-DDHe8yfJ.js → LightRays.stories-lQANYMqj.js} +1 -1
- package/storybook-static/assets/{Lightning.stories-tB2HMHJB.js → Lightning.stories-ChKmI-y_.js} +1 -1
- package/storybook-static/assets/{LineWaves.stories-DDmhQ9-t.js → LineWaves.stories-DhGVNsQB.js} +1 -1
- package/storybook-static/assets/{LiquidChrome.stories-DOa34fSW.js → LiquidChrome.stories-CnkZ7Wr3.js} +1 -1
- package/storybook-static/assets/{LiquidEther.stories-qhsehmnf.js → LiquidEther.stories-BU1_utEW.js} +1 -1
- package/storybook-static/assets/{LoadingSpinner-BtBznxh9.js → LoadingSpinner-j8Mi9qAD.js} +1 -1
- package/storybook-static/assets/{LoadingSpinner.stories-CNrQ1WiW.js → LoadingSpinner.stories-D_3FCjkK.js} +1 -1
- package/storybook-static/assets/{MagicRings.stories-DZ8XGVv4.js → MagicRings.stories-mxBWDoWy.js} +1 -1
- package/storybook-static/assets/{Magnet.stories-DBL4qHfL.js → Magnet.stories-Dz0t_1eS.js} +1 -1
- package/storybook-static/assets/{MagnetLines.stories-Bidfr_ca.js → MagnetLines.stories-Jy4OaYyY.js} +1 -1
- package/storybook-static/assets/{Masonry.stories-DkVLMmLH.js → Masonry.stories-BRjBN5H3.js} +1 -1
- package/storybook-static/assets/{MetaBalls.stories-D6MWipzC.js → MetaBalls.stories-Dfk1k_wH.js} +1 -1
- package/storybook-static/assets/{MetallicPaint.stories-DG1EtEMU.js → MetallicPaint.stories-C1bMxsZM.js} +1 -1
- package/storybook-static/assets/{MoodChart.stories-iGdMNMJG.js → MoodChart.stories-C324AbEU.js} +1 -1
- package/storybook-static/assets/{MotionConfigContext-BXIi7eTZ.js → MotionConfigContext-BgQoFUhc.js} +1 -1
- package/storybook-static/assets/Navbar.stories-sGOUKXXC.js +186 -0
- package/storybook-static/assets/{Noise.stories-2goO9Ul4.js → Noise.stories-_7O9uBP8.js} +1 -1
- package/storybook-static/assets/{NumberStepper-JJY8AcOp.js → NumberStepper-DMw68Bdj.js} +1 -1
- package/storybook-static/assets/{NumberStepper.stories-BJLlVeII.js → NumberStepper.stories-C34Q1o9V.js} +1 -1
- package/storybook-static/assets/{Orb.stories-CKKMi-n0.js → Orb.stories-Dy5JbOzp.js} +1 -1
- package/storybook-static/assets/{OrbitImages.stories-DQTkMJn7.js → OrbitImages.stories-FfsyN9Iu.js} +1 -1
- package/storybook-static/assets/{PieChart.stories-yitBZH9x.js → PieChart.stories-OHDVp0RT.js} +1 -1
- package/storybook-static/assets/{PixelBlast.stories-dJscYPyq.js → PixelBlast.stories-DFKSutAz.js} +1 -1
- package/storybook-static/assets/{PixelCard.stories-ij7FVMCW.js → PixelCard.stories-CTsY_vyI.js} +1 -1
- package/storybook-static/assets/{PixelSnow.stories-BUlc0kvh.js → PixelSnow.stories-BlJBcWYF.js} +1 -1
- package/storybook-static/assets/{PixelTransition.stories-BNWF1s0R.js → PixelTransition.stories-CmBbK0DM.js} +1 -1
- package/storybook-static/assets/{Plasma.stories-DnqX3vNg.js → Plasma.stories-QX3D_L78.js} +1 -1
- package/storybook-static/assets/{Prism.stories-RXFgP8aP.js → Prism.stories-D48sGYp7.js} +1 -1
- package/storybook-static/assets/{PrismaticBurst.stories-DGNxT3yA.js → PrismaticBurst.stories-Dn2F2mIk.js} +1 -1
- package/storybook-static/assets/{ProfileCard.stories-Ducnp-DW.js → ProfileCard.stories-Ct8ww3Sq.js} +1 -1
- package/storybook-static/assets/QuantifiableHabitsChart.stories-DuL527Qx.js +105 -0
- package/storybook-static/assets/{Radar.stories-TrMmskY8.js → Radar.stories-ClTlR1N5.js} +1 -1
- package/storybook-static/assets/{Ribbons.stories-DGwiZRwa.js → Ribbons.stories-R7WgM-S8.js} +1 -1
- package/storybook-static/assets/{RippleGrid.stories-BSopsuMf.js → RippleGrid.stories-DhMFo-nj.js} +1 -1
- package/storybook-static/assets/{RotatingText.stories-CZoIe5qR.js → RotatingText.stories-BDF0Yr7Z.js} +1 -1
- package/storybook-static/assets/{ScrollFloat.stories-IF370Uy4.js → ScrollFloat.stories-Cyf50ogn.js} +1 -1
- package/storybook-static/assets/{ScrollReveal.stories-Dy-YdgA8.js → ScrollReveal.stories-DzCw2cHi.js} +1 -1
- package/storybook-static/assets/{ScrollVelocity.stories-CjusnkdK.js → ScrollVelocity.stories-BofLpgQE.js} +1 -1
- package/storybook-static/assets/{SearchBar.stories-CeWR-VB-.js → SearchBar.stories-B5r2LH16.js} +1 -1
- package/storybook-static/assets/{SearchableDropdown-BADpPZr1.js → SearchableDropdown-B6k12izZ.js} +1 -1
- package/storybook-static/assets/{SearchableDropdown.stories-Cgc4rmWZ.js → SearchableDropdown.stories-Bopbhioo.js} +1 -1
- package/storybook-static/assets/{SelectInput-CswpADYV.js → SelectInput-DRue6-AH.js} +1 -1
- package/storybook-static/assets/{SelectInput.stories-ClYBlN6U.js → SelectInput.stories-BTJwfB38.js} +1 -1
- package/storybook-static/assets/{ShapeBlur.stories-B_L5VhM5.js → ShapeBlur.stories-DT3G8P3a.js} +1 -1
- package/storybook-static/assets/{ShapeGrid.stories-DC-f9XqR.js → ShapeGrid.stories-DlmncXQS.js} +1 -1
- package/storybook-static/assets/{ShinyText.stories-C5ZWDPil.js → ShinyText.stories-D2oMmZfL.js} +1 -1
- package/storybook-static/assets/{Silk.stories-36M9ny-0.js → Silk.stories-Dxqi0p3h.js} +1 -1
- package/storybook-static/assets/{SleepChart.stories-DMip2F7M.js → SleepChart.stories-DotKmS0C.js} +1 -1
- package/storybook-static/assets/{Slider-Bl1AxV21.js → Slider-DeiM0g6-.js} +1 -1
- package/storybook-static/assets/{Slider.stories-Cvb0Ju23.js → Slider.stories-D88AA3EG.js} +1 -1
- package/storybook-static/assets/{SoftAurora.stories-CKaklsBm.js → SoftAurora.stories-BEnpasA2.js} +1 -1
- package/storybook-static/assets/{SoundDemo.stories-DiEwtAfr.js → SoundDemo.stories-C11x2srG.js} +1 -1
- package/storybook-static/assets/{SplashCursor.stories-D2OETUPL.js → SplashCursor.stories-Cwszrlxd.js} +1 -1
- package/storybook-static/assets/{SpotlightCard.stories-C7WyfqaK.js → SpotlightCard.stories-DCt3hEip.js} +1 -1
- package/storybook-static/assets/{Stack.stories-B8874Tf2.js → Stack.stories-By_aMVjW.js} +1 -1
- package/storybook-static/assets/{StaggeredMenu.stories-wu5smfUg.js → StaggeredMenu.stories-eF4uJ1MS.js} +1 -1
- package/storybook-static/assets/{StarBorder.stories-C8wSoYf8.js → StarBorder.stories-2kJPpjuh.js} +1 -1
- package/storybook-static/assets/{SunburstChart.stories-CZLGaKCw.js → SunburstChart.stories-DwZaIIku.js} +1 -1
- package/storybook-static/assets/{Table.stories-7sdRQ08z.js → Table.stories-pZd9DvuZ.js} +1 -1
- package/storybook-static/assets/{Tabs.stories-Dw3nfGvj.js → Tabs.stories-DQtCc0JU.js} +1 -1
- package/storybook-static/assets/{TargetCursor.stories-BLnLO9VA.js → TargetCursor.stories-KNijJURB.js} +1 -1
- package/storybook-static/assets/{TextArea-vWig_NfB.js → TextArea-BsBttKqQ.js} +1 -1
- package/storybook-static/assets/{TextArea.stories-COGkh5iv.js → TextArea.stories-oB8MzoXg.js} +1 -1
- package/storybook-static/assets/{TextCursor.stories-BEygtZaU.js → TextCursor.stories-D67PSwe-.js} +1 -1
- package/storybook-static/assets/{TextInput-DQr7MW8E.js → TextInput-CjoPiwWi.js} +1 -1
- package/storybook-static/assets/{TextInput.stories-DEpHangn.js → TextInput.stories-B8VwO9KM.js} +1 -1
- package/storybook-static/assets/{TextPressure.stories-C-dmnG3-.js → TextPressure.stories-0-6_dNGJ.js} +1 -1
- package/storybook-static/assets/{TextType.stories-Bu_3ps7T.js → TextType.stories-D7wi-Xoy.js} +1 -1
- package/storybook-static/assets/{ThemeSwitcher.stories-9jr_WMZj.js → ThemeSwitcher.stories-DEUFGF9B.js} +1 -1
- package/storybook-static/assets/{Threads.stories-Bvkiy_vC.js → Threads.stories-BYTbEuF6.js} +1 -1
- package/storybook-static/assets/{TimeInput.stories-UpmjD83l.js → TimeInput.stories-_1M5i4X_.js} +1 -1
- package/storybook-static/assets/{Toggle-CgkRtH-w.js → Toggle-CaV_CmDs.js} +1 -1
- package/storybook-static/assets/{Toggle.stories-De4VTh7g.js → Toggle.stories-DBdNHwn1.js} +1 -1
- package/storybook-static/assets/{ToggleButton-GXGDF0-s.js → ToggleButton-jv6c5ezW.js} +1 -1
- package/storybook-static/assets/{ToggleButton.stories-BNqHj4u1.js → ToggleButton.stories-D6AsjlA7.js} +1 -1
- package/storybook-static/assets/{TrueFocus.stories-D4lKplNX.js → TrueFocus.stories-CKc72PLP.js} +1 -1
- package/storybook-static/assets/{VariableProximity.stories-DBOcrOhn.js → VariableProximity.stories-fbDCLDLp.js} +1 -1
- package/storybook-static/assets/{Waves.stories-BC0gvuvu.js → Waves.stories-C_VysexU.js} +1 -1
- package/storybook-static/assets/{check-CmZ4yqgU.js → check-CV4xXNXR.js} +1 -1
- package/storybook-static/assets/{chevron-down-CiHtN9hx.js → chevron-down-CkJFLecG.js} +1 -1
- package/storybook-static/assets/{chevron-right-DXPl_b_4.js → chevron-right-BpRTWC1z.js} +1 -1
- package/storybook-static/assets/client-Cor4ozso.js +1 -0
- package/storybook-static/assets/{createLucideIcon-Bsgf1LmD.js → createLucideIcon-CltDwvOP.js} +1 -1
- package/storybook-static/assets/{download-Db0VXF4f.js → download-SJcs72V4.js} +1 -1
- package/storybook-static/assets/{folder-BXUhymfS.js → folder-6SjOmErA.js} +1 -1
- package/storybook-static/assets/{iconBase-DqIubiEw.js → iconBase-DtvD0saU.js} +1 -1
- package/storybook-static/assets/{iframe-DATleXOy.js → iframe-Bipsh9dY.js} +3 -3
- package/storybook-static/assets/{index-B4lWOnRl.js → index-BEA1mHaT.js} +1 -1
- package/storybook-static/assets/{index-Dk8f2dmX.js → index-CTm0VtvQ.js} +1 -1
- package/storybook-static/assets/{index-9ETfP9ED.js → index-Cia0c3io.js} +1 -1
- package/storybook-static/assets/{proxy-CSW5O9FA.js → proxy-D9bljBhB.js} +1 -1
- package/storybook-static/assets/{react-18-2Kt21ij5.js → react-18-JTQzpdif.js} +1 -1
- package/storybook-static/assets/{react-three-fiber.esm-BChYGvAP.js → react-three-fiber.esm-Dc5EQDgd.js} +1 -1
- package/storybook-static/assets/{search-DWvmb6x0.js → search-DH8smCRL.js} +1 -1
- package/storybook-static/assets/{settings-BXbIXCGN.js → settings-D99Exe-t.js} +1 -1
- package/storybook-static/assets/{sun-BNbncJ9W.js → sun-B6fJHO8-.js} +1 -1
- package/storybook-static/assets/{trash-2-CVtTnKyU.js → trash-2-Bc-vtAZE.js} +1 -1
- package/storybook-static/assets/{use-animation-frame-CpLxaMkN.js → use-animation-frame-CD6uZr8a.js} +1 -1
- package/storybook-static/assets/{use-in-view-D4nqak8A.js → use-in-view-DrFhenAa.js} +1 -1
- package/storybook-static/assets/{use-motion-value-CDt5iWtg.js → use-motion-value-wsIqdv-r.js} +1 -1
- package/storybook-static/assets/{use-spring-D5RP2ZtN.js → use-spring-C6saxCCT.js} +1 -1
- package/storybook-static/assets/{use-transform-B5XoL4lt.js → use-transform-DuAStHvG.js} +1 -1
- package/storybook-static/assets/{useSound-ZTFhQHiJ.js → useSound-BwsWxODM.js} +1 -1
- package/storybook-static/assets/{users-BWMF8rtb.js → users-GH_nMWDP.js} +1 -1
- package/storybook-static/assets/{x-Dbi5cPZx.js → x-DwbjixG_.js} +1 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/assets/Navbar.stories-CaGhTuGJ.js +0 -186
- package/storybook-static/assets/QuantifiableHabitsChart.stories-a46WRZ73.js +0 -105
- package/storybook-static/assets/client-DvVCo8TG.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n,r as p}from"./iframe-
|
|
1
|
+
import{j as n,r as p}from"./iframe-Bipsh9dY.js";import{N as r}from"./NumberStepper-DMw68Bdj.js";import"./preload-helper-C1FmrZbK.js";import"./useSound-BwsWxODM.js";import"./proxy-D9bljBhB.js";import"./MotionConfigContext-BgQoFUhc.js";import"./index-Cia0c3io.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-Bipsh9dY.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-DQTkMJn7.js → OrbitImages.stories-FfsyN9Iu.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-Bipsh9dY.js";import{u as K}from"./use-motion-value-wsIqdv-r.js";import{a as Q}from"./index-BEA1mHaT.js";import{u as U}from"./use-transform-DuAStHvG.js";import{m as X}from"./proxy-D9bljBhB.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-BgQoFUhc.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-yitBZH9x.js → PieChart.stories-OHDVp0RT.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-Bipsh9dY.js";import{s as S,i as K,c as X}from"./transform-BKmuZieF.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-dJscYPyq.js → PixelBlast.stories-DFKSutAz.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-Bipsh9dY.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-ij7FVMCW.js → PixelCard.stories-CTsY_vyI.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-Bipsh9dY.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-BUlc0kvh.js → PixelSnow.stories-BlJBcWYF.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-Bipsh9dY.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-Bipsh9dY.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-Bipsh9dY.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-Bipsh9dY.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-Bipsh9dY.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-Ducnp-DW.js → ProfileCard.stories-Ct8ww3Sq.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-Bipsh9dY.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,105 @@
|
|
|
1
|
+
import{r as d,j as r}from"./iframe-Bipsh9dY.js";import{s as Y}from"./transform-BKmuZieF.js";import{t as be,e as Me,l as Se,m as Te}from"./monotone-DHdPkfDP.js";import{l as je}from"./linear-dkJHgUri.js";import{t as Q}from"./defaultLocale-DJ2q5QjE.js";import{a as ke,b as De}from"./axis-D3QohQNI.js";import"./preload-helper-C1FmrZbK.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";const Ee="_container_cn90n_1",Ce="_controls_cn90n_19",qe="_viewToggle_cn90n_27",Le="_viewButton_cn90n_36",$e="_active_cn90n_57",Ne="_viewIcon_cn90n_63",Ae="_viewLabel_cn90n_68",Ve="_aggregationToggle_cn90n_78",Ie="_aggregationButton_cn90n_87",We="_aggregationIcon_cn90n_114",Be="_aggregationLabel_cn90n_119",Re="_legend_cn90n_129",Fe="_compactLegend_cn90n_140",He="_legendItem_cn90n_145",Oe="_legendEmoji_cn90n_150",ze="_legendLabel_cn90n_154",Ye="_inactive_cn90n_178",Qe="_legendColor_cn90n_188",Ue="_chart_cn90n_227",Pe="_gridLine_cn90n_235",Ge="_line_cn90n_241",Ke="_xAxis_cn90n_248",Xe="_yAxis_cn90n_249",Je="_dataPoint_cn90n_268",Ze="_tooltip_cn90n_278",et="_visible_cn90n_299",tt="_tooltipHeader_cn90n_304",at="_tooltipEmoji_cn90n_315",nt="_tooltipDot_cn90n_320",rt="_tooltipInfo_cn90n_327",ot="_tooltipDate_cn90n_333",st="_tooltipValue_cn90n_339",t={container:Ee,controls:Ce,viewToggle:qe,viewButton:Le,active:$e,viewIcon:Ne,viewLabel:Ae,aggregationToggle:Ve,aggregationButton:Ie,aggregationIcon:We,aggregationLabel:Be,legend:Re,compactLegend:Fe,legendItem:He,legendEmoji:Oe,legendLabel:ze,inactive:Ye,legendColor:Qe,chart:Ue,gridLine:Pe,line:Ge,xAxis:Ke,yAxis:Xe,dataPoint:Je,tooltip:Ze,visible:et,tooltipHeader:tt,tooltipEmoji:at,tooltipDot:nt,tooltipInfo:rt,tooltipDate:ot,tooltipValue:st},it={Exercise:"#6BCB77",Meditation:"#4D96FF",Reading:"#FFB319",Water:"#00D9FF",Steps:"#FF6B6B",Sleep:"#9B59B6",Calories:"#FF9F1C",Study:"#C774E8"},me=({data:n,width:_=800,height:v=400,defaultViewType:M="daily",periodType:b="month",habitColors:U={},habitEmojis:P={},onDataPointClick:B,hideControls:ge=!1,compactLegend:pe=!1})=>{const D=d.useRef(null),he=d.useRef(null),[m,ye]=d.useState(M),[E,G]=d.useState([]),[S,K]=d.useState(null),[h,C]=d.useState(null),[q,X]=d.useState("average"),y=d.useMemo(()=>({top:20,right:20,bottom:50,left:50}),[]),R=_-y.left-y.right,F=v-y.top-y.bottom,T=d.useMemo(()=>Object.keys(n).filter(e=>e!=="dates"),[n]);d.useEffect(()=>{G(T)},[T]),d.useEffect(()=>{const e=()=>{C(null)};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[]);const fe=d.useMemo(()=>{switch(b){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"]}},[b]),j=d.useCallback(e=>U[e]||it[e]||`hsl(${Math.abs(e.split("").reduce((o,s)=>o+s.charCodeAt(0),0))%360}, 70%, 50%)`,[U]),f=d.useMemo(()=>{if(m==="daily"||!n.dates.length)return n;const e={dates:[]},o=new Map;return n.dates.forEach((s,g)=>{const w=new Date(s);let i;switch(m){case"weekly":{const c=new Date(w),p=c.getDay(),L=c.getDate()-p+(p===0?-6:1);c.setDate(L),i=c.toISOString().split("T")[0];break}case"monthly":i=`${w.getFullYear()}-${String(w.getMonth()+1).padStart(2,"0")}-01`;break;case"quarterly":{const p=(Math.floor(w.getMonth()/3)+1-1)*3;i=new Date(w.getFullYear(),p,1).toISOString().split("T")[0];break}default:i=s}o.has(i)||o.set(i,[]),o.get(i).push(g)}),e.dates=Array.from(o.keys()).sort(),T.forEach(s=>{e[s]=e.dates.map(g=>{const i=o.get(g).map(c=>n[s][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},[n,m,T,q]),_e=e=>{G(o=>o.includes(e)?o.filter(s=>s!==e):[...o,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",()=>{C(null)});const o=e.append("g").attr("transform",`translate(${y.left},${y.top})`),s=f.dates.map(a=>new Date(a)),g=be().domain(Me(s)).range([0,R]),w=Math.max(...E.flatMap(a=>f[a].filter(u=>typeof u=="number"))),i=je().domain([0,w*1.1]).range([F,0]);o.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",R).attr("y2",a=>i(a));const c=Se().x(a=>g(a[0])).y(a=>i(a[1])).curve(Te);E.forEach(a=>{const u=s.map((l,x)=>[l,f[a][x]]).filter(l=>typeof l[1]=="number");o.append("path").datum(u).attr("class",t.line).attr("d",c).attr("stroke",j(a)).attr("opacity",S&&S!==a?.3:1),o.selectAll(`.hover-circle-${a}`).data(u).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[k,$]=x,z=(Z=D.current)==null?void 0:Z.getBoundingClientRect();z&&C({habit:a,date:k.toISOString().split("T")[0],value:$,x:g(k)+y.left+z.left,y:i($)+y.top+z.top}),Y(o.node()).selectAll(`.circle-${a}-${s.indexOf(k)}`).attr("r",6)}).on("mouseleave",function(l,x){C(null),Y(o.node()).selectAll('[class*="circle-'+a+'"]').attr("r",4)}).on("click",function(l,x){const[k,$]=x;B&&B(a,k.toISOString().split("T")[0],$)}),o.selectAll(`.circle-${a}`).data(u).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",j(a)).attr("opacity",S&&S!==a?.3:1).style("pointer-events","none")});const p=a=>{const u=new Date(a);u.setHours(0,0,0,0),u.setDate(u.getDate()+3-(u.getDay()+6)%7);const l=new Date(u.getFullYear(),0,4);return 1+Math.round(((u.getTime()-l.getTime())/864e5-3+(l.getDay()+6)%7)/7)},L=(()=>{switch(m){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(m){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=ke(g).tickFormat(a=>L(a));m==="quarterly"?O.tickValues(s):J&&O.ticks(J);const xe=o.append("g").attr("class",t.xAxis).attr("transform",`translate(0,${F})`).call(O);(m==="daily"||m==="weekly")&&xe.selectAll("text").style("text-anchor","end").attr("dx","-.8em").attr("dy",".15em").attr("transform","rotate(-45)"),o.append("g").attr("class",t.yAxis).call(De(i))},[f,E,R,F,y,S,B,j,v,m,_]);const ve=(e,o)=>{const s=new Date(e);switch(o){case"daily":return s.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});case"weekly":return new Date(s).setDate(s.getDate()+6),`Week of ${s.toLocaleDateString("en-US",{month:"short",day:"numeric"})}`;case"monthly":return s.toLocaleDateString("en-US",{month:"long",year:"numeric"});case"quarterly":return`Q${Math.floor(s.getMonth()/3)+1} ${s.getFullYear()}`;default:return e}},H={daily:{icon:"📅",label:"Daily"},weekly:{icon:"📆",label:"Weekly"},monthly:{icon:"🗓️",label:"Monthly"},quarterly:{icon:"📊",label:"Quarterly"}},we=m!=="daily";return r.jsxs("div",{className:t.container,children:[!ge&&r.jsxs("div",{className:t.controls,children:[r.jsx("div",{className:t.viewToggle,children:fe.map(e=>r.jsxs("button",{className:`${t.viewButton} ${m===e?t.active:""}`,onClick:()=>ye(e),title:H[e].label,children:[r.jsx("span",{className:t.viewIcon,children:H[e].icon}),r.jsx("span",{className:t.viewLabel,children:H[e].label})]},e))}),we&&r.jsxs("div",{className:t.aggregationToggle,children:[r.jsxs("button",{className:`${t.aggregationButton} ${q==="average"?t.active:""}`,onClick:()=>X("average"),title:"Show average values for each period",children:[r.jsx("span",{className:t.aggregationIcon,children:"📊"}),r.jsx("span",{className:t.aggregationLabel,children:"Average"})]}),r.jsxs("button",{className:`${t.aggregationButton} ${q==="sum"?t.active:""}`,onClick:()=>X("sum"),title:"Show total values for each period",children:[r.jsx("span",{className:t.aggregationIcon,children:"➕"}),r.jsx("span",{className:t.aggregationLabel,children:"Sum"})]})]})]}),r.jsx("div",{className:`${t.legend}${pe?` ${t.compactLegend}`:""}`,children:T.map(e=>r.jsxs("button",{className:`${t.legendItem} ${E.includes(e)?"":t.inactive}`,onClick:()=>_e(e),onMouseEnter:()=>K(e),onMouseLeave:()=>K(null),children:[r.jsx("span",{className:t.legendEmoji,children:P[e]||"📊"}),r.jsx("span",{className:t.legendColor,style:{backgroundColor:j(e)}}),r.jsx("span",{className:t.legendLabel,children:e})]},e))}),r.jsx("svg",{ref:D,viewBox:`0 0 ${_} ${v}`,preserveAspectRatio:"xMidYMid meet",className:t.chart}),h&&r.jsxs("div",{ref:he,className:`${t.tooltip} ${h?t.visible:""}`,style:{left:`${h.x}px`,top:`${h.y-80}px`},children:[r.jsxs("div",{className:t.tooltipHeader,children:[r.jsx("span",{className:t.tooltipEmoji,children:P[h.habit]||"📊"}),r.jsx("span",{className:t.tooltipDot,style:{backgroundColor:j(h.habit)}}),r.jsx("span",{children:h.habit})]}),r.jsxs("div",{className:t.tooltipInfo,children:[r.jsx("div",{className:t.tooltipDate,children:ve(h.date,m)}),r.jsxs("div",{className:t.tooltipValue,children:[r.jsx("strong",{children:Math.round(h.value*10)/10}),r.jsx("span",{style:{fontSize:"12px",fontWeight:"normal",opacity:.6},children:"units"})]})]})]})]})};me.__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 ft={title:"Organisms/Charts/QuantifiableHabitsChart",component:me,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"]}}},W=n=>{const _=[],v=new Date;for(let M=n-1;M>=0;M--){const b=new Date(v);b.setDate(b.getDate()-M),_.push(b.toISOString().split("T")[0])}return _},N={args:{data:(()=>{const n=W(30);return{dates:n,Exercise:n.map(()=>Math.floor(Math.random()*60)+20),Reading:n.map(()=>Math.floor(Math.random()*120)+30),Water:n.map(()=>Math.floor(Math.random()*8)+2),Steps:n.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:"👟"}}},A={args:{data:(()=>{const n=W(90);return{dates:n,Meditation:n.map(()=>Math.floor(Math.random()*30)+10),Study:n.map(()=>Math.floor(Math.random()*180)+60),Sleep:n.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:"😴"}}},V={args:{data:(()=>{const n=W(365);return{dates:n,Coding:n.map(()=>Math.floor(Math.random()*240)+120),Exercise:n.map(()=>Math.floor(Math.random()*90)+30),Learning:n.map(()=>Math.floor(Math.random()*120)+60),Socializing:n.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:"👥"}}},I={args:{data:(()=>{const n=W(30);return{dates:n,Weight:n.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:`{
|
|
2
|
+
args: {
|
|
3
|
+
data: (() => {
|
|
4
|
+
const dates = generateDateRange(30);
|
|
5
|
+
return {
|
|
6
|
+
dates,
|
|
7
|
+
Exercise: dates.map(() => Math.floor(Math.random() * 60) + 20),
|
|
8
|
+
Reading: dates.map(() => Math.floor(Math.random() * 120) + 30),
|
|
9
|
+
Water: dates.map(() => Math.floor(Math.random() * 8) + 2),
|
|
10
|
+
Steps: dates.map(() => Math.floor(Math.random() * 15000) + 5000)
|
|
11
|
+
};
|
|
12
|
+
})(),
|
|
13
|
+
width: 900,
|
|
14
|
+
height: 400,
|
|
15
|
+
defaultViewType: 'daily',
|
|
16
|
+
periodType: 'month',
|
|
17
|
+
habitColors: {
|
|
18
|
+
Exercise: '#10b981',
|
|
19
|
+
Reading: '#8b5cf6',
|
|
20
|
+
Water: '#3b82f6',
|
|
21
|
+
Steps: '#f59e0b'
|
|
22
|
+
},
|
|
23
|
+
habitEmojis: {
|
|
24
|
+
Exercise: '🏃',
|
|
25
|
+
Reading: '📚',
|
|
26
|
+
Water: '💧',
|
|
27
|
+
Steps: '👟'
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}`,...(ae=(te=N.parameters)==null?void 0:te.docs)==null?void 0:ae.source}}};var ne,re,oe;A.parameters={...A.parameters,docs:{...(ne=A.parameters)==null?void 0:ne.docs,source:{originalSource:`{
|
|
31
|
+
args: {
|
|
32
|
+
data: (() => {
|
|
33
|
+
const dates = generateDateRange(90);
|
|
34
|
+
return {
|
|
35
|
+
dates,
|
|
36
|
+
Meditation: dates.map(() => Math.floor(Math.random() * 30) + 10),
|
|
37
|
+
Study: dates.map(() => Math.floor(Math.random() * 180) + 60),
|
|
38
|
+
Sleep: dates.map(() => Math.floor(Math.random() * 3) + 6)
|
|
39
|
+
};
|
|
40
|
+
})(),
|
|
41
|
+
width: 900,
|
|
42
|
+
height: 400,
|
|
43
|
+
defaultViewType: 'weekly',
|
|
44
|
+
periodType: 'quarter',
|
|
45
|
+
habitColors: {
|
|
46
|
+
Meditation: '#a78bfa',
|
|
47
|
+
Study: '#34d399',
|
|
48
|
+
Sleep: '#60a5fa'
|
|
49
|
+
},
|
|
50
|
+
habitEmojis: {
|
|
51
|
+
Meditation: '🧘',
|
|
52
|
+
Study: '📖',
|
|
53
|
+
Sleep: '😴'
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}`,...(oe=(re=A.parameters)==null?void 0:re.docs)==null?void 0:oe.source}}};var se,ie,le;V.parameters={...V.parameters,docs:{...(se=V.parameters)==null?void 0:se.docs,source:{originalSource:`{
|
|
57
|
+
args: {
|
|
58
|
+
data: (() => {
|
|
59
|
+
const dates = generateDateRange(365);
|
|
60
|
+
return {
|
|
61
|
+
dates,
|
|
62
|
+
Coding: dates.map(() => Math.floor(Math.random() * 240) + 120),
|
|
63
|
+
Exercise: dates.map(() => Math.floor(Math.random() * 90) + 30),
|
|
64
|
+
Learning: dates.map(() => Math.floor(Math.random() * 120) + 60),
|
|
65
|
+
Socializing: dates.map(() => Math.floor(Math.random() * 180) + 60)
|
|
66
|
+
};
|
|
67
|
+
})(),
|
|
68
|
+
width: 1000,
|
|
69
|
+
height: 450,
|
|
70
|
+
defaultViewType: 'monthly',
|
|
71
|
+
periodType: 'year',
|
|
72
|
+
habitColors: {
|
|
73
|
+
Coding: '#7c3aed',
|
|
74
|
+
Exercise: '#10b981',
|
|
75
|
+
Learning: '#f59e0b',
|
|
76
|
+
Socializing: '#ec4899'
|
|
77
|
+
},
|
|
78
|
+
habitEmojis: {
|
|
79
|
+
Coding: '💻',
|
|
80
|
+
Exercise: '💪',
|
|
81
|
+
Learning: '🎓',
|
|
82
|
+
Socializing: '👥'
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}`,...(le=(ie=V.parameters)==null?void 0:ie.docs)==null?void 0:le.source}}};var ce,de,ue;I.parameters={...I.parameters,docs:{...(ce=I.parameters)==null?void 0:ce.docs,source:{originalSource:`{
|
|
86
|
+
args: {
|
|
87
|
+
data: (() => {
|
|
88
|
+
const dates = generateDateRange(30);
|
|
89
|
+
return {
|
|
90
|
+
dates,
|
|
91
|
+
Weight: dates.map((_, i) => 70 + Math.sin(i / 5) * 2 + Math.random())
|
|
92
|
+
};
|
|
93
|
+
})(),
|
|
94
|
+
width: 800,
|
|
95
|
+
height: 300,
|
|
96
|
+
defaultViewType: 'daily',
|
|
97
|
+
periodType: 'month',
|
|
98
|
+
habitColors: {
|
|
99
|
+
Weight: '#3b82f6'
|
|
100
|
+
},
|
|
101
|
+
habitEmojis: {
|
|
102
|
+
Weight: '⚖️'
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}`,...(ue=(de=I.parameters)==null?void 0:de.docs)==null?void 0:ue.source}}};const _t=["DailyHabits","WeeklyAverages","YearlyOverview","SingleHabit"];export{N as DailyHabits,I as SingleHabit,A as WeeklyAverages,V as YearlyOverview,_t as __namedExportsOrder,ft 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-Bipsh9dY.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-Bipsh9dY.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-BSopsuMf.js → RippleGrid.stories-DhMFo-nj.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-Bipsh9dY.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-Bipsh9dY.js";import{m as C}from"./proxy-D9bljBhB.js";import{A as Q}from"./index-Cia0c3io.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-BgQoFUhc.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-IF370Uy4.js → ScrollFloat.stories-Cyf50ogn.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-Bipsh9dY.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-Bipsh9dY.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,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as g,j as v}from"./iframe-DATleXOy.js";import{u as re}from"./use-motion-value-CDt5iWtg.js";import{h as ne,j as le,i as Te,r as Ce,m as Oe}from"./proxy-CSW5O9FA.js";import{f as h,I as k,N as Ne,a3 as Pe,Y as He,$ as Be,j as Ae,c as oe,R as ke,U as Re,o as W,u as be,a as q}from"./MotionConfigContext-BXIi7eTZ.js";import{u as ze}from"./use-spring-D5RP2ZtN.js";import{u as D}from"./use-transform-B5XoL4lt.js";import{u as je}from"./use-animation-frame-CpLxaMkN.js";import"./preload-helper-C1FmrZbK.js";function ce(e,t){let s;const r=()=>{const{currentTime:n}=t,o=(n===null?0:n.value)/100;s!==o&&e(o),s=o};return h.preUpdate(r,!0),()=>k(r)}function Ie(e,t,s){g.useInsertionEffect(()=>e.on(t,s),[e,t,s])}function O(e){return typeof window>"u"?!1:e?ne():le()}const _e=50,F=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),qe=()=>({time:0,x:F(),y:F()}),De={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function $(e,t,s,r){const n=s[t],{length:l,position:o}=De[t],c=n.current,a=s.time;n.current=Math.abs(e[`scroll${o}`]),n.scrollLength=e[`scroll${l}`]-e[`client${l}`],n.offset.length=0,n.offset[0]=0,n.offset[1]=n.scrollLength,n.progress=Ne(0,n.scrollLength,n.current);const i=r-a;n.velocity=i>_e?0:Pe(n.current-c,i)}function Fe(e,t,s){$(e,"x",t,s),$(e,"y",t,s),t.time=s}function $e(e,t){const s={x:0,y:0};let r=e;for(;r&&r!==t;)if(Te(r))s.x+=r.offsetLeft,s.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const n=r.getBoundingClientRect();r=r.parentElement;const l=r.getBoundingClientRect();s.x+=n.left-l.left,s.y+=n.top-l.top}else if(r instanceof SVGGraphicsElement){const{x:n,y:l}=r.getBBox();s.x+=n,s.y+=l;let o=null,c=r.parentNode;for(;!o;)c.tagName==="svg"&&(o=c),c=r.parentNode;r=o}else break;return s}const R={start:0,center:.5,end:1};function Y(e,t,s=0){let r=0;if(e in R&&(e=R[e]),typeof e=="string"){const n=parseFloat(e);e.endsWith("px")?r=n:e.endsWith("%")?e=n/100:e.endsWith("vw")?r=n/100*document.documentElement.clientWidth:e.endsWith("vh")?r=n/100*document.documentElement.clientHeight:e=n}return typeof e=="number"&&(r=t*e),s+r}const Ye=[0,0];function Xe(e,t,s,r){let n=Array.isArray(e)?e:Ye,l=0,o=0;return typeof e=="number"?n=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?n=e.split(" "):n=[e,R[e]?e:"0"]),l=Y(n[0],s,r),o=Y(n[1],t),l-o}const E={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Me={x:0,y:0};function Ue(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function Ge(e,t,s){const{offset:r=E.All}=s,{target:n=e,axis:l="y"}=s,o=l==="y"?"height":"width",c=n!==e?$e(n,e):Me,a=n===e?{width:e.scrollWidth,height:e.scrollHeight}:Ue(n),i={width:e.clientWidth,height:e.clientHeight};t[l].offset.length=0;let u=!t[l].interpolate;const m=r.length;for(let f=0;f<m;f++){const p=Xe(r[f],i[o],a[o],c[l]);!u&&p!==t[l].interpolatorOffsets[f]&&(u=!0),t[l].offset[f]=p}u&&(t[l].interpolate=He(t[l].offset,Be(r),{clamp:!1}),t[l].interpolatorOffsets=[...t[l].offset]),t[l].progress=Ae(0,1,t[l].interpolate(t[l].current))}function Ke(e,t=e,s){if(s.x.targetOffset=0,s.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)s.x.targetOffset+=r.offsetLeft,s.y.targetOffset+=r.offsetTop,r=r.offsetParent}s.x.targetLength=t===e?t.scrollWidth:t.clientWidth,s.y.targetLength=t===e?t.scrollHeight:t.clientHeight,s.x.containerLength=e.clientWidth,s.y.containerLength=e.clientHeight}function Je(e,t,s,r={}){return{measure:n=>{Ke(e,r.target,s),Fe(e,s,n),(r.offset||r.target)&&Ge(e,s,r)},notify:()=>t(s)}}const x=new WeakMap,X=new WeakMap,A=new WeakMap,M=new WeakMap,L=new WeakMap,U=e=>e===document.scrollingElement?window:e;function ie(e,{container:t=document.scrollingElement,trackContentSize:s=!1,...r}={}){if(!t)return oe;let n=A.get(t);n||(n=new Set,A.set(t,n));const l=qe(),o=Je(t,e,l,r);if(n.add(o),!x.has(t)){const a=()=>{for(const f of n)f.measure(ke.timestamp);h.preUpdate(i)},i=()=>{for(const f of n)f.notify()},u=()=>h.read(a);x.set(t,u);const m=U(t);window.addEventListener("resize",u),t!==document.documentElement&&X.set(t,Ce(t,u)),m.addEventListener("scroll",u),u()}if(s&&!L.has(t)){const a=x.get(t),i={width:t.scrollWidth,height:t.scrollHeight};M.set(t,i);const u=()=>{const f=t.scrollWidth,p=t.scrollHeight;(i.width!==f||i.height!==p)&&(a(),i.width=f,i.height=p)},m=h.read(u,!0);L.set(t,m)}const c=x.get(t);return h.read(c,!1,!0),()=>{var m;k(c);const a=A.get(t);if(!a||(a.delete(o),a.size))return;const i=x.get(t);x.delete(t),i&&(U(t).removeEventListener("scroll",i),(m=X.get(t))==null||m(),window.removeEventListener("resize",i));const u=L.get(t);u&&(k(u),L.delete(t)),M.delete(t)}}const Qe=[[E.Enter,"entry"],[E.Exit,"exit"],[E.Any,"cover"],[E.All,"contain"]],G={start:0,end:1};function Ze(e){const t=e.trim().split(/\s+/);if(t.length!==2)return;const s=G[t[0]],r=G[t[1]];if(!(s===void 0||r===void 0))return[s,r]}function et(e){if(e.length!==2)return;const t=[];for(const s of e)if(Array.isArray(s))t.push(s);else if(typeof s=="string"){const r=Ze(s);if(!r)return;t.push(r)}else return;return t}function tt(e,t){const s=et(e);if(!s)return!1;for(let r=0;r<2;r++){const n=s[r],l=t[r];if(n[0]!==l[0]||n[1]!==l[1])return!1}return!0}function b(e){if(!e)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[t,s]of Qe)if(tt(e,t))return{rangeStart:`${s} 0%`,rangeEnd:`${s} 100%`}}const K=new Map;function J(e){const t={value:0},s=ie(r=>{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:s}}function ae({source:e,container:t,...s}){const{axis:r}=s;e&&(t=e);let n=K.get(t);n||(n=new Map,K.set(t,n));const l=s.target??"self";let o=n.get(l);o||(o={},n.set(l,o));const c=r+(s.offset??[]).join(",");return o[c]||(s.target&&O(s.target)?b(s.offset)?o[c]=new ViewTimeline({subject:s.target,axis:r}):o[c]=J({container:t,...s}):O()?o[c]=new ScrollTimeline({source:t,axis:r}):o[c]=J({container:t,...s})),o[c]}function st(e,t){const s=ae(t),r=t.target?b(t.offset):void 0,n=t.target?O(t.target)&&!!r:O();return e.attachTimeline({timeline:n?s:void 0,...r&&n&&{rangeStart:r.rangeStart,rangeEnd:r.rangeEnd},observe:l=>(l.pause(),ce(o=>{l.time=l.iterationDuration*o},s))})}function rt(e){return e.length===2}function nt(e,t){return rt(e)?ie(s=>{e(s[t.axis].progress,s)},t):ce(e,ae(t))}function ue(e,{axis:t="y",container:s=document.scrollingElement,...r}={}){if(!s)return oe;const n={axis:t,container:s,...r};return typeof e=="function"?nt(e,n):st(e,n)}const lt=()=>({scrollX:W(0),scrollY:W(0),scrollXProgress:W(0),scrollYProgress:W(0)}),T=e=>e?!e.current:!1;function Q(e,t,s,r){return{factory:n=>ue(n,{...t,axis:e,container:(s==null?void 0:s.current)||void 0,target:(r==null?void 0:r.current)||void 0}),times:[0,1],keyframes:[0,1],ease:n=>n,duration:1}}function ot(e,t){return typeof window>"u"?!1:e?ne()&&!!b(t):le()}function ct({container:e,target:t,...s}={}){const r=Re(lt);ot(t,s.offset)&&(r.scrollXProgress.accelerate=Q("x",s,e,t),r.scrollYProgress.accelerate=Q("y",s,e,t));const n=g.useRef(null),l=g.useRef(!1),o=g.useCallback(()=>(n.current=ue((c,{x:a,y:i})=>{r.scrollX.set(a.current),r.scrollXProgress.set(a.progress),r.scrollY.set(i.current),r.scrollYProgress.set(i.progress)},{...s,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}),()=>{var c;(c=n.current)==null||c.call(n)}),[e,t,JSON.stringify(s.offset)]);return be(()=>{if(l.current=!1,T(e)||T(t)){l.current=!0;return}else return o()},[o]),g.useEffect(()=>{if(l.current)return q(!T(e)),q(!T(t)),o()},[o]),r}function it(e){const t=re(e.getVelocity()),s=()=>{const r=e.getVelocity();t.set(r),r&&h.update(s)};return Ie(e,"change",()=>{h.update(s,!1,!0)}),t}const at="_parallax_1s8d6_1",ut="_scroller_1s8d6_6",Z={parallax:at,scroller:ut};function ft(e){const[t,s]=g.useState(0);return g.useLayoutEffect(()=>{function r(){e.current&&s(e.current.offsetWidth)}return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[e]),t}const fe=({scrollContainerRef:e,texts:t=[],velocity:s=100,className:r="",damping:n=50,stiffness:l=400,numCopies:o=6,velocityMapping:c={input:[0,1e3],output:[0,5]},parallaxClassName:a=Z.parallax,scrollerClassName:i=Z.scroller,parallaxStyle:u,scrollerStyle:m})=>{function f({children:p,baseVelocity:S=s,scrollContainerRef:z,className:de="",damping:me,stiffness:pe,numCopies:ge,velocityMapping:y,parallaxClassName:he,scrollerClassName:ye,parallaxStyle:xe,scrollerStyle:we}){const N=re(0),ve=z?{container:z}:{},{scrollY:Ee}=ct(ve),Se=it(Ee),Ve=ze(Se,{damping:me??50,stiffness:pe??400}),P=D(Ve,(y==null?void 0:y.input)||[0,1e3],(y==null?void 0:y.output)||[0,5],{clamp:!1}),j=g.useRef(null),I=ft(j);function We(d,H,w){const B=H-d;return((w-d)%B+B)%B+d}const Le=D(N,d=>I===0?"0px":`${We(-I,0,d)}px`),V=g.useRef(1);je((d,H)=>{let w=V.current*S*(H/1e3);P.get()<0?V.current=-1:P.get()>0&&(V.current=1),w+=V.current*w*P.get(),N.set(N.get()+w)});const _=[];for(let d=0;d<ge;d++)_.push(v.jsxs("span",{className:de,ref:d===0?j:null,children:[p," "]},d));return v.jsx("div",{className:he,style:xe,children:v.jsx(Oe.div,{className:ye,style:{x:Le,...we},children:_})})}return v.jsx("section",{children:t.map((p,S)=>v.jsx(f,{className:r,baseVelocity:S%2!==0?-s:s,scrollContainerRef:e,damping:n,stiffness:l,numCopies:o,velocityMapping:c,parallaxClassName:a,scrollerClassName:i,parallaxStyle:u,scrollerStyle:m,children:p},S))})};fe.__docgenInfo={description:"",methods:[],displayName:"ScrollVelocity",props:{texts:{defaultValue:{value:"[]",computed:!1},required:!1},velocity:{defaultValue:{value:"100",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},damping:{defaultValue:{value:"50",computed:!1},required:!1},stiffness:{defaultValue:{value:"400",computed:!1},required:!1},numCopies:{defaultValue:{value:"6",computed:!1},required:!1},velocityMapping:{defaultValue:{value:"{ input: [0, 1000], output: [0, 5] }",computed:!1},required:!1},parallaxClassName:{defaultValue:{value:"styles['parallax']",computed:!0},required:!1},scrollerClassName:{defaultValue:{value:"styles['scroller']",computed:!0},required:!1}}};const Et={title:"ReactBits/TextAnimations/ScrollVelocity",component:fe,parameters:{layout:"fullscreen"}},C={args:{texts:["React Bits","Scroll Velocity"],velocity:100,damping:50,stiffness:400,numCopies:6}};var ee,te,se;C.parameters={...C.parameters,docs:{...(ee=C.parameters)==null?void 0:ee.docs,source:{originalSource:`{
|
|
1
|
+
import{r as g,j as v}from"./iframe-Bipsh9dY.js";import{u as re}from"./use-motion-value-wsIqdv-r.js";import{h as ne,j as le,i as Te,r as Ce,m as Oe}from"./proxy-D9bljBhB.js";import{f as h,I as k,N as Ne,a3 as Pe,Y as He,$ as Be,j as Ae,c as oe,R as ke,U as Re,o as W,u as be,a as q}from"./MotionConfigContext-BgQoFUhc.js";import{u as ze}from"./use-spring-C6saxCCT.js";import{u as D}from"./use-transform-DuAStHvG.js";import{u as je}from"./use-animation-frame-CD6uZr8a.js";import"./preload-helper-C1FmrZbK.js";function ce(e,t){let s;const r=()=>{const{currentTime:n}=t,o=(n===null?0:n.value)/100;s!==o&&e(o),s=o};return h.preUpdate(r,!0),()=>k(r)}function Ie(e,t,s){g.useInsertionEffect(()=>e.on(t,s),[e,t,s])}function O(e){return typeof window>"u"?!1:e?ne():le()}const _e=50,F=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),qe=()=>({time:0,x:F(),y:F()}),De={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function $(e,t,s,r){const n=s[t],{length:l,position:o}=De[t],c=n.current,a=s.time;n.current=Math.abs(e[`scroll${o}`]),n.scrollLength=e[`scroll${l}`]-e[`client${l}`],n.offset.length=0,n.offset[0]=0,n.offset[1]=n.scrollLength,n.progress=Ne(0,n.scrollLength,n.current);const i=r-a;n.velocity=i>_e?0:Pe(n.current-c,i)}function Fe(e,t,s){$(e,"x",t,s),$(e,"y",t,s),t.time=s}function $e(e,t){const s={x:0,y:0};let r=e;for(;r&&r!==t;)if(Te(r))s.x+=r.offsetLeft,s.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const n=r.getBoundingClientRect();r=r.parentElement;const l=r.getBoundingClientRect();s.x+=n.left-l.left,s.y+=n.top-l.top}else if(r instanceof SVGGraphicsElement){const{x:n,y:l}=r.getBBox();s.x+=n,s.y+=l;let o=null,c=r.parentNode;for(;!o;)c.tagName==="svg"&&(o=c),c=r.parentNode;r=o}else break;return s}const R={start:0,center:.5,end:1};function Y(e,t,s=0){let r=0;if(e in R&&(e=R[e]),typeof e=="string"){const n=parseFloat(e);e.endsWith("px")?r=n:e.endsWith("%")?e=n/100:e.endsWith("vw")?r=n/100*document.documentElement.clientWidth:e.endsWith("vh")?r=n/100*document.documentElement.clientHeight:e=n}return typeof e=="number"&&(r=t*e),s+r}const Ye=[0,0];function Xe(e,t,s,r){let n=Array.isArray(e)?e:Ye,l=0,o=0;return typeof e=="number"?n=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?n=e.split(" "):n=[e,R[e]?e:"0"]),l=Y(n[0],s,r),o=Y(n[1],t),l-o}const E={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Me={x:0,y:0};function Ue(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function Ge(e,t,s){const{offset:r=E.All}=s,{target:n=e,axis:l="y"}=s,o=l==="y"?"height":"width",c=n!==e?$e(n,e):Me,a=n===e?{width:e.scrollWidth,height:e.scrollHeight}:Ue(n),i={width:e.clientWidth,height:e.clientHeight};t[l].offset.length=0;let u=!t[l].interpolate;const m=r.length;for(let f=0;f<m;f++){const p=Xe(r[f],i[o],a[o],c[l]);!u&&p!==t[l].interpolatorOffsets[f]&&(u=!0),t[l].offset[f]=p}u&&(t[l].interpolate=He(t[l].offset,Be(r),{clamp:!1}),t[l].interpolatorOffsets=[...t[l].offset]),t[l].progress=Ae(0,1,t[l].interpolate(t[l].current))}function Ke(e,t=e,s){if(s.x.targetOffset=0,s.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)s.x.targetOffset+=r.offsetLeft,s.y.targetOffset+=r.offsetTop,r=r.offsetParent}s.x.targetLength=t===e?t.scrollWidth:t.clientWidth,s.y.targetLength=t===e?t.scrollHeight:t.clientHeight,s.x.containerLength=e.clientWidth,s.y.containerLength=e.clientHeight}function Je(e,t,s,r={}){return{measure:n=>{Ke(e,r.target,s),Fe(e,s,n),(r.offset||r.target)&&Ge(e,s,r)},notify:()=>t(s)}}const x=new WeakMap,X=new WeakMap,A=new WeakMap,M=new WeakMap,L=new WeakMap,U=e=>e===document.scrollingElement?window:e;function ie(e,{container:t=document.scrollingElement,trackContentSize:s=!1,...r}={}){if(!t)return oe;let n=A.get(t);n||(n=new Set,A.set(t,n));const l=qe(),o=Je(t,e,l,r);if(n.add(o),!x.has(t)){const a=()=>{for(const f of n)f.measure(ke.timestamp);h.preUpdate(i)},i=()=>{for(const f of n)f.notify()},u=()=>h.read(a);x.set(t,u);const m=U(t);window.addEventListener("resize",u),t!==document.documentElement&&X.set(t,Ce(t,u)),m.addEventListener("scroll",u),u()}if(s&&!L.has(t)){const a=x.get(t),i={width:t.scrollWidth,height:t.scrollHeight};M.set(t,i);const u=()=>{const f=t.scrollWidth,p=t.scrollHeight;(i.width!==f||i.height!==p)&&(a(),i.width=f,i.height=p)},m=h.read(u,!0);L.set(t,m)}const c=x.get(t);return h.read(c,!1,!0),()=>{var m;k(c);const a=A.get(t);if(!a||(a.delete(o),a.size))return;const i=x.get(t);x.delete(t),i&&(U(t).removeEventListener("scroll",i),(m=X.get(t))==null||m(),window.removeEventListener("resize",i));const u=L.get(t);u&&(k(u),L.delete(t)),M.delete(t)}}const Qe=[[E.Enter,"entry"],[E.Exit,"exit"],[E.Any,"cover"],[E.All,"contain"]],G={start:0,end:1};function Ze(e){const t=e.trim().split(/\s+/);if(t.length!==2)return;const s=G[t[0]],r=G[t[1]];if(!(s===void 0||r===void 0))return[s,r]}function et(e){if(e.length!==2)return;const t=[];for(const s of e)if(Array.isArray(s))t.push(s);else if(typeof s=="string"){const r=Ze(s);if(!r)return;t.push(r)}else return;return t}function tt(e,t){const s=et(e);if(!s)return!1;for(let r=0;r<2;r++){const n=s[r],l=t[r];if(n[0]!==l[0]||n[1]!==l[1])return!1}return!0}function b(e){if(!e)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[t,s]of Qe)if(tt(e,t))return{rangeStart:`${s} 0%`,rangeEnd:`${s} 100%`}}const K=new Map;function J(e){const t={value:0},s=ie(r=>{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:s}}function ae({source:e,container:t,...s}){const{axis:r}=s;e&&(t=e);let n=K.get(t);n||(n=new Map,K.set(t,n));const l=s.target??"self";let o=n.get(l);o||(o={},n.set(l,o));const c=r+(s.offset??[]).join(",");return o[c]||(s.target&&O(s.target)?b(s.offset)?o[c]=new ViewTimeline({subject:s.target,axis:r}):o[c]=J({container:t,...s}):O()?o[c]=new ScrollTimeline({source:t,axis:r}):o[c]=J({container:t,...s})),o[c]}function st(e,t){const s=ae(t),r=t.target?b(t.offset):void 0,n=t.target?O(t.target)&&!!r:O();return e.attachTimeline({timeline:n?s:void 0,...r&&n&&{rangeStart:r.rangeStart,rangeEnd:r.rangeEnd},observe:l=>(l.pause(),ce(o=>{l.time=l.iterationDuration*o},s))})}function rt(e){return e.length===2}function nt(e,t){return rt(e)?ie(s=>{e(s[t.axis].progress,s)},t):ce(e,ae(t))}function ue(e,{axis:t="y",container:s=document.scrollingElement,...r}={}){if(!s)return oe;const n={axis:t,container:s,...r};return typeof e=="function"?nt(e,n):st(e,n)}const lt=()=>({scrollX:W(0),scrollY:W(0),scrollXProgress:W(0),scrollYProgress:W(0)}),T=e=>e?!e.current:!1;function Q(e,t,s,r){return{factory:n=>ue(n,{...t,axis:e,container:(s==null?void 0:s.current)||void 0,target:(r==null?void 0:r.current)||void 0}),times:[0,1],keyframes:[0,1],ease:n=>n,duration:1}}function ot(e,t){return typeof window>"u"?!1:e?ne()&&!!b(t):le()}function ct({container:e,target:t,...s}={}){const r=Re(lt);ot(t,s.offset)&&(r.scrollXProgress.accelerate=Q("x",s,e,t),r.scrollYProgress.accelerate=Q("y",s,e,t));const n=g.useRef(null),l=g.useRef(!1),o=g.useCallback(()=>(n.current=ue((c,{x:a,y:i})=>{r.scrollX.set(a.current),r.scrollXProgress.set(a.progress),r.scrollY.set(i.current),r.scrollYProgress.set(i.progress)},{...s,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}),()=>{var c;(c=n.current)==null||c.call(n)}),[e,t,JSON.stringify(s.offset)]);return be(()=>{if(l.current=!1,T(e)||T(t)){l.current=!0;return}else return o()},[o]),g.useEffect(()=>{if(l.current)return q(!T(e)),q(!T(t)),o()},[o]),r}function it(e){const t=re(e.getVelocity()),s=()=>{const r=e.getVelocity();t.set(r),r&&h.update(s)};return Ie(e,"change",()=>{h.update(s,!1,!0)}),t}const at="_parallax_1s8d6_1",ut="_scroller_1s8d6_6",Z={parallax:at,scroller:ut};function ft(e){const[t,s]=g.useState(0);return g.useLayoutEffect(()=>{function r(){e.current&&s(e.current.offsetWidth)}return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[e]),t}const fe=({scrollContainerRef:e,texts:t=[],velocity:s=100,className:r="",damping:n=50,stiffness:l=400,numCopies:o=6,velocityMapping:c={input:[0,1e3],output:[0,5]},parallaxClassName:a=Z.parallax,scrollerClassName:i=Z.scroller,parallaxStyle:u,scrollerStyle:m})=>{function f({children:p,baseVelocity:S=s,scrollContainerRef:z,className:de="",damping:me,stiffness:pe,numCopies:ge,velocityMapping:y,parallaxClassName:he,scrollerClassName:ye,parallaxStyle:xe,scrollerStyle:we}){const N=re(0),ve=z?{container:z}:{},{scrollY:Ee}=ct(ve),Se=it(Ee),Ve=ze(Se,{damping:me??50,stiffness:pe??400}),P=D(Ve,(y==null?void 0:y.input)||[0,1e3],(y==null?void 0:y.output)||[0,5],{clamp:!1}),j=g.useRef(null),I=ft(j);function We(d,H,w){const B=H-d;return((w-d)%B+B)%B+d}const Le=D(N,d=>I===0?"0px":`${We(-I,0,d)}px`),V=g.useRef(1);je((d,H)=>{let w=V.current*S*(H/1e3);P.get()<0?V.current=-1:P.get()>0&&(V.current=1),w+=V.current*w*P.get(),N.set(N.get()+w)});const _=[];for(let d=0;d<ge;d++)_.push(v.jsxs("span",{className:de,ref:d===0?j:null,children:[p," "]},d));return v.jsx("div",{className:he,style:xe,children:v.jsx(Oe.div,{className:ye,style:{x:Le,...we},children:_})})}return v.jsx("section",{children:t.map((p,S)=>v.jsx(f,{className:r,baseVelocity:S%2!==0?-s:s,scrollContainerRef:e,damping:n,stiffness:l,numCopies:o,velocityMapping:c,parallaxClassName:a,scrollerClassName:i,parallaxStyle:u,scrollerStyle:m,children:p},S))})};fe.__docgenInfo={description:"",methods:[],displayName:"ScrollVelocity",props:{texts:{defaultValue:{value:"[]",computed:!1},required:!1},velocity:{defaultValue:{value:"100",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},damping:{defaultValue:{value:"50",computed:!1},required:!1},stiffness:{defaultValue:{value:"400",computed:!1},required:!1},numCopies:{defaultValue:{value:"6",computed:!1},required:!1},velocityMapping:{defaultValue:{value:"{ input: [0, 1000], output: [0, 5] }",computed:!1},required:!1},parallaxClassName:{defaultValue:{value:"styles['parallax']",computed:!0},required:!1},scrollerClassName:{defaultValue:{value:"styles['scroller']",computed:!0},required:!1}}};const Et={title:"ReactBits/TextAnimations/ScrollVelocity",component:fe,parameters:{layout:"fullscreen"}},C={args:{texts:["React Bits","Scroll Velocity"],velocity:100,damping:50,stiffness:400,numCopies:6}};var ee,te,se;C.parameters={...C.parameters,docs:{...(ee=C.parameters)==null?void 0:ee.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
texts: ['React Bits', 'Scroll Velocity'],
|
|
4
4
|
velocity: 100,
|
package/storybook-static/assets/{SearchBar.stories-CeWR-VB-.js → SearchBar.stories-B5r2LH16.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as o,j as t}from"./iframe-
|
|
1
|
+
import{r as o,j as t}from"./iframe-Bipsh9dY.js";import{S as ee}from"./search-DH8smCRL.js";import{F as te}from"./folder-6SjOmErA.js";import{U as se}from"./users-GH_nMWDP.js";import{c as P}from"./createLucideIcon-CltDwvOP.js";import{m as $}from"./proxy-D9bljBhB.js";import{X as ye}from"./x-DwbjixG_.js";import{A as fe}from"./index-Cia0c3io.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-BgQoFUhc.js";/**
|
|
2
2
|
* @license lucide-react v0.539.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/storybook-static/assets/{SearchableDropdown-BADpPZr1.js → SearchableDropdown-B6k12izZ.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r,j as n}from"./iframe-
|
|
1
|
+
import{r,j as n}from"./iframe-Bipsh9dY.js";import{m as p}from"./proxy-D9bljBhB.js";import{C as V}from"./chevron-down-CkJFLecG.js";import{A as R}from"./index-Cia0c3io.js";import{S as A}from"./search-DH8smCRL.js";import{C as T}from"./check-CV4xXNXR.js";const q="_searchableDropdown_13fbr_1",M="_dropdownTrigger_13fbr_17",$="_open_13fbr_45",L="_dropdownValue_13fbr_52",F="_placeholder_13fbr_61",K="_dropdownArrow_13fbr_67",H="_dropdownMenu_13fbr_83",P="_dropdownSearch_13fbr_101",z="_searchInput_13fbr_111",B="_searchIcon_13fbr_136",U="_dropdownOptions_13fbr_152",W="_dropdownOption_13fbr_152",G="_selected_13fbr_221",J="_highlighted_13fbr_243",Q="_checkIcon_13fbr_256",X="_dropdownNoResults_13fbr_276",Y="_loading_13fbr_390",o={searchableDropdown:q,dropdownTrigger:M,open:$,dropdownValue:L,placeholder:F,dropdownArrow:K,dropdownMenu:H,dropdownSearch:P,searchInput:z,searchIcon:B,dropdownOptions:U,dropdownOption:W,selected:G,highlighted:J,checkIcon:Q,dropdownNoResults:X,loading:Y};function Z({label:C,value:m,onChange:k,options:w,placeholder:N="Select...",allowEmpty:j=!0,disabled:u=!1,loading:g=!1,error:D=!1}){const[t,i]=r.useState(!1),[_,d]=r.useState(""),[c,l]=r.useState(-1),h=r.useRef(null),f=r.useRef(null),b=w.find(e=>e.value===m),y=b?b.label:"",v=w.filter(e=>e.label.toLowerCase().includes(_.toLowerCase())),s=j?[{label:"(none)",value:""},...v]:v;r.useEffect(()=>{function e(a){h.current&&!h.current.contains(a.target)&&(i(!1),d(""))}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),r.useEffect(()=>{t&&f.current&&f.current.focus()},[t]);const x=e=>{k(e),i(!1),d(""),l(-1)},I=e=>{if(t)switch(e.key){case"ArrowDown":e.preventDefault(),l(a=>a<s.length-1?a+1:0);break;case"ArrowUp":e.preventDefault(),l(a=>a>0?a-1:s.length-1);break;case"Enter":e.preventDefault(),c>=0&&c<s.length&&x(s[c].value);break;case"Escape":e.preventDefault(),i(!1),d(""),l(-1);break}},O=()=>{const e=[o.dropdownTrigger];return t&&e.push(o.open),g&&e.push(o.loading),D&&e.push(o.error),e.join(" ")};return n.jsxs("div",{className:o.searchableDropdown,ref:h,onKeyDown:I,children:[n.jsx("label",{children:C}),n.jsxs(p.button,{type:"button",className:O(),onClick:()=>!u&&!g&&i(!t),whileTap:{scale:u?1:.98},style:{willChange:"transform"},disabled:u,children:[n.jsx("span",{className:`${o.dropdownValue} ${y?"":o.placeholder}`,children:y||N}),n.jsx(V,{className:o.dropdownArrow})]}),n.jsx(R,{children:t&&n.jsxs(p.div,{className:o.dropdownMenu,initial:{opacity:0,y:-10,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-10,scale:.95},transition:{duration:.2,ease:"easeOut"},children:[n.jsxs("div",{className:o.dropdownSearch,children:[n.jsx(A,{className:o.searchIcon}),n.jsx("input",{ref:f,type:"text",className:o.searchInput,placeholder:"Cerca...",value:_,onChange:e=>d(e.target.value),onClick:e=>e.stopPropagation()})]}),n.jsxs("div",{className:o.dropdownOptions,children:[s.map((e,a)=>{const S=m===e.value,E=c===a;return n.jsxs(p.button,{type:"button",className:`${o.dropdownOption} ${S?o.selected:""} ${E?o.highlighted:""}`,onClick:()=>x(e.value),onMouseEnter:()=>l(a),initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:a*.02},whileTap:{scale:.98},style:{willChange:"transform"},children:[n.jsx("span",{children:e.label}),S&&n.jsx(T,{className:o.checkIcon})]},`${e.value}-${a}`)}),s.length===0&&n.jsx(p.div,{className:o.dropdownNoResults,initial:{opacity:0},animate:{opacity:1},children:"No results found"})]})]})})]})}Z.__docgenInfo={description:`SearchableDropdown component - Modern filterable dropdown with animations
|
|
2
2
|
|
|
3
3
|
@component
|
|
4
4
|
@description
|