@stfrigerio/sito-template 0.1.58 → 0.1.59

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 (295) hide show
  1. package/dist/components/atoms/Button/Button.stories.d.ts +0 -1
  2. package/dist/components/atoms/Button/Button.stories.d.ts.map +1 -1
  3. package/dist/components/atoms/Card/Card.stories.d.ts +0 -1
  4. package/dist/components/atoms/Card/Card.stories.d.ts.map +1 -1
  5. package/dist/components/atoms/Checkbox/Checkbox.stories.d.ts +0 -7
  6. package/dist/components/atoms/Checkbox/Checkbox.stories.d.ts.map +1 -1
  7. package/dist/components/atoms/DateInput/DateInput.stories.d.ts +0 -7
  8. package/dist/components/atoms/DateInput/DateInput.stories.d.ts.map +1 -1
  9. package/dist/components/atoms/LoadingSpinner/LoadingSpinner.stories.d.ts +1 -15
  10. package/dist/components/atoms/LoadingSpinner/LoadingSpinner.stories.d.ts.map +1 -1
  11. package/dist/components/atoms/NumberStepper/NumberStepper.stories.d.ts +0 -16
  12. package/dist/components/atoms/NumberStepper/NumberStepper.stories.d.ts.map +1 -1
  13. package/dist/components/atoms/SearchableDropdown/SearchableDropdown.stories.d.ts +0 -9
  14. package/dist/components/atoms/SearchableDropdown/SearchableDropdown.stories.d.ts.map +1 -1
  15. package/dist/components/atoms/SelectInput/SelectInput.stories.d.ts +0 -6
  16. package/dist/components/atoms/SelectInput/SelectInput.stories.d.ts.map +1 -1
  17. package/dist/components/atoms/Slider/Slider.stories.d.ts.map +1 -1
  18. package/dist/components/atoms/TextArea/TextArea.stories.d.ts +0 -10
  19. package/dist/components/atoms/TextArea/TextArea.stories.d.ts.map +1 -1
  20. package/dist/components/atoms/TextInput/TextInput.stories.d.ts +0 -14
  21. package/dist/components/atoms/TextInput/TextInput.stories.d.ts.map +1 -1
  22. package/dist/components/atoms/Toggle/Toggle.stories.d.ts +0 -8
  23. package/dist/components/atoms/Toggle/Toggle.stories.d.ts.map +1 -1
  24. package/dist/components/atoms/ToggleButton/ToggleButton.stories.d.ts +0 -7
  25. package/dist/components/atoms/ToggleButton/ToggleButton.stories.d.ts.map +1 -1
  26. package/dist/components/molecules/ArrayInput/ArrayInput.stories.d.ts +0 -9
  27. package/dist/components/molecules/ArrayInput/ArrayInput.stories.d.ts.map +1 -1
  28. package/dist/components/molecules/EditFAB/EditFAB.stories.d.ts +1 -12
  29. package/dist/components/molecules/EditFAB/EditFAB.stories.d.ts.map +1 -1
  30. package/dist/components/molecules/SearchBar/SearchBar.stories.d.ts +0 -8
  31. package/dist/components/molecules/SearchBar/SearchBar.stories.d.ts.map +1 -1
  32. package/dist/components/molecules/Tabs/Tabs.stories.d.ts.map +1 -1
  33. package/dist/components/molecules/ThemeSwitcher/ThemeSwitcher.stories.d.ts +0 -3
  34. package/dist/components/molecules/ThemeSwitcher/ThemeSwitcher.stories.d.ts.map +1 -1
  35. package/dist/components/molecules/TimeInput/TimeInput.stories.d.ts +0 -6
  36. package/dist/components/molecules/TimeInput/TimeInput.stories.d.ts.map +1 -1
  37. package/dist/components/organisms/Calendar/Calendar.d.ts.map +1 -1
  38. package/dist/components/organisms/Calendar/Calendar.stories.d.ts +0 -1
  39. package/dist/components/organisms/Calendar/Calendar.stories.d.ts.map +1 -1
  40. package/dist/components/organisms/Calendar/DayEventCard.d.ts +1 -1
  41. package/dist/components/organisms/Calendar/DayEventCard.d.ts.map +1 -1
  42. package/dist/components/organisms/ImageSlideshow/ImageSlideshow.stories.d.ts +0 -23
  43. package/dist/components/organisms/ImageSlideshow/ImageSlideshow.stories.d.ts.map +1 -1
  44. package/dist/components/organisms/Navbar/Navbar.d.ts +1 -0
  45. package/dist/components/organisms/Navbar/Navbar.d.ts.map +1 -1
  46. package/dist/components/organisms/Navbar/Navbar.stories.d.ts +1 -7
  47. package/dist/components/organisms/Navbar/Navbar.stories.d.ts.map +1 -1
  48. package/dist/components/organisms/charts/BooleansHeatmap/BooleansHeatmap.stories.d.ts +1 -4
  49. package/dist/components/organisms/charts/BooleansHeatmap/BooleansHeatmap.stories.d.ts.map +1 -1
  50. package/dist/components/organisms/charts/PieChart/PieChart.stories.d.ts +1 -5
  51. package/dist/components/organisms/charts/PieChart/PieChart.stories.d.ts.map +1 -1
  52. package/dist/index.esm.js +129 -57
  53. package/dist/index.esm.js.map +1 -1
  54. package/dist/index.js +128 -56
  55. package/dist/index.js.map +1 -1
  56. package/dist/stories/utils.d.ts.map +1 -1
  57. package/dist/styles.css +1 -1
  58. package/dist/styles.css.map +1 -1
  59. package/dist/themes/globals.css +2 -5
  60. package/package.json +1 -1
  61. package/storybook-static/assets/{ASCIIText.stories-LbmvFzzv.js → ASCIIText.stories-CsG3yKr5.js} +4 -4
  62. package/storybook-static/assets/{AllAtoms.stories-CLunFOjI.js → AllAtoms.stories-D2Pzz8c7.js} +1 -1
  63. package/storybook-static/assets/{AnimatedContent.stories-B8hBaVkK.js → AnimatedContent.stories-BP9feFGz.js} +1 -1
  64. package/storybook-static/assets/{AnimatedList.stories-D8a9eYqH.js → AnimatedList.stories-DQ8jdk44.js} +2 -2
  65. package/storybook-static/assets/{Antigravity.stories-D_mJbWK0.js → Antigravity.stories-BTIHyYKU.js} +1 -1
  66. package/storybook-static/assets/ArrayInput.stories-d5_OJJMu.js +138 -0
  67. package/storybook-static/assets/{Aurora.stories-BN4MataE.js → Aurora.stories-D_eQNPaB.js} +2 -2
  68. package/storybook-static/assets/{Beams.stories-CCtZOw8G.js → Beams.stories-VLKuYE0_.js} +6 -6
  69. package/storybook-static/assets/{BlobCursor.stories-CdB55R5G.js → BlobCursor.stories-BQJgTsuD.js} +1 -1
  70. package/storybook-static/assets/{BlurText.stories-Bg2Ih2Je.js → BlurText.stories-oSn5_w7h.js} +2 -2
  71. package/storybook-static/assets/BooleansHeatmap-C8cFXa7K.css +1 -0
  72. package/storybook-static/assets/BooleansHeatmap.stories-CHoCYK4N.js +63 -0
  73. package/storybook-static/assets/{BorderGlow.stories-CUxbrsvW.js → BorderGlow.stories-D-vgIU3S.js} +1 -1
  74. package/storybook-static/assets/{BubbleMenu.stories-DuVDLBsV.js → BubbleMenu.stories-DcWoqA7_.js} +1 -1
  75. package/storybook-static/assets/{Button-CQGdvhpN.js → Button-DgpqJWgD.js} +1 -1
  76. package/storybook-static/assets/{Button.stories-D8Xx3I9p.js → Button.stories-TQXKQagp.js} +2 -2
  77. package/storybook-static/assets/Calendar-BZCyXxvF.css +1 -0
  78. package/storybook-static/assets/Calendar.stories-D5CKBagI.js +321 -0
  79. package/storybook-static/assets/{Card-DNp-cUnt.js → Card-Bu54h8gN.js} +1 -1
  80. package/storybook-static/assets/{Card.stories-D1f1NTVU.js → Card.stories-Dw2bPvLo.js} +1 -1
  81. package/storybook-static/assets/{CardNav.stories-Cd4zEw8p.js → CardNav.stories-CnbwwAde.js} +1 -1
  82. package/storybook-static/assets/{Carousel.stories-BxbGwXE5.js → Carousel.stories-ChBLLqBg.js} +2 -2
  83. package/storybook-static/assets/{Checkbox-Dw8W2w74.js → Checkbox-Duyafa-Y.js} +1 -1
  84. package/storybook-static/assets/Checkbox.stories-Co7IxmK1.js +55 -0
  85. package/storybook-static/assets/{ChromaGrid.stories-DBHYiDPV.js → ChromaGrid.stories-68ukohGs.js} +1 -1
  86. package/storybook-static/assets/{CircularGallery.stories-TJN6o_RG.js → CircularGallery.stories-CV4iXVIX.js} +2 -2
  87. package/storybook-static/assets/{CircularText.stories-rNjRUNn2.js → CircularText.stories-DqYHtbPW.js} +1 -1
  88. package/storybook-static/assets/{ClickSpark.stories-BfqByoGe.js → ClickSpark.stories-DvAOxLjs.js} +1 -1
  89. package/storybook-static/assets/{ColorBends.stories-IEMOWAyf.js → ColorBends.stories-Dm4nxTTN.js} +2 -2
  90. package/storybook-static/assets/{CountUp.stories-DXPrKAQb.js → CountUp.stories-DTaL8Yfy.js} +1 -1
  91. package/storybook-static/assets/{Counter.stories-DMdecsw_.js → Counter.stories-Bf_2Js0l.js} +2 -2
  92. package/storybook-static/assets/{Crosshair.stories-CYzDxRSn.js → Crosshair.stories-DJjjCcED.js} +2 -2
  93. package/storybook-static/assets/{Cubes.stories-Drq4ULo3.js → Cubes.stories-Qh3JqlQW.js} +1 -1
  94. package/storybook-static/assets/{CurvedLoop.stories-C9GMKnIw.js → CurvedLoop.stories-BvyrCuM7.js} +1 -1
  95. package/storybook-static/assets/{DarkVeil.stories-BtLNfEH8.js → DarkVeil.stories-BVY870pm.js} +2 -2
  96. package/storybook-static/assets/{DateInput-CW4PsZAQ.js → DateInput-DfGES3te.js} +2 -2
  97. package/storybook-static/assets/DateInput-Dhcb9x13.css +1 -0
  98. package/storybook-static/assets/DateInput.stories-BXF8Ttde.js +51 -0
  99. package/storybook-static/assets/{DecayCard.stories-CAU_wTc7.js → DecayCard.stories-B0g2xWqX.js} +1 -1
  100. package/storybook-static/assets/{DecryptedText.stories-Dvba9C1V.js → DecryptedText.stories-fqDZfjv8.js} +1 -1
  101. package/storybook-static/assets/{Dither.stories-B5KfMprl.js → Dither.stories-B4N3Z5sW.js} +2 -2
  102. package/storybook-static/assets/{Dock.stories-oyQGRzlM.js → Dock.stories-f_YKz-pl.js} +1 -1
  103. package/storybook-static/assets/EditFAB.stories-LhVUDgtx.js +233 -0
  104. package/storybook-static/assets/{EvilEye.stories-C1820-DG.js → EvilEye.stories-BtBvvs31.js} +2 -2
  105. package/storybook-static/assets/{FadeContent.stories-B4z_JRy9.js → FadeContent.stories-oNqKrfSe.js} +1 -1
  106. package/storybook-static/assets/{FaultyTerminal.stories-DmkguJql.js → FaultyTerminal.stories-7nV4DvrW.js} +2 -2
  107. package/storybook-static/assets/{Fbo-CTQm-4Bw.js → Fbo-Clk04E0N.js} +1 -1
  108. package/storybook-static/assets/{FloatingLines.stories-CQvqKSpH.js → FloatingLines.stories-DgxhGl_b.js} +2 -2
  109. package/storybook-static/assets/{FlowingMenu.stories-DmOspv0B.js → FlowingMenu.stories-C5dfG25U.js} +1 -1
  110. package/storybook-static/assets/{FluidGlass.stories-CZSqxrNt.js → FluidGlass.stories-DGLlp1x1.js} +2 -2
  111. package/storybook-static/assets/{Folder.stories-7vb52Lfi.js → Folder.stories-BJGdA6Qb.js} +1 -1
  112. package/storybook-static/assets/{FuzzyText.stories-BdXN4VK1.js → FuzzyText.stories-DygRT6bB.js} +1 -1
  113. package/storybook-static/assets/{Galaxy.stories-BhT1GZh5.js → Galaxy.stories-BU6XCHeu.js} +2 -2
  114. package/storybook-static/assets/{GhostCursor.stories-DkXqCjE9.js → GhostCursor.stories-D_HIFPUl.js} +2 -2
  115. package/storybook-static/assets/{GlareHover.stories-CznX3yTV.js → GlareHover.stories-D5_-xnyP.js} +1 -1
  116. package/storybook-static/assets/{GlassSurface.stories-BnwwYK95.js → GlassSurface.stories-CrZqAGRq.js} +2 -2
  117. package/storybook-static/assets/{GlitchText.stories-CVcTBUVS.js → GlitchText.stories-BRqI-kBX.js} +2 -2
  118. package/storybook-static/assets/{GooeyNav.stories-C0abTHBc.js → GooeyNav.stories-DjR0-Th2.js} +1 -1
  119. package/storybook-static/assets/{GradientBlinds.stories-CpSguKtv.js → GradientBlinds.stories-CiIDtPz3.js} +2 -2
  120. package/storybook-static/assets/{GradientText.stories-B4hMx13h.js → GradientText.stories-pLA_An71.js} +1 -1
  121. package/storybook-static/assets/{Grainient.stories-5EakpvU2.js → Grainient.stories-BthRrRMd.js} +2 -2
  122. package/storybook-static/assets/{GridMotion.stories-Bm3DD7cb.js → GridMotion.stories-BSwjL8IE.js} +1 -1
  123. package/storybook-static/assets/ImageSlideshow.stories-BYAQMHlZ.js +108 -0
  124. package/storybook-static/assets/{Iridescence.stories-Cykk3hHZ.js → Iridescence.stories-ChHTH2TM.js} +2 -2
  125. package/storybook-static/assets/{LaserFlow.stories-CfiM4ZZ5.js → LaserFlow.stories-DlDx8Vr8.js} +2 -2
  126. package/storybook-static/assets/{LetterGlitch.stories-BXb7iSeX.js → LetterGlitch.stories-C-S2SRjU.js} +1 -1
  127. package/storybook-static/assets/{LightPillar.stories-CwI-8_BF.js → LightPillar.stories-D0PF-h7T.js} +3 -3
  128. package/storybook-static/assets/{LightRays.stories-BIIfv6Ky.js → LightRays.stories-Cbkl7wuP.js} +2 -2
  129. package/storybook-static/assets/{Lightning.stories-B8GNkzSN.js → Lightning.stories-BUs-gwYj.js} +2 -2
  130. package/storybook-static/assets/{LineWaves.stories-CjxdD_yt.js → LineWaves.stories-D2GXzteP.js} +2 -2
  131. package/storybook-static/assets/{LiquidChrome.stories-G7bVFJM9.js → LiquidChrome.stories-CtDp7th1.js} +2 -2
  132. package/storybook-static/assets/{LiquidEther.stories-C8n27zuA.js → LiquidEther.stories-DM2n5oEm.js} +2 -2
  133. package/storybook-static/assets/{LoadingSpinner-Br8TYFlF.js → LoadingSpinner-DaUSIVPY.js} +1 -1
  134. package/storybook-static/assets/LoadingSpinner.stories-Cx4_nNAf.js +21 -0
  135. package/storybook-static/assets/{MagicRings.stories-D50m_2UF.js → MagicRings.stories-CZt-cHcL.js} +2 -2
  136. package/storybook-static/assets/{Magnet.stories-BP9fjpzP.js → Magnet.stories-B6js1VeO.js} +1 -1
  137. package/storybook-static/assets/{MagnetLines.stories-DvbytV0Y.js → MagnetLines.stories-BKQ9YC_E.js} +1 -1
  138. package/storybook-static/assets/{Masonry.stories-xXYQw2uD.js → Masonry.stories-BGkTkNUa.js} +1 -1
  139. package/storybook-static/assets/{MetaBalls.stories-DKD3gVUH.js → MetaBalls.stories-Cao6Tqjg.js} +2 -2
  140. package/storybook-static/assets/{MetallicPaint.stories-Bz-uS-L_.js → MetallicPaint.stories-DF9qb3W_.js} +2 -2
  141. package/storybook-static/assets/MoodChart-ba3aY_qF.css +1 -0
  142. package/storybook-static/assets/MoodChart.stories-AGxwnR6s.js +40 -0
  143. package/storybook-static/assets/{MotionConfigContext-D5hZdVGx.js → MotionConfigContext-BCa1jVYq.js} +1 -1
  144. package/storybook-static/assets/Navbar-CH6O1IzY.css +1 -0
  145. package/storybook-static/assets/Navbar.stories-CFHb1c22.js +186 -0
  146. package/storybook-static/assets/{Noise.stories-D6C6-k8-.js → Noise.stories-ConXbyqm.js} +2 -2
  147. package/storybook-static/assets/{NumberStepper--0cJcLNZ.js → NumberStepper-DH9y3k8b.js} +1 -1
  148. package/storybook-static/assets/NumberStepper.stories-PMwPqbsn.js +88 -0
  149. package/storybook-static/assets/{Orb.stories-CS__2PJW.js → Orb.stories-DcXSWhV1.js} +2 -2
  150. package/storybook-static/assets/{OrbitImages.stories-CcaelcY5.js → OrbitImages.stories-Dk417qKA.js} +1 -1
  151. package/storybook-static/assets/PieChart-DXPBsaZR.css +1 -0
  152. package/storybook-static/assets/PieChart.stories-6sgfe6Xk.js +91 -0
  153. package/storybook-static/assets/{PixelBlast.stories-CyK8BxPq.js → PixelBlast.stories-_cBuognT.js} +2 -2
  154. package/storybook-static/assets/{PixelCard.stories-D_Og1Eve.js → PixelCard.stories-D_EZOUox.js} +1 -1
  155. package/storybook-static/assets/{PixelSnow.stories-CoCZucVV.js → PixelSnow.stories-DcD7737G.js} +2 -2
  156. package/storybook-static/assets/{PixelTransition.stories-DmVJ4jdu.js → PixelTransition.stories-BwNcUv5J.js} +1 -1
  157. package/storybook-static/assets/{Plasma.stories-DUqrW-qq.js → Plasma.stories-BLolMCfR.js} +2 -2
  158. package/storybook-static/assets/{Prism.stories-DWdVDcBG.js → Prism.stories-CG2_KGsq.js} +2 -2
  159. package/storybook-static/assets/{PrismaticBurst.stories-BEVYTjXo.js → PrismaticBurst.stories-DzS--Ffu.js} +2 -2
  160. package/storybook-static/assets/{ProfileCard.stories-CAoKQpAZ.js → ProfileCard.stories-vI_ispYe.js} +1 -1
  161. package/storybook-static/assets/QuantifiableHabitsChart-BiMp7Kkq.css +1 -0
  162. package/storybook-static/assets/{QuantifiableHabitsChart.stories-CMexb5Ij.js → QuantifiableHabitsChart.stories-D5yeGCZ5.js} +2 -2
  163. package/storybook-static/assets/{Radar.stories-Dcjnm9Bu.js → Radar.stories-DLv_hY9T.js} +2 -2
  164. package/storybook-static/assets/{Ribbons.stories-Cs3Eg2Gz.js → Ribbons.stories-4BbVINtW.js} +4 -4
  165. package/storybook-static/assets/{RippleGrid.stories-QV9Doq9P.js → RippleGrid.stories-CFh8tigy.js} +2 -2
  166. package/storybook-static/assets/{RotatingText.stories-DkntoAXJ.js → RotatingText.stories-AM4GcpU2.js} +2 -2
  167. package/storybook-static/assets/{ScrollFloat.stories-BaX43Ike.js → ScrollFloat.stories-Ct_ZkL7k.js} +1 -1
  168. package/storybook-static/assets/{ScrollReveal.stories-C2IWpLpI.js → ScrollReveal.stories-B7fcgLZ3.js} +1 -1
  169. package/storybook-static/assets/{ScrollVelocity.stories-LaYJ5WQN.js → ScrollVelocity.stories-BRDv3Fdk.js} +1 -1
  170. package/storybook-static/assets/SearchBar.stories-Dnmegbak.js +64 -0
  171. package/storybook-static/assets/{SearchableDropdown-4HgWY0Ck.js → SearchableDropdown-BtIsuxmT.js} +1 -1
  172. package/storybook-static/assets/SearchableDropdown.stories-DVub17TN.js +44 -0
  173. package/storybook-static/assets/{SelectInput-DvSeeIw5.js → SelectInput-C0kBLYgX.js} +1 -1
  174. package/storybook-static/assets/SelectInput.stories-HoF32-Km.js +94 -0
  175. package/storybook-static/assets/{ShapeBlur.stories-ZQV0yHkn.js → ShapeBlur.stories-C3RyLvBh.js} +2 -2
  176. package/storybook-static/assets/{ShapeGrid.stories-G_tZAcp9.js → ShapeGrid.stories-ltmu466o.js} +1 -1
  177. package/storybook-static/assets/{ShinyText.stories-C6BrLI0x.js → ShinyText.stories-JO2F4CpJ.js} +1 -1
  178. package/storybook-static/assets/{Silk.stories-BpsR4txJ.js → Silk.stories-CUzWiwqP.js} +2 -2
  179. package/storybook-static/assets/SleepChart-CjpdWR_T.css +1 -0
  180. package/storybook-static/assets/SleepChart.stories-YvCzf0BI.js +58 -0
  181. package/storybook-static/assets/Slider-BaDHm9m3.css +1 -0
  182. package/storybook-static/assets/{Slider-3iog5_du.js → Slider-CI9mXQSu.js} +1 -1
  183. package/storybook-static/assets/{Slider.stories-C8eUZ7Ne.js → Slider.stories-DQYlBjGq.js} +1 -1
  184. package/storybook-static/assets/{SoftAurora.stories--Rcyqxiu.js → SoftAurora.stories-ubq_KV8Q.js} +2 -2
  185. package/storybook-static/assets/{SoundDemo.stories-DvhKS2Fi.js → SoundDemo.stories-Cie-leKw.js} +1 -1
  186. package/storybook-static/assets/{SplashCursor.stories-FzRIUaX9.js → SplashCursor.stories-Clea3dMy.js} +2 -2
  187. package/storybook-static/assets/{SpotlightCard.stories-CifqsSUc.js → SpotlightCard.stories-BWv0AuTI.js} +1 -1
  188. package/storybook-static/assets/{Stack.stories-Dq82x0TG.js → Stack.stories-DxVGTJ6l.js} +1 -1
  189. package/storybook-static/assets/{StaggeredMenu.stories-CsiTDJGG.js → StaggeredMenu.stories-1UB8ravq.js} +1 -1
  190. package/storybook-static/assets/{StarBorder.stories-Ba14_TPk.js → StarBorder.stories-DiSAqN3r.js} +2 -2
  191. package/storybook-static/assets/{SunburstChart.stories-fREzDXM9.js → SunburstChart.stories-DLjQA_I1.js} +1 -1
  192. package/storybook-static/assets/Table-BFjXRRk3.css +1 -0
  193. package/storybook-static/assets/{Table.stories-CXsQAQrR.js → Table.stories-wQGb96WC.js} +6 -6
  194. package/storybook-static/assets/Tabs-CDVjuS9_.css +1 -0
  195. package/storybook-static/assets/{Tabs.stories-HeiG8gYN.js → Tabs.stories-jkioQ4xt.js} +4 -4
  196. package/storybook-static/assets/{TargetCursor.stories-B16pWZaP.js → TargetCursor.stories-B4ACbrmW.js} +1 -1
  197. package/storybook-static/assets/{TextArea-DKx3k6hV.js → TextArea-DN6IYITs.js} +1 -1
  198. package/storybook-static/assets/TextArea.stories-CwLLZFoD.js +118 -0
  199. package/storybook-static/assets/{TextCursor.stories-CY2eIn6Z.js → TextCursor.stories-NORQhkfy.js} +1 -1
  200. package/storybook-static/assets/TextInput-6V0mlIuS.css +1 -0
  201. package/storybook-static/assets/TextInput-CLgIGUn3.js +28 -0
  202. package/storybook-static/assets/TextInput.stories-BNooOWA2.js +89 -0
  203. package/storybook-static/assets/{TextPressure.stories-sH-cgdL2.js → TextPressure.stories-BaCAyBD4.js} +2 -2
  204. package/storybook-static/assets/{TextType.stories-B7Oy3P9u.js → TextType.stories-DG4mQ3HF.js} +1 -1
  205. package/storybook-static/assets/ThemeSwitcher.stories-slxIamHU.js +47 -0
  206. package/storybook-static/assets/{Threads.stories-e52ErKbM.js → Threads.stories-Rsg8lRsX.js} +2 -2
  207. package/storybook-static/assets/TimeInput-BT44V2P0.css +1 -0
  208. package/storybook-static/assets/TimeInput.stories-CaO8_PY2.js +13 -0
  209. package/storybook-static/assets/{Toggle-BntWdyUe.js → Toggle-CTTN-13k.js} +1 -1
  210. package/storybook-static/assets/Toggle.stories-DrNYDjFB.js +163 -0
  211. package/storybook-static/assets/{ToggleButton-BQqJdlB_.js → ToggleButton-CXK855yx.js} +1 -1
  212. package/storybook-static/assets/ToggleButton.stories-DNsNH9vH.js +103 -0
  213. package/storybook-static/assets/{TrueFocus.stories-wm4VXWCk.js → TrueFocus.stories-zG6Ml8RP.js} +1 -1
  214. package/storybook-static/assets/{VariableProximity.stories-BNSYs_rC.js → VariableProximity.stories-CMZW-Tov.js} +1 -1
  215. package/storybook-static/assets/{Waves.stories-Ce2ZJFsV.js → Waves.stories-CscXTp_S.js} +1 -1
  216. package/storybook-static/assets/{check-Cty-Z1Ib.js → check-DLeHG_Da.js} +1 -1
  217. package/storybook-static/assets/{chevron-down-OhqRl4eJ.js → chevron-down-Ciks5pXx.js} +1 -1
  218. package/storybook-static/assets/{chevron-right-CZm4bArI.js → chevron-right-DjeluSA0.js} +1 -1
  219. package/storybook-static/assets/client-D1KVnN68.js +1 -0
  220. package/storybook-static/assets/{createLucideIcon-BNUG5osq.js → createLucideIcon-dvowvj4F.js} +1 -1
  221. package/storybook-static/assets/{folder-BjriMpXc.js → folder-CCqkDvFG.js} +1 -1
  222. package/storybook-static/assets/{iconBase-DmcmY1l-.js → iconBase-nrk1zV8Q.js} +1 -1
  223. package/storybook-static/assets/iframe-CU5nRRrn.css +1 -0
  224. package/storybook-static/assets/{iframe-B8pH-Lvr.js → iframe-Cw8dCV4Z.js} +180 -181
  225. package/storybook-static/assets/{index-PY_vM88c.js → index-A7l1uA6_.js} +6 -6
  226. package/storybook-static/assets/{index-BN99WpBo.js → index-Bm5msOcI.js} +1 -1
  227. package/storybook-static/assets/{index-DBfrIdYd.js → index-CzApopWo.js} +1 -1
  228. package/storybook-static/assets/{proxy-BA3VZtN5.js → proxy-p8L3T_Zy.js} +1 -1
  229. package/storybook-static/assets/{react-18-7dGub68c.js → react-18-D7YhBYbX.js} +1 -1
  230. package/storybook-static/assets/{react-three-fiber.esm-DI-wNJmP.js → react-three-fiber.esm-BnMrba87.js} +1 -1
  231. package/storybook-static/assets/{search-2YqBkJlG.js → search-7V6DOf2z.js} +1 -1
  232. package/storybook-static/assets/{settings-DvzICcFU.js → settings-B8s5hJGs.js} +1 -1
  233. package/storybook-static/assets/{sun-DgDhCM_S.js → sun-5V6ee2LJ.js} +1 -1
  234. package/storybook-static/assets/{trash-2-BwI5jvsn.js → trash-2-DeQvYdO7.js} +1 -1
  235. package/storybook-static/assets/{use-animation-frame-CF42h0i5.js → use-animation-frame-DovyG_Es.js} +1 -1
  236. package/storybook-static/assets/{use-in-view-Zn8evg3J.js → use-in-view-Dv3LTdsl.js} +1 -1
  237. package/storybook-static/assets/{use-motion-value--XhiA2Gt.js → use-motion-value-BVm7csqA.js} +1 -1
  238. package/storybook-static/assets/{use-spring-CrWzlBMd.js → use-spring-BkrdNVnG.js} +1 -1
  239. package/storybook-static/assets/{use-transform-vyDqMhf-.js → use-transform-CQNghMvr.js} +1 -1
  240. package/storybook-static/assets/{useSound-Bk2W5gkV.js → useSound-D23BsIr4.js} +1 -1
  241. package/storybook-static/assets/{users-aNPxMiig.js → users-R6T-yLyH.js} +1 -1
  242. package/storybook-static/assets/{x-BC8LCdn9.js → x-CypMgsiv.js} +1 -1
  243. package/storybook-static/iframe.html +3 -3
  244. package/storybook-static/index.html +5 -19
  245. package/storybook-static/index.json +1 -1
  246. package/storybook-static/project.json +1 -1
  247. package/storybook-static/addon-visual-tests-assets/visual-test-illustration.mp4 +0 -0
  248. package/storybook-static/assets/ArrayInput.stories-Cshz2s-a.js +0 -232
  249. package/storybook-static/assets/BooleansHeatmap-BV4VTyo6.css +0 -1
  250. package/storybook-static/assets/BooleansHeatmap.stories-CpNxqSED.js +0 -123
  251. package/storybook-static/assets/Calendar-tbpzwSIm.css +0 -1
  252. package/storybook-static/assets/Calendar.stories-Cx2JEddO.js +0 -229
  253. package/storybook-static/assets/Checkbox.stories-BwsnN3CP.js +0 -83
  254. package/storybook-static/assets/Color-AVL7NMMY-CoWQkAiP.js +0 -1
  255. package/storybook-static/assets/DateInput-C4-Rlnpy.css +0 -1
  256. package/storybook-static/assets/DateInput.stories-d46zYiZA.js +0 -119
  257. package/storybook-static/assets/DocsRenderer-PQXLIZUC-C2AYT361.js +0 -1243
  258. package/storybook-static/assets/EditFAB.stories-DvtpW34v.js +0 -378
  259. package/storybook-static/assets/ImageSlideshow.stories-BasuECRV.js +0 -385
  260. package/storybook-static/assets/LoadingSpinner.stories-Dj0bMFhR.js +0 -169
  261. package/storybook-static/assets/MoodChart-2hr_Y2GI.css +0 -1
  262. package/storybook-static/assets/MoodChart.stories-Bk0jtB4g.js +0 -40
  263. package/storybook-static/assets/Navbar-BPWxCB-U.css +0 -1
  264. package/storybook-static/assets/Navbar.stories-Dos3kovt.js +0 -320
  265. package/storybook-static/assets/NumberStepper.stories-BvFwBEjt.js +0 -436
  266. package/storybook-static/assets/PieChart-OfDGlJ4g.css +0 -1
  267. package/storybook-static/assets/PieChart.stories-XZqxh_GW.js +0 -199
  268. package/storybook-static/assets/QuantifiableHabitsChart-Bam6n9X_.css +0 -1
  269. package/storybook-static/assets/SearchBar.stories-CGaj__zF.js +0 -169
  270. package/storybook-static/assets/SearchableDropdown.stories-CfeFR5Rk.js +0 -282
  271. package/storybook-static/assets/SelectInput.stories-DByYKCGI.js +0 -129
  272. package/storybook-static/assets/SleepChart-DBRb08s_.css +0 -1
  273. package/storybook-static/assets/SleepChart.stories-DcoBwiEm.js +0 -58
  274. package/storybook-static/assets/Slider-Bq7zObwV.css +0 -1
  275. package/storybook-static/assets/Table-DnhtoClE.css +0 -1
  276. package/storybook-static/assets/Tabs-D5ZPN7MM.css +0 -1
  277. package/storybook-static/assets/TextArea.stories-Bpqlv7j5.js +0 -155
  278. package/storybook-static/assets/TextInput-BjVJQEYN.css +0 -1
  279. package/storybook-static/assets/TextInput-CLyTHgK9.js +0 -28
  280. package/storybook-static/assets/TextInput.stories-BP1LSkLG.js +0 -203
  281. package/storybook-static/assets/ThemeSwitcher.stories-Bj0YQKM5.js +0 -62
  282. package/storybook-static/assets/TimeInput-C3enPYoV.css +0 -1
  283. package/storybook-static/assets/TimeInput.stories-Cd28zwwR.js +0 -55
  284. package/storybook-static/assets/Toggle.stories-DtqFmh3E.js +0 -199
  285. package/storybook-static/assets/ToggleButton.stories-DkN_4qpp.js +0 -163
  286. package/storybook-static/assets/client-0pKYCVHx.js +0 -1
  287. package/storybook-static/assets/iframe-B7RIyArP.css +0 -1
  288. package/storybook-static/assets/index-bi5z6E3I.js +0 -1
  289. package/storybook-static/assets/layout-grid-TssXYNzv.js +0 -6
  290. package/storybook-static/sb-addons/chromatic-com-storybook-4/manager-bundle.js +0 -356
  291. package/storybook-static/sb-addons/chromatic-com-storybook-4/manager-bundle.js.LEGAL.txt +0 -40
  292. package/storybook-static/sb-addons/docs-2/manager-bundle.js +0 -151
  293. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +0 -127
  294. /package/storybook-static/sb-addons/{links-3 → links-1}/manager-bundle.js +0 -0
  295. /package/storybook-static/sb-addons/{storybook-5 → storybook-2}/manager-bundle.js +0 -0
@@ -1,4 +1,4 @@
1
- import{r as I,j as e}from"./iframe-B8pH-Lvr.js";import{A as M}from"./index-DBfrIdYd.js";import{m as _}from"./proxy-BA3VZtN5.js";const B="_card_k0xft_1",V="_hoverable_k0xft_50",A="_elevated_k0xft_65",L="_outlined_k0xft_78",S="_flat_k0xft_111",E="_glass_k0xft_156",W="_imageContainer_k0xft_187",F="_image_k0xft_187",H="_header_k0xft_233",R="_headerContent_k0xft_248",O="_expandButton_k0xft_254",D="_expandIcon_k0xft_285",J="_expandableContent_k0xft_289",U="_expandable_k0xft_289",X="_body_k0xft_313",z="_footer_k0xft_319",G="_title_k0xft_350",K="_subtitle_k0xft_366",Q="_clickable_k0xft_380",Y="_padding_k0xft_394",Z="_noPadding_k0xft_398",$="_loading_k0xft_403",ee="_loadingShimmer_k0xft_1",ae="_loadingPulse_k0xft_1",a={card:B,hoverable:V,elevated:A,outlined:L,flat:S,glass:E,imageContainer:W,image:F,header:H,headerContent:R,expandButton:O,expandIcon:D,expandableContent:J,expandable:U,body:X,footer:z,title:G,subtitle:K,clickable:Q,padding:Y,noPadding:Z,loading:$,loadingShimmer:ee,loadingPulse:ae},te=({variant:g="elevated",hoverable:d=!1,clickable:l=!1,padding:c=!0,image:p,imageAlt:v="",title:o,subtitle:s,header:u,footer:m,children:f,expandable:t=!1,defaultExpanded:C=!1,expanded:i,onExpandChange:r,className:b="",onClick:k,motionProps:y,...j})=>{const[T,N]=I.useState(C),n=i!==void 0?i:T,h=()=>{const x=!n;i===void 0&&N(x),r==null||r(x)},q=[a.card,a[g],d&&a.hoverable,l&&a.clickable,!c&&a.noPadding,t&&a.expandable,b].filter(Boolean).join(" "),w=()=>u?e.jsxs("div",{className:a.header,children:[e.jsx("div",{className:a.headerContent,children:u}),t&&e.jsx("button",{className:a.expandButton,onClick:h,"aria-label":n?"Collapse card":"Expand card",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:a.expandIcon,style:{transform:n?"rotate(180deg)":"rotate(0deg)"},children:e.jsx("path",{d:"M6 9l6 6 6-6"})})})]}):o||s?e.jsxs("div",{className:a.header,children:[e.jsxs("div",{className:a.headerContent,children:[o&&e.jsx("h3",{className:a.title,children:o}),s&&e.jsx("p",{className:a.subtitle,children:s})]}),t&&e.jsx("button",{className:a.expandButton,onClick:h,"aria-label":n?"Collapse card":"Expand card",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:a.expandIcon,style:{transform:n?"rotate(180deg)":"rotate(0deg)"},children:e.jsx("path",{d:"M6 9l6 6 6-6"})})})]}):null,P=e.jsxs(e.Fragment,{children:[p&&e.jsx("div",{className:a.imageContainer,children:e.jsx("img",{src:p,alt:v,className:a.image})}),w(),e.jsx(M,{initial:!1,children:(!t||n)&&e.jsxs(_.div,{initial:t?{height:0,opacity:0}:void 0,animate:t?{height:"auto",opacity:1}:void 0,exit:t?{height:0,opacity:0}:void 0,transition:{duration:.3,ease:"easeInOut"},className:a.expandableContent,children:[f&&e.jsx("div",{className:c?a.body:void 0,children:f}),m&&e.jsx("div",{className:a.footer,children:m})]},"content")})]});return e.jsx(_.div,{className:q,onClick:l?k:void 0,whileHover:d?{y:-4}:void 0,transition:{type:"spring",stiffness:400,damping:17},...y,...j,children:P})};te.__docgenInfo={description:`Card Component
1
+ import{r as I,j as e}from"./iframe-Cw8dCV4Z.js";import{A as M}from"./index-CzApopWo.js";import{m as _}from"./proxy-p8L3T_Zy.js";const B="_card_k0xft_1",V="_hoverable_k0xft_50",A="_elevated_k0xft_65",L="_outlined_k0xft_78",S="_flat_k0xft_111",E="_glass_k0xft_156",W="_imageContainer_k0xft_187",F="_image_k0xft_187",H="_header_k0xft_233",R="_headerContent_k0xft_248",O="_expandButton_k0xft_254",D="_expandIcon_k0xft_285",J="_expandableContent_k0xft_289",U="_expandable_k0xft_289",X="_body_k0xft_313",z="_footer_k0xft_319",G="_title_k0xft_350",K="_subtitle_k0xft_366",Q="_clickable_k0xft_380",Y="_padding_k0xft_394",Z="_noPadding_k0xft_398",$="_loading_k0xft_403",ee="_loadingShimmer_k0xft_1",ae="_loadingPulse_k0xft_1",a={card:B,hoverable:V,elevated:A,outlined:L,flat:S,glass:E,imageContainer:W,image:F,header:H,headerContent:R,expandButton:O,expandIcon:D,expandableContent:J,expandable:U,body:X,footer:z,title:G,subtitle:K,clickable:Q,padding:Y,noPadding:Z,loading:$,loadingShimmer:ee,loadingPulse:ae},te=({variant:g="elevated",hoverable:d=!1,clickable:l=!1,padding:c=!0,image:p,imageAlt:v="",title:o,subtitle:s,header:u,footer:m,children:f,expandable:t=!1,defaultExpanded:C=!1,expanded:i,onExpandChange:r,className:b="",onClick:k,motionProps:y,...j})=>{const[T,N]=I.useState(C),n=i!==void 0?i:T,h=()=>{const x=!n;i===void 0&&N(x),r==null||r(x)},q=[a.card,a[g],d&&a.hoverable,l&&a.clickable,!c&&a.noPadding,t&&a.expandable,b].filter(Boolean).join(" "),w=()=>u?e.jsxs("div",{className:a.header,children:[e.jsx("div",{className:a.headerContent,children:u}),t&&e.jsx("button",{className:a.expandButton,onClick:h,"aria-label":n?"Collapse card":"Expand card",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:a.expandIcon,style:{transform:n?"rotate(180deg)":"rotate(0deg)"},children:e.jsx("path",{d:"M6 9l6 6 6-6"})})})]}):o||s?e.jsxs("div",{className:a.header,children:[e.jsxs("div",{className:a.headerContent,children:[o&&e.jsx("h3",{className:a.title,children:o}),s&&e.jsx("p",{className:a.subtitle,children:s})]}),t&&e.jsx("button",{className:a.expandButton,onClick:h,"aria-label":n?"Collapse card":"Expand card",children:e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:a.expandIcon,style:{transform:n?"rotate(180deg)":"rotate(0deg)"},children:e.jsx("path",{d:"M6 9l6 6 6-6"})})})]}):null,P=e.jsxs(e.Fragment,{children:[p&&e.jsx("div",{className:a.imageContainer,children:e.jsx("img",{src:p,alt:v,className:a.image})}),w(),e.jsx(M,{initial:!1,children:(!t||n)&&e.jsxs(_.div,{initial:t?{height:0,opacity:0}:void 0,animate:t?{height:"auto",opacity:1}:void 0,exit:t?{height:0,opacity:0}:void 0,transition:{duration:.3,ease:"easeInOut"},className:a.expandableContent,children:[f&&e.jsx("div",{className:c?a.body:void 0,children:f}),m&&e.jsx("div",{className:a.footer,children:m})]},"content")})]});return e.jsx(_.div,{className:q,onClick:l?k:void 0,whileHover:d?{y:-4}:void 0,transition:{type:"spring",stiffness:400,damping:17},...y,...j,children:P})};te.__docgenInfo={description:`Card Component
2
2
 
3
3
  @component
4
4
  @description
@@ -1,4 +1,4 @@
1
- import{j as e,r as T}from"./iframe-B8pH-Lvr.js";import{C as a}from"./Card-DNp-cUnt.js";import{B as t}from"./Button-CQGdvhpN.js";import"./preload-helper-C1FmrZbK.js";import"./index-DBfrIdYd.js";import"./proxy-BA3VZtN5.js";import"./MotionConfigContext-D5hZdVGx.js";import"./useSound-Bk2W5gkV.js";const D={title:"Atoms/Card",component:a,parameters:{layout:"centered",docs:{description:{component:"A flexible container component with various styling options and animation support."}}},tags:["autodocs"],argTypes:{variant:{control:"select",options:["elevated","outlined","flat","glass"],description:"Visual style variant of the card"},padding:{control:"boolean"},hoverable:{control:"boolean"},clickable:{control:"boolean"},expandable:{control:"boolean"},defaultExpanded:{control:"boolean"},title:{control:"text"},subtitle:{control:"text"},onClick:{action:"clicked"},onExpandChange:{action:"expand-changed"}}},r={args:{title:"Card Title",subtitle:"Optional subtitle",hoverable:!0,children:e.jsx("p",{children:"Card content goes here. Use controls to switch between elevated, outlined, flat, and glass variants."})}},n={args:{variant:"elevated",hoverable:!0,image:"https://via.placeholder.com/350x200",imageAlt:"Feature image",children:e.jsxs("div",{style:{maxWidth:"350px"},children:[e.jsx("h2",{style:{marginBottom:"0.5rem"},children:"Feature Card"}),e.jsx("p",{style:{marginBottom:"1rem",color:"#666"},children:"Image, title, description, and action buttons composed together."}),e.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[e.jsx(t,{variant:"primary",size:"small",children:"Learn More"}),e.jsx(t,{variant:"outline",size:"small",children:"Share"})]})]})}},l={render:()=>e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"1rem",maxWidth:"800px"},children:[e.jsxs(a,{variant:"elevated",hoverable:!0,children:[e.jsx("h4",{children:"Elevated"}),e.jsx("p",{children:"With shadow"})]}),e.jsxs(a,{variant:"outlined",hoverable:!0,children:[e.jsx("h4",{children:"Outlined"}),e.jsx("p",{children:"With border"})]}),e.jsxs(a,{variant:"glass",hoverable:!0,children:[e.jsx("h4",{children:"Glass"}),e.jsx("p",{children:"Glassmorphism"})]})]}),parameters:{controls:{disable:!0},layout:"padded"}},s={args:{title:"Expandable Card",subtitle:"Click the arrow to expand",expandable:!0,variant:"outlined",children:e.jsxs("div",{children:[e.jsx("p",{children:"This content is collapsible. Useful for FAQ sections, settings panels, or progressive disclosure."}),e.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"1rem"},children:[e.jsx(t,{variant:"primary",size:"small",children:"Action"}),e.jsx(t,{variant:"outline",size:"small",children:"Secondary"})]})]})}},i={render:()=>{const[d,p]=T.useState(!1);return e.jsxs("div",{style:{width:"400px"},children:[e.jsxs(a,{title:"Controlled Expandable",subtitle:"State managed externally",expandable:!0,expanded:d,onExpandChange:p,variant:"glass",hoverable:!0,children:[e.jsx("p",{children:"Expanded state is controlled via props."}),e.jsxs("p",{children:["Current: ",e.jsx("strong",{children:d?"Expanded":"Collapsed"})]})]}),e.jsx("div",{style:{marginTop:"1rem",textAlign:"center"},children:e.jsx(t,{variant:"primary",onClick:()=>p(!d),children:"External Toggle"})})]})},parameters:{controls:{disable:!0}}},o={render:()=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",maxWidth:"600px"},children:[e.jsx(a,{title:"Getting Started",expandable:!0,variant:"outlined",children:e.jsx("p",{children:"Create an account and follow the onboarding tutorial to get started."})}),e.jsx(a,{title:"Account Management",expandable:!0,variant:"outlined",children:e.jsx("p",{children:"Manage settings from the profile page: personal info, password, notifications."})}),e.jsx(a,{title:"Billing & Payments",expandable:!0,defaultExpanded:!0,variant:"outlined",children:e.jsx("p",{children:"We accept all major credit cards and PayPal. Billing is monthly or annual."})})]}),parameters:{controls:{disable:!0},layout:"padded"}};var c,m,u;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:`{
1
+ import{j as e,r as T}from"./iframe-Cw8dCV4Z.js";import{C as a}from"./Card-Bu54h8gN.js";import{B as t}from"./Button-DgpqJWgD.js";import"./preload-helper-C1FmrZbK.js";import"./index-CzApopWo.js";import"./proxy-p8L3T_Zy.js";import"./MotionConfigContext-BCa1jVYq.js";import"./useSound-D23BsIr4.js";const D={title:"Atoms/Card",component:a,parameters:{layout:"centered",docs:{description:{component:"A flexible container component with various styling options and animation support."}}},argTypes:{variant:{control:"select",options:["elevated","outlined","flat","glass"],description:"Visual style variant of the card"},padding:{control:"boolean"},hoverable:{control:"boolean"},clickable:{control:"boolean"},expandable:{control:"boolean"},defaultExpanded:{control:"boolean"},title:{control:"text"},subtitle:{control:"text"},onClick:{action:"clicked"},onExpandChange:{action:"expand-changed"}}},r={args:{title:"Card Title",subtitle:"Optional subtitle",hoverable:!0,children:e.jsx("p",{children:"Card content goes here. Use controls to switch between elevated, outlined, flat, and glass variants."})}},n={args:{variant:"elevated",hoverable:!0,image:"https://via.placeholder.com/350x200",imageAlt:"Feature image",children:e.jsxs("div",{style:{maxWidth:"350px"},children:[e.jsx("h2",{style:{marginBottom:"0.5rem"},children:"Feature Card"}),e.jsx("p",{style:{marginBottom:"1rem",color:"#666"},children:"Image, title, description, and action buttons composed together."}),e.jsxs("div",{style:{display:"flex",gap:"0.5rem"},children:[e.jsx(t,{variant:"primary",size:"small",children:"Learn More"}),e.jsx(t,{variant:"outline",size:"small",children:"Share"})]})]})}},l={render:()=>e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"1rem",maxWidth:"800px"},children:[e.jsxs(a,{variant:"elevated",hoverable:!0,children:[e.jsx("h4",{children:"Elevated"}),e.jsx("p",{children:"With shadow"})]}),e.jsxs(a,{variant:"outlined",hoverable:!0,children:[e.jsx("h4",{children:"Outlined"}),e.jsx("p",{children:"With border"})]}),e.jsxs(a,{variant:"glass",hoverable:!0,children:[e.jsx("h4",{children:"Glass"}),e.jsx("p",{children:"Glassmorphism"})]})]}),parameters:{controls:{disable:!0},layout:"padded"}},s={args:{title:"Expandable Card",subtitle:"Click the arrow to expand",expandable:!0,variant:"outlined",children:e.jsxs("div",{children:[e.jsx("p",{children:"This content is collapsible. Useful for FAQ sections, settings panels, or progressive disclosure."}),e.jsxs("div",{style:{display:"flex",gap:"0.5rem",marginTop:"1rem"},children:[e.jsx(t,{variant:"primary",size:"small",children:"Action"}),e.jsx(t,{variant:"outline",size:"small",children:"Secondary"})]})]})}},i={render:()=>{const[d,p]=T.useState(!1);return e.jsxs("div",{style:{width:"400px"},children:[e.jsxs(a,{title:"Controlled Expandable",subtitle:"State managed externally",expandable:!0,expanded:d,onExpandChange:p,variant:"glass",hoverable:!0,children:[e.jsx("p",{children:"Expanded state is controlled via props."}),e.jsxs("p",{children:["Current: ",e.jsx("strong",{children:d?"Expanded":"Collapsed"})]})]}),e.jsx("div",{style:{marginTop:"1rem",textAlign:"center"},children:e.jsx(t,{variant:"primary",onClick:()=>p(!d),children:"External Toggle"})})]})},parameters:{controls:{disable:!0}}},o={render:()=>e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",maxWidth:"600px"},children:[e.jsx(a,{title:"Getting Started",expandable:!0,variant:"outlined",children:e.jsx("p",{children:"Create an account and follow the onboarding tutorial to get started."})}),e.jsx(a,{title:"Account Management",expandable:!0,variant:"outlined",children:e.jsx("p",{children:"Manage settings from the profile page: personal info, password, notifications."})}),e.jsx(a,{title:"Billing & Payments",expandable:!0,defaultExpanded:!0,variant:"outlined",children:e.jsx("p",{children:"We accept all major credit cards and PayPal. Billing is monthly or annual."})})]}),parameters:{controls:{disable:!0},layout:"padded"}};var c,m,u;r.parameters={...r.parameters,docs:{...(c=r.parameters)==null?void 0:c.docs,source:{originalSource:`{
2
2
  args: {
3
3
  title: 'Card Title',
4
4
  subtitle: 'Optional subtitle',
@@ -1,4 +1,4 @@
1
- import{r as o,j as r}from"./iframe-B8pH-Lvr.js";import{g as u}from"./index-C8pce-KX.js";import{G as M}from"./iconBase-DmcmY1l-.js";import"./preload-helper-C1FmrZbK.js";function U(f){return M({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18.25 15.5a.75.75 0 0 1-.75-.75V7.56L7.28 17.78a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L16.44 6.5H9.25a.75.75 0 0 1 0-1.5h9a.75.75 0 0 1 .75.75v9a.75.75 0 0 1-.75.75Z"},child:[]}]})(f)}const G="_open_87iwp_63",O="_logo_87iwp_71",n={"card-nav-container":"_card-nav-container_87iwp_1","card-nav":"_card-nav_87iwp_1","card-nav-top":"_card-nav-top_87iwp_25","hamburger-menu":"_hamburger-menu_87iwp_38","hamburger-line":"_hamburger-line_87iwp_48",open:G,"logo-container":"_logo-container_87iwp_71",logo:O,"card-nav-cta-button":"_card-nav-cta-button_87iwp_84","card-nav-content":"_card-nav-content_87iwp_101","nav-card":"_nav-card_87iwp_121","nav-card-label":"_nav-card-label_87iwp_134","nav-card-links":"_nav-card-links_87iwp_140","nav-card-link":"_nav-card-link_87iwp_140"},L=({logo:f,logoAlt:$="Logo",items:m,className:N="",ease:b="power3.out",baseColor:k="#fff",menuColor:R,buttonBgColor:j,buttonTextColor:E})=>{const[A,g]=o.useState(!1),[s,_]=o.useState(!1),c=o.useRef(null),p=o.useRef([]),l=o.useRef(null),C=()=>{const e=c.current;if(!e)return 260;if(window.matchMedia("(max-width: 768px)").matches){const a=e.querySelector(".card-nav-content");if(a){const i=a.style.visibility,v=a.style.pointerEvents,S=a.style.position,T=a.style.height;a.style.visibility="visible",a.style.pointerEvents="auto",a.style.position="static",a.style.height="auto",a.offsetHeight;const V=60,q=16,I=a.scrollHeight;return a.style.visibility=i,a.style.pointerEvents=v,a.style.position=S,a.style.height=T,V+I+q}}return 260},h=()=>{const e=c.current;if(!e)return null;u.set(e,{height:60,overflow:"hidden"}),u.set(p.current,{y:50,opacity:0});const t=u.timeline({paused:!0});return t.to(e,{height:C,duration:.4,ease:b}),t.to(p.current,{y:0,opacity:1,duration:.4,ease:b,stagger:.08},"-=0.1"),t};o.useLayoutEffect(()=>{const e=h();return l.current=e,()=>{e==null||e.kill(),l.current=null}},[b,m]),o.useLayoutEffect(()=>{const e=()=>{if(l.current)if(s){const t=C();u.set(c.current,{height:t}),l.current.kill();const a=h();a&&(a.progress(1),l.current=a)}else{l.current.kill();const t=h();t&&(l.current=t)}};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[s]);const D=()=>{const e=l.current;e&&(s?(g(!1),e.eventCallback("onReverseComplete",()=>_(!1)),e.reverse()):(g(!0),_(!0),e.play(0)))},H=e=>t=>{t&&(p.current[e]=t)};return r.jsx("div",{className:`${n["card-nav-container"]} ${N}`,children:r.jsxs("nav",{ref:c,className:`${n["card-nav"]} ${s?n.open:""}`,style:{backgroundColor:k},children:[r.jsxs("div",{className:`${n["card-nav-top"]}`,children:[r.jsxs("div",{className:`${n["hamburger-menu"]} ${A?n.open:""}`,onClick:D,role:"button","aria-label":s?"Close menu":"Open menu",tabIndex:0,style:{color:R||"#000"},children:[r.jsx("div",{className:`${n["hamburger-line"]}`}),r.jsx("div",{className:`${n["hamburger-line"]}`})]}),r.jsx("div",{className:`${n["logo-container"]}`,children:r.jsx("img",{src:f,alt:$,className:`${n.logo}`})}),r.jsx("button",{type:"button",className:`${n["card-nav-cta-button"]}`,style:{backgroundColor:j,color:E},children:"Get Started"})]}),r.jsx("div",{className:`${n["card-nav-content"]}`,"aria-hidden":!s,children:(m||[]).slice(0,3).map((e,t)=>{var a;return r.jsxs("div",{className:`${n["nav-card"]}`,ref:H(t),style:{backgroundColor:e.bgColor,color:e.textColor},children:[r.jsx("div",{className:`${n["nav-card-label"]}`,children:e.label}),r.jsx("div",{className:`${n["nav-card-links"]}`,children:(a=e.links)==null?void 0:a.map((i,v)=>r.jsxs("a",{className:`${n["nav-card-link"]}`,href:i.href,"aria-label":i.ariaLabel,children:[r.jsx(U,{className:"nav-card-link-icon","aria-hidden":"true"}),i.label]},`${i.label}-${v}`))})]},`${e.label}-${t}`)})})]})})};L.__docgenInfo={description:"",methods:[],displayName:"CardNav",props:{logoAlt:{defaultValue:{value:"'Logo'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},ease:{defaultValue:{value:"'power3.out'",computed:!1},required:!1},baseColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1}}};const Z={title:"ReactBits/Components/CardNav",component:L,parameters:{layout:"fullscreen"},tags:["autodocs"]},d={args:{logoAlt:"Logo",items:[{label:"Products",bgColor:"#1a1a2e",textColor:"#fff",links:[{label:"Analytics",href:"#",ariaLabel:"Analytics"},{label:"Dashboard",href:"#",ariaLabel:"Dashboard"},{label:"Reports",href:"#",ariaLabel:"Reports"}]},{label:"Resources",bgColor:"#16213e",textColor:"#fff",links:[{label:"Documentation",href:"#",ariaLabel:"Documentation"},{label:"Tutorials",href:"#",ariaLabel:"Tutorials"}]},{label:"Company",bgColor:"#0f3460",textColor:"#fff",links:[{label:"About Us",href:"#",ariaLabel:"About Us"},{label:"Careers",href:"#",ariaLabel:"Careers"},{label:"Contact",href:"#",ariaLabel:"Contact"}]}],ease:"power3.out",baseColor:"#fff"}};var y,w,x;d.parameters={...d.parameters,docs:{...(y=d.parameters)==null?void 0:y.docs,source:{originalSource:`{
1
+ import{r as o,j as t}from"./iframe-Cw8dCV4Z.js";import{g as u}from"./index-C8pce-KX.js";import{G as M}from"./iconBase-nrk1zV8Q.js";import"./preload-helper-C1FmrZbK.js";function U(f){return M({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M18.25 15.5a.75.75 0 0 1-.75-.75V7.56L7.28 17.78a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L16.44 6.5H9.25a.75.75 0 0 1 0-1.5h9a.75.75 0 0 1 .75.75v9a.75.75 0 0 1-.75.75Z"},child:[]}]})(f)}const G="_open_87iwp_63",O="_logo_87iwp_71",n={"card-nav-container":"_card-nav-container_87iwp_1","card-nav":"_card-nav_87iwp_1","card-nav-top":"_card-nav-top_87iwp_25","hamburger-menu":"_hamburger-menu_87iwp_38","hamburger-line":"_hamburger-line_87iwp_48",open:G,"logo-container":"_logo-container_87iwp_71",logo:O,"card-nav-cta-button":"_card-nav-cta-button_87iwp_84","card-nav-content":"_card-nav-content_87iwp_101","nav-card":"_nav-card_87iwp_121","nav-card-label":"_nav-card-label_87iwp_134","nav-card-links":"_nav-card-links_87iwp_140","nav-card-link":"_nav-card-link_87iwp_140"},L=({logo:f,logoAlt:$="Logo",items:m,className:N="",ease:b="power3.out",baseColor:k="#fff",menuColor:R,buttonBgColor:j,buttonTextColor:E})=>{const[A,g]=o.useState(!1),[s,_]=o.useState(!1),c=o.useRef(null),p=o.useRef([]),l=o.useRef(null),C=()=>{const e=c.current;if(!e)return 260;if(window.matchMedia("(max-width: 768px)").matches){const a=e.querySelector(".card-nav-content");if(a){const i=a.style.visibility,v=a.style.pointerEvents,S=a.style.position,T=a.style.height;a.style.visibility="visible",a.style.pointerEvents="auto",a.style.position="static",a.style.height="auto",a.offsetHeight;const V=60,q=16,I=a.scrollHeight;return a.style.visibility=i,a.style.pointerEvents=v,a.style.position=S,a.style.height=T,V+I+q}}return 260},h=()=>{const e=c.current;if(!e)return null;u.set(e,{height:60,overflow:"hidden"}),u.set(p.current,{y:50,opacity:0});const r=u.timeline({paused:!0});return r.to(e,{height:C,duration:.4,ease:b}),r.to(p.current,{y:0,opacity:1,duration:.4,ease:b,stagger:.08},"-=0.1"),r};o.useLayoutEffect(()=>{const e=h();return l.current=e,()=>{e==null||e.kill(),l.current=null}},[b,m]),o.useLayoutEffect(()=>{const e=()=>{if(l.current)if(s){const r=C();u.set(c.current,{height:r}),l.current.kill();const a=h();a&&(a.progress(1),l.current=a)}else{l.current.kill();const r=h();r&&(l.current=r)}};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[s]);const D=()=>{const e=l.current;e&&(s?(g(!1),e.eventCallback("onReverseComplete",()=>_(!1)),e.reverse()):(g(!0),_(!0),e.play(0)))},H=e=>r=>{r&&(p.current[e]=r)};return t.jsx("div",{className:`${n["card-nav-container"]} ${N}`,children:t.jsxs("nav",{ref:c,className:`${n["card-nav"]} ${s?n.open:""}`,style:{backgroundColor:k},children:[t.jsxs("div",{className:`${n["card-nav-top"]}`,children:[t.jsxs("div",{className:`${n["hamburger-menu"]} ${A?n.open:""}`,onClick:D,role:"button","aria-label":s?"Close menu":"Open menu",tabIndex:0,style:{color:R||"#000"},children:[t.jsx("div",{className:`${n["hamburger-line"]}`}),t.jsx("div",{className:`${n["hamburger-line"]}`})]}),t.jsx("div",{className:`${n["logo-container"]}`,children:t.jsx("img",{src:f,alt:$,className:`${n.logo}`})}),t.jsx("button",{type:"button",className:`${n["card-nav-cta-button"]}`,style:{backgroundColor:j,color:E},children:"Get Started"})]}),t.jsx("div",{className:`${n["card-nav-content"]}`,"aria-hidden":!s,children:(m||[]).slice(0,3).map((e,r)=>{var a;return t.jsxs("div",{className:`${n["nav-card"]}`,ref:H(r),style:{backgroundColor:e.bgColor,color:e.textColor},children:[t.jsx("div",{className:`${n["nav-card-label"]}`,children:e.label}),t.jsx("div",{className:`${n["nav-card-links"]}`,children:(a=e.links)==null?void 0:a.map((i,v)=>t.jsxs("a",{className:`${n["nav-card-link"]}`,href:i.href,"aria-label":i.ariaLabel,children:[t.jsx(U,{className:"nav-card-link-icon","aria-hidden":"true"}),i.label]},`${i.label}-${v}`))})]},`${e.label}-${r}`)})})]})})};L.__docgenInfo={description:"",methods:[],displayName:"CardNav",props:{logoAlt:{defaultValue:{value:"'Logo'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},ease:{defaultValue:{value:"'power3.out'",computed:!1},required:!1},baseColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1}}};const Z={title:"ReactBits/Components/CardNav",component:L,parameters:{layout:"fullscreen"}},d={args:{logoAlt:"Logo",items:[{label:"Products",bgColor:"#1a1a2e",textColor:"#fff",links:[{label:"Analytics",href:"#",ariaLabel:"Analytics"},{label:"Dashboard",href:"#",ariaLabel:"Dashboard"},{label:"Reports",href:"#",ariaLabel:"Reports"}]},{label:"Resources",bgColor:"#16213e",textColor:"#fff",links:[{label:"Documentation",href:"#",ariaLabel:"Documentation"},{label:"Tutorials",href:"#",ariaLabel:"Tutorials"}]},{label:"Company",bgColor:"#0f3460",textColor:"#fff",links:[{label:"About Us",href:"#",ariaLabel:"About Us"},{label:"Careers",href:"#",ariaLabel:"Careers"},{label:"Contact",href:"#",ariaLabel:"Contact"}]}],ease:"power3.out",baseColor:"#fff"}};var y,w,x;d.parameters={...d.parameters,docs:{...(y=d.parameters)==null?void 0:y.docs,source:{originalSource:`{
2
2
  args: {
3
3
  logoAlt: 'Logo',
4
4
  items: [{
@@ -1,4 +1,4 @@
1
- import{r as c,j as i}from"./iframe-B8pH-Lvr.js";import{G as v}from"./iconBase-DmcmY1l-.js";import{u as Y}from"./use-motion-value--XhiA2Gt.js";import{m as k}from"./proxy-BA3VZtN5.js";import{u as z}from"./use-transform-vyDqMhf-.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-D5hZdVGx.js";function K(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"},child:[]},{tag:"line",attr:{x1:"3",y1:"9",x2:"21",y2:"9"},child:[]},{tag:"line",attr:{x1:"9",y1:"21",x2:"9",y2:"9"},child:[]}]})(e)}function Q(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"12 2 2 7 12 12 22 7 12 2"},child:[]},{tag:"polyline",attr:{points:"2 17 12 22 22 17"},child:[]},{tag:"polyline",attr:{points:"2 12 12 17 22 12"},child:[]}]})(e)}function X(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"line",attr:{x1:"16",y1:"13",x2:"8",y2:"13"},child:[]},{tag:"line",attr:{x1:"16",y1:"17",x2:"8",y2:"17"},child:[]},{tag:"polyline",attr:{points:"10 9 9 9 8 9"},child:[]}]})(e)}function Z(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"16 18 22 12 16 6"},child:[]},{tag:"polyline",attr:{points:"8 6 2 12 8 18"},child:[]}]})(e)}function ee(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]}]})(e)}const te="_round_14jni_33",ne="_active_14jni_60",oe="_inactive_14jni_64",n={"carousel-container":"_carousel-container_14jni_1","carousel-track":"_carousel-track_14jni_11","carousel-item":"_carousel-item_14jni_15",round:te,"carousel-item-header":"_carousel-item-header_14jni_47","carousel-indicators-container":"_carousel-indicators-container_14jni_52","carousel-indicator":"_carousel-indicator_14jni_52",active:ne,inactive:oe,"carousel-icon-container":"_carousel-icon-container_14jni_74","carousel-icon":"_carousel-icon_14jni_74","carousel-item-content":"_carousel-item-content_14jni_90","carousel-item-title":"_carousel-item-title_14jni_95","carousel-item-description":"_carousel-item-description_14jni_102","carousel-indicators":"_carousel-indicators_14jni_52"},ie=[{title:"Text Animations",description:"Cool text animations for your projects.",id:1,icon:i.jsx(X,{className:`${n["carousel-icon"]}`})},{title:"Animations",description:"Smooth animations for your projects.",id:2,icon:i.jsx(ee,{className:`${n["carousel-icon"]}`})},{title:"Components",description:"Reusable components for your projects.",id:3,icon:i.jsx(Q,{className:`${n["carousel-icon"]}`})},{title:"Backgrounds",description:"Beautiful backgrounds and patterns for your projects.",id:4,icon:i.jsx(K,{className:`${n["carousel-icon"]}`})},{title:"Common UI",description:"Common UI components are coming soon!",id:5,icon:i.jsx(Z,{className:`${n["carousel-icon"]}`})}],S=0,B=500,T=16,se={type:"spring",stiffness:300,damping:30};function ae({item:e,index:l,itemWidth:g,round:m,trackItemOffset:u,x:s,transition:f}){const N=[-(l+1)*u,-l*u,-(l-1)*u],r=z(s,N,[90,0,-90],{clamp:!1});return i.jsxs(k.div,{className:`${n["carousel-item"]} ${m?n.round:""}`,style:{width:g,height:m?g:"100%",rotateY:r,...m&&{borderRadius:"50%"}},transition:f,children:[i.jsx("div",{className:`${n["carousel-item-header"]} ${m?n.round:""}`,children:i.jsx("span",{className:`${n["carousel-icon-container"]}`,children:e.icon})}),i.jsxs("div",{className:`${n["carousel-item-content"]}`,children:[i.jsx("div",{className:`${n["carousel-item-title"]}`,children:e.title}),i.jsx("p",{className:`${n["carousel-item-description"]}`,children:e.description})]})]},`${(e==null?void 0:e.id)??l}-${l}`)}function V({items:e=ie,baseWidth:l=300,autoplay:g=!1,autoplayDelay:m=3e3,pauseOnHover:u=!1,loop:s=!1,round:f=!1}){const x=l-32,r=x+T,a=c.useMemo(()=>s?e.length===0?[]:[e[e.length-1],...e,e[0]]:e,[e,s]),[d,p]=c.useState(s?1:0),h=Y(0),[L,A]=c.useState(!1),[q,j]=c.useState(!1),[w,_]=c.useState(!1),C=c.useRef(null);c.useEffect(()=>{if(u&&C.current){const o=C.current,t=()=>A(!0),y=()=>A(!1);return o.addEventListener("mouseenter",t),o.addEventListener("mouseleave",y),()=>{o.removeEventListener("mouseenter",t),o.removeEventListener("mouseleave",y)}}},[u]),c.useEffect(()=>{if(!g||a.length<=1||u&&L)return;const o=setInterval(()=>{p(t=>Math.min(t+1,a.length-1))},m);return()=>clearInterval(o)},[g,m,L,u,a.length]),c.useEffect(()=>{const o=s?1:0;p(o),h.set(-o*r)},[e.length,s,r,h]),c.useEffect(()=>{!s&&d>a.length-1&&p(Math.max(0,a.length-1))},[a.length,s,d]);const E=q?{duration:0}:se,P=()=>{_(!0)},U=()=>{if(!s||a.length<=1){_(!1);return}const o=a.length-1;if(d===o){j(!0);const t=1;p(t),h.set(-t*r),requestAnimationFrame(()=>{j(!1),_(!1)});return}if(d===0){j(!0);const t=e.length;p(t),h.set(-t*r),requestAnimationFrame(()=>{j(!1),_(!1)});return}_(!1)},W=(o,t)=>{const{offset:y,velocity:I}=t,R=y.x<-S||I.x<-B?1:y.x>S||I.x>B?-1:0;R!==0&&p(H=>{const O=H+R,J=a.length-1;return Math.max(0,Math.min(O,J))})},G=s?{}:{dragConstraints:{left:-r*Math.max(a.length-1,0),right:0}},F=e.length===0?0:s?(d-1+e.length)%e.length:Math.min(d,e.length-1);return i.jsxs("div",{ref:C,className:`${n["carousel-container"]} ${f?n.round:""}`,style:{width:`${l}px`,...f&&{height:`${l}px`,borderRadius:"50%"}},children:[i.jsx(k.div,{className:`${n["carousel-track"]}`,drag:w?!1:"x",...G,style:{width:x,gap:`${T}px`,perspective:1e3,perspectiveOrigin:`${d*r+x/2}px 50%`,x:h},onDragEnd:W,animate:{x:-(d*r)},transition:E,onAnimationStart:P,onAnimationComplete:U,children:a.map((o,t)=>i.jsx(ae,{item:o,index:t,itemWidth:x,round:f,trackItemOffset:r,x:h,transition:E},`${(o==null?void 0:o.id)??t}-${t}`))}),i.jsx("div",{className:`${n["carousel-indicators-container"]} ${f?n.round:""}`,children:i.jsx("div",{className:`${n["carousel-indicators"]}`,children:e.map((o,t)=>i.jsx(k.div,{className:`${n["carousel-indicator"]} ${F===t?n.active:n.inactive}`,animate:{scale:F===t?1.2:1},onClick:()=>p(s?t+1:t),transition:{duration:.15}},t))})})]})}V.__docgenInfo={description:"",methods:[],displayName:"Carousel",props:{items:{defaultValue:{value:`[
1
+ import{r as c,j as i}from"./iframe-Cw8dCV4Z.js";import{G as v}from"./iconBase-nrk1zV8Q.js";import{u as Y}from"./use-motion-value-BVm7csqA.js";import{m as k}from"./proxy-p8L3T_Zy.js";import{u as z}from"./use-transform-CQNghMvr.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-BCa1jVYq.js";function K(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"},child:[]},{tag:"line",attr:{x1:"3",y1:"9",x2:"21",y2:"9"},child:[]},{tag:"line",attr:{x1:"9",y1:"21",x2:"9",y2:"9"},child:[]}]})(e)}function Q(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polygon",attr:{points:"12 2 2 7 12 12 22 7 12 2"},child:[]},{tag:"polyline",attr:{points:"2 17 12 22 22 17"},child:[]},{tag:"polyline",attr:{points:"2 12 12 17 22 12"},child:[]}]})(e)}function X(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"},child:[]},{tag:"polyline",attr:{points:"14 2 14 8 20 8"},child:[]},{tag:"line",attr:{x1:"16",y1:"13",x2:"8",y2:"13"},child:[]},{tag:"line",attr:{x1:"16",y1:"17",x2:"8",y2:"17"},child:[]},{tag:"polyline",attr:{points:"10 9 9 9 8 9"},child:[]}]})(e)}function Z(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"polyline",attr:{points:"16 18 22 12 16 6"},child:[]},{tag:"polyline",attr:{points:"8 6 2 12 8 18"},child:[]}]})(e)}function ee(e){return v({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"12",cy:"12",r:"10"},child:[]}]})(e)}const te="_round_14jni_33",ne="_active_14jni_60",oe="_inactive_14jni_64",n={"carousel-container":"_carousel-container_14jni_1","carousel-track":"_carousel-track_14jni_11","carousel-item":"_carousel-item_14jni_15",round:te,"carousel-item-header":"_carousel-item-header_14jni_47","carousel-indicators-container":"_carousel-indicators-container_14jni_52","carousel-indicator":"_carousel-indicator_14jni_52",active:ne,inactive:oe,"carousel-icon-container":"_carousel-icon-container_14jni_74","carousel-icon":"_carousel-icon_14jni_74","carousel-item-content":"_carousel-item-content_14jni_90","carousel-item-title":"_carousel-item-title_14jni_95","carousel-item-description":"_carousel-item-description_14jni_102","carousel-indicators":"_carousel-indicators_14jni_52"},ie=[{title:"Text Animations",description:"Cool text animations for your projects.",id:1,icon:i.jsx(X,{className:`${n["carousel-icon"]}`})},{title:"Animations",description:"Smooth animations for your projects.",id:2,icon:i.jsx(ee,{className:`${n["carousel-icon"]}`})},{title:"Components",description:"Reusable components for your projects.",id:3,icon:i.jsx(Q,{className:`${n["carousel-icon"]}`})},{title:"Backgrounds",description:"Beautiful backgrounds and patterns for your projects.",id:4,icon:i.jsx(K,{className:`${n["carousel-icon"]}`})},{title:"Common UI",description:"Common UI components are coming soon!",id:5,icon:i.jsx(Z,{className:`${n["carousel-icon"]}`})}],S=0,B=500,T=16,se={type:"spring",stiffness:300,damping:30};function ae({item:e,index:l,itemWidth:g,round:m,trackItemOffset:u,x:s,transition:f}){const N=[-(l+1)*u,-l*u,-(l-1)*u],r=z(s,N,[90,0,-90],{clamp:!1});return i.jsxs(k.div,{className:`${n["carousel-item"]} ${m?n.round:""}`,style:{width:g,height:m?g:"100%",rotateY:r,...m&&{borderRadius:"50%"}},transition:f,children:[i.jsx("div",{className:`${n["carousel-item-header"]} ${m?n.round:""}`,children:i.jsx("span",{className:`${n["carousel-icon-container"]}`,children:e.icon})}),i.jsxs("div",{className:`${n["carousel-item-content"]}`,children:[i.jsx("div",{className:`${n["carousel-item-title"]}`,children:e.title}),i.jsx("p",{className:`${n["carousel-item-description"]}`,children:e.description})]})]},`${(e==null?void 0:e.id)??l}-${l}`)}function V({items:e=ie,baseWidth:l=300,autoplay:g=!1,autoplayDelay:m=3e3,pauseOnHover:u=!1,loop:s=!1,round:f=!1}){const x=l-32,r=x+T,a=c.useMemo(()=>s?e.length===0?[]:[e[e.length-1],...e,e[0]]:e,[e,s]),[d,p]=c.useState(s?1:0),h=Y(0),[L,A]=c.useState(!1),[q,j]=c.useState(!1),[w,_]=c.useState(!1),C=c.useRef(null);c.useEffect(()=>{if(u&&C.current){const o=C.current,t=()=>A(!0),y=()=>A(!1);return o.addEventListener("mouseenter",t),o.addEventListener("mouseleave",y),()=>{o.removeEventListener("mouseenter",t),o.removeEventListener("mouseleave",y)}}},[u]),c.useEffect(()=>{if(!g||a.length<=1||u&&L)return;const o=setInterval(()=>{p(t=>Math.min(t+1,a.length-1))},m);return()=>clearInterval(o)},[g,m,L,u,a.length]),c.useEffect(()=>{const o=s?1:0;p(o),h.set(-o*r)},[e.length,s,r,h]),c.useEffect(()=>{!s&&d>a.length-1&&p(Math.max(0,a.length-1))},[a.length,s,d]);const E=q?{duration:0}:se,P=()=>{_(!0)},U=()=>{if(!s||a.length<=1){_(!1);return}const o=a.length-1;if(d===o){j(!0);const t=1;p(t),h.set(-t*r),requestAnimationFrame(()=>{j(!1),_(!1)});return}if(d===0){j(!0);const t=e.length;p(t),h.set(-t*r),requestAnimationFrame(()=>{j(!1),_(!1)});return}_(!1)},W=(o,t)=>{const{offset:y,velocity:I}=t,R=y.x<-S||I.x<-B?1:y.x>S||I.x>B?-1:0;R!==0&&p(H=>{const O=H+R,J=a.length-1;return Math.max(0,Math.min(O,J))})},G=s?{}:{dragConstraints:{left:-r*Math.max(a.length-1,0),right:0}},F=e.length===0?0:s?(d-1+e.length)%e.length:Math.min(d,e.length-1);return i.jsxs("div",{ref:C,className:`${n["carousel-container"]} ${f?n.round:""}`,style:{width:`${l}px`,...f&&{height:`${l}px`,borderRadius:"50%"}},children:[i.jsx(k.div,{className:`${n["carousel-track"]}`,drag:w?!1:"x",...G,style:{width:x,gap:`${T}px`,perspective:1e3,perspectiveOrigin:`${d*r+x/2}px 50%`,x:h},onDragEnd:W,animate:{x:-(d*r)},transition:E,onAnimationStart:P,onAnimationComplete:U,children:a.map((o,t)=>i.jsx(ae,{item:o,index:t,itemWidth:x,round:f,trackItemOffset:r,x:h,transition:E},`${(o==null?void 0:o.id)??t}-${t}`))}),i.jsx("div",{className:`${n["carousel-indicators-container"]} ${f?n.round:""}`,children:i.jsx("div",{className:`${n["carousel-indicators"]}`,children:e.map((o,t)=>i.jsx(k.div,{className:`${n["carousel-indicator"]} ${F===t?n.active:n.inactive}`,animate:{scale:F===t?1.2:1},onClick:()=>p(s?t+1:t),transition:{duration:.15}},t))})})]})}V.__docgenInfo={description:"",methods:[],displayName:"Carousel",props:{items:{defaultValue:{value:`[
2
2
  {
3
3
  title: 'Text Animations',
4
4
  description: 'Cool text animations for your projects.',
@@ -29,7 +29,7 @@ import{r as c,j as i}from"./iframe-B8pH-Lvr.js";import{G as v}from"./iconBase-Dm
29
29
  id: 5,
30
30
  icon: <FiCode className={\`\${styles['carousel-icon']}\`} />
31
31
  }
32
- ]`,computed:!1},required:!1},baseWidth:{defaultValue:{value:"300",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},loop:{defaultValue:{value:"false",computed:!1},required:!1},round:{defaultValue:{value:"false",computed:!1},required:!1}}};const fe={title:"ReactBits/Components/Carousel",component:V,parameters:{layout:"fullscreen"},tags:["autodocs"]},$={args:{items:[{title:"Text Animations",description:"Cool text animations.",id:1},{title:"Animations",description:"Smooth animations.",id:2},{title:"Components",description:"Reusable components.",id:3},{title:"Backgrounds",description:"Dynamic backgrounds.",id:4}],baseWidth:300,autoplay:!1,autoplayDelay:3e3,pauseOnHover:!1,loop:!1,round:!1}};var M,b,D;$.parameters={...$.parameters,docs:{...(M=$.parameters)==null?void 0:M.docs,source:{originalSource:`{
32
+ ]`,computed:!1},required:!1},baseWidth:{defaultValue:{value:"300",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},loop:{defaultValue:{value:"false",computed:!1},required:!1},round:{defaultValue:{value:"false",computed:!1},required:!1}}};const fe={title:"ReactBits/Components/Carousel",component:V,parameters:{layout:"fullscreen"}},$={args:{items:[{title:"Text Animations",description:"Cool text animations.",id:1},{title:"Animations",description:"Smooth animations.",id:2},{title:"Components",description:"Reusable components.",id:3},{title:"Backgrounds",description:"Dynamic backgrounds.",id:4}],baseWidth:300,autoplay:!1,autoplayDelay:3e3,pauseOnHover:!1,loop:!1,round:!1}};var M,b,D;$.parameters={...$.parameters,docs:{...(M=$.parameters)==null?void 0:M.docs,source:{originalSource:`{
33
33
  args: {
34
34
  items: [{
35
35
  title: 'Text Animations',
@@ -1,4 +1,4 @@
1
- import{r as i,j as a}from"./iframe-B8pH-Lvr.js";import{u as k}from"./useSound-Bk2W5gkV.js";const x="_checkboxLabel_kh8g9_1",f="_checkbox_kh8g9_1",g="_checkboxText_kh8g9_92",c={checkboxLabel:x,checkbox:f,checkboxText:g},C=({checked:o,onChange:r,label:s,disabled:h=!1,indeterminate:n=!1,id:l,name:d,value:b,soundConfig:e})=>{const t=i.useRef(null),{playSound:u}=k(e);return i.useEffect(()=>{t.current&&(t.current.indeterminate=n)},[n]),a.jsxs("label",{className:c.checkboxLabel,children:[a.jsx("input",{ref:t,type:"checkbox",checked:o,onChange:m=>{const p=m.target.checked;r(p),(e==null?void 0:e.onClick)!==!1&&u("toggle")},className:c.checkbox,disabled:h,id:l,name:d,value:b,"aria-checked":n?"mixed":o}),s&&a.jsx("span",{className:c.checkboxText,children:s})]})};C.__docgenInfo={description:`Checkbox component - Modern interactive checkbox with animations
1
+ import{r as i,j as a}from"./iframe-Cw8dCV4Z.js";import{u as k}from"./useSound-D23BsIr4.js";const x="_checkboxLabel_kh8g9_1",f="_checkbox_kh8g9_1",g="_checkboxText_kh8g9_92",c={checkboxLabel:x,checkbox:f,checkboxText:g},C=({checked:o,onChange:r,label:s,disabled:h=!1,indeterminate:n=!1,id:l,name:d,value:b,soundConfig:e})=>{const t=i.useRef(null),{playSound:u}=k(e);return i.useEffect(()=>{t.current&&(t.current.indeterminate=n)},[n]),a.jsxs("label",{className:c.checkboxLabel,children:[a.jsx("input",{ref:t,type:"checkbox",checked:o,onChange:m=>{const p=m.target.checked;r(p),(e==null?void 0:e.onClick)!==!1&&u("toggle")},className:c.checkbox,disabled:h,id:l,name:d,value:b,"aria-checked":n?"mixed":o}),s&&a.jsx("span",{className:c.checkboxText,children:s})]})};C.__docgenInfo={description:`Checkbox component - Modern interactive checkbox with animations
2
2
 
3
3
  @component
4
4
  @description
@@ -0,0 +1,55 @@
1
+ import{r as g,j as t}from"./iframe-Cw8dCV4Z.js";import{C as s}from"./Checkbox-Duyafa-Y.js";import"./preload-helper-C1FmrZbK.js";import"./useSound-D23BsIr4.js";const E={title:"Atoms/Checkbox",component:s,parameters:{layout:"centered",docs:{description:{component:"A simple checkbox component with optional label."}}},tags:["autodocs"],argTypes:{checked:{control:"boolean"},label:{control:"text"},disabled:{control:"boolean"},onChange:{action:"changed"}}},n={args:{checked:!1,label:"Accept terms and conditions",onChange:()=>{}}},c={args:{checked:!1,label:"This option is disabled",disabled:!0,onChange:()=>{}}},i={args:{checked:!1,label:"Multiple checkboxes example",onChange:()=>{}},render:()=>{const[e,a]=g.useState({option1:!1,option2:!0,option3:!1,option4:!1});return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem"},children:[t.jsx(s,{checked:e.option1,onChange:o=>a({...e,option1:o}),label:"Enable notifications"}),t.jsx(s,{checked:e.option2,onChange:o=>a({...e,option2:o}),label:"Receive marketing emails"}),t.jsx(s,{checked:e.option3,onChange:o=>a({...e,option3:o}),label:"Share usage statistics"}),t.jsx(s,{checked:e.option4,onChange:o=>a({...e,option4:o}),label:"Enable dark mode",disabled:!0})]})},parameters:{controls:{disable:!0}}};var l,r,p;n.parameters={...n.parameters,docs:{...(l=n.parameters)==null?void 0:l.docs,source:{originalSource:`{
2
+ args: {
3
+ checked: false,
4
+ label: 'Accept terms and conditions',
5
+ onChange: () => {}
6
+ }
7
+ }`,...(p=(r=n.parameters)==null?void 0:r.docs)==null?void 0:p.source}}};var d,h,b;c.parameters={...c.parameters,docs:{...(d=c.parameters)==null?void 0:d.docs,source:{originalSource:`{
8
+ args: {
9
+ checked: false,
10
+ label: 'This option is disabled',
11
+ disabled: true,
12
+ onChange: () => {}
13
+ }
14
+ }`,...(b=(h=c.parameters)==null?void 0:h.docs)==null?void 0:b.source}}};var m,k,u;i.parameters={...i.parameters,docs:{...(m=i.parameters)==null?void 0:m.docs,source:{originalSource:`{
15
+ args: {
16
+ checked: false,
17
+ label: 'Multiple checkboxes example',
18
+ onChange: () => {}
19
+ },
20
+ render: () => {
21
+ const [options, setOptions] = useState({
22
+ option1: false,
23
+ option2: true,
24
+ option3: false,
25
+ option4: false
26
+ });
27
+ return <div style={{
28
+ display: 'flex',
29
+ flexDirection: 'column',
30
+ gap: '0.5rem'
31
+ }}>
32
+ <Checkbox checked={options.option1} onChange={checked => setOptions({
33
+ ...options,
34
+ option1: checked
35
+ })} label="Enable notifications" />
36
+ <Checkbox checked={options.option2} onChange={checked => setOptions({
37
+ ...options,
38
+ option2: checked
39
+ })} label="Receive marketing emails" />
40
+ <Checkbox checked={options.option3} onChange={checked => setOptions({
41
+ ...options,
42
+ option3: checked
43
+ })} label="Share usage statistics" />
44
+ <Checkbox checked={options.option4} onChange={checked => setOptions({
45
+ ...options,
46
+ option4: checked
47
+ })} label="Enable dark mode" disabled />
48
+ </div>;
49
+ },
50
+ parameters: {
51
+ controls: {
52
+ disable: true
53
+ }
54
+ }
55
+ }`,...(u=(k=i.parameters)==null?void 0:k.docs)==null?void 0:u.source}}};const O=["Default","Disabled","MultipleCheckboxes"];export{n as Default,c as Disabled,i as MultipleCheckboxes,O as __namedExportsOrder,E as default};
@@ -1,4 +1,4 @@
1
- import{r as l,j as a}from"./iframe-B8pH-Lvr.js";import{g as d}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const M="_role_1xucs_102",q="_handle_1xucs_103",t={"chroma-grid":"_chroma-grid_1xucs_1","chroma-card":"_chroma-card_1xucs_36","chroma-img-wrapper":"_chroma-img-wrapper_1xucs_72","chroma-info":"_chroma-info_1xucs_90",role:M,handle:q,"chroma-overlay":"_chroma-overlay_1xucs_107","chroma-fade":"_chroma-fade_1xucs_140"},b=({items:c,className:C="",radius:x=300,columns:y=3,rows:B=2,damping:_=.45,fadeOut:F=.6,ease:k="power3.out"})=>{const m=l.useRef(null),p=l.useRef(null),o=l.useRef(null),s=l.useRef(null),i=l.useRef({x:0,y:0}),E=[{image:"https://i.pravatar.cc/300?img=8",title:"Alex Rivera",subtitle:"Full Stack Developer",handle:"@alexrivera",borderColor:"#4F46E5",gradient:"linear-gradient(145deg, #4F46E5, #000)",url:"https://github.com/"},{image:"https://i.pravatar.cc/300?img=11",title:"Jordan Chen",subtitle:"DevOps Engineer",handle:"@jordanchen",borderColor:"#10B981",gradient:"linear-gradient(210deg, #10B981, #000)",url:"https://linkedin.com/in/"},{image:"https://i.pravatar.cc/300?img=3",title:"Morgan Blake",subtitle:"UI/UX Designer",handle:"@morganblake",borderColor:"#F59E0B",gradient:"linear-gradient(165deg, #F59E0B, #000)",url:"https://dribbble.com/"},{image:"https://i.pravatar.cc/300?img=16",title:"Casey Park",subtitle:"Data Scientist",handle:"@caseypark",borderColor:"#EF4444",gradient:"linear-gradient(195deg, #EF4444, #000)",url:"https://kaggle.com/"},{image:"https://i.pravatar.cc/300?img=25",title:"Sam Kim",subtitle:"Mobile Developer",handle:"@thesamkim",borderColor:"#8B5CF6",gradient:"linear-gradient(225deg, #8B5CF6, #000)",url:"https://github.com/"},{image:"https://i.pravatar.cc/300?img=60",title:"Tyler Rodriguez",subtitle:"Cloud Architect",handle:"@tylerrod",borderColor:"#06B6D4",gradient:"linear-gradient(135deg, #06B6D4, #000)",url:"https://aws.amazon.com/"}],D=c!=null&&c.length?c:E;l.useEffect(()=>{const e=m.current;if(!e)return;o.current=d.quickSetter(e,"--x","px"),s.current=d.quickSetter(e,"--y","px");const{width:r,height:n}=e.getBoundingClientRect();i.current={x:r/2,y:n/2},o.current(i.current.x),s.current(i.current.y)},[]);const w=(e,r)=>{d.to(i.current,{x:e,y:r,duration:_,ease:k,onUpdate:()=>{var n,u;(n=o.current)==null||n.call(o,i.current.x),(u=s.current)==null||u.call(s,i.current.y)},overwrite:!0})},R=e=>{const r=m.current.getBoundingClientRect();w(e.clientX-r.left,e.clientY-r.top),d.to(p.current,{opacity:0,duration:.25,overwrite:!0})},j=()=>{d.to(p.current,{opacity:1,duration:F,overwrite:!0})},S=e=>{e&&window.open(e,"_blank","noopener,noreferrer")},N=e=>{const r=e.currentTarget,n=r.getBoundingClientRect(),u=e.clientX-n.left,$=e.clientY-n.top;r.style.setProperty("--mouse-x",`${u}px`),r.style.setProperty("--mouse-y",`${$}px`)};return a.jsxs("div",{ref:m,className:`${t["chroma-grid"]} ${C}`,style:{"--r":`${x}px`,"--cols":y,"--rows":B},onPointerMove:R,onPointerLeave:j,children:[D.map((e,r)=>a.jsxs("article",{className:`${t["chroma-card"]}`,onMouseMove:N,onClick:()=>S(e.url),style:{"--card-border":e.borderColor||"transparent","--card-gradient":e.gradient,cursor:e.url?"pointer":"default"},children:[a.jsx("div",{className:`${t["chroma-img-wrapper"]}`,children:a.jsx("img",{src:e.image,alt:e.title,loading:"lazy"})}),a.jsxs("footer",{className:`${t["chroma-info"]}`,children:[a.jsx("h3",{className:"name",children:e.title}),e.handle&&a.jsx("span",{className:`${t.handle}`,children:e.handle}),a.jsx("p",{className:`${t.role}`,children:e.subtitle}),e.location&&a.jsx("span",{className:"location",children:e.location})]})]},r)),a.jsx("div",{className:`${t["chroma-overlay"]}`}),a.jsx("div",{ref:p,className:`${t["chroma-fade"]}`})]})};b.__docgenInfo={description:"",methods:[],displayName:"ChromaGrid",props:{className:{defaultValue:{value:"''",computed:!1},required:!1},radius:{defaultValue:{value:"300",computed:!1},required:!1},columns:{defaultValue:{value:"3",computed:!1},required:!1},rows:{defaultValue:{value:"2",computed:!1},required:!1},damping:{defaultValue:{value:"0.45",computed:!1},required:!1},fadeOut:{defaultValue:{value:"0.6",computed:!1},required:!1},ease:{defaultValue:{value:"'power3.out'",computed:!1},required:!1}}};const V={title:"ReactBits/Components/ChromaGrid",component:b,parameters:{layout:"fullscreen"},tags:["autodocs"]},g={args:{items:[{image:"https://i.pravatar.cc/300?img=8",title:"Alex Rivera",subtitle:"Full Stack Developer",handle:"@alexrivera",borderColor:"#4F46E5",gradient:"linear-gradient(145deg, #4F46E5, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=11",title:"Jordan Chen",subtitle:"DevOps Engineer",handle:"@jordanchen",borderColor:"#10B981",gradient:"linear-gradient(210deg, #10B981, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=3",title:"Morgan Blake",subtitle:"UI/UX Designer",handle:"@morganblake",borderColor:"#F59E0B",gradient:"linear-gradient(165deg, #F59E0B, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=16",title:"Casey Park",subtitle:"Data Scientist",handle:"@caseypark",borderColor:"#EF4444",gradient:"linear-gradient(195deg, #EF4444, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=25",title:"Sam Kim",subtitle:"Mobile Developer",handle:"@thesamkim",borderColor:"#8B5CF6",gradient:"linear-gradient(225deg, #8B5CF6, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=60",title:"Tyler Rodriguez",subtitle:"Cloud Architect",handle:"@tylerrod",borderColor:"#06B6D4",gradient:"linear-gradient(135deg, #06B6D4, #000)",url:"#"}],radius:300,columns:3,rows:2,damping:.45,fadeOut:.6,ease:"power3.out"}};var h,v,f;g.parameters={...g.parameters,docs:{...(h=g.parameters)==null?void 0:h.docs,source:{originalSource:`{
1
+ import{r as l,j as a}from"./iframe-Cw8dCV4Z.js";import{g as d}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const M="_role_1xucs_102",q="_handle_1xucs_103",t={"chroma-grid":"_chroma-grid_1xucs_1","chroma-card":"_chroma-card_1xucs_36","chroma-img-wrapper":"_chroma-img-wrapper_1xucs_72","chroma-info":"_chroma-info_1xucs_90",role:M,handle:q,"chroma-overlay":"_chroma-overlay_1xucs_107","chroma-fade":"_chroma-fade_1xucs_140"},b=({items:c,className:C="",radius:x=300,columns:y=3,rows:B=2,damping:_=.45,fadeOut:F=.6,ease:k="power3.out"})=>{const m=l.useRef(null),p=l.useRef(null),o=l.useRef(null),s=l.useRef(null),i=l.useRef({x:0,y:0}),E=[{image:"https://i.pravatar.cc/300?img=8",title:"Alex Rivera",subtitle:"Full Stack Developer",handle:"@alexrivera",borderColor:"#4F46E5",gradient:"linear-gradient(145deg, #4F46E5, #000)",url:"https://github.com/"},{image:"https://i.pravatar.cc/300?img=11",title:"Jordan Chen",subtitle:"DevOps Engineer",handle:"@jordanchen",borderColor:"#10B981",gradient:"linear-gradient(210deg, #10B981, #000)",url:"https://linkedin.com/in/"},{image:"https://i.pravatar.cc/300?img=3",title:"Morgan Blake",subtitle:"UI/UX Designer",handle:"@morganblake",borderColor:"#F59E0B",gradient:"linear-gradient(165deg, #F59E0B, #000)",url:"https://dribbble.com/"},{image:"https://i.pravatar.cc/300?img=16",title:"Casey Park",subtitle:"Data Scientist",handle:"@caseypark",borderColor:"#EF4444",gradient:"linear-gradient(195deg, #EF4444, #000)",url:"https://kaggle.com/"},{image:"https://i.pravatar.cc/300?img=25",title:"Sam Kim",subtitle:"Mobile Developer",handle:"@thesamkim",borderColor:"#8B5CF6",gradient:"linear-gradient(225deg, #8B5CF6, #000)",url:"https://github.com/"},{image:"https://i.pravatar.cc/300?img=60",title:"Tyler Rodriguez",subtitle:"Cloud Architect",handle:"@tylerrod",borderColor:"#06B6D4",gradient:"linear-gradient(135deg, #06B6D4, #000)",url:"https://aws.amazon.com/"}],D=c!=null&&c.length?c:E;l.useEffect(()=>{const e=m.current;if(!e)return;o.current=d.quickSetter(e,"--x","px"),s.current=d.quickSetter(e,"--y","px");const{width:r,height:n}=e.getBoundingClientRect();i.current={x:r/2,y:n/2},o.current(i.current.x),s.current(i.current.y)},[]);const w=(e,r)=>{d.to(i.current,{x:e,y:r,duration:_,ease:k,onUpdate:()=>{var n,u;(n=o.current)==null||n.call(o,i.current.x),(u=s.current)==null||u.call(s,i.current.y)},overwrite:!0})},R=e=>{const r=m.current.getBoundingClientRect();w(e.clientX-r.left,e.clientY-r.top),d.to(p.current,{opacity:0,duration:.25,overwrite:!0})},j=()=>{d.to(p.current,{opacity:1,duration:F,overwrite:!0})},S=e=>{e&&window.open(e,"_blank","noopener,noreferrer")},N=e=>{const r=e.currentTarget,n=r.getBoundingClientRect(),u=e.clientX-n.left,$=e.clientY-n.top;r.style.setProperty("--mouse-x",`${u}px`),r.style.setProperty("--mouse-y",`${$}px`)};return a.jsxs("div",{ref:m,className:`${t["chroma-grid"]} ${C}`,style:{"--r":`${x}px`,"--cols":y,"--rows":B},onPointerMove:R,onPointerLeave:j,children:[D.map((e,r)=>a.jsxs("article",{className:`${t["chroma-card"]}`,onMouseMove:N,onClick:()=>S(e.url),style:{"--card-border":e.borderColor||"transparent","--card-gradient":e.gradient,cursor:e.url?"pointer":"default"},children:[a.jsx("div",{className:`${t["chroma-img-wrapper"]}`,children:a.jsx("img",{src:e.image,alt:e.title,loading:"lazy"})}),a.jsxs("footer",{className:`${t["chroma-info"]}`,children:[a.jsx("h3",{className:"name",children:e.title}),e.handle&&a.jsx("span",{className:`${t.handle}`,children:e.handle}),a.jsx("p",{className:`${t.role}`,children:e.subtitle}),e.location&&a.jsx("span",{className:"location",children:e.location})]})]},r)),a.jsx("div",{className:`${t["chroma-overlay"]}`}),a.jsx("div",{ref:p,className:`${t["chroma-fade"]}`})]})};b.__docgenInfo={description:"",methods:[],displayName:"ChromaGrid",props:{className:{defaultValue:{value:"''",computed:!1},required:!1},radius:{defaultValue:{value:"300",computed:!1},required:!1},columns:{defaultValue:{value:"3",computed:!1},required:!1},rows:{defaultValue:{value:"2",computed:!1},required:!1},damping:{defaultValue:{value:"0.45",computed:!1},required:!1},fadeOut:{defaultValue:{value:"0.6",computed:!1},required:!1},ease:{defaultValue:{value:"'power3.out'",computed:!1},required:!1}}};const V={title:"ReactBits/Components/ChromaGrid",component:b,parameters:{layout:"fullscreen"}},g={args:{items:[{image:"https://i.pravatar.cc/300?img=8",title:"Alex Rivera",subtitle:"Full Stack Developer",handle:"@alexrivera",borderColor:"#4F46E5",gradient:"linear-gradient(145deg, #4F46E5, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=11",title:"Jordan Chen",subtitle:"DevOps Engineer",handle:"@jordanchen",borderColor:"#10B981",gradient:"linear-gradient(210deg, #10B981, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=3",title:"Morgan Blake",subtitle:"UI/UX Designer",handle:"@morganblake",borderColor:"#F59E0B",gradient:"linear-gradient(165deg, #F59E0B, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=16",title:"Casey Park",subtitle:"Data Scientist",handle:"@caseypark",borderColor:"#EF4444",gradient:"linear-gradient(195deg, #EF4444, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=25",title:"Sam Kim",subtitle:"Mobile Developer",handle:"@thesamkim",borderColor:"#8B5CF6",gradient:"linear-gradient(225deg, #8B5CF6, #000)",url:"#"},{image:"https://i.pravatar.cc/300?img=60",title:"Tyler Rodriguez",subtitle:"Cloud Architect",handle:"@tylerrod",borderColor:"#06B6D4",gradient:"linear-gradient(135deg, #06B6D4, #000)",url:"#"}],radius:300,columns:3,rows:2,damping:.45,fadeOut:.6,ease:"power3.out"}};var h,v,f;g.parameters={...g.parameters,docs:{...(h=g.parameters)==null?void 0:h.docs,source:{originalSource:`{
2
2
  args: {
3
3
  items: [{
4
4
  image: 'https://i.pravatar.cc/300?img=8',
@@ -1,4 +1,4 @@
1
- import{r as S,j as A}from"./iframe-B8pH-Lvr.js";import{G as V,R as j,T as _,P as C,M as R}from"./Mesh-CwXV3WjE.js";import{C as G}from"./Camera-BM3HOhP6.js";import{T as D}from"./Texture-BkQWYNP2.js";import"./preload-helper-C1FmrZbK.js";class b extends V{constructor(e,{width:t=1,height:i=1,widthSegments:s=1,heightSegments:n=1,attributes:a={}}={}){const r=s,o=n,h=(r+1)*(o+1),l=r*o*6,m=new Float32Array(h*3),g=new Float32Array(h*3),v=new Float32Array(h*2),w=l>65536?new Uint32Array(l):new Uint16Array(l);b.buildPlane(m,g,v,w,t,i,0,r,o),Object.assign(a,{position:{size:3,data:m},normal:{size:3,data:g},uv:{size:2,data:v},index:{data:w}}),super(e,a)}static buildPlane(e,t,i,s,n,a,r,o,h,l=0,m=1,g=2,v=1,w=-1,d=0,f=0){const x=d,P=n/o,U=a/h;for(let u=0;u<=h;u++){let I=u*U-a/2;for(let p=0;p<=o;p++,d++){let B=p*P-n/2;if(e[d*3+l]=B*v,e[d*3+m]=I*w,e[d*3+g]=r/2,t[d*3+l]=0,t[d*3+m]=0,t[d*3+g]=r>=0?1:-1,i[d*2]=p/o,i[d*2+1]=1-u/h,u===h||p===o)continue;let F=x+p+u*(o+1),M=x+p+(u+1)*(o+1),W=x+p+(u+1)*(o+1)+1,T=x+p+u*(o+1)+1;s[f*6]=F,s[f*6+1]=M,s[f*6+2]=T,s[f*6+3]=M,s[f*6+4]=W,s[f*6+5]=T,f++}}}}const q={"circular-gallery":"_circular-gallery_p9017_1"};function k(c,e){let t;return function(...i){clearTimeout(t),t=setTimeout(()=>c.apply(this,i),e)}}function H(c,e,t){return c+(e-c)*t}function N(c){const e=Object.getPrototypeOf(c);Object.getOwnPropertyNames(e).forEach(t=>{t!=="constructor"&&typeof c[t]=="function"&&(c[t]=c[t].bind(c))})}function X(c,e,t="bold 30px monospace",i="black"){const s=document.createElement("canvas"),n=s.getContext("2d");n.font=t;const a=n.measureText(e),r=Math.ceil(a.width),o=Math.ceil(parseInt(t,10)*1.2);s.width=r+20,s.height=o+20,n.font=t,n.fillStyle=i,n.textBaseline="middle",n.textAlign="center",n.clearRect(0,0,s.width,s.height),n.fillText(e,s.width/2,s.height/2);const h=new D(c,{generateMipmaps:!1});return h.image=s,{texture:h,width:s.width,height:s.height}}class Y{constructor({gl:e,plane:t,renderer:i,text:s,textColor:n="#545050",font:a="30px sans-serif"}){N(this),this.gl=e,this.plane=t,this.renderer=i,this.text=s,this.textColor=n,this.font=a,this.createMesh()}createMesh(){const{texture:e,width:t,height:i}=X(this.gl,this.text,this.font,this.textColor),s=new b(this.gl),n=new C(this.gl,{vertex:`
1
+ import{r as S,j as A}from"./iframe-Cw8dCV4Z.js";import{G as V,R as j,T as _,P as C,M as R}from"./Mesh-CwXV3WjE.js";import{C as G}from"./Camera-BM3HOhP6.js";import{T as D}from"./Texture-BkQWYNP2.js";import"./preload-helper-C1FmrZbK.js";class b extends V{constructor(e,{width:t=1,height:i=1,widthSegments:s=1,heightSegments:n=1,attributes:a={}}={}){const r=s,o=n,h=(r+1)*(o+1),l=r*o*6,m=new Float32Array(h*3),g=new Float32Array(h*3),v=new Float32Array(h*2),w=l>65536?new Uint32Array(l):new Uint16Array(l);b.buildPlane(m,g,v,w,t,i,0,r,o),Object.assign(a,{position:{size:3,data:m},normal:{size:3,data:g},uv:{size:2,data:v},index:{data:w}}),super(e,a)}static buildPlane(e,t,i,s,n,a,r,o,h,l=0,m=1,g=2,v=1,w=-1,d=0,f=0){const x=d,P=n/o,U=a/h;for(let u=0;u<=h;u++){let I=u*U-a/2;for(let p=0;p<=o;p++,d++){let B=p*P-n/2;if(e[d*3+l]=B*v,e[d*3+m]=I*w,e[d*3+g]=r/2,t[d*3+l]=0,t[d*3+m]=0,t[d*3+g]=r>=0?1:-1,i[d*2]=p/o,i[d*2+1]=1-u/h,u===h||p===o)continue;let F=x+p+u*(o+1),M=x+p+(u+1)*(o+1),W=x+p+(u+1)*(o+1)+1,T=x+p+u*(o+1)+1;s[f*6]=F,s[f*6+1]=M,s[f*6+2]=T,s[f*6+3]=M,s[f*6+4]=W,s[f*6+5]=T,f++}}}}const q={"circular-gallery":"_circular-gallery_p9017_1"};function k(c,e){let t;return function(...i){clearTimeout(t),t=setTimeout(()=>c.apply(this,i),e)}}function H(c,e,t){return c+(e-c)*t}function N(c){const e=Object.getPrototypeOf(c);Object.getOwnPropertyNames(e).forEach(t=>{t!=="constructor"&&typeof c[t]=="function"&&(c[t]=c[t].bind(c))})}function X(c,e,t="bold 30px monospace",i="black"){const s=document.createElement("canvas"),n=s.getContext("2d");n.font=t;const a=n.measureText(e),r=Math.ceil(a.width),o=Math.ceil(parseInt(t,10)*1.2);s.width=r+20,s.height=o+20,n.font=t,n.fillStyle=i,n.textBaseline="middle",n.textAlign="center",n.clearRect(0,0,s.width,s.height),n.fillText(e,s.width/2,s.height/2);const h=new D(c,{generateMipmaps:!1});return h.image=s,{texture:h,width:s.width,height:s.height}}class Y{constructor({gl:e,plane:t,renderer:i,text:s,textColor:n="#545050",font:a="30px sans-serif"}){N(this),this.gl=e,this.plane=t,this.renderer=i,this.text=s,this.textColor=n,this.font=a,this.createMesh()}createMesh(){const{texture:e,width:t,height:i}=X(this.gl,this.text,this.font,this.textColor),s=new b(this.gl),n=new C(this.gl,{vertex:`
2
2
  attribute vec3 position;
3
3
  attribute vec2 uv;
4
4
  uniform mat4 modelViewMatrix;
@@ -64,7 +64,7 @@ import{r as S,j as A}from"./iframe-B8pH-Lvr.js";import{G as V,R as j,T as _,P as
64
64
 
65
65
  gl_FragColor = vec4(color.rgb, alpha);
66
66
  }
67
- `,uniforms:{tMap:{value:e},uPlaneSizes:{value:[0,0]},uImageSizes:{value:[0,0]},uSpeed:{value:0},uTime:{value:100*Math.random()},uBorderRadius:{value:this.borderRadius}},transparent:!0});const t=new Image;t.crossOrigin="anonymous",t.src=this.image,t.onload=()=>{e.image=t,this.program.uniforms.uImageSizes.value=[t.naturalWidth,t.naturalHeight]}}createMesh(){this.plane=new R(this.gl,{geometry:this.geometry,program:this.program}),this.plane.setParent(this.scene)}createTitle(){this.title=new Y({gl:this.gl,plane:this.plane,renderer:this.renderer,text:this.text,textColor:this.textColor,fontFamily:this.font})}update(e,t){this.plane.position.x=this.x-e.current-this.extra;const i=this.plane.position.x,s=this.viewport.width/2;if(this.bend===0)this.plane.position.y=0,this.plane.rotation.z=0;else{const r=Math.abs(this.bend),o=(s*s+r*r)/(2*r),h=Math.min(Math.abs(i),s),l=o-Math.sqrt(o*o-h*h);this.bend>0?(this.plane.position.y=-l,this.plane.rotation.z=-Math.sign(i)*Math.asin(h/o)):(this.plane.position.y=l,this.plane.rotation.z=Math.sign(i)*Math.asin(h/o))}this.speed=e.current-e.last,this.program.uniforms.uTime.value+=.04,this.program.uniforms.uSpeed.value=this.speed;const n=this.plane.scale.x/2,a=this.viewport.width/2;this.isBefore=this.plane.position.x+n<-a,this.isAfter=this.plane.position.x-n>a,t==="right"&&this.isBefore&&(this.extra-=this.widthTotal,this.isBefore=this.isAfter=!1),t==="left"&&this.isAfter&&(this.extra+=this.widthTotal,this.isBefore=this.isAfter=!1)}onResize({screen:e,viewport:t}={}){e&&(this.screen=e),t&&(this.viewport=t,this.plane.program.uniforms.uViewportSizes&&(this.plane.program.uniforms.uViewportSizes.value=[this.viewport.width,this.viewport.height])),this.scale=this.screen.height/1500,this.plane.scale.y=this.viewport.height*(900*this.scale)/this.screen.height,this.plane.scale.x=this.viewport.width*(700*this.scale)/this.screen.width,this.plane.program.uniforms.uPlaneSizes.value=[this.plane.scale.x,this.plane.scale.y],this.padding=2,this.width=this.plane.scale.x+this.padding,this.widthTotal=this.width*this.length,this.x=this.width*this.index}}class J{constructor(e,{items:t,bend:i,textColor:s="#ffffff",borderRadius:n=0,font:a="bold 30px Figtree",scrollSpeed:r=2,scrollEase:o=.05}={}){document.documentElement.classList.remove("no-js"),this.container=e,this.scrollSpeed=r,this.scroll={ease:o,current:0,target:0,last:0},this.onCheckDebounce=k(this.onCheck,200),this.createRenderer(),this.createCamera(),this.createScene(),this.onResize(),this.createGeometry(),this.createMedias(t,i,s,n,a),this.update(),this.addEventListeners()}createRenderer(){this.renderer=new j({alpha:!0,antialias:!0,dpr:Math.min(window.devicePixelRatio||1,2)}),this.gl=this.renderer.gl,this.gl.clearColor(0,0,0,0),this.container.appendChild(this.gl.canvas)}createCamera(){this.camera=new G(this.gl),this.camera.fov=45,this.camera.position.z=20}createScene(){this.scene=new _}createGeometry(){this.planeGeometry=new b(this.gl,{heightSegments:50,widthSegments:100})}createMedias(e,t=1,i,s,n){const a=[{image:"https://picsum.photos/seed/1/800/600?grayscale",text:"Bridge"},{image:"https://picsum.photos/seed/2/800/600?grayscale",text:"Desk Setup"},{image:"https://picsum.photos/seed/3/800/600?grayscale",text:"Waterfall"},{image:"https://picsum.photos/seed/4/800/600?grayscale",text:"Strawberries"},{image:"https://picsum.photos/seed/5/800/600?grayscale",text:"Deep Diving"},{image:"https://picsum.photos/seed/16/800/600?grayscale",text:"Train Track"},{image:"https://picsum.photos/seed/17/800/600?grayscale",text:"Santorini"},{image:"https://picsum.photos/seed/8/800/600?grayscale",text:"Blurry Lights"},{image:"https://picsum.photos/seed/9/800/600?grayscale",text:"New York"},{image:"https://picsum.photos/seed/10/800/600?grayscale",text:"Good Boy"},{image:"https://picsum.photos/seed/21/800/600?grayscale",text:"Coastline"},{image:"https://picsum.photos/seed/12/800/600?grayscale",text:"Palm Trees"}],r=e&&e.length?e:a;this.mediasImages=r.concat(r),this.medias=this.mediasImages.map((o,h)=>new $({geometry:this.planeGeometry,gl:this.gl,image:o.image,index:h,length:this.mediasImages.length,renderer:this.renderer,scene:this.scene,screen:this.screen,text:o.text,viewport:this.viewport,bend:t,textColor:i,borderRadius:s,font:n}))}onTouchDown(e){this.isDown=!0,this.scroll.position=this.scroll.current,this.start=e.touches?e.touches[0].clientX:e.clientX}onTouchMove(e){if(!this.isDown)return;const t=e.touches?e.touches[0].clientX:e.clientX,i=(this.start-t)*(this.scrollSpeed*.025);this.scroll.target=this.scroll.position+i}onTouchUp(){this.isDown=!1,this.onCheck()}onWheel(e){const t=e.deltaY||e.wheelDelta||e.detail;this.scroll.target+=(t>0?this.scrollSpeed:-this.scrollSpeed)*.2,this.onCheckDebounce()}onCheck(){if(!this.medias||!this.medias[0])return;const e=this.medias[0].width,t=Math.round(Math.abs(this.scroll.target)/e),i=e*t;this.scroll.target=this.scroll.target<0?-i:i}onResize(){this.screen={width:this.container.clientWidth,height:this.container.clientHeight},this.renderer.setSize(this.screen.width,this.screen.height),this.camera.perspective({aspect:this.screen.width/this.screen.height});const e=this.camera.fov*Math.PI/180,t=2*Math.tan(e/2)*this.camera.position.z,i=t*this.camera.aspect;this.viewport={width:i,height:t},this.medias&&this.medias.forEach(s=>s.onResize({screen:this.screen,viewport:this.viewport}))}update(){this.scroll.current=H(this.scroll.current,this.scroll.target,this.scroll.ease);const e=this.scroll.current>this.scroll.last?"right":"left";this.medias&&this.medias.forEach(t=>t.update(this.scroll,e)),this.renderer.render({scene:this.scene,camera:this.camera}),this.scroll.last=this.scroll.current,this.raf=window.requestAnimationFrame(this.update.bind(this))}addEventListeners(){this.boundOnResize=this.onResize.bind(this),this.boundOnWheel=this.onWheel.bind(this),this.boundOnTouchDown=this.onTouchDown.bind(this),this.boundOnTouchMove=this.onTouchMove.bind(this),this.boundOnTouchUp=this.onTouchUp.bind(this),window.addEventListener("resize",this.boundOnResize),window.addEventListener("mousewheel",this.boundOnWheel),window.addEventListener("wheel",this.boundOnWheel),window.addEventListener("mousedown",this.boundOnTouchDown),window.addEventListener("mousemove",this.boundOnTouchMove),window.addEventListener("mouseup",this.boundOnTouchUp),window.addEventListener("touchstart",this.boundOnTouchDown),window.addEventListener("touchmove",this.boundOnTouchMove),window.addEventListener("touchend",this.boundOnTouchUp)}destroy(){window.cancelAnimationFrame(this.raf),window.removeEventListener("resize",this.boundOnResize),window.removeEventListener("mousewheel",this.boundOnWheel),window.removeEventListener("wheel",this.boundOnWheel),window.removeEventListener("mousedown",this.boundOnTouchDown),window.removeEventListener("mousemove",this.boundOnTouchMove),window.removeEventListener("mouseup",this.boundOnTouchUp),window.removeEventListener("touchstart",this.boundOnTouchDown),window.removeEventListener("touchmove",this.boundOnTouchMove),window.removeEventListener("touchend",this.boundOnTouchUp),this.renderer&&this.renderer.gl&&this.renderer.gl.canvas.parentNode&&this.renderer.gl.canvas.parentNode.removeChild(this.renderer.gl.canvas)}}function L({items:c,bend:e=3,textColor:t="#ffffff",borderRadius:i=.05,font:s="bold 30px Figtree",scrollSpeed:n=2,scrollEase:a=.05}){const r=S.useRef(null);return S.useEffect(()=>{const o=new J(r.current,{items:c,bend:e,textColor:t,borderRadius:i,font:s,scrollSpeed:n,scrollEase:a});return()=>{o.destroy()}},[c,e,t,i,s,n,a]),A.jsx("div",{className:`${q["circular-gallery"]}`,ref:r})}L.__docgenInfo={description:"",methods:[],displayName:"CircularGallery",props:{bend:{defaultValue:{value:"3",computed:!1},required:!1},textColor:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},borderRadius:{defaultValue:{value:"0.05",computed:!1},required:!1},font:{defaultValue:{value:"'bold 30px Figtree'",computed:!1},required:!1},scrollSpeed:{defaultValue:{value:"2",computed:!1},required:!1},scrollEase:{defaultValue:{value:"0.05",computed:!1},required:!1}}};const se={title:"ReactBits/Components/CircularGallery",component:L,parameters:{layout:"fullscreen"},tags:["autodocs"]},y={args:{items:[{image:"https://picsum.photos/seed/1/800/600",text:"Mountains"},{image:"https://picsum.photos/seed/2/800/600",text:"Ocean"},{image:"https://picsum.photos/seed/3/800/600",text:"Forest"},{image:"https://picsum.photos/seed/4/800/600",text:"Desert"},{image:"https://picsum.photos/seed/5/800/600",text:"Cityscape"},{image:"https://picsum.photos/seed/6/800/600",text:"Sunset"}],bend:3,textColor:"#ffffff",borderRadius:.05,font:"bold 30px Figtree",scrollSpeed:2,scrollEase:.05}};var z,O,E;y.parameters={...y.parameters,docs:{...(z=y.parameters)==null?void 0:z.docs,source:{originalSource:`{
67
+ `,uniforms:{tMap:{value:e},uPlaneSizes:{value:[0,0]},uImageSizes:{value:[0,0]},uSpeed:{value:0},uTime:{value:100*Math.random()},uBorderRadius:{value:this.borderRadius}},transparent:!0});const t=new Image;t.crossOrigin="anonymous",t.src=this.image,t.onload=()=>{e.image=t,this.program.uniforms.uImageSizes.value=[t.naturalWidth,t.naturalHeight]}}createMesh(){this.plane=new R(this.gl,{geometry:this.geometry,program:this.program}),this.plane.setParent(this.scene)}createTitle(){this.title=new Y({gl:this.gl,plane:this.plane,renderer:this.renderer,text:this.text,textColor:this.textColor,fontFamily:this.font})}update(e,t){this.plane.position.x=this.x-e.current-this.extra;const i=this.plane.position.x,s=this.viewport.width/2;if(this.bend===0)this.plane.position.y=0,this.plane.rotation.z=0;else{const r=Math.abs(this.bend),o=(s*s+r*r)/(2*r),h=Math.min(Math.abs(i),s),l=o-Math.sqrt(o*o-h*h);this.bend>0?(this.plane.position.y=-l,this.plane.rotation.z=-Math.sign(i)*Math.asin(h/o)):(this.plane.position.y=l,this.plane.rotation.z=Math.sign(i)*Math.asin(h/o))}this.speed=e.current-e.last,this.program.uniforms.uTime.value+=.04,this.program.uniforms.uSpeed.value=this.speed;const n=this.plane.scale.x/2,a=this.viewport.width/2;this.isBefore=this.plane.position.x+n<-a,this.isAfter=this.plane.position.x-n>a,t==="right"&&this.isBefore&&(this.extra-=this.widthTotal,this.isBefore=this.isAfter=!1),t==="left"&&this.isAfter&&(this.extra+=this.widthTotal,this.isBefore=this.isAfter=!1)}onResize({screen:e,viewport:t}={}){e&&(this.screen=e),t&&(this.viewport=t,this.plane.program.uniforms.uViewportSizes&&(this.plane.program.uniforms.uViewportSizes.value=[this.viewport.width,this.viewport.height])),this.scale=this.screen.height/1500,this.plane.scale.y=this.viewport.height*(900*this.scale)/this.screen.height,this.plane.scale.x=this.viewport.width*(700*this.scale)/this.screen.width,this.plane.program.uniforms.uPlaneSizes.value=[this.plane.scale.x,this.plane.scale.y],this.padding=2,this.width=this.plane.scale.x+this.padding,this.widthTotal=this.width*this.length,this.x=this.width*this.index}}class J{constructor(e,{items:t,bend:i,textColor:s="#ffffff",borderRadius:n=0,font:a="bold 30px Figtree",scrollSpeed:r=2,scrollEase:o=.05}={}){document.documentElement.classList.remove("no-js"),this.container=e,this.scrollSpeed=r,this.scroll={ease:o,current:0,target:0,last:0},this.onCheckDebounce=k(this.onCheck,200),this.createRenderer(),this.createCamera(),this.createScene(),this.onResize(),this.createGeometry(),this.createMedias(t,i,s,n,a),this.update(),this.addEventListeners()}createRenderer(){this.renderer=new j({alpha:!0,antialias:!0,dpr:Math.min(window.devicePixelRatio||1,2)}),this.gl=this.renderer.gl,this.gl.clearColor(0,0,0,0),this.container.appendChild(this.gl.canvas)}createCamera(){this.camera=new G(this.gl),this.camera.fov=45,this.camera.position.z=20}createScene(){this.scene=new _}createGeometry(){this.planeGeometry=new b(this.gl,{heightSegments:50,widthSegments:100})}createMedias(e,t=1,i,s,n){const a=[{image:"https://picsum.photos/seed/1/800/600?grayscale",text:"Bridge"},{image:"https://picsum.photos/seed/2/800/600?grayscale",text:"Desk Setup"},{image:"https://picsum.photos/seed/3/800/600?grayscale",text:"Waterfall"},{image:"https://picsum.photos/seed/4/800/600?grayscale",text:"Strawberries"},{image:"https://picsum.photos/seed/5/800/600?grayscale",text:"Deep Diving"},{image:"https://picsum.photos/seed/16/800/600?grayscale",text:"Train Track"},{image:"https://picsum.photos/seed/17/800/600?grayscale",text:"Santorini"},{image:"https://picsum.photos/seed/8/800/600?grayscale",text:"Blurry Lights"},{image:"https://picsum.photos/seed/9/800/600?grayscale",text:"New York"},{image:"https://picsum.photos/seed/10/800/600?grayscale",text:"Good Boy"},{image:"https://picsum.photos/seed/21/800/600?grayscale",text:"Coastline"},{image:"https://picsum.photos/seed/12/800/600?grayscale",text:"Palm Trees"}],r=e&&e.length?e:a;this.mediasImages=r.concat(r),this.medias=this.mediasImages.map((o,h)=>new $({geometry:this.planeGeometry,gl:this.gl,image:o.image,index:h,length:this.mediasImages.length,renderer:this.renderer,scene:this.scene,screen:this.screen,text:o.text,viewport:this.viewport,bend:t,textColor:i,borderRadius:s,font:n}))}onTouchDown(e){this.isDown=!0,this.scroll.position=this.scroll.current,this.start=e.touches?e.touches[0].clientX:e.clientX}onTouchMove(e){if(!this.isDown)return;const t=e.touches?e.touches[0].clientX:e.clientX,i=(this.start-t)*(this.scrollSpeed*.025);this.scroll.target=this.scroll.position+i}onTouchUp(){this.isDown=!1,this.onCheck()}onWheel(e){const t=e.deltaY||e.wheelDelta||e.detail;this.scroll.target+=(t>0?this.scrollSpeed:-this.scrollSpeed)*.2,this.onCheckDebounce()}onCheck(){if(!this.medias||!this.medias[0])return;const e=this.medias[0].width,t=Math.round(Math.abs(this.scroll.target)/e),i=e*t;this.scroll.target=this.scroll.target<0?-i:i}onResize(){this.screen={width:this.container.clientWidth,height:this.container.clientHeight},this.renderer.setSize(this.screen.width,this.screen.height),this.camera.perspective({aspect:this.screen.width/this.screen.height});const e=this.camera.fov*Math.PI/180,t=2*Math.tan(e/2)*this.camera.position.z,i=t*this.camera.aspect;this.viewport={width:i,height:t},this.medias&&this.medias.forEach(s=>s.onResize({screen:this.screen,viewport:this.viewport}))}update(){this.scroll.current=H(this.scroll.current,this.scroll.target,this.scroll.ease);const e=this.scroll.current>this.scroll.last?"right":"left";this.medias&&this.medias.forEach(t=>t.update(this.scroll,e)),this.renderer.render({scene:this.scene,camera:this.camera}),this.scroll.last=this.scroll.current,this.raf=window.requestAnimationFrame(this.update.bind(this))}addEventListeners(){this.boundOnResize=this.onResize.bind(this),this.boundOnWheel=this.onWheel.bind(this),this.boundOnTouchDown=this.onTouchDown.bind(this),this.boundOnTouchMove=this.onTouchMove.bind(this),this.boundOnTouchUp=this.onTouchUp.bind(this),window.addEventListener("resize",this.boundOnResize),window.addEventListener("mousewheel",this.boundOnWheel),window.addEventListener("wheel",this.boundOnWheel),window.addEventListener("mousedown",this.boundOnTouchDown),window.addEventListener("mousemove",this.boundOnTouchMove),window.addEventListener("mouseup",this.boundOnTouchUp),window.addEventListener("touchstart",this.boundOnTouchDown),window.addEventListener("touchmove",this.boundOnTouchMove),window.addEventListener("touchend",this.boundOnTouchUp)}destroy(){window.cancelAnimationFrame(this.raf),window.removeEventListener("resize",this.boundOnResize),window.removeEventListener("mousewheel",this.boundOnWheel),window.removeEventListener("wheel",this.boundOnWheel),window.removeEventListener("mousedown",this.boundOnTouchDown),window.removeEventListener("mousemove",this.boundOnTouchMove),window.removeEventListener("mouseup",this.boundOnTouchUp),window.removeEventListener("touchstart",this.boundOnTouchDown),window.removeEventListener("touchmove",this.boundOnTouchMove),window.removeEventListener("touchend",this.boundOnTouchUp),this.renderer&&this.renderer.gl&&this.renderer.gl.canvas.parentNode&&this.renderer.gl.canvas.parentNode.removeChild(this.renderer.gl.canvas)}}function L({items:c,bend:e=3,textColor:t="#ffffff",borderRadius:i=.05,font:s="bold 30px Figtree",scrollSpeed:n=2,scrollEase:a=.05}){const r=S.useRef(null);return S.useEffect(()=>{const o=new J(r.current,{items:c,bend:e,textColor:t,borderRadius:i,font:s,scrollSpeed:n,scrollEase:a});return()=>{o.destroy()}},[c,e,t,i,s,n,a]),A.jsx("div",{className:`${q["circular-gallery"]}`,ref:r})}L.__docgenInfo={description:"",methods:[],displayName:"CircularGallery",props:{bend:{defaultValue:{value:"3",computed:!1},required:!1},textColor:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},borderRadius:{defaultValue:{value:"0.05",computed:!1},required:!1},font:{defaultValue:{value:"'bold 30px Figtree'",computed:!1},required:!1},scrollSpeed:{defaultValue:{value:"2",computed:!1},required:!1},scrollEase:{defaultValue:{value:"0.05",computed:!1},required:!1}}};const se={title:"ReactBits/Components/CircularGallery",component:L,parameters:{layout:"fullscreen"}},y={args:{items:[{image:"https://picsum.photos/seed/1/800/600",text:"Mountains"},{image:"https://picsum.photos/seed/2/800/600",text:"Ocean"},{image:"https://picsum.photos/seed/3/800/600",text:"Forest"},{image:"https://picsum.photos/seed/4/800/600",text:"Desert"},{image:"https://picsum.photos/seed/5/800/600",text:"Cityscape"},{image:"https://picsum.photos/seed/6/800/600",text:"Sunset"}],bend:3,textColor:"#ffffff",borderRadius:.05,font:"bold 30px Figtree",scrollSpeed:2,scrollEase:.05}};var z,O,E;y.parameters={...y.parameters,docs:{...(z=y.parameters)==null?void 0:z.docs,source:{originalSource:`{
68
68
  args: {
69
69
  items: [{
70
70
  image: 'https://picsum.photos/seed/1/800/600',
@@ -1,4 +1,4 @@
1
- import{r as A,j as g}from"./iframe-B8pH-Lvr.js";import{U as _,u as k}from"./MotionConfigContext-D5hZdVGx.js";import{g as w,s as b,m as U}from"./proxy-BA3VZtN5.js";import{u as H}from"./use-motion-value--XhiA2Gt.js";import"./preload-helper-C1FmrZbK.js";function $(t){t.values.forEach(e=>e.stop())}function f(t,e){[...e].reverse().forEach(c=>{const o=t.getVariant(c);o&&b(t,o),t.variantChildren&&t.variantChildren.forEach(n=>{f(n,e)})})}function j(t,e){if(Array.isArray(e))return f(t,e);if(typeof e=="string")return f(t,[e]);b(t,e)}function I(){const t=new Set,e={subscribe(s){return t.add(s),()=>void t.delete(s)},start(s,c){const o=[];return t.forEach(n=>{o.push(w(n,s,{transitionOverride:c}))}),Promise.all(o)},set(s){return t.forEach(c=>{j(c,s)})},stop(){t.forEach(s=>{$(s)})},mount(){return()=>{e.stop()}}};return e}function M(){const t=_(I);return k(t.mount,[]),t}const q=M,L={"circular-text":"_circular-text_2sef0_1"},N=(t,e,s=!0)=>({from:e,to:e+360,ease:"linear",duration:t,type:"tween",repeat:s?1/0:0}),i=(t,e)=>({rotate:N(t,e),scale:{type:"spring",damping:20,stiffness:300}}),C=({text:t,spinDuration:e=20,onHover:s="speedUp",className:c=""})=>{const o=Array.from(t),n=q(),l=H(0);A.useEffect(()=>{const r=l.get();n.start({rotate:r+360,scale:1,transition:i(e,r)})},[e,t,s,n,l]);const v=()=>{const r=l.get();if(console.log("CircularText mounted with text:",t),!s)return;let a,u=1;switch(s){case"slowDown":a=i(e*2,r);break;case"speedUp":a=i(e/4,r);break;case"pause":a={rotate:{type:"spring",damping:20,stiffness:300},scale:{type:"spring",damping:20,stiffness:300}},u=1;break;case"goBonkers":a=i(e/20,r),u=.8;break;default:a=i(e,r)}n.start({rotate:r+360,scale:u,transition:a})},T=()=>{const r=l.get();n.start({rotate:r+360,scale:1,transition:i(e,r)})};return g.jsx(U.div,{className:`${L["circular-text"]} ${c}`,style:{rotate:l},initial:{rotate:0},animate:n,onMouseEnter:v,onMouseLeave:T,children:o.map((r,a)=>{const u=360/o.length*a,d=Math.PI/o.length,V=d*a,E=d*a,m=`rotateZ(${u}deg) translate3d(${V}px, ${E}px, 0)`;return g.jsx("span",{style:{transform:m,WebkitTransform:m},children:r},a)})})};C.__docgenInfo={description:"",methods:[],displayName:"CircularText",props:{spinDuration:{defaultValue:{value:"20",computed:!1},required:!1},onHover:{defaultValue:{value:"'speedUp'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1}}};const D={title:"ReactBits/TextAnimations/CircularText",component:C,parameters:{layout:"fullscreen"},tags:["autodocs"]},p={args:{text:"Hello World",spinDuration:20,onHover:"speedUp"}};var h,x,y;p.parameters={...p.parameters,docs:{...(h=p.parameters)==null?void 0:h.docs,source:{originalSource:`{
1
+ import{r as A,j as g}from"./iframe-Cw8dCV4Z.js";import{U as _,u as k}from"./MotionConfigContext-BCa1jVYq.js";import{g as w,s as b,m as U}from"./proxy-p8L3T_Zy.js";import{u as H}from"./use-motion-value-BVm7csqA.js";import"./preload-helper-C1FmrZbK.js";function $(t){t.values.forEach(e=>e.stop())}function f(t,e){[...e].reverse().forEach(c=>{const o=t.getVariant(c);o&&b(t,o),t.variantChildren&&t.variantChildren.forEach(n=>{f(n,e)})})}function j(t,e){if(Array.isArray(e))return f(t,e);if(typeof e=="string")return f(t,[e]);b(t,e)}function I(){const t=new Set,e={subscribe(s){return t.add(s),()=>void t.delete(s)},start(s,c){const o=[];return t.forEach(n=>{o.push(w(n,s,{transitionOverride:c}))}),Promise.all(o)},set(s){return t.forEach(c=>{j(c,s)})},stop(){t.forEach(s=>{$(s)})},mount(){return()=>{e.stop()}}};return e}function M(){const t=_(I);return k(t.mount,[]),t}const q=M,L={"circular-text":"_circular-text_2sef0_1"},N=(t,e,s=!0)=>({from:e,to:e+360,ease:"linear",duration:t,type:"tween",repeat:s?1/0:0}),i=(t,e)=>({rotate:N(t,e),scale:{type:"spring",damping:20,stiffness:300}}),C=({text:t,spinDuration:e=20,onHover:s="speedUp",className:c=""})=>{const o=Array.from(t),n=q(),l=H(0);A.useEffect(()=>{const r=l.get();n.start({rotate:r+360,scale:1,transition:i(e,r)})},[e,t,s,n,l]);const v=()=>{const r=l.get();if(console.log("CircularText mounted with text:",t),!s)return;let a,u=1;switch(s){case"slowDown":a=i(e*2,r);break;case"speedUp":a=i(e/4,r);break;case"pause":a={rotate:{type:"spring",damping:20,stiffness:300},scale:{type:"spring",damping:20,stiffness:300}},u=1;break;case"goBonkers":a=i(e/20,r),u=.8;break;default:a=i(e,r)}n.start({rotate:r+360,scale:u,transition:a})},T=()=>{const r=l.get();n.start({rotate:r+360,scale:1,transition:i(e,r)})};return g.jsx(U.div,{className:`${L["circular-text"]} ${c}`,style:{rotate:l},initial:{rotate:0},animate:n,onMouseEnter:v,onMouseLeave:T,children:o.map((r,a)=>{const u=360/o.length*a,d=Math.PI/o.length,V=d*a,E=d*a,m=`rotateZ(${u}deg) translate3d(${V}px, ${E}px, 0)`;return g.jsx("span",{style:{transform:m,WebkitTransform:m},children:r},a)})})};C.__docgenInfo={description:"",methods:[],displayName:"CircularText",props:{spinDuration:{defaultValue:{value:"20",computed:!1},required:!1},onHover:{defaultValue:{value:"'speedUp'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1}}};const D={title:"ReactBits/TextAnimations/CircularText",component:C,parameters:{layout:"fullscreen"}},p={args:{text:"Hello World",spinDuration:20,onHover:"speedUp"}};var h,x,y;p.parameters={...p.parameters,docs:{...(h=p.parameters)==null?void 0:h.docs,source:{originalSource:`{
2
2
  args: {
3
3
  text: 'Hello World',
4
4
  spinDuration: 20,
@@ -1,4 +1,4 @@
1
- import{r as l,j as S}from"./iframe-B8pH-Lvr.js";import"./preload-helper-C1FmrZbK.js";const V=({sparkColor:g="#fff",sparkSize:v=10,sparkRadius:x=15,sparkCount:m=8,duration:p=400,easing:R="ease-out",extraScale:k=1,children:b})=>{const i=l.useRef(null),h=l.useRef([]),C=l.useRef(null);l.useEffect(()=>{const e=i.current;if(!e)return;const t=e.parentElement;if(!t)return;let a;const s=()=>{const{width:r,height:c}=t.getBoundingClientRect();(e.width!==r||e.height!==c)&&(e.width=r,e.height=c)},o=()=>{clearTimeout(a),a=setTimeout(s,100)},n=new ResizeObserver(o);return n.observe(t),s(),()=>{n.disconnect(),clearTimeout(a)}},[]);const w=l.useCallback(e=>{switch(R){case"linear":return e;case"ease-in":return e*e;case"ease-in-out":return e<.5?2*e*e:-1+(4-2*e)*e;default:return e*(2-e)}},[R]);l.useEffect(()=>{const e=i.current;if(!e)return;const t=e.getContext("2d");let a;const s=o=>{C.current||(C.current=o),t.clearRect(0,0,e.width,e.height),h.current=h.current.filter(n=>{const r=o-n.startTime;if(r>=p)return!1;const c=r/p,u=w(c),f=u*x*k,y=v*(1-u),A=n.x+f*Math.cos(n.angle),M=n.y+f*Math.sin(n.angle),_=n.x+(f+y)*Math.cos(n.angle),j=n.y+(f+y)*Math.sin(n.angle);return t.strokeStyle=g,t.lineWidth=2,t.beginPath(),t.moveTo(A,M),t.lineTo(_,j),t.stroke(),!0}),a=requestAnimationFrame(s)};return a=requestAnimationFrame(s),()=>{cancelAnimationFrame(a)}},[g,v,x,m,p,w,k]);const z=e=>{const t=i.current;if(!t)return;const a=t.getBoundingClientRect(),s=e.clientX-a.left,o=e.clientY-a.top,n=performance.now(),r=Array.from({length:m},(c,u)=>({x:s,y:o,angle:2*Math.PI*u/m,startTime:n}));h.current.push(...r)};return S.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},onClick:z,children:[S.jsx("canvas",{ref:i,style:{width:"100%",height:"100%",display:"block",userSelect:"none",position:"absolute",top:0,left:0,pointerEvents:"none"}}),b]})};V.__docgenInfo={description:"",methods:[],displayName:"ClickSpark",props:{sparkColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1},sparkSize:{defaultValue:{value:"10",computed:!1},required:!1},sparkRadius:{defaultValue:{value:"15",computed:!1},required:!1},sparkCount:{defaultValue:{value:"8",computed:!1},required:!1},duration:{defaultValue:{value:"400",computed:!1},required:!1},easing:{defaultValue:{value:"'ease-out'",computed:!1},required:!1},extraScale:{defaultValue:{value:"1.0",computed:!1},required:!1}}};const I={title:"ReactBits/Animations/ClickSpark",component:V,parameters:{layout:"fullscreen"},tags:["autodocs"]},d={args:{sparkColor:"#fff",sparkSize:10,sparkRadius:15,sparkCount:8,duration:400,easing:"ease-out",extraScale:1,children:"Hello World"}};var q,T,E;d.parameters={...d.parameters,docs:{...(q=d.parameters)==null?void 0:q.docs,source:{originalSource:`{
1
+ import{r as l,j as S}from"./iframe-Cw8dCV4Z.js";import"./preload-helper-C1FmrZbK.js";const V=({sparkColor:g="#fff",sparkSize:v=10,sparkRadius:x=15,sparkCount:m=8,duration:p=400,easing:R="ease-out",extraScale:k=1,children:b})=>{const i=l.useRef(null),h=l.useRef([]),C=l.useRef(null);l.useEffect(()=>{const e=i.current;if(!e)return;const t=e.parentElement;if(!t)return;let a;const s=()=>{const{width:r,height:c}=t.getBoundingClientRect();(e.width!==r||e.height!==c)&&(e.width=r,e.height=c)},o=()=>{clearTimeout(a),a=setTimeout(s,100)},n=new ResizeObserver(o);return n.observe(t),s(),()=>{n.disconnect(),clearTimeout(a)}},[]);const w=l.useCallback(e=>{switch(R){case"linear":return e;case"ease-in":return e*e;case"ease-in-out":return e<.5?2*e*e:-1+(4-2*e)*e;default:return e*(2-e)}},[R]);l.useEffect(()=>{const e=i.current;if(!e)return;const t=e.getContext("2d");let a;const s=o=>{C.current||(C.current=o),t.clearRect(0,0,e.width,e.height),h.current=h.current.filter(n=>{const r=o-n.startTime;if(r>=p)return!1;const c=r/p,u=w(c),f=u*x*k,y=v*(1-u),A=n.x+f*Math.cos(n.angle),M=n.y+f*Math.sin(n.angle),_=n.x+(f+y)*Math.cos(n.angle),j=n.y+(f+y)*Math.sin(n.angle);return t.strokeStyle=g,t.lineWidth=2,t.beginPath(),t.moveTo(A,M),t.lineTo(_,j),t.stroke(),!0}),a=requestAnimationFrame(s)};return a=requestAnimationFrame(s),()=>{cancelAnimationFrame(a)}},[g,v,x,m,p,w,k]);const z=e=>{const t=i.current;if(!t)return;const a=t.getBoundingClientRect(),s=e.clientX-a.left,o=e.clientY-a.top,n=performance.now(),r=Array.from({length:m},(c,u)=>({x:s,y:o,angle:2*Math.PI*u/m,startTime:n}));h.current.push(...r)};return S.jsxs("div",{style:{position:"relative",width:"100%",height:"100%"},onClick:z,children:[S.jsx("canvas",{ref:i,style:{width:"100%",height:"100%",display:"block",userSelect:"none",position:"absolute",top:0,left:0,pointerEvents:"none"}}),b]})};V.__docgenInfo={description:"",methods:[],displayName:"ClickSpark",props:{sparkColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1},sparkSize:{defaultValue:{value:"10",computed:!1},required:!1},sparkRadius:{defaultValue:{value:"15",computed:!1},required:!1},sparkCount:{defaultValue:{value:"8",computed:!1},required:!1},duration:{defaultValue:{value:"400",computed:!1},required:!1},easing:{defaultValue:{value:"'ease-out'",computed:!1},required:!1},extraScale:{defaultValue:{value:"1.0",computed:!1},required:!1}}};const I={title:"ReactBits/Animations/ClickSpark",component:V,parameters:{layout:"fullscreen"}},d={args:{sparkColor:"#fff",sparkSize:10,sparkRadius:15,sparkCount:8,duration:400,easing:"ease-out",extraScale:1,children:"Hello World"}};var q,T,E;d.parameters={...d.parameters,docs:{...(q=d.parameters)==null?void 0:q.docs,source:{originalSource:`{
2
2
  args: {
3
3
  sparkColor: '#fff',
4
4
  sparkSize: 10,
@@ -1,4 +1,4 @@
1
- import{r as n,j as K}from"./iframe-B8pH-Lvr.js";import{d as m,S as Q,a as Z,q as ee,e as L,i as re,M as te,W as oe,s as ne,f as ae}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const ue={"color-bends-container":"_color-bends-container_1e02y_1"},q=8,se=`
1
+ import{r as n,j as K}from"./iframe-Cw8dCV4Z.js";import{d as m,S as Q,a as Z,q as ee,e as L,i as re,M as te,W as oe,s as ne,f as ae}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const ue={"color-bends-container":"_color-bends-container_1e02y_1"},q=8,se=`
2
2
  #define MAX_COLORS ${q}
3
3
  uniform vec2 uCanvas;
4
4
  uniform float uTime;
@@ -86,7 +86,7 @@ void main() {
86
86
  vUv = uv;
87
87
  gl_Position = vec4(position, 1.0);
88
88
  }
89
- `;function X({className:D,style:U,rotation:S=45,speed:d=.2,colors:P=[],transparent:c=!0,autoRotate:k=0,scale:p=1,frequency:v=1,warpStrength:g=1,mouseInfluence:h=1,parallax:w=.5,noise:C=.1}){const M=n.useRef(null),B=n.useRef(null),R=n.useRef(null),E=n.useRef(null),F=n.useRef(null),V=n.useRef(S),_=n.useRef(k),b=n.useRef(new m(0,0)),j=n.useRef(new m(0,0)),G=n.useRef(8);return n.useEffect(()=>{const r=M.current,a=new Q,i=new Z(-1,1,1,-1,0,1),u=new ee(2,2),o=Array.from({length:q},()=>new L(0,0,0)),e=new re({vertexShader:le,fragmentShader:se,uniforms:{uCanvas:{value:new m(1,1)},uTime:{value:0},uSpeed:{value:d},uRot:{value:new m(1,0)},uColorCount:{value:0},uColors:{value:o},uTransparent:{value:c?1:0},uScale:{value:p},uFrequency:{value:v},uWarpStrength:{value:g},uPointer:{value:new m(0,0)},uMouseInfluence:{value:h},uParallax:{value:w},uNoise:{value:C}},premultipliedAlpha:!0,transparent:!0});E.current=e;const s=new te(u,e);a.add(s);const t=new oe({antialias:!1,powerPreference:"high-performance",alpha:!0});B.current=t,t.outputColorSpace=ne,t.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),t.setClearColor(0,c?0:1),t.domElement.style.width="100%",t.domElement.style.height="100%",t.domElement.style.display="block",r.appendChild(t.domElement);const O=new ae,y=()=>{const l=r.clientWidth||1,f=r.clientHeight||1;t.setSize(l,f,!1),e.uniforms.uCanvas.value.set(l,f)};if(y(),"ResizeObserver"in window){const l=new ResizeObserver(y);l.observe(r),F.current=l}else window.addEventListener("resize",y);const T=()=>{const l=O.getDelta(),f=O.elapsedTime;e.uniforms.uTime.value=f;const I=(V.current%360+_.current*f)*Math.PI/180,$=Math.cos(I),H=Math.sin(I);e.uniforms.uRot.value.set($,H);const A=j.current,Y=b.current,J=Math.min(1,l*G.current);A.lerp(Y,J),e.uniforms.uPointer.value.copy(A),t.render(a,i),R.current=requestAnimationFrame(T)};return R.current=requestAnimationFrame(T),()=>{R.current!==null&&cancelAnimationFrame(R.current),F.current?F.current.disconnect():window.removeEventListener("resize",y),u.dispose(),e.dispose(),t.dispose(),t.forceContextLoss(),t.domElement&&t.domElement.parentElement===r&&r.removeChild(t.domElement)}},[v,h,C,w,p,d,c,g]),n.useEffect(()=>{const r=E.current,a=B.current;if(!r)return;V.current=S,_.current=k,r.uniforms.uSpeed.value=d,r.uniforms.uScale.value=p,r.uniforms.uFrequency.value=v,r.uniforms.uWarpStrength.value=g,r.uniforms.uMouseInfluence.value=h,r.uniforms.uParallax.value=w,r.uniforms.uNoise.value=C;const i=o=>{const e=o.replace("#","").trim(),s=e.length===3?[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)]:[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)];return new L(s[0]/255,s[1]/255,s[2]/255)},u=(P||[]).filter(Boolean).slice(0,q).map(i);for(let o=0;o<q;o++){const e=r.uniforms.uColors.value[o];o<u.length?e.copy(u[o]):e.set(0,0,0)}r.uniforms.uColorCount.value=u.length,r.uniforms.uTransparent.value=c?1:0,a&&a.setClearColor(0,c?0:1)},[S,k,d,p,v,g,h,w,C,P,c]),n.useEffect(()=>{const r=E.current,a=M.current;if(!r||!a)return;const i=u=>{const o=a.getBoundingClientRect(),e=(u.clientX-o.left)/(o.width||1)*2-1,s=-((u.clientY-o.top)/(o.height||1)*2-1);b.current.set(e,s)};return a.addEventListener("pointermove",i),()=>{a.removeEventListener("pointermove",i)}},[]),K.jsx("div",{ref:M,className:`${ue["color-bends-container"]} ${D}`,style:U})}X.__docgenInfo={description:"",methods:[],displayName:"ColorBends",props:{rotation:{defaultValue:{value:"45",computed:!1},required:!1},speed:{defaultValue:{value:"0.2",computed:!1},required:!1},colors:{defaultValue:{value:"[]",computed:!1},required:!1},transparent:{defaultValue:{value:"true",computed:!1},required:!1},autoRotate:{defaultValue:{value:"0",computed:!1},required:!1},scale:{defaultValue:{value:"1",computed:!1},required:!1},frequency:{defaultValue:{value:"1",computed:!1},required:!1},warpStrength:{defaultValue:{value:"1",computed:!1},required:!1},mouseInfluence:{defaultValue:{value:"1",computed:!1},required:!1},parallax:{defaultValue:{value:"0.5",computed:!1},required:!1},noise:{defaultValue:{value:"0.1",computed:!1},required:!1}}};const de={title:"ReactBits/Backgrounds/ColorBends",component:X,parameters:{layout:"fullscreen"},tags:["autodocs"]},x={args:{rotation:45,speed:.2,colors:[],transparent:!0,autoRotate:0,scale:1,frequency:1,warpStrength:1,mouseInfluence:1,parallax:.5,noise:.1}};var W,N,z;x.parameters={...x.parameters,docs:{...(W=x.parameters)==null?void 0:W.docs,source:{originalSource:`{
89
+ `;function X({className:D,style:U,rotation:S=45,speed:d=.2,colors:P=[],transparent:c=!0,autoRotate:k=0,scale:p=1,frequency:v=1,warpStrength:g=1,mouseInfluence:h=1,parallax:w=.5,noise:C=.1}){const M=n.useRef(null),B=n.useRef(null),R=n.useRef(null),E=n.useRef(null),F=n.useRef(null),V=n.useRef(S),_=n.useRef(k),b=n.useRef(new m(0,0)),j=n.useRef(new m(0,0)),G=n.useRef(8);return n.useEffect(()=>{const r=M.current,a=new Q,i=new Z(-1,1,1,-1,0,1),u=new ee(2,2),o=Array.from({length:q},()=>new L(0,0,0)),e=new re({vertexShader:le,fragmentShader:se,uniforms:{uCanvas:{value:new m(1,1)},uTime:{value:0},uSpeed:{value:d},uRot:{value:new m(1,0)},uColorCount:{value:0},uColors:{value:o},uTransparent:{value:c?1:0},uScale:{value:p},uFrequency:{value:v},uWarpStrength:{value:g},uPointer:{value:new m(0,0)},uMouseInfluence:{value:h},uParallax:{value:w},uNoise:{value:C}},premultipliedAlpha:!0,transparent:!0});E.current=e;const s=new te(u,e);a.add(s);const t=new oe({antialias:!1,powerPreference:"high-performance",alpha:!0});B.current=t,t.outputColorSpace=ne,t.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),t.setClearColor(0,c?0:1),t.domElement.style.width="100%",t.domElement.style.height="100%",t.domElement.style.display="block",r.appendChild(t.domElement);const O=new ae,y=()=>{const l=r.clientWidth||1,f=r.clientHeight||1;t.setSize(l,f,!1),e.uniforms.uCanvas.value.set(l,f)};if(y(),"ResizeObserver"in window){const l=new ResizeObserver(y);l.observe(r),F.current=l}else window.addEventListener("resize",y);const T=()=>{const l=O.getDelta(),f=O.elapsedTime;e.uniforms.uTime.value=f;const I=(V.current%360+_.current*f)*Math.PI/180,$=Math.cos(I),H=Math.sin(I);e.uniforms.uRot.value.set($,H);const A=j.current,Y=b.current,J=Math.min(1,l*G.current);A.lerp(Y,J),e.uniforms.uPointer.value.copy(A),t.render(a,i),R.current=requestAnimationFrame(T)};return R.current=requestAnimationFrame(T),()=>{R.current!==null&&cancelAnimationFrame(R.current),F.current?F.current.disconnect():window.removeEventListener("resize",y),u.dispose(),e.dispose(),t.dispose(),t.forceContextLoss(),t.domElement&&t.domElement.parentElement===r&&r.removeChild(t.domElement)}},[v,h,C,w,p,d,c,g]),n.useEffect(()=>{const r=E.current,a=B.current;if(!r)return;V.current=S,_.current=k,r.uniforms.uSpeed.value=d,r.uniforms.uScale.value=p,r.uniforms.uFrequency.value=v,r.uniforms.uWarpStrength.value=g,r.uniforms.uMouseInfluence.value=h,r.uniforms.uParallax.value=w,r.uniforms.uNoise.value=C;const i=o=>{const e=o.replace("#","").trim(),s=e.length===3?[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)]:[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)];return new L(s[0]/255,s[1]/255,s[2]/255)},u=(P||[]).filter(Boolean).slice(0,q).map(i);for(let o=0;o<q;o++){const e=r.uniforms.uColors.value[o];o<u.length?e.copy(u[o]):e.set(0,0,0)}r.uniforms.uColorCount.value=u.length,r.uniforms.uTransparent.value=c?1:0,a&&a.setClearColor(0,c?0:1)},[S,k,d,p,v,g,h,w,C,P,c]),n.useEffect(()=>{const r=E.current,a=M.current;if(!r||!a)return;const i=u=>{const o=a.getBoundingClientRect(),e=(u.clientX-o.left)/(o.width||1)*2-1,s=-((u.clientY-o.top)/(o.height||1)*2-1);b.current.set(e,s)};return a.addEventListener("pointermove",i),()=>{a.removeEventListener("pointermove",i)}},[]),K.jsx("div",{ref:M,className:`${ue["color-bends-container"]} ${D}`,style:U})}X.__docgenInfo={description:"",methods:[],displayName:"ColorBends",props:{rotation:{defaultValue:{value:"45",computed:!1},required:!1},speed:{defaultValue:{value:"0.2",computed:!1},required:!1},colors:{defaultValue:{value:"[]",computed:!1},required:!1},transparent:{defaultValue:{value:"true",computed:!1},required:!1},autoRotate:{defaultValue:{value:"0",computed:!1},required:!1},scale:{defaultValue:{value:"1",computed:!1},required:!1},frequency:{defaultValue:{value:"1",computed:!1},required:!1},warpStrength:{defaultValue:{value:"1",computed:!1},required:!1},mouseInfluence:{defaultValue:{value:"1",computed:!1},required:!1},parallax:{defaultValue:{value:"0.5",computed:!1},required:!1},noise:{defaultValue:{value:"0.1",computed:!1},required:!1}}};const de={title:"ReactBits/Backgrounds/ColorBends",component:X,parameters:{layout:"fullscreen"}},x={args:{rotation:45,speed:.2,colors:[],transparent:!0,autoRotate:0,scale:1,frequency:1,warpStrength:1,mouseInfluence:1,parallax:.5,noise:.1}};var W,N,z;x.parameters={...x.parameters,docs:{...(W=x.parameters)==null?void 0:W.docs,source:{originalSource:`{
90
90
  args: {
91
91
  rotation: 45,
92
92
  speed: 0.2,
@@ -1,4 +1,4 @@
1
- import{r as n,j as N}from"./iframe-B8pH-Lvr.js";import{u as U}from"./use-motion-value--XhiA2Gt.js";import{u as _}from"./use-spring-CrWzlBMd.js";import{u as j}from"./use-in-view-Zn8evg3J.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-D5hZdVGx.js";import"./use-transform-vyDqMhf-.js";function b({to:s,from:u=0,direction:r="up",delay:p=0,duration:o=2,className:w="",startWhen:V=!0,separator:i="",onStart:d,onEnd:g}){const a=n.useRef(null),x=U(r==="down"?s:u),y=20+40*(1/o),E=100*(1/o),h=_(x,{damping:y,stiffness:E}),q=j(a,{once:!0,margin:"0px"}),v=t=>{const e=t.toString();if(e.includes(".")){const m=e.split(".")[1];if(parseInt(m)!==0)return m.length}return 0},l=Math.max(v(u),v(s)),c=n.useCallback(t=>{const e=l>0,m={useGrouping:!!i,minimumFractionDigits:e?l:0,maximumFractionDigits:e?l:0},D=Intl.NumberFormat("en-US",m).format(t);return i?D.replace(/,/g,i):D},[l,i]);return n.useEffect(()=>{a.current&&(a.current.textContent=c(r==="down"?s:u))},[u,s,r,c]),n.useEffect(()=>{if(q&&V){typeof d=="function"&&d();const t=setTimeout(()=>{x.set(r==="down"?u:s)},p*1e3),e=setTimeout(()=>{typeof g=="function"&&g()},p*1e3+o*1e3);return()=>{clearTimeout(t),clearTimeout(e)}}},[q,V,x,r,u,s,p,d,g,o]),n.useEffect(()=>{const t=h.on("change",e=>{a.current&&(a.current.textContent=c(e))});return()=>t()},[h,c]),N.jsx("span",{className:w,ref:a})}b.__docgenInfo={description:"",methods:[],displayName:"CountUp",props:{from:{defaultValue:{value:"0",computed:!1},required:!1},direction:{defaultValue:{value:"'up'",computed:!1},required:!1},delay:{defaultValue:{value:"0",computed:!1},required:!1},duration:{defaultValue:{value:"2",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},startWhen:{defaultValue:{value:"true",computed:!1},required:!1},separator:{defaultValue:{value:"''",computed:!1},required:!1}}};const B={title:"ReactBits/TextAnimations/CountUp",component:b,parameters:{layout:"fullscreen"},tags:["autodocs"]},f={args:{from:0,to:500,direction:"up",delay:0,duration:2,startWhen:!0,separator:""}};var I,C,T;f.parameters={...f.parameters,docs:{...(I=f.parameters)==null?void 0:I.docs,source:{originalSource:`{
1
+ import{r as n,j as N}from"./iframe-Cw8dCV4Z.js";import{u as U}from"./use-motion-value-BVm7csqA.js";import{u as _}from"./use-spring-BkrdNVnG.js";import{u as j}from"./use-in-view-Dv3LTdsl.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-BCa1jVYq.js";import"./use-transform-CQNghMvr.js";function b({to:u,from:s=0,direction:r="up",delay:p=0,duration:o=2,className:w="",startWhen:V=!0,separator:i="",onStart:d,onEnd:g}){const a=n.useRef(null),x=U(r==="down"?u:s),y=20+40*(1/o),E=100*(1/o),h=_(x,{damping:y,stiffness:E}),q=j(a,{once:!0,margin:"0px"}),v=t=>{const e=t.toString();if(e.includes(".")){const m=e.split(".")[1];if(parseInt(m)!==0)return m.length}return 0},l=Math.max(v(s),v(u)),c=n.useCallback(t=>{const e=l>0,m={useGrouping:!!i,minimumFractionDigits:e?l:0,maximumFractionDigits:e?l:0},D=Intl.NumberFormat("en-US",m).format(t);return i?D.replace(/,/g,i):D},[l,i]);return n.useEffect(()=>{a.current&&(a.current.textContent=c(r==="down"?u:s))},[s,u,r,c]),n.useEffect(()=>{if(q&&V){typeof d=="function"&&d();const t=setTimeout(()=>{x.set(r==="down"?s:u)},p*1e3),e=setTimeout(()=>{typeof g=="function"&&g()},p*1e3+o*1e3);return()=>{clearTimeout(t),clearTimeout(e)}}},[q,V,x,r,s,u,p,d,g,o]),n.useEffect(()=>{const t=h.on("change",e=>{a.current&&(a.current.textContent=c(e))});return()=>t()},[h,c]),N.jsx("span",{className:w,ref:a})}b.__docgenInfo={description:"",methods:[],displayName:"CountUp",props:{from:{defaultValue:{value:"0",computed:!1},required:!1},direction:{defaultValue:{value:"'up'",computed:!1},required:!1},delay:{defaultValue:{value:"0",computed:!1},required:!1},duration:{defaultValue:{value:"2",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},startWhen:{defaultValue:{value:"true",computed:!1},required:!1},separator:{defaultValue:{value:"''",computed:!1},required:!1}}};const B={title:"ReactBits/TextAnimations/CountUp",component:b,parameters:{layout:"fullscreen"}},f={args:{from:0,to:500,direction:"up",delay:0,duration:2,startWhen:!0,separator:""}};var I,C,T;f.parameters={...f.parameters,docs:{...(I=f.parameters)==null?void 0:I.docs,source:{originalSource:`{
2
2
  args: {
3
3
  from: 0,
4
4
  to: 500,
@@ -1,4 +1,4 @@
1
- import{j as r,r as R}from"./iframe-B8pH-Lvr.js";import{u as M}from"./use-spring-CrWzlBMd.js";import{u as k}from"./use-transform-vyDqMhf-.js";import{m as D}from"./proxy-BA3VZtN5.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-D5hZdVGx.js";import"./use-motion-value--XhiA2Gt.js";const l={"counter-container":"_counter-container_1x3ml_1","counter-counter":"_counter-counter_1x3ml_6","counter-digit":"_counter-digit_1x3ml_12","counter-number":"_counter-number_1x3ml_18","gradient-container":"_gradient-container_1x3ml_29","bottom-gradient":"_bottom-gradient_1x3ml_38"};function E({mv:e,number:t,height:a}){let i=k(e,o=>{let s=o%10,n=(10+t-s)%10,d=n*a;return n>5&&(d-=10*a),d});return r.jsx(D.span,{className:`${l["counter-number"]}`,style:{y:i},children:t})}function S(e){const t=Math.round(e),a=1e-9*Math.max(1,Math.abs(e));return Math.abs(e-t)<a?t:e}function T(e,t){const a=e/t;return Math.floor(S(a))}function B({place:e,value:t,height:a,digitStyle:i}){const o=e===".",s=o?0:T(t,e),n=M(s);return R.useEffect(()=>{o||n.set(s)},[n,s,o]),o?r.jsx("span",{className:`${l["counter-digit"]}`,style:{height:a,...i,width:"fit-content"},children:"."}):r.jsx("span",{className:`${l["counter-digit"]}`,style:{height:a,...i},children:Array.from({length:10},(d,f)=>r.jsx(E,{mv:n,number:f,height:a},f))})}function q({value:e,fontSize:t=100,padding:a=0,places:i=[...e.toString()].map((p,c,u)=>p==="."?".":10**(u.indexOf(".")===-1?u.length-c-1:c<u.indexOf(".")?u.indexOf(".")-c-1:-(c-u.indexOf(".")))),gap:o=8,borderRadius:s=4,horizontalPadding:n=8,textColor:d="inherit",fontWeight:f="inherit",containerStyle:N,counterStyle:$,digitStyle:O,gradientHeight:g=16,gradientFrom:x="black",gradientTo:h="transparent",topGradientStyle:_,bottomGradientStyle:v}){const p=t+a,c={fontSize:t,gap:o,borderRadius:s,paddingLeft:n,paddingRight:n,color:d,fontWeight:f},u={height:g,background:`linear-gradient(to bottom, ${x}, ${h})`},C={height:g,background:`linear-gradient(to top, ${x}, ${h})`};return r.jsxs("span",{className:`${l["counter-container"]}`,style:N,children:[r.jsx("span",{className:`${l["counter-counter"]}`,style:{...c,...$},children:i.map(b=>r.jsx(B,{place:b,value:e,height:p,digitStyle:O},b))}),r.jsxs("span",{className:`${l["gradient-container"]}`,children:[r.jsx("span",{className:"top-gradient",style:_||u}),r.jsx("span",{className:`${l["bottom-gradient"]}`,style:v||C})]})]})}q.__docgenInfo={description:"",methods:[],displayName:"Counter",props:{fontSize:{defaultValue:{value:"100",computed:!1},required:!1},padding:{defaultValue:{value:"0",computed:!1},required:!1},places:{defaultValue:{value:`[...value.toString()].map((ch, i, a) => {
1
+ import{j as r,r as R}from"./iframe-Cw8dCV4Z.js";import{u as M}from"./use-spring-BkrdNVnG.js";import{u as k}from"./use-transform-CQNghMvr.js";import{m as D}from"./proxy-p8L3T_Zy.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-BCa1jVYq.js";import"./use-motion-value-BVm7csqA.js";const u={"counter-container":"_counter-container_1x3ml_1","counter-counter":"_counter-counter_1x3ml_6","counter-digit":"_counter-digit_1x3ml_12","counter-number":"_counter-number_1x3ml_18","gradient-container":"_gradient-container_1x3ml_29","bottom-gradient":"_bottom-gradient_1x3ml_38"};function E({mv:e,number:t,height:a}){let i=k(e,o=>{let s=o%10,n=(10+t-s)%10,d=n*a;return n>5&&(d-=10*a),d});return r.jsx(D.span,{className:`${u["counter-number"]}`,style:{y:i},children:t})}function S(e){const t=Math.round(e),a=1e-9*Math.max(1,Math.abs(e));return Math.abs(e-t)<a?t:e}function T(e,t){const a=e/t;return Math.floor(S(a))}function B({place:e,value:t,height:a,digitStyle:i}){const o=e===".",s=o?0:T(t,e),n=M(s);return R.useEffect(()=>{o||n.set(s)},[n,s,o]),o?r.jsx("span",{className:`${u["counter-digit"]}`,style:{height:a,...i,width:"fit-content"},children:"."}):r.jsx("span",{className:`${u["counter-digit"]}`,style:{height:a,...i},children:Array.from({length:10},(d,f)=>r.jsx(E,{mv:n,number:f,height:a},f))})}function q({value:e,fontSize:t=100,padding:a=0,places:i=[...e.toString()].map((p,c,l)=>p==="."?".":10**(l.indexOf(".")===-1?l.length-c-1:c<l.indexOf(".")?l.indexOf(".")-c-1:-(c-l.indexOf(".")))),gap:o=8,borderRadius:s=4,horizontalPadding:n=8,textColor:d="inherit",fontWeight:f="inherit",containerStyle:N,counterStyle:$,digitStyle:O,gradientHeight:g=16,gradientFrom:x="black",gradientTo:h="transparent",topGradientStyle:_,bottomGradientStyle:v}){const p=t+a,c={fontSize:t,gap:o,borderRadius:s,paddingLeft:n,paddingRight:n,color:d,fontWeight:f},l={height:g,background:`linear-gradient(to bottom, ${x}, ${h})`},C={height:g,background:`linear-gradient(to top, ${x}, ${h})`};return r.jsxs("span",{className:`${u["counter-container"]}`,style:N,children:[r.jsx("span",{className:`${u["counter-counter"]}`,style:{...c,...$},children:i.map(b=>r.jsx(B,{place:b,value:e,height:p,digitStyle:O},b))}),r.jsxs("span",{className:`${u["gradient-container"]}`,children:[r.jsx("span",{className:"top-gradient",style:_||l}),r.jsx("span",{className:`${u["bottom-gradient"]}`,style:v||C})]})]})}q.__docgenInfo={description:"",methods:[],displayName:"Counter",props:{fontSize:{defaultValue:{value:"100",computed:!1},required:!1},padding:{defaultValue:{value:"0",computed:!1},required:!1},places:{defaultValue:{value:`[...value.toString()].map((ch, i, a) => {
2
2
  ch == '.';
3
3
  if (ch === '.') {
4
4
  return '.';
@@ -8,7 +8,7 @@ import{j as r,r as R}from"./iframe-B8pH-Lvr.js";import{u as M}from"./use-spring-
8
8
  (a.indexOf('.') === -1 ? a.length - i - 1 : i < a.indexOf('.') ? a.indexOf('.') - i - 1 : -(i - a.indexOf('.')))
9
9
  );
10
10
  }
11
- })`,computed:!0},required:!1},gap:{defaultValue:{value:"8",computed:!1},required:!1},borderRadius:{defaultValue:{value:"4",computed:!1},required:!1},horizontalPadding:{defaultValue:{value:"8",computed:!1},required:!1},textColor:{defaultValue:{value:"'inherit'",computed:!1},required:!1},fontWeight:{defaultValue:{value:"'inherit'",computed:!1},required:!1},gradientHeight:{defaultValue:{value:"16",computed:!1},required:!1},gradientFrom:{defaultValue:{value:"'black'",computed:!1},required:!1},gradientTo:{defaultValue:{value:"'transparent'",computed:!1},required:!1}}};const F={title:"ReactBits/Components/Counter",component:q,parameters:{layout:"fullscreen"},tags:["autodocs"]},m={args:{value:1234}};var V,j,y;m.parameters={...m.parameters,docs:{...(V=m.parameters)==null?void 0:V.docs,source:{originalSource:`{
11
+ })`,computed:!0},required:!1},gap:{defaultValue:{value:"8",computed:!1},required:!1},borderRadius:{defaultValue:{value:"4",computed:!1},required:!1},horizontalPadding:{defaultValue:{value:"8",computed:!1},required:!1},textColor:{defaultValue:{value:"'inherit'",computed:!1},required:!1},fontWeight:{defaultValue:{value:"'inherit'",computed:!1},required:!1},gradientHeight:{defaultValue:{value:"16",computed:!1},required:!1},gradientFrom:{defaultValue:{value:"'black'",computed:!1},required:!1},gradientTo:{defaultValue:{value:"'transparent'",computed:!1},required:!1}}};const F={title:"ReactBits/Components/Counter",component:q,parameters:{layout:"fullscreen"}},m={args:{value:1234}};var V,j,y;m.parameters={...m.parameters,docs:{...(V=m.parameters)==null?void 0:V.docs,source:{originalSource:`{
12
12
  args: {
13
13
  value: 1234
14
14
  }
@@ -1,6 +1,6 @@
1
- import{r as c,j as n}from"./iframe-B8pH-Lvr.js";import{g as i}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const C=(o,e,l)=>(1-l)*o+l*e,M=(o,e)=>{if(e){const l=e.getBoundingClientRect();return{x:o.clientX-l.left,y:o.clientY-l.top}}return{x:o.clientX,y:o.clientY}},A=({color:o="white",containerRef:e=null})=>{const l=c.useRef(null),s=c.useRef(null),u=c.useRef(null),f=c.useRef(null),v=c.useRef(null);let a={x:0,y:0};return c.useEffect(()=>{const h=t=>{if(a=M(t,e==null?void 0:e.current),e!=null&&e.current){const d=e.current.getBoundingClientRect();t.clientX<d.left||t.clientX>d.right||t.clientY<d.top||t.clientY>d.bottom?i.to([s.current,u.current],{opacity:0}):i.to([s.current,u.current],{opacity:1})}},p=(e==null?void 0:e.current)||window;p.addEventListener("mousemove",h);const r={tx:{previous:0,current:0,amt:.15},ty:{previous:0,current:0,amt:.15}};i.set([s.current,u.current],{opacity:0});const y=()=>{r.tx.previous=r.tx.current=a.x,r.ty.previous=r.ty.current=a.y,i.to([s.current,u.current],{duration:.9,ease:"Power3.easeOut",opacity:1}),requestAnimationFrame(j),p.removeEventListener("mousemove",y)};p.addEventListener("mousemove",y);const x={turbulence:0},b=i.timeline({paused:!0,onStart:()=>{s.current.style.filter="url(#filter-noise-x)",u.current.style.filter="url(#filter-noise-y)"},onUpdate:()=>{f.current&&v.current&&(f.current.setAttribute("baseFrequency",x.turbulence),v.current.setAttribute("baseFrequency",x.turbulence))},onComplete:()=>{s.current&&u.current&&(s.current.style.filter=u.current.style.filter="none")}}).to(x,{duration:.5,ease:"power1",startAt:{turbulence:1},turbulence:0}),g=()=>b.restart(),E=()=>b.progress(1).kill(),j=()=>{r.tx.current=a.x,r.ty.current=a.y;for(const t in r)r[t].previous=C(r[t].previous,r[t].current,r[t].amt);s.current&&s.current&&(i.set(u.current,{x:r.tx.previous}),i.set(s.current,{y:r.ty.previous})),requestAnimationFrame(j)},w=e!=null&&e.current?e.current.querySelectorAll("a"):document.querySelectorAll("a");return w.forEach(t=>{t.addEventListener("mouseenter",g),t.addEventListener("mouseleave",E)}),()=>{p.removeEventListener("mousemove",h),p.removeEventListener("mousemove",y),w.forEach(t=>{t.removeEventListener("mouseenter",g),t.removeEventListener("mouseleave",E)})}},[e]),n.jsxs("div",{ref:l,className:"cursor",style:{position:e?"absolute":"fixed",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:1e4},children:[n.jsx("svg",{style:{position:"absolute",left:0,top:0,width:"100%",height:"100%"},children:n.jsxs("defs",{children:[n.jsxs("filter",{id:"filter-noise-x",children:[n.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.000001",numOctaves:"1",ref:f}),n.jsx("feDisplacementMap",{in:"SourceGraphic",scale:"40"})]}),n.jsxs("filter",{id:"filter-noise-y",children:[n.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.000001",numOctaves:"1",ref:v}),n.jsx("feDisplacementMap",{in:"SourceGraphic",scale:"40"})]})]})}),n.jsx("div",{ref:s,style:{position:"absolute",width:"100%",height:"1px",background:o,pointerEvents:"none",transform:"translateY(50%)",opacity:0}}),n.jsx("div",{ref:u,style:{position:"absolute",height:"100%",width:"1px",background:o,pointerEvents:"none",transform:"translateX(50%)",opacity:0}})]})};A.__docgenInfo={description:"",methods:[],displayName:"Crosshair",props:{color:{defaultValue:{value:"'white'",computed:!1},required:!1},containerRef:{defaultValue:{value:"null",computed:!1},required:!1}}};const D={title:"ReactBits/Animations/Crosshair",component:A,parameters:{layout:"fullscreen"},tags:["autodocs"]},m={args:{color:"white",containerRef:null}};var q,L,S;m.parameters={...m.parameters,docs:{...(q=m.parameters)==null?void 0:q.docs,source:{originalSource:`{
1
+ import{r as c,j as n}from"./iframe-Cw8dCV4Z.js";import{g as i}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const C=(o,e,l)=>(1-l)*o+l*e,M=(o,e)=>{if(e){const l=e.getBoundingClientRect();return{x:o.clientX-l.left,y:o.clientY-l.top}}return{x:o.clientX,y:o.clientY}},A=({color:o="white",containerRef:e=null})=>{const l=c.useRef(null),s=c.useRef(null),u=c.useRef(null),f=c.useRef(null),v=c.useRef(null);let a={x:0,y:0};return c.useEffect(()=>{const h=t=>{if(a=M(t,e==null?void 0:e.current),e!=null&&e.current){const m=e.current.getBoundingClientRect();t.clientX<m.left||t.clientX>m.right||t.clientY<m.top||t.clientY>m.bottom?i.to([s.current,u.current],{opacity:0}):i.to([s.current,u.current],{opacity:1})}},p=(e==null?void 0:e.current)||window;p.addEventListener("mousemove",h);const r={tx:{previous:0,current:0,amt:.15},ty:{previous:0,current:0,amt:.15}};i.set([s.current,u.current],{opacity:0});const y=()=>{r.tx.previous=r.tx.current=a.x,r.ty.previous=r.ty.current=a.y,i.to([s.current,u.current],{duration:.9,ease:"Power3.easeOut",opacity:1}),requestAnimationFrame(j),p.removeEventListener("mousemove",y)};p.addEventListener("mousemove",y);const x={turbulence:0},b=i.timeline({paused:!0,onStart:()=>{s.current.style.filter="url(#filter-noise-x)",u.current.style.filter="url(#filter-noise-y)"},onUpdate:()=>{f.current&&v.current&&(f.current.setAttribute("baseFrequency",x.turbulence),v.current.setAttribute("baseFrequency",x.turbulence))},onComplete:()=>{s.current&&u.current&&(s.current.style.filter=u.current.style.filter="none")}}).to(x,{duration:.5,ease:"power1",startAt:{turbulence:1},turbulence:0}),g=()=>b.restart(),E=()=>b.progress(1).kill(),j=()=>{r.tx.current=a.x,r.ty.current=a.y;for(const t in r)r[t].previous=C(r[t].previous,r[t].current,r[t].amt);s.current&&s.current&&(i.set(u.current,{x:r.tx.previous}),i.set(s.current,{y:r.ty.previous})),requestAnimationFrame(j)},w=e!=null&&e.current?e.current.querySelectorAll("a"):document.querySelectorAll("a");return w.forEach(t=>{t.addEventListener("mouseenter",g),t.addEventListener("mouseleave",E)}),()=>{p.removeEventListener("mousemove",h),p.removeEventListener("mousemove",y),w.forEach(t=>{t.removeEventListener("mouseenter",g),t.removeEventListener("mouseleave",E)})}},[e]),n.jsxs("div",{ref:l,className:"cursor",style:{position:e?"absolute":"fixed",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",zIndex:1e4},children:[n.jsx("svg",{style:{position:"absolute",left:0,top:0,width:"100%",height:"100%"},children:n.jsxs("defs",{children:[n.jsxs("filter",{id:"filter-noise-x",children:[n.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.000001",numOctaves:"1",ref:f}),n.jsx("feDisplacementMap",{in:"SourceGraphic",scale:"40"})]}),n.jsxs("filter",{id:"filter-noise-y",children:[n.jsx("feTurbulence",{type:"fractalNoise",baseFrequency:"0.000001",numOctaves:"1",ref:v}),n.jsx("feDisplacementMap",{in:"SourceGraphic",scale:"40"})]})]})}),n.jsx("div",{ref:s,style:{position:"absolute",width:"100%",height:"1px",background:o,pointerEvents:"none",transform:"translateY(50%)",opacity:0}}),n.jsx("div",{ref:u,style:{position:"absolute",height:"100%",width:"1px",background:o,pointerEvents:"none",transform:"translateX(50%)",opacity:0}})]})};A.__docgenInfo={description:"",methods:[],displayName:"Crosshair",props:{color:{defaultValue:{value:"'white'",computed:!1},required:!1},containerRef:{defaultValue:{value:"null",computed:!1},required:!1}}};const D={title:"ReactBits/Animations/Crosshair",component:A,parameters:{layout:"fullscreen"}},d={args:{color:"white",containerRef:null}};var q,L,S;d.parameters={...d.parameters,docs:{...(q=d.parameters)==null?void 0:q.docs,source:{originalSource:`{
2
2
  args: {
3
3
  color: 'white',
4
4
  containerRef: null
5
5
  }
6
- }`,...(S=(L=m.parameters)==null?void 0:L.docs)==null?void 0:S.source}}};const N=["Default"];export{m as Default,N as __namedExportsOrder,D as default};
6
+ }`,...(S=(L=d.parameters)==null?void 0:L.docs)==null?void 0:S.source}}};const N=["Default"];export{d as Default,N as __namedExportsOrder,D as default};
@@ -1 +1 @@
1
- import{r as c,j as l}from"./iframe-B8pH-Lvr.js";import{g as $}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const fe="_cube_lig8l_26",n={"default-animation":"_default-animation_lig8l_9","default-animation--scene":"_default-animation--scene_lig8l_16",cube:fe,"cube-face":"_cube-face_lig8l_43","cube-face--top":"_cube-face--top_lig8l_55","cube-face--bottom":"_cube-face--bottom_lig8l_59","cube-face--left":"_cube-face--left_lig8l_63","cube-face--right":"_cube-face--right_lig8l_67","cube-face--back":"_cube-face--back_lig8l_71","cube-face--front":"_cube-face--front_lig8l_72"},z=({gridSize:t=10,cubeSize:b,maxAngle:H=45,radius:k=3,easing:B="power3.out",duration:W={enter:.3,leave:.6},cellGap:s,borderStyle:ee="1px solid #fff",faceColor:M="#060010",shadow:O=!1,autoAnimate:P=!0,rippleOnClick:I=!0,rippleColor:J="#fff",rippleSpeed:w=2})=>{const u=c.useRef(null),f=c.useRef(null),i=c.useRef(null),v=c.useRef(!1),K=c.useRef({x:0,y:0}),T=c.useRef({x:0,y:0}),E=c.useRef(null),te=typeof s=="number"?`${s}px`:(s==null?void 0:s.col)!==void 0?`${s.col}px`:"5%",ae=typeof s=="number"?`${s}px`:(s==null?void 0:s.row)!==void 0?`${s.row}px`:"5%",Q=W.enter,R=W.leave,h=c.useCallback((e,a)=>{u.current&&u.current.querySelectorAll("[data-cube]").forEach(r=>{const o=+r.dataset.row,d=+r.dataset.col,m=Math.hypot(o-e,d-a);if(m<=k){const q=(1-m/k)*H;$.to(r,{duration:Q,ease:B,overwrite:!0,rotateX:-q,rotateY:q})}else $.to(r,{duration:R,ease:"power3.out",overwrite:!0,rotateX:0,rotateY:0})})},[k,H,Q,R,B]),j=c.useCallback(e=>{v.current=!0,i.current&&clearTimeout(i.current);const a=u.current.getBoundingClientRect(),r=a.width/t,o=a.height/t,d=(e.clientX-a.left)/r,m=(e.clientY-a.top)/o;f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>h(m,d)),i.current=setTimeout(()=>{v.current=!1},3e3)},[t,h]),x=c.useCallback(()=>{u.current&&u.current.querySelectorAll("[data-cube]").forEach(e=>$.to(e,{duration:R,rotateX:0,rotateY:0,ease:"power3.out"}))},[R]),L=c.useCallback(e=>{e.preventDefault(),v.current=!0,i.current&&clearTimeout(i.current);const a=u.current.getBoundingClientRect(),r=a.width/t,o=a.height/t,d=e.touches[0],m=(d.clientX-a.left)/r,C=(d.clientY-a.top)/o;f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>h(C,m)),i.current=setTimeout(()=>{v.current=!1},3e3)},[t,h]),V=c.useCallback(()=>{v.current=!0},[]),N=c.useCallback(()=>{u.current&&x()},[x]),D=c.useCallback(e=>{if(!I||!u.current)return;const a=u.current.getBoundingClientRect(),r=a.width/t,o=a.height/t,d=e.clientX||e.touches&&e.touches[0].clientX,m=e.clientY||e.touches&&e.touches[0].clientY,C=Math.floor((d-a.left)/r),q=Math.floor((m-a.top)/o),oe=.15,ne=.3,ue=.6,se=oe/w,F=ne/w,le=ue/w,y={};u.current.querySelectorAll("[data-cube]").forEach(p=>{const _=+p.dataset.row,A=+p.dataset.col,X=Math.hypot(_-q,A-C),Y=Math.round(X);y[Y]||(y[Y]=[]),y[Y].push(p)}),Object.keys(y).map(Number).sort((p,_)=>p-_).forEach(p=>{const _=p*se,A=y[p].flatMap(X=>Array.from(X.querySelectorAll("[data-cube-face]")));$.to(A,{backgroundColor:J,duration:F,delay:_,ease:"power3.out"}),$.to(A,{backgroundColor:M,duration:F,delay:_+F+le,ease:"power3.out"})})},[I,t,M,J,w]);c.useEffect(()=>{if(!P||!u.current)return;K.current={x:Math.random()*t,y:Math.random()*t},T.current={x:Math.random()*t,y:Math.random()*t};const e=.02,a=()=>{if(!v.current){const r=K.current,o=T.current;r.x+=(o.x-r.x)*e,r.y+=(o.y-r.y)*e,h(r.y,r.x),Math.hypot(r.x-o.x,r.y-o.y)<.1&&(T.current={x:Math.random()*t,y:Math.random()*t})}E.current=requestAnimationFrame(a)};return E.current=requestAnimationFrame(a),()=>{E.current!=null&&cancelAnimationFrame(E.current)}},[P,t,h]),c.useEffect(()=>{const e=u.current;if(e)return e.addEventListener("pointermove",j),e.addEventListener("pointerleave",x),e.addEventListener("click",D),e.addEventListener("touchmove",L,{passive:!1}),e.addEventListener("touchstart",V,{passive:!0}),e.addEventListener("touchend",N,{passive:!0}),()=>{e.removeEventListener("pointermove",j),e.removeEventListener("pointerleave",x),e.removeEventListener("click",D),e.removeEventListener("touchmove",L),e.removeEventListener("touchstart",V),e.removeEventListener("touchend",N),f.current!=null&&cancelAnimationFrame(f.current),i.current&&clearTimeout(i.current)}},[j,x,D,L,V,N]);const U=Array.from({length:t}),re={gridTemplateColumns:b?`repeat(${t}, ${b}px)`:`repeat(${t}, 1fr)`,gridTemplateRows:b?`repeat(${t}, ${b}px)`:`repeat(${t}, 1fr)`,columnGap:te,rowGap:ae},ce={"--cube-face-border":ee,"--cube-face-bg":M,"--cube-face-shadow":O===!0?"0 0 6px rgba(0,0,0,.5)":O||"none",...b?{width:`${t*b}px`,height:`${t*b}px`}:{}};return l.jsx("div",{className:`${n["default-animation"]}`,style:ce,children:l.jsx("div",{ref:u,className:`${n["default-animation--scene"]}`,style:re,children:U.map((e,a)=>U.map((r,o)=>l.jsxs("div",{className:`${n.cube}`,"data-cube":!0,"data-row":a,"data-col":o,children:[l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--top"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--bottom"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--left"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--right"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--front"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--back"]}`,"data-cube-face":!0})]},`${a}-${o}`)))})})};z.__docgenInfo={description:"",methods:[],displayName:"Cubes",props:{gridSize:{defaultValue:{value:"10",computed:!1},required:!1},maxAngle:{defaultValue:{value:"45",computed:!1},required:!1},radius:{defaultValue:{value:"3",computed:!1},required:!1},easing:{defaultValue:{value:"'power3.out'",computed:!1},required:!1},duration:{defaultValue:{value:"{ enter: 0.3, leave: 0.6 }",computed:!1},required:!1},borderStyle:{defaultValue:{value:"'1px solid #fff'",computed:!1},required:!1},faceColor:{defaultValue:{value:"'#060010'",computed:!1},required:!1},shadow:{defaultValue:{value:"false",computed:!1},required:!1},autoAnimate:{defaultValue:{value:"true",computed:!1},required:!1},rippleOnClick:{defaultValue:{value:"true",computed:!1},required:!1},rippleColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1},rippleSpeed:{defaultValue:{value:"2",computed:!1},required:!1}}};const pe={title:"ReactBits/Animations/Cubes",component:z,parameters:{layout:"fullscreen"},tags:["autodocs"]},g={};var Z,G,S;g.parameters={...g.parameters,docs:{...(Z=g.parameters)==null?void 0:Z.docs,source:{originalSource:"{}",...(S=(G=g.parameters)==null?void 0:G.docs)==null?void 0:S.source}}};const be=["Default"];export{g as Default,be as __namedExportsOrder,pe as default};
1
+ import{r as c,j as l}from"./iframe-Cw8dCV4Z.js";import{g as $}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const fe="_cube_lig8l_26",n={"default-animation":"_default-animation_lig8l_9","default-animation--scene":"_default-animation--scene_lig8l_16",cube:fe,"cube-face":"_cube-face_lig8l_43","cube-face--top":"_cube-face--top_lig8l_55","cube-face--bottom":"_cube-face--bottom_lig8l_59","cube-face--left":"_cube-face--left_lig8l_63","cube-face--right":"_cube-face--right_lig8l_67","cube-face--back":"_cube-face--back_lig8l_71","cube-face--front":"_cube-face--front_lig8l_72"},z=({gridSize:t=10,cubeSize:b,maxAngle:H=45,radius:k=3,easing:B="power3.out",duration:W={enter:.3,leave:.6},cellGap:s,borderStyle:ee="1px solid #fff",faceColor:M="#060010",shadow:O=!1,autoAnimate:P=!0,rippleOnClick:I=!0,rippleColor:J="#fff",rippleSpeed:w=2})=>{const u=c.useRef(null),f=c.useRef(null),i=c.useRef(null),v=c.useRef(!1),K=c.useRef({x:0,y:0}),T=c.useRef({x:0,y:0}),E=c.useRef(null),te=typeof s=="number"?`${s}px`:(s==null?void 0:s.col)!==void 0?`${s.col}px`:"5%",ae=typeof s=="number"?`${s}px`:(s==null?void 0:s.row)!==void 0?`${s.row}px`:"5%",Q=W.enter,R=W.leave,h=c.useCallback((e,a)=>{u.current&&u.current.querySelectorAll("[data-cube]").forEach(r=>{const o=+r.dataset.row,d=+r.dataset.col,m=Math.hypot(o-e,d-a);if(m<=k){const q=(1-m/k)*H;$.to(r,{duration:Q,ease:B,overwrite:!0,rotateX:-q,rotateY:q})}else $.to(r,{duration:R,ease:"power3.out",overwrite:!0,rotateX:0,rotateY:0})})},[k,H,Q,R,B]),j=c.useCallback(e=>{v.current=!0,i.current&&clearTimeout(i.current);const a=u.current.getBoundingClientRect(),r=a.width/t,o=a.height/t,d=(e.clientX-a.left)/r,m=(e.clientY-a.top)/o;f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>h(m,d)),i.current=setTimeout(()=>{v.current=!1},3e3)},[t,h]),x=c.useCallback(()=>{u.current&&u.current.querySelectorAll("[data-cube]").forEach(e=>$.to(e,{duration:R,rotateX:0,rotateY:0,ease:"power3.out"}))},[R]),L=c.useCallback(e=>{e.preventDefault(),v.current=!0,i.current&&clearTimeout(i.current);const a=u.current.getBoundingClientRect(),r=a.width/t,o=a.height/t,d=e.touches[0],m=(d.clientX-a.left)/r,C=(d.clientY-a.top)/o;f.current&&cancelAnimationFrame(f.current),f.current=requestAnimationFrame(()=>h(C,m)),i.current=setTimeout(()=>{v.current=!1},3e3)},[t,h]),V=c.useCallback(()=>{v.current=!0},[]),N=c.useCallback(()=>{u.current&&x()},[x]),D=c.useCallback(e=>{if(!I||!u.current)return;const a=u.current.getBoundingClientRect(),r=a.width/t,o=a.height/t,d=e.clientX||e.touches&&e.touches[0].clientX,m=e.clientY||e.touches&&e.touches[0].clientY,C=Math.floor((d-a.left)/r),q=Math.floor((m-a.top)/o),oe=.15,ne=.3,ue=.6,se=oe/w,F=ne/w,le=ue/w,y={};u.current.querySelectorAll("[data-cube]").forEach(p=>{const _=+p.dataset.row,A=+p.dataset.col,X=Math.hypot(_-q,A-C),Y=Math.round(X);y[Y]||(y[Y]=[]),y[Y].push(p)}),Object.keys(y).map(Number).sort((p,_)=>p-_).forEach(p=>{const _=p*se,A=y[p].flatMap(X=>Array.from(X.querySelectorAll("[data-cube-face]")));$.to(A,{backgroundColor:J,duration:F,delay:_,ease:"power3.out"}),$.to(A,{backgroundColor:M,duration:F,delay:_+F+le,ease:"power3.out"})})},[I,t,M,J,w]);c.useEffect(()=>{if(!P||!u.current)return;K.current={x:Math.random()*t,y:Math.random()*t},T.current={x:Math.random()*t,y:Math.random()*t};const e=.02,a=()=>{if(!v.current){const r=K.current,o=T.current;r.x+=(o.x-r.x)*e,r.y+=(o.y-r.y)*e,h(r.y,r.x),Math.hypot(r.x-o.x,r.y-o.y)<.1&&(T.current={x:Math.random()*t,y:Math.random()*t})}E.current=requestAnimationFrame(a)};return E.current=requestAnimationFrame(a),()=>{E.current!=null&&cancelAnimationFrame(E.current)}},[P,t,h]),c.useEffect(()=>{const e=u.current;if(e)return e.addEventListener("pointermove",j),e.addEventListener("pointerleave",x),e.addEventListener("click",D),e.addEventListener("touchmove",L,{passive:!1}),e.addEventListener("touchstart",V,{passive:!0}),e.addEventListener("touchend",N,{passive:!0}),()=>{e.removeEventListener("pointermove",j),e.removeEventListener("pointerleave",x),e.removeEventListener("click",D),e.removeEventListener("touchmove",L),e.removeEventListener("touchstart",V),e.removeEventListener("touchend",N),f.current!=null&&cancelAnimationFrame(f.current),i.current&&clearTimeout(i.current)}},[j,x,D,L,V,N]);const U=Array.from({length:t}),re={gridTemplateColumns:b?`repeat(${t}, ${b}px)`:`repeat(${t}, 1fr)`,gridTemplateRows:b?`repeat(${t}, ${b}px)`:`repeat(${t}, 1fr)`,columnGap:te,rowGap:ae},ce={"--cube-face-border":ee,"--cube-face-bg":M,"--cube-face-shadow":O===!0?"0 0 6px rgba(0,0,0,.5)":O||"none",...b?{width:`${t*b}px`,height:`${t*b}px`}:{}};return l.jsx("div",{className:`${n["default-animation"]}`,style:ce,children:l.jsx("div",{ref:u,className:`${n["default-animation--scene"]}`,style:re,children:U.map((e,a)=>U.map((r,o)=>l.jsxs("div",{className:`${n.cube}`,"data-cube":!0,"data-row":a,"data-col":o,children:[l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--top"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--bottom"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--left"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--right"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--front"]}`,"data-cube-face":!0}),l.jsx("div",{className:`${n["cube-face"]} ${n["cube-face--back"]}`,"data-cube-face":!0})]},`${a}-${o}`)))})})};z.__docgenInfo={description:"",methods:[],displayName:"Cubes",props:{gridSize:{defaultValue:{value:"10",computed:!1},required:!1},maxAngle:{defaultValue:{value:"45",computed:!1},required:!1},radius:{defaultValue:{value:"3",computed:!1},required:!1},easing:{defaultValue:{value:"'power3.out'",computed:!1},required:!1},duration:{defaultValue:{value:"{ enter: 0.3, leave: 0.6 }",computed:!1},required:!1},borderStyle:{defaultValue:{value:"'1px solid #fff'",computed:!1},required:!1},faceColor:{defaultValue:{value:"'#060010'",computed:!1},required:!1},shadow:{defaultValue:{value:"false",computed:!1},required:!1},autoAnimate:{defaultValue:{value:"true",computed:!1},required:!1},rippleOnClick:{defaultValue:{value:"true",computed:!1},required:!1},rippleColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1},rippleSpeed:{defaultValue:{value:"2",computed:!1},required:!1}}};const pe={title:"ReactBits/Animations/Cubes",component:z,parameters:{layout:"fullscreen"}},g={};var Z,G,S;g.parameters={...g.parameters,docs:{...(Z=g.parameters)==null?void 0:Z.docs,source:{originalSource:"{}",...(S=(G=g.parameters)==null?void 0:G.docs)==null?void 0:S.source}}};const be=["Default"];export{g as Default,be as __namedExportsOrder,pe as default};
@@ -1,4 +1,4 @@
1
- import{r as t,j as u}from"./iframe-B8pH-Lvr.js";import"./preload-helper-C1FmrZbK.js";const P={"curved-loop-jacket":"_curved-loop-jacket_1xrkt_1","curved-loop-svg":"_curved-loop-svg_1xrkt_9"},C=({marqueeText:i="",speed:m=2,className:A,curveAmount:E=400,direction:T="left",interactive:f=!0})=>{const l=t.useMemo(()=>(/\s|\u00A0$/.test(i)?i.replace(/\s+$/,""):i)+" ",[i]),v=t.useRef(null),s=t.useRef(null),$=t.useRef(null),[n,k]=t.useState(0),[w,x]=t.useState(0),O=`curve-${t.useId()}`,D=`M-100,40 Q500,${40+E} 1540,40`,a=t.useRef(!1),g=t.useRef(0),j=t.useRef(T),h=t.useRef(0),b=n,F=b?Array(Math.ceil(1800/b)+2).fill(l).join(""):l,d=n>0;t.useEffect(()=>{v.current&&k(v.current.getComputedTextLength())},[l,A]),t.useEffect(()=>{if(n&&s.current){const e=-n;s.current.setAttribute("startOffset",e+"px"),x(e)}},[n]),t.useEffect(()=>{if(!n||!d)return;let e=0;const c=()=>{if(!a.current&&s.current){const _=j.current==="right"?m:-m;let r=parseFloat(s.current.getAttribute("startOffset")||"0")+_;const R=n;r<=-R&&(r+=R),r>0&&(r-=R),s.current.setAttribute("startOffset",r+"px"),x(r)}e=requestAnimationFrame(c)};return e=requestAnimationFrame(c),()=>cancelAnimationFrame(e)},[n,m,d]);const V=e=>{f&&(a.current=!0,g.current=e.clientX,h.current=0,e.target.setPointerCapture(e.pointerId))},B=e=>{if(!f||!a.current||!s.current)return;const c=e.clientX-g.current;g.current=e.clientX,h.current=c;let o=parseFloat(s.current.getAttribute("startOffset")||"0")+c;const r=n;o<=-r&&(o+=r),o>0&&(o-=r),s.current.setAttribute("startOffset",o+"px"),x(o)},y=()=>{f&&(a.current=!1,j.current=h.current>0?"right":"left")},I=f?a.current?"grabbing":"grab":"auto";return u.jsx("div",{className:`${P["curved-loop-jacket"]}`,style:{visibility:d?"visible":"hidden",cursor:I},onPointerDown:V,onPointerMove:B,onPointerUp:y,onPointerLeave:y,children:u.jsxs("svg",{className:`${P["curved-loop-svg"]}`,viewBox:"0 0 1440 120",children:[u.jsx("text",{ref:v,xmlSpace:"preserve",style:{visibility:"hidden",opacity:0,pointerEvents:"none"},children:l}),u.jsx("defs",{children:u.jsx("path",{ref:$,id:O,d:D,fill:"none",stroke:"transparent"})}),d&&u.jsx("text",{fontWeight:"bold",xmlSpace:"preserve",className:A,children:u.jsx("textPath",{ref:s,href:`#${O}`,startOffset:w+"px",xmlSpace:"preserve",children:F})})]})})};C.__docgenInfo={description:"",methods:[],displayName:"CurvedLoop",props:{marqueeText:{defaultValue:{value:"''",computed:!1},required:!1},speed:{defaultValue:{value:"2",computed:!1},required:!1},curveAmount:{defaultValue:{value:"400",computed:!1},required:!1},direction:{defaultValue:{value:"'left'",computed:!1},required:!1},interactive:{defaultValue:{value:"true",computed:!1},required:!1}}};const Q={title:"ReactBits/TextAnimations/CurvedLoop",component:C,parameters:{layout:"fullscreen"},tags:["autodocs"]},p={args:{marqueeText:"React Bits - Curved Loop Text Animation - ",speed:2,curveAmount:400,direction:"left",interactive:!0}};var L,S,q;p.parameters={...p.parameters,docs:{...(L=p.parameters)==null?void 0:L.docs,source:{originalSource:`{
1
+ import{r as t,j as u}from"./iframe-Cw8dCV4Z.js";import"./preload-helper-C1FmrZbK.js";const P={"curved-loop-jacket":"_curved-loop-jacket_1xrkt_1","curved-loop-svg":"_curved-loop-svg_1xrkt_9"},C=({marqueeText:i="",speed:m=2,className:A,curveAmount:E=400,direction:T="left",interactive:f=!0})=>{const l=t.useMemo(()=>(/\s|\u00A0$/.test(i)?i.replace(/\s+$/,""):i)+" ",[i]),v=t.useRef(null),s=t.useRef(null),$=t.useRef(null),[n,k]=t.useState(0),[w,x]=t.useState(0),O=`curve-${t.useId()}`,D=`M-100,40 Q500,${40+E} 1540,40`,c=t.useRef(!1),g=t.useRef(0),j=t.useRef(T),h=t.useRef(0),b=n,F=b?Array(Math.ceil(1800/b)+2).fill(l).join(""):l,d=n>0;t.useEffect(()=>{v.current&&k(v.current.getComputedTextLength())},[l,A]),t.useEffect(()=>{if(n&&s.current){const e=-n;s.current.setAttribute("startOffset",e+"px"),x(e)}},[n]),t.useEffect(()=>{if(!n||!d)return;let e=0;const a=()=>{if(!c.current&&s.current){const _=j.current==="right"?m:-m;let r=parseFloat(s.current.getAttribute("startOffset")||"0")+_;const R=n;r<=-R&&(r+=R),r>0&&(r-=R),s.current.setAttribute("startOffset",r+"px"),x(r)}e=requestAnimationFrame(a)};return e=requestAnimationFrame(a),()=>cancelAnimationFrame(e)},[n,m,d]);const V=e=>{f&&(c.current=!0,g.current=e.clientX,h.current=0,e.target.setPointerCapture(e.pointerId))},B=e=>{if(!f||!c.current||!s.current)return;const a=e.clientX-g.current;g.current=e.clientX,h.current=a;let o=parseFloat(s.current.getAttribute("startOffset")||"0")+a;const r=n;o<=-r&&(o+=r),o>0&&(o-=r),s.current.setAttribute("startOffset",o+"px"),x(o)},y=()=>{f&&(c.current=!1,j.current=h.current>0?"right":"left")},I=f?c.current?"grabbing":"grab":"auto";return u.jsx("div",{className:`${P["curved-loop-jacket"]}`,style:{visibility:d?"visible":"hidden",cursor:I},onPointerDown:V,onPointerMove:B,onPointerUp:y,onPointerLeave:y,children:u.jsxs("svg",{className:`${P["curved-loop-svg"]}`,viewBox:"0 0 1440 120",children:[u.jsx("text",{ref:v,xmlSpace:"preserve",style:{visibility:"hidden",opacity:0,pointerEvents:"none"},children:l}),u.jsx("defs",{children:u.jsx("path",{ref:$,id:O,d:D,fill:"none",stroke:"transparent"})}),d&&u.jsx("text",{fontWeight:"bold",xmlSpace:"preserve",className:A,children:u.jsx("textPath",{ref:s,href:`#${O}`,startOffset:w+"px",xmlSpace:"preserve",children:F})})]})})};C.__docgenInfo={description:"",methods:[],displayName:"CurvedLoop",props:{marqueeText:{defaultValue:{value:"''",computed:!1},required:!1},speed:{defaultValue:{value:"2",computed:!1},required:!1},curveAmount:{defaultValue:{value:"400",computed:!1},required:!1},direction:{defaultValue:{value:"'left'",computed:!1},required:!1},interactive:{defaultValue:{value:"true",computed:!1},required:!1}}};const Q={title:"ReactBits/TextAnimations/CurvedLoop",component:C,parameters:{layout:"fullscreen"}},p={args:{marqueeText:"React Bits - Curved Loop Text Animation - ",speed:2,curveAmount:400,direction:"left",interactive:!0}};var L,S,q;p.parameters={...p.parameters,docs:{...(L=p.parameters)==null?void 0:L.docs,source:{originalSource:`{
2
2
  args: {
3
3
  marqueeText: 'React Bits - Curved Loop Text Animation - ',
4
4
  speed: 2,
@@ -1,4 +1,4 @@
1
- import{r as q,j as V}from"./iframe-B8pH-Lvr.js";import{R as F,P as C,M as E}from"./Mesh-CwXV3WjE.js";import{T as k}from"./Triangle-64ffRKNB.js";import{V as z}from"./Vec2-Cf1C3GIc.js";import"./preload-helper-C1FmrZbK.js";const N={"darkveil-canvas":"_darkveil-canvas_1jcqg_1"},D=`
1
+ import{r as q,j as V}from"./iframe-Cw8dCV4Z.js";import{R as F,P as C,M as E}from"./Mesh-CwXV3WjE.js";import{T as k}from"./Triangle-64ffRKNB.js";import{V as z}from"./Vec2-Cf1C3GIc.js";import"./preload-helper-C1FmrZbK.js";const N={"darkveil-canvas":"_darkveil-canvas_1jcqg_1"},D=`
2
2
  attribute vec2 position;
3
3
  void main(){gl_Position=vec4(position,0.0,1.0);}
4
4
  `,H=`
@@ -66,7 +66,7 @@ void main(){
66
66
  col.rgb+=(rand(gl_FragCoord.xy+uTime)-0.5)*uNoise;
67
67
  gl_FragColor=vec4(clamp(col.rgb,0.0,1.0),1.0);
68
68
  }
69
- `;function _({hueShift:a=0,noiseIntensity:v=0,scanlineIntensity:u=0,speed:s=.5,scanlineFrequency:o=0,warpAmount:t=0,resolutionScale:i=1}){const l=q.useRef(null);return q.useEffect(()=>{const m=l.current,d=m.parentElement,n=new F({dpr:Math.min(window.devicePixelRatio,2),canvas:m}),r=n.gl,w=new k(r),e=new C(r,{vertex:D,fragment:H,uniforms:{uTime:{value:0},uResolution:{value:new z},uHueShift:{value:a},uNoise:{value:v},uScan:{value:u},uScanFreq:{value:o},uWarp:{value:t}}}),R=new E(r,{geometry:w,program:e}),f=()=>{const p=d.clientWidth,y=d.clientHeight;n.setSize(p*i,y*i),e.uniforms.uResolution.value.set(p,y)};window.addEventListener("resize",f),f();const T=performance.now();let b=0;const g=()=>{e.uniforms.uTime.value=(performance.now()-T)/1e3*s,e.uniforms.uHueShift.value=a,e.uniforms.uNoise.value=v,e.uniforms.uScan.value=u,e.uniforms.uScanFreq.value=o,e.uniforms.uWarp.value=t,n.render({scene:R}),b=requestAnimationFrame(g)};return g(),()=>{cancelAnimationFrame(b),window.removeEventListener("resize",f)}},[a,v,u,s,o,t,i]),V.jsx("canvas",{ref:l,className:`${N["darkveil-canvas"]}`})}_.__docgenInfo={description:"",methods:[],displayName:"DarkVeil",props:{hueShift:{defaultValue:{value:"0",computed:!1},required:!1},noiseIntensity:{defaultValue:{value:"0",computed:!1},required:!1},scanlineIntensity:{defaultValue:{value:"0",computed:!1},required:!1},speed:{defaultValue:{value:"0.5",computed:!1},required:!1},scanlineFrequency:{defaultValue:{value:"0",computed:!1},required:!1},warpAmount:{defaultValue:{value:"0",computed:!1},required:!1},resolutionScale:{defaultValue:{value:"1",computed:!1},required:!1}}};const A={title:"ReactBits/Backgrounds/DarkVeil",component:_,parameters:{layout:"fullscreen"},tags:["autodocs"]},c={args:{hueShift:0,noiseIntensity:0,scanlineIntensity:0,speed:.5,scanlineFrequency:0,warpAmount:0,resolutionScale:1}};var h,S,x;c.parameters={...c.parameters,docs:{...(h=c.parameters)==null?void 0:h.docs,source:{originalSource:`{
69
+ `;function _({hueShift:a=0,noiseIntensity:v=0,scanlineIntensity:u=0,speed:s=.5,scanlineFrequency:o=0,warpAmount:t=0,resolutionScale:i=1}){const l=q.useRef(null);return q.useEffect(()=>{const m=l.current,d=m.parentElement,n=new F({dpr:Math.min(window.devicePixelRatio,2),canvas:m}),r=n.gl,w=new k(r),e=new C(r,{vertex:D,fragment:H,uniforms:{uTime:{value:0},uResolution:{value:new z},uHueShift:{value:a},uNoise:{value:v},uScan:{value:u},uScanFreq:{value:o},uWarp:{value:t}}}),R=new E(r,{geometry:w,program:e}),f=()=>{const g=d.clientWidth,y=d.clientHeight;n.setSize(g*i,y*i),e.uniforms.uResolution.value.set(g,y)};window.addEventListener("resize",f),f();const T=performance.now();let b=0;const p=()=>{e.uniforms.uTime.value=(performance.now()-T)/1e3*s,e.uniforms.uHueShift.value=a,e.uniforms.uNoise.value=v,e.uniforms.uScan.value=u,e.uniforms.uScanFreq.value=o,e.uniforms.uWarp.value=t,n.render({scene:R}),b=requestAnimationFrame(p)};return p(),()=>{cancelAnimationFrame(b),window.removeEventListener("resize",f)}},[a,v,u,s,o,t,i]),V.jsx("canvas",{ref:l,className:`${N["darkveil-canvas"]}`})}_.__docgenInfo={description:"",methods:[],displayName:"DarkVeil",props:{hueShift:{defaultValue:{value:"0",computed:!1},required:!1},noiseIntensity:{defaultValue:{value:"0",computed:!1},required:!1},scanlineIntensity:{defaultValue:{value:"0",computed:!1},required:!1},speed:{defaultValue:{value:"0.5",computed:!1},required:!1},scanlineFrequency:{defaultValue:{value:"0",computed:!1},required:!1},warpAmount:{defaultValue:{value:"0",computed:!1},required:!1},resolutionScale:{defaultValue:{value:"1",computed:!1},required:!1}}};const A={title:"ReactBits/Backgrounds/DarkVeil",component:_,parameters:{layout:"fullscreen"}},c={args:{hueShift:0,noiseIntensity:0,scanlineIntensity:0,speed:.5,scanlineFrequency:0,warpAmount:0,resolutionScale:1}};var h,S,x;c.parameters={...c.parameters,docs:{...(h=c.parameters)==null?void 0:h.docs,source:{originalSource:`{
70
70
  args: {
71
71
  hueShift: 0,
72
72
  noiseIntensity: 0,