@stfrigerio/sito-template 0.1.91 → 0.1.92
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/atoms/NumberStepper/NumberStepper.d.ts +7 -1
- package/dist/components/atoms/NumberStepper/NumberStepper.d.ts.map +1 -1
- package/dist/components/atoms/NumberStepper/NumberStepper.stories.d.ts +1 -0
- package/dist/components/atoms/NumberStepper/NumberStepper.stories.d.ts.map +1 -1
- package/dist/index.esm.js +68 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +68 -2
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/storybook-static/assets/{ASCIIText.stories-BLhk-_-8.js → ASCIIText.stories-DS6PKwKU.js} +1 -1
- package/storybook-static/assets/{AllAtoms.stories-D3WpZDCA.js → AllAtoms.stories-DrFHJiDs.js} +1 -1
- package/storybook-static/assets/{AnimatedContent.stories-CP7EoDJt.js → AnimatedContent.stories-Bb5lqCKx.js} +1 -1
- package/storybook-static/assets/{AnimatedList.stories-BI31HMYh.js → AnimatedList.stories-DJkoBtei.js} +1 -1
- package/storybook-static/assets/{Antigravity.stories-BLmC3cmV.js → Antigravity.stories-BLvbQ9YB.js} +1 -1
- package/storybook-static/assets/{ArrayInput.stories-CvwGKfzo.js → ArrayInput.stories-B5pNyAze.js} +1 -1
- package/storybook-static/assets/{Aurora.stories-C1RfZv8O.js → Aurora.stories-DOHJXqvr.js} +1 -1
- package/storybook-static/assets/{Beams.stories-BuxqbhbT.js → Beams.stories-CGNMYgOv.js} +1 -1
- package/storybook-static/assets/{BlobCursor.stories-BL5YhMMw.js → BlobCursor.stories-dcrejpq7.js} +1 -1
- package/storybook-static/assets/{BlurText.stories-BDFunuOm.js → BlurText.stories-DJr3FXdo.js} +1 -1
- package/storybook-static/assets/{BooleansHeatmap.stories-6Ysc7eGE.js → BooleansHeatmap.stories-CpoG-DgR.js} +1 -1
- package/storybook-static/assets/{BorderGlow.stories-ct_z7nxy.js → BorderGlow.stories-BTSlFFi4.js} +1 -1
- package/storybook-static/assets/{BubbleMenu.stories-lPYIralX.js → BubbleMenu.stories-CeVILBYy.js} +1 -1
- package/storybook-static/assets/{Button-vLxMQ8Fs.js → Button-D525Iqpn.js} +1 -1
- package/storybook-static/assets/{Button.stories-B0V5k4wq.js → Button.stories-ChCAVNXs.js} +1 -1
- package/storybook-static/assets/{Calendar.stories-BqvLEhGB.js → Calendar.stories-BlHY5C0U.js} +1 -1
- package/storybook-static/assets/{Card-BrmLO89R.js → Card-CjffdXB7.js} +1 -1
- package/storybook-static/assets/{Card.stories-DpiApe7X.js → Card.stories-rOlWXfMP.js} +1 -1
- package/storybook-static/assets/{CardNav.stories-Py7TTH2w.js → CardNav.stories-DRRMul75.js} +1 -1
- package/storybook-static/assets/{Carousel.stories-DjyacD8h.js → Carousel.stories-C5CWDQiq.js} +1 -1
- package/storybook-static/assets/{Checkbox-DLQ14R0G.js → Checkbox-DKOVfxSY.js} +1 -1
- package/storybook-static/assets/{Checkbox.stories-DrM4TeZi.js → Checkbox.stories-m98Pj5ef.js} +1 -1
- package/storybook-static/assets/{ChromaGrid.stories-Ze8fmS6s.js → ChromaGrid.stories-wpQmqgi4.js} +1 -1
- package/storybook-static/assets/{CircularGallery.stories-ekVZRye5.js → CircularGallery.stories-B6pslaMt.js} +1 -1
- package/storybook-static/assets/{CircularText.stories-BHgJlkUv.js → CircularText.stories-BLEbYtyX.js} +1 -1
- package/storybook-static/assets/{ClickSpark.stories-CflDbg4q.js → ClickSpark.stories-C5fUtt87.js} +1 -1
- package/storybook-static/assets/{ColorBends.stories-BhipTjZ1.js → ColorBends.stories-Ce4Jd7Fr.js} +1 -1
- package/storybook-static/assets/{CountUp.stories-B036c336.js → CountUp.stories-Do2_qQjz.js} +1 -1
- package/storybook-static/assets/{Counter.stories-Bstueg99.js → Counter.stories-CQ2GhVVa.js} +1 -1
- package/storybook-static/assets/{Crosshair.stories-CPWhrXdt.js → Crosshair.stories-CYCA4xgq.js} +1 -1
- package/storybook-static/assets/{Cubes.stories-DJuQHGWr.js → Cubes.stories-Bj77Cir8.js} +1 -1
- package/storybook-static/assets/{CurvedLoop.stories-BAS_OSVU.js → CurvedLoop.stories-DsHmymPV.js} +1 -1
- package/storybook-static/assets/{DarkVeil.stories-NMKhq3Ej.js → DarkVeil.stories-CnMX8wrd.js} +1 -1
- package/storybook-static/assets/{DateInput-Cq8WGPZT.js → DateInput-C-xz4vSu.js} +1 -1
- package/storybook-static/assets/{DateInput.stories-HcLQrN8Y.js → DateInput.stories-Ay_Mv13Z.js} +1 -1
- package/storybook-static/assets/{DecayCard.stories-BJ_U3OJP.js → DecayCard.stories-DqTyCGSl.js} +1 -1
- package/storybook-static/assets/{DecryptedText.stories-CQlxcOLb.js → DecryptedText.stories-C21i-eTk.js} +1 -1
- package/storybook-static/assets/{Dither.stories-CUpLJWB6.js → Dither.stories-ChNokkIq.js} +1 -1
- package/storybook-static/assets/{Dock.stories-DWA-3h5s.js → Dock.stories-CuEtIuJC.js} +1 -1
- package/storybook-static/assets/{EditFAB.stories-nODkT2mw.js → EditFAB.stories-CG7EIOnU.js} +1 -1
- package/storybook-static/assets/{EvilEye.stories-CA6iEV_b.js → EvilEye.stories-BQbB2RiW.js} +1 -1
- package/storybook-static/assets/{FadeContent.stories-m8DpQtzk.js → FadeContent.stories-DOWAHF80.js} +1 -1
- package/storybook-static/assets/{FaultyTerminal.stories-BPh7t1ld.js → FaultyTerminal.stories-BB7GvYFh.js} +1 -1
- package/storybook-static/assets/{Fbo-DUH6k6gT.js → Fbo-BSMI-lKX.js} +1 -1
- package/storybook-static/assets/{FloatingLines.stories-B7BKnNUh.js → FloatingLines.stories-BKon9NC5.js} +1 -1
- package/storybook-static/assets/{FlowingMenu.stories-BdLWaGO2.js → FlowingMenu.stories-CKV_KIVZ.js} +1 -1
- package/storybook-static/assets/{FluidGlass.stories-COGdHY17.js → FluidGlass.stories-B8qio5yw.js} +1 -1
- package/storybook-static/assets/{Folder.stories-C31zDusU.js → Folder.stories-ZQS0AM-a.js} +1 -1
- package/storybook-static/assets/{FuzzyText.stories-eKUdt7mD.js → FuzzyText.stories-CPd1jjDy.js} +1 -1
- package/storybook-static/assets/{Galaxy.stories-DwjHbsIJ.js → Galaxy.stories-BjSQ32YT.js} +1 -1
- package/storybook-static/assets/{GhostCursor.stories-nULIo0FI.js → GhostCursor.stories-D1QQf5Tw.js} +1 -1
- package/storybook-static/assets/{GlareHover.stories-D9DWbLxz.js → GlareHover.stories-PuAjxMdy.js} +1 -1
- package/storybook-static/assets/{GlassSurface.stories-DJOJzS8s.js → GlassSurface.stories-y6ItJTQH.js} +1 -1
- package/storybook-static/assets/{GlitchText.stories-yZPxA0AS.js → GlitchText.stories-CBTXUYas.js} +1 -1
- package/storybook-static/assets/{GooeyNav.stories-CRAedy7b.js → GooeyNav.stories-DYDb-OgF.js} +1 -1
- package/storybook-static/assets/{GradientBlinds.stories-h3Yt_vSs.js → GradientBlinds.stories-DPkahBup.js} +1 -1
- package/storybook-static/assets/{GradientText.stories-BEeKhdMJ.js → GradientText.stories-DkOMAD18.js} +1 -1
- package/storybook-static/assets/{Grainient.stories-Cp2yTVDl.js → Grainient.stories-C3sVgQ5n.js} +1 -1
- package/storybook-static/assets/{GridMotion.stories-DJUnHfFo.js → GridMotion.stories-C1dJ2Flq.js} +1 -1
- package/storybook-static/assets/{HabitTimeOfDayChart.stories-BrqL4w3a.js → HabitTimeOfDayChart.stories-CNKpy5cj.js} +1 -1
- package/storybook-static/assets/{ImageSlideshow.stories-gQXwFTLB.js → ImageSlideshow.stories-wXuHrjrT.js} +1 -1
- package/storybook-static/assets/{Iridescence.stories-pTK0G8uT.js → Iridescence.stories-DUD35_gm.js} +1 -1
- package/storybook-static/assets/{LaserFlow.stories-Dbe_WCur.js → LaserFlow.stories-osgfpSGs.js} +1 -1
- package/storybook-static/assets/{LetterGlitch.stories-DLUpUmgD.js → LetterGlitch.stories-BivjkHPU.js} +1 -1
- package/storybook-static/assets/{LightPillar.stories-BPipvzvZ.js → LightPillar.stories-Bytbcotf.js} +1 -1
- package/storybook-static/assets/{LightRays.stories-CDpyNXQn.js → LightRays.stories-DduURucq.js} +1 -1
- package/storybook-static/assets/{Lightning.stories-dSA3BJ_T.js → Lightning.stories-j3DQGiXS.js} +1 -1
- package/storybook-static/assets/{LineWaves.stories-oyTEorUS.js → LineWaves.stories-DSs4pglo.js} +1 -1
- package/storybook-static/assets/{LiquidChrome.stories-zjeXZFY4.js → LiquidChrome.stories-D-GStp9L.js} +1 -1
- package/storybook-static/assets/{LiquidEther.stories-BmBbxRgU.js → LiquidEther.stories-B17eeTZt.js} +1 -1
- package/storybook-static/assets/{LoadingSpinner-DmtEv_uk.js → LoadingSpinner-ChXOn6wT.js} +1 -1
- package/storybook-static/assets/{LoadingSpinner.stories-ByRAK_bi.js → LoadingSpinner.stories-fgmdft7n.js} +1 -1
- package/storybook-static/assets/{MagicRings.stories-VD7o7YjX.js → MagicRings.stories-DESHELsv.js} +1 -1
- package/storybook-static/assets/{Magnet.stories-ghUALhEj.js → Magnet.stories-C3zOSVQx.js} +1 -1
- package/storybook-static/assets/{MagnetLines.stories-uAdKIE6_.js → MagnetLines.stories-dAWX2Rp5.js} +1 -1
- package/storybook-static/assets/{Masonry.stories-CHeAJPv9.js → Masonry.stories-C8aw95AH.js} +1 -1
- package/storybook-static/assets/{MetaBalls.stories-CdwG57Ci.js → MetaBalls.stories-D2eKxHo8.js} +1 -1
- package/storybook-static/assets/{MetallicPaint.stories-Bn_kNVQQ.js → MetallicPaint.stories-DeqydVi1.js} +1 -1
- package/storybook-static/assets/{MoodChart.stories-wCOpZc3B.js → MoodChart.stories-CL3QXDIs.js} +1 -1
- package/storybook-static/assets/{MotionConfigContext-DVDBJqit.js → MotionConfigContext-DB6N0pLF.js} +1 -1
- package/storybook-static/assets/{Navbar.stories-CSjUIPAJ.js → Navbar.stories-CliXWWgy.js} +1 -1
- package/storybook-static/assets/{Noise.stories-BOsItOtK.js → Noise.stories-Bfi-LamT.js} +1 -1
- package/storybook-static/assets/NumberStepper-4fnyIJJO.js +110 -0
- package/storybook-static/assets/NumberStepper-npsjAl71.css +1 -0
- package/storybook-static/assets/NumberStepper.stories-B2lWci0K.js +132 -0
- package/storybook-static/assets/{Orb.stories-BVBlfR5H.js → Orb.stories-Cp-wzDOT.js} +1 -1
- package/storybook-static/assets/{OrbitImages.stories-DpTvAANz.js → OrbitImages.stories-ClsevyaQ.js} +1 -1
- package/storybook-static/assets/{PieChart.stories-E-y4pmfg.js → PieChart.stories-09y0TL7u.js} +1 -1
- package/storybook-static/assets/{PixelBlast.stories-BKf3AS7Z.js → PixelBlast.stories-D1QQwLoP.js} +1 -1
- package/storybook-static/assets/{PixelCard.stories-DfO_O3-K.js → PixelCard.stories-CH5Sg5GN.js} +1 -1
- package/storybook-static/assets/{PixelSnow.stories-Ck8tisB3.js → PixelSnow.stories-Bca-02wN.js} +1 -1
- package/storybook-static/assets/{PixelTransition.stories-DyvfwKPz.js → PixelTransition.stories-DkKFsCJR.js} +1 -1
- package/storybook-static/assets/{Plasma.stories-B3pfWknX.js → Plasma.stories-BgnRvKDQ.js} +1 -1
- package/storybook-static/assets/{Prism.stories-z9NM-bp9.js → Prism.stories-BdRwwSCa.js} +1 -1
- package/storybook-static/assets/{PrismaticBurst.stories-Bo80XrnP.js → PrismaticBurst.stories-D39DjhAU.js} +1 -1
- package/storybook-static/assets/{ProfileCard.stories-DSkhRZJS.js → ProfileCard.stories-I4bxA8op.js} +1 -1
- package/storybook-static/assets/{QuantifiableHabitsChart.stories-B_lXXF5P.js → QuantifiableHabitsChart.stories-Cllmtvh0.js} +1 -1
- package/storybook-static/assets/{Radar.stories-CN4k-nzK.js → Radar.stories-DyIZ-jT0.js} +1 -1
- package/storybook-static/assets/{Ribbons.stories-D3ewY-VD.js → Ribbons.stories-BljedyHc.js} +1 -1
- package/storybook-static/assets/{RippleGrid.stories-BWbAOPiq.js → RippleGrid.stories-BXm5o8bp.js} +1 -1
- package/storybook-static/assets/{RotatingText.stories-BFu3fFbG.js → RotatingText.stories-DkO6XMUU.js} +1 -1
- package/storybook-static/assets/{ScrollFloat.stories-u8FD1a8T.js → ScrollFloat.stories-Cgw84k7u.js} +1 -1
- package/storybook-static/assets/{ScrollReveal.stories-B8CFq9jS.js → ScrollReveal.stories-BHnKnXtA.js} +1 -1
- package/storybook-static/assets/{ScrollVelocity.stories-KE5_FASH.js → ScrollVelocity.stories-DiZJl-9S.js} +1 -1
- package/storybook-static/assets/{SearchBar.stories-B1ot4CJ4.js → SearchBar.stories-BQsiIlwP.js} +1 -1
- package/storybook-static/assets/{SearchableDropdown-DN4H1nN5.js → SearchableDropdown-CeOFD_sw.js} +1 -1
- package/storybook-static/assets/{SearchableDropdown.stories-DZV9YaJ7.js → SearchableDropdown.stories-VQe00AyW.js} +1 -1
- package/storybook-static/assets/{SelectInput-B8dhW1ER.js → SelectInput-DXTJ06RT.js} +1 -1
- package/storybook-static/assets/{SelectInput.stories-CiO3rQgU.js → SelectInput.stories-I6Bw2OzJ.js} +1 -1
- package/storybook-static/assets/{ShapeBlur.stories-D-jj6-FC.js → ShapeBlur.stories-x1Dlk4LM.js} +1 -1
- package/storybook-static/assets/{ShapeGrid.stories-BtGFwIZy.js → ShapeGrid.stories-MmiIoKpt.js} +1 -1
- package/storybook-static/assets/{ShinyText.stories-zv3kciQD.js → ShinyText.stories-DUsdF6pL.js} +1 -1
- package/storybook-static/assets/{Silk.stories-yradnlk0.js → Silk.stories-DT7aU7XR.js} +1 -1
- package/storybook-static/assets/{SleepChart.stories-C6dDcboO.js → SleepChart.stories-CWVatcLl.js} +1 -1
- package/storybook-static/assets/{Slider-BfOITAVn.js → Slider-DOrGT7Vq.js} +1 -1
- package/storybook-static/assets/{Slider.stories-CoWYSeeR.js → Slider.stories-BLLSd28M.js} +1 -1
- package/storybook-static/assets/{SoftAurora.stories-BkoPAhEV.js → SoftAurora.stories-Bm7PCCro.js} +1 -1
- package/storybook-static/assets/{SoundDemo.stories-DiFpBxdj.js → SoundDemo.stories-lRgi5gqA.js} +1 -1
- package/storybook-static/assets/{SplashCursor.stories-hHkYEI-i.js → SplashCursor.stories-TuIY14pV.js} +1 -1
- package/storybook-static/assets/{SpotlightCard.stories-VkyQhZtu.js → SpotlightCard.stories-DXKhzX_3.js} +1 -1
- package/storybook-static/assets/{Stack.stories-C8FkvgjE.js → Stack.stories-MZEjIDr3.js} +1 -1
- package/storybook-static/assets/{StaggeredMenu.stories-BSaTWQyV.js → StaggeredMenu.stories-ClpZFa11.js} +1 -1
- package/storybook-static/assets/{StarBorder.stories-D2mEV8DM.js → StarBorder.stories-DL3U2HbY.js} +1 -1
- package/storybook-static/assets/{SunburstChart.stories-ByRQ_-DE.js → SunburstChart.stories-D6KOqKbs.js} +1 -1
- package/storybook-static/assets/{Table.stories-DVKrM8IC.js → Table.stories-CqSXB1nt.js} +1 -1
- package/storybook-static/assets/{Tabs.stories-COPqPwsu.js → Tabs.stories-Bn7OLUUo.js} +1 -1
- package/storybook-static/assets/{TargetCursor.stories-C3gp2Bty.js → TargetCursor.stories-C3lW7FT9.js} +1 -1
- package/storybook-static/assets/{TextArea-BEvP_pc9.js → TextArea-d4CtAkto.js} +1 -1
- package/storybook-static/assets/{TextArea.stories-V58eVB4Y.js → TextArea.stories-CdWSIys-.js} +1 -1
- package/storybook-static/assets/{TextCursor.stories-K4PXRawQ.js → TextCursor.stories-N8sr2Ymk.js} +1 -1
- package/storybook-static/assets/{TextInput-p6Li6-sb.js → TextInput-9d9HlxUg.js} +1 -1
- package/storybook-static/assets/{TextInput.stories-CRTDogm9.js → TextInput.stories-BEZtFbqx.js} +1 -1
- package/storybook-static/assets/{TextPressure.stories-JIXn7KOF.js → TextPressure.stories-C7BYCrxm.js} +1 -1
- package/storybook-static/assets/{TextType.stories-Caip0TNZ.js → TextType.stories-5J8TChRn.js} +1 -1
- package/storybook-static/assets/{ThemeSwitcher.stories-DONe8HoM.js → ThemeSwitcher.stories-Cqp8F8sy.js} +1 -1
- package/storybook-static/assets/{Threads.stories-CDMUeoYG.js → Threads.stories-Df3smqGG.js} +1 -1
- package/storybook-static/assets/{TimeInput.stories-6PDhhwME.js → TimeInput.stories-DRPuNKtP.js} +1 -1
- package/storybook-static/assets/{Toggle-BuC7M7sv.js → Toggle-C_ahV1P7.js} +1 -1
- package/storybook-static/assets/{Toggle.stories-CNvsMWHM.js → Toggle.stories-CqhkDcFh.js} +1 -1
- package/storybook-static/assets/{ToggleButton-DZd6L6CW.js → ToggleButton-B--4QvFn.js} +1 -1
- package/storybook-static/assets/{ToggleButton.stories-IEmytWV2.js → ToggleButton.stories-IslTvc_C.js} +1 -1
- package/storybook-static/assets/{TrueFocus.stories-Dyn2VeKL.js → TrueFocus.stories-BLQ66-d_.js} +1 -1
- package/storybook-static/assets/{VariableProximity.stories-DQ33cDY0.js → VariableProximity.stories-B81E78o0.js} +1 -1
- package/storybook-static/assets/{Waves.stories-CgA5p9xN.js → Waves.stories-CpeAaf_H.js} +1 -1
- package/storybook-static/assets/{calendar-CHUkKXBu.js → calendar-4XC8Mkj6.js} +1 -1
- package/storybook-static/assets/{chart-column-DoD4xgx9.js → chart-column-B2WDBpFQ.js} +1 -1
- package/storybook-static/assets/{check-HVUn4UKb.js → check-_kkyRqZ_.js} +1 -1
- package/storybook-static/assets/{chevron-down-C6D_uZOC.js → chevron-down-CruOyKs7.js} +1 -1
- package/storybook-static/assets/{chevron-right-EV_bvd23.js → chevron-right-CcQxRu31.js} +1 -1
- package/storybook-static/assets/client-C_5Aa9Ru.js +1 -0
- package/storybook-static/assets/{createLucideIcon-j6VrMPED.js → createLucideIcon-CFZS1svj.js} +1 -1
- package/storybook-static/assets/{download-Ut-YGNnW.js → download-CsSci67I.js} +1 -1
- package/storybook-static/assets/{folder-D_gMP_qz.js → folder-HRONRT2G.js} +1 -1
- package/storybook-static/assets/{iconBase-DJ-DKcPB.js → iconBase-CHBkZvTa.js} +1 -1
- package/storybook-static/assets/{iframe-Zn3GJWM2.js → iframe-DCO8d1R5.js} +3 -3
- package/storybook-static/assets/{index-BzgjogGt.js → index-BIaWf3NB.js} +1 -1
- package/storybook-static/assets/{index-C38-gWmM.js → index-DCuqA_p7.js} +1 -1
- package/storybook-static/assets/{index-a2ifD9DM.js → index-OWzXTcHx.js} +1 -1
- package/storybook-static/assets/{proxy-BCFpov0w.js → proxy-B6sP67Ax.js} +1 -1
- package/storybook-static/assets/{react-18-CrFj3dcf.js → react-18-Cctr6w_a.js} +1 -1
- package/storybook-static/assets/{react-three-fiber.esm-DzIADhh6.js → react-three-fiber.esm-Cntc3NAA.js} +1 -1
- package/storybook-static/assets/{search-DUbd7cgl.js → search-BwPY2-JU.js} +1 -1
- package/storybook-static/assets/{settings-OmJwquEb.js → settings-BEj3KS2b.js} +1 -1
- package/storybook-static/assets/{sun-nyj3m7iM.js → sun-CZ-0vLTu.js} +1 -1
- package/storybook-static/assets/{trash-2-BGWx6Zub.js → trash-2-BIdN1Vyk.js} +1 -1
- package/storybook-static/assets/{use-animation-frame-Cn6re8pO.js → use-animation-frame-DMki3Iun.js} +1 -1
- package/storybook-static/assets/{use-in-view-DYuzhDQn.js → use-in-view-CIJjNrpU.js} +1 -1
- package/storybook-static/assets/{use-motion-value-BO1oiuxy.js → use-motion-value-FzzU2SpS.js} +1 -1
- package/storybook-static/assets/{use-spring-BbZmzuPL.js → use-spring-B_f1XB-f.js} +1 -1
- package/storybook-static/assets/{use-transform-DAeGwzHV.js → use-transform-C7wZoy8k.js} +1 -1
- package/storybook-static/assets/{useSound-HWRpxeYt.js → useSound-CkI29gk1.js} +1 -1
- package/storybook-static/assets/{users-7JHLliY9.js → users-BAAjnPwS.js} +1 -1
- package/storybook-static/assets/{x-D4gHCqy9.js → x-DAW9_pxz.js} +1 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.json +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/assets/NumberStepper-BO5RBIZk.css +0 -1
- package/storybook-static/assets/NumberStepper-M1vT7XWn.js +0 -110
- package/storybook-static/assets/NumberStepper.stories-B1Luia2c.js +0 -88
- package/storybook-static/assets/client-EjEXcOqs.js +0 -1
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import{j as e,r as n}from"./iframe-DCO8d1R5.js";import{N as t}from"./NumberStepper-4fnyIJJO.js";import"./preload-helper-C1FmrZbK.js";import"./useSound-CkI29gk1.js";import"./proxy-B6sP67Ax.js";import"./MotionConfigContext-DB6N0pLF.js";import"./index-BIaWf3NB.js";const G={title:"Atoms/NumberStepper",component:t,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","tally"]},showPlusMinus:{control:"boolean"},allowKeyboard:{control:"boolean"}}},b=a=>{const[l,r]=n.useState(a.value||0);return e.jsx(t,{...a,value:l,onChange:s=>{var o;r(s),(o=a.onChange)==null||o.call(a,s)}})},i={render:a=>e.jsx(b,{...a}),args:{value:5,min:0,max:10,step:1}},c={render:a=>e.jsx(b,{...a}),args:{value:5,min:0,max:100,step:1,label:"Cigarettes",icon:"🚬"}},p={render:()=>{const[a,l]=n.useState(0),[r,s]=n.useState(0),[o,m]=n.useState(7);return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:[e.jsx(t,{value:a,onChange:l,min:0,max:10,step:1,label:"Glasses of Water",icon:"💧",variant:"filled"}),e.jsx(t,{value:r,onChange:s,min:0,max:120,step:15,label:"Exercise (minutes)",icon:"🏃",variant:"outlined"}),e.jsx(t,{value:o,onChange:m,min:0,max:12,step:.5,label:"Hours of Sleep",icon:"😴"})]})}},u={render:()=>{const[a,l]=n.useState(3),[r,s]=n.useState(1),[o,m]=n.useState(2),[g,R]=n.useState(0),A=a+r+o+g;return e.jsxs("div",{style:{width:520,padding:24,background:"#0d1320",color:"#e6e6e6",borderRadius:12,fontFamily:"var(--font-family-primary)"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",fontSize:11,letterSpacing:"0.1em",textTransform:"uppercase",color:"#7a7e8a",marginBottom:12},children:[e.jsx("span",{children:"Counts — tap row to log"}),e.jsxs("span",{children:[A," today"]})]}),e.jsx(t,{variant:"tally",icon:"🚬",label:"Cigarettes",value:a,onChange:l,color:"#fd4545",min:0}),e.jsx(t,{variant:"tally",icon:"🌿",label:"Herbs",value:r,onChange:s,color:"#22c55e",min:0}),e.jsx(t,{variant:"tally",icon:"☕",label:"Coffees",value:o,onChange:m,color:"#f5b829",min:0}),e.jsx(t,{variant:"tally",icon:"🍷",label:"Alcohols",value:g,onChange:R,color:"#fce390",min:0}),e.jsx("div",{style:{display:"flex",justifyContent:"space-between",marginTop:10,fontSize:10,letterSpacing:"0.1em",textTransform:"uppercase",color:"#7a7e8a"},children:e.jsx("span",{children:"Long-press to subtract"})})]})}},d={render:a=>e.jsx(b,{...a}),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 x,f,S;i.parameters={...i.parameters,docs:{...(x=i.parameters)==null?void 0:x.docs,source:{originalSource:`{
|
|
2
|
+
render: args => <NumberStepperWrapper {...args} />,
|
|
3
|
+
args: {
|
|
4
|
+
value: 5,
|
|
5
|
+
min: 0,
|
|
6
|
+
max: 10,
|
|
7
|
+
step: 1
|
|
8
|
+
}
|
|
9
|
+
}`,...(S=(f=i.parameters)==null?void 0:f.docs)==null?void 0:S.source}}};var h,v,y;c.parameters={...c.parameters,docs:{...(h=c.parameters)==null?void 0:h.docs,source:{originalSource:`{
|
|
10
|
+
render: args => <NumberStepperWrapper {...args} />,
|
|
11
|
+
args: {
|
|
12
|
+
value: 5,
|
|
13
|
+
min: 0,
|
|
14
|
+
max: 100,
|
|
15
|
+
step: 1,
|
|
16
|
+
label: 'Cigarettes',
|
|
17
|
+
icon: '🚬'
|
|
18
|
+
}
|
|
19
|
+
}`,...(y=(v=c.parameters)==null?void 0:v.docs)==null?void 0:y.source}}};var C,j,w;p.parameters={...p.parameters,docs:{...(C=p.parameters)==null?void 0:C.docs,source:{originalSource:`{
|
|
20
|
+
render: () => {
|
|
21
|
+
const [water, setWater] = useState(0);
|
|
22
|
+
const [exercise, setExercise] = useState(0);
|
|
23
|
+
const [sleep, setSleep] = useState(7);
|
|
24
|
+
return <div style={{
|
|
25
|
+
display: 'flex',
|
|
26
|
+
flexDirection: 'column',
|
|
27
|
+
gap: '20px'
|
|
28
|
+
}}>
|
|
29
|
+
<NumberStepper value={water} onChange={setWater} min={0} max={10} step={1} label="Glasses of Water" icon="💧" variant="filled" />
|
|
30
|
+
<NumberStepper value={exercise} onChange={setExercise} min={0} max={120} step={15} label="Exercise (minutes)" icon="🏃" variant="outlined" />
|
|
31
|
+
<NumberStepper value={sleep} onChange={setSleep} min={0} max={12} step={0.5} label="Hours of Sleep" icon="😴" />
|
|
32
|
+
</div>;
|
|
33
|
+
}
|
|
34
|
+
}`,...(w=(j=p.parameters)==null?void 0:j.docs)==null?void 0:w.source}}};var N,H,T;u.parameters={...u.parameters,docs:{...(N=u.parameters)==null?void 0:N.docs,source:{originalSource:`{
|
|
35
|
+
render: () => {
|
|
36
|
+
const [cigs, setCigs] = useState(3);
|
|
37
|
+
const [herbs, setHerbs] = useState(1);
|
|
38
|
+
const [coffees, setCoffees] = useState(2);
|
|
39
|
+
const [alcohols, setAlcohols] = useState(0);
|
|
40
|
+
const total = cigs + herbs + coffees + alcohols;
|
|
41
|
+
return <div style={{
|
|
42
|
+
width: 520,
|
|
43
|
+
padding: 24,
|
|
44
|
+
background: '#0d1320',
|
|
45
|
+
color: '#e6e6e6',
|
|
46
|
+
borderRadius: 12,
|
|
47
|
+
fontFamily: 'var(--font-family-primary)'
|
|
48
|
+
}}>
|
|
49
|
+
<div style={{
|
|
50
|
+
display: 'flex',
|
|
51
|
+
justifyContent: 'space-between',
|
|
52
|
+
fontSize: 11,
|
|
53
|
+
letterSpacing: '0.1em',
|
|
54
|
+
textTransform: 'uppercase',
|
|
55
|
+
color: '#7a7e8a',
|
|
56
|
+
marginBottom: 12
|
|
57
|
+
}}>
|
|
58
|
+
<span>Counts — tap row to log</span>
|
|
59
|
+
<span>{total} today</span>
|
|
60
|
+
</div>
|
|
61
|
+
<NumberStepper variant="tally" icon="🚬" label="Cigarettes" value={cigs} onChange={setCigs} color="#fd4545" min={0} />
|
|
62
|
+
<NumberStepper variant="tally" icon="🌿" label="Herbs" value={herbs} onChange={setHerbs} color="#22c55e" min={0} />
|
|
63
|
+
<NumberStepper variant="tally" icon="☕" label="Coffees" value={coffees} onChange={setCoffees} color="#f5b829" min={0} />
|
|
64
|
+
<NumberStepper variant="tally" icon="🍷" label="Alcohols" value={alcohols} onChange={setAlcohols} color="#fce390" min={0} />
|
|
65
|
+
<div style={{
|
|
66
|
+
display: 'flex',
|
|
67
|
+
justifyContent: 'space-between',
|
|
68
|
+
marginTop: 10,
|
|
69
|
+
fontSize: 10,
|
|
70
|
+
letterSpacing: '0.1em',
|
|
71
|
+
textTransform: 'uppercase',
|
|
72
|
+
color: '#7a7e8a'
|
|
73
|
+
}}>
|
|
74
|
+
<span>Long-press to subtract</span>
|
|
75
|
+
</div>
|
|
76
|
+
</div>;
|
|
77
|
+
}
|
|
78
|
+
}`,...(T=(H=u.parameters)==null?void 0:H.docs)==null?void 0:T.source}}};var W,k,z;d.parameters={...d.parameters,docs:{...(W=d.parameters)==null?void 0:W.docs,source:{originalSource:`{
|
|
79
|
+
render: args => <NumberStepperWrapper {...args} />,
|
|
80
|
+
args: {
|
|
81
|
+
value: 100,
|
|
82
|
+
min: 0,
|
|
83
|
+
max: 999,
|
|
84
|
+
step: 1,
|
|
85
|
+
label: 'Health Points',
|
|
86
|
+
icon: '❤️',
|
|
87
|
+
showPlusMinus: true,
|
|
88
|
+
customStyles: {
|
|
89
|
+
container: {
|
|
90
|
+
background: '#1a1a2e',
|
|
91
|
+
border: '2px solid #16213e',
|
|
92
|
+
borderRadius: '12px',
|
|
93
|
+
padding: '16px'
|
|
94
|
+
},
|
|
95
|
+
header: {
|
|
96
|
+
marginBottom: '12px'
|
|
97
|
+
},
|
|
98
|
+
label: {
|
|
99
|
+
color: '#eaeaea',
|
|
100
|
+
fontSize: '14px',
|
|
101
|
+
textTransform: 'uppercase',
|
|
102
|
+
letterSpacing: '1px'
|
|
103
|
+
},
|
|
104
|
+
icon: {
|
|
105
|
+
filter: 'drop-shadow(0 0 10px rgba(255, 0, 0, 0.5))'
|
|
106
|
+
},
|
|
107
|
+
stepper: {
|
|
108
|
+
background: '#0f3460',
|
|
109
|
+
borderRadius: '8px',
|
|
110
|
+
padding: '8px'
|
|
111
|
+
},
|
|
112
|
+
button: {
|
|
113
|
+
background: '#e94560',
|
|
114
|
+
color: 'white',
|
|
115
|
+
border: 'none',
|
|
116
|
+
borderRadius: '6px',
|
|
117
|
+
transition: 'all 0.3s ease'
|
|
118
|
+
},
|
|
119
|
+
buttonHover: {
|
|
120
|
+
background: '#ff4666',
|
|
121
|
+
boxShadow: '0 0 20px rgba(233, 69, 96, 0.5)'
|
|
122
|
+
},
|
|
123
|
+
value: {
|
|
124
|
+
color: '#00ff00',
|
|
125
|
+
fontSize: '28px',
|
|
126
|
+
fontFamily: 'monospace',
|
|
127
|
+
fontWeight: 'bold',
|
|
128
|
+
textShadow: '0 0 10px rgba(0, 255, 0, 0.5)'
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}`,...(z=(k=d.parameters)==null?void 0:k.docs)==null?void 0:z.source}}};const I=["Default","WithLabelAndIcon","HabitTracking","Tally","CustomStyled"];export{d as CustomStyled,i as Default,p as HabitTracking,u as Tally,c as WithLabelAndIcon,I as __namedExportsOrder,G as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as E,j as D}from"./iframe-
|
|
1
|
+
import{r as E,j as D}from"./iframe-DCO8d1R5.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-DpTvAANz.js → OrbitImages.stories-ClsevyaQ.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-DCO8d1R5.js";import{u as K}from"./use-motion-value-FzzU2SpS.js";import{a as Q}from"./index-OWzXTcHx.js";import{u as U}from"./use-transform-C7wZoy8k.js";import{m as X}from"./proxy-B6sP67Ax.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-DB6N0pLF.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-E-y4pmfg.js → PieChart.stories-09y0TL7u.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-DCO8d1R5.js";import{s as S,i as K,c as X}from"./transform-QOf3tDlt.js";import{a as H}from"./array-BKyUJesY.js";import{c as b}from"./path-CbwjOpE9.js";import{t as z,a as P}from"./arc-DgcIQOLP.js";import"./preload-helper-C1FmrZbK.js";function Q(n,a){let l=0;if(a===void 0)for(let c of n)(c=+c)&&(l+=c);else{let c=-1;for(let g of n)(g=+a(g,++c,n))&&(l+=g)}return l}function W(n,a){return a<n?-1:a>n?1:a>=n?0:NaN}function Z(n){return n}function ee(){var n=Z,a=W,l=null,c=b(0),g=b(z),w=b(0);function s(e){var r,i=(e=H(e)).length,m,L,C=0,_=new Array(i),u=new Array(i),A=+c.apply(this,arguments),h=Math.min(z,Math.max(-z,g.apply(this,arguments)-A)),T,x=Math.min(Math.abs(h)/i,w.apply(this,arguments)),R=x*(h<0?-1:1),d;for(r=0;r<i;++r)(d=u[_[r]=r]=+n(e[r],r,e))>0&&(C+=d);for(a!=null?_.sort(function(t,o){return a(u[t],u[o])}):l!=null&&_.sort(function(t,o){return l(e[t],e[o])}),r=0,L=C?(h-i*R)/C:0;r<i;++r,A=T)m=_[r],d=u[m],T=A+(d>0?d*L:0)+R,u[m]={data:e[m],index:r,value:d,startAngle:A,endAngle:T,padAngle:x};return u}return s.value=function(e){return arguments.length?(n=typeof e=="function"?e:b(+e),s):n},s.sortValues=function(e){return arguments.length?(a=e,l=null,s):a},s.sort=function(e){return arguments.length?(l=e,a=null,s):l},s.startAngle=function(e){return arguments.length?(c=typeof e=="function"?e:b(+e),s):c},s.endAngle=function(e){return arguments.length?(g=typeof e=="function"?e:b(+e),s):g},s.padAngle=function(e){return arguments.length?(w=typeof e=="function"?e:b(+e),s):w},s}const te="_container_1d3zv_1",ne="_title_1d3zv_7",ae="_chartContainer_1d3zv_15",re="_chart_1d3zv_15",oe="_legend_1d3zv_26",le="_legendItem_1d3zv_31",se="_legendColor_1d3zv_45",ie="_legendLabel_1d3zv_52",ce="_legendValue_1d3zv_59",ue="_tooltip_1d3zv_65",p={container:te,title:ne,chartContainer:ae,chart:re,legend:oe,legendItem:le,legendColor:se,legendLabel:ie,legendValue:ce,tooltip:ue},f=["#6366f1","#8b5cf6","#06b6d4","#10b981","#f59e0b","#ef4444","#ec4899","#84cc16","#f97316","#3b82f6","#8b5cf6","#14b8a6","#f59e0b","#ef4444","#06b6d4","#10b981"],$=n=>{const a=X(n);if(!a)return"#ffffff";const l=a.rgb();return(.299*l.r+.587*l.g+.114*l.b)/255>.5?"#000000":"#ffffff"},G=({data:n,width:a=400,height:l=400,title:c="Distribution",showLegend:g=!0,unit:w="items",centerLabel:s})=>{const e=q.useRef(null),r=Math.min(a,l)/2-20;return q.useEffect(()=>{if(!e.current||!n.length)return;const i=S(e.current);i.selectAll("*").remove();const m=i.append("g").attr("transform",`translate(${a/2},${l/2})`),L=ee().value(t=>t.value).sort(null),C=P().innerRadius(r*.4).outerRadius(r).cornerRadius(4),_=P().innerRadius(r*.7).outerRadius(r*.7),u=S("body").append("div").attr("class",p.tooltip).style("opacity",0).style("position","absolute"),A=L(n),h=Q(n,t=>t.value),T=m.selectAll(".arc").data(A).enter().append("g").attr("class","arc");T.append("path").attr("d",t=>C(t)).attr("fill",(t,o)=>t.data.color||f[o%f.length]).attr("stroke","var(--bg-primary)").attr("stroke-width",3).style("cursor","pointer").style("filter","drop-shadow(0 2px 8px rgba(0,0,0,0.15))").on("mouseover",function(t,o){const y=P().innerRadius(r*.4).outerRadius(r*1.05).cornerRadius(4);S(this).transition().duration(200).attr("d",M=>y(M)).style("filter","drop-shadow(0 4px 12px rgba(0,0,0,0.25))"),u.transition().duration(200).style("opacity",1);const V=(o.data.value/h*100).toFixed(1);u.html(`
|
|
2
2
|
<div><strong>${o.data.name}</strong></div>
|
|
3
3
|
<div>Value: ${o.data.value.toLocaleString()}</div>
|
|
4
4
|
<div>${V}% of total</div>
|
package/storybook-static/assets/{PixelBlast.stories-BKf3AS7Z.js → PixelBlast.stories-D1QQwLoP.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-DCO8d1R5.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-DfO_O3-K.js → PixelCard.stories-CH5Sg5GN.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-DCO8d1R5.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-Ck8tisB3.js → PixelSnow.stories-Bca-02wN.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-DCO8d1R5.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-DCO8d1R5.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-DCO8d1R5.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-DCO8d1R5.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-DCO8d1R5.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-DSkhRZJS.js → ProfileCard.stories-I4bxA8op.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-DCO8d1R5.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,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as d,j as n}from"./iframe-
|
|
1
|
+
import{r as d,j as n}from"./iframe-DCO8d1R5.js";import{s as Y}from"./transform-QOf3tDlt.js";import{t as be,e as ke,l as Se,m as Te}from"./monotone-DouxdRGd.js";import{l as je}from"./linear-DhrdWH9x.js";import{C as De}from"./chart-column-B2WDBpFQ.js";import{c as H}from"./createLucideIcon-CFZS1svj.js";import{C as Ce}from"./calendar-4XC8Mkj6.js";import{t as Q}from"./defaultLocale-DJ2q5QjE.js";import{a as Ee,b as qe}from"./axis-D3QohQNI.js";import"./preload-helper-C1FmrZbK.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";/**
|
|
2
2
|
* @license lucide-react v0.539.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as y,j as W}from"./iframe-
|
|
1
|
+
import{r as y,j as W}from"./iframe-DCO8d1R5.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-DCO8d1R5.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-BWbAOPiq.js → RippleGrid.stories-BXm5o8bp.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-DCO8d1R5.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-DCO8d1R5.js";import{m as C}from"./proxy-B6sP67Ax.js";import{A as Q}from"./index-BIaWf3NB.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-DB6N0pLF.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-u8FD1a8T.js → ScrollFloat.stories-Cgw84k7u.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-DCO8d1R5.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-DCO8d1R5.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-Zn3GJWM2.js";import{u as re}from"./use-motion-value-BO1oiuxy.js";import{h as ne,j as le,i as Te,r as Ce,m as Oe}from"./proxy-BCFpov0w.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-DVDBJqit.js";import{u as ze}from"./use-spring-BbZmzuPL.js";import{u as D}from"./use-transform-DAeGwzHV.js";import{u as je}from"./use-animation-frame-Cn6re8pO.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-DCO8d1R5.js";import{u as re}from"./use-motion-value-FzzU2SpS.js";import{h as ne,j as le,i as Te,r as Ce,m as Oe}from"./proxy-B6sP67Ax.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-DB6N0pLF.js";import{u as ze}from"./use-spring-B_f1XB-f.js";import{u as D}from"./use-transform-C7wZoy8k.js";import{u as je}from"./use-animation-frame-DMki3Iun.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-B1ot4CJ4.js → SearchBar.stories-BQsiIlwP.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-DCO8d1R5.js";import{S as ee}from"./search-BwPY2-JU.js";import{F as te}from"./folder-HRONRT2G.js";import{U as se}from"./users-BAAjnPwS.js";import{c as P}from"./createLucideIcon-CFZS1svj.js";import{m as $}from"./proxy-B6sP67Ax.js";import{X as ye}from"./x-DAW9_pxz.js";import{A as fe}from"./index-BIaWf3NB.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-DB6N0pLF.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-DN4H1nN5.js → SearchableDropdown-CeOFD_sw.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r,j as n}from"./iframe-
|
|
1
|
+
import{r,j as n}from"./iframe-DCO8d1R5.js";import{m as p}from"./proxy-B6sP67Ax.js";import{C as V}from"./chevron-down-CruOyKs7.js";import{A as R}from"./index-BIaWf3NB.js";import{S as A}from"./search-BwPY2-JU.js";import{C as T}from"./check-_kkyRqZ_.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
|