@stfrigerio/sito-template 0.1.86 → 0.1.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (196) hide show
  1. package/dist/components/molecules/ThemeSwitcher/ThemeSwitcher.d.ts +1 -1
  2. package/dist/components/molecules/ThemeSwitcher/ThemeSwitcher.d.ts.map +1 -1
  3. package/dist/components/organisms/charts/QuantifiableHabitsChart/QuantifiableHabitsChart.d.ts.map +1 -1
  4. package/dist/index.esm.js +16 -7
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/index.js +15 -6
  7. package/dist/index.js.map +1 -1
  8. package/dist/styles.css +1 -1
  9. package/dist/styles.css.map +1 -1
  10. package/package.json +1 -1
  11. package/storybook-static/assets/{ASCIIText.stories-CNAYMBVz.js → ASCIIText.stories-DqfIEc4D.js} +1 -1
  12. package/storybook-static/assets/AllAtoms.stories-BapCmZF4.js +109 -0
  13. package/storybook-static/assets/{AnimatedContent.stories-V5whpU4J.js → AnimatedContent.stories-Bmwe7KqR.js} +1 -1
  14. package/storybook-static/assets/{AnimatedList.stories-BaF72SjB.js → AnimatedList.stories-jioQ6Ifb.js} +1 -1
  15. package/storybook-static/assets/{Antigravity.stories-so3-HBu3.js → Antigravity.stories-BNebeREi.js} +1 -1
  16. package/storybook-static/assets/{ArrayInput.stories-hoSUKkt7.js → ArrayInput.stories-DDFl4ohp.js} +1 -1
  17. package/storybook-static/assets/{Aurora.stories-OXWAb54U.js → Aurora.stories-CHbrxJc2.js} +1 -1
  18. package/storybook-static/assets/{Beams.stories-Cb1rkwb1.js → Beams.stories-BtUFui-7.js} +1 -1
  19. package/storybook-static/assets/{BlobCursor.stories-CWlds7X2.js → BlobCursor.stories-BOFPnl-M.js} +1 -1
  20. package/storybook-static/assets/{BlurText.stories-D5D0-11e.js → BlurText.stories-BFDFocJZ.js} +1 -1
  21. package/storybook-static/assets/{BooleansHeatmap.stories-BIq0VlsC.js → BooleansHeatmap.stories-mEDhiaag.js} +1 -1
  22. package/storybook-static/assets/{BorderGlow.stories-Bo56NGQ8.js → BorderGlow.stories-Cv1nHqH_.js} +1 -1
  23. package/storybook-static/assets/{BubbleMenu.stories-BnMDj001.js → BubbleMenu.stories-DN2Jm2dx.js} +1 -1
  24. package/storybook-static/assets/{Button-C5_5Jklb.js → Button-DBcEd-5z.js} +1 -1
  25. package/storybook-static/assets/Button-DMczctyZ.css +1 -0
  26. package/storybook-static/assets/{Button.stories-B8ClK_ci.js → Button.stories-CFIl_s9j.js} +1 -1
  27. package/storybook-static/assets/{Calendar.stories-N79FvNmQ.js → Calendar.stories-Dez66O9S.js} +1 -1
  28. package/storybook-static/assets/{Card-DyuCvfHl.js → Card-pTLwzKiA.js} +1 -1
  29. package/storybook-static/assets/{Card.stories-DNtRp8o4.js → Card.stories-lgA8u5pK.js} +1 -1
  30. package/storybook-static/assets/{CardNav.stories-BnLwIVuF.js → CardNav.stories-DlIUSY91.js} +1 -1
  31. package/storybook-static/assets/{Carousel.stories-Cv4lDtBJ.js → Carousel.stories-C_Yhe2YO.js} +1 -1
  32. package/storybook-static/assets/{Checkbox-Bvv-yQQP.js → Checkbox-aVacz-Sy.js} +1 -1
  33. package/storybook-static/assets/{Checkbox.stories-DzQtUcK6.js → Checkbox.stories-NIHVKz6Z.js} +1 -1
  34. package/storybook-static/assets/{ChromaGrid.stories-t9eQeUCp.js → ChromaGrid.stories-CD_4IrYr.js} +1 -1
  35. package/storybook-static/assets/{CircularGallery.stories-CAjtL9Aq.js → CircularGallery.stories-BknZX_uP.js} +1 -1
  36. package/storybook-static/assets/{CircularText.stories-9Mdw6YlU.js → CircularText.stories-BJgeZ57n.js} +1 -1
  37. package/storybook-static/assets/{ClickSpark.stories-BiRqEmHI.js → ClickSpark.stories-Cdodd2t7.js} +1 -1
  38. package/storybook-static/assets/{ColorBends.stories-DeABQnlv.js → ColorBends.stories-DfA4HJ3y.js} +1 -1
  39. package/storybook-static/assets/{CountUp.stories-DHCtTfD7.js → CountUp.stories-DvzARnFg.js} +1 -1
  40. package/storybook-static/assets/{Counter.stories-DJWrfm9H.js → Counter.stories-O0r087zN.js} +1 -1
  41. package/storybook-static/assets/{Crosshair.stories-CL8i9CiB.js → Crosshair.stories-Cnxr_EQu.js} +1 -1
  42. package/storybook-static/assets/{Cubes.stories-CiUoD1dR.js → Cubes.stories-CUfPPwjc.js} +1 -1
  43. package/storybook-static/assets/{CurvedLoop.stories-Dz2hXFKM.js → CurvedLoop.stories-DE3nB8ls.js} +1 -1
  44. package/storybook-static/assets/{DarkVeil.stories-CE62-9Ie.js → DarkVeil.stories-KZYpXu4O.js} +1 -1
  45. package/storybook-static/assets/DateInput-DG_qgLrC.js +33 -0
  46. package/storybook-static/assets/DateInput.stories-oUg3RCLU.js +51 -0
  47. package/storybook-static/assets/{DecayCard.stories-Bv-vTj_Z.js → DecayCard.stories-B4rk0k2A.js} +1 -1
  48. package/storybook-static/assets/{DecryptedText.stories-eTaV3EjL.js → DecryptedText.stories-DuBGGkyW.js} +1 -1
  49. package/storybook-static/assets/{Dither.stories-DsOTTOvj.js → Dither.stories-StamF1Kb.js} +1 -1
  50. package/storybook-static/assets/{Dock.stories-CEEOj7Pf.js → Dock.stories-cqN-6kGf.js} +1 -1
  51. package/storybook-static/assets/{EditFAB.stories-D_fnI61M.js → EditFAB.stories-DB32wTjJ.js} +1 -1
  52. package/storybook-static/assets/{EvilEye.stories-3NdhOYa5.js → EvilEye.stories-BAbVn5qQ.js} +1 -1
  53. package/storybook-static/assets/{FadeContent.stories-CLd7C-ki.js → FadeContent.stories-WQmRai5y.js} +1 -1
  54. package/storybook-static/assets/{FaultyTerminal.stories-Dw0Dr9AL.js → FaultyTerminal.stories-C6tY8BV7.js} +1 -1
  55. package/storybook-static/assets/{Fbo-BAJ5_cN0.js → Fbo-fiRvNB1I.js} +1 -1
  56. package/storybook-static/assets/{FloatingLines.stories-BD2TWEED.js → FloatingLines.stories-CnsttPQG.js} +1 -1
  57. package/storybook-static/assets/{FlowingMenu.stories-D-NF6vd8.js → FlowingMenu.stories-WYOhUM5m.js} +1 -1
  58. package/storybook-static/assets/{FluidGlass.stories-DdsEMaWI.js → FluidGlass.stories-CrWwYh3X.js} +1 -1
  59. package/storybook-static/assets/{Folder.stories-4bjMWtCH.js → Folder.stories-Dnhngr_O.js} +1 -1
  60. package/storybook-static/assets/{FuzzyText.stories-CubWm9y1.js → FuzzyText.stories-DcCeG3hL.js} +1 -1
  61. package/storybook-static/assets/{Galaxy.stories-B9s03-F3.js → Galaxy.stories-C-OH2aAx.js} +1 -1
  62. package/storybook-static/assets/{GhostCursor.stories-BNLRk3Wv.js → GhostCursor.stories-CHIetqUz.js} +1 -1
  63. package/storybook-static/assets/{GlareHover.stories-ku-SSiUw.js → GlareHover.stories-CRgl-CP4.js} +1 -1
  64. package/storybook-static/assets/{GlassSurface.stories-DlXZ4cQJ.js → GlassSurface.stories-HNRVh3fN.js} +1 -1
  65. package/storybook-static/assets/{GlitchText.stories-BpwMxxXo.js → GlitchText.stories-BQP2YAOm.js} +1 -1
  66. package/storybook-static/assets/{GooeyNav.stories-BibjMaUN.js → GooeyNav.stories-DwIGqWt5.js} +1 -1
  67. package/storybook-static/assets/{GradientBlinds.stories-UZRaBZIY.js → GradientBlinds.stories-CyT1IYBB.js} +1 -1
  68. package/storybook-static/assets/{GradientText.stories-CwEg0CVc.js → GradientText.stories-B-lggDt8.js} +1 -1
  69. package/storybook-static/assets/{Grainient.stories-BYaFcPNU.js → Grainient.stories-BVEEYLWq.js} +1 -1
  70. package/storybook-static/assets/{GridMotion.stories-Cv8TSctx.js → GridMotion.stories-2uRljW7I.js} +1 -1
  71. package/storybook-static/assets/{HabitTimeOfDayChart.stories-BVIU3EjT.js → HabitTimeOfDayChart.stories-CRJXqGJv.js} +6 -11
  72. package/storybook-static/assets/{ImageSlideshow.stories-D01t6AgA.js → ImageSlideshow.stories-DML4vy_x.js} +1 -1
  73. package/storybook-static/assets/{Iridescence.stories-DSUKD1Im.js → Iridescence.stories-DajiIgVe.js} +1 -1
  74. package/storybook-static/assets/{LaserFlow.stories-CU55-EMa.js → LaserFlow.stories-CZaPNLLW.js} +1 -1
  75. package/storybook-static/assets/{LetterGlitch.stories-OOOQYSWe.js → LetterGlitch.stories-CUNR5EiC.js} +1 -1
  76. package/storybook-static/assets/{LightPillar.stories-DnWZ9MLO.js → LightPillar.stories-D7tyGuXB.js} +1 -1
  77. package/storybook-static/assets/{LightRays.stories-DsG6sYTu.js → LightRays.stories-4_oXRqRg.js} +1 -1
  78. package/storybook-static/assets/{Lightning.stories-B-5t1hnQ.js → Lightning.stories-PCjxymXv.js} +1 -1
  79. package/storybook-static/assets/{LineWaves.stories-BTXlYfIA.js → LineWaves.stories-DE1JOtSU.js} +1 -1
  80. package/storybook-static/assets/{LiquidChrome.stories-D0SqpFBU.js → LiquidChrome.stories-BZuyyouo.js} +1 -1
  81. package/storybook-static/assets/{LiquidEther.stories-C7Atyooz.js → LiquidEther.stories-unHa0rXs.js} +1 -1
  82. package/storybook-static/assets/{LoadingSpinner-B-nFZqMP.js → LoadingSpinner-B5pZk-F-.js} +1 -1
  83. package/storybook-static/assets/{LoadingSpinner.stories-rHdR7Opm.js → LoadingSpinner.stories-DCBZaGUw.js} +1 -1
  84. package/storybook-static/assets/{MagicRings.stories-BWP3mkpa.js → MagicRings.stories-Cyic3B5B.js} +1 -1
  85. package/storybook-static/assets/{Magnet.stories-B71Vy_Q3.js → Magnet.stories-B1F_NWep.js} +1 -1
  86. package/storybook-static/assets/{MagnetLines.stories-CS1wIDWN.js → MagnetLines.stories-s6j_3m3S.js} +1 -1
  87. package/storybook-static/assets/{Masonry.stories-DZZjabXb.js → Masonry.stories-BzIHWGfI.js} +1 -1
  88. package/storybook-static/assets/{MetaBalls.stories-DbbN6vax.js → MetaBalls.stories-CMvhgTHK.js} +1 -1
  89. package/storybook-static/assets/{MetallicPaint.stories-Bb9zLAxZ.js → MetallicPaint.stories-CtPSBklG.js} +1 -1
  90. package/storybook-static/assets/{MoodChart.stories-CNBEeQw5.js → MoodChart.stories-Df86ifsA.js} +1 -1
  91. package/storybook-static/assets/{MotionConfigContext-Do3j9FYR.js → MotionConfigContext--4MeZeHl.js} +1 -1
  92. package/storybook-static/assets/{Navbar.stories-BG0eopVz.js → Navbar.stories-iiMx1jgL.js} +1 -1
  93. package/storybook-static/assets/{Noise.stories-D_Vk98pq.js → Noise.stories-CRvmP8hX.js} +1 -1
  94. package/storybook-static/assets/{NumberStepper-BHepIAXP.js → NumberStepper-DiCCESC2.js} +1 -1
  95. package/storybook-static/assets/{NumberStepper.stories-CBjqDVLy.js → NumberStepper.stories-WLZvvNE_.js} +1 -1
  96. package/storybook-static/assets/{Orb.stories-C-RXlinN.js → Orb.stories-dhvuScH_.js} +1 -1
  97. package/storybook-static/assets/{OrbitImages.stories-BpEWo848.js → OrbitImages.stories-cReXIFdN.js} +1 -1
  98. package/storybook-static/assets/{PieChart.stories-BEWgFpPc.js → PieChart.stories-DzS7Xa3H.js} +1 -1
  99. package/storybook-static/assets/{PixelBlast.stories-BFoeyIVN.js → PixelBlast.stories-BIJcZn3Y.js} +1 -1
  100. package/storybook-static/assets/{PixelCard.stories-bB-deMd4.js → PixelCard.stories-DcWyzEzN.js} +1 -1
  101. package/storybook-static/assets/{PixelSnow.stories-BRhLzRBf.js → PixelSnow.stories-DA7TaJeH.js} +1 -1
  102. package/storybook-static/assets/{PixelTransition.stories-BOBOJRmS.js → PixelTransition.stories-DqZ3iQXA.js} +1 -1
  103. package/storybook-static/assets/{Plasma.stories-DKyyI413.js → Plasma.stories-BhkOGLqF.js} +1 -1
  104. package/storybook-static/assets/{Prism.stories-BHTua6ud.js → Prism.stories-DfyQ9X1g.js} +1 -1
  105. package/storybook-static/assets/{PrismaticBurst.stories-BnDG8SSM.js → PrismaticBurst.stories-ZGotri7c.js} +1 -1
  106. package/storybook-static/assets/{ProfileCard.stories-uwN1erd1.js → ProfileCard.stories-CF1aCfGU.js} +1 -1
  107. package/storybook-static/assets/QuantifiableHabitsChart-JSu1fVKW.css +1 -0
  108. package/storybook-static/assets/QuantifiableHabitsChart.stories-D-rINJ6D.js +125 -0
  109. package/storybook-static/assets/{Radar.stories-CWY526-I.js → Radar.stories-BMqTlUKl.js} +1 -1
  110. package/storybook-static/assets/{Ribbons.stories-DU1mjHld.js → Ribbons.stories-De59b80l.js} +1 -1
  111. package/storybook-static/assets/{RippleGrid.stories-C2nJBuYo.js → RippleGrid.stories-CZD_7q7X.js} +1 -1
  112. package/storybook-static/assets/{RotatingText.stories-sI7Hztpa.js → RotatingText.stories-E-ZfUVEu.js} +1 -1
  113. package/storybook-static/assets/{ScrollFloat.stories-DcZ__tEJ.js → ScrollFloat.stories-DpRyGAoK.js} +1 -1
  114. package/storybook-static/assets/{ScrollReveal.stories-DS1GWw_3.js → ScrollReveal.stories-BZ41i1W7.js} +1 -1
  115. package/storybook-static/assets/{ScrollVelocity.stories-BLWNH3I4.js → ScrollVelocity.stories-5KS6YyKN.js} +1 -1
  116. package/storybook-static/assets/{SearchBar.stories-Bgr047x5.js → SearchBar.stories-Ctyql2sU.js} +1 -1
  117. package/storybook-static/assets/{SearchableDropdown-aYGuxPH9.js → SearchableDropdown-NR18DlW0.js} +1 -1
  118. package/storybook-static/assets/{SearchableDropdown.stories-DE7zPKzh.js → SearchableDropdown.stories-aCkmh5mS.js} +1 -1
  119. package/storybook-static/assets/{SelectInput-BZQ08ZNK.js → SelectInput-BmPOR7w3.js} +1 -1
  120. package/storybook-static/assets/{SelectInput.stories-H0G-KoP9.js → SelectInput.stories-CkEIMp4y.js} +1 -1
  121. package/storybook-static/assets/{ShapeBlur.stories-9ni_F5Zg.js → ShapeBlur.stories-z9K8sMp8.js} +1 -1
  122. package/storybook-static/assets/{ShapeGrid.stories-D9uOkUkB.js → ShapeGrid.stories-DEWebK9m.js} +1 -1
  123. package/storybook-static/assets/{ShinyText.stories-DohW-fL4.js → ShinyText.stories-DIkVUyzd.js} +1 -1
  124. package/storybook-static/assets/{Silk.stories-bQRdGXLn.js → Silk.stories-CIxMmzjV.js} +1 -1
  125. package/storybook-static/assets/{SleepChart.stories-C-nVpGd_.js → SleepChart.stories-0Jmjrlg3.js} +1 -1
  126. package/storybook-static/assets/{Slider-DOs6EtWq.js → Slider-Bc1lFUw9.js} +1 -1
  127. package/storybook-static/assets/{Slider.stories-BdwoJHP3.js → Slider.stories-CFEmk3AG.js} +1 -1
  128. package/storybook-static/assets/{SoftAurora.stories-CXLQdZQC.js → SoftAurora.stories-Df72ydt4.js} +1 -1
  129. package/storybook-static/assets/{SoundDemo.stories-By9FQIz_.js → SoundDemo.stories-DK_k58gi.js} +1 -1
  130. package/storybook-static/assets/{SplashCursor.stories-DNaEANVg.js → SplashCursor.stories-CefqvNRc.js} +1 -1
  131. package/storybook-static/assets/{SpotlightCard.stories-B4OdX0pj.js → SpotlightCard.stories-B4yPHPlH.js} +1 -1
  132. package/storybook-static/assets/{Stack.stories-C3yud1EC.js → Stack.stories-CT-yOi8e.js} +1 -1
  133. package/storybook-static/assets/{StaggeredMenu.stories-BF7X32Uw.js → StaggeredMenu.stories-Gd9mshkB.js} +1 -1
  134. package/storybook-static/assets/{StarBorder.stories-VDaxp6l1.js → StarBorder.stories-COeMTOb4.js} +1 -1
  135. package/storybook-static/assets/{SunburstChart.stories-CfY0qUGw.js → SunburstChart.stories-C-2AGYPc.js} +1 -1
  136. package/storybook-static/assets/{Table.stories-B3TVllEr.js → Table.stories-BQEFDH7D.js} +1 -1
  137. package/storybook-static/assets/{Tabs.stories-DgqxTrxr.js → Tabs.stories-CsquuO8e.js} +1 -1
  138. package/storybook-static/assets/{TargetCursor.stories-D2EP7KAh.js → TargetCursor.stories-DAefRC4e.js} +1 -1
  139. package/storybook-static/assets/{TextArea-BlYg50FN.js → TextArea-Ogi9yBes.js} +1 -1
  140. package/storybook-static/assets/{TextArea.stories-BranZzYt.js → TextArea.stories-DpB-3k2O.js} +1 -1
  141. package/storybook-static/assets/{TextCursor.stories-DLxQFmov.js → TextCursor.stories-DZUN0u8I.js} +1 -1
  142. package/storybook-static/assets/{TextInput-CCXvp-ew.js → TextInput-DFgonmie.js} +1 -1
  143. package/storybook-static/assets/{TextInput.stories-BLTjwGq8.js → TextInput.stories-BHSXZ_SI.js} +1 -1
  144. package/storybook-static/assets/{TextPressure.stories-CZl_xi-e.js → TextPressure.stories-UMMx0orx.js} +1 -1
  145. package/storybook-static/assets/{TextType.stories-DIq_eGE1.js → TextType.stories-CtoIUPLH.js} +1 -1
  146. package/storybook-static/assets/ThemeSwitcher-DWTmXKK8.css +1 -0
  147. package/storybook-static/assets/ThemeSwitcher.stories-D_OKIYeD.js +47 -0
  148. package/storybook-static/assets/{Threads.stories-CZM7WZ47.js → Threads.stories-DAhe1Oil.js} +1 -1
  149. package/storybook-static/assets/{TimeInput.stories-CmUXf4Cz.js → TimeInput.stories--rEPa6-A.js} +1 -1
  150. package/storybook-static/assets/{Toggle-D4PkYdGP.js → Toggle-ZeBAtc8u.js} +1 -1
  151. package/storybook-static/assets/{Toggle.stories-rv1G2wrq.js → Toggle.stories-uXsjdbKk.js} +1 -1
  152. package/storybook-static/assets/{ToggleButton-BNvqA30A.js → ToggleButton-fcuqc-U3.js} +1 -1
  153. package/storybook-static/assets/{ToggleButton.stories-BQKmg4kH.js → ToggleButton.stories-BEBnDGXo.js} +1 -1
  154. package/storybook-static/assets/{TrueFocus.stories-BbwajONh.js → TrueFocus.stories-DPfyzlz3.js} +1 -1
  155. package/storybook-static/assets/{VariableProximity.stories-xNKN4tfJ.js → VariableProximity.stories-CtVAQ19e.js} +1 -1
  156. package/storybook-static/assets/{Waves.stories-C9OfntwX.js → Waves.stories-rK_7fHiv.js} +1 -1
  157. package/storybook-static/assets/calendar-gj4nrcYx.js +6 -0
  158. package/storybook-static/assets/chart-column-Djx9piD1.js +6 -0
  159. package/storybook-static/assets/{check-CabJlJ5V.js → check-BuOkTG8Q.js} +1 -1
  160. package/storybook-static/assets/{chevron-down-BFP14H7G.js → chevron-down-DtpxhV6T.js} +1 -1
  161. package/storybook-static/assets/{chevron-right-a0qGzY7-.js → chevron-right-C7ogoSMg.js} +1 -1
  162. package/storybook-static/assets/client-e6aYB0To.js +1 -0
  163. package/storybook-static/assets/{createLucideIcon-CbwkZy_P.js → createLucideIcon-B0MG6HAs.js} +1 -1
  164. package/storybook-static/assets/{download-0mONaVPI.js → download-DbfQZSot.js} +1 -1
  165. package/storybook-static/assets/{folder-BaMNOmQ8.js → folder-CrHzRSTl.js} +1 -1
  166. package/storybook-static/assets/{iconBase-DcfbbyDP.js → iconBase-WFp_1KYF.js} +1 -1
  167. package/storybook-static/assets/{iframe-CwEFvVsM.js → iframe-DKgP8ePJ.js} +3 -3
  168. package/storybook-static/assets/{index-DDGDY6hI.js → index-C-qIoU0_.js} +1 -1
  169. package/storybook-static/assets/{index-BnwRPUps.js → index-CAfFcpR0.js} +1 -1
  170. package/storybook-static/assets/{index-zV-F4owU.js → index-DvhxcNMG.js} +1 -1
  171. package/storybook-static/assets/{proxy-yTVbPXe9.js → proxy-BowLazAQ.js} +1 -1
  172. package/storybook-static/assets/{react-18-CuObrg1Z.js → react-18-Be1RDA5e.js} +1 -1
  173. package/storybook-static/assets/{react-three-fiber.esm-D2hrkyvm.js → react-three-fiber.esm-B9LxaTkn.js} +1 -1
  174. package/storybook-static/assets/{search-RV5qkJTo.js → search-DsfdMjao.js} +1 -1
  175. package/storybook-static/assets/{settings-OOphSE-m.js → settings-B5Srheqv.js} +1 -1
  176. package/storybook-static/assets/{sun-BjScggrH.js → sun--I8-6cgL.js} +1 -1
  177. package/storybook-static/assets/{trash-2-B7b5Q2ub.js → trash-2-Cx9DK1oy.js} +1 -1
  178. package/storybook-static/assets/{use-animation-frame-Dphx9oWi.js → use-animation-frame-D4TWdWMe.js} +1 -1
  179. package/storybook-static/assets/{use-in-view-DWMcMKFb.js → use-in-view-DqAwPbRI.js} +1 -1
  180. package/storybook-static/assets/{use-motion-value-wdb7Vlfx.js → use-motion-value-CcCAM0jJ.js} +1 -1
  181. package/storybook-static/assets/{use-spring-Cs2Ba4qv.js → use-spring-BUwFFZZK.js} +1 -1
  182. package/storybook-static/assets/{use-transform-C7g5E8Wc.js → use-transform-B5QCn53b.js} +1 -1
  183. package/storybook-static/assets/{useSound-DNj86aSq.js → useSound-jrNQ4676.js} +1 -1
  184. package/storybook-static/assets/{users-C0ovKm_B.js → users-hZu3RJwc.js} +1 -1
  185. package/storybook-static/assets/{x-DeSz9wqs.js → x-DT75KqLw.js} +1 -1
  186. package/storybook-static/iframe.html +1 -1
  187. package/storybook-static/project.json +1 -1
  188. package/storybook-static/assets/AllAtoms.stories-MHYWFqQF.js +0 -109
  189. package/storybook-static/assets/Button-Cx1LZrA2.css +0 -1
  190. package/storybook-static/assets/DateInput-BERFdVr2.js +0 -38
  191. package/storybook-static/assets/DateInput.stories-tTNFvdD-.js +0 -51
  192. package/storybook-static/assets/QuantifiableHabitsChart-ClF-TBgP.css +0 -1
  193. package/storybook-static/assets/QuantifiableHabitsChart.stories-CRSIU8au.js +0 -115
  194. package/storybook-static/assets/ThemeSwitcher-XCVQ6hhy.css +0 -1
  195. package/storybook-static/assets/ThemeSwitcher.stories-DMdF3nMm.js +0 -47
  196. package/storybook-static/assets/client-BrrCg_ZV.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as g,j as v}from"./iframe-CwEFvVsM.js";import{u as re}from"./use-motion-value-wdb7Vlfx.js";import{h as ne,j as le,i as Te,r as Ce,m as Oe}from"./proxy-yTVbPXe9.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-Do3j9FYR.js";import{u as ze}from"./use-spring-Cs2Ba4qv.js";import{u as D}from"./use-transform-C7g5E8Wc.js";import{u as je}from"./use-animation-frame-Dphx9oWi.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-DKgP8ePJ.js";import{u as re}from"./use-motion-value-CcCAM0jJ.js";import{h as ne,j as le,i as Te,r as Ce,m as Oe}from"./proxy-BowLazAQ.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--4MeZeHl.js";import{u as ze}from"./use-spring-BUwFFZZK.js";import{u as D}from"./use-transform-B5QCn53b.js";import{u as je}from"./use-animation-frame-D4TWdWMe.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,
@@ -1,4 +1,4 @@
1
- import{r as o,j as t}from"./iframe-CwEFvVsM.js";import{S as ee}from"./search-RV5qkJTo.js";import{F as te}from"./folder-BaMNOmQ8.js";import{U as se}from"./users-C0ovKm_B.js";import{c as P}from"./createLucideIcon-CbwkZy_P.js";import{m as $}from"./proxy-yTVbPXe9.js";import{X as ye}from"./x-DeSz9wqs.js";import{A as fe}from"./index-DDGDY6hI.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-Do3j9FYR.js";/**
1
+ import{r as o,j as t}from"./iframe-DKgP8ePJ.js";import{S as ee}from"./search-DsfdMjao.js";import{F as te}from"./folder-CrHzRSTl.js";import{U as se}from"./users-hZu3RJwc.js";import{c as P}from"./createLucideIcon-B0MG6HAs.js";import{m as $}from"./proxy-BowLazAQ.js";import{X as ye}from"./x-DT75KqLw.js";import{A as fe}from"./index-C-qIoU0_.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext--4MeZeHl.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,j as n}from"./iframe-CwEFvVsM.js";import{m as p}from"./proxy-yTVbPXe9.js";import{C as V}from"./chevron-down-BFP14H7G.js";import{A as R}from"./index-DDGDY6hI.js";import{S as A}from"./search-RV5qkJTo.js";import{C as T}from"./check-CabJlJ5V.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
1
+ import{r,j as n}from"./iframe-DKgP8ePJ.js";import{m as p}from"./proxy-BowLazAQ.js";import{C as V}from"./chevron-down-DtpxhV6T.js";import{A as R}from"./index-C-qIoU0_.js";import{S as A}from"./search-DsfdMjao.js";import{C as T}from"./check-BuOkTG8Q.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
@@ -1,4 +1,4 @@
1
- import{j as e}from"./iframe-CwEFvVsM.js";import{S as a}from"./SearchableDropdown-aYGuxPH9.js";import"./preload-helper-C1FmrZbK.js";import"./proxy-yTVbPXe9.js";import"./MotionConfigContext-Do3j9FYR.js";import"./chevron-down-BFP14H7G.js";import"./createLucideIcon-CbwkZy_P.js";import"./index-DDGDY6hI.js";import"./search-RV5qkJTo.js";import"./check-CabJlJ5V.js";const j={title:"Atoms/SearchableDropdown",component:a,parameters:{layout:"centered",docs:{description:{component:"A dropdown component with built-in search functionality and smooth animations."}}},tags:["autodocs"],argTypes:{label:{control:"text"},value:{control:"text"},placeholder:{control:"text"},allowEmpty:{control:"boolean"},onChange:{action:"changed"}}},n=[{label:"United States",value:"us"},{label:"United Kingdom",value:"uk"},{label:"Canada",value:"ca"},{label:"Germany",value:"de"},{label:"France",value:"fr"},{label:"Italy",value:"it"},{label:"Spain",value:"es"},{label:"Japan",value:"jp"},{label:"Australia",value:"au"},{label:"Brazil",value:"br"}],r=[{label:"React",value:"react"},{label:"Vue.js",value:"vue"},{label:"Angular",value:"angular"},{label:"Svelte",value:"svelte"},{label:"TypeScript",value:"typescript"},{label:"JavaScript",value:"javascript"},{label:"Node.js",value:"nodejs"},{label:"Python",value:"python"},{label:"Java",value:"java"},{label:"C#",value:"csharp"},{label:"Go",value:"go"},{label:"Rust",value:"rust"}],l={args:{label:"Select Country",value:"",options:n,placeholder:"Choose a country",allowEmpty:!0,onChange:()=>{}}},o={args:{label:"Technology Stack",value:"",options:r,placeholder:"Search technologies...",allowEmpty:!0,onChange:()=>{}}},t={args:{label:"With Empty Option",value:"",options:n.slice(0,5),placeholder:"Choose...",allowEmpty:!0,onChange:()=>{}},render:()=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",width:"300px"},children:[e.jsx(a,{label:"With Empty Option",value:"",onChange:()=>{},options:n.slice(0,5),placeholder:"Choose...",allowEmpty:!0}),e.jsx(a,{label:"No Empty Option",value:"react",onChange:()=>{},options:r.slice(0,5),placeholder:"Choose...",allowEmpty:!1}),e.jsx(a,{label:"Pre-selected",value:"us",onChange:()=>{},options:n.slice(0,5),placeholder:"Choose...",allowEmpty:!0}),e.jsx(a,{label:"Long Options List",value:"",onChange:()=>{},options:r,placeholder:"Search technologies...",allowEmpty:!0})]}),parameters:{controls:{disable:!0}}};var s,p,c;l.parameters={...l.parameters,docs:{...(s=l.parameters)==null?void 0:s.docs,source:{originalSource:`{
1
+ import{j as e}from"./iframe-DKgP8ePJ.js";import{S as a}from"./SearchableDropdown-NR18DlW0.js";import"./preload-helper-C1FmrZbK.js";import"./proxy-BowLazAQ.js";import"./MotionConfigContext--4MeZeHl.js";import"./chevron-down-DtpxhV6T.js";import"./createLucideIcon-B0MG6HAs.js";import"./index-C-qIoU0_.js";import"./search-DsfdMjao.js";import"./check-BuOkTG8Q.js";const j={title:"Atoms/SearchableDropdown",component:a,parameters:{layout:"centered",docs:{description:{component:"A dropdown component with built-in search functionality and smooth animations."}}},tags:["autodocs"],argTypes:{label:{control:"text"},value:{control:"text"},placeholder:{control:"text"},allowEmpty:{control:"boolean"},onChange:{action:"changed"}}},n=[{label:"United States",value:"us"},{label:"United Kingdom",value:"uk"},{label:"Canada",value:"ca"},{label:"Germany",value:"de"},{label:"France",value:"fr"},{label:"Italy",value:"it"},{label:"Spain",value:"es"},{label:"Japan",value:"jp"},{label:"Australia",value:"au"},{label:"Brazil",value:"br"}],r=[{label:"React",value:"react"},{label:"Vue.js",value:"vue"},{label:"Angular",value:"angular"},{label:"Svelte",value:"svelte"},{label:"TypeScript",value:"typescript"},{label:"JavaScript",value:"javascript"},{label:"Node.js",value:"nodejs"},{label:"Python",value:"python"},{label:"Java",value:"java"},{label:"C#",value:"csharp"},{label:"Go",value:"go"},{label:"Rust",value:"rust"}],l={args:{label:"Select Country",value:"",options:n,placeholder:"Choose a country",allowEmpty:!0,onChange:()=>{}}},o={args:{label:"Technology Stack",value:"",options:r,placeholder:"Search technologies...",allowEmpty:!0,onChange:()=>{}}},t={args:{label:"With Empty Option",value:"",options:n.slice(0,5),placeholder:"Choose...",allowEmpty:!0,onChange:()=>{}},render:()=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",width:"300px"},children:[e.jsx(a,{label:"With Empty Option",value:"",onChange:()=>{},options:n.slice(0,5),placeholder:"Choose...",allowEmpty:!0}),e.jsx(a,{label:"No Empty Option",value:"react",onChange:()=>{},options:r.slice(0,5),placeholder:"Choose...",allowEmpty:!1}),e.jsx(a,{label:"Pre-selected",value:"us",onChange:()=>{},options:n.slice(0,5),placeholder:"Choose...",allowEmpty:!0}),e.jsx(a,{label:"Long Options List",value:"",onChange:()=>{},options:r,placeholder:"Search technologies...",allowEmpty:!0})]}),parameters:{controls:{disable:!0}}};var s,p,c;l.parameters={...l.parameters,docs:{...(s=l.parameters)==null?void 0:s.docs,source:{originalSource:`{
2
2
  args: {
3
3
  label: 'Select Country',
4
4
  value: '',
@@ -1,4 +1,4 @@
1
- import{j as s}from"./iframe-CwEFvVsM.js";import{u as y}from"./useSound-DNj86aSq.js";import{C as g}from"./chevron-down-BFP14H7G.js";const I="_selectInput_qebnx_1",S="_selectWrapper_qebnx_16",j="_selectIcon_qebnx_68",q="_error_qebnx_134",C="_success_qebnx_163",V="_loading_qebnx_190",l={selectInput:I,selectWrapper:S,selectIcon:j,error:q,success:C,loading:V};function w({label:r,value:c,onChange:u,options:i,placeholder:p="Select...",disabled:d=!1,error:f=!1,success:m=!1,loading:a=!1,required:t=!1,soundConfig:v,className:n}){const{handlers:h,playSound:b}=y(v),x=()=>{const e=[l.selectInput];return f&&e.push(l.error),m&&e.push(l.success),a&&e.push(l.loading),e.join(" ")};return s.jsxs("div",{className:`${x()}${n?` ${n}`:""}`,children:[s.jsxs("label",{children:[r,t&&s.jsx("span",{style:{color:"var(--color-error)"},children:" *"})]}),s.jsxs("div",{className:l.selectWrapper,children:[s.jsxs("select",{value:c,onChange:e=>{b("click"),u(e.target.value)},disabled:d||a,required:t,...h,children:[s.jsx("option",{value:"",children:p}),i.map(e=>{const o=typeof e=="string"?e:e.value,_=typeof e=="string"?e:e.label;return s.jsx("option",{value:o,children:_},o)})]}),s.jsx(g,{className:l.selectIcon})]})]})}w.__docgenInfo={description:`SelectInput component - Styled dropdown selector with flexible option format
1
+ import{j as s}from"./iframe-DKgP8ePJ.js";import{u as y}from"./useSound-jrNQ4676.js";import{C as g}from"./chevron-down-DtpxhV6T.js";const I="_selectInput_qebnx_1",S="_selectWrapper_qebnx_16",j="_selectIcon_qebnx_68",q="_error_qebnx_134",C="_success_qebnx_163",V="_loading_qebnx_190",l={selectInput:I,selectWrapper:S,selectIcon:j,error:q,success:C,loading:V};function w({label:r,value:c,onChange:u,options:i,placeholder:p="Select...",disabled:d=!1,error:f=!1,success:m=!1,loading:a=!1,required:t=!1,soundConfig:v,className:n}){const{handlers:h,playSound:b}=y(v),x=()=>{const e=[l.selectInput];return f&&e.push(l.error),m&&e.push(l.success),a&&e.push(l.loading),e.join(" ")};return s.jsxs("div",{className:`${x()}${n?` ${n}`:""}`,children:[s.jsxs("label",{children:[r,t&&s.jsx("span",{style:{color:"var(--color-error)"},children:" *"})]}),s.jsxs("div",{className:l.selectWrapper,children:[s.jsxs("select",{value:c,onChange:e=>{b("click"),u(e.target.value)},disabled:d||a,required:t,...h,children:[s.jsx("option",{value:"",children:p}),i.map(e=>{const o=typeof e=="string"?e:e.value,_=typeof e=="string"?e:e.label;return s.jsx("option",{value:o,children:_},o)})]}),s.jsx(g,{className:l.selectIcon})]})]})}w.__docgenInfo={description:`SelectInput component - Styled dropdown selector with flexible option format
2
2
 
3
3
  @component
4
4
  @description
@@ -1,4 +1,4 @@
1
- import{r as h,j as o}from"./iframe-CwEFvVsM.js";import{S as t}from"./SelectInput-BZQ08ZNK.js";import"./preload-helper-C1FmrZbK.js";import"./useSound-DNj86aSq.js";import"./chevron-down-BFP14H7G.js";import"./createLucideIcon-CbwkZy_P.js";const F={title:"Atoms/SelectInput",component:t,parameters:{layout:"centered",docs:{description:{component:"A simple dropdown select component with customizable options."}}},tags:["autodocs"],argTypes:{label:{control:"text"},value:{control:"text"},placeholder:{control:"text"},onChange:{action:"changed"}}},y=["Option 1","Option 2","Option 3","Option 4"],S=[{label:"United States",value:"us"},{label:"United Kingdom",value:"uk"},{label:"Canada",value:"ca"},{label:"Australia",value:"au"},{label:"Germany",value:"de"},{label:"France",value:"fr"},{label:"Italy",value:"it"},{label:"Spain",value:"es"}],r={args:{label:"Select an option",value:"",onChange:()=>{},options:y,placeholder:"Choose..."}},n={args:{label:"Country",value:"uk",onChange:()=>{},options:S,placeholder:"Select a country"}},s={args:{label:"Form Example",value:"",onChange:()=>{},options:["Option 1","Option 2"]},render:()=>{const[e,l]=h.useState({title:"",category:"",priority:"",assignee:""});return o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",padding:"1.5rem",background:"var(--color-background-secondary)",borderRadius:"var(--radius-md)",minWidth:"300px"},children:[o.jsx("h3",{style:{marginTop:0},children:"Create Task"}),o.jsx(t,{label:"Title",value:e.title,onChange:a=>l({...e,title:a}),options:["Mr","Mrs","Ms","Dr","Prof"],placeholder:"Select title"}),o.jsx(t,{label:"Category",value:e.category,onChange:a=>l({...e,category:a}),options:[{label:"Bug",value:"bug"},{label:"Feature",value:"feature"},{label:"Documentation",value:"docs"},{label:"Testing",value:"test"}],placeholder:"Select category"}),o.jsx(t,{label:"Priority",value:e.priority,onChange:a=>l({...e,priority:a}),options:["Low","Medium","High","Critical"],placeholder:"Select priority"}),o.jsx(t,{label:"Assignee",value:e.assignee,onChange:a=>l({...e,assignee:a}),options:[{label:"John Doe",value:"john"},{label:"Jane Smith",value:"jane"},{label:"Bob Johnson",value:"bob"},{label:"Alice Brown",value:"alice"}],placeholder:"Select assignee"})]})},parameters:{controls:{disable:!0}}};var i,c,u;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`{
1
+ import{r as h,j as o}from"./iframe-DKgP8ePJ.js";import{S as t}from"./SelectInput-BmPOR7w3.js";import"./preload-helper-C1FmrZbK.js";import"./useSound-jrNQ4676.js";import"./chevron-down-DtpxhV6T.js";import"./createLucideIcon-B0MG6HAs.js";const F={title:"Atoms/SelectInput",component:t,parameters:{layout:"centered",docs:{description:{component:"A simple dropdown select component with customizable options."}}},tags:["autodocs"],argTypes:{label:{control:"text"},value:{control:"text"},placeholder:{control:"text"},onChange:{action:"changed"}}},y=["Option 1","Option 2","Option 3","Option 4"],S=[{label:"United States",value:"us"},{label:"United Kingdom",value:"uk"},{label:"Canada",value:"ca"},{label:"Australia",value:"au"},{label:"Germany",value:"de"},{label:"France",value:"fr"},{label:"Italy",value:"it"},{label:"Spain",value:"es"}],r={args:{label:"Select an option",value:"",onChange:()=>{},options:y,placeholder:"Choose..."}},n={args:{label:"Country",value:"uk",onChange:()=>{},options:S,placeholder:"Select a country"}},s={args:{label:"Form Example",value:"",onChange:()=>{},options:["Option 1","Option 2"]},render:()=>{const[e,l]=h.useState({title:"",category:"",priority:"",assignee:""});return o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",padding:"1.5rem",background:"var(--color-background-secondary)",borderRadius:"var(--radius-md)",minWidth:"300px"},children:[o.jsx("h3",{style:{marginTop:0},children:"Create Task"}),o.jsx(t,{label:"Title",value:e.title,onChange:a=>l({...e,title:a}),options:["Mr","Mrs","Ms","Dr","Prof"],placeholder:"Select title"}),o.jsx(t,{label:"Category",value:e.category,onChange:a=>l({...e,category:a}),options:[{label:"Bug",value:"bug"},{label:"Feature",value:"feature"},{label:"Documentation",value:"docs"},{label:"Testing",value:"test"}],placeholder:"Select category"}),o.jsx(t,{label:"Priority",value:e.priority,onChange:a=>l({...e,priority:a}),options:["Low","Medium","High","Critical"],placeholder:"Select priority"}),o.jsx(t,{label:"Assignee",value:e.assignee,onChange:a=>l({...e,assignee:a}),options:[{label:"John Doe",value:"john"},{label:"Jane Smith",value:"jane"},{label:"Bob Johnson",value:"bob"},{label:"Alice Brown",value:"alice"}],placeholder:"Select assignee"})]})},parameters:{controls:{disable:!0}}};var i,c,u;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`{
2
2
  args: {
3
3
  label: 'Select an option',
4
4
  value: '',
@@ -1,4 +1,4 @@
1
- import{r as M,j}from"./iframe-CwEFvVsM.js";import{d as m,S as B,a as D,W as N,q as T,i as k,M as G,r as H}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const U=`
1
+ import{r as M,j}from"./iframe-DKgP8ePJ.js";import{d as m,S as B,a as D,W as N,q as T,i as k,M as G,r as H}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const U=`
2
2
  varying vec2 v_texcoord;
3
3
  void main() {
4
4
  gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
@@ -1,4 +1,4 @@
1
- import{r as v,j as q}from"./iframe-CwEFvVsM.js";import"./preload-helper-C1FmrZbK.js";const z={"shapegrid-canvas":"_shapegrid-canvas_ilyut_1"},J=({direction:P="right",speed:L=1,borderColor:k="#999",squareSize:t=40,hoverFillColor:b="#222",shape:X="square",hoverTrailAmount:y=0,className:Q=""})=>{const _=v.useRef(null),j=v.useRef(null),U=v.useRef(),Z=v.useRef(),r=v.useRef({x:0,y:0}),o=v.useRef(null),p=v.useRef([]),M=v.useRef(new Map);return v.useEffect(()=>{const s=_.current,n=s.getContext("2d"),Y=X==="hexagon",E=X==="triangle",w=t*1.5,m=t*Math.sqrt(3),V=()=>{s.width=s.offsetWidth,s.height=s.offsetHeight,U.current=Math.ceil(s.width/t)+1,Z.current=Math.ceil(s.height/t)+1};window.addEventListener("resize",V),V();const C=(l,e,c)=>{n.beginPath();for(let u=0;u<6;u++){const h=Math.PI/3*u,d=l+c*Math.cos(h),f=e+c*Math.sin(h);u===0?n.moveTo(d,f):n.lineTo(d,f)}n.closePath()},G=(l,e,c)=>{n.beginPath(),n.arc(l,e,c/2,0,Math.PI*2),n.closePath()},O=(l,e,c,u)=>{n.beginPath(),u?(n.moveTo(l,e+c/2),n.lineTo(l+c/2,e-c/2),n.lineTo(l-c/2,e-c/2)):(n.moveTo(l,e-c/2),n.lineTo(l+c/2,e+c/2),n.lineTo(l-c/2,e+c/2)),n.closePath()},A=()=>{if(n.clearRect(0,0,s.width,s.height),Y){const e=Math.floor(r.current.x/w),c=(r.current.x%w+w)%w,u=(r.current.y%m+m)%m,h=Math.ceil(s.width/w)+3,d=Math.ceil(s.height/m)+3;for(let f=-2;f<h;f++)for(let g=-2;g<d;g++){const i=f*w+c,a=g*m+((f+e)%2!==0?m/2:0)+u,x=`${f},${g}`,R=M.current.get(x);R&&(n.globalAlpha=R,C(i,a,t),n.fillStyle=b,n.fill(),n.globalAlpha=1),C(i,a,t),n.strokeStyle=k,n.stroke()}}else if(E){const e=t/2,c=Math.floor(r.current.x/e),u=Math.floor(r.current.y/t),h=(r.current.x%e+e)%e,d=(r.current.y%t+t)%t,f=Math.ceil(s.width/e)+4,g=Math.ceil(s.height/t)+4;for(let i=-2;i<f;i++)for(let a=-2;a<g;a++){const x=i*e+h,R=a*t+t/2+d,I=((i+c+a+u)%2+2)%2!==0,S=`${i},${a}`,N=M.current.get(S);N&&(n.globalAlpha=N,O(x,R,t,I),n.fillStyle=b,n.fill(),n.globalAlpha=1),O(x,R,t,I),n.strokeStyle=k,n.stroke()}}else if(X==="circle"){const e=(r.current.x%t+t)%t,c=(r.current.y%t+t)%t,u=Math.ceil(s.width/t)+3,h=Math.ceil(s.height/t)+3;for(let d=-2;d<u;d++)for(let f=-2;f<h;f++){const g=d*t+t/2+e,i=f*t+t/2+c,a=`${d},${f}`,x=M.current.get(a);x&&(n.globalAlpha=x,G(g,i,t),n.fillStyle=b,n.fill(),n.globalAlpha=1),G(g,i,t),n.strokeStyle=k,n.stroke()}}else{const e=(r.current.x%t+t)%t,c=(r.current.y%t+t)%t,u=Math.ceil(s.width/t)+3,h=Math.ceil(s.height/t)+3;for(let d=-2;d<u;d++)for(let f=-2;f<h;f++){const g=d*t+e,i=f*t+c,a=`${d},${f}`,x=M.current.get(a);x&&(n.globalAlpha=x,n.fillStyle=b,n.fillRect(g,i,t,t),n.globalAlpha=1),n.strokeStyle=k,n.strokeRect(g,i,t,t)}}const l=n.createRadialGradient(s.width/2,s.height/2,0,s.width/2,s.height/2,Math.sqrt(s.width**2+s.height**2)/2);l.addColorStop(0,"rgba(0, 0, 0, 0)"),n.fillStyle=l,n.fillRect(0,0,s.width,s.height)},H=()=>{const l=Math.max(L,.1),e=Y?w*2:t,c=Y?m:E?t*2:t;switch(P){case"right":r.current.x=(r.current.x-l+e)%e;break;case"left":r.current.x=(r.current.x+l+e)%e;break;case"up":r.current.y=(r.current.y+l+c)%c;break;case"down":r.current.y=(r.current.y-l+c)%c;break;case"diagonal":r.current.x=(r.current.x-l+e)%e,r.current.y=(r.current.y-l+c)%c;break}T(),A(),j.current=requestAnimationFrame(H)},T=()=>{const l=new Map;if(o.current&&l.set(`${o.current.x},${o.current.y}`,1),y>0)for(let e=0;e<p.current.length;e++){const c=p.current[e],u=`${c.x},${c.y}`;l.has(u)||l.set(u,(p.current.length-e)/(p.current.length+1))}for(const[e]of l)M.current.has(e)||M.current.set(e,0);for(const[e,c]of M.current){const u=l.get(e)||0,h=c+(u-c)*.15;h<.005?M.current.delete(e):M.current.set(e,h)}},K=l=>{const e=s.getBoundingClientRect(),c=l.clientX-e.left,u=l.clientY-e.top;if(Y){const h=Math.floor(r.current.x/w),d=(r.current.x%w+w)%w,f=(r.current.y%m+m)%m,g=c-d,i=u-f,a=Math.round(g/w),x=(a+h)%2!==0?m/2:0,R=Math.round((i-x)/m);(!o.current||o.current.x!==a||o.current.y!==R)&&(o.current&&y>0&&(p.current.unshift({...o.current}),p.current.length>y&&(p.current.length=y)),o.current={x:a,y:R})}else if(E){const h=t/2,d=(r.current.x%h+h)%h,f=(r.current.y%t+t)%t,g=c-d,i=u-f,a=Math.round(g/h),x=Math.floor(i/t);(!o.current||o.current.x!==a||o.current.y!==x)&&(o.current&&y>0&&(p.current.unshift({...o.current}),p.current.length>y&&(p.current.length=y)),o.current={x:a,y:x})}else if(X==="circle"){const h=(r.current.x%t+t)%t,d=(r.current.y%t+t)%t,f=c-h,g=u-d,i=Math.round(f/t),a=Math.round(g/t);(!o.current||o.current.x!==i||o.current.y!==a)&&(o.current&&y>0&&(p.current.unshift({...o.current}),p.current.length>y&&(p.current.length=y)),o.current={x:i,y:a})}else{const h=(r.current.x%t+t)%t,d=(r.current.y%t+t)%t,f=c-h,g=u-d,i=Math.floor(f/t),a=Math.floor(g/t);(!o.current||o.current.x!==i||o.current.y!==a)&&(o.current&&y>0&&(p.current.unshift({...o.current}),p.current.length>y&&(p.current.length=y)),o.current={x:i,y:a})}},B=()=>{o.current&&y>0&&(p.current.unshift({...o.current}),p.current.length>y&&(p.current.length=y)),o.current=null};return s.addEventListener("mousemove",K),s.addEventListener("mouseleave",B),j.current=requestAnimationFrame(H),()=>{window.removeEventListener("resize",V),cancelAnimationFrame(j.current),s.removeEventListener("mousemove",K),s.removeEventListener("mouseleave",B)}},[P,L,k,b,t,X,y]),q.jsx("canvas",{ref:_,className:`${z["shapegrid-canvas"]} ${Q}`})};J.__docgenInfo={description:"",methods:[],displayName:"ShapeGrid",props:{direction:{defaultValue:{value:"'right'",computed:!1},required:!1},speed:{defaultValue:{value:"1",computed:!1},required:!1},borderColor:{defaultValue:{value:"'#999'",computed:!1},required:!1},squareSize:{defaultValue:{value:"40",computed:!1},required:!1},hoverFillColor:{defaultValue:{value:"'#222'",computed:!1},required:!1},shape:{defaultValue:{value:"'square'",computed:!1},required:!1},hoverTrailAmount:{defaultValue:{value:"0",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1}}};const nt={title:"ReactBits/Backgrounds/ShapeGrid",component:J,parameters:{layout:"fullscreen"}},$={args:{direction:"right",speed:1,borderColor:"#999",squareSize:40,hoverFillColor:"#222",shape:"square",hoverTrailAmount:0}};var W,D,F;$.parameters={...$.parameters,docs:{...(W=$.parameters)==null?void 0:W.docs,source:{originalSource:`{
1
+ import{r as v,j as q}from"./iframe-DKgP8ePJ.js";import"./preload-helper-C1FmrZbK.js";const z={"shapegrid-canvas":"_shapegrid-canvas_ilyut_1"},J=({direction:P="right",speed:L=1,borderColor:k="#999",squareSize:t=40,hoverFillColor:b="#222",shape:X="square",hoverTrailAmount:y=0,className:Q=""})=>{const _=v.useRef(null),j=v.useRef(null),U=v.useRef(),Z=v.useRef(),r=v.useRef({x:0,y:0}),o=v.useRef(null),p=v.useRef([]),M=v.useRef(new Map);return v.useEffect(()=>{const s=_.current,n=s.getContext("2d"),Y=X==="hexagon",E=X==="triangle",w=t*1.5,m=t*Math.sqrt(3),V=()=>{s.width=s.offsetWidth,s.height=s.offsetHeight,U.current=Math.ceil(s.width/t)+1,Z.current=Math.ceil(s.height/t)+1};window.addEventListener("resize",V),V();const C=(l,e,c)=>{n.beginPath();for(let u=0;u<6;u++){const h=Math.PI/3*u,d=l+c*Math.cos(h),f=e+c*Math.sin(h);u===0?n.moveTo(d,f):n.lineTo(d,f)}n.closePath()},G=(l,e,c)=>{n.beginPath(),n.arc(l,e,c/2,0,Math.PI*2),n.closePath()},O=(l,e,c,u)=>{n.beginPath(),u?(n.moveTo(l,e+c/2),n.lineTo(l+c/2,e-c/2),n.lineTo(l-c/2,e-c/2)):(n.moveTo(l,e-c/2),n.lineTo(l+c/2,e+c/2),n.lineTo(l-c/2,e+c/2)),n.closePath()},A=()=>{if(n.clearRect(0,0,s.width,s.height),Y){const e=Math.floor(r.current.x/w),c=(r.current.x%w+w)%w,u=(r.current.y%m+m)%m,h=Math.ceil(s.width/w)+3,d=Math.ceil(s.height/m)+3;for(let f=-2;f<h;f++)for(let g=-2;g<d;g++){const i=f*w+c,a=g*m+((f+e)%2!==0?m/2:0)+u,x=`${f},${g}`,R=M.current.get(x);R&&(n.globalAlpha=R,C(i,a,t),n.fillStyle=b,n.fill(),n.globalAlpha=1),C(i,a,t),n.strokeStyle=k,n.stroke()}}else if(E){const e=t/2,c=Math.floor(r.current.x/e),u=Math.floor(r.current.y/t),h=(r.current.x%e+e)%e,d=(r.current.y%t+t)%t,f=Math.ceil(s.width/e)+4,g=Math.ceil(s.height/t)+4;for(let i=-2;i<f;i++)for(let a=-2;a<g;a++){const x=i*e+h,R=a*t+t/2+d,I=((i+c+a+u)%2+2)%2!==0,S=`${i},${a}`,N=M.current.get(S);N&&(n.globalAlpha=N,O(x,R,t,I),n.fillStyle=b,n.fill(),n.globalAlpha=1),O(x,R,t,I),n.strokeStyle=k,n.stroke()}}else if(X==="circle"){const e=(r.current.x%t+t)%t,c=(r.current.y%t+t)%t,u=Math.ceil(s.width/t)+3,h=Math.ceil(s.height/t)+3;for(let d=-2;d<u;d++)for(let f=-2;f<h;f++){const g=d*t+t/2+e,i=f*t+t/2+c,a=`${d},${f}`,x=M.current.get(a);x&&(n.globalAlpha=x,G(g,i,t),n.fillStyle=b,n.fill(),n.globalAlpha=1),G(g,i,t),n.strokeStyle=k,n.stroke()}}else{const e=(r.current.x%t+t)%t,c=(r.current.y%t+t)%t,u=Math.ceil(s.width/t)+3,h=Math.ceil(s.height/t)+3;for(let d=-2;d<u;d++)for(let f=-2;f<h;f++){const g=d*t+e,i=f*t+c,a=`${d},${f}`,x=M.current.get(a);x&&(n.globalAlpha=x,n.fillStyle=b,n.fillRect(g,i,t,t),n.globalAlpha=1),n.strokeStyle=k,n.strokeRect(g,i,t,t)}}const l=n.createRadialGradient(s.width/2,s.height/2,0,s.width/2,s.height/2,Math.sqrt(s.width**2+s.height**2)/2);l.addColorStop(0,"rgba(0, 0, 0, 0)"),n.fillStyle=l,n.fillRect(0,0,s.width,s.height)},H=()=>{const l=Math.max(L,.1),e=Y?w*2:t,c=Y?m:E?t*2:t;switch(P){case"right":r.current.x=(r.current.x-l+e)%e;break;case"left":r.current.x=(r.current.x+l+e)%e;break;case"up":r.current.y=(r.current.y+l+c)%c;break;case"down":r.current.y=(r.current.y-l+c)%c;break;case"diagonal":r.current.x=(r.current.x-l+e)%e,r.current.y=(r.current.y-l+c)%c;break}T(),A(),j.current=requestAnimationFrame(H)},T=()=>{const l=new Map;if(o.current&&l.set(`${o.current.x},${o.current.y}`,1),y>0)for(let e=0;e<p.current.length;e++){const c=p.current[e],u=`${c.x},${c.y}`;l.has(u)||l.set(u,(p.current.length-e)/(p.current.length+1))}for(const[e]of l)M.current.has(e)||M.current.set(e,0);for(const[e,c]of M.current){const u=l.get(e)||0,h=c+(u-c)*.15;h<.005?M.current.delete(e):M.current.set(e,h)}},K=l=>{const e=s.getBoundingClientRect(),c=l.clientX-e.left,u=l.clientY-e.top;if(Y){const h=Math.floor(r.current.x/w),d=(r.current.x%w+w)%w,f=(r.current.y%m+m)%m,g=c-d,i=u-f,a=Math.round(g/w),x=(a+h)%2!==0?m/2:0,R=Math.round((i-x)/m);(!o.current||o.current.x!==a||o.current.y!==R)&&(o.current&&y>0&&(p.current.unshift({...o.current}),p.current.length>y&&(p.current.length=y)),o.current={x:a,y:R})}else if(E){const h=t/2,d=(r.current.x%h+h)%h,f=(r.current.y%t+t)%t,g=c-d,i=u-f,a=Math.round(g/h),x=Math.floor(i/t);(!o.current||o.current.x!==a||o.current.y!==x)&&(o.current&&y>0&&(p.current.unshift({...o.current}),p.current.length>y&&(p.current.length=y)),o.current={x:a,y:x})}else if(X==="circle"){const h=(r.current.x%t+t)%t,d=(r.current.y%t+t)%t,f=c-h,g=u-d,i=Math.round(f/t),a=Math.round(g/t);(!o.current||o.current.x!==i||o.current.y!==a)&&(o.current&&y>0&&(p.current.unshift({...o.current}),p.current.length>y&&(p.current.length=y)),o.current={x:i,y:a})}else{const h=(r.current.x%t+t)%t,d=(r.current.y%t+t)%t,f=c-h,g=u-d,i=Math.floor(f/t),a=Math.floor(g/t);(!o.current||o.current.x!==i||o.current.y!==a)&&(o.current&&y>0&&(p.current.unshift({...o.current}),p.current.length>y&&(p.current.length=y)),o.current={x:i,y:a})}},B=()=>{o.current&&y>0&&(p.current.unshift({...o.current}),p.current.length>y&&(p.current.length=y)),o.current=null};return s.addEventListener("mousemove",K),s.addEventListener("mouseleave",B),j.current=requestAnimationFrame(H),()=>{window.removeEventListener("resize",V),cancelAnimationFrame(j.current),s.removeEventListener("mousemove",K),s.removeEventListener("mouseleave",B)}},[P,L,k,b,t,X,y]),q.jsx("canvas",{ref:_,className:`${z["shapegrid-canvas"]} ${Q}`})};J.__docgenInfo={description:"",methods:[],displayName:"ShapeGrid",props:{direction:{defaultValue:{value:"'right'",computed:!1},required:!1},speed:{defaultValue:{value:"1",computed:!1},required:!1},borderColor:{defaultValue:{value:"'#999'",computed:!1},required:!1},squareSize:{defaultValue:{value:"40",computed:!1},required:!1},hoverFillColor:{defaultValue:{value:"'#222'",computed:!1},required:!1},shape:{defaultValue:{value:"'square'",computed:!1},required:!1},hoverTrailAmount:{defaultValue:{value:"0",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1}}};const nt={title:"ReactBits/Backgrounds/ShapeGrid",component:J,parameters:{layout:"fullscreen"}},$={args:{direction:"right",speed:1,borderColor:"#999",squareSize:40,hoverFillColor:"#222",shape:"square",hoverTrailAmount:0}};var W,D,F;$.parameters={...$.parameters,docs:{...(W=$.parameters)==null?void 0:W.docs,source:{originalSource:`{
2
2
  args: {
3
3
  direction: 'right',
4
4
  speed: 1,
@@ -1,4 +1,4 @@
1
- import{r,j as N}from"./iframe-CwEFvVsM.js";import{u as P}from"./use-motion-value-wdb7Vlfx.js";import{u as z}from"./use-animation-frame-Dphx9oWi.js";import{u as A}from"./use-transform-C7g5E8Wc.js";import{m as B}from"./proxy-yTVbPXe9.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-Do3j9FYR.js";const F={"shiny-text":"_shiny-text_183zx_1"},T=({text:V,disabled:q=!1,speed:k=2,className:C="",color:u="#b5b5b5",shineColor:$="#ffffff",spread:R=120,yoyo:S=!1,pauseOnHover:f=!1,direction:m="left",delay:_=0})=>{const[D,y]=r.useState(!1),e=P(0),c=r.useRef(0),n=r.useRef(null),a=r.useRef(m==="left"?1:-1),t=k*1e3,b=_*1e3;z(o=>{if(q||D){n.current=null;return}if(n.current===null){n.current=o;return}const I=o-n.current;if(n.current=o,c.current+=I,S){const l=t+b,i=l*2,s=c.current%i;if(s<t){const p=s/t*100;e.set(a.current===1?p:100-p)}else if(s<l)e.set(a.current===1?100:0);else if(s<l+t){const x=100-(s-l)/t*100;e.set(a.current===1?x:100-x)}else e.set(a.current===1?0:100)}else{const l=t+b,i=c.current%l;if(i<t){const s=i/t*100;e.set(a.current===1?s:100-s)}else e.set(a.current===1?100:0)}}),r.useEffect(()=>{a.current=m==="left"?1:-1,c.current=0,e.set(0)},[m]);const E=A(e,o=>`${150-o*2}% center`),M=r.useCallback(()=>{f&&y(!0)},[f]),W=r.useCallback(()=>{f&&y(!1)},[f]),j={backgroundImage:`linear-gradient(${R}deg, ${u} 0%, ${u} 35%, ${$} 50%, ${u} 65%, ${u} 100%)`,backgroundSize:"200% auto",WebkitBackgroundClip:"text",backgroundClip:"text",WebkitTextFillColor:"transparent"};return N.jsx(B.span,{className:`${F["shiny-text"]} ${C}`,style:{...j,backgroundPosition:E},onMouseEnter:M,onMouseLeave:W,children:V})};T.__docgenInfo={description:"",methods:[],displayName:"ShinyText",props:{disabled:{defaultValue:{value:"false",computed:!1},required:!1},speed:{defaultValue:{value:"2",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},color:{defaultValue:{value:"'#b5b5b5'",computed:!1},required:!1},shineColor:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},spread:{defaultValue:{value:"120",computed:!1},required:!1},yoyo:{defaultValue:{value:"false",computed:!1},required:!1},pauseOnHover:{defaultValue:{value:"false",computed:!1},required:!1},direction:{defaultValue:{value:"'left'",computed:!1},required:!1},delay:{defaultValue:{value:"0",computed:!1},required:!1}}};const Q={title:"ReactBits/TextAnimations/ShinyText",component:T,parameters:{layout:"fullscreen"}},d={args:{text:"Hello World",disabled:!1,speed:2,color:"#b5b5b5",shineColor:"#ffffff",spread:120,yoyo:!1,pauseOnHover:!1,direction:"left",delay:0}};var g,v,h;d.parameters={...d.parameters,docs:{...(g=d.parameters)==null?void 0:g.docs,source:{originalSource:`{
1
+ import{r,j as N}from"./iframe-DKgP8ePJ.js";import{u as P}from"./use-motion-value-CcCAM0jJ.js";import{u as z}from"./use-animation-frame-D4TWdWMe.js";import{u as A}from"./use-transform-B5QCn53b.js";import{m as B}from"./proxy-BowLazAQ.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext--4MeZeHl.js";const F={"shiny-text":"_shiny-text_183zx_1"},T=({text:V,disabled:q=!1,speed:k=2,className:C="",color:u="#b5b5b5",shineColor:$="#ffffff",spread:R=120,yoyo:S=!1,pauseOnHover:f=!1,direction:m="left",delay:_=0})=>{const[D,y]=r.useState(!1),e=P(0),c=r.useRef(0),n=r.useRef(null),a=r.useRef(m==="left"?1:-1),t=k*1e3,b=_*1e3;z(o=>{if(q||D){n.current=null;return}if(n.current===null){n.current=o;return}const I=o-n.current;if(n.current=o,c.current+=I,S){const l=t+b,i=l*2,s=c.current%i;if(s<t){const p=s/t*100;e.set(a.current===1?p:100-p)}else if(s<l)e.set(a.current===1?100:0);else if(s<l+t){const x=100-(s-l)/t*100;e.set(a.current===1?x:100-x)}else e.set(a.current===1?0:100)}else{const l=t+b,i=c.current%l;if(i<t){const s=i/t*100;e.set(a.current===1?s:100-s)}else e.set(a.current===1?100:0)}}),r.useEffect(()=>{a.current=m==="left"?1:-1,c.current=0,e.set(0)},[m]);const E=A(e,o=>`${150-o*2}% center`),M=r.useCallback(()=>{f&&y(!0)},[f]),W=r.useCallback(()=>{f&&y(!1)},[f]),j={backgroundImage:`linear-gradient(${R}deg, ${u} 0%, ${u} 35%, ${$} 50%, ${u} 65%, ${u} 100%)`,backgroundSize:"200% auto",WebkitBackgroundClip:"text",backgroundClip:"text",WebkitTextFillColor:"transparent"};return N.jsx(B.span,{className:`${F["shiny-text"]} ${C}`,style:{...j,backgroundPosition:E},onMouseEnter:M,onMouseLeave:W,children:V})};T.__docgenInfo={description:"",methods:[],displayName:"ShinyText",props:{disabled:{defaultValue:{value:"false",computed:!1},required:!1},speed:{defaultValue:{value:"2",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},color:{defaultValue:{value:"'#b5b5b5'",computed:!1},required:!1},shineColor:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},spread:{defaultValue:{value:"120",computed:!1},required:!1},yoyo:{defaultValue:{value:"false",computed:!1},required:!1},pauseOnHover:{defaultValue:{value:"false",computed:!1},required:!1},direction:{defaultValue:{value:"'left'",computed:!1},required:!1},delay:{defaultValue:{value:"0",computed:!1},required:!1}}};const Q={title:"ReactBits/TextAnimations/ShinyText",component:T,parameters:{layout:"fullscreen"}},d={args:{text:"Hello World",disabled:!1,speed:2,color:"#b5b5b5",shineColor:"#ffffff",spread:120,yoyo:!1,pauseOnHover:!1,direction:"left",delay:0}};var g,v,h;d.parameters={...d.parameters,docs:{...(g=d.parameters)==null?void 0:g.docs,source:{originalSource:`{
2
2
  args: {
3
3
  text: 'Hello World',
4
4
  disabled: false,
@@ -1,4 +1,4 @@
1
- import{r as n,j as a}from"./iframe-CwEFvVsM.js";import{C as p,u as x,a as y}from"./react-three-fiber.esm-D2hrkyvm.js";import{n as g}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const S=e=>(e=e.replace("#",""),[parseInt(e.slice(0,2),16)/255,parseInt(e.slice(2,4),16)/255,parseInt(e.slice(4,6),16)/255]),C=`
1
+ import{r as n,j as a}from"./iframe-DKgP8ePJ.js";import{C as p,u as x,a as y}from"./react-three-fiber.esm-B9LxaTkn.js";import{n as g}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const S=e=>(e=e.replace("#",""),[parseInt(e.slice(0,2),16)/255,parseInt(e.slice(2,4),16)/255,parseInt(e.slice(4,6),16)/255]),C=`
2
2
  varying vec2 vUv;
3
3
  varying vec3 vPosition;
4
4
 
@@ -1,4 +1,4 @@
1
- import{r as _,j as r}from"./iframe-CwEFvVsM.js";import{s as w,e as nt}from"./transform-QOf3tDlt.js";import{l as st}from"./linear-DhrdWH9x.js";import{b as lt,r as L}from"./band-BYy0bT_S.js";import{a as it,b as dt}from"./axis-D3QohQNI.js";import"./preload-helper-C1FmrZbK.js";var T=1.70158;(function o(t){t=+t;function l(a){return(a=+a)*a*(t*(a-1)+a)}return l.overshoot=o,l})(T);var V=function o(t){t=+t;function l(a){return--a*a*((a+1)*t+a)+1}return l.overshoot=o,l}(T);(function o(t){t=+t;function l(a){return((a*=2)<1?a*a*((t+1)*a-t):(a-=2)*a*((t+1)*a+t)+2)/2}return l.overshoot=o,l})(T);const ct="_container_wk2zd_1",pt="_header_wk2zd_7",ht="_title_wk2zd_14",mt="_legend_wk2zd_20",ut="_legendItem_wk2zd_25",ft="_sleepDot_wk2zd_33",gt="_wakeDot_wk2zd_42",Mt="_chart_wk2zd_51",_t="_gridLine_wk2zd_55",wt="_sleepBar_wk2zd_60",xt="_xAxis_wk2zd_70",kt="_yAxis_wk2zd_71",St="_tooltip_wk2zd_96",yt="_visible_wk2zd_117",bt="_tooltipHeader_wk2zd_122",$t="_tooltipEmoji_wk2zd_133",vt="_tooltipInfo_wk2zd_138",Dt="_tooltipRow_wk2zd_144",jt="_tooltipLabel_wk2zd_152",At="_tooltipValue_wk2zd_158",zt="_tooltipDuration_wk2zd_163",s={container:ct,header:pt,title:ht,legend:mt,legendItem:ut,sleepDot:ft,wakeDot:gt,chart:Mt,gridLine:_t,sleepBar:wt,xAxis:xt,yAxis:kt,tooltip:St,visible:yt,tooltipHeader:bt,tooltipEmoji:$t,tooltipInfo:vt,tooltipRow:Dt,tooltipLabel:jt,tooltipValue:At,tooltipDuration:zt},O=o=>{const[t,l]=o.split(":").map(Number);return t+l/60},W=o=>{const t=Math.floor(o%24),l=t===0?12:t>12?t-12:t,a=t>=12?"PM":"AM",c=Math.round(o%1*60);return`${Math.floor(l)}:${c.toString().padStart(2,"0")} ${a}`},rt=({sleepData:o,width:t=800,height:l=400,onDateClick:a})=>{const c=_.useRef(null),[p,M]=_.useState(null),u=_.useMemo(()=>({top:30,right:30,bottom:50,left:80}),[]),I=t-u.left-u.right,x=l-u.top-u.bottom;return _.useEffect(()=>{const f=()=>{M(null)};return window.addEventListener("scroll",f,!0),()=>{window.removeEventListener("scroll",f,!0)}},[]),_.useEffect(()=>{if(!c.current||o.length===0)return;const f=w(c.current);f.selectAll("*").remove(),f.append("rect").attr("width",t).attr("height",l).attr("fill","transparent").style("pointer-events","all").on("mouseleave",()=>{M(null)});const k=f.append("g").attr("transform",`translate(${u.left},${u.top})`),h=st().domain([18,42]).range([0,I]),A=o.map(e=>e.date),z=lt().domain(A).range([0,x]).paddingInner(.2).paddingOuter(.1);k.selectAll(".grid-line-x").data(L(18,43,1)).enter().append("line").attr("class",s.gridLine).attr("x1",e=>h(e)).attr("y1",0).attr("x2",e=>h(e)).attr("y2",x).style("stroke",e=>{const n=e%24;return"var(--color-border)"}).style("stroke-opacity",e=>{const n=e%24;return n===0||n===12?.3:n%3===0?.15:.05}).style("stroke-width",e=>{const n=e%24;return n===0||n===12?2:1}),o.forEach(e=>{const n=z(e.date);if(n===void 0)return;const g=z.bandwidth(),S=k.append("g").attr("class",s.sleepBar).style("cursor","pointer").on("click",()=>a==null?void 0:a(e.date));let i=null,d=null;e.sleep_time&&(i=O(e.sleep_time),i<18&&(i+=24)),e.wake_hour&&(d=O(e.wake_hour),i!==null?(d<i||i>=18&&d<18)&&(d+=24):d<12&&(d+=24)),i!==null&&d!==null&&S.append("rect").attr("x",h(i)).attr("y",n).attr("width",0).attr("height",g).attr("rx",g/2).attr("fill","url(#sleepGradient)").attr("opacity",0).attr("stroke","rgba(255,255,255,0.3)").attr("stroke-width",1).style("filter","drop-shadow(0 2px 8px rgba(155, 89, 182, 0.3))").transition().duration(800).delay(Math.random()*200).ease(nt).attr("width",Math.max(0,h(d)-h(i))).attr("opacity",.85),i!==null&&S.append("circle").attr("cx",h(i)).attr("cy",n+g/2).attr("r",0).attr("fill","#9B59B6").attr("stroke","#ffffff").attr("stroke-width",2).style("filter","drop-shadow(0 3px 6px rgba(155, 89, 182, 0.4))").style("transition","all 0.3s ease").transition().duration(400).delay(300+Math.random()*100).ease(V).attr("r",6),d!==null&&S.append("circle").attr("cx",h(d)).attr("cy",n+g/2).attr("r",0).attr("fill","#3498DB").attr("stroke","#ffffff").attr("stroke-width",2).style("filter","drop-shadow(0 3px 6px rgba(52, 152, 219, 0.4))").style("transition","all 0.3s ease").transition().duration(400).delay(500+Math.random()*100).ease(V).attr("r",6),S.on("mouseenter",function(m){var R;if(w(this).select("rect").transition().duration(200).attr("opacity",1).style("filter","drop-shadow(0 4px 12px rgba(155, 89, 182, 0.5)) brightness(1.1)"),w(this).selectAll("circle").transition().duration(200).attr("r",8),(R=c.current)==null?void 0:R.getBoundingClientRect()){const B=i!==null&&d!==null?d-i:null;M({date:e.date,sleepTime:i!==null?W(i):null,wakeTime:d!==null?W(d):null,duration:B!==null?Math.round(B*100)/100:null,x:m.pageX,y:m.pageY-80})}}).on("mouseleave",function(){w(this).select("rect").transition().duration(200).attr("opacity",.85).style("filter","drop-shadow(0 2px 8px rgba(155, 89, 182, 0.3))"),w(this).selectAll("circle").transition().duration(200).attr("r",6),M(null)}).on("mousemove",function(m){M(H=>H?{...H,x:m.pageX,y:m.pageY-80}:null)})});const N=f.append("defs").append("linearGradient").attr("id","sleepGradient").attr("x1","0%").attr("x2","100%");N.append("stop").attr("offset","0%").attr("stop-color","#9B59B6").attr("stop-opacity",1),N.append("stop").attr("offset","50%").attr("stop-color","#7B68A6").attr("stop-opacity",1),N.append("stop").attr("offset","100%").attr("stop-color","#3498DB").attr("stop-opacity",1);const E=L(18,43,3).map(e=>({value:e,label:e===24?"12 AM":e===36?"12 PM":e%24===0?"12 AM":e%24<12?`${e%24} AM`:e%24===12?"12 PM":`${e%24-12} PM`}));k.append("g").attr("class",s.xAxis).attr("transform",`translate(0,${x})`).call(it(h).tickValues(E.map(e=>e.value)).tickFormat(e=>{const n=E.find(g=>g.value===e);return n?n.label:""}).tickSizeOuter(0)).selectAll("text").style("font-weight",e=>{const n=e%24;return n===0||n===12?"600":"400"});const ot=A.filter((e,n)=>n%Math.ceil(A.length/10)===0);k.append("g").attr("class",s.yAxis).call(dt(z).tickValues(ot).tickFormat(e=>{const n=new Date(e);return`${(n.getMonth()+1).toString().padStart(2,"0")}/${n.getDate().toString().padStart(2,"0")}`}))},[o,I,x,u,a,l,t]),r.jsxs("div",{className:s.container,children:[r.jsxs("div",{className:s.header,children:[r.jsx("h3",{className:s.title,children:"Sleep Pattern"}),r.jsxs("div",{className:s.legend,children:[r.jsxs("div",{className:s.legendItem,children:[r.jsx("span",{className:s.sleepDot}),r.jsx("span",{children:"Sleep Time"})]}),r.jsxs("div",{className:s.legendItem,children:[r.jsx("span",{className:s.wakeDot}),r.jsx("span",{children:"Wake Time"})]})]})]}),r.jsx("svg",{ref:c,width:t,height:l,className:s.chart}),p&&r.jsxs("div",{className:`${s.tooltip} ${p?s.visible:""}`,style:{left:`${p.x}px`,top:`${p.y}px`},children:[r.jsxs("div",{className:s.tooltipHeader,children:[r.jsx("span",{className:s.tooltipEmoji,children:"😴"}),r.jsx("span",{children:new Date(p.date).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"})})]}),r.jsxs("div",{className:s.tooltipInfo,children:[p.sleepTime&&r.jsxs("div",{className:s.tooltipRow,children:[r.jsxs("span",{className:s.tooltipLabel,children:[r.jsx("span",{children:"🌙"}),r.jsx("span",{children:"Sleep:"})]}),r.jsx("span",{className:s.tooltipValue,children:p.sleepTime})]}),p.wakeTime&&r.jsxs("div",{className:s.tooltipRow,children:[r.jsxs("span",{className:s.tooltipLabel,children:[r.jsx("span",{children:"☀️"}),r.jsx("span",{children:"Wake:"})]}),r.jsx("span",{className:s.tooltipValue,children:p.wakeTime})]}),p.duration!==null&&r.jsxs("div",{className:s.tooltipDuration,children:[r.jsx("span",{children:"⏱️"}),r.jsxs("span",{children:[Math.floor(p.duration),"h ",Math.round(p.duration%1*60),"m"]})]})]})]})]})};rt.__docgenInfo={description:"",methods:[],displayName:"SleepChart",props:{sleepData:{required:!0,tsType:{name:"Array",elements:[{name:"SleepData"}],raw:"SleepData[]"},description:""},width:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"800",computed:!1}},height:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}},onDateClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(date: string) => void",signature:{arguments:[{type:{name:"string"},name:"date"}],return:{name:"void"}}},description:""}}};const Vt={title:"Organisms/Charts/SleepChart",component:rt,parameters:{layout:"centered"},argTypes:{width:{control:{type:"number",min:400,max:1200,step:50}},height:{control:{type:"number",min:200,max:600,step:50}},onDateClick:{action:"dateClicked"}}},j=o=>{const t=[],l=new Date;for(let a=o-1;a>=0;a--){const c=new Date(l);c.setDate(c.getDate()-a),t.push(c.toISOString().split("T")[0])}return t},y={args:{sleepData:j(7).map(o=>{const t=Math.floor(Math.random()*3)+22,l=Math.floor(Math.random()*3)+6;return{date:o,sleep_time:`${t%24}:${Math.floor(Math.random()*60).toString().padStart(2,"0")}`,wake_hour:`${l}:${Math.floor(Math.random()*60).toString().padStart(2,"0")}`}}),width:800,height:400}},b={args:{sleepData:j(30).map(o=>({date:o,sleep_time:`${(Math.floor(Math.random()*3)+22)%24}:${Math.floor(Math.random()*60).toString().padStart(2,"0")}`,wake_hour:`${Math.floor(Math.random()*2)+7}:${Math.floor(Math.random()*60).toString().padStart(2,"0")}`})),width:900,height:400}},$={args:{sleepData:j(14).map((o,t)=>{const l=t%7===5||t%7===6,a=l?Math.floor(Math.random()*4)+24:Math.floor(Math.random()*2)+22,c=l?Math.floor(Math.random()*3)+9:Math.floor(Math.random()*2)+6;return{date:o,sleep_time:`${a%24}:${Math.floor(Math.random()*60).toString().padStart(2,"0")}`,wake_hour:`${c}:${Math.floor(Math.random()*60).toString().padStart(2,"0")}`}}),width:850,height:400}},v={args:{sleepData:j(14).map((o,t)=>({date:o,sleep_time:t%3===0?null:`${(Math.floor(Math.random()*3)+22)%24}:30`,wake_hour:t%3===0?null:`${Math.floor(Math.random()*2)+7}:00`})),width:800,height:400}},D={args:{sleepData:[],width:800,height:400}};var P,q,G;y.parameters={...y.parameters,docs:{...(P=y.parameters)==null?void 0:P.docs,source:{originalSource:`{
1
+ import{r as _,j as r}from"./iframe-DKgP8ePJ.js";import{s as w,e as nt}from"./transform-QOf3tDlt.js";import{l as st}from"./linear-DhrdWH9x.js";import{b as lt,r as L}from"./band-BYy0bT_S.js";import{a as it,b as dt}from"./axis-D3QohQNI.js";import"./preload-helper-C1FmrZbK.js";var T=1.70158;(function o(t){t=+t;function l(a){return(a=+a)*a*(t*(a-1)+a)}return l.overshoot=o,l})(T);var V=function o(t){t=+t;function l(a){return--a*a*((a+1)*t+a)+1}return l.overshoot=o,l}(T);(function o(t){t=+t;function l(a){return((a*=2)<1?a*a*((t+1)*a-t):(a-=2)*a*((t+1)*a+t)+2)/2}return l.overshoot=o,l})(T);const ct="_container_wk2zd_1",pt="_header_wk2zd_7",ht="_title_wk2zd_14",mt="_legend_wk2zd_20",ut="_legendItem_wk2zd_25",ft="_sleepDot_wk2zd_33",gt="_wakeDot_wk2zd_42",Mt="_chart_wk2zd_51",_t="_gridLine_wk2zd_55",wt="_sleepBar_wk2zd_60",xt="_xAxis_wk2zd_70",kt="_yAxis_wk2zd_71",St="_tooltip_wk2zd_96",yt="_visible_wk2zd_117",bt="_tooltipHeader_wk2zd_122",$t="_tooltipEmoji_wk2zd_133",vt="_tooltipInfo_wk2zd_138",Dt="_tooltipRow_wk2zd_144",jt="_tooltipLabel_wk2zd_152",At="_tooltipValue_wk2zd_158",zt="_tooltipDuration_wk2zd_163",s={container:ct,header:pt,title:ht,legend:mt,legendItem:ut,sleepDot:ft,wakeDot:gt,chart:Mt,gridLine:_t,sleepBar:wt,xAxis:xt,yAxis:kt,tooltip:St,visible:yt,tooltipHeader:bt,tooltipEmoji:$t,tooltipInfo:vt,tooltipRow:Dt,tooltipLabel:jt,tooltipValue:At,tooltipDuration:zt},O=o=>{const[t,l]=o.split(":").map(Number);return t+l/60},W=o=>{const t=Math.floor(o%24),l=t===0?12:t>12?t-12:t,a=t>=12?"PM":"AM",c=Math.round(o%1*60);return`${Math.floor(l)}:${c.toString().padStart(2,"0")} ${a}`},rt=({sleepData:o,width:t=800,height:l=400,onDateClick:a})=>{const c=_.useRef(null),[p,M]=_.useState(null),u=_.useMemo(()=>({top:30,right:30,bottom:50,left:80}),[]),I=t-u.left-u.right,x=l-u.top-u.bottom;return _.useEffect(()=>{const f=()=>{M(null)};return window.addEventListener("scroll",f,!0),()=>{window.removeEventListener("scroll",f,!0)}},[]),_.useEffect(()=>{if(!c.current||o.length===0)return;const f=w(c.current);f.selectAll("*").remove(),f.append("rect").attr("width",t).attr("height",l).attr("fill","transparent").style("pointer-events","all").on("mouseleave",()=>{M(null)});const k=f.append("g").attr("transform",`translate(${u.left},${u.top})`),h=st().domain([18,42]).range([0,I]),A=o.map(e=>e.date),z=lt().domain(A).range([0,x]).paddingInner(.2).paddingOuter(.1);k.selectAll(".grid-line-x").data(L(18,43,1)).enter().append("line").attr("class",s.gridLine).attr("x1",e=>h(e)).attr("y1",0).attr("x2",e=>h(e)).attr("y2",x).style("stroke",e=>{const n=e%24;return"var(--color-border)"}).style("stroke-opacity",e=>{const n=e%24;return n===0||n===12?.3:n%3===0?.15:.05}).style("stroke-width",e=>{const n=e%24;return n===0||n===12?2:1}),o.forEach(e=>{const n=z(e.date);if(n===void 0)return;const g=z.bandwidth(),S=k.append("g").attr("class",s.sleepBar).style("cursor","pointer").on("click",()=>a==null?void 0:a(e.date));let i=null,d=null;e.sleep_time&&(i=O(e.sleep_time),i<18&&(i+=24)),e.wake_hour&&(d=O(e.wake_hour),i!==null?(d<i||i>=18&&d<18)&&(d+=24):d<12&&(d+=24)),i!==null&&d!==null&&S.append("rect").attr("x",h(i)).attr("y",n).attr("width",0).attr("height",g).attr("rx",g/2).attr("fill","url(#sleepGradient)").attr("opacity",0).attr("stroke","rgba(255,255,255,0.3)").attr("stroke-width",1).style("filter","drop-shadow(0 2px 8px rgba(155, 89, 182, 0.3))").transition().duration(800).delay(Math.random()*200).ease(nt).attr("width",Math.max(0,h(d)-h(i))).attr("opacity",.85),i!==null&&S.append("circle").attr("cx",h(i)).attr("cy",n+g/2).attr("r",0).attr("fill","#9B59B6").attr("stroke","#ffffff").attr("stroke-width",2).style("filter","drop-shadow(0 3px 6px rgba(155, 89, 182, 0.4))").style("transition","all 0.3s ease").transition().duration(400).delay(300+Math.random()*100).ease(V).attr("r",6),d!==null&&S.append("circle").attr("cx",h(d)).attr("cy",n+g/2).attr("r",0).attr("fill","#3498DB").attr("stroke","#ffffff").attr("stroke-width",2).style("filter","drop-shadow(0 3px 6px rgba(52, 152, 219, 0.4))").style("transition","all 0.3s ease").transition().duration(400).delay(500+Math.random()*100).ease(V).attr("r",6),S.on("mouseenter",function(m){var R;if(w(this).select("rect").transition().duration(200).attr("opacity",1).style("filter","drop-shadow(0 4px 12px rgba(155, 89, 182, 0.5)) brightness(1.1)"),w(this).selectAll("circle").transition().duration(200).attr("r",8),(R=c.current)==null?void 0:R.getBoundingClientRect()){const B=i!==null&&d!==null?d-i:null;M({date:e.date,sleepTime:i!==null?W(i):null,wakeTime:d!==null?W(d):null,duration:B!==null?Math.round(B*100)/100:null,x:m.pageX,y:m.pageY-80})}}).on("mouseleave",function(){w(this).select("rect").transition().duration(200).attr("opacity",.85).style("filter","drop-shadow(0 2px 8px rgba(155, 89, 182, 0.3))"),w(this).selectAll("circle").transition().duration(200).attr("r",6),M(null)}).on("mousemove",function(m){M(H=>H?{...H,x:m.pageX,y:m.pageY-80}:null)})});const N=f.append("defs").append("linearGradient").attr("id","sleepGradient").attr("x1","0%").attr("x2","100%");N.append("stop").attr("offset","0%").attr("stop-color","#9B59B6").attr("stop-opacity",1),N.append("stop").attr("offset","50%").attr("stop-color","#7B68A6").attr("stop-opacity",1),N.append("stop").attr("offset","100%").attr("stop-color","#3498DB").attr("stop-opacity",1);const E=L(18,43,3).map(e=>({value:e,label:e===24?"12 AM":e===36?"12 PM":e%24===0?"12 AM":e%24<12?`${e%24} AM`:e%24===12?"12 PM":`${e%24-12} PM`}));k.append("g").attr("class",s.xAxis).attr("transform",`translate(0,${x})`).call(it(h).tickValues(E.map(e=>e.value)).tickFormat(e=>{const n=E.find(g=>g.value===e);return n?n.label:""}).tickSizeOuter(0)).selectAll("text").style("font-weight",e=>{const n=e%24;return n===0||n===12?"600":"400"});const ot=A.filter((e,n)=>n%Math.ceil(A.length/10)===0);k.append("g").attr("class",s.yAxis).call(dt(z).tickValues(ot).tickFormat(e=>{const n=new Date(e);return`${(n.getMonth()+1).toString().padStart(2,"0")}/${n.getDate().toString().padStart(2,"0")}`}))},[o,I,x,u,a,l,t]),r.jsxs("div",{className:s.container,children:[r.jsxs("div",{className:s.header,children:[r.jsx("h3",{className:s.title,children:"Sleep Pattern"}),r.jsxs("div",{className:s.legend,children:[r.jsxs("div",{className:s.legendItem,children:[r.jsx("span",{className:s.sleepDot}),r.jsx("span",{children:"Sleep Time"})]}),r.jsxs("div",{className:s.legendItem,children:[r.jsx("span",{className:s.wakeDot}),r.jsx("span",{children:"Wake Time"})]})]})]}),r.jsx("svg",{ref:c,width:t,height:l,className:s.chart}),p&&r.jsxs("div",{className:`${s.tooltip} ${p?s.visible:""}`,style:{left:`${p.x}px`,top:`${p.y}px`},children:[r.jsxs("div",{className:s.tooltipHeader,children:[r.jsx("span",{className:s.tooltipEmoji,children:"😴"}),r.jsx("span",{children:new Date(p.date).toLocaleDateString("en-US",{weekday:"short",month:"short",day:"numeric"})})]}),r.jsxs("div",{className:s.tooltipInfo,children:[p.sleepTime&&r.jsxs("div",{className:s.tooltipRow,children:[r.jsxs("span",{className:s.tooltipLabel,children:[r.jsx("span",{children:"🌙"}),r.jsx("span",{children:"Sleep:"})]}),r.jsx("span",{className:s.tooltipValue,children:p.sleepTime})]}),p.wakeTime&&r.jsxs("div",{className:s.tooltipRow,children:[r.jsxs("span",{className:s.tooltipLabel,children:[r.jsx("span",{children:"☀️"}),r.jsx("span",{children:"Wake:"})]}),r.jsx("span",{className:s.tooltipValue,children:p.wakeTime})]}),p.duration!==null&&r.jsxs("div",{className:s.tooltipDuration,children:[r.jsx("span",{children:"⏱️"}),r.jsxs("span",{children:[Math.floor(p.duration),"h ",Math.round(p.duration%1*60),"m"]})]})]})]})]})};rt.__docgenInfo={description:"",methods:[],displayName:"SleepChart",props:{sleepData:{required:!0,tsType:{name:"Array",elements:[{name:"SleepData"}],raw:"SleepData[]"},description:""},width:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"800",computed:!1}},height:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}},onDateClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(date: string) => void",signature:{arguments:[{type:{name:"string"},name:"date"}],return:{name:"void"}}},description:""}}};const Vt={title:"Organisms/Charts/SleepChart",component:rt,parameters:{layout:"centered"},argTypes:{width:{control:{type:"number",min:400,max:1200,step:50}},height:{control:{type:"number",min:200,max:600,step:50}},onDateClick:{action:"dateClicked"}}},j=o=>{const t=[],l=new Date;for(let a=o-1;a>=0;a--){const c=new Date(l);c.setDate(c.getDate()-a),t.push(c.toISOString().split("T")[0])}return t},y={args:{sleepData:j(7).map(o=>{const t=Math.floor(Math.random()*3)+22,l=Math.floor(Math.random()*3)+6;return{date:o,sleep_time:`${t%24}:${Math.floor(Math.random()*60).toString().padStart(2,"0")}`,wake_hour:`${l}:${Math.floor(Math.random()*60).toString().padStart(2,"0")}`}}),width:800,height:400}},b={args:{sleepData:j(30).map(o=>({date:o,sleep_time:`${(Math.floor(Math.random()*3)+22)%24}:${Math.floor(Math.random()*60).toString().padStart(2,"0")}`,wake_hour:`${Math.floor(Math.random()*2)+7}:${Math.floor(Math.random()*60).toString().padStart(2,"0")}`})),width:900,height:400}},$={args:{sleepData:j(14).map((o,t)=>{const l=t%7===5||t%7===6,a=l?Math.floor(Math.random()*4)+24:Math.floor(Math.random()*2)+22,c=l?Math.floor(Math.random()*3)+9:Math.floor(Math.random()*2)+6;return{date:o,sleep_time:`${a%24}:${Math.floor(Math.random()*60).toString().padStart(2,"0")}`,wake_hour:`${c}:${Math.floor(Math.random()*60).toString().padStart(2,"0")}`}}),width:850,height:400}},v={args:{sleepData:j(14).map((o,t)=>({date:o,sleep_time:t%3===0?null:`${(Math.floor(Math.random()*3)+22)%24}:30`,wake_hour:t%3===0?null:`${Math.floor(Math.random()*2)+7}:00`})),width:800,height:400}},D={args:{sleepData:[],width:800,height:400}};var P,q,G;y.parameters={...y.parameters,docs:{...(P=y.parameters)==null?void 0:P.docs,source:{originalSource:`{
2
2
  args: {
3
3
  sleepData: generateDateRange(7).map(date => {
4
4
  const bedHour = Math.floor(Math.random() * 3) + 22;
@@ -1,4 +1,4 @@
1
- import{r as O,j as a}from"./iframe-CwEFvVsM.js";import{u as B}from"./useSound-DNj86aSq.js";import{m as x}from"./proxy-yTVbPXe9.js";import{A as U}from"./index-DDGDY6hI.js";const F="_slider_aeiqv_2",G="_label_aeiqv_14",H="_sliderContainer_aeiqv_22",J="_track_aeiqv_32",K="_dragging_aeiqv_43",Q="_fill_aeiqv_48",W="_input_aeiqv_55",X="_thumb_aeiqv_105",Y="_tooltip_aeiqv_130",Z="_tooltipArrow_aeiqv_145",ee="_valueDisplay_aeiqv_158",ae="_labelsContainer_aeiqv_170",te="_labelItem_aeiqv_177",se="_size-sm_aeiqv_191",ie="_size-lg_aeiqv_198",ne="_disabled_aeiqv_206",re="_loading_aeiqv_218",le="_loadingTrack_aeiqv_223",oe="_loadingIndicator_aeiqv_232",e={slider:F,label:G,sliderContainer:H,track:J,dragging:K,fill:Q,input:W,thumb:X,tooltip:Y,tooltipArrow:Z,valueDisplay:ee,labelsContainer:ae,labelItem:te,"size-sm":"_size-sm_aeiqv_191",sizeSm:se,"size-lg":"_size-lg_aeiqv_198",sizeLg:ie,disabled:ne,loading:re,loadingTrack:le,loadingIndicator:oe};function ue({value:s,onChange:j,min:u=0,max:l=100,step:k=1,label:n,showValue:N=!1,valueFormatter:g,labels:v=[],config:$={},disabled:r=!1,className:_="",style:y={},loading:d=!1,colorFunction:b,showTooltip:z=!1,tooltipContent:h,soundConfig:V}){const{handlers:D,playSound:I}=B(V),[q,C]=O.useState(!1),{colors:c={},size:A="md"}=$,m=Math.max(0,Math.min(100,(s-u)/(l-u)*100)),L=()=>b?b(s):c.fill?c.fill:"var(--color-primary)",T=t=>g?g(t):`${t}${l<=10?`/${l}`:""}`,P=t=>{if(r||d)return;const f=Number(t.target.value);I("click"),j(f)},M=()=>{r||d||C(!0)},p=()=>C(!1),i=L(),S=e[`size-${A}`],R=r?e.disabled:"",E=q?e.dragging:"";if(d)return a.jsxs("div",{className:`${e.slider} ${S} ${e.loading} ${_}`,style:y,children:[n&&a.jsx("label",{className:e.label,children:n}),a.jsx("div",{className:e.loadingTrack,children:a.jsx(x.div,{className:e.loadingIndicator,animate:{x:["-100%","200%"]},transition:{repeat:1/0,duration:1.5,ease:"easeInOut"}})})]});const w={left:`${m}%`,marginLeft:`calc(var(--slider-thumb-size) * ${-m/100})`};return a.jsxs("div",{className:`${e.slider} ${S} ${R} ${E} ${_}`,style:y,children:[n&&a.jsx("label",{className:e.label,children:n}),a.jsxs("div",{className:e.sliderContainer,children:[a.jsx("div",{className:e.track,children:a.jsx("div",{className:e.fill,style:{width:`${m}%`,backgroundColor:i}})}),a.jsx("input",{type:"range",min:u,max:l,step:k,value:s,onChange:P,onPointerDown:M,onPointerUp:p,onPointerCancel:p,onBlur:p,...D,className:e.input,disabled:r,"aria-label":n}),a.jsx("div",{className:e.thumb,style:{...w,backgroundColor:i,borderColor:c.thumb||i}}),a.jsx(U,{children:z&&q&&!r&&a.jsxs(x.div,{className:e.tooltip,style:{...w,backgroundColor:i},initial:{opacity:0,y:6,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:6,scale:.9},transition:{duration:.15},children:[h?h(s):T(s),a.jsx("div",{className:e.tooltipArrow,style:{borderTopColor:i}})]})})]}),N&&a.jsx("div",{className:e.valueDisplay,style:{color:i},children:T(s)}),v.length>0&&a.jsx("div",{className:e.labelsContainer,children:v.map((t,f)=>{let o=0;return t.position==="start"?o=0:t.position==="end"?o=100:typeof t.position=="number"&&(o=t.position),a.jsx("div",{className:e.labelItem,style:{left:`${o}%`,color:t.color},children:t.label},f)})})]})}ue.__docgenInfo={description:`Slider component — responsive, accessible range input with a styled track, fill, and thumb.
1
+ import{r as O,j as a}from"./iframe-DKgP8ePJ.js";import{u as B}from"./useSound-jrNQ4676.js";import{m as x}from"./proxy-BowLazAQ.js";import{A as U}from"./index-C-qIoU0_.js";const F="_slider_aeiqv_2",G="_label_aeiqv_14",H="_sliderContainer_aeiqv_22",J="_track_aeiqv_32",K="_dragging_aeiqv_43",Q="_fill_aeiqv_48",W="_input_aeiqv_55",X="_thumb_aeiqv_105",Y="_tooltip_aeiqv_130",Z="_tooltipArrow_aeiqv_145",ee="_valueDisplay_aeiqv_158",ae="_labelsContainer_aeiqv_170",te="_labelItem_aeiqv_177",se="_size-sm_aeiqv_191",ie="_size-lg_aeiqv_198",ne="_disabled_aeiqv_206",re="_loading_aeiqv_218",le="_loadingTrack_aeiqv_223",oe="_loadingIndicator_aeiqv_232",e={slider:F,label:G,sliderContainer:H,track:J,dragging:K,fill:Q,input:W,thumb:X,tooltip:Y,tooltipArrow:Z,valueDisplay:ee,labelsContainer:ae,labelItem:te,"size-sm":"_size-sm_aeiqv_191",sizeSm:se,"size-lg":"_size-lg_aeiqv_198",sizeLg:ie,disabled:ne,loading:re,loadingTrack:le,loadingIndicator:oe};function ue({value:s,onChange:j,min:u=0,max:l=100,step:k=1,label:n,showValue:N=!1,valueFormatter:g,labels:v=[],config:$={},disabled:r=!1,className:_="",style:y={},loading:d=!1,colorFunction:b,showTooltip:z=!1,tooltipContent:h,soundConfig:V}){const{handlers:D,playSound:I}=B(V),[q,C]=O.useState(!1),{colors:c={},size:A="md"}=$,m=Math.max(0,Math.min(100,(s-u)/(l-u)*100)),L=()=>b?b(s):c.fill?c.fill:"var(--color-primary)",T=t=>g?g(t):`${t}${l<=10?`/${l}`:""}`,P=t=>{if(r||d)return;const f=Number(t.target.value);I("click"),j(f)},M=()=>{r||d||C(!0)},p=()=>C(!1),i=L(),S=e[`size-${A}`],R=r?e.disabled:"",E=q?e.dragging:"";if(d)return a.jsxs("div",{className:`${e.slider} ${S} ${e.loading} ${_}`,style:y,children:[n&&a.jsx("label",{className:e.label,children:n}),a.jsx("div",{className:e.loadingTrack,children:a.jsx(x.div,{className:e.loadingIndicator,animate:{x:["-100%","200%"]},transition:{repeat:1/0,duration:1.5,ease:"easeInOut"}})})]});const w={left:`${m}%`,marginLeft:`calc(var(--slider-thumb-size) * ${-m/100})`};return a.jsxs("div",{className:`${e.slider} ${S} ${R} ${E} ${_}`,style:y,children:[n&&a.jsx("label",{className:e.label,children:n}),a.jsxs("div",{className:e.sliderContainer,children:[a.jsx("div",{className:e.track,children:a.jsx("div",{className:e.fill,style:{width:`${m}%`,backgroundColor:i}})}),a.jsx("input",{type:"range",min:u,max:l,step:k,value:s,onChange:P,onPointerDown:M,onPointerUp:p,onPointerCancel:p,onBlur:p,...D,className:e.input,disabled:r,"aria-label":n}),a.jsx("div",{className:e.thumb,style:{...w,backgroundColor:i,borderColor:c.thumb||i}}),a.jsx(U,{children:z&&q&&!r&&a.jsxs(x.div,{className:e.tooltip,style:{...w,backgroundColor:i},initial:{opacity:0,y:6,scale:.9},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:6,scale:.9},transition:{duration:.15},children:[h?h(s):T(s),a.jsx("div",{className:e.tooltipArrow,style:{borderTopColor:i}})]})})]}),N&&a.jsx("div",{className:e.valueDisplay,style:{color:i},children:T(s)}),v.length>0&&a.jsx("div",{className:e.labelsContainer,children:v.map((t,f)=>{let o=0;return t.position==="start"?o=0:t.position==="end"?o=100:typeof t.position=="number"&&(o=t.position),a.jsx("div",{className:e.labelItem,style:{left:`${o}%`,color:t.color},children:t.label},f)})})]})}ue.__docgenInfo={description:`Slider component — responsive, accessible range input with a styled track, fill, and thumb.
2
2
 
3
3
  The thumb is inset at the track endpoints so it never overflows. Drag state is tracked
4
4
  via pointer events (works on mouse, touch, and pen).`,methods:[],displayName:"Slider",props:{value:{required:!0,tsType:{name:"number"},description:"Current slider value"},onChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(value: number) => void",signature:{arguments:[{type:{name:"number"},name:"value"}],return:{name:"void"}}},description:"Callback when value changes"},min:{required:!1,tsType:{name:"number"},description:"Minimum value",defaultValue:{value:"0",computed:!1}},max:{required:!1,tsType:{name:"number"},description:"Maximum value",defaultValue:{value:"100",computed:!1}},step:{required:!1,tsType:{name:"number"},description:"Step increment",defaultValue:{value:"1",computed:!1}},label:{required:!1,tsType:{name:"string"},description:"Optional label"},showValue:{required:!1,tsType:{name:"boolean"},description:"Show persistent value display below the track",defaultValue:{value:"false",computed:!1}},valueFormatter:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: number) => string",signature:{arguments:[{type:{name:"number"},name:"value"}],return:{name:"string"}}},description:"Custom value formatter"},labels:{required:!1,tsType:{name:"Array",elements:[{name:"SliderLabel"}],raw:"SliderLabel[]"},description:"Labels for slider endpoints or custom positions",defaultValue:{value:"[]",computed:!1}},config:{required:!1,tsType:{name:"SliderConfig"},description:"Custom styling configuration",defaultValue:{value:"{}",computed:!1}},disabled:{required:!1,tsType:{name:"boolean"},description:"Disabled state",defaultValue:{value:"false",computed:!1}},className:{required:!1,tsType:{name:"string"},description:"Custom CSS class",defaultValue:{value:"''",computed:!1}},style:{required:!1,tsType:{name:"ReactCSSProperties",raw:"React.CSSProperties"},description:"Custom styles",defaultValue:{value:"{}",computed:!1}},loading:{required:!1,tsType:{name:"boolean"},description:"Loading state",defaultValue:{value:"false",computed:!1}},colorFunction:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: number) => string",signature:{arguments:[{type:{name:"number"},name:"value"}],return:{name:"string"}}},description:"Color function for dynamic coloring"},showTooltip:{required:!1,tsType:{name:"boolean"},description:"Show a tooltip above the thumb while dragging",defaultValue:{value:"false",computed:!1}},tooltipContent:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: number) => string",signature:{arguments:[{type:{name:"number"},name:"value"}],return:{name:"string"}}},description:"Custom tooltip content"},soundConfig:{required:!1,tsType:{name:"ComponentSoundConfig"},description:"Sound configuration for interactions"}}};export{ue as S};
@@ -1,4 +1,4 @@
1
- import{r as C,j as i}from"./iframe-CwEFvVsM.js";import{S as F}from"./Slider-DOs6EtWq.js";import"./preload-helper-C1FmrZbK.js";import"./useSound-DNj86aSq.js";import"./proxy-yTVbPXe9.js";import"./MotionConfigContext-Do3j9FYR.js";import"./index-DDGDY6hI.js";const D={title:"Atoms/Slider",component:F,parameters:{layout:"centered",docs:{description:{component:"An animated slider component with customizable styling, labels, and dynamic coloring."}}},argTypes:{value:{control:"number"},min:{control:"number"},max:{control:"number"},step:{control:"number"},label:{control:"text"},showValue:{control:"boolean"},showTooltip:{control:"boolean"},disabled:{control:"boolean"},loading:{control:"boolean"},config:{control:"object"}}},n=e=>{const[r,V]=C.useState(e.value||50);return i.jsx("div",{style:{width:"300px",padding:"20px"},children:i.jsx(F,{...e,value:r,onChange:V})})},o={render:n,args:{min:0,max:100,step:1,label:"Default Slider",showValue:!0}},a={render:n,args:{min:1,max:10,value:7,label:"Rating",showValue:!0,labels:[{label:":(",position:"start"},{label:":|",position:50},{label:":)",position:"end"}],colorFunction:e=>e<=3?"#ff4444":e<=6?"#ffa500":"#4caf50",valueFormatter:e=>`${e}/10`}},t={render:n,args:{min:-10,max:40,value:22,step:.5,label:"Temperature",showValue:!0,showTooltip:!0,colorFunction:e=>{const r=(e+10)/50;return r<.3?"#4fc3f7":r<.7?"#66bb6a":"#ff7043"},valueFormatter:e=>`${e} C`}},l={render:n,args:{min:1,max:5,value:3,label:"How are you feeling?",showValue:!0,labels:[{label:"Terrible",position:"start"},{label:"Okay",position:50},{label:"Great",position:"end"}],colorFunction:e=>{const r=["#f44336","#ff9800","#ffc107","#4caf50","#2196f3"];return r[e-1]||r[2]},valueFormatter:e=>["Terrible","Bad","Okay","Good","Great"][e-1]||"Okay",config:{size:"lg"}}},s={render:n,args:{min:0,max:100,value:30,label:"Custom Colors",showValue:!0,config:{colors:{fill:"#e91e63",thumb:"#e91e63",text:"#e91e63"}}}};var u,c,m;o.parameters={...o.parameters,docs:{...(u=o.parameters)==null?void 0:u.docs,source:{originalSource:`{
1
+ import{r as C,j as i}from"./iframe-DKgP8ePJ.js";import{S as F}from"./Slider-Bc1lFUw9.js";import"./preload-helper-C1FmrZbK.js";import"./useSound-jrNQ4676.js";import"./proxy-BowLazAQ.js";import"./MotionConfigContext--4MeZeHl.js";import"./index-C-qIoU0_.js";const D={title:"Atoms/Slider",component:F,parameters:{layout:"centered",docs:{description:{component:"An animated slider component with customizable styling, labels, and dynamic coloring."}}},argTypes:{value:{control:"number"},min:{control:"number"},max:{control:"number"},step:{control:"number"},label:{control:"text"},showValue:{control:"boolean"},showTooltip:{control:"boolean"},disabled:{control:"boolean"},loading:{control:"boolean"},config:{control:"object"}}},n=e=>{const[r,V]=C.useState(e.value||50);return i.jsx("div",{style:{width:"300px",padding:"20px"},children:i.jsx(F,{...e,value:r,onChange:V})})},o={render:n,args:{min:0,max:100,step:1,label:"Default Slider",showValue:!0}},a={render:n,args:{min:1,max:10,value:7,label:"Rating",showValue:!0,labels:[{label:":(",position:"start"},{label:":|",position:50},{label:":)",position:"end"}],colorFunction:e=>e<=3?"#ff4444":e<=6?"#ffa500":"#4caf50",valueFormatter:e=>`${e}/10`}},t={render:n,args:{min:-10,max:40,value:22,step:.5,label:"Temperature",showValue:!0,showTooltip:!0,colorFunction:e=>{const r=(e+10)/50;return r<.3?"#4fc3f7":r<.7?"#66bb6a":"#ff7043"},valueFormatter:e=>`${e} C`}},l={render:n,args:{min:1,max:5,value:3,label:"How are you feeling?",showValue:!0,labels:[{label:"Terrible",position:"start"},{label:"Okay",position:50},{label:"Great",position:"end"}],colorFunction:e=>{const r=["#f44336","#ff9800","#ffc107","#4caf50","#2196f3"];return r[e-1]||r[2]},valueFormatter:e=>["Terrible","Bad","Okay","Good","Great"][e-1]||"Okay",config:{size:"lg"}}},s={render:n,args:{min:0,max:100,value:30,label:"Custom Colors",showValue:!0,config:{colors:{fill:"#e91e63",thumb:"#e91e63",text:"#e91e63"}}}};var u,c,m;o.parameters={...o.parameters,docs:{...(u=o.parameters)==null?void 0:u.docs,source:{originalSource:`{
2
2
  render: InteractiveSlider,
3
3
  args: {
4
4
  min: 0,
@@ -1,4 +1,4 @@
1
- import{r as E,j as D}from"./iframe-CwEFvVsM.js";import{R as I,P as O,M as N}from"./Mesh-CwXV3WjE.js";import{T as G}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const P={"soft-aurora-container":"_soft-aurora-container_c4lp8_1"};function H(r){const t=r.replace("#","");return[parseInt(t.slice(0,2),16)/255,parseInt(t.slice(2,4),16)/255,parseInt(t.slice(4,6),16)/255]}const U=`
1
+ import{r as E,j as D}from"./iframe-DKgP8ePJ.js";import{R as I,P as O,M as N}from"./Mesh-CwXV3WjE.js";import{T as G}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const P={"soft-aurora-container":"_soft-aurora-container_c4lp8_1"};function H(r){const t=r.replace("#","");return[parseInt(t.slice(0,2),16)/255,parseInt(t.slice(2,4),16)/255,parseInt(t.slice(4,6),16)/255]}const U=`
2
2
  attribute vec2 uv;
3
3
  attribute vec2 position;
4
4
  varying vec2 vUv;
@@ -1,3 +1,3 @@
1
- import{j as e,r as s,R as d}from"./iframe-CwEFvVsM.js";import{B as t}from"./Button-C5_5Jklb.js";import{C as c}from"./Checkbox-Bvv-yQQP.js";import{T}from"./TextInput-CCXvp-ew.js";import{T as w}from"./Toggle-D4PkYdGP.js";import{S as E}from"./Slider-DOs6EtWq.js";import{s as n}from"./useSound-DNj86aSq.js";import"./preload-helper-C1FmrZbK.js";import"./proxy-yTVbPXe9.js";import"./MotionConfigContext-Do3j9FYR.js";import"./index-DDGDY6hI.js";const x=()=>{const[r,g]=s.useState(!0),[i,p]=s.useState(.5),[l,j]=s.useState("digital"),[v,y]=s.useState(!1),[S,f]=s.useState(!1),[C,k]=s.useState(""),[b,B]=s.useState(50);return d.useEffect(()=>{n.setEnabled(r)},[r]),d.useEffect(()=>{n.setVolume(i)},[i]),d.useEffect(()=>{n.setSoundPack(l)},[l]),e.jsxs("div",{style:{padding:"2rem",maxWidth:"800px",margin:"0 auto"},children:[e.jsx("h1",{children:"🎵 Sound System Demo"}),e.jsxs("div",{style:{padding:"1.5rem",background:"#f5f5f5",borderRadius:"8px",marginBottom:"2rem"},children:[e.jsx("h2",{children:"Sound Controls"}),e.jsx("div",{style:{marginBottom:"1rem"},children:e.jsx(c,{checked:r,onChange:g,label:"Enable Sounds"})}),e.jsxs("div",{style:{marginBottom:"1rem"},children:[e.jsxs("label",{children:["Volume: ",Math.round(i*100),"%"]}),e.jsx("input",{type:"range",min:"0",max:"100",value:i*100,onChange:a=>p(Number(a.target.value)/100),style:{width:"100%",marginTop:"0.5rem"}})]}),e.jsxs("div",{style:{marginBottom:"1rem"},children:[e.jsx("label",{children:"Sound Pack: "}),e.jsxs("select",{value:l,onChange:a=>j(a.target.value),style:{marginLeft:"0.5rem",padding:"0.25rem"},children:[e.jsx("option",{value:"digital",children:"🔊 Digital (Clean & Modern)"}),e.jsx("option",{value:"fantasy",children:"🧙 Fantasy (Magical & Mystical)"}),e.jsx("option",{value:"retro",children:"🎮 Retro (8-bit Gaming)"}),e.jsx("option",{value:"minimal",children:"⚪ Minimal (Subtle & Simple)"}),e.jsx("option",{value:"mechanical",children:"⚙️ Mechanical (Industrial)"})]})]})]}),e.jsxs("div",{style:{marginBottom:"2rem"},children:[e.jsx("h2",{children:"Test Individual Sounds"}),e.jsxs("div",{style:{display:"flex",gap:"0.5rem",flexWrap:"wrap"},children:[e.jsx(t,{variant:"primary",size:"small",onClick:()=>n.play("click"),children:"Click Sound"}),e.jsx(t,{variant:"secondary",size:"small",onClick:()=>n.play("hover"),children:"Hover Sound"}),e.jsx(t,{variant:"outline",size:"small",onClick:()=>n.play("success"),children:"Success Sound"}),e.jsx(t,{variant:"outline",size:"small",onClick:()=>n.play("error"),children:"Error Sound"}),e.jsx(t,{variant:"outline",size:"small",onClick:()=>n.play("warning"),children:"Warning Sound"}),e.jsx(t,{variant:"secondary",size:"small",onClick:()=>n.play("toggle"),children:"Toggle Sound"}),e.jsx(t,{variant:"ghost",size:"small",onClick:()=>n.play("type"),children:"Type Sound"}),e.jsx(t,{variant:"ghost",size:"small",onClick:()=>n.play("delete"),children:"Delete Sound"})]})]}),e.jsxs("div",{style:{marginBottom:"2rem"},children:[e.jsx("h2",{children:"Special Effects"}),e.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[e.jsx(t,{variant:"primary",onClick:()=>n.celebration(),children:"🎉 Celebration"}),e.jsx(t,{variant:"secondary",onClick:()=>n.milestone(),children:"⭐ Milestone"})]})]}),e.jsxs("div",{style:{marginBottom:"2rem"},children:[e.jsx("h2",{children:"Components with Sound Integration"}),e.jsxs("div",{style:{marginBottom:"1.5rem"},children:[e.jsx("h3",{children:"Button with Sounds"}),e.jsx(t,{variant:"primary",soundConfig:{onClick:!0,onHover:!0},children:"Interactive Button (hover, click)"})]}),e.jsxs("div",{style:{marginBottom:"1.5rem"},children:[e.jsx("h3",{children:"Checkbox with Sound"}),e.jsx(c,{checked:v,onChange:y,label:"Check me!",soundConfig:{onClick:!0}})]}),e.jsxs("div",{style:{marginBottom:"1.5rem"},children:[e.jsx("h3",{children:"Toggle with Sound"}),e.jsx(w,{isOn:S,onToggle:f,leftLabel:"Off",rightLabel:"On",soundConfig:{onClick:!0}})]}),e.jsxs("div",{style:{marginBottom:"1.5rem"},children:[e.jsx("h3",{children:"Input with Sound"}),e.jsx(T,{label:"Type something",value:C,onChange:k,placeholder:"Type to hear typing sounds",enableTypingSounds:!0})]}),e.jsxs("div",{style:{marginBottom:"1.5rem"},children:[e.jsx("h3",{children:"Slider with Sound"}),e.jsx(E,{value:b,onChange:B,min:0,max:100,label:"Adjust me",soundConfig:{onClick:!0}})]})]}),e.jsxs("div",{style:{padding:"1rem",background:"#e8f4f8",borderRadius:"8px",fontSize:"0.9rem"},children:[e.jsx("h3",{children:"ℹ️ How to Use"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Enable sounds using the checkbox above"}),e.jsx("li",{children:"Adjust volume with the slider"}),e.jsx("li",{children:"Click the test buttons to hear individual sounds"}),e.jsx("li",{children:"Interact with the components below to hear sounds in context"}),e.jsx("li",{children:"Note: AudioContext requires user interaction to start (click any button first)"})]})]})]})},L={title:"Atoms/SoundDemo",component:x,parameters:{layout:"fullscreen",docs:{description:{component:"Interactive demo for testing the sound system with Web Audio API"}}}},o={render:()=>e.jsx(x,{})};var m,u,h;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`{
1
+ import{j as e,r as s,R as d}from"./iframe-DKgP8ePJ.js";import{B as t}from"./Button-DBcEd-5z.js";import{C as c}from"./Checkbox-aVacz-Sy.js";import{T}from"./TextInput-DFgonmie.js";import{T as w}from"./Toggle-ZeBAtc8u.js";import{S as E}from"./Slider-Bc1lFUw9.js";import{s as n}from"./useSound-jrNQ4676.js";import"./preload-helper-C1FmrZbK.js";import"./proxy-BowLazAQ.js";import"./MotionConfigContext--4MeZeHl.js";import"./index-C-qIoU0_.js";const x=()=>{const[r,g]=s.useState(!0),[i,p]=s.useState(.5),[l,j]=s.useState("digital"),[v,y]=s.useState(!1),[S,f]=s.useState(!1),[C,k]=s.useState(""),[b,B]=s.useState(50);return d.useEffect(()=>{n.setEnabled(r)},[r]),d.useEffect(()=>{n.setVolume(i)},[i]),d.useEffect(()=>{n.setSoundPack(l)},[l]),e.jsxs("div",{style:{padding:"2rem",maxWidth:"800px",margin:"0 auto"},children:[e.jsx("h1",{children:"🎵 Sound System Demo"}),e.jsxs("div",{style:{padding:"1.5rem",background:"#f5f5f5",borderRadius:"8px",marginBottom:"2rem"},children:[e.jsx("h2",{children:"Sound Controls"}),e.jsx("div",{style:{marginBottom:"1rem"},children:e.jsx(c,{checked:r,onChange:g,label:"Enable Sounds"})}),e.jsxs("div",{style:{marginBottom:"1rem"},children:[e.jsxs("label",{children:["Volume: ",Math.round(i*100),"%"]}),e.jsx("input",{type:"range",min:"0",max:"100",value:i*100,onChange:a=>p(Number(a.target.value)/100),style:{width:"100%",marginTop:"0.5rem"}})]}),e.jsxs("div",{style:{marginBottom:"1rem"},children:[e.jsx("label",{children:"Sound Pack: "}),e.jsxs("select",{value:l,onChange:a=>j(a.target.value),style:{marginLeft:"0.5rem",padding:"0.25rem"},children:[e.jsx("option",{value:"digital",children:"🔊 Digital (Clean & Modern)"}),e.jsx("option",{value:"fantasy",children:"🧙 Fantasy (Magical & Mystical)"}),e.jsx("option",{value:"retro",children:"🎮 Retro (8-bit Gaming)"}),e.jsx("option",{value:"minimal",children:"⚪ Minimal (Subtle & Simple)"}),e.jsx("option",{value:"mechanical",children:"⚙️ Mechanical (Industrial)"})]})]})]}),e.jsxs("div",{style:{marginBottom:"2rem"},children:[e.jsx("h2",{children:"Test Individual Sounds"}),e.jsxs("div",{style:{display:"flex",gap:"0.5rem",flexWrap:"wrap"},children:[e.jsx(t,{variant:"primary",size:"small",onClick:()=>n.play("click"),children:"Click Sound"}),e.jsx(t,{variant:"secondary",size:"small",onClick:()=>n.play("hover"),children:"Hover Sound"}),e.jsx(t,{variant:"outline",size:"small",onClick:()=>n.play("success"),children:"Success Sound"}),e.jsx(t,{variant:"outline",size:"small",onClick:()=>n.play("error"),children:"Error Sound"}),e.jsx(t,{variant:"outline",size:"small",onClick:()=>n.play("warning"),children:"Warning Sound"}),e.jsx(t,{variant:"secondary",size:"small",onClick:()=>n.play("toggle"),children:"Toggle Sound"}),e.jsx(t,{variant:"ghost",size:"small",onClick:()=>n.play("type"),children:"Type Sound"}),e.jsx(t,{variant:"ghost",size:"small",onClick:()=>n.play("delete"),children:"Delete Sound"})]})]}),e.jsxs("div",{style:{marginBottom:"2rem"},children:[e.jsx("h2",{children:"Special Effects"}),e.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[e.jsx(t,{variant:"primary",onClick:()=>n.celebration(),children:"🎉 Celebration"}),e.jsx(t,{variant:"secondary",onClick:()=>n.milestone(),children:"⭐ Milestone"})]})]}),e.jsxs("div",{style:{marginBottom:"2rem"},children:[e.jsx("h2",{children:"Components with Sound Integration"}),e.jsxs("div",{style:{marginBottom:"1.5rem"},children:[e.jsx("h3",{children:"Button with Sounds"}),e.jsx(t,{variant:"primary",soundConfig:{onClick:!0,onHover:!0},children:"Interactive Button (hover, click)"})]}),e.jsxs("div",{style:{marginBottom:"1.5rem"},children:[e.jsx("h3",{children:"Checkbox with Sound"}),e.jsx(c,{checked:v,onChange:y,label:"Check me!",soundConfig:{onClick:!0}})]}),e.jsxs("div",{style:{marginBottom:"1.5rem"},children:[e.jsx("h3",{children:"Toggle with Sound"}),e.jsx(w,{isOn:S,onToggle:f,leftLabel:"Off",rightLabel:"On",soundConfig:{onClick:!0}})]}),e.jsxs("div",{style:{marginBottom:"1.5rem"},children:[e.jsx("h3",{children:"Input with Sound"}),e.jsx(T,{label:"Type something",value:C,onChange:k,placeholder:"Type to hear typing sounds",enableTypingSounds:!0})]}),e.jsxs("div",{style:{marginBottom:"1.5rem"},children:[e.jsx("h3",{children:"Slider with Sound"}),e.jsx(E,{value:b,onChange:B,min:0,max:100,label:"Adjust me",soundConfig:{onClick:!0}})]})]}),e.jsxs("div",{style:{padding:"1rem",background:"#e8f4f8",borderRadius:"8px",fontSize:"0.9rem"},children:[e.jsx("h3",{children:"ℹ️ How to Use"}),e.jsxs("ul",{children:[e.jsx("li",{children:"Enable sounds using the checkbox above"}),e.jsx("li",{children:"Adjust volume with the slider"}),e.jsx("li",{children:"Click the test buttons to hear individual sounds"}),e.jsx("li",{children:"Interact with the components below to hear sounds in context"}),e.jsx("li",{children:"Note: AudioContext requires user interaction to start (click any button first)"})]})]})]})},L={title:"Atoms/SoundDemo",component:x,parameters:{layout:"fullscreen",docs:{description:{component:"Interactive demo for testing the sound system with Web Audio API"}}}},o={render:()=>e.jsx(x,{})};var m,u,h;o.parameters={...o.parameters,docs:{...(m=o.parameters)==null?void 0:m.docs,source:{originalSource:`{
2
2
  render: () => <SoundDemo />
3
3
  }`,...(h=(u=o.parameters)==null?void 0:u.docs)==null?void 0:h.source}}};const N=["Default"];export{o as Default,N as __namedExportsOrder,L as default};
@@ -1,4 +1,4 @@
1
- import{r as V,j as le}from"./iframe-CwEFvVsM.js";import"./preload-helper-C1FmrZbK.js";function ve({SIM_RESOLUTION:de=128,DYE_RESOLUTION:me=1440,CAPTURE_RESOLUTION:it=512,DENSITY_DISSIPATION:he=3.5,VELOCITY_DISSIPATION:xe=2,PRESSURE:Te=.1,PRESSURE_ITERATIONS:pe=20,CURL:Re=3,SPLAT_RADIUS:Ee=.2,SPLAT_FORCE:ge=6e3,SHADING:Se=!0,COLOR_UPDATE_SPEED:De=10,BACK_COLOR:ot={r:.5,g:0,b:0},TRANSPARENT:at=!0}){const H=V.useRef(null),U=V.useRef(null);return V.useEffect(()=>{const c=H.current;if(!c)return;let q=!0;function Ae(){this.id=-1,this.texcoordX=0,this.texcoordY=0,this.prevTexcoordX=0,this.prevTexcoordY=0,this.deltaX=0,this.deltaY=0,this.down=!1,this.moved=!1,this.color=[0,0,0]}let v={SIM_RESOLUTION:de,DYE_RESOLUTION:me,DENSITY_DISSIPATION:he,VELOCITY_DISSIPATION:xe,PRESSURE:Te,PRESSURE_ITERATIONS:pe,CURL:Re,SPLAT_RADIUS:Ee,SPLAT_FORCE:ge,SHADING:Se,COLOR_UPDATE_SPEED:De},_=[new Ae];const{gl:t,ext:E}=_e(c);E.supportLinearFiltering||(v.DYE_RESOLUTION=256,v.SHADING=!1);function _e(e){const r={alpha:!0,depth:!1,stencil:!1,antialias:!1,preserveDrawingBuffer:!1};let i=e.getContext("webgl2",r);const o=!!i;o||(i=e.getContext("webgl",r)||e.getContext("experimental-webgl",r));let a,n;o?(i.getExtension("EXT_color_buffer_float"),n=i.getExtension("OES_texture_float_linear")):(a=i.getExtension("OES_texture_half_float"),n=i.getExtension("OES_texture_half_float_linear")),i.clearColor(0,0,0,1);const u=o?i.HALF_FLOAT:a&&a.HALF_FLOAT_OES;let f,s,R;return o?(f=S(i,i.RGBA16F,i.RGBA,u),s=S(i,i.RG16F,i.RG,u),R=S(i,i.R16F,i.RED,u)):(f=S(i,i.RGBA,i.RGBA,u),s=S(i,i.RGBA,i.RGBA,u),R=S(i,i.RGBA,i.RGBA,u)),{gl:i,ext:{formatRGBA:f,formatRG:s,formatR:R,halfFloatTexType:u,supportLinearFiltering:n}}}function S(e,r,i,o){if(!ye(e,r,i,o))switch(r){case e.R16F:return S(e,e.RG16F,e.RG,o);case e.RG16F:return S(e,e.RGBA16F,e.RGBA,o);default:return null}return{internalFormat:r,format:i}}function ye(e,r,i,o){const a=e.createTexture();e.bindTexture(e.TEXTURE_2D,a),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(e.TEXTURE_2D,0,r,4,4,0,i,o,null);const n=e.createFramebuffer();return e.bindFramebuffer(e.FRAMEBUFFER,n),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,a,0),e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE}class Fe{constructor(r,i){this.vertexShader=r,this.fragmentShaderSource=i,this.programs=[],this.activeProgram=null,this.uniforms=[]}setKeywords(r){let i=0;for(let a=0;a<r.length;a++)i+=rt(r[a]);let o=this.programs[i];if(o==null){let a=h(t.FRAGMENT_SHADER,this.fragmentShaderSource,r);o=W(this.vertexShader,a),this.programs[i]=o}o!==this.activeProgram&&(this.uniforms=k(o),this.activeProgram=o)}bind(){t.useProgram(this.activeProgram)}}class g{constructor(r,i){this.uniforms={},this.program=W(r,i),this.uniforms=k(this.program)}bind(){t.useProgram(this.program)}}function W(e,r){let i=t.createProgram();return t.attachShader(i,e),t.attachShader(i,r),t.linkProgram(i),t.getProgramParameter(i,t.LINK_STATUS)||console.trace(t.getProgramInfoLog(i)),i}function k(e){let r=[],i=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let o=0;o<i;o++){let a=t.getActiveUniform(e,o).name;r[a]=t.getUniformLocation(e,a)}return r}function h(e,r,i){r=we(r,i);const o=t.createShader(e);return t.shaderSource(o,r),t.compileShader(o),t.getShaderParameter(o,t.COMPILE_STATUS)||console.trace(t.getShaderInfoLog(o)),o}function we(e,r){if(!r)return e;let i="";return r.forEach(o=>{i+="#define "+o+`
1
+ import{r as V,j as le}from"./iframe-DKgP8ePJ.js";import"./preload-helper-C1FmrZbK.js";function ve({SIM_RESOLUTION:de=128,DYE_RESOLUTION:me=1440,CAPTURE_RESOLUTION:it=512,DENSITY_DISSIPATION:he=3.5,VELOCITY_DISSIPATION:xe=2,PRESSURE:Te=.1,PRESSURE_ITERATIONS:pe=20,CURL:Re=3,SPLAT_RADIUS:Ee=.2,SPLAT_FORCE:ge=6e3,SHADING:Se=!0,COLOR_UPDATE_SPEED:De=10,BACK_COLOR:ot={r:.5,g:0,b:0},TRANSPARENT:at=!0}){const H=V.useRef(null),U=V.useRef(null);return V.useEffect(()=>{const c=H.current;if(!c)return;let q=!0;function Ae(){this.id=-1,this.texcoordX=0,this.texcoordY=0,this.prevTexcoordX=0,this.prevTexcoordY=0,this.deltaX=0,this.deltaY=0,this.down=!1,this.moved=!1,this.color=[0,0,0]}let v={SIM_RESOLUTION:de,DYE_RESOLUTION:me,DENSITY_DISSIPATION:he,VELOCITY_DISSIPATION:xe,PRESSURE:Te,PRESSURE_ITERATIONS:pe,CURL:Re,SPLAT_RADIUS:Ee,SPLAT_FORCE:ge,SHADING:Se,COLOR_UPDATE_SPEED:De},_=[new Ae];const{gl:t,ext:E}=_e(c);E.supportLinearFiltering||(v.DYE_RESOLUTION=256,v.SHADING=!1);function _e(e){const r={alpha:!0,depth:!1,stencil:!1,antialias:!1,preserveDrawingBuffer:!1};let i=e.getContext("webgl2",r);const o=!!i;o||(i=e.getContext("webgl",r)||e.getContext("experimental-webgl",r));let a,n;o?(i.getExtension("EXT_color_buffer_float"),n=i.getExtension("OES_texture_float_linear")):(a=i.getExtension("OES_texture_half_float"),n=i.getExtension("OES_texture_half_float_linear")),i.clearColor(0,0,0,1);const u=o?i.HALF_FLOAT:a&&a.HALF_FLOAT_OES;let f,s,R;return o?(f=S(i,i.RGBA16F,i.RGBA,u),s=S(i,i.RG16F,i.RG,u),R=S(i,i.R16F,i.RED,u)):(f=S(i,i.RGBA,i.RGBA,u),s=S(i,i.RGBA,i.RGBA,u),R=S(i,i.RGBA,i.RGBA,u)),{gl:i,ext:{formatRGBA:f,formatRG:s,formatR:R,halfFloatTexType:u,supportLinearFiltering:n}}}function S(e,r,i,o){if(!ye(e,r,i,o))switch(r){case e.R16F:return S(e,e.RG16F,e.RG,o);case e.RG16F:return S(e,e.RGBA16F,e.RGBA,o);default:return null}return{internalFormat:r,format:i}}function ye(e,r,i,o){const a=e.createTexture();e.bindTexture(e.TEXTURE_2D,a),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(e.TEXTURE_2D,0,r,4,4,0,i,o,null);const n=e.createFramebuffer();return e.bindFramebuffer(e.FRAMEBUFFER,n),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,a,0),e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE}class Fe{constructor(r,i){this.vertexShader=r,this.fragmentShaderSource=i,this.programs=[],this.activeProgram=null,this.uniforms=[]}setKeywords(r){let i=0;for(let a=0;a<r.length;a++)i+=rt(r[a]);let o=this.programs[i];if(o==null){let a=h(t.FRAGMENT_SHADER,this.fragmentShaderSource,r);o=W(this.vertexShader,a),this.programs[i]=o}o!==this.activeProgram&&(this.uniforms=k(o),this.activeProgram=o)}bind(){t.useProgram(this.activeProgram)}}class g{constructor(r,i){this.uniforms={},this.program=W(r,i),this.uniforms=k(this.program)}bind(){t.useProgram(this.program)}}function W(e,r){let i=t.createProgram();return t.attachShader(i,e),t.attachShader(i,r),t.linkProgram(i),t.getProgramParameter(i,t.LINK_STATUS)||console.trace(t.getProgramInfoLog(i)),i}function k(e){let r=[],i=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let o=0;o<i;o++){let a=t.getActiveUniform(e,o).name;r[a]=t.getUniformLocation(e,a)}return r}function h(e,r,i){r=we(r,i);const o=t.createShader(e);return t.shaderSource(o,r),t.compileShader(o),t.getShaderParameter(o,t.COMPILE_STATUS)||console.trace(t.getShaderInfoLog(o)),o}function we(e,r){if(!r)return e;let i="";return r.forEach(o=>{i+="#define "+o+`
2
2
  `}),i+e}const T=h(t.VERTEX_SHADER,`
3
3
  precision highp float;
4
4
  attribute vec2 aPosition;
@@ -1,4 +1,4 @@
1
- import{r as g,j as f}from"./iframe-CwEFvVsM.js";import"./preload-helper-C1FmrZbK.js";const h={"card-spotlight":"_card-spotlight_leen8_1"},n=({children:c,className:p="",spotlightColor:u="rgba(255, 255, 255, 0.25)"})=>{const e=g.useRef(null),d=o=>{const r=e.current.getBoundingClientRect(),i=o.clientX-r.left,m=o.clientY-r.top;e.current.style.setProperty("--mouse-x",`${i}px`),e.current.style.setProperty("--mouse-y",`${m}px`),e.current.style.setProperty("--spotlight-color",u)};return f.jsx("div",{ref:e,onMouseMove:d,className:`${h["card-spotlight"]} ${p}`,children:c})};n.__docgenInfo={description:"",methods:[],displayName:"SpotlightCard",props:{className:{defaultValue:{value:"''",computed:!1},required:!1},spotlightColor:{defaultValue:{value:"'rgba(255, 255, 255, 0.25)'",computed:!1},required:!1}}};const C={title:"ReactBits/Components/SpotlightCard",component:n,parameters:{layout:"fullscreen"}},t={args:{children:"Hello World",spotlightColor:"rgba(255, 255, 255, 0.25)"}};var s,l,a;t.parameters={...t.parameters,docs:{...(s=t.parameters)==null?void 0:s.docs,source:{originalSource:`{
1
+ import{r as g,j as f}from"./iframe-DKgP8ePJ.js";import"./preload-helper-C1FmrZbK.js";const h={"card-spotlight":"_card-spotlight_leen8_1"},n=({children:c,className:p="",spotlightColor:u="rgba(255, 255, 255, 0.25)"})=>{const e=g.useRef(null),d=o=>{const r=e.current.getBoundingClientRect(),i=o.clientX-r.left,m=o.clientY-r.top;e.current.style.setProperty("--mouse-x",`${i}px`),e.current.style.setProperty("--mouse-y",`${m}px`),e.current.style.setProperty("--spotlight-color",u)};return f.jsx("div",{ref:e,onMouseMove:d,className:`${h["card-spotlight"]} ${p}`,children:c})};n.__docgenInfo={description:"",methods:[],displayName:"SpotlightCard",props:{className:{defaultValue:{value:"''",computed:!1},required:!1},spotlightColor:{defaultValue:{value:"'rgba(255, 255, 255, 0.25)'",computed:!1},required:!1}}};const C={title:"ReactBits/Components/SpotlightCard",component:n,parameters:{layout:"fullscreen"}},t={args:{children:"Hello World",spotlightColor:"rgba(255, 255, 255, 0.25)"}};var s,l,a;t.parameters={...t.parameters,docs:{...(s=t.parameters)==null?void 0:s.docs,source:{originalSource:`{
2
2
  args: {
3
3
  children: 'Hello World',
4
4
  spotlightColor: 'rgba(255, 255, 255, 0.25)'
@@ -1,4 +1,4 @@
1
- import{r as c,j as t}from"./iframe-CwEFvVsM.js";import{m as k}from"./proxy-yTVbPXe9.js";import{u as R}from"./use-motion-value-wdb7Vlfx.js";import{u as q}from"./use-transform-C7g5E8Wc.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-Do3j9FYR.js";const $="_card_1aymn_8",o={"stack-container":"_stack-container_1aymn_1","card-rotate":"_card-rotate_1aymn_8","card-rotate-disabled":"_card-rotate-disabled_1aymn_15",card:$,"card-image":"_card-image_1aymn_38"};function I({children:n,onSendToBack:g,sensitivity:s,disableDrag:u=!1}){const d=R(0),i=R(0),m=q(i,[-100,100],[60,-60]),f=q(d,[-100,100],[-60,60]);function b(y,p){Math.abs(p.offset.x)>s||Math.abs(p.offset.y)>s?g():(d.set(0),i.set(0))}return u?t.jsx(k.div,{className:`${o["card-rotate-disabled"]}`,style:{x:0,y:0},children:n}):t.jsx(k.div,{className:`${o["card-rotate"]}`,style:{x:d,y:i,rotateX:m,rotateY:f},drag:!0,dragConstraints:{top:0,right:0,bottom:0,left:0},dragElastic:.6,whileTap:{cursor:"grabbing"},onDragEnd:b,children:n})}function O({randomRotation:n=!1,sensitivity:g=200,cards:s=[],animationConfig:u={stiffness:260,damping:20},sendToBackOnClick:d=!1,autoplay:i=!1,autoplayDelay:m=3e3,pauseOnHover:f=!1,mobileClickOnly:b=!1,mobileBreakpoint:y=768}){const[p,S]=c.useState(!1),[j,x]=c.useState(!1);c.useEffect(()=>{const e=()=>{S(window.innerWidth<y)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[y]);const w=b&&p,D=d||w,[r,_]=c.useState(()=>s.length?s.map((e,a)=>({id:a+1,content:e})):[{id:1,content:t.jsx("img",{src:"https://images.unsplash.com/photo-1480074568708-e7b720bb3f09?q=80&w=500&auto=format",alt:"card-1",className:`${o["card-image"]}`})},{id:2,content:t.jsx("img",{src:"https://images.unsplash.com/photo-1449844908441-8829872d2607?q=80&w=500&auto=format",alt:"card-2",className:`${o["card-image"]}`})},{id:3,content:t.jsx("img",{src:"https://images.unsplash.com/photo-1452626212852-811d58933cae?q=80&w=500&auto=format",alt:"card-3",className:`${o["card-image"]}`})},{id:4,content:t.jsx("img",{src:"https://images.unsplash.com/photo-1572120360610-d971b9d7767c?q=80&w=500&auto=format",alt:"card-4",className:`${o["card-image"]}`})}]);c.useEffect(()=>{s.length&&_(s.map((e,a)=>({id:a+1,content:e})))},[s]);const v=e=>{_(a=>{const l=[...a],M=l.findIndex(F=>F.id===e),[N]=l.splice(M,1);return l.unshift(N),l})};return c.useEffect(()=>{if(i&&r.length>1&&!j){const e=setInterval(()=>{const a=r[r.length-1].id;v(a)},m);return()=>clearInterval(e)}},[i,m,r,j]),t.jsx("div",{className:`${o["stack-container"]}`,onMouseEnter:()=>f&&x(!0),onMouseLeave:()=>f&&x(!1),children:r.map((e,a)=>{const l=n?Math.random()*10-5:0;return t.jsx(I,{onSendToBack:()=>v(e.id),sensitivity:g,disableDrag:w,children:t.jsx(k.div,{className:`${o.card}`,onClick:()=>D&&v(e.id),animate:{rotateZ:(r.length-a-1)*4+l,scale:1+a*.06-r.length*.06,transformOrigin:"90% 90%"},initial:!1,transition:{type:"spring",stiffness:u.stiffness,damping:u.damping},children:e.content})},e.id)})})}O.__docgenInfo={description:"",methods:[],displayName:"Stack",props:{randomRotation:{defaultValue:{value:"false",computed:!1},required:!1},sensitivity:{defaultValue:{value:"200",computed:!1},required:!1},cards:{defaultValue:{value:"[]",computed:!1},required:!1},animationConfig:{defaultValue:{value:"{ stiffness: 260, damping: 20 }",computed:!1},required:!1},sendToBackOnClick:{defaultValue:{value:"false",computed:!1},required:!1},autoplay:{defaultValue:{value:"false",computed:!1},required:!1},autoplayDelay:{defaultValue:{value:"3000",computed:!1},required:!1},pauseOnHover:{defaultValue:{value:"false",computed:!1},required:!1},mobileClickOnly:{defaultValue:{value:"false",computed:!1},required:!1},mobileBreakpoint:{defaultValue:{value:"768",computed:!1},required:!1}}};const W={title:"ReactBits/Components/Stack",component:O,parameters:{layout:"fullscreen"}},h={args:{randomRotation:!1,sensitivity:200,sendToBackOnClick:!1,autoplay:!1,autoplayDelay:3e3,pauseOnHover:!1,mobileClickOnly:!1,cards:[t.jsx("img",{src:"https://picsum.photos/seed/a/400/300",alt:"card-1",style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:12}},"1"),t.jsx("img",{src:"https://picsum.photos/seed/b/400/300",alt:"card-2",style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:12}},"2"),t.jsx("img",{src:"https://picsum.photos/seed/c/400/300",alt:"card-3",style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:12}},"3"),t.jsx("img",{src:"https://picsum.photos/seed/d/400/300",alt:"card-4",style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:12}},"4")]}};var E,C,V;h.parameters={...h.parameters,docs:{...(E=h.parameters)==null?void 0:E.docs,source:{originalSource:`{
1
+ import{r as c,j as t}from"./iframe-DKgP8ePJ.js";import{m as k}from"./proxy-BowLazAQ.js";import{u as R}from"./use-motion-value-CcCAM0jJ.js";import{u as q}from"./use-transform-B5QCn53b.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext--4MeZeHl.js";const $="_card_1aymn_8",o={"stack-container":"_stack-container_1aymn_1","card-rotate":"_card-rotate_1aymn_8","card-rotate-disabled":"_card-rotate-disabled_1aymn_15",card:$,"card-image":"_card-image_1aymn_38"};function I({children:n,onSendToBack:g,sensitivity:s,disableDrag:u=!1}){const d=R(0),i=R(0),m=q(i,[-100,100],[60,-60]),f=q(d,[-100,100],[-60,60]);function b(y,p){Math.abs(p.offset.x)>s||Math.abs(p.offset.y)>s?g():(d.set(0),i.set(0))}return u?t.jsx(k.div,{className:`${o["card-rotate-disabled"]}`,style:{x:0,y:0},children:n}):t.jsx(k.div,{className:`${o["card-rotate"]}`,style:{x:d,y:i,rotateX:m,rotateY:f},drag:!0,dragConstraints:{top:0,right:0,bottom:0,left:0},dragElastic:.6,whileTap:{cursor:"grabbing"},onDragEnd:b,children:n})}function O({randomRotation:n=!1,sensitivity:g=200,cards:s=[],animationConfig:u={stiffness:260,damping:20},sendToBackOnClick:d=!1,autoplay:i=!1,autoplayDelay:m=3e3,pauseOnHover:f=!1,mobileClickOnly:b=!1,mobileBreakpoint:y=768}){const[p,S]=c.useState(!1),[j,x]=c.useState(!1);c.useEffect(()=>{const e=()=>{S(window.innerWidth<y)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[y]);const w=b&&p,D=d||w,[r,_]=c.useState(()=>s.length?s.map((e,a)=>({id:a+1,content:e})):[{id:1,content:t.jsx("img",{src:"https://images.unsplash.com/photo-1480074568708-e7b720bb3f09?q=80&w=500&auto=format",alt:"card-1",className:`${o["card-image"]}`})},{id:2,content:t.jsx("img",{src:"https://images.unsplash.com/photo-1449844908441-8829872d2607?q=80&w=500&auto=format",alt:"card-2",className:`${o["card-image"]}`})},{id:3,content:t.jsx("img",{src:"https://images.unsplash.com/photo-1452626212852-811d58933cae?q=80&w=500&auto=format",alt:"card-3",className:`${o["card-image"]}`})},{id:4,content:t.jsx("img",{src:"https://images.unsplash.com/photo-1572120360610-d971b9d7767c?q=80&w=500&auto=format",alt:"card-4",className:`${o["card-image"]}`})}]);c.useEffect(()=>{s.length&&_(s.map((e,a)=>({id:a+1,content:e})))},[s]);const v=e=>{_(a=>{const l=[...a],M=l.findIndex(F=>F.id===e),[N]=l.splice(M,1);return l.unshift(N),l})};return c.useEffect(()=>{if(i&&r.length>1&&!j){const e=setInterval(()=>{const a=r[r.length-1].id;v(a)},m);return()=>clearInterval(e)}},[i,m,r,j]),t.jsx("div",{className:`${o["stack-container"]}`,onMouseEnter:()=>f&&x(!0),onMouseLeave:()=>f&&x(!1),children:r.map((e,a)=>{const l=n?Math.random()*10-5:0;return t.jsx(I,{onSendToBack:()=>v(e.id),sensitivity:g,disableDrag:w,children:t.jsx(k.div,{className:`${o.card}`,onClick:()=>D&&v(e.id),animate:{rotateZ:(r.length-a-1)*4+l,scale:1+a*.06-r.length*.06,transformOrigin:"90% 90%"},initial:!1,transition:{type:"spring",stiffness:u.stiffness,damping:u.damping},children:e.content})},e.id)})})}O.__docgenInfo={description:"",methods:[],displayName:"Stack",props:{randomRotation:{defaultValue:{value:"false",computed:!1},required:!1},sensitivity:{defaultValue:{value:"200",computed:!1},required:!1},cards:{defaultValue:{value:"[]",computed:!1},required:!1},animationConfig:{defaultValue:{value:"{ stiffness: 260, damping: 20 }",computed:!1},required:!1},sendToBackOnClick:{defaultValue:{value:"false",computed:!1},required:!1},autoplay:{defaultValue:{value:"false",computed:!1},required:!1},autoplayDelay:{defaultValue:{value:"3000",computed:!1},required:!1},pauseOnHover:{defaultValue:{value:"false",computed:!1},required:!1},mobileClickOnly:{defaultValue:{value:"false",computed:!1},required:!1},mobileBreakpoint:{defaultValue:{value:"768",computed:!1},required:!1}}};const W={title:"ReactBits/Components/Stack",component:O,parameters:{layout:"fullscreen"}},h={args:{randomRotation:!1,sensitivity:200,sendToBackOnClick:!1,autoplay:!1,autoplayDelay:3e3,pauseOnHover:!1,mobileClickOnly:!1,cards:[t.jsx("img",{src:"https://picsum.photos/seed/a/400/300",alt:"card-1",style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:12}},"1"),t.jsx("img",{src:"https://picsum.photos/seed/b/400/300",alt:"card-2",style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:12}},"2"),t.jsx("img",{src:"https://picsum.photos/seed/c/400/300",alt:"card-3",style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:12}},"3"),t.jsx("img",{src:"https://picsum.photos/seed/d/400/300",alt:"card-4",style:{width:"100%",height:"100%",objectFit:"cover",borderRadius:12}},"4")]}};var E,C,V;h.parameters={...h.parameters,docs:{...(E=h.parameters)==null?void 0:E.docs,source:{originalSource:`{
2
2
  args: {
3
3
  randomRotation: false,
4
4
  sensitivity: 200,
@@ -1,4 +1,4 @@
1
- import{r as s,R as le,j as r}from"./iframe-CwEFvVsM.js";import{g as l}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const a={"staggered-menu-wrapper":"_staggered-menu-wrapper_rbage_1","staggered-menu-header":"_staggered-menu-header_rbage_19","sm-logo":"_sm-logo_rbage_37","sm-logo-img":"_sm-logo-img_rbage_43","sm-toggle":"_sm-toggle_rbage_50","sm-toggle-textWrap":"_sm-toggle-textWrap_rbage_74","sm-toggle-textInner":"_sm-toggle-textInner_rbage_84","sm-toggle-line":"_sm-toggle-line_rbage_90","sm-icon":"_sm-icon_rbage_96","sm-panel-itemWrap":"_sm-panel-itemWrap_rbage_107","sm-icon-line":"_sm-icon-line_rbage_113","staggered-menu-panel":"_staggered-menu-panel_rbage_129","sm-prelayers":"_sm-prelayers_rbage_151","sm-prelayer":"_sm-prelayer_rbage_151","sm-panel-inner":"_sm-panel-inner_rbage_175","sm-socials":"_sm-socials_rbage_182","sm-socials-title":"_sm-socials-title_rbage_190","sm-socials-list":"_sm-socials-list_rbage_197","sm-socials-link":"_sm-socials-link_rbage_208","sm-panel-list":"_sm-panel-list_rbage_258","sm-panel-item":"_sm-panel-item_rbage_107","sm-panel-itemLabel":"_sm-panel-itemLabel_rbage_302"},oe=({position:k="right",colors:P=["#B19EEF","#5227FF"],items:T=[],socialItems:V=[],displaySocials:ce=!0,displayItemNumbering:ue=!0,className:D,logoUrl:me="/src/assets/logos/reactbits-gh-white.svg",menuButtonColor:b="#fff",openMenuButtonColor:v="#fff",accentColor:G="#5227FF",changeMenuColorOnOpen:L=!0,isFixed:fe=!1,closeOnClickAway:U=!0,onMenuOpen:N,onMenuClose:h})=>{const[y,z]=s.useState(!1),R=s.useRef(!1),_=s.useRef(null),J=s.useRef(null),I=s.useRef([]),K=s.useRef(null),Q=s.useRef(null),W=s.useRef(null),H=s.useRef(null),pe=s.useRef(null),[ge,de]=s.useState(["Menu","Close"]),S=s.useRef(null),w=s.useRef(null),O=s.useRef(null),X=s.useRef(null),Y=s.useRef(null),p=s.useRef(null),j=s.useRef(!1),Z=s.useRef(null);s.useLayoutEffect(()=>{const e=l.context(()=>{const t=_.current,n=J.current,o=K.current,m=Q.current,i=W.current,c=H.current;if(!t||!o||!m||!i||!c)return;let f=[];n&&(f=Array.from(n.querySelectorAll(".sm-prelayer"))),I.current=f;const u=k==="left"?-100:100;l.set([t,...f],{xPercent:u}),l.set(o,{transformOrigin:"50% 50%",rotate:0}),l.set(m,{transformOrigin:"50% 50%",rotate:90}),l.set(i,{rotate:0,transformOrigin:"50% 50%"}),l.set(c,{yPercent:0}),p.current&&l.set(p.current,{color:b})});return()=>e.revert()},[b,k]);const M=s.useCallback(()=>{var ae,se;const e=_.current,t=I.current;if(!e)return null;(ae=S.current)==null||ae.kill(),w.current&&(w.current.kill(),w.current=null),(se=Z.current)==null||se.kill();const n=Array.from(e.querySelectorAll(".sm-panel-itemLabel")),o=Array.from(e.querySelectorAll(".sm-panel-list[data-numbering] .sm-panel-item")),m=e.querySelector(".sm-socials-title"),i=Array.from(e.querySelectorAll(".sm-socials-link")),c=t.map(d=>({el:d,start:Number(l.getProperty(d,"xPercent"))})),f=Number(l.getProperty(e,"xPercent"));n.length&&l.set(n,{yPercent:140,rotate:10}),o.length&&l.set(o,{"--sm-num-opacity":0}),m&&l.set(m,{opacity:0}),i.length&&l.set(i,{y:25,opacity:0});const u=l.timeline({paused:!0});c.forEach((d,A)=>{u.fromTo(d.el,{xPercent:d.start},{xPercent:0,duration:.5,ease:"power4.out"},A*.07)});const g=(c.length?(c.length-1)*.07:0)+(c.length?.08:0),B=.65;if(u.fromTo(e,{xPercent:f},{xPercent:0,duration:B,ease:"power4.out"},g),n.length){const A=g+B*.15;u.to(n,{yPercent:0,rotate:0,duration:1,ease:"power4.out",stagger:{each:.1,from:"start"}},A),o.length&&u.to(o,{duration:.6,ease:"power2.out","--sm-num-opacity":1,stagger:{each:.08,from:"start"}},A+.1)}if(m||i.length){const d=g+B*.4;m&&u.to(m,{opacity:1,duration:.5,ease:"power2.out"},d),i.length&&u.to(i,{y:0,opacity:1,duration:.55,ease:"power3.out",stagger:{each:.08,from:"start"},onComplete:()=>{l.set(i,{clearProps:"opacity"})}},d+.04)}return S.current=u,u},[]),ee=s.useCallback(()=>{if(j.current)return;j.current=!0;const e=M();e?(e.eventCallback("onComplete",()=>{j.current=!1}),e.play(0)):j.current=!1},[M]),$=s.useCallback(()=>{var m,i,c;(m=S.current)==null||m.kill(),S.current=null,(i=Z.current)==null||i.kill();const e=_.current,t=I.current;if(!e)return;const n=[...t,e];(c=w.current)==null||c.kill();const o=k==="left"?-100:100;w.current=l.to(n,{xPercent:o,duration:.32,ease:"power3.in",overwrite:"auto",onComplete:()=>{const f=Array.from(e.querySelectorAll(".sm-panel-itemLabel"));f.length&&l.set(f,{yPercent:140,rotate:10});const u=Array.from(e.querySelectorAll(".sm-panel-list[data-numbering] .sm-panel-item"));u.length&&l.set(u,{"--sm-num-opacity":0});const x=e.querySelector(".sm-socials-title"),g=Array.from(e.querySelectorAll(".sm-socials-link"));x&&l.set(x,{opacity:0}),g.length&&l.set(g,{y:25,opacity:0}),j.current=!1}})},[k]),q=s.useCallback(e=>{var n;const t=W.current;t&&((n=O.current)==null||n.kill(),e?O.current=l.to(t,{rotate:225,duration:.8,ease:"power4.out",overwrite:"auto"}):O.current=l.to(t,{rotate:0,duration:.35,ease:"power3.inOut",overwrite:"auto"}))},[]),E=s.useCallback(e=>{var n;const t=p.current;if(t)if((n=Y.current)==null||n.kill(),L){const o=e?v:b;Y.current=l.to(t,{color:o,delay:.18,duration:.3,ease:"power2.out"})}else l.set(t,{color:b})},[v,b,L]);le.useEffect(()=>{if(p.current)if(L){const e=R.current?v:b;l.set(p.current,{color:e})}else l.set(p.current,{color:b})},[L,b,v]);const F=s.useCallback(e=>{var x;const t=H.current;if(!t)return;(x=X.current)==null||x.kill();const n=e?"Menu":"Close",o=e?"Close":"Menu",m=3,i=[n];let c=n;for(let g=0;g<m;g++)c=c==="Menu"?"Close":"Menu",i.push(c);c!==o&&i.push(o),i.push(o),de(i),l.set(t,{yPercent:0});const f=i.length,u=(f-1)/f*100;X.current=l.to(t,{yPercent:-u,duration:.5+f*.07,ease:"power4.out"})},[]),be=s.useCallback(()=>{const e=!R.current;R.current=e,z(e),e?(N==null||N(),ee()):(h==null||h(),$()),q(e),E(e),F(e)},[ee,$,q,E,F,N,h]),te=s.useCallback(()=>{R.current&&(R.current=!1,z(!1),h==null||h(),$(),q(!1),E(!1),F(!1))},[$,q,E,F,h]);return le.useEffect(()=>{if(!U||!y)return;const e=t=>{_.current&&!_.current.contains(t.target)&&p.current&&!p.current.contains(t.target)&&te()};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[U,y,te]),r.jsxs("div",{className:(D?D+" ":"")+a["staggered-menu-wrapper"]+(fe?" fixed-wrapper":""),style:G?{"--sm-accent":G}:void 0,"data-position":k,"data-open":y||void 0,children:[r.jsx("div",{ref:J,className:`${a["sm-prelayers"]}`,"aria-hidden":"true",children:(()=>{let t=[...P&&P.length?P.slice(0,4):["#1e1e22","#35353c"]];if(t.length>=3){const n=Math.floor(t.length/2);t.splice(n,1)}return t.map((n,o)=>r.jsx("div",{className:`${a["sm-prelayer"]}`,style:{background:n}},o))})()}),r.jsxs("header",{className:`${a["staggered-menu-header"]}`,"aria-label":"Main navigation header",children:[r.jsx("div",{className:`${a["sm-logo"]}`,"aria-label":"Logo",children:r.jsx("img",{src:me||"/src/assets/logos/reactbits-gh-white.svg",alt:"Logo",className:`${a["sm-logo-img"]}`,draggable:!1,width:110,height:24})}),r.jsxs("button",{ref:p,className:`${a["sm-toggle"]}`,"aria-label":y?"Close menu":"Open menu","aria-expanded":y,"aria-controls":a["staggered-menu-panel"],onClick:be,type:"button",children:[r.jsx("span",{ref:pe,className:`${a["sm-toggle-textWrap"]}`,"aria-hidden":"true",children:r.jsx("span",{ref:H,className:`${a["sm-toggle-textInner"]}`,children:ge.map((e,t)=>r.jsx("span",{className:`${a["sm-toggle-line"]}`,children:e},t))})}),r.jsxs("span",{ref:W,className:`${a["sm-icon"]}`,"aria-hidden":"true",children:[r.jsx("span",{ref:K,className:`${a["sm-icon-line"]}`}),r.jsx("span",{ref:Q,className:`${a["sm-icon-line"]} ${a["sm-icon-line"]}-v`})]})]})]}),r.jsx("aside",{id:a["staggered-menu-panel"],ref:_,className:`${a["staggered-menu-panel"]}`,"aria-hidden":!y,children:r.jsxs("div",{className:`${a["sm-panel-inner"]}`,children:[r.jsx("ul",{className:`${a["sm-panel-list"]}`,role:"list","data-numbering":ue||void 0,children:T&&T.length?T.map((e,t)=>r.jsx("li",{className:`${a["sm-panel-itemWrap"]}`,children:r.jsx("a",{className:`${a["sm-panel-item"]}`,href:e.link,"aria-label":e.ariaLabel,"data-index":t+1,children:r.jsx("span",{className:`${a["sm-panel-itemLabel"]}`,children:e.label})})},e.label+t)):r.jsx("li",{className:`${a["sm-panel-itemWrap"]}`,"aria-hidden":"true",children:r.jsx("span",{className:`${a["sm-panel-item"]}`,children:r.jsx("span",{className:`${a["sm-panel-itemLabel"]}`,children:"No items"})})})}),ce&&V&&V.length>0&&r.jsxs("div",{className:`${a["sm-socials"]}`,"aria-label":"Social links",children:[r.jsx("h3",{className:`${a["sm-socials-title"]}`,children:"Socials"}),r.jsx("ul",{className:`${a["sm-socials-list"]}`,role:"list",children:V.map((e,t)=>r.jsx("li",{className:"sm-socials-item",children:r.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:`${a["sm-socials-link"]}`,children:e.label})},e.label+t))})]})]})})]})};oe.__docgenInfo={description:"",methods:[],displayName:"StaggeredMenu",props:{position:{defaultValue:{value:"'right'",computed:!1},required:!1},colors:{defaultValue:{value:"['#B19EEF', '#5227FF']",computed:!1},required:!1},items:{defaultValue:{value:"[]",computed:!1},required:!1},socialItems:{defaultValue:{value:"[]",computed:!1},required:!1},displaySocials:{defaultValue:{value:"true",computed:!1},required:!1},displayItemNumbering:{defaultValue:{value:"true",computed:!1},required:!1},logoUrl:{defaultValue:{value:"'/src/assets/logos/reactbits-gh-white.svg'",computed:!1},required:!1},menuButtonColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1},openMenuButtonColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1},accentColor:{defaultValue:{value:"'#5227FF'",computed:!1},required:!1},changeMenuColorOnOpen:{defaultValue:{value:"true",computed:!1},required:!1},isFixed:{defaultValue:{value:"false",computed:!1},required:!1},closeOnClickAway:{defaultValue:{value:"true",computed:!1},required:!1}}};const xe={title:"ReactBits/Components/StaggeredMenu",component:oe,parameters:{layout:"fullscreen"}},C={args:{position:"right",colors:["#B19EEF","#5227FF"],items:[{label:"Home",link:"#",ariaLabel:"Home"},{label:"About",link:"#about",ariaLabel:"About"},{label:"Projects",link:"#projects",ariaLabel:"Projects"},{label:"Blog",link:"#blog",ariaLabel:"Blog"},{label:"Contact",link:"#contact",ariaLabel:"Contact"}],socialItems:[{label:"Twitter",link:"https://twitter.com"},{label:"GitHub",link:"https://github.com"},{label:"LinkedIn",link:"https://linkedin.com"}],displaySocials:!0,displayItemNumbering:!0,menuButtonColor:"#fff",openMenuButtonColor:"#fff",accentColor:"#5227FF",changeMenuColorOnOpen:!0,isFixed:!1,closeOnClickAway:!0}};var re,ne,ie;C.parameters={...C.parameters,docs:{...(re=C.parameters)==null?void 0:re.docs,source:{originalSource:`{
1
+ import{r as s,R as le,j as r}from"./iframe-DKgP8ePJ.js";import{g as l}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const a={"staggered-menu-wrapper":"_staggered-menu-wrapper_rbage_1","staggered-menu-header":"_staggered-menu-header_rbage_19","sm-logo":"_sm-logo_rbage_37","sm-logo-img":"_sm-logo-img_rbage_43","sm-toggle":"_sm-toggle_rbage_50","sm-toggle-textWrap":"_sm-toggle-textWrap_rbage_74","sm-toggle-textInner":"_sm-toggle-textInner_rbage_84","sm-toggle-line":"_sm-toggle-line_rbage_90","sm-icon":"_sm-icon_rbage_96","sm-panel-itemWrap":"_sm-panel-itemWrap_rbage_107","sm-icon-line":"_sm-icon-line_rbage_113","staggered-menu-panel":"_staggered-menu-panel_rbage_129","sm-prelayers":"_sm-prelayers_rbage_151","sm-prelayer":"_sm-prelayer_rbage_151","sm-panel-inner":"_sm-panel-inner_rbage_175","sm-socials":"_sm-socials_rbage_182","sm-socials-title":"_sm-socials-title_rbage_190","sm-socials-list":"_sm-socials-list_rbage_197","sm-socials-link":"_sm-socials-link_rbage_208","sm-panel-list":"_sm-panel-list_rbage_258","sm-panel-item":"_sm-panel-item_rbage_107","sm-panel-itemLabel":"_sm-panel-itemLabel_rbage_302"},oe=({position:k="right",colors:P=["#B19EEF","#5227FF"],items:T=[],socialItems:V=[],displaySocials:ce=!0,displayItemNumbering:ue=!0,className:D,logoUrl:me="/src/assets/logos/reactbits-gh-white.svg",menuButtonColor:b="#fff",openMenuButtonColor:v="#fff",accentColor:G="#5227FF",changeMenuColorOnOpen:L=!0,isFixed:fe=!1,closeOnClickAway:U=!0,onMenuOpen:N,onMenuClose:h})=>{const[y,z]=s.useState(!1),R=s.useRef(!1),_=s.useRef(null),J=s.useRef(null),I=s.useRef([]),K=s.useRef(null),Q=s.useRef(null),W=s.useRef(null),H=s.useRef(null),pe=s.useRef(null),[ge,de]=s.useState(["Menu","Close"]),S=s.useRef(null),w=s.useRef(null),O=s.useRef(null),X=s.useRef(null),Y=s.useRef(null),p=s.useRef(null),j=s.useRef(!1),Z=s.useRef(null);s.useLayoutEffect(()=>{const e=l.context(()=>{const t=_.current,n=J.current,o=K.current,m=Q.current,i=W.current,c=H.current;if(!t||!o||!m||!i||!c)return;let f=[];n&&(f=Array.from(n.querySelectorAll(".sm-prelayer"))),I.current=f;const u=k==="left"?-100:100;l.set([t,...f],{xPercent:u}),l.set(o,{transformOrigin:"50% 50%",rotate:0}),l.set(m,{transformOrigin:"50% 50%",rotate:90}),l.set(i,{rotate:0,transformOrigin:"50% 50%"}),l.set(c,{yPercent:0}),p.current&&l.set(p.current,{color:b})});return()=>e.revert()},[b,k]);const M=s.useCallback(()=>{var ae,se;const e=_.current,t=I.current;if(!e)return null;(ae=S.current)==null||ae.kill(),w.current&&(w.current.kill(),w.current=null),(se=Z.current)==null||se.kill();const n=Array.from(e.querySelectorAll(".sm-panel-itemLabel")),o=Array.from(e.querySelectorAll(".sm-panel-list[data-numbering] .sm-panel-item")),m=e.querySelector(".sm-socials-title"),i=Array.from(e.querySelectorAll(".sm-socials-link")),c=t.map(d=>({el:d,start:Number(l.getProperty(d,"xPercent"))})),f=Number(l.getProperty(e,"xPercent"));n.length&&l.set(n,{yPercent:140,rotate:10}),o.length&&l.set(o,{"--sm-num-opacity":0}),m&&l.set(m,{opacity:0}),i.length&&l.set(i,{y:25,opacity:0});const u=l.timeline({paused:!0});c.forEach((d,A)=>{u.fromTo(d.el,{xPercent:d.start},{xPercent:0,duration:.5,ease:"power4.out"},A*.07)});const g=(c.length?(c.length-1)*.07:0)+(c.length?.08:0),B=.65;if(u.fromTo(e,{xPercent:f},{xPercent:0,duration:B,ease:"power4.out"},g),n.length){const A=g+B*.15;u.to(n,{yPercent:0,rotate:0,duration:1,ease:"power4.out",stagger:{each:.1,from:"start"}},A),o.length&&u.to(o,{duration:.6,ease:"power2.out","--sm-num-opacity":1,stagger:{each:.08,from:"start"}},A+.1)}if(m||i.length){const d=g+B*.4;m&&u.to(m,{opacity:1,duration:.5,ease:"power2.out"},d),i.length&&u.to(i,{y:0,opacity:1,duration:.55,ease:"power3.out",stagger:{each:.08,from:"start"},onComplete:()=>{l.set(i,{clearProps:"opacity"})}},d+.04)}return S.current=u,u},[]),ee=s.useCallback(()=>{if(j.current)return;j.current=!0;const e=M();e?(e.eventCallback("onComplete",()=>{j.current=!1}),e.play(0)):j.current=!1},[M]),$=s.useCallback(()=>{var m,i,c;(m=S.current)==null||m.kill(),S.current=null,(i=Z.current)==null||i.kill();const e=_.current,t=I.current;if(!e)return;const n=[...t,e];(c=w.current)==null||c.kill();const o=k==="left"?-100:100;w.current=l.to(n,{xPercent:o,duration:.32,ease:"power3.in",overwrite:"auto",onComplete:()=>{const f=Array.from(e.querySelectorAll(".sm-panel-itemLabel"));f.length&&l.set(f,{yPercent:140,rotate:10});const u=Array.from(e.querySelectorAll(".sm-panel-list[data-numbering] .sm-panel-item"));u.length&&l.set(u,{"--sm-num-opacity":0});const x=e.querySelector(".sm-socials-title"),g=Array.from(e.querySelectorAll(".sm-socials-link"));x&&l.set(x,{opacity:0}),g.length&&l.set(g,{y:25,opacity:0}),j.current=!1}})},[k]),q=s.useCallback(e=>{var n;const t=W.current;t&&((n=O.current)==null||n.kill(),e?O.current=l.to(t,{rotate:225,duration:.8,ease:"power4.out",overwrite:"auto"}):O.current=l.to(t,{rotate:0,duration:.35,ease:"power3.inOut",overwrite:"auto"}))},[]),E=s.useCallback(e=>{var n;const t=p.current;if(t)if((n=Y.current)==null||n.kill(),L){const o=e?v:b;Y.current=l.to(t,{color:o,delay:.18,duration:.3,ease:"power2.out"})}else l.set(t,{color:b})},[v,b,L]);le.useEffect(()=>{if(p.current)if(L){const e=R.current?v:b;l.set(p.current,{color:e})}else l.set(p.current,{color:b})},[L,b,v]);const F=s.useCallback(e=>{var x;const t=H.current;if(!t)return;(x=X.current)==null||x.kill();const n=e?"Menu":"Close",o=e?"Close":"Menu",m=3,i=[n];let c=n;for(let g=0;g<m;g++)c=c==="Menu"?"Close":"Menu",i.push(c);c!==o&&i.push(o),i.push(o),de(i),l.set(t,{yPercent:0});const f=i.length,u=(f-1)/f*100;X.current=l.to(t,{yPercent:-u,duration:.5+f*.07,ease:"power4.out"})},[]),be=s.useCallback(()=>{const e=!R.current;R.current=e,z(e),e?(N==null||N(),ee()):(h==null||h(),$()),q(e),E(e),F(e)},[ee,$,q,E,F,N,h]),te=s.useCallback(()=>{R.current&&(R.current=!1,z(!1),h==null||h(),$(),q(!1),E(!1),F(!1))},[$,q,E,F,h]);return le.useEffect(()=>{if(!U||!y)return;const e=t=>{_.current&&!_.current.contains(t.target)&&p.current&&!p.current.contains(t.target)&&te()};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[U,y,te]),r.jsxs("div",{className:(D?D+" ":"")+a["staggered-menu-wrapper"]+(fe?" fixed-wrapper":""),style:G?{"--sm-accent":G}:void 0,"data-position":k,"data-open":y||void 0,children:[r.jsx("div",{ref:J,className:`${a["sm-prelayers"]}`,"aria-hidden":"true",children:(()=>{let t=[...P&&P.length?P.slice(0,4):["#1e1e22","#35353c"]];if(t.length>=3){const n=Math.floor(t.length/2);t.splice(n,1)}return t.map((n,o)=>r.jsx("div",{className:`${a["sm-prelayer"]}`,style:{background:n}},o))})()}),r.jsxs("header",{className:`${a["staggered-menu-header"]}`,"aria-label":"Main navigation header",children:[r.jsx("div",{className:`${a["sm-logo"]}`,"aria-label":"Logo",children:r.jsx("img",{src:me||"/src/assets/logos/reactbits-gh-white.svg",alt:"Logo",className:`${a["sm-logo-img"]}`,draggable:!1,width:110,height:24})}),r.jsxs("button",{ref:p,className:`${a["sm-toggle"]}`,"aria-label":y?"Close menu":"Open menu","aria-expanded":y,"aria-controls":a["staggered-menu-panel"],onClick:be,type:"button",children:[r.jsx("span",{ref:pe,className:`${a["sm-toggle-textWrap"]}`,"aria-hidden":"true",children:r.jsx("span",{ref:H,className:`${a["sm-toggle-textInner"]}`,children:ge.map((e,t)=>r.jsx("span",{className:`${a["sm-toggle-line"]}`,children:e},t))})}),r.jsxs("span",{ref:W,className:`${a["sm-icon"]}`,"aria-hidden":"true",children:[r.jsx("span",{ref:K,className:`${a["sm-icon-line"]}`}),r.jsx("span",{ref:Q,className:`${a["sm-icon-line"]} ${a["sm-icon-line"]}-v`})]})]})]}),r.jsx("aside",{id:a["staggered-menu-panel"],ref:_,className:`${a["staggered-menu-panel"]}`,"aria-hidden":!y,children:r.jsxs("div",{className:`${a["sm-panel-inner"]}`,children:[r.jsx("ul",{className:`${a["sm-panel-list"]}`,role:"list","data-numbering":ue||void 0,children:T&&T.length?T.map((e,t)=>r.jsx("li",{className:`${a["sm-panel-itemWrap"]}`,children:r.jsx("a",{className:`${a["sm-panel-item"]}`,href:e.link,"aria-label":e.ariaLabel,"data-index":t+1,children:r.jsx("span",{className:`${a["sm-panel-itemLabel"]}`,children:e.label})})},e.label+t)):r.jsx("li",{className:`${a["sm-panel-itemWrap"]}`,"aria-hidden":"true",children:r.jsx("span",{className:`${a["sm-panel-item"]}`,children:r.jsx("span",{className:`${a["sm-panel-itemLabel"]}`,children:"No items"})})})}),ce&&V&&V.length>0&&r.jsxs("div",{className:`${a["sm-socials"]}`,"aria-label":"Social links",children:[r.jsx("h3",{className:`${a["sm-socials-title"]}`,children:"Socials"}),r.jsx("ul",{className:`${a["sm-socials-list"]}`,role:"list",children:V.map((e,t)=>r.jsx("li",{className:"sm-socials-item",children:r.jsx("a",{href:e.link,target:"_blank",rel:"noopener noreferrer",className:`${a["sm-socials-link"]}`,children:e.label})},e.label+t))})]})]})})]})};oe.__docgenInfo={description:"",methods:[],displayName:"StaggeredMenu",props:{position:{defaultValue:{value:"'right'",computed:!1},required:!1},colors:{defaultValue:{value:"['#B19EEF', '#5227FF']",computed:!1},required:!1},items:{defaultValue:{value:"[]",computed:!1},required:!1},socialItems:{defaultValue:{value:"[]",computed:!1},required:!1},displaySocials:{defaultValue:{value:"true",computed:!1},required:!1},displayItemNumbering:{defaultValue:{value:"true",computed:!1},required:!1},logoUrl:{defaultValue:{value:"'/src/assets/logos/reactbits-gh-white.svg'",computed:!1},required:!1},menuButtonColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1},openMenuButtonColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1},accentColor:{defaultValue:{value:"'#5227FF'",computed:!1},required:!1},changeMenuColorOnOpen:{defaultValue:{value:"true",computed:!1},required:!1},isFixed:{defaultValue:{value:"false",computed:!1},required:!1},closeOnClickAway:{defaultValue:{value:"true",computed:!1},required:!1}}};const xe={title:"ReactBits/Components/StaggeredMenu",component:oe,parameters:{layout:"fullscreen"}},C={args:{position:"right",colors:["#B19EEF","#5227FF"],items:[{label:"Home",link:"#",ariaLabel:"Home"},{label:"About",link:"#about",ariaLabel:"About"},{label:"Projects",link:"#projects",ariaLabel:"Projects"},{label:"Blog",link:"#blog",ariaLabel:"Blog"},{label:"Contact",link:"#contact",ariaLabel:"Contact"}],socialItems:[{label:"Twitter",link:"https://twitter.com"},{label:"GitHub",link:"https://github.com"},{label:"LinkedIn",link:"https://linkedin.com"}],displaySocials:!0,displayItemNumbering:!0,menuButtonColor:"#fff",openMenuButtonColor:"#fff",accentColor:"#5227FF",changeMenuColorOnOpen:!0,isFixed:!1,closeOnClickAway:!0}};var re,ne,ie;C.parameters={...C.parameters,docs:{...(re=C.parameters)==null?void 0:re.docs,source:{originalSource:`{
2
2
  args: {
3
3
  position: 'right',
4
4
  colors: ['#B19EEF', '#5227FF'],
@@ -1,4 +1,4 @@
1
- import{j as e}from"./iframe-CwEFvVsM.js";import"./preload-helper-C1FmrZbK.js";const r={"star-border-container":"_star-border-container_xk50o_1","border-gradient-bottom":"_border-gradient-bottom_xk50o_8","border-gradient-top":"_border-gradient-top_xk50o_23","inner-content":"_inner-content_xk50o_38"},i=({as:c="button",className:u="",color:a="white",speed:o="6s",thickness:m=1,children:p,...s})=>e.jsxs(c,{className:`${r["star-border-container"]} ${u}`,style:{padding:`${m}px 0`,...s.style},...s,children:[e.jsx("div",{className:`${r["border-gradient-bottom"]}`,style:{background:`radial-gradient(circle, ${a}, transparent 10%)`,animationDuration:o}}),e.jsx("div",{className:`${r["border-gradient-top"]}`,style:{background:`radial-gradient(circle, ${a}, transparent 10%)`,animationDuration:o}}),e.jsx("div",{className:`${r["inner-content"]}`,children:p})]});i.__docgenInfo={description:"",methods:[],displayName:"StarBorder",props:{as:{defaultValue:{value:"'button'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},color:{defaultValue:{value:"'white'",computed:!1},required:!1},speed:{defaultValue:{value:"'6s'",computed:!1},required:!1},thickness:{defaultValue:{value:"1",computed:!1},required:!1}}};const _={title:"ReactBits/Animations/StarBorder",component:i,parameters:{layout:"fullscreen"}},t={args:{as:"button",color:"white",speed:"6s",thickness:1,children:"Hello World"}};var n,d,l;t.parameters={...t.parameters,docs:{...(n=t.parameters)==null?void 0:n.docs,source:{originalSource:`{
1
+ import{j as e}from"./iframe-DKgP8ePJ.js";import"./preload-helper-C1FmrZbK.js";const r={"star-border-container":"_star-border-container_xk50o_1","border-gradient-bottom":"_border-gradient-bottom_xk50o_8","border-gradient-top":"_border-gradient-top_xk50o_23","inner-content":"_inner-content_xk50o_38"},i=({as:c="button",className:u="",color:a="white",speed:o="6s",thickness:m=1,children:p,...s})=>e.jsxs(c,{className:`${r["star-border-container"]} ${u}`,style:{padding:`${m}px 0`,...s.style},...s,children:[e.jsx("div",{className:`${r["border-gradient-bottom"]}`,style:{background:`radial-gradient(circle, ${a}, transparent 10%)`,animationDuration:o}}),e.jsx("div",{className:`${r["border-gradient-top"]}`,style:{background:`radial-gradient(circle, ${a}, transparent 10%)`,animationDuration:o}}),e.jsx("div",{className:`${r["inner-content"]}`,children:p})]});i.__docgenInfo={description:"",methods:[],displayName:"StarBorder",props:{as:{defaultValue:{value:"'button'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},color:{defaultValue:{value:"'white'",computed:!1},required:!1},speed:{defaultValue:{value:"'6s'",computed:!1},required:!1},thickness:{defaultValue:{value:"1",computed:!1},required:!1}}};const _={title:"ReactBits/Animations/StarBorder",component:i,parameters:{layout:"fullscreen"}},t={args:{as:"button",color:"white",speed:"6s",thickness:1,children:"Hello World"}};var n,d,l;t.parameters={...t.parameters,docs:{...(n=t.parameters)==null?void 0:n.docs,source:{originalSource:`{
2
2
  args: {
3
3
  as: 'button',
4
4
  color: 'white',