@stfrigerio/sito-template 0.1.57 → 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 (297) 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 +21 -1
  38. package/dist/components/organisms/Calendar/Calendar.d.ts.map +1 -1
  39. package/dist/components/organisms/Calendar/Calendar.stories.d.ts +1 -1
  40. package/dist/components/organisms/Calendar/Calendar.stories.d.ts.map +1 -1
  41. package/dist/components/organisms/Calendar/DayEventCard.d.ts +1 -1
  42. package/dist/components/organisms/Calendar/DayEventCard.d.ts.map +1 -1
  43. package/dist/components/organisms/ImageSlideshow/ImageSlideshow.stories.d.ts +0 -23
  44. package/dist/components/organisms/ImageSlideshow/ImageSlideshow.stories.d.ts.map +1 -1
  45. package/dist/components/organisms/Navbar/Navbar.d.ts +1 -0
  46. package/dist/components/organisms/Navbar/Navbar.d.ts.map +1 -1
  47. package/dist/components/organisms/Navbar/Navbar.stories.d.ts +1 -7
  48. package/dist/components/organisms/Navbar/Navbar.stories.d.ts.map +1 -1
  49. package/dist/components/organisms/charts/BooleansHeatmap/BooleansHeatmap.stories.d.ts +1 -4
  50. package/dist/components/organisms/charts/BooleansHeatmap/BooleansHeatmap.stories.d.ts.map +1 -1
  51. package/dist/components/organisms/charts/PieChart/PieChart.stories.d.ts +1 -5
  52. package/dist/components/organisms/charts/PieChart/PieChart.stories.d.ts.map +1 -1
  53. package/dist/index.esm.js +148 -60
  54. package/dist/index.esm.js.map +1 -1
  55. package/dist/index.js +147 -59
  56. package/dist/index.js.map +1 -1
  57. package/dist/stories/utils.d.ts.map +1 -1
  58. package/dist/styles.css +1 -1
  59. package/dist/styles.css.map +1 -1
  60. package/dist/themes/dao.css +16 -1
  61. package/dist/themes/globals.css +2 -5
  62. package/package.json +1 -1
  63. package/storybook-static/assets/{ASCIIText.stories-LbmvFzzv.js → ASCIIText.stories-CsG3yKr5.js} +4 -4
  64. package/storybook-static/assets/{AllAtoms.stories-CLunFOjI.js → AllAtoms.stories-D2Pzz8c7.js} +1 -1
  65. package/storybook-static/assets/{AnimatedContent.stories-B8hBaVkK.js → AnimatedContent.stories-BP9feFGz.js} +1 -1
  66. package/storybook-static/assets/{AnimatedList.stories-D8a9eYqH.js → AnimatedList.stories-DQ8jdk44.js} +2 -2
  67. package/storybook-static/assets/{Antigravity.stories-D_mJbWK0.js → Antigravity.stories-BTIHyYKU.js} +1 -1
  68. package/storybook-static/assets/ArrayInput.stories-d5_OJJMu.js +138 -0
  69. package/storybook-static/assets/{Aurora.stories-BN4MataE.js → Aurora.stories-D_eQNPaB.js} +2 -2
  70. package/storybook-static/assets/{Beams.stories-CCtZOw8G.js → Beams.stories-VLKuYE0_.js} +6 -6
  71. package/storybook-static/assets/{BlobCursor.stories-CdB55R5G.js → BlobCursor.stories-BQJgTsuD.js} +1 -1
  72. package/storybook-static/assets/{BlurText.stories-Bg2Ih2Je.js → BlurText.stories-oSn5_w7h.js} +2 -2
  73. package/storybook-static/assets/BooleansHeatmap-C8cFXa7K.css +1 -0
  74. package/storybook-static/assets/BooleansHeatmap.stories-CHoCYK4N.js +63 -0
  75. package/storybook-static/assets/{BorderGlow.stories-CUxbrsvW.js → BorderGlow.stories-D-vgIU3S.js} +1 -1
  76. package/storybook-static/assets/{BubbleMenu.stories-DuVDLBsV.js → BubbleMenu.stories-DcWoqA7_.js} +1 -1
  77. package/storybook-static/assets/{Button-CQGdvhpN.js → Button-DgpqJWgD.js} +1 -1
  78. package/storybook-static/assets/{Button.stories-D8Xx3I9p.js → Button.stories-TQXKQagp.js} +2 -2
  79. package/storybook-static/assets/Calendar-BZCyXxvF.css +1 -0
  80. package/storybook-static/assets/Calendar.stories-D5CKBagI.js +321 -0
  81. package/storybook-static/assets/{Card-DNp-cUnt.js → Card-Bu54h8gN.js} +1 -1
  82. package/storybook-static/assets/{Card.stories-D1f1NTVU.js → Card.stories-Dw2bPvLo.js} +1 -1
  83. package/storybook-static/assets/{CardNav.stories-Cd4zEw8p.js → CardNav.stories-CnbwwAde.js} +1 -1
  84. package/storybook-static/assets/{Carousel.stories-BxbGwXE5.js → Carousel.stories-ChBLLqBg.js} +2 -2
  85. package/storybook-static/assets/{Checkbox-Dw8W2w74.js → Checkbox-Duyafa-Y.js} +1 -1
  86. package/storybook-static/assets/Checkbox.stories-Co7IxmK1.js +55 -0
  87. package/storybook-static/assets/{ChromaGrid.stories-DBHYiDPV.js → ChromaGrid.stories-68ukohGs.js} +1 -1
  88. package/storybook-static/assets/{CircularGallery.stories-TJN6o_RG.js → CircularGallery.stories-CV4iXVIX.js} +2 -2
  89. package/storybook-static/assets/{CircularText.stories-rNjRUNn2.js → CircularText.stories-DqYHtbPW.js} +1 -1
  90. package/storybook-static/assets/{ClickSpark.stories-BfqByoGe.js → ClickSpark.stories-DvAOxLjs.js} +1 -1
  91. package/storybook-static/assets/{ColorBends.stories-IEMOWAyf.js → ColorBends.stories-Dm4nxTTN.js} +2 -2
  92. package/storybook-static/assets/{CountUp.stories-DXPrKAQb.js → CountUp.stories-DTaL8Yfy.js} +1 -1
  93. package/storybook-static/assets/{Counter.stories-DMdecsw_.js → Counter.stories-Bf_2Js0l.js} +2 -2
  94. package/storybook-static/assets/{Crosshair.stories-CYzDxRSn.js → Crosshair.stories-DJjjCcED.js} +2 -2
  95. package/storybook-static/assets/{Cubes.stories-Drq4ULo3.js → Cubes.stories-Qh3JqlQW.js} +1 -1
  96. package/storybook-static/assets/{CurvedLoop.stories-C9GMKnIw.js → CurvedLoop.stories-BvyrCuM7.js} +1 -1
  97. package/storybook-static/assets/{DarkVeil.stories-BtLNfEH8.js → DarkVeil.stories-BVY870pm.js} +2 -2
  98. package/storybook-static/assets/{DateInput-CW4PsZAQ.js → DateInput-DfGES3te.js} +2 -2
  99. package/storybook-static/assets/DateInput-Dhcb9x13.css +1 -0
  100. package/storybook-static/assets/DateInput.stories-BXF8Ttde.js +51 -0
  101. package/storybook-static/assets/{DecayCard.stories-CAU_wTc7.js → DecayCard.stories-B0g2xWqX.js} +1 -1
  102. package/storybook-static/assets/{DecryptedText.stories-Dvba9C1V.js → DecryptedText.stories-fqDZfjv8.js} +1 -1
  103. package/storybook-static/assets/{Dither.stories-B5KfMprl.js → Dither.stories-B4N3Z5sW.js} +2 -2
  104. package/storybook-static/assets/{Dock.stories-oyQGRzlM.js → Dock.stories-f_YKz-pl.js} +1 -1
  105. package/storybook-static/assets/EditFAB.stories-LhVUDgtx.js +233 -0
  106. package/storybook-static/assets/{EvilEye.stories-C1820-DG.js → EvilEye.stories-BtBvvs31.js} +2 -2
  107. package/storybook-static/assets/{FadeContent.stories-B4z_JRy9.js → FadeContent.stories-oNqKrfSe.js} +1 -1
  108. package/storybook-static/assets/{FaultyTerminal.stories-DmkguJql.js → FaultyTerminal.stories-7nV4DvrW.js} +2 -2
  109. package/storybook-static/assets/{Fbo-CTQm-4Bw.js → Fbo-Clk04E0N.js} +1 -1
  110. package/storybook-static/assets/{FloatingLines.stories-CQvqKSpH.js → FloatingLines.stories-DgxhGl_b.js} +2 -2
  111. package/storybook-static/assets/{FlowingMenu.stories-DmOspv0B.js → FlowingMenu.stories-C5dfG25U.js} +1 -1
  112. package/storybook-static/assets/{FluidGlass.stories-CZSqxrNt.js → FluidGlass.stories-DGLlp1x1.js} +2 -2
  113. package/storybook-static/assets/{Folder.stories-7vb52Lfi.js → Folder.stories-BJGdA6Qb.js} +1 -1
  114. package/storybook-static/assets/{FuzzyText.stories-BdXN4VK1.js → FuzzyText.stories-DygRT6bB.js} +1 -1
  115. package/storybook-static/assets/{Galaxy.stories-BhT1GZh5.js → Galaxy.stories-BU6XCHeu.js} +2 -2
  116. package/storybook-static/assets/{GhostCursor.stories-DkXqCjE9.js → GhostCursor.stories-D_HIFPUl.js} +2 -2
  117. package/storybook-static/assets/{GlareHover.stories-CznX3yTV.js → GlareHover.stories-D5_-xnyP.js} +1 -1
  118. package/storybook-static/assets/{GlassSurface.stories-BnwwYK95.js → GlassSurface.stories-CrZqAGRq.js} +2 -2
  119. package/storybook-static/assets/{GlitchText.stories-CVcTBUVS.js → GlitchText.stories-BRqI-kBX.js} +2 -2
  120. package/storybook-static/assets/{GooeyNav.stories-C0abTHBc.js → GooeyNav.stories-DjR0-Th2.js} +1 -1
  121. package/storybook-static/assets/{GradientBlinds.stories-CpSguKtv.js → GradientBlinds.stories-CiIDtPz3.js} +2 -2
  122. package/storybook-static/assets/{GradientText.stories-B4hMx13h.js → GradientText.stories-pLA_An71.js} +1 -1
  123. package/storybook-static/assets/{Grainient.stories-5EakpvU2.js → Grainient.stories-BthRrRMd.js} +2 -2
  124. package/storybook-static/assets/{GridMotion.stories-Bm3DD7cb.js → GridMotion.stories-BSwjL8IE.js} +1 -1
  125. package/storybook-static/assets/ImageSlideshow.stories-BYAQMHlZ.js +108 -0
  126. package/storybook-static/assets/{Iridescence.stories-Cykk3hHZ.js → Iridescence.stories-ChHTH2TM.js} +2 -2
  127. package/storybook-static/assets/{LaserFlow.stories-CfiM4ZZ5.js → LaserFlow.stories-DlDx8Vr8.js} +2 -2
  128. package/storybook-static/assets/{LetterGlitch.stories-BXb7iSeX.js → LetterGlitch.stories-C-S2SRjU.js} +1 -1
  129. package/storybook-static/assets/{LightPillar.stories-CwI-8_BF.js → LightPillar.stories-D0PF-h7T.js} +3 -3
  130. package/storybook-static/assets/{LightRays.stories-BIIfv6Ky.js → LightRays.stories-Cbkl7wuP.js} +2 -2
  131. package/storybook-static/assets/{Lightning.stories-B8GNkzSN.js → Lightning.stories-BUs-gwYj.js} +2 -2
  132. package/storybook-static/assets/{LineWaves.stories-CjxdD_yt.js → LineWaves.stories-D2GXzteP.js} +2 -2
  133. package/storybook-static/assets/{LiquidChrome.stories-G7bVFJM9.js → LiquidChrome.stories-CtDp7th1.js} +2 -2
  134. package/storybook-static/assets/{LiquidEther.stories-C8n27zuA.js → LiquidEther.stories-DM2n5oEm.js} +2 -2
  135. package/storybook-static/assets/{LoadingSpinner-Br8TYFlF.js → LoadingSpinner-DaUSIVPY.js} +1 -1
  136. package/storybook-static/assets/LoadingSpinner.stories-Cx4_nNAf.js +21 -0
  137. package/storybook-static/assets/{MagicRings.stories-D50m_2UF.js → MagicRings.stories-CZt-cHcL.js} +2 -2
  138. package/storybook-static/assets/{Magnet.stories-BP9fjpzP.js → Magnet.stories-B6js1VeO.js} +1 -1
  139. package/storybook-static/assets/{MagnetLines.stories-DvbytV0Y.js → MagnetLines.stories-BKQ9YC_E.js} +1 -1
  140. package/storybook-static/assets/{Masonry.stories-xXYQw2uD.js → Masonry.stories-BGkTkNUa.js} +1 -1
  141. package/storybook-static/assets/{MetaBalls.stories-DKD3gVUH.js → MetaBalls.stories-Cao6Tqjg.js} +2 -2
  142. package/storybook-static/assets/{MetallicPaint.stories-Bz-uS-L_.js → MetallicPaint.stories-DF9qb3W_.js} +2 -2
  143. package/storybook-static/assets/MoodChart-ba3aY_qF.css +1 -0
  144. package/storybook-static/assets/MoodChart.stories-AGxwnR6s.js +40 -0
  145. package/storybook-static/assets/{MotionConfigContext-D5hZdVGx.js → MotionConfigContext-BCa1jVYq.js} +1 -1
  146. package/storybook-static/assets/Navbar-CH6O1IzY.css +1 -0
  147. package/storybook-static/assets/Navbar.stories-CFHb1c22.js +186 -0
  148. package/storybook-static/assets/{Noise.stories-D6C6-k8-.js → Noise.stories-ConXbyqm.js} +2 -2
  149. package/storybook-static/assets/{NumberStepper--0cJcLNZ.js → NumberStepper-DH9y3k8b.js} +1 -1
  150. package/storybook-static/assets/NumberStepper.stories-PMwPqbsn.js +88 -0
  151. package/storybook-static/assets/{Orb.stories-CS__2PJW.js → Orb.stories-DcXSWhV1.js} +2 -2
  152. package/storybook-static/assets/{OrbitImages.stories-CcaelcY5.js → OrbitImages.stories-Dk417qKA.js} +1 -1
  153. package/storybook-static/assets/PieChart-DXPBsaZR.css +1 -0
  154. package/storybook-static/assets/PieChart.stories-6sgfe6Xk.js +91 -0
  155. package/storybook-static/assets/{PixelBlast.stories-CyK8BxPq.js → PixelBlast.stories-_cBuognT.js} +2 -2
  156. package/storybook-static/assets/{PixelCard.stories-D_Og1Eve.js → PixelCard.stories-D_EZOUox.js} +1 -1
  157. package/storybook-static/assets/{PixelSnow.stories-CoCZucVV.js → PixelSnow.stories-DcD7737G.js} +2 -2
  158. package/storybook-static/assets/{PixelTransition.stories-DmVJ4jdu.js → PixelTransition.stories-BwNcUv5J.js} +1 -1
  159. package/storybook-static/assets/{Plasma.stories-DUqrW-qq.js → Plasma.stories-BLolMCfR.js} +2 -2
  160. package/storybook-static/assets/{Prism.stories-DWdVDcBG.js → Prism.stories-CG2_KGsq.js} +2 -2
  161. package/storybook-static/assets/{PrismaticBurst.stories-BEVYTjXo.js → PrismaticBurst.stories-DzS--Ffu.js} +2 -2
  162. package/storybook-static/assets/{ProfileCard.stories-CAoKQpAZ.js → ProfileCard.stories-vI_ispYe.js} +1 -1
  163. package/storybook-static/assets/QuantifiableHabitsChart-BiMp7Kkq.css +1 -0
  164. package/storybook-static/assets/{QuantifiableHabitsChart.stories-CMexb5Ij.js → QuantifiableHabitsChart.stories-D5yeGCZ5.js} +2 -2
  165. package/storybook-static/assets/{Radar.stories-Dcjnm9Bu.js → Radar.stories-DLv_hY9T.js} +2 -2
  166. package/storybook-static/assets/{Ribbons.stories-Cs3Eg2Gz.js → Ribbons.stories-4BbVINtW.js} +4 -4
  167. package/storybook-static/assets/{RippleGrid.stories-QV9Doq9P.js → RippleGrid.stories-CFh8tigy.js} +2 -2
  168. package/storybook-static/assets/{RotatingText.stories-DkntoAXJ.js → RotatingText.stories-AM4GcpU2.js} +2 -2
  169. package/storybook-static/assets/{ScrollFloat.stories-BaX43Ike.js → ScrollFloat.stories-Ct_ZkL7k.js} +1 -1
  170. package/storybook-static/assets/{ScrollReveal.stories-C2IWpLpI.js → ScrollReveal.stories-B7fcgLZ3.js} +1 -1
  171. package/storybook-static/assets/{ScrollVelocity.stories-LaYJ5WQN.js → ScrollVelocity.stories-BRDv3Fdk.js} +1 -1
  172. package/storybook-static/assets/SearchBar.stories-Dnmegbak.js +64 -0
  173. package/storybook-static/assets/{SearchableDropdown-4HgWY0Ck.js → SearchableDropdown-BtIsuxmT.js} +1 -1
  174. package/storybook-static/assets/SearchableDropdown.stories-DVub17TN.js +44 -0
  175. package/storybook-static/assets/{SelectInput-DvSeeIw5.js → SelectInput-C0kBLYgX.js} +1 -1
  176. package/storybook-static/assets/SelectInput.stories-HoF32-Km.js +94 -0
  177. package/storybook-static/assets/{ShapeBlur.stories-ZQV0yHkn.js → ShapeBlur.stories-C3RyLvBh.js} +2 -2
  178. package/storybook-static/assets/{ShapeGrid.stories-G_tZAcp9.js → ShapeGrid.stories-ltmu466o.js} +1 -1
  179. package/storybook-static/assets/{ShinyText.stories-C6BrLI0x.js → ShinyText.stories-JO2F4CpJ.js} +1 -1
  180. package/storybook-static/assets/{Silk.stories-BpsR4txJ.js → Silk.stories-CUzWiwqP.js} +2 -2
  181. package/storybook-static/assets/SleepChart-CjpdWR_T.css +1 -0
  182. package/storybook-static/assets/SleepChart.stories-YvCzf0BI.js +58 -0
  183. package/storybook-static/assets/Slider-BaDHm9m3.css +1 -0
  184. package/storybook-static/assets/{Slider-3iog5_du.js → Slider-CI9mXQSu.js} +1 -1
  185. package/storybook-static/assets/{Slider.stories-C8eUZ7Ne.js → Slider.stories-DQYlBjGq.js} +1 -1
  186. package/storybook-static/assets/{SoftAurora.stories--Rcyqxiu.js → SoftAurora.stories-ubq_KV8Q.js} +2 -2
  187. package/storybook-static/assets/{SoundDemo.stories-DvhKS2Fi.js → SoundDemo.stories-Cie-leKw.js} +1 -1
  188. package/storybook-static/assets/{SplashCursor.stories-FzRIUaX9.js → SplashCursor.stories-Clea3dMy.js} +2 -2
  189. package/storybook-static/assets/{SpotlightCard.stories-CifqsSUc.js → SpotlightCard.stories-BWv0AuTI.js} +1 -1
  190. package/storybook-static/assets/{Stack.stories-Dq82x0TG.js → Stack.stories-DxVGTJ6l.js} +1 -1
  191. package/storybook-static/assets/{StaggeredMenu.stories-CsiTDJGG.js → StaggeredMenu.stories-1UB8ravq.js} +1 -1
  192. package/storybook-static/assets/{StarBorder.stories-Ba14_TPk.js → StarBorder.stories-DiSAqN3r.js} +2 -2
  193. package/storybook-static/assets/{SunburstChart.stories-fREzDXM9.js → SunburstChart.stories-DLjQA_I1.js} +1 -1
  194. package/storybook-static/assets/Table-BFjXRRk3.css +1 -0
  195. package/storybook-static/assets/{Table.stories-CXsQAQrR.js → Table.stories-wQGb96WC.js} +6 -6
  196. package/storybook-static/assets/Tabs-CDVjuS9_.css +1 -0
  197. package/storybook-static/assets/{Tabs.stories-HeiG8gYN.js → Tabs.stories-jkioQ4xt.js} +4 -4
  198. package/storybook-static/assets/{TargetCursor.stories-B16pWZaP.js → TargetCursor.stories-B4ACbrmW.js} +1 -1
  199. package/storybook-static/assets/{TextArea-DKx3k6hV.js → TextArea-DN6IYITs.js} +1 -1
  200. package/storybook-static/assets/TextArea.stories-CwLLZFoD.js +118 -0
  201. package/storybook-static/assets/{TextCursor.stories-CY2eIn6Z.js → TextCursor.stories-NORQhkfy.js} +1 -1
  202. package/storybook-static/assets/TextInput-6V0mlIuS.css +1 -0
  203. package/storybook-static/assets/TextInput-CLgIGUn3.js +28 -0
  204. package/storybook-static/assets/TextInput.stories-BNooOWA2.js +89 -0
  205. package/storybook-static/assets/{TextPressure.stories-sH-cgdL2.js → TextPressure.stories-BaCAyBD4.js} +2 -2
  206. package/storybook-static/assets/{TextType.stories-B7Oy3P9u.js → TextType.stories-DG4mQ3HF.js} +1 -1
  207. package/storybook-static/assets/ThemeSwitcher.stories-slxIamHU.js +47 -0
  208. package/storybook-static/assets/{Threads.stories-e52ErKbM.js → Threads.stories-Rsg8lRsX.js} +2 -2
  209. package/storybook-static/assets/TimeInput-BT44V2P0.css +1 -0
  210. package/storybook-static/assets/TimeInput.stories-CaO8_PY2.js +13 -0
  211. package/storybook-static/assets/{Toggle-BntWdyUe.js → Toggle-CTTN-13k.js} +1 -1
  212. package/storybook-static/assets/Toggle.stories-DrNYDjFB.js +163 -0
  213. package/storybook-static/assets/{ToggleButton-BQqJdlB_.js → ToggleButton-CXK855yx.js} +1 -1
  214. package/storybook-static/assets/ToggleButton.stories-DNsNH9vH.js +103 -0
  215. package/storybook-static/assets/{TrueFocus.stories-wm4VXWCk.js → TrueFocus.stories-zG6Ml8RP.js} +1 -1
  216. package/storybook-static/assets/{VariableProximity.stories-BNSYs_rC.js → VariableProximity.stories-CMZW-Tov.js} +1 -1
  217. package/storybook-static/assets/{Waves.stories-Ce2ZJFsV.js → Waves.stories-CscXTp_S.js} +1 -1
  218. package/storybook-static/assets/{check-Cty-Z1Ib.js → check-DLeHG_Da.js} +1 -1
  219. package/storybook-static/assets/{chevron-down-OhqRl4eJ.js → chevron-down-Ciks5pXx.js} +1 -1
  220. package/storybook-static/assets/{chevron-right-CZm4bArI.js → chevron-right-DjeluSA0.js} +1 -1
  221. package/storybook-static/assets/client-D1KVnN68.js +1 -0
  222. package/storybook-static/assets/{createLucideIcon-BNUG5osq.js → createLucideIcon-dvowvj4F.js} +1 -1
  223. package/storybook-static/assets/{folder-BjriMpXc.js → folder-CCqkDvFG.js} +1 -1
  224. package/storybook-static/assets/{iconBase-DmcmY1l-.js → iconBase-nrk1zV8Q.js} +1 -1
  225. package/storybook-static/assets/iframe-CU5nRRrn.css +1 -0
  226. package/storybook-static/assets/{iframe-B8pH-Lvr.js → iframe-Cw8dCV4Z.js} +180 -181
  227. package/storybook-static/assets/{index-PY_vM88c.js → index-A7l1uA6_.js} +6 -6
  228. package/storybook-static/assets/{index-BN99WpBo.js → index-Bm5msOcI.js} +1 -1
  229. package/storybook-static/assets/{index-DBfrIdYd.js → index-CzApopWo.js} +1 -1
  230. package/storybook-static/assets/{proxy-BA3VZtN5.js → proxy-p8L3T_Zy.js} +1 -1
  231. package/storybook-static/assets/{react-18-7dGub68c.js → react-18-D7YhBYbX.js} +1 -1
  232. package/storybook-static/assets/{react-three-fiber.esm-DI-wNJmP.js → react-three-fiber.esm-BnMrba87.js} +1 -1
  233. package/storybook-static/assets/{search-2YqBkJlG.js → search-7V6DOf2z.js} +1 -1
  234. package/storybook-static/assets/{settings-DvzICcFU.js → settings-B8s5hJGs.js} +1 -1
  235. package/storybook-static/assets/{sun-DgDhCM_S.js → sun-5V6ee2LJ.js} +1 -1
  236. package/storybook-static/assets/{trash-2-BwI5jvsn.js → trash-2-DeQvYdO7.js} +1 -1
  237. package/storybook-static/assets/{use-animation-frame-CF42h0i5.js → use-animation-frame-DovyG_Es.js} +1 -1
  238. package/storybook-static/assets/{use-in-view-Zn8evg3J.js → use-in-view-Dv3LTdsl.js} +1 -1
  239. package/storybook-static/assets/{use-motion-value--XhiA2Gt.js → use-motion-value-BVm7csqA.js} +1 -1
  240. package/storybook-static/assets/{use-spring-CrWzlBMd.js → use-spring-BkrdNVnG.js} +1 -1
  241. package/storybook-static/assets/{use-transform-vyDqMhf-.js → use-transform-CQNghMvr.js} +1 -1
  242. package/storybook-static/assets/{useSound-Bk2W5gkV.js → useSound-D23BsIr4.js} +1 -1
  243. package/storybook-static/assets/{users-aNPxMiig.js → users-R6T-yLyH.js} +1 -1
  244. package/storybook-static/assets/{x-BC8LCdn9.js → x-CypMgsiv.js} +1 -1
  245. package/storybook-static/iframe.html +3 -3
  246. package/storybook-static/index.html +5 -19
  247. package/storybook-static/index.json +1 -1
  248. package/storybook-static/project.json +1 -1
  249. package/storybook-static/addon-visual-tests-assets/visual-test-illustration.mp4 +0 -0
  250. package/storybook-static/assets/ArrayInput.stories-Cshz2s-a.js +0 -232
  251. package/storybook-static/assets/BooleansHeatmap-BV4VTyo6.css +0 -1
  252. package/storybook-static/assets/BooleansHeatmap.stories-CpNxqSED.js +0 -123
  253. package/storybook-static/assets/Calendar-tbpzwSIm.css +0 -1
  254. package/storybook-static/assets/Calendar.stories-Cx2JEddO.js +0 -229
  255. package/storybook-static/assets/Checkbox.stories-BwsnN3CP.js +0 -83
  256. package/storybook-static/assets/Color-AVL7NMMY-CoWQkAiP.js +0 -1
  257. package/storybook-static/assets/DateInput-C4-Rlnpy.css +0 -1
  258. package/storybook-static/assets/DateInput.stories-d46zYiZA.js +0 -119
  259. package/storybook-static/assets/DocsRenderer-PQXLIZUC-C2AYT361.js +0 -1243
  260. package/storybook-static/assets/EditFAB.stories-DvtpW34v.js +0 -378
  261. package/storybook-static/assets/ImageSlideshow.stories-BasuECRV.js +0 -385
  262. package/storybook-static/assets/LoadingSpinner.stories-Dj0bMFhR.js +0 -169
  263. package/storybook-static/assets/MoodChart-2hr_Y2GI.css +0 -1
  264. package/storybook-static/assets/MoodChart.stories-Bk0jtB4g.js +0 -40
  265. package/storybook-static/assets/Navbar-BPWxCB-U.css +0 -1
  266. package/storybook-static/assets/Navbar.stories-Dos3kovt.js +0 -320
  267. package/storybook-static/assets/NumberStepper.stories-BvFwBEjt.js +0 -436
  268. package/storybook-static/assets/PieChart-OfDGlJ4g.css +0 -1
  269. package/storybook-static/assets/PieChart.stories-XZqxh_GW.js +0 -199
  270. package/storybook-static/assets/QuantifiableHabitsChart-Bam6n9X_.css +0 -1
  271. package/storybook-static/assets/SearchBar.stories-CGaj__zF.js +0 -169
  272. package/storybook-static/assets/SearchableDropdown.stories-CfeFR5Rk.js +0 -282
  273. package/storybook-static/assets/SelectInput.stories-DByYKCGI.js +0 -129
  274. package/storybook-static/assets/SleepChart-DBRb08s_.css +0 -1
  275. package/storybook-static/assets/SleepChart.stories-DcoBwiEm.js +0 -58
  276. package/storybook-static/assets/Slider-Bq7zObwV.css +0 -1
  277. package/storybook-static/assets/Table-DnhtoClE.css +0 -1
  278. package/storybook-static/assets/Tabs-D5ZPN7MM.css +0 -1
  279. package/storybook-static/assets/TextArea.stories-Bpqlv7j5.js +0 -155
  280. package/storybook-static/assets/TextInput-BjVJQEYN.css +0 -1
  281. package/storybook-static/assets/TextInput-CLyTHgK9.js +0 -28
  282. package/storybook-static/assets/TextInput.stories-BP1LSkLG.js +0 -203
  283. package/storybook-static/assets/ThemeSwitcher.stories-Bj0YQKM5.js +0 -62
  284. package/storybook-static/assets/TimeInput-C3enPYoV.css +0 -1
  285. package/storybook-static/assets/TimeInput.stories-Cd28zwwR.js +0 -55
  286. package/storybook-static/assets/Toggle.stories-DtqFmh3E.js +0 -199
  287. package/storybook-static/assets/ToggleButton.stories-DkN_4qpp.js +0 -163
  288. package/storybook-static/assets/client-0pKYCVHx.js +0 -1
  289. package/storybook-static/assets/iframe-B7RIyArP.css +0 -1
  290. package/storybook-static/assets/index-bi5z6E3I.js +0 -1
  291. package/storybook-static/assets/layout-grid-TssXYNzv.js +0 -6
  292. package/storybook-static/sb-addons/chromatic-com-storybook-4/manager-bundle.js +0 -356
  293. package/storybook-static/sb-addons/chromatic-com-storybook-4/manager-bundle.js.LEGAL.txt +0 -40
  294. package/storybook-static/sb-addons/docs-2/manager-bundle.js +0 -151
  295. package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +0 -127
  296. /package/storybook-static/sb-addons/{links-3 → links-1}/manager-bundle.js +0 -0
  297. /package/storybook-static/sb-addons/{storybook-5 → storybook-2}/manager-bundle.js +0 -0
@@ -0,0 +1,186 @@
1
+ import{r as v,j as e}from"./iframe-Cw8dCV4Z.js";import{u as de}from"./useSound-D23BsIr4.js";import{m as i}from"./proxy-p8L3T_Zy.js";import{X as ve}from"./x-CypMgsiv.js";import{c as l}from"./createLucideIcon-dvowvj4F.js";import{A as P}from"./index-CzApopWo.js";import{F as K}from"./folder-CCqkDvFG.js";import{U as $}from"./users-R6T-yLyH.js";import{S as Z}from"./settings-B8s5hJGs.js";import{S as me}from"./search-7V6DOf2z.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-BCa1jVYq.js";/**
2
+ * @license lucide-react v0.539.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const ue=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ge=l("circle-question-mark",ue);/**
7
+ * @license lucide-react v0.539.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const pe=[["path",{d:"M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5",key:"mvr1a0"}]],be=l("heart",pe);/**
12
+ * @license lucide-react v0.539.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const _e=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],S=l("house",_e);/**
17
+ * @license lucide-react v0.539.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const he=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],ye=l("layers",he);/**
22
+ * @license lucide-react v0.539.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const xe=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],fe=l("mail",xe);/**
27
+ * @license lucide-react v0.539.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const Ne=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],ke=l("menu",Ne);/**
32
+ * @license lucide-react v0.539.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const we=[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]],Ie=l("shopping-cart",we);/**
37
+ * @license lucide-react v0.539.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const je=[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]],Te=l("trending-up",je),Me="_navbar_1cr4i_1",$e="_navbarSidebar_1cr4i_12",Se="_navbarTop_1cr4i_24",qe="_navList_1cr4i_35",Le="_navItem_1cr4i_41",Ce="_navbarMinimal_1cr4i_46",Ae="_navLogo_1cr4i_59",Be="_logoContainer_1cr4i_68",Pe="_logoImage_1cr4i_74",Ee="_logoPlaceholder_1cr4i_81",Fe="_logoContent_1cr4i_94",Oe="_logoText_1cr4i_99",He="_logoSubtitle_1cr4i_106",ze="_subNavItem_1cr4i_133",Re="_navLink_1cr4i_137",De="_activeBackground_1cr4i_155",Ue="_navIcon_1cr4i_166",Ve="_activeIcon_1cr4i_175",Ye="_navText_1cr4i_178",Xe="_activeText_1cr4i_186",We="_navBadge_1cr4i_189",Qe="_chevron_1cr4i_201",Ge="_subNavList_1cr4i_210",Je="_navFooter_1cr4i_223",Ke="_mobileMenuButton_1cr4i_229",Ze="_mobileBackdrop_1cr4i_256",en="_mobileMenuOpen_1cr4i_276",nn={navbar:Me,navbarSidebar:$e,navbarTop:Se,navList:qe,navItem:Le,navbarMinimal:Ce,navLogo:Ae,logoContainer:Be,logoImage:Pe,logoPlaceholder:Ee,logoContent:Fe,logoText:Oe,logoSubtitle:He,subNavItem:ze,navLink:Re,activeBackground:De,navIcon:Ue,activeIcon:Ve,navText:Ye,activeText:Xe,navBadge:We,chevron:Qe,subNavList:Ge,navFooter:Je,mobileMenuButton:Ke,mobileBackdrop:Ze,mobileMenuOpen:en},an="_navbar_cwgqa_4",tn="_navLogo_cwgqa_20",on="_logoContainer_cwgqa_24",sn="_logoImage_cwgqa_30",rn="_logoPlaceholder_cwgqa_37",cn="_logoContent_cwgqa_50",ln="_logoText_cwgqa_55",dn="_logoSubtitle_cwgqa_62",vn="_mobileMenuButton_cwgqa_67",mn="_menuOpen_cwgqa_82",un="_mobileBackdrop_cwgqa_87",gn="_navList_cwgqa_108",pn="_navItem_cwgqa_120",bn="_subNavItem_cwgqa_125",_n="_navLink_cwgqa_129",hn="_active_cwgqa_152",yn="_activeBackground_cwgqa_156",xn="_navIcon_cwgqa_160",fn="_activeIcon_cwgqa_169",Nn="_navText_cwgqa_173",kn="_activeText_cwgqa_179",wn="_navBadge_cwgqa_183",In="_chevron_cwgqa_194",jn="_subNavList_cwgqa_195",Tn="_navActions_cwgqa_200",Mn="_navFooter_cwgqa_207",$n="_navbarSidebar_cwgqa_211",Sn="_navbarTop_cwgqa_214",qn="_navbarMinimal_cwgqa_217",Ln="_mobileMenuOpen_cwgqa_220",Cn={navbar:an,navLogo:tn,logoContainer:on,logoImage:sn,logoPlaceholder:rn,logoContent:cn,logoText:ln,logoSubtitle:dn,mobileMenuButton:vn,menuOpen:mn,mobileBackdrop:un,navList:gn,navItem:pn,subNavItem:bn,navLink:_n,active:hn,activeBackground:yn,navIcon:xn,activeIcon:fn,navText:Nn,activeText:kn,navBadge:wn,chevron:In,subNavList:jn,navActions:Tn,navFooter:Mn,navbarSidebar:$n,navbarTop:Sn,navbarMinimal:qn,mobileMenuOpen:Ln},ee=({items:_,logo:t,onItemClick:L,variant:m="sidebar",isMobile:c=!1,footer:h,className:j="",soundConfig:ne,colorfulIcons:ae=!1})=>{var A,B;const y=ae?"true":void 0,a=v.useMemo(()=>c?Cn:nn,[c]),[d,u]=v.useState(!1),[te,oe]=v.useState(new Set),{handlers:g,playSound:T}=de(ne);v.useEffect(()=>{c||u(!1)},[c]);const p=v.useRef(null);v.useEffect(()=>{if(!c)return;const n=s=>{const r=s.touches[0];r.clientX<30&&(p.current={x:r.clientX,y:r.clientY})},o=s=>{if(!p.current)return;const r=s.changedTouches[0],b=r.clientX-p.current.x,x=Math.abs(r.clientY-p.current.y);p.current=null,b>60&&x<b&&(u(!0),T("toggle"))};return document.addEventListener("touchstart",n,{passive:!0}),document.addEventListener("touchend",o,{passive:!0}),()=>{document.removeEventListener("touchstart",n),document.removeEventListener("touchend",o)}},[c,T]),v.useEffect(()=>{if(d){const n=window.scrollY;document.body.style.position="fixed",document.body.style.top=`-${n}px`,document.body.style.left="0",document.body.style.right="0",document.body.style.overflow="hidden"}else{const n=document.body.style.top;document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.overflow="",n&&window.scrollTo(0,parseInt(n,10)*-1)}return()=>{document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",document.body.style.overflow=""}},[d]);const ie=()=>{T("toggle"),u(!d)},se=n=>{oe(o=>{const s=new Set(o);return s.has(n)?s.delete(n):s.add(n),s})},re=n=>{var o;(o=g.onClick)==null||o.call(g),n.children&&n.children.length>0?se(n.id):(n.onClick&&n.onClick(),L&&L(n),(c||d)&&u(!1))},M=(n,o,s=0)=>{const r=n.icon,b=te.has(n.id),x=n.children&&n.children.length>0;return e.jsxs(i.li,{className:`${a.navItem} ${s>0?a.subNavItem:""}`,initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:o*.05},children:[e.jsxs(i.button,{className:`${a.navLink} ${n.isActive?a.active:""}`,onClick:()=>re(n),onMouseEnter:g.onMouseEnter,whileHover:{x:5},whileTap:{scale:.98},children:[n.isActive&&e.jsx(i.div,{className:a.activeBackground,layoutId:"activeNavBackground",initial:!1,transition:{type:"spring",stiffness:500,damping:35}}),r&&e.jsx(r,{className:`${a.navIcon} ${n.isActive?a.activeIcon:""}`}),e.jsx("span",{className:`${a.navText} ${n.isActive?a.activeText:""}`,children:n.label}),n.badge&&e.jsx("span",{className:a.navBadge,children:n.badge}),x&&e.jsx(i.span,{className:a.chevron,animate:{rotate:b?180:0},transition:{duration:.2},children:"▼"})]}),x&&e.jsx(P,{children:b&&e.jsx(i.ul,{className:a.subNavList,initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},children:n.children.map((ce,le)=>M(ce,le,s+1))})})]},n.id)},C=e.jsxs(e.Fragment,{children:[t&&e.jsx(i.div,{className:a.navLogo,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{delay:.1},children:e.jsxs("div",{className:a.logoContainer,children:[t.src?e.jsx(i.img,{src:t.src,alt:t.alt||"Logo",className:a.logoImage,onMouseEnter:g.onMouseEnter,whileHover:{scale:1.05},transition:{type:"spring",stiffness:400}}):e.jsx("div",{className:a.logoPlaceholder,children:((A=t.text)==null?void 0:A.charAt(0))||"L"}),(t.text||t.subtitle)&&e.jsxs("div",{className:a.logoContent,children:[t.text&&e.jsx("span",{className:a.logoText,children:t.text}),t.subtitle&&e.jsx("span",{className:a.logoSubtitle,children:t.subtitle})]})]})}),e.jsx("ul",{className:a.navList,children:_.map((n,o)=>M(n,o))}),h&&e.jsx(i.div,{className:a.navFooter,initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},children:h})]});return m==="top"?e.jsx(i.nav,{className:`${a.navbar} ${a.navbarTop} ${j}`,"data-colored-icons":y,initial:{y:-100},animate:{y:0},transition:{type:"spring",stiffness:300,damping:30},children:C}):c?e.jsxs(e.Fragment,{children:[e.jsxs("nav",{className:`${a.navbar} ${j}`,"data-colored-icons":y,children:[t&&e.jsx("div",{className:a.navLogo,children:e.jsxs("div",{className:a.logoContainer,children:[t.src?e.jsx("img",{src:t.src,alt:t.alt||"Logo",className:a.logoImage}):e.jsx("div",{className:a.logoPlaceholder,children:((B=t.text)==null?void 0:B.charAt(0))||"L"}),t.text&&e.jsx("div",{className:a.logoContent,children:e.jsx("span",{className:a.logoText,children:t.text})})]})}),e.jsxs("div",{className:a.navActions,children:[h&&e.jsx("div",{className:a.navFooter,children:h}),e.jsx("button",{className:`${a.mobileMenuButton} ${d?a.menuOpen:""}`,onClick:ie,"aria-label":"Toggle navigation menu",children:d?e.jsx(ve,{}):e.jsx(ke,{})})]})]}),e.jsx(P,{children:d&&e.jsx(i.div,{className:a.mobileBackdrop,"data-colored-icons":y,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},onClick:()=>u(!1),children:e.jsx(i.div,{initial:{y:-20,opacity:0},animate:{y:0,opacity:1},exit:{y:-20,opacity:0},transition:{duration:.2},onClick:n=>n.stopPropagation(),children:e.jsx("ul",{className:a.navList,children:_.map((n,o)=>M(n,o))})})})})]}):e.jsx(e.Fragment,{children:e.jsx(i.nav,{className:`${a.navbar} ${a[`navbar${m.charAt(0).toUpperCase()+m.slice(1)}`]} ${j}`,"data-colored-icons":y,initial:m==="sidebar"?{x:-300}:{opacity:0},animate:m==="sidebar"?{x:0}:{opacity:1},transition:{type:"spring",stiffness:300,damping:30},children:C})})};ee.__docgenInfo={description:"",methods:[],displayName:"Navbar",props:{items:{required:!0,tsType:{name:"Array",elements:[{name:"NavItem"}],raw:"NavItem[]"},description:""},logo:{required:!1,tsType:{name:"signature",type:"object",raw:`{
42
+ src?: string;
43
+ alt?: string;
44
+ text?: string;
45
+ subtitle?: string;
46
+ }`,signature:{properties:[{key:"src",value:{name:"string",required:!1}},{key:"alt",value:{name:"string",required:!1}},{key:"text",value:{name:"string",required:!1}},{key:"subtitle",value:{name:"string",required:!1}}]}},description:""},onItemClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(item: NavItem) => void",signature:{arguments:[{type:{name:"NavItem"},name:"item"}],return:{name:"void"}}},description:""},variant:{required:!1,tsType:{name:"union",raw:"'sidebar' | 'top' | 'minimal'",elements:[{name:"literal",value:"'sidebar'"},{name:"literal",value:"'top'"},{name:"literal",value:"'minimal'"}]},description:"",defaultValue:{value:"'sidebar'",computed:!1}},isMobile:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},footer:{required:!1,tsType:{name:"ReactReactNode",raw:"React.ReactNode"},description:""},className:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"''",computed:!1}},soundConfig:{required:!1,tsType:{name:"ComponentSoundConfig"},description:""},colorfulIcons:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}}}};const Yn={title:"Organisms/Navbar",component:ee,parameters:{layout:"fullscreen"},argTypes:{variant:{control:{type:"select"},options:["sidebar","top","minimal"]},isMobile:{control:{type:"boolean"}}}},q=[{id:"home",label:"Home",icon:S,isActive:!0},{id:"projects",label:"Projects",icon:K,badge:3},{id:"team",label:"Team",icon:$},{id:"settings",label:"Settings",icon:Z,children:[{id:"profile",label:"Profile"},{id:"account",label:"Account"},{id:"security",label:"Security"}]},{id:"help",label:"Help",icon:ge}],f={args:{items:q,variant:"sidebar",logo:{text:"MyApp",subtitle:"Dashboard"}}},N={args:{items:q.slice(0,5),variant:"top",logo:{text:"TopNav"}}},k={args:{items:q.map(_=>({..._,icon:void 0})),variant:"minimal"}},w={args:{items:[{id:"overview",label:"Overview",icon:S,isActive:!0},{id:"analytics",label:"Analytics",icon:Te},{id:"projects",label:"Projects",icon:K,badge:12,children:[{id:"active",label:"Active Projects",badge:8},{id:"archived",label:"Archived",badge:4},{id:"drafts",label:"Drafts"}]},{id:"team",label:"Team",icon:$,children:[{id:"members",label:"Members"},{id:"roles",label:"Roles"},{id:"invites",label:"Invitations",badge:2}]},{id:"messages",label:"Messages",icon:fe,badge:7},{id:"integrations",label:"Integrations",icon:ye},{id:"settings",label:"Settings",icon:Z}],variant:"sidebar",logo:{text:"AdminPro",subtitle:"Control Panel"},footer:e.jsxs("div",{style:{padding:"var(--spacing-md)",background:"var(--color-background-secondary)",borderRadius:"var(--radius-md)",textAlign:"center"},children:[e.jsx("div",{style:{fontSize:"var(--font-size-sm)",color:"var(--color-text-secondary)"},children:"Version 2.1.0"}),e.jsx("div",{style:{fontSize:"var(--font-size-xs)",color:"var(--color-text-tertiary)",marginTop:"4px"},children:"© 2024 AdminPro"})]})}},I={args:{items:[{id:"home",label:"Home",icon:S,isActive:!0},{id:"search",label:"Search",icon:me},{id:"cart",label:"Cart",icon:Ie,badge:2},{id:"favorites",label:"Favorites",icon:be},{id:"profile",label:"Profile",icon:$}],variant:"sidebar",isMobile:!0,soundConfig:{onClick:"click",onHover:"hover"}}};var E,F,O;f.parameters={...f.parameters,docs:{...(E=f.parameters)==null?void 0:E.docs,source:{originalSource:`{
47
+ args: {
48
+ items: sampleItems,
49
+ variant: 'sidebar',
50
+ logo: {
51
+ text: 'MyApp',
52
+ subtitle: 'Dashboard'
53
+ }
54
+ }
55
+ }`,...(O=(F=f.parameters)==null?void 0:F.docs)==null?void 0:O.source}}};var H,z,R;N.parameters={...N.parameters,docs:{...(H=N.parameters)==null?void 0:H.docs,source:{originalSource:`{
56
+ args: {
57
+ items: sampleItems.slice(0, 5),
58
+ variant: 'top',
59
+ logo: {
60
+ text: 'TopNav'
61
+ }
62
+ }
63
+ }`,...(R=(z=N.parameters)==null?void 0:z.docs)==null?void 0:R.source}}};var D,U,V;k.parameters={...k.parameters,docs:{...(D=k.parameters)==null?void 0:D.docs,source:{originalSource:`{
64
+ args: {
65
+ items: sampleItems.map(item => ({
66
+ ...item,
67
+ icon: undefined
68
+ })),
69
+ variant: 'minimal'
70
+ }
71
+ }`,...(V=(U=k.parameters)==null?void 0:U.docs)==null?void 0:V.source}}};var Y,X,W;w.parameters={...w.parameters,docs:{...(Y=w.parameters)==null?void 0:Y.docs,source:{originalSource:`{
72
+ args: {
73
+ items: [{
74
+ id: 'overview',
75
+ label: 'Overview',
76
+ icon: Home,
77
+ isActive: true
78
+ }, {
79
+ id: 'analytics',
80
+ label: 'Analytics',
81
+ icon: TrendingUp
82
+ }, {
83
+ id: 'projects',
84
+ label: 'Projects',
85
+ icon: Folder,
86
+ badge: 12,
87
+ children: [{
88
+ id: 'active',
89
+ label: 'Active Projects',
90
+ badge: 8
91
+ }, {
92
+ id: 'archived',
93
+ label: 'Archived',
94
+ badge: 4
95
+ }, {
96
+ id: 'drafts',
97
+ label: 'Drafts'
98
+ }]
99
+ }, {
100
+ id: 'team',
101
+ label: 'Team',
102
+ icon: Users,
103
+ children: [{
104
+ id: 'members',
105
+ label: 'Members'
106
+ }, {
107
+ id: 'roles',
108
+ label: 'Roles'
109
+ }, {
110
+ id: 'invites',
111
+ label: 'Invitations',
112
+ badge: 2
113
+ }]
114
+ }, {
115
+ id: 'messages',
116
+ label: 'Messages',
117
+ icon: Mail,
118
+ badge: 7
119
+ }, {
120
+ id: 'integrations',
121
+ label: 'Integrations',
122
+ icon: Layers
123
+ }, {
124
+ id: 'settings',
125
+ label: 'Settings',
126
+ icon: Settings
127
+ }],
128
+ variant: 'sidebar',
129
+ logo: {
130
+ text: 'AdminPro',
131
+ subtitle: 'Control Panel'
132
+ },
133
+ footer: <div style={{
134
+ padding: 'var(--spacing-md)',
135
+ background: 'var(--color-background-secondary)',
136
+ borderRadius: 'var(--radius-md)',
137
+ textAlign: 'center'
138
+ }}>
139
+ <div style={{
140
+ fontSize: 'var(--font-size-sm)',
141
+ color: 'var(--color-text-secondary)'
142
+ }}>
143
+ Version 2.1.0
144
+ </div>
145
+ <div style={{
146
+ fontSize: 'var(--font-size-xs)',
147
+ color: 'var(--color-text-tertiary)',
148
+ marginTop: '4px'
149
+ }}>
150
+ © 2024 AdminPro
151
+ </div>
152
+ </div>
153
+ }
154
+ }`,...(W=(X=w.parameters)==null?void 0:X.docs)==null?void 0:W.source}}};var Q,G,J;I.parameters={...I.parameters,docs:{...(Q=I.parameters)==null?void 0:Q.docs,source:{originalSource:`{
155
+ args: {
156
+ items: [{
157
+ id: 'home',
158
+ label: 'Home',
159
+ icon: Home,
160
+ isActive: true
161
+ }, {
162
+ id: 'search',
163
+ label: 'Search',
164
+ icon: Search
165
+ }, {
166
+ id: 'cart',
167
+ label: 'Cart',
168
+ icon: ShoppingCart,
169
+ badge: 2
170
+ }, {
171
+ id: 'favorites',
172
+ label: 'Favorites',
173
+ icon: Heart
174
+ }, {
175
+ id: 'profile',
176
+ label: 'Profile',
177
+ icon: Users
178
+ }],
179
+ variant: 'sidebar',
180
+ isMobile: true,
181
+ soundConfig: {
182
+ onClick: 'click',
183
+ onHover: 'hover'
184
+ }
185
+ }
186
+ }`,...(J=(G=I.parameters)==null?void 0:G.docs)==null?void 0:J.source}}};const Xn=["SidebarDefault","TopNavigation","MinimalNavigation","DashboardNav","MobileWithSounds"];export{w as DashboardNav,k as MinimalNavigation,I as MobileWithSounds,f as SidebarDefault,N as TopNavigation,Xn as __namedExportsOrder,Yn as default};
@@ -1,4 +1,4 @@
1
- import{r as v,j as _}from"./iframe-B8pH-Lvr.js";import"./preload-helper-C1FmrZbK.js";const q={"noise-overlay":"_noise-overlay_1esbx_1"},S=({patternSize:x=250,patternScaleX:y=1,patternScaleY:z=1,patternRefreshInterval:i=2,patternAlpha:c=15})=>{const u=v.useRef(null);return v.useEffect(()=>{const e=u.current;if(!e)return;const s=e.getContext("2d",{alpha:!0});if(!s)return;let d=0,p;const r=1024,o=()=>{e&&(e.width=r,e.height=r,e.style.width="100vw",e.style.height="100vh")},R=()=>{const m=s.createImageData(r,r),a=m.data;for(let t=0;t<a.length;t+=4){const l=Math.random()*255;a[t]=l,a[t+1]=l,a[t+2]=l,a[t+3]=c}s.putImageData(m,0,0)},f=()=>{d%i===0&&R(),d++,p=window.requestAnimationFrame(f)};return window.addEventListener("resize",o),o(),f(),()=>{window.removeEventListener("resize",o),window.cancelAnimationFrame(p)}},[x,y,z,i,c]),_.jsx("canvas",{className:`${q["noise-overlay"]}`,ref:u,style:{imageRendering:"pixelated"}})};S.__docgenInfo={description:"",methods:[],displayName:"Noise",props:{patternSize:{defaultValue:{value:"250",computed:!1},required:!1},patternScaleX:{defaultValue:{value:"1",computed:!1},required:!1},patternScaleY:{defaultValue:{value:"1",computed:!1},required:!1},patternRefreshInterval:{defaultValue:{value:"2",computed:!1},required:!1},patternAlpha:{defaultValue:{value:"15",computed:!1},required:!1}}};const A={title:"ReactBits/Animations/Noise",component:S,parameters:{layout:"fullscreen"},tags:["autodocs"]},n={args:{patternSize:250,patternScaleX:1,patternScaleY:1,patternRefreshInterval:2,patternAlpha:15}};var g,h,w;n.parameters={...n.parameters,docs:{...(g=n.parameters)==null?void 0:g.docs,source:{originalSource:`{
1
+ import{r as v,j as _}from"./iframe-Cw8dCV4Z.js";import"./preload-helper-C1FmrZbK.js";const q={"noise-overlay":"_noise-overlay_1esbx_1"},S=({patternSize:x=250,patternScaleX:y=1,patternScaleY:z=1,patternRefreshInterval:i=2,patternAlpha:c=15})=>{const u=v.useRef(null);return v.useEffect(()=>{const e=u.current;if(!e)return;const s=e.getContext("2d",{alpha:!0});if(!s)return;let d=0,p;const r=1024,o=()=>{e&&(e.width=r,e.height=r,e.style.width="100vw",e.style.height="100vh")},R=()=>{const m=s.createImageData(r,r),a=m.data;for(let t=0;t<a.length;t+=4){const l=Math.random()*255;a[t]=l,a[t+1]=l,a[t+2]=l,a[t+3]=c}s.putImageData(m,0,0)},f=()=>{d%i===0&&R(),d++,p=window.requestAnimationFrame(f)};return window.addEventListener("resize",o),o(),f(),()=>{window.removeEventListener("resize",o),window.cancelAnimationFrame(p)}},[x,y,z,i,c]),_.jsx("canvas",{className:`${q["noise-overlay"]}`,ref:u,style:{imageRendering:"pixelated"}})};S.__docgenInfo={description:"",methods:[],displayName:"Noise",props:{patternSize:{defaultValue:{value:"250",computed:!1},required:!1},patternScaleX:{defaultValue:{value:"1",computed:!1},required:!1},patternScaleY:{defaultValue:{value:"1",computed:!1},required:!1},patternRefreshInterval:{defaultValue:{value:"2",computed:!1},required:!1},patternAlpha:{defaultValue:{value:"15",computed:!1},required:!1}}};const A={title:"ReactBits/Animations/Noise",component:S,parameters:{layout:"fullscreen"}},n={args:{patternSize:250,patternScaleX:1,patternScaleY:1,patternRefreshInterval:2,patternAlpha:15}};var h,g,w;n.parameters={...n.parameters,docs:{...(h=n.parameters)==null?void 0:h.docs,source:{originalSource:`{
2
2
  args: {
3
3
  patternSize: 250,
4
4
  patternScaleX: 1,
@@ -6,4 +6,4 @@ import{r as v,j as _}from"./iframe-B8pH-Lvr.js";import"./preload-helper-C1FmrZbK
6
6
  patternRefreshInterval: 2,
7
7
  patternAlpha: 15
8
8
  }
9
- }`,...(w=(h=n.parameters)==null?void 0:h.docs)==null?void 0:w.source}}};const D=["Default"];export{n as Default,D as __namedExportsOrder,A as default};
9
+ }`,...(w=(g=n.parameters)==null?void 0:g.docs)==null?void 0:w.source}}};const D=["Default"];export{n as Default,D as __namedExportsOrder,A as default};
@@ -1,4 +1,4 @@
1
- import{r as c,j as e}from"./iframe-B8pH-Lvr.js";import{u as F}from"./useSound-Bk2W5gkV.js";import{m as C}from"./proxy-BA3VZtN5.js";import{A as K}from"./index-DBfrIdYd.js";const U="_container_zx89l_1",J="_header_zx89l_8",Q="_icon_zx89l_14",X="_label_zx89l_22",G="_stepper_zx89l_31",O="_disabled_zx89l_49",Y="_button_zx89l_55",Z="_buttonIcon_zx89l_103",ee="_valueContainer_zx89l_114",ae="_valueWrapper_zx89l_124",te="_value_zx89l_114",ne="_limits_zx89l_150",re="_limit_zx89l_150",le="_small_zx89l_163",ie="_large_zx89l_187",se="_outlined_zx89l_212",oe="_filled_zx89l_225",ue="_minimal_zx89l_290",ce="_custom_zx89l_326",pe="_vertical_zx89l_338",de="_pulse_zx89l_1",a={container:U,header:J,icon:Q,label:X,stepper:G,disabled:O,button:Y,buttonIcon:Z,valueContainer:ee,valueWrapper:ae,value:te,limits:ne,limit:re,small:le,large:ie,outlined:se,filled:oe,minimal:ue,custom:ce,vertical:pe,pulse:de},me=({value:i,onChange:s,min:r=-1/0,max:l=1/0,step:o=1,label:d,icon:f,disabled:u=!1,size:M="medium",variant:g="default",showPlusMinus:N=!1,allowKeyboard:R=!0,className:L="",customStyles:n={},customButtons:w={},hideLimits:k=!1,layout:W="horizontal",soundConfig:B})=>{const{handlers:H,playSound:v}=F(B),[y,I]=c.useState(!1),[S,P]=c.useState(!1),[m,b]=c.useState(i);c.useEffect(()=>{b(i)},[i]);const x=c.useCallback(()=>{if(u||i>=l)return;v("click");const t=Math.min(i+o,l);s(t),I(!0),setTimeout(()=>I(!1),200)},[i,s,l,o,u,v]),_=c.useCallback(()=>{if(u||i<=r)return;v("click");const t=Math.max(i-o,r);s(t),P(!0),setTimeout(()=>P(!1),200)},[i,s,r,o,u,v]),E=c.useCallback(t=>{if(!(!R||u))switch(t.key){case"ArrowUp":t.preventDefault(),x();break;case"ArrowDown":t.preventDefault(),_();break;case"PageUp":{t.preventDefault();const p=Math.min(i+o*10,l);s(p);break}case"PageDown":{t.preventDefault();const p=Math.max(i-o*10,r);s(p);break}case"Home":t.preventDefault(),r!==-1/0&&s(r);break;case"End":t.preventDefault(),l!==1/0&&s(l);break}},[R,u,x,_,i,o,r,l,s]),A=c.useCallback(t=>{const p=t.target.value;if(p===""||p==="-"){b(p);return}const D=parseFloat(p);isNaN(D)||b(D)},[]),$=c.useCallback(()=>{let t=typeof m=="string"?m===""||m==="-"?r:parseFloat(m):m;isNaN(t)&&(t=r),t=Math.max(r,Math.min(l,t)),o!==1&&(t=Math.round(t/o)*o),s(t),b(t)},[m,r,l,o,s]),j=[a.container,a[M],a[g],W==="vertical"&&a.vertical,u&&a.disabled,L].filter(Boolean).join(" "),[q,h]=c.useState(null),z=u||i<=r,T=u||i>=l,V=e.jsxs("div",{className:a.stepper,style:n.stepper,onKeyDown:E,tabIndex:u?-1:0,...H,children:[e.jsx(C.button,{className:a.button,style:{...n.button,...q==="decrement"&&n.buttonHover},onMouseEnter:()=>h("decrement"),onMouseLeave:()=>h(null),onClick:_,disabled:z,whileTap:z?void 0:{scale:.9},animate:S?{scale:[1,1.2,1]}:void 0,transition:{duration:.2},"aria-label":"Decrease value",children:w.decrement||(N?e.jsx("span",{className:a.buttonIcon,style:n.buttonIcon,children:"−"}):e.jsx("svg",{className:a.buttonIcon,style:n.buttonIcon,viewBox:"0 0 24 24",fill:"none",children:e.jsx("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))}),e.jsx("div",{className:a.valueContainer,style:n.valueContainer,children:e.jsx(K,{mode:"wait",children:e.jsx(C.div,{initial:{y:y?10:S?-10:0,opacity:0},animate:{y:0,opacity:1},exit:{y:y?-10:S?10:0,opacity:0},transition:{duration:.15},className:a.valueWrapper,children:e.jsx("input",{type:"text",className:a.value,style:n.value,value:m,onChange:A,onBlur:$,disabled:u,"aria-label":d||"Number input","aria-valuemin":r,"aria-valuemax":l,"aria-valuenow":i})},i)})}),e.jsx(C.button,{className:a.button,style:{...n.button,...q==="increment"&&n.buttonHover},onMouseEnter:()=>h("increment"),onMouseLeave:()=>h(null),onClick:x,disabled:T,whileTap:T?void 0:{scale:.9},animate:y?{scale:[1,1.2,1]}:void 0,transition:{duration:.2},"aria-label":"Increase value",children:w.increment||(N?e.jsx("span",{className:a.buttonIcon,style:n.buttonIcon,children:"+"}):e.jsx("svg",{className:a.buttonIcon,style:n.buttonIcon,viewBox:"0 0 24 24",fill:"none",children:e.jsx("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))})]});return g==="custom"&&(d||f)?e.jsxs("div",{className:j,style:{...n.container,display:"flex",alignItems:"center"},children:[e.jsxs("div",{className:a.header,style:{...n.header,flex:1,marginBottom:0},children:[f&&e.jsx("span",{className:a.icon,style:n.icon,children:f}),d&&e.jsx("label",{className:a.label,style:n.label,children:d})]}),V,!k&&(r!==-1/0||l!==1/0)&&e.jsxs("div",{className:a.limits,style:n.limits,children:[e.jsx("span",{className:a.limit,children:r!==-1/0&&`Min: ${r}`}),e.jsx("span",{className:a.limit,children:l!==1/0&&`Max: ${l}`})]})]}):e.jsxs("div",{className:j,style:n.container,children:[(d||f)&&e.jsxs("div",{className:a.header,style:n.header,children:[f&&e.jsx("span",{className:a.icon,style:n.icon,children:f}),d&&e.jsx("label",{className:a.label,style:n.label,children:d})]}),V,!k&&(r!==-1/0||l!==1/0)&&e.jsxs("div",{className:a.limits,style:n.limits,children:[e.jsx("span",{className:a.limit,children:r!==-1/0&&`Min: ${r}`}),e.jsx("span",{className:a.limit,children:l!==1/0&&`Max: ${l}`})]})]})};me.__docgenInfo={description:`NumberStepper Component
1
+ import{r as c,j as e}from"./iframe-Cw8dCV4Z.js";import{u as F}from"./useSound-D23BsIr4.js";import{m as C}from"./proxy-p8L3T_Zy.js";import{A as K}from"./index-CzApopWo.js";const U="_container_zx89l_1",J="_header_zx89l_8",Q="_icon_zx89l_14",X="_label_zx89l_22",G="_stepper_zx89l_31",O="_disabled_zx89l_49",Y="_button_zx89l_55",Z="_buttonIcon_zx89l_103",ee="_valueContainer_zx89l_114",ae="_valueWrapper_zx89l_124",te="_value_zx89l_114",ne="_limits_zx89l_150",re="_limit_zx89l_150",le="_small_zx89l_163",ie="_large_zx89l_187",se="_outlined_zx89l_212",oe="_filled_zx89l_225",ue="_minimal_zx89l_290",ce="_custom_zx89l_326",pe="_vertical_zx89l_338",de="_pulse_zx89l_1",a={container:U,header:J,icon:Q,label:X,stepper:G,disabled:O,button:Y,buttonIcon:Z,valueContainer:ee,valueWrapper:ae,value:te,limits:ne,limit:re,small:le,large:ie,outlined:se,filled:oe,minimal:ue,custom:ce,vertical:pe,pulse:de},me=({value:i,onChange:s,min:r=-1/0,max:l=1/0,step:o=1,label:d,icon:f,disabled:u=!1,size:M="medium",variant:g="default",showPlusMinus:N=!1,allowKeyboard:R=!0,className:L="",customStyles:n={},customButtons:w={},hideLimits:k=!1,layout:W="horizontal",soundConfig:B})=>{const{handlers:H,playSound:v}=F(B),[y,I]=c.useState(!1),[S,P]=c.useState(!1),[m,b]=c.useState(i);c.useEffect(()=>{b(i)},[i]);const x=c.useCallback(()=>{if(u||i>=l)return;v("click");const t=Math.min(i+o,l);s(t),I(!0),setTimeout(()=>I(!1),200)},[i,s,l,o,u,v]),_=c.useCallback(()=>{if(u||i<=r)return;v("click");const t=Math.max(i-o,r);s(t),P(!0),setTimeout(()=>P(!1),200)},[i,s,r,o,u,v]),E=c.useCallback(t=>{if(!(!R||u))switch(t.key){case"ArrowUp":t.preventDefault(),x();break;case"ArrowDown":t.preventDefault(),_();break;case"PageUp":{t.preventDefault();const p=Math.min(i+o*10,l);s(p);break}case"PageDown":{t.preventDefault();const p=Math.max(i-o*10,r);s(p);break}case"Home":t.preventDefault(),r!==-1/0&&s(r);break;case"End":t.preventDefault(),l!==1/0&&s(l);break}},[R,u,x,_,i,o,r,l,s]),A=c.useCallback(t=>{const p=t.target.value;if(p===""||p==="-"){b(p);return}const D=parseFloat(p);isNaN(D)||b(D)},[]),$=c.useCallback(()=>{let t=typeof m=="string"?m===""||m==="-"?r:parseFloat(m):m;isNaN(t)&&(t=r),t=Math.max(r,Math.min(l,t)),o!==1&&(t=Math.round(t/o)*o),s(t),b(t)},[m,r,l,o,s]),j=[a.container,a[M],a[g],W==="vertical"&&a.vertical,u&&a.disabled,L].filter(Boolean).join(" "),[q,h]=c.useState(null),z=u||i<=r,T=u||i>=l,V=e.jsxs("div",{className:a.stepper,style:n.stepper,onKeyDown:E,tabIndex:u?-1:0,...H,children:[e.jsx(C.button,{className:a.button,style:{...n.button,...q==="decrement"&&n.buttonHover},onMouseEnter:()=>h("decrement"),onMouseLeave:()=>h(null),onClick:_,disabled:z,whileTap:z?void 0:{scale:.9},animate:S?{scale:[1,1.2,1]}:void 0,transition:{duration:.2},"aria-label":"Decrease value",children:w.decrement||(N?e.jsx("span",{className:a.buttonIcon,style:n.buttonIcon,children:"−"}):e.jsx("svg",{className:a.buttonIcon,style:n.buttonIcon,viewBox:"0 0 24 24",fill:"none",children:e.jsx("path",{d:"M15 18L9 12L15 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))}),e.jsx("div",{className:a.valueContainer,style:n.valueContainer,children:e.jsx(K,{mode:"wait",children:e.jsx(C.div,{initial:{y:y?10:S?-10:0,opacity:0},animate:{y:0,opacity:1},exit:{y:y?-10:S?10:0,opacity:0},transition:{duration:.15},className:a.valueWrapper,children:e.jsx("input",{type:"text",className:a.value,style:n.value,value:m,onChange:A,onBlur:$,disabled:u,"aria-label":d||"Number input","aria-valuemin":r,"aria-valuemax":l,"aria-valuenow":i})},i)})}),e.jsx(C.button,{className:a.button,style:{...n.button,...q==="increment"&&n.buttonHover},onMouseEnter:()=>h("increment"),onMouseLeave:()=>h(null),onClick:x,disabled:T,whileTap:T?void 0:{scale:.9},animate:y?{scale:[1,1.2,1]}:void 0,transition:{duration:.2},"aria-label":"Increase value",children:w.increment||(N?e.jsx("span",{className:a.buttonIcon,style:n.buttonIcon,children:"+"}):e.jsx("svg",{className:a.buttonIcon,style:n.buttonIcon,viewBox:"0 0 24 24",fill:"none",children:e.jsx("path",{d:"M9 18L15 12L9 6",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}))})]});return g==="custom"&&(d||f)?e.jsxs("div",{className:j,style:{...n.container,display:"flex",alignItems:"center"},children:[e.jsxs("div",{className:a.header,style:{...n.header,flex:1,marginBottom:0},children:[f&&e.jsx("span",{className:a.icon,style:n.icon,children:f}),d&&e.jsx("label",{className:a.label,style:n.label,children:d})]}),V,!k&&(r!==-1/0||l!==1/0)&&e.jsxs("div",{className:a.limits,style:n.limits,children:[e.jsx("span",{className:a.limit,children:r!==-1/0&&`Min: ${r}`}),e.jsx("span",{className:a.limit,children:l!==1/0&&`Max: ${l}`})]})]}):e.jsxs("div",{className:j,style:n.container,children:[(d||f)&&e.jsxs("div",{className:a.header,style:n.header,children:[f&&e.jsx("span",{className:a.icon,style:n.icon,children:f}),d&&e.jsx("label",{className:a.label,style:n.label,children:d})]}),V,!k&&(r!==-1/0||l!==1/0)&&e.jsxs("div",{className:a.limits,style:n.limits,children:[e.jsx("span",{className:a.limit,children:r!==-1/0&&`Min: ${r}`}),e.jsx("span",{className:a.limit,children:l!==1/0&&`Max: ${l}`})]})]})};me.__docgenInfo={description:`NumberStepper Component
2
2
 
3
3
  @component
4
4
  @description
@@ -0,0 +1,88 @@
1
+ import{j as n,r as p}from"./iframe-Cw8dCV4Z.js";import{N as r}from"./NumberStepper-DH9y3k8b.js";import"./preload-helper-C1FmrZbK.js";import"./useSound-D23BsIr4.js";import"./proxy-p8L3T_Zy.js";import"./MotionConfigContext-BCa1jVYq.js";import"./index-CzApopWo.js";const T={title:"Atoms/NumberStepper",component:r,parameters:{layout:"centered"},argTypes:{value:{control:{type:"number"}},onChange:{action:"changed"},min:{control:{type:"number"}},max:{control:{type:"number"}},step:{control:{type:"number"}},label:{control:"text"},icon:{control:"text"},disabled:{control:"boolean"},size:{control:{type:"select"},options:["small","medium","large"]},variant:{control:{type:"select"},options:["default","outlined","filled","minimal","custom"]},showPlusMinus:{control:"boolean"},allowKeyboard:{control:"boolean"}}},m=e=>{const[c,u]=p.useState(e.value||0);return n.jsx(r,{...e,value:c,onChange:a=>{var t;u(a),(t=e.onChange)==null||t.call(e,a)}})},o={render:e=>n.jsx(m,{...e}),args:{value:5,min:0,max:10,step:1}},s={render:e=>n.jsx(m,{...e}),args:{value:5,min:0,max:100,step:1,label:"Cigarettes",icon:"🚬"}},l={render:()=>{const[e,c]=p.useState(0),[u,a]=p.useState(0),[t,j]=p.useState(7);return n.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:[n.jsx(r,{value:e,onChange:c,min:0,max:10,step:1,label:"Glasses of Water",icon:"💧",variant:"filled"}),n.jsx(r,{value:u,onChange:a,min:0,max:120,step:15,label:"Exercise (minutes)",icon:"🏃",variant:"outlined"}),n.jsx(r,{value:t,onChange:j,min:0,max:12,step:.5,label:"Hours of Sleep",icon:"😴"})]})}},i={render:e=>n.jsx(m,{...e}),args:{value:100,min:0,max:999,step:1,label:"Health Points",icon:"❤️",showPlusMinus:!0,customStyles:{container:{background:"#1a1a2e",border:"2px solid #16213e",borderRadius:"12px",padding:"16px"},header:{marginBottom:"12px"},label:{color:"#eaeaea",fontSize:"14px",textTransform:"uppercase",letterSpacing:"1px"},icon:{filter:"drop-shadow(0 0 10px rgba(255, 0, 0, 0.5))"},stepper:{background:"#0f3460",borderRadius:"8px",padding:"8px"},button:{background:"#e94560",color:"white",border:"none",borderRadius:"6px",transition:"all 0.3s ease"},buttonHover:{background:"#ff4666",boxShadow:"0 0 20px rgba(233, 69, 96, 0.5)"},value:{color:"#00ff00",fontSize:"28px",fontFamily:"monospace",fontWeight:"bold",textShadow:"0 0 10px rgba(0, 255, 0, 0.5)"}}}};var d,x,b;o.parameters={...o.parameters,docs:{...(d=o.parameters)==null?void 0:d.docs,source:{originalSource:`{
2
+ render: args => <NumberStepperWrapper {...args} />,
3
+ args: {
4
+ value: 5,
5
+ min: 0,
6
+ max: 10,
7
+ step: 1
8
+ }
9
+ }`,...(b=(x=o.parameters)==null?void 0:x.docs)==null?void 0:b.source}}};var g,f,S;s.parameters={...s.parameters,docs:{...(g=s.parameters)==null?void 0:g.docs,source:{originalSource:`{
10
+ render: args => <NumberStepperWrapper {...args} />,
11
+ args: {
12
+ value: 5,
13
+ min: 0,
14
+ max: 100,
15
+ step: 1,
16
+ label: 'Cigarettes',
17
+ icon: '🚬'
18
+ }
19
+ }`,...(S=(f=s.parameters)==null?void 0:f.docs)==null?void 0:S.source}}};var h,v,y;l.parameters={...l.parameters,docs:{...(h=l.parameters)==null?void 0:h.docs,source:{originalSource:`{
20
+ render: () => {
21
+ const [water, setWater] = useState(0);
22
+ const [exercise, setExercise] = useState(0);
23
+ const [sleep, setSleep] = useState(7);
24
+ return <div style={{
25
+ display: 'flex',
26
+ flexDirection: 'column',
27
+ gap: '20px'
28
+ }}>
29
+ <NumberStepper value={water} onChange={setWater} min={0} max={10} step={1} label="Glasses of Water" icon="💧" variant="filled" />
30
+ <NumberStepper value={exercise} onChange={setExercise} min={0} max={120} step={15} label="Exercise (minutes)" icon="🏃" variant="outlined" />
31
+ <NumberStepper value={sleep} onChange={setSleep} min={0} max={12} step={0.5} label="Hours of Sleep" icon="😴" />
32
+ </div>;
33
+ }
34
+ }`,...(y=(v=l.parameters)==null?void 0:v.docs)==null?void 0:y.source}}};var w,C,W;i.parameters={...i.parameters,docs:{...(w=i.parameters)==null?void 0:w.docs,source:{originalSource:`{
35
+ render: args => <NumberStepperWrapper {...args} />,
36
+ args: {
37
+ value: 100,
38
+ min: 0,
39
+ max: 999,
40
+ step: 1,
41
+ label: 'Health Points',
42
+ icon: '❤️',
43
+ showPlusMinus: true,
44
+ customStyles: {
45
+ container: {
46
+ background: '#1a1a2e',
47
+ border: '2px solid #16213e',
48
+ borderRadius: '12px',
49
+ padding: '16px'
50
+ },
51
+ header: {
52
+ marginBottom: '12px'
53
+ },
54
+ label: {
55
+ color: '#eaeaea',
56
+ fontSize: '14px',
57
+ textTransform: 'uppercase',
58
+ letterSpacing: '1px'
59
+ },
60
+ icon: {
61
+ filter: 'drop-shadow(0 0 10px rgba(255, 0, 0, 0.5))'
62
+ },
63
+ stepper: {
64
+ background: '#0f3460',
65
+ borderRadius: '8px',
66
+ padding: '8px'
67
+ },
68
+ button: {
69
+ background: '#e94560',
70
+ color: 'white',
71
+ border: 'none',
72
+ borderRadius: '6px',
73
+ transition: 'all 0.3s ease'
74
+ },
75
+ buttonHover: {
76
+ background: '#ff4666',
77
+ boxShadow: '0 0 20px rgba(233, 69, 96, 0.5)'
78
+ },
79
+ value: {
80
+ color: '#00ff00',
81
+ fontSize: '28px',
82
+ fontFamily: 'monospace',
83
+ fontWeight: 'bold',
84
+ textShadow: '0 0 10px rgba(0, 255, 0, 0.5)'
85
+ }
86
+ }
87
+ }
88
+ }`,...(W=(C=i.parameters)==null?void 0:C.docs)==null?void 0:W.source}}};const D=["Default","WithLabelAndIcon","HabitTracking","CustomStyled"];export{i as CustomStyled,o as Default,l as HabitTracking,s as WithLabelAndIcon,D as __namedExportsOrder,T as default};
@@ -1,4 +1,4 @@
1
- import{r as E,j as D}from"./iframe-B8pH-Lvr.js";import{R as P,P as U,V as g,M as W}from"./Mesh-CwXV3WjE.js";import{T as X}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const Y={"orb-container":"_orb-container_r9fzx_1"};function j({hue:o=0,hoverIntensity:a=.2,rotateOnHover:n=!0,forceHoverState:c=!1,backgroundColor:i="#000000"}){const l=E.useRef(null),h=`
1
+ import{r as E,j as D}from"./iframe-Cw8dCV4Z.js";import{R as P,P as U,V as g,M as W}from"./Mesh-CwXV3WjE.js";import{T as X}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const Y={"orb-container":"_orb-container_r9fzx_1"};function j({hue:o=0,hoverIntensity:a=.2,rotateOnHover:n=!0,forceHoverState:c=!1,backgroundColor:i="#000000"}){const l=E.useRef(null),h=`
2
2
  precision highp float;
3
3
  attribute vec2 position;
4
4
  attribute vec2 uv;
@@ -166,7 +166,7 @@ import{r as E,j as D}from"./iframe-B8pH-Lvr.js";import{R as P,P as U,V as g,M as
166
166
  vec4 col = mainImage(fragCoord);
167
167
  gl_FragColor = vec4(col.rgb * col.a, col.a);
168
168
  }
169
- `;return E.useEffect(()=>{const t=l.current;if(!t)return;const v=new P({alpha:!0,premultipliedAlpha:!1}),e=v.gl;e.clearColor(0,0,0,0),t.appendChild(e.canvas);const s=new X(e),u=new U(e,{vertex:h,fragment:m,uniforms:{iTime:{value:0},iResolution:{value:new g(e.canvas.width,e.canvas.height,e.canvas.width/e.canvas.height)},hue:{value:o},hover:{value:0},rot:{value:0},hoverIntensity:{value:a},backgroundColor:{value:H(i)}}}),B=new W(e,{geometry:s,program:u});function x(){if(!t)return;const r=window.devicePixelRatio||1,d=t.clientWidth,f=t.clientHeight;v.setSize(d*r,f*r),e.canvas.style.width=d+"px",e.canvas.style.height=f+"px",u.uniforms.iResolution.value.set(e.canvas.width,e.canvas.height,e.canvas.width/e.canvas.height)}window.addEventListener("resize",x),x();let p=0,C=0,w=0;const S=.3,R=r=>{const d=t.getBoundingClientRect(),f=r.clientX-d.left,F=r.clientY-d.top,z=d.width,A=d.height,L=Math.min(z,A),K=z/2,O=A/2,k=(f-K)/L*2,T=(F-O)/L*2;Math.sqrt(k*k+T*T)<.8?p=1:p=0},I=()=>{p=0};t.addEventListener("mousemove",R),t.addEventListener("mouseleave",I);let b;const q=r=>{b=requestAnimationFrame(q);const d=(r-C)*.001;C=r,u.uniforms.iTime.value=r*.001,u.uniforms.hue.value=o,u.uniforms.hoverIntensity.value=a,u.uniforms.backgroundColor.value=H(i);const f=c?1:p;u.uniforms.hover.value+=(f-u.uniforms.hover.value)*.1,n&&f>.5&&(w+=d*S),u.uniforms.rot.value=w,v.render({scene:B})};return b=requestAnimationFrame(q),()=>{var r;cancelAnimationFrame(b),window.removeEventListener("resize",x),t.removeEventListener("mousemove",R),t.removeEventListener("mouseleave",I),t.removeChild(e.canvas),(r=e.getExtension("WEBGL_lose_context"))==null||r.loseContext()}},[o,a,n,c,i]),D.jsx("div",{ref:l,className:`${Y["orb-container"]}`})}function N(o,a,n){let c,i,l;if(a===0)c=i=l=n;else{const h=(v,e,s)=>(s<0&&(s+=1),s>1&&(s-=1),s<.16666666666666666?v+(e-v)*6*s:s<.5?e:s<.6666666666666666?v+(e-v)*(.6666666666666666-s)*6:v),m=n<.5?n*(1+a):n+a-n*a,t=2*n-m;c=h(t,m,o+1/3),i=h(t,m,o),l=h(t,m,o-1/3)}return new g(c,i,l)}function H(o){if(o.startsWith("#")){const c=parseInt(o.slice(1,3),16)/255,i=parseInt(o.slice(3,5),16)/255,l=parseInt(o.slice(5,7),16)/255;return new g(c,i,l)}const a=o.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(a)return new g(parseInt(a[1])/255,parseInt(a[2])/255,parseInt(a[3])/255);const n=o.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%/);if(n){const c=parseInt(n[1])/360,i=parseInt(n[2])/100,l=parseInt(n[3])/100;return N(c,i,l)}return new g(0,0,0)}j.__docgenInfo={description:"",methods:[],displayName:"Orb",props:{hue:{defaultValue:{value:"0",computed:!1},required:!1},hoverIntensity:{defaultValue:{value:"0.2",computed:!1},required:!1},rotateOnHover:{defaultValue:{value:"true",computed:!1},required:!1},forceHoverState:{defaultValue:{value:"false",computed:!1},required:!1},backgroundColor:{defaultValue:{value:"'#000000'",computed:!1},required:!1}}};const Z={title:"ReactBits/Backgrounds/Orb",component:j,parameters:{layout:"fullscreen"},tags:["autodocs"]},y={args:{hue:0,hoverIntensity:.2,rotateOnHover:!0,forceHoverState:!1,backgroundColor:"#000000"}};var _,M,V;y.parameters={...y.parameters,docs:{...(_=y.parameters)==null?void 0:_.docs,source:{originalSource:`{
169
+ `;return E.useEffect(()=>{const t=l.current;if(!t)return;const v=new P({alpha:!0,premultipliedAlpha:!1}),e=v.gl;e.clearColor(0,0,0,0),t.appendChild(e.canvas);const s=new X(e),u=new U(e,{vertex:h,fragment:m,uniforms:{iTime:{value:0},iResolution:{value:new g(e.canvas.width,e.canvas.height,e.canvas.width/e.canvas.height)},hue:{value:o},hover:{value:0},rot:{value:0},hoverIntensity:{value:a},backgroundColor:{value:H(i)}}}),B=new W(e,{geometry:s,program:u});function x(){if(!t)return;const r=window.devicePixelRatio||1,d=t.clientWidth,f=t.clientHeight;v.setSize(d*r,f*r),e.canvas.style.width=d+"px",e.canvas.style.height=f+"px",u.uniforms.iResolution.value.set(e.canvas.width,e.canvas.height,e.canvas.width/e.canvas.height)}window.addEventListener("resize",x),x();let p=0,C=0,w=0;const S=.3,R=r=>{const d=t.getBoundingClientRect(),f=r.clientX-d.left,F=r.clientY-d.top,z=d.width,A=d.height,L=Math.min(z,A),K=z/2,O=A/2,k=(f-K)/L*2,T=(F-O)/L*2;Math.sqrt(k*k+T*T)<.8?p=1:p=0},I=()=>{p=0};t.addEventListener("mousemove",R),t.addEventListener("mouseleave",I);let b;const q=r=>{b=requestAnimationFrame(q);const d=(r-C)*.001;C=r,u.uniforms.iTime.value=r*.001,u.uniforms.hue.value=o,u.uniforms.hoverIntensity.value=a,u.uniforms.backgroundColor.value=H(i);const f=c?1:p;u.uniforms.hover.value+=(f-u.uniforms.hover.value)*.1,n&&f>.5&&(w+=d*S),u.uniforms.rot.value=w,v.render({scene:B})};return b=requestAnimationFrame(q),()=>{var r;cancelAnimationFrame(b),window.removeEventListener("resize",x),t.removeEventListener("mousemove",R),t.removeEventListener("mouseleave",I),t.removeChild(e.canvas),(r=e.getExtension("WEBGL_lose_context"))==null||r.loseContext()}},[o,a,n,c,i]),D.jsx("div",{ref:l,className:`${Y["orb-container"]}`})}function N(o,a,n){let c,i,l;if(a===0)c=i=l=n;else{const h=(v,e,s)=>(s<0&&(s+=1),s>1&&(s-=1),s<.16666666666666666?v+(e-v)*6*s:s<.5?e:s<.6666666666666666?v+(e-v)*(.6666666666666666-s)*6:v),m=n<.5?n*(1+a):n+a-n*a,t=2*n-m;c=h(t,m,o+1/3),i=h(t,m,o),l=h(t,m,o-1/3)}return new g(c,i,l)}function H(o){if(o.startsWith("#")){const c=parseInt(o.slice(1,3),16)/255,i=parseInt(o.slice(3,5),16)/255,l=parseInt(o.slice(5,7),16)/255;return new g(c,i,l)}const a=o.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);if(a)return new g(parseInt(a[1])/255,parseInt(a[2])/255,parseInt(a[3])/255);const n=o.match(/hsla?\((\d+),\s*(\d+)%,\s*(\d+)%/);if(n){const c=parseInt(n[1])/360,i=parseInt(n[2])/100,l=parseInt(n[3])/100;return N(c,i,l)}return new g(0,0,0)}j.__docgenInfo={description:"",methods:[],displayName:"Orb",props:{hue:{defaultValue:{value:"0",computed:!1},required:!1},hoverIntensity:{defaultValue:{value:"0.2",computed:!1},required:!1},rotateOnHover:{defaultValue:{value:"true",computed:!1},required:!1},forceHoverState:{defaultValue:{value:"false",computed:!1},required:!1},backgroundColor:{defaultValue:{value:"'#000000'",computed:!1},required:!1}}};const Z={title:"ReactBits/Backgrounds/Orb",component:j,parameters:{layout:"fullscreen"}},y={args:{hue:0,hoverIntensity:.2,rotateOnHover:!0,forceHoverState:!1,backgroundColor:"#000000"}};var _,M,V;y.parameters={...y.parameters,docs:{...(_=y.parameters)==null?void 0:_.docs,source:{originalSource:`{
170
170
  args: {
171
171
  hue: 0,
172
172
  hoverIntensity: 0.2,
@@ -1,4 +1,4 @@
1
- import{r as j,j as c}from"./iframe-B8pH-Lvr.js";import{u as K}from"./use-motion-value--XhiA2Gt.js";import{a as Q}from"./index-BN99WpBo.js";import{u as U}from"./use-transform-vyDqMhf-.js";import{m as X}from"./proxy-BA3VZtN5.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-D5hZdVGx.js";const g={"orbit-container":"_orbit-container_tujj3_1","orbit-scaling-container":"_orbit-scaling-container_tujj3_7","orbit-rotation-wrapper":"_orbit-rotation-wrapper_tujj3_20","orbit-path-svg":"_orbit-path-svg_tujj3_27","orbit-item":"_orbit-item_tujj3_33","orbit-center-content":"_orbit-center-content_tujj3_39","orbit-image":"_orbit-image_tujj3_48"};function P(e,t,r,a){return`M ${e-r} ${t} A ${r} ${a} 0 1 0 ${e+r} ${t} A ${r} ${a} 0 1 0 ${e-r} ${t}`}function S(e,t,r){return P(e,t,r,r)}function Y(e,t,r){const a=r/2;return`M ${e-a} ${t-a} L ${e+a} ${t-a} L ${e+a} ${t+a} L ${e-a} ${t+a} Z`}function x(e,t,r,a){const s=r/2,n=a/2;return`M ${e-s} ${t-n} L ${e+s} ${t-n} L ${e+s} ${t+n} L ${e-s} ${t+n} Z`}function y(e,t,r){const a=r*Math.sqrt(3)/2,s=r/2;return`M ${e} ${t-a/1.5} L ${e+s} ${t+a/3} L ${e-s} ${t+a/3} Z`}function ee(e,t,r,a,s){const n=Math.PI/s;let l="";for(let o=0;o<2*s;o++){const i=o%2===0?r:a,u=o*n-Math.PI/2,f=e+i*Math.cos(u),b=t+i*Math.sin(u);l+=o===0?`M ${f} ${b}`:` L ${f} ${b}`}return l+" Z"}function te(e,t,r){const a=r/30;return`M ${e} ${t+12*a} C ${e-20*a} ${t-5*a}, ${e-12*a} ${t-18*a}, ${e} ${t-8*a} C ${e+12*a} ${t-18*a}, ${e+20*a} ${t-5*a}, ${e} ${t+12*a}`}function ae(e,t,r,a){const s=r/2,n=a/2;return`M ${e} ${t} C ${e+s*.5} ${t-n}, ${e+s} ${t-n}, ${e+s} ${t} C ${e+s} ${t+n}, ${e+s*.5} ${t+n}, ${e} ${t} C ${e-s*.5} ${t+n}, ${e-s} ${t+n}, ${e-s} ${t} C ${e-s} ${t-n}, ${e-s*.5} ${t-n}, ${e} ${t}`}function se(e,t,r,a,s){const n=[],l=s*20,o=r/2;for(let i=0;i<=l;i++){const u=e-o+r*i/l,f=t+Math.sin(i/l*s*2*Math.PI)*a;n.push(i===0?`M ${u} ${f}`:`L ${u} ${f}`)}for(let i=l;i>=0;i--){const u=e-o+r*i/l,f=t-Math.sin(i/l*s*2*Math.PI)*a;n.push(`L ${u} ${f}`)}return n.join(" ")+" Z"}function re({item:e,index:t,totalItems:r,path:a,itemSize:s,rotation:n,progress:l,fill:o}){const i=o?t/r*100:0,u=U(l,f=>`${((f+i)%100+100)%100}%`);return c.jsx(X.div,{className:`${g["orbit-item"]}`,style:{width:s,height:s,offsetPath:`path("${a}")`,offsetRotate:"0deg",offsetAnchor:"center center",offsetDistance:u},children:c.jsx("div",{style:{transform:`rotate(${-n}deg)`},children:e})})}function D({images:e=[],altPrefix:t="Orbiting image",shape:r="ellipse",customPath:a,baseWidth:s=1400,radiusX:n=700,radiusY:l=170,radius:o=300,starPoints:i=5,starInnerRatio:u=.5,rotation:f=-8,duration:b=40,itemSize:T=64,direction:M="normal",fill:W=!0,width:q=100,height:I=100,className:k="",showPath:z=!1,pathColor:B="rgba(0,0,0,0.1)",pathWidth:H=2,easing:w="linear",paused:C=!1,centerContent:L,responsive:h=!1}){const v=j.useRef(null),[O,F]=j.useState(1),d=s/2,p=s/2,R=j.useMemo(()=>{switch(r){case"circle":return S(d,p,o);case"ellipse":return P(d,p,n,l);case"square":return Y(d,p,o*2);case"rectangle":return x(d,p,n*2,l*2);case"triangle":return y(d,p,o*2);case"star":return ee(d,p,o,o*u,i);case"heart":return te(d,p,o*2);case"infinity":return ae(d,p,n*2,l*2);case"wave":return se(d,p,n*2,l,3);case"custom":return a||S(d,p,o);default:return P(d,p,n,l)}},[r,a,d,p,n,l,o,i,u]);j.useEffect(()=>{if(!h||!v.current)return;const m=()=>{v.current&&F(v.current.clientWidth/s)};m();const $=new ResizeObserver(m);return $.observe(v.current),()=>$.disconnect()},[h,s]);const V=K(0);j.useEffect(()=>{if(C)return;const m=Q(V,M==="reverse"?-100:100,{duration:b,ease:w,repeat:1/0,repeatType:"loop"});return()=>m.stop()},[V,b,w,M,C]);const G=h?"100%":typeof q=="number"?q:"100%",J=h?"auto":typeof I=="number"?I:typeof q=="number"?q:"auto",N=e.map((m,$)=>c.jsx("img",{src:m,alt:`${t} ${$+1}`,draggable:!1,className:`${g["orbit-image"]}`},m));return c.jsxs("div",{ref:v,className:`${g["orbit-container"]} ${k}`,style:{width:G,height:J,aspectRatio:h?"1 / 1":void 0},"aria-hidden":"true",children:[c.jsx("div",{className:h?"orbit-scaling-container orbit-scaling-container--responsive":g["orbit-scaling-container"],style:{width:h?s:"100%",height:h?s:"100%",transform:h?`translate(-50%, -50%) scale(${O})`:void 0},children:c.jsxs("div",{className:`${g["orbit-rotation-wrapper"]}`,style:{transform:`rotate(${f}deg)`},children:[z&&c.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${s} ${s}`,className:`${g["orbit-path-svg"]}`,children:c.jsx("path",{d:R,fill:"none",stroke:B,strokeWidth:H/O})}),N.map((m,$)=>c.jsx(re,{item:m,index:$,totalItems:N.length,path:R,itemSize:T,rotation:f,progress:V,fill:W},$))]})}),L&&c.jsx("div",{className:`${g["orbit-center-content"]}`,children:L})]})}D.__docgenInfo={description:"",methods:[],displayName:"OrbitImages",props:{images:{defaultValue:{value:"[]",computed:!1},required:!1},altPrefix:{defaultValue:{value:"'Orbiting image'",computed:!1},required:!1},shape:{defaultValue:{value:"'ellipse'",computed:!1},required:!1},baseWidth:{defaultValue:{value:"1400",computed:!1},required:!1},radiusX:{defaultValue:{value:"700",computed:!1},required:!1},radiusY:{defaultValue:{value:"170",computed:!1},required:!1},radius:{defaultValue:{value:"300",computed:!1},required:!1},starPoints:{defaultValue:{value:"5",computed:!1},required:!1},starInnerRatio:{defaultValue:{value:"0.5",computed:!1},required:!1},rotation:{defaultValue:{value:"-8",computed:!1},required:!1},duration:{defaultValue:{value:"40",computed:!1},required:!1},itemSize:{defaultValue:{value:"64",computed:!1},required:!1},direction:{defaultValue:{value:"'normal'",computed:!1},required:!1},fill:{defaultValue:{value:"true",computed:!1},required:!1},width:{defaultValue:{value:"100",computed:!1},required:!1},height:{defaultValue:{value:"100",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},showPath:{defaultValue:{value:"false",computed:!1},required:!1},pathColor:{defaultValue:{value:"'rgba(0,0,0,0.1)'",computed:!1},required:!1},pathWidth:{defaultValue:{value:"2",computed:!1},required:!1},easing:{defaultValue:{value:"'linear'",computed:!1},required:!1},paused:{defaultValue:{value:"false",computed:!1},required:!1},responsive:{defaultValue:{value:"false",computed:!1},required:!1}}};const pe={title:"ReactBits/Animations/OrbitImages",component:D,parameters:{layout:"fullscreen"},tags:["autodocs"]},_={args:{images:["https://picsum.photos/seed/a/200/200","https://picsum.photos/seed/b/200/200","https://picsum.photos/seed/c/200/200","https://picsum.photos/seed/d/200/200","https://picsum.photos/seed/e/200/200","https://picsum.photos/seed/f/200/200"],altPrefix:"Orbiting image",shape:"ellipse",baseWidth:1400,radiusX:700,radiusY:170,radius:300,starPoints:5,starInnerRatio:.5,rotation:-8,duration:40,itemSize:64,direction:"normal",fill:!0,width:100,height:100,showPath:!1,pathColor:"rgba(0,0,0,0.1)",pathWidth:2,easing:"linear",paused:!1,responsive:!1}};var E,Z,A;_.parameters={..._.parameters,docs:{...(E=_.parameters)==null?void 0:E.docs,source:{originalSource:`{
1
+ import{r as j,j as c}from"./iframe-Cw8dCV4Z.js";import{u as K}from"./use-motion-value-BVm7csqA.js";import{a as Q}from"./index-Bm5msOcI.js";import{u as U}from"./use-transform-CQNghMvr.js";import{m as X}from"./proxy-p8L3T_Zy.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-BCa1jVYq.js";const g={"orbit-container":"_orbit-container_tujj3_1","orbit-scaling-container":"_orbit-scaling-container_tujj3_7","orbit-rotation-wrapper":"_orbit-rotation-wrapper_tujj3_20","orbit-path-svg":"_orbit-path-svg_tujj3_27","orbit-item":"_orbit-item_tujj3_33","orbit-center-content":"_orbit-center-content_tujj3_39","orbit-image":"_orbit-image_tujj3_48"};function P(e,t,r,a){return`M ${e-r} ${t} A ${r} ${a} 0 1 0 ${e+r} ${t} A ${r} ${a} 0 1 0 ${e-r} ${t}`}function S(e,t,r){return P(e,t,r,r)}function Y(e,t,r){const a=r/2;return`M ${e-a} ${t-a} L ${e+a} ${t-a} L ${e+a} ${t+a} L ${e-a} ${t+a} Z`}function x(e,t,r,a){const s=r/2,n=a/2;return`M ${e-s} ${t-n} L ${e+s} ${t-n} L ${e+s} ${t+n} L ${e-s} ${t+n} Z`}function y(e,t,r){const a=r*Math.sqrt(3)/2,s=r/2;return`M ${e} ${t-a/1.5} L ${e+s} ${t+a/3} L ${e-s} ${t+a/3} Z`}function ee(e,t,r,a,s){const n=Math.PI/s;let l="";for(let o=0;o<2*s;o++){const i=o%2===0?r:a,u=o*n-Math.PI/2,f=e+i*Math.cos(u),b=t+i*Math.sin(u);l+=o===0?`M ${f} ${b}`:` L ${f} ${b}`}return l+" Z"}function te(e,t,r){const a=r/30;return`M ${e} ${t+12*a} C ${e-20*a} ${t-5*a}, ${e-12*a} ${t-18*a}, ${e} ${t-8*a} C ${e+12*a} ${t-18*a}, ${e+20*a} ${t-5*a}, ${e} ${t+12*a}`}function ae(e,t,r,a){const s=r/2,n=a/2;return`M ${e} ${t} C ${e+s*.5} ${t-n}, ${e+s} ${t-n}, ${e+s} ${t} C ${e+s} ${t+n}, ${e+s*.5} ${t+n}, ${e} ${t} C ${e-s*.5} ${t+n}, ${e-s} ${t+n}, ${e-s} ${t} C ${e-s} ${t-n}, ${e-s*.5} ${t-n}, ${e} ${t}`}function se(e,t,r,a,s){const n=[],l=s*20,o=r/2;for(let i=0;i<=l;i++){const u=e-o+r*i/l,f=t+Math.sin(i/l*s*2*Math.PI)*a;n.push(i===0?`M ${u} ${f}`:`L ${u} ${f}`)}for(let i=l;i>=0;i--){const u=e-o+r*i/l,f=t-Math.sin(i/l*s*2*Math.PI)*a;n.push(`L ${u} ${f}`)}return n.join(" ")+" Z"}function re({item:e,index:t,totalItems:r,path:a,itemSize:s,rotation:n,progress:l,fill:o}){const i=o?t/r*100:0,u=U(l,f=>`${((f+i)%100+100)%100}%`);return c.jsx(X.div,{className:`${g["orbit-item"]}`,style:{width:s,height:s,offsetPath:`path("${a}")`,offsetRotate:"0deg",offsetAnchor:"center center",offsetDistance:u},children:c.jsx("div",{style:{transform:`rotate(${-n}deg)`},children:e})})}function D({images:e=[],altPrefix:t="Orbiting image",shape:r="ellipse",customPath:a,baseWidth:s=1400,radiusX:n=700,radiusY:l=170,radius:o=300,starPoints:i=5,starInnerRatio:u=.5,rotation:f=-8,duration:b=40,itemSize:T=64,direction:M="normal",fill:W=!0,width:q=100,height:I=100,className:k="",showPath:z=!1,pathColor:B="rgba(0,0,0,0.1)",pathWidth:H=2,easing:w="linear",paused:C=!1,centerContent:L,responsive:h=!1}){const v=j.useRef(null),[O,F]=j.useState(1),d=s/2,p=s/2,R=j.useMemo(()=>{switch(r){case"circle":return S(d,p,o);case"ellipse":return P(d,p,n,l);case"square":return Y(d,p,o*2);case"rectangle":return x(d,p,n*2,l*2);case"triangle":return y(d,p,o*2);case"star":return ee(d,p,o,o*u,i);case"heart":return te(d,p,o*2);case"infinity":return ae(d,p,n*2,l*2);case"wave":return se(d,p,n*2,l,3);case"custom":return a||S(d,p,o);default:return P(d,p,n,l)}},[r,a,d,p,n,l,o,i,u]);j.useEffect(()=>{if(!h||!v.current)return;const m=()=>{v.current&&F(v.current.clientWidth/s)};m();const $=new ResizeObserver(m);return $.observe(v.current),()=>$.disconnect()},[h,s]);const V=K(0);j.useEffect(()=>{if(C)return;const m=Q(V,M==="reverse"?-100:100,{duration:b,ease:w,repeat:1/0,repeatType:"loop"});return()=>m.stop()},[V,b,w,M,C]);const G=h?"100%":typeof q=="number"?q:"100%",J=h?"auto":typeof I=="number"?I:typeof q=="number"?q:"auto",N=e.map((m,$)=>c.jsx("img",{src:m,alt:`${t} ${$+1}`,draggable:!1,className:`${g["orbit-image"]}`},m));return c.jsxs("div",{ref:v,className:`${g["orbit-container"]} ${k}`,style:{width:G,height:J,aspectRatio:h?"1 / 1":void 0},"aria-hidden":"true",children:[c.jsx("div",{className:h?"orbit-scaling-container orbit-scaling-container--responsive":g["orbit-scaling-container"],style:{width:h?s:"100%",height:h?s:"100%",transform:h?`translate(-50%, -50%) scale(${O})`:void 0},children:c.jsxs("div",{className:`${g["orbit-rotation-wrapper"]}`,style:{transform:`rotate(${f}deg)`},children:[z&&c.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${s} ${s}`,className:`${g["orbit-path-svg"]}`,children:c.jsx("path",{d:R,fill:"none",stroke:B,strokeWidth:H/O})}),N.map((m,$)=>c.jsx(re,{item:m,index:$,totalItems:N.length,path:R,itemSize:T,rotation:f,progress:V,fill:W},$))]})}),L&&c.jsx("div",{className:`${g["orbit-center-content"]}`,children:L})]})}D.__docgenInfo={description:"",methods:[],displayName:"OrbitImages",props:{images:{defaultValue:{value:"[]",computed:!1},required:!1},altPrefix:{defaultValue:{value:"'Orbiting image'",computed:!1},required:!1},shape:{defaultValue:{value:"'ellipse'",computed:!1},required:!1},baseWidth:{defaultValue:{value:"1400",computed:!1},required:!1},radiusX:{defaultValue:{value:"700",computed:!1},required:!1},radiusY:{defaultValue:{value:"170",computed:!1},required:!1},radius:{defaultValue:{value:"300",computed:!1},required:!1},starPoints:{defaultValue:{value:"5",computed:!1},required:!1},starInnerRatio:{defaultValue:{value:"0.5",computed:!1},required:!1},rotation:{defaultValue:{value:"-8",computed:!1},required:!1},duration:{defaultValue:{value:"40",computed:!1},required:!1},itemSize:{defaultValue:{value:"64",computed:!1},required:!1},direction:{defaultValue:{value:"'normal'",computed:!1},required:!1},fill:{defaultValue:{value:"true",computed:!1},required:!1},width:{defaultValue:{value:"100",computed:!1},required:!1},height:{defaultValue:{value:"100",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},showPath:{defaultValue:{value:"false",computed:!1},required:!1},pathColor:{defaultValue:{value:"'rgba(0,0,0,0.1)'",computed:!1},required:!1},pathWidth:{defaultValue:{value:"2",computed:!1},required:!1},easing:{defaultValue:{value:"'linear'",computed:!1},required:!1},paused:{defaultValue:{value:"false",computed:!1},required:!1},responsive:{defaultValue:{value:"false",computed:!1},required:!1}}};const pe={title:"ReactBits/Animations/OrbitImages",component:D,parameters:{layout:"fullscreen"}},_={args:{images:["https://picsum.photos/seed/a/200/200","https://picsum.photos/seed/b/200/200","https://picsum.photos/seed/c/200/200","https://picsum.photos/seed/d/200/200","https://picsum.photos/seed/e/200/200","https://picsum.photos/seed/f/200/200"],altPrefix:"Orbiting image",shape:"ellipse",baseWidth:1400,radiusX:700,radiusY:170,radius:300,starPoints:5,starInnerRatio:.5,rotation:-8,duration:40,itemSize:64,direction:"normal",fill:!0,width:100,height:100,showPath:!1,pathColor:"rgba(0,0,0,0.1)",pathWidth:2,easing:"linear",paused:!1,responsive:!1}};var E,Z,A;_.parameters={..._.parameters,docs:{...(E=_.parameters)==null?void 0:E.docs,source:{originalSource:`{
2
2
  args: {
3
3
  images: ['https://picsum.photos/seed/a/200/200', 'https://picsum.photos/seed/b/200/200', 'https://picsum.photos/seed/c/200/200', 'https://picsum.photos/seed/d/200/200', 'https://picsum.photos/seed/e/200/200', 'https://picsum.photos/seed/f/200/200'],
4
4
  altPrefix: 'Orbiting image',
@@ -0,0 +1 @@
1
+ ._container_1d3zv_1{background:transparent;border-radius:var(--radius-lg);padding:var(--spacing-xl)}._title_1d3zv_7{font-size:var(--font-size-lg);font-weight:var(--font-weight-semibold);color:var(--color-text);margin-bottom:var(--spacing-lg);text-align:center}._chartContainer_1d3zv_15{display:flex;gap:var(--spacing-4xl);align-items:flex-start}._chart_1d3zv_15{display:block;flex-shrink:0}._legend_1d3zv_26{flex:1;min-width:200px}._legendItem_1d3zv_31{display:flex;align-items:center;gap:var(--spacing-lg);padding:var(--spacing-sm);border-radius:var(--radius-md);margin-bottom:var(--spacing-sm);transition:var(--transition-base)}._legendItem_1d3zv_31:hover{background:var(--color-surface-hover)}._legendColor_1d3zv_45{width:16px;height:16px;border-radius:var(--radius-full);flex-shrink:0}._legendLabel_1d3zv_52{flex:1;font-size:var(--font-size-sm);color:var(--color-text);font-weight:var(--font-weight-medium)}._legendValue_1d3zv_59{font-size:var(--font-size-sm);color:var(--color-text-secondary);font-weight:var(--font-weight-semibold)}._tooltip_1d3zv_65{background:var(--color-background);border:2px solid var(--color-primary);border-radius:var(--radius-md);padding:var(--spacing-sm);font-size:var(--font-size-sm);color:var(--color-text);box-shadow:var(--shadow-lg);pointer-events:none;z-index:1000}._tooltip_1d3zv_65 div{margin:var(--spacing-xs) 0}._tooltip_1d3zv_65 strong{color:var(--color-primary)}@media (max-width: 768px){._chartContainer_1d3zv_15{flex-direction:column;gap:var(--space-4)}._legend_1d3zv_26{min-width:auto}}
@@ -0,0 +1,91 @@
1
+ import{r as q,j as v}from"./iframe-Cw8dCV4Z.js";import{s as S,i as K,c as X}from"./transform-BKmuZieF.js";import{a as H}from"./array-BKyUJesY.js";import{c as b}from"./path-CbwjOpE9.js";import{t as z,a as P}from"./arc-DgcIQOLP.js";import"./preload-helper-C1FmrZbK.js";function Q(n,a){let l=0;if(a===void 0)for(let c of n)(c=+c)&&(l+=c);else{let c=-1;for(let g of n)(g=+a(g,++c,n))&&(l+=g)}return l}function W(n,a){return a<n?-1:a>n?1:a>=n?0:NaN}function Z(n){return n}function ee(){var n=Z,a=W,l=null,c=b(0),g=b(z),w=b(0);function s(e){var r,i=(e=H(e)).length,m,L,C=0,_=new Array(i),u=new Array(i),A=+c.apply(this,arguments),h=Math.min(z,Math.max(-z,g.apply(this,arguments)-A)),T,x=Math.min(Math.abs(h)/i,w.apply(this,arguments)),R=x*(h<0?-1:1),d;for(r=0;r<i;++r)(d=u[_[r]=r]=+n(e[r],r,e))>0&&(C+=d);for(a!=null?_.sort(function(t,o){return a(u[t],u[o])}):l!=null&&_.sort(function(t,o){return l(e[t],e[o])}),r=0,L=C?(h-i*R)/C:0;r<i;++r,A=T)m=_[r],d=u[m],T=A+(d>0?d*L:0)+R,u[m]={data:e[m],index:r,value:d,startAngle:A,endAngle:T,padAngle:x};return u}return s.value=function(e){return arguments.length?(n=typeof e=="function"?e:b(+e),s):n},s.sortValues=function(e){return arguments.length?(a=e,l=null,s):a},s.sort=function(e){return arguments.length?(l=e,a=null,s):l},s.startAngle=function(e){return arguments.length?(c=typeof e=="function"?e:b(+e),s):c},s.endAngle=function(e){return arguments.length?(g=typeof e=="function"?e:b(+e),s):g},s.padAngle=function(e){return arguments.length?(w=typeof e=="function"?e:b(+e),s):w},s}const te="_container_1d3zv_1",ne="_title_1d3zv_7",ae="_chartContainer_1d3zv_15",re="_chart_1d3zv_15",oe="_legend_1d3zv_26",le="_legendItem_1d3zv_31",se="_legendColor_1d3zv_45",ie="_legendLabel_1d3zv_52",ce="_legendValue_1d3zv_59",ue="_tooltip_1d3zv_65",p={container:te,title:ne,chartContainer:ae,chart:re,legend:oe,legendItem:le,legendColor:se,legendLabel:ie,legendValue:ce,tooltip:ue},f=["#6366f1","#8b5cf6","#06b6d4","#10b981","#f59e0b","#ef4444","#ec4899","#84cc16","#f97316","#3b82f6","#8b5cf6","#14b8a6","#f59e0b","#ef4444","#06b6d4","#10b981"],$=n=>{const a=X(n);if(!a)return"#ffffff";const l=a.rgb();return(.299*l.r+.587*l.g+.114*l.b)/255>.5?"#000000":"#ffffff"},G=({data:n,width:a=400,height:l=400,title:c="Distribution",showLegend:g=!0,unit:w="items",centerLabel:s})=>{const e=q.useRef(null),r=Math.min(a,l)/2-20;return q.useEffect(()=>{if(!e.current||!n.length)return;const i=S(e.current);i.selectAll("*").remove();const m=i.append("g").attr("transform",`translate(${a/2},${l/2})`),L=ee().value(t=>t.value).sort(null),C=P().innerRadius(r*.4).outerRadius(r).cornerRadius(4),_=P().innerRadius(r*.7).outerRadius(r*.7),u=S("body").append("div").attr("class",p.tooltip).style("opacity",0).style("position","absolute"),A=L(n),h=Q(n,t=>t.value),T=m.selectAll(".arc").data(A).enter().append("g").attr("class","arc");T.append("path").attr("d",t=>C(t)).attr("fill",(t,o)=>t.data.color||f[o%f.length]).attr("stroke","var(--bg-primary)").attr("stroke-width",3).style("cursor","pointer").style("filter","drop-shadow(0 2px 8px rgba(0,0,0,0.15))").on("mouseover",function(t,o){const y=P().innerRadius(r*.4).outerRadius(r*1.05).cornerRadius(4);S(this).transition().duration(200).attr("d",M=>y(M)).style("filter","drop-shadow(0 4px 12px rgba(0,0,0,0.25))"),u.transition().duration(200).style("opacity",1);const V=(o.data.value/h*100).toFixed(1);u.html(`
2
+ <div><strong>${o.data.name}</strong></div>
3
+ <div>Value: ${o.data.value.toLocaleString()}</div>
4
+ <div>${V}% of total</div>
5
+ `).style("left",t.pageX+10+"px").style("top",t.pageY-28+"px")}).on("mouseout",function(t,o){S(this).transition().duration(200).attr("d",y=>C(y)).style("filter","drop-shadow(0 2px 8px rgba(0,0,0,0.15))"),u.transition().duration(500).style("opacity",0)});const x=n.map((t,o)=>t.color||f[o%f.length]),R=x.length>=2?K.gamma(2.2)(x[0],x[1])(.5):x[0]||"#ffffff",d=$(R);return m.append("text").attr("text-anchor","middle").attr("alignment-baseline","middle").attr("font-size","20px").attr("font-weight","bold").attr("fill",d).style("text-shadow",d==="#ffffff"?"0 1px 3px rgba(0,0,0,0.5)":"0 1px 3px rgba(255,255,255,0.5)").text(s||"Total"),m.append("text").attr("text-anchor","middle").attr("alignment-baseline","middle").attr("y",22).attr("font-size","16px").attr("font-weight","600").attr("fill",d).style("text-shadow",d==="#ffffff"?"0 1px 2px rgba(0,0,0,0.4)":"0 1px 2px rgba(255,255,255,0.4)").text(`${h.toLocaleString()} ${w}`),T.filter(t=>t.endAngle-t.startAngle>.2).append("text").attr("transform",t=>`translate(${_.centroid(t)})`).attr("text-anchor","middle").attr("alignment-baseline","middle").attr("font-size","13px").attr("fill",(t,o)=>{const y=t.data.color||f[o%f.length];return $(y)}).attr("font-weight","600").style("pointer-events","none").style("text-shadow",(t,o)=>{const y=t.data.color||f[o%f.length];return`0 1px 2px ${$(y)==="#ffffff"?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.4)"}`}).text(t=>{const o=t.data.value/h*100;return o>8?`${o.toFixed(0)}%`:""}),()=>{u.remove()}},[n,a,l,r,s,w]),v.jsxs("div",{className:p.container,children:[v.jsx("h3",{className:p.title,children:c}),v.jsxs("div",{className:p.chartContainer,children:[v.jsx("svg",{ref:e,width:a,height:l,className:p.chart}),g&&v.jsx("div",{className:p.legend,children:n.map((i,m)=>v.jsxs("div",{className:p.legendItem,children:[v.jsx("span",{className:p.legendColor,style:{backgroundColor:i.color||f[m%f.length]}}),v.jsx("span",{className:p.legendLabel,children:i.name}),v.jsx("span",{className:p.legendValue,children:i.value.toLocaleString()})]},i.name))})]})]})};G.__docgenInfo={description:"",methods:[],displayName:"PieChart",props:{data:{required:!0,tsType:{name:"Array",elements:[{name:"PieDataPoint"}],raw:"PieDataPoint[]"},description:""},width:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}},height:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}},title:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"'Distribution'",computed:!1}},showLegend:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},unit:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"'items'",computed:!1}},centerLabel:{required:!1,tsType:{name:"string"},description:""}}};const he={title:"Organisms/Charts/PieChart",component:G,parameters:{layout:"centered"},argTypes:{width:{control:{type:"number",min:300,max:700,step:50}},height:{control:{type:"number",min:300,max:700,step:50}},title:{control:{type:"text"}},showLegend:{control:{type:"boolean"}}}},j={args:{data:[{name:"Frontend Development",value:35,color:"#8b5cf6"},{name:"Backend Development",value:25,color:"#3b82f6"},{name:"Meetings",value:15,color:"#10b981"},{name:"Code Review",value:10,color:"#f59e0b"},{name:"Documentation",value:8,color:"#ec4899"},{name:"Testing",value:7,color:"#14b8a6"}],width:500,height:500,title:"Project Time Allocation",showLegend:!0}},D={args:{data:[{name:"Yes",value:73,color:"#10b981"},{name:"No",value:27,color:"#ef4444"}],width:350,height:350,title:"Survey Results",showLegend:!1}},N={args:{data:[{name:"JavaScript",value:25},{name:"Python",value:20},{name:"Java",value:15},{name:"TypeScript",value:12},{name:"C++",value:8},{name:"C#",value:6},{name:"Go",value:5},{name:"Rust",value:4},{name:"Swift",value:3},{name:"Kotlin",value:2}],width:600,height:600,title:"Programming Language Usage",showLegend:!0}};var k,E,F;j.parameters={...j.parameters,docs:{...(k=j.parameters)==null?void 0:k.docs,source:{originalSource:`{
6
+ args: {
7
+ data: [{
8
+ name: 'Frontend Development',
9
+ value: 35,
10
+ color: '#8b5cf6'
11
+ }, {
12
+ name: 'Backend Development',
13
+ value: 25,
14
+ color: '#3b82f6'
15
+ }, {
16
+ name: 'Meetings',
17
+ value: 15,
18
+ color: '#10b981'
19
+ }, {
20
+ name: 'Code Review',
21
+ value: 10,
22
+ color: '#f59e0b'
23
+ }, {
24
+ name: 'Documentation',
25
+ value: 8,
26
+ color: '#ec4899'
27
+ }, {
28
+ name: 'Testing',
29
+ value: 7,
30
+ color: '#14b8a6'
31
+ }],
32
+ width: 500,
33
+ height: 500,
34
+ title: 'Project Time Allocation',
35
+ showLegend: true
36
+ }
37
+ }`,...(F=(E=j.parameters)==null?void 0:E.docs)==null?void 0:F.source}}};var I,J,O;D.parameters={...D.parameters,docs:{...(I=D.parameters)==null?void 0:I.docs,source:{originalSource:`{
38
+ args: {
39
+ data: [{
40
+ name: 'Yes',
41
+ value: 73,
42
+ color: '#10b981'
43
+ }, {
44
+ name: 'No',
45
+ value: 27,
46
+ color: '#ef4444'
47
+ }],
48
+ width: 350,
49
+ height: 350,
50
+ title: 'Survey Results',
51
+ showLegend: false
52
+ }
53
+ }`,...(O=(J=D.parameters)==null?void 0:J.docs)==null?void 0:O.source}}};var U,Y,B;N.parameters={...N.parameters,docs:{...(U=N.parameters)==null?void 0:U.docs,source:{originalSource:`{
54
+ args: {
55
+ data: [{
56
+ name: 'JavaScript',
57
+ value: 25
58
+ }, {
59
+ name: 'Python',
60
+ value: 20
61
+ }, {
62
+ name: 'Java',
63
+ value: 15
64
+ }, {
65
+ name: 'TypeScript',
66
+ value: 12
67
+ }, {
68
+ name: 'C++',
69
+ value: 8
70
+ }, {
71
+ name: 'C#',
72
+ value: 6
73
+ }, {
74
+ name: 'Go',
75
+ value: 5
76
+ }, {
77
+ name: 'Rust',
78
+ value: 4
79
+ }, {
80
+ name: 'Swift',
81
+ value: 3
82
+ }, {
83
+ name: 'Kotlin',
84
+ value: 2
85
+ }],
86
+ width: 600,
87
+ height: 600,
88
+ title: 'Programming Language Usage',
89
+ showLegend: true
90
+ }
91
+ }`,...(B=(Y=N.parameters)==null?void 0:Y.docs)==null?void 0:B.source}}};const xe=["Default","TwoCategories","ManyCategories"];export{j as Default,N as ManyCategories,D as TwoCategories,xe as __namedExportsOrder,he as default};
@@ -1,4 +1,4 @@
1
- import{r as z,j as Ee}from"./iframe-B8pH-Lvr.js";import{E as re,R as le,b as ie,a as me}from"./index-DcRHiSf7.js";import{W as we,d as ne,n as Re,S as Ce,a as Pe,i as qe,a9 as Te,q as be,M as Ae,f as ze,G as M,a2 as Me,z as se}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const Fe={"pixel-blast-container":"_pixel-blast-container_a95g7_1"},ke=()=>{const l=document.createElement("canvas");l.width=64,l.height=64;const i=l.getContext("2d");if(!i)throw new Error("2D context not available");i.fillStyle="black",i.fillRect(0,0,l.width,l.height);const T=new Me(l);T.minFilter=se,T.magFilter=se,T.generateMipmaps=!1;const E=[];let w=null;const m=64;let R=.1*64;const F=1/m,k=()=>{i.fillStyle="black",i.fillRect(0,0,l.width,l.height)},I=a=>{const n={x:a.x*64,y:(1-a.y)*64};let c=1;const C=v=>Math.sin(v*Math.PI/2),g=v=>-v*(v-2);a.age<m*.3?c=C(a.age/(m*.3)):c=g(1-(a.age-m*.3)/(m*.7))||0,c*=a.force;const h=`${(a.vx+1)/2*255}, ${(a.vy+1)/2*255}, ${c*255}`,p=64*5;i.shadowOffsetX=p,i.shadowOffsetY=p,i.shadowBlur=R,i.shadowColor=`rgba(${h},${.22*c})`,i.beginPath(),i.fillStyle="rgba(255,0,0,1)",i.arc(n.x-p,n.y-p,R,0,Math.PI*2),i.fill()};return{canvas:l,texture:T,addTouch:a=>{let n=0,c=0,C=0;if(w){const g=a.x-w.x,h=a.y-w.y;if(g===0&&h===0)return;const p=g*g+h*h,v=Math.sqrt(p);c=g/(v||1),C=h/(v||1),n=Math.min(p*1e4,1)}w={x:a.x,y:a.y},E.push({x:a.x,y:a.y,age:0,force:n,vx:c,vy:C})},update:()=>{k();for(let a=E.length-1;a>=0;a--){const n=E[a],c=n.force*F*(1-n.age/m);n.x+=n.vx*c,n.y+=n.vy*c,n.age++,n.age>m&&E.splice(a,1)}for(let a=0;a<E.length;a++)I(E[a]);T.needsUpdate=!0},set radiusScale(a){R=.1*64*a},get radiusScale(){return R/(.1*64)},size:64}},Ie=(b,l)=>{const i=`
1
+ import{r as z,j as Ee}from"./iframe-Cw8dCV4Z.js";import{E as re,R as le,b as ie,a as me}from"./index-DcRHiSf7.js";import{W as we,d as ne,n as Re,S as Ce,a as Pe,i as qe,a9 as Te,q as be,M as Ae,f as ze,G as M,a2 as Me,z as se}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const Fe={"pixel-blast-container":"_pixel-blast-container_a95g7_1"},ke=()=>{const l=document.createElement("canvas");l.width=64,l.height=64;const i=l.getContext("2d");if(!i)throw new Error("2D context not available");i.fillStyle="black",i.fillRect(0,0,l.width,l.height);const T=new Me(l);T.minFilter=se,T.magFilter=se,T.generateMipmaps=!1;const E=[];let w=null;const m=64;let R=.1*64;const F=1/m,k=()=>{i.fillStyle="black",i.fillRect(0,0,l.width,l.height)},I=a=>{const n={x:a.x*64,y:(1-a.y)*64};let c=1;const C=v=>Math.sin(v*Math.PI/2),g=v=>-v*(v-2);a.age<m*.3?c=C(a.age/(m*.3)):c=g(1-(a.age-m*.3)/(m*.7))||0,c*=a.force;const h=`${(a.vx+1)/2*255}, ${(a.vy+1)/2*255}, ${c*255}`,p=64*5;i.shadowOffsetX=p,i.shadowOffsetY=p,i.shadowBlur=R,i.shadowColor=`rgba(${h},${.22*c})`,i.beginPath(),i.fillStyle="rgba(255,0,0,1)",i.arc(n.x-p,n.y-p,R,0,Math.PI*2),i.fill()};return{canvas:l,texture:T,addTouch:a=>{let n=0,c=0,C=0;if(w){const g=a.x-w.x,h=a.y-w.y;if(g===0&&h===0)return;const p=g*g+h*h,v=Math.sqrt(p);c=g/(v||1),C=h/(v||1),n=Math.min(p*1e4,1)}w={x:a.x,y:a.y},E.push({x:a.x,y:a.y,age:0,force:n,vx:c,vy:C})},update:()=>{k();for(let a=E.length-1;a>=0;a--){const n=E[a],c=n.force*F*(1-n.age/m);n.x+=n.vx*c,n.y+=n.vy*c,n.age++,n.age>m&&E.splice(a,1)}for(let a=0;a<E.length;a++)I(E[a]);T.needsUpdate=!0},set radiusScale(a){R=.1*64*a},get radiusScale(){return R/(.1*64)},size:64}},Ie=(b,l)=>{const i=`
2
2
  uniform sampler2D uTexture;
3
3
  uniform float uStrength;
4
4
  uniform float uTime;
@@ -185,7 +185,7 @@ void main(){
185
185
 
186
186
  fragColor = vec4(srgbColor, M);
187
187
  }
188
- `,H=10,pe=({variant:b="square",pixelSize:l=3,color:i="#B19EEF",className:T,style:E,antialias:w=!0,patternScale:m=2,patternDensity:R=1,liquid:F=!1,liquidStrength:k=.1,liquidRadius:I=1,pixelSizeJitter:_=0,enableRipples:B=!0,rippleIntensityScale:a=1,rippleThickness:n=.1,rippleSpeed:c=.3,liquidWobbleSpeed:C=4.5,autoPauseOffscreen:g=!0,speed:h=.5,transparent:p=!0,edgeFade:v=.5,noiseAmount:L=0})=>{const X=z.useRef(null),ve=z.useRef({visible:!0}),$=z.useRef(h),f=z.useRef(null),N=z.useRef(null);return z.useEffect(()=>{var j,J,W;const y=X.current;if(!y)return;$.current=h;const he=["antialias","liquid","noiseAmount"],K={antialias:w,liquid:F,noiseAmount:L};let D=!1;if(!f.current)D=!0;else if(N.current){for(const e of he)if(N.current[e]!==K[e]){D=!0;break}}if(D){if(f.current){const o=f.current;(j=o.resizeObserver)==null||j.disconnect(),cancelAnimationFrame(o.raf),(J=o.quad)==null||J.geometry.dispose(),o.material.dispose(),(W=o.composer)==null||W.dispose(),o.renderer.dispose(),o.renderer.forceContextLoss(),o.renderer.domElement.parentElement===y&&y.removeChild(o.renderer.domElement),f.current=null}const e=document.createElement("canvas"),t=new we({canvas:e,antialias:w,alpha:!0,powerPreference:"high-performance"});t.domElement.style.width="100%",t.domElement.style.height="100%",t.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),y.appendChild(t.domElement),p?t.setClearAlpha(0):t.setClearColor(0,1);const s={uResolution:{value:new ne(0,0)},uTime:{value:0},uColor:{value:new Re(i)},uClickPos:{value:Array.from({length:H},()=>new ne(-1,-1))},uClickTimes:{value:new Float32Array(H)},uShapeType:{value:ue[b]??0},uPixelSize:{value:l*t.getPixelRatio()},uScale:{value:m},uDensity:{value:R},uPixelJitter:{value:_},uEnableRipples:{value:B?1:0},uRippleSpeed:{value:c},uRippleThickness:{value:n},uRippleIntensity:{value:a},uEdgeFade:{value:v}},P=new Ce,A=new Pe(-1,1,1,-1,0,1),Y=new qe({vertexShader:Ve,fragmentShader:_e,uniforms:s,transparent:!0,depthTest:!1,depthWrite:!1,glslVersion:Te}),xe=new be(2,2),Q=new Ae(xe,Y);P.add(Q);const Z=new ze,ee=()=>{var d;const o=y.clientWidth||1,r=y.clientHeight||1;t.setSize(o,r,!1),s.uResolution.value.set(t.domElement.width,t.domElement.height),(d=f.current)!=null&&d.composer&&f.current.composer.setSize(t.domElement.width,t.domElement.height),s.uPixelSize.value=l*t.getPixelRatio()};ee();const te=new ResizeObserver(ee);te.observe(y);const ae=(()=>{var o;if(typeof window<"u"&&((o=window.crypto)!=null&&o.getRandomValues)){const r=new Uint32Array(1);return window.crypto.getRandomValues(r),r[0]/4294967295}return Math.random()})()*1e3;let u,q,V;if(F){q=ke(),q.radiusScale=I,u=new re(t);const o=new le(P,A);V=Ie(q.texture,{strength:k,freq:C});const r=new ie(A,V);r.renderToScreen=!0,u.addPass(o),u.addPass(r)}if(L>0){u||(u=new re(t),u.addPass(new le(P,A)));const o=new me("NoiseEffect","uniform float uTime; uniform float uAmount; float hash(vec2 p){ return fract(sin(dot(p, vec2(127.1,311.7))) * 43758.5453);} void mainUv(inout vec2 uv){} void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){ float n=hash(floor(uv*vec2(1920.0,1080.0))+floor(uTime*60.0)); float g=(n-0.5)*uAmount; outputColor=inputColor+vec4(vec3(g),0.0);} ",{uniforms:new Map([["uTime",new M(0)],["uAmount",new M(L)]])}),r=new ie(A,o);r.renderToScreen=!0,u&&u.passes.length>0&&u.passes.forEach(d=>d.renderToScreen=!1),u.addPass(r)}u&&u.setSize(t.domElement.width,t.domElement.height);const oe=o=>{const r=t.domElement.getBoundingClientRect(),d=t.domElement.width/r.width,x=t.domElement.height/r.height,S=(o.clientX-r.left)*d,Se=(r.height-(o.clientY-r.top))*x;return{fx:S,fy:Se,w:t.domElement.width,h:t.domElement.height}},ge=o=>{var S;const{fx:r,fy:d}=oe(o),x=((S=f.current)==null?void 0:S.clickIx)??0;s.uClickPos.value[x].set(r,d),s.uClickTimes.value[x]=s.uTime.value,f.current&&(f.current.clickIx=(x+1)%H)},ye=o=>{if(!q)return;const{fx:r,fy:d,w:x,h:S}=oe(o);q.addTouch({x:r/x,y:d/S})};t.domElement.addEventListener("pointerdown",ge,{passive:!0}),t.domElement.addEventListener("pointermove",ye,{passive:!0});let O=0;const U=()=>{if(g&&!ve.current.visible){O=requestAnimationFrame(U);return}s.uTime.value=ae+Z.getElapsedTime()*$.current,V&&(V.uniforms.get("uTime").value=s.uTime.value),u?(q&&q.update(),u.passes.forEach(o=>{const r=o.effects;r&&r.forEach(d=>{var S;const x=(S=d.uniforms)==null?void 0:S.get("uTime");x&&(x.value=s.uTime.value)})}),u.render()):t.render(P,A),O=requestAnimationFrame(U)};O=requestAnimationFrame(U),f.current={renderer:t,scene:P,camera:A,material:Y,clock:Z,clickIx:0,uniforms:s,resizeObserver:te,raf:O,quad:Q,timeOffset:ae,composer:u,touch:q,liquidEffect:V}}else{const e=f.current;if(e.uniforms.uShapeType.value=ue[b]??0,e.uniforms.uPixelSize.value=l*e.renderer.getPixelRatio(),e.uniforms.uColor.value.set(i),e.uniforms.uScale.value=m,e.uniforms.uDensity.value=R,e.uniforms.uPixelJitter.value=_,e.uniforms.uEnableRipples.value=B?1:0,e.uniforms.uRippleIntensity.value=a,e.uniforms.uRippleThickness.value=n,e.uniforms.uRippleSpeed.value=c,e.uniforms.uEdgeFade.value=v,p?e.renderer.setClearAlpha(0):e.renderer.setClearColor(0,1),e.liquidEffect){const t=e.liquidEffect;t&&(t.value=k);const s=e.liquidEffect.uniforms.get("uFreq");s&&(s.value=C)}e.touch&&(e.touch.radiusScale=I)}return N.current=K,()=>{var t,s,P;if(f.current&&D||!f.current)return;const e=f.current;(t=e.resizeObserver)==null||t.disconnect(),cancelAnimationFrame(e.raf),(s=e.quad)==null||s.geometry.dispose(),e.material.dispose(),(P=e.composer)==null||P.dispose(),e.renderer.dispose(),e.renderer.forceContextLoss(),e.renderer.domElement.parentElement===y&&y.removeChild(e.renderer.domElement),f.current=null}},[w,F,L,l,m,R,B,a,n,c,_,v,p,k,I,C,g,b,i,h]),Ee.jsx("div",{ref:X,className:`${Fe["pixel-blast-container"]} ${T??""}`,style:E,"aria-label":"PixelBlast interactive background"})};pe.__docgenInfo={description:"",methods:[],displayName:"PixelBlast",props:{variant:{defaultValue:{value:"'square'",computed:!1},required:!1},pixelSize:{defaultValue:{value:"3",computed:!1},required:!1},color:{defaultValue:{value:"'#B19EEF'",computed:!1},required:!1},antialias:{defaultValue:{value:"true",computed:!1},required:!1},patternScale:{defaultValue:{value:"2",computed:!1},required:!1},patternDensity:{defaultValue:{value:"1",computed:!1},required:!1},liquid:{defaultValue:{value:"false",computed:!1},required:!1},liquidStrength:{defaultValue:{value:"0.1",computed:!1},required:!1},liquidRadius:{defaultValue:{value:"1",computed:!1},required:!1},pixelSizeJitter:{defaultValue:{value:"0",computed:!1},required:!1},enableRipples:{defaultValue:{value:"true",computed:!1},required:!1},rippleIntensityScale:{defaultValue:{value:"1",computed:!1},required:!1},rippleThickness:{defaultValue:{value:"0.1",computed:!1},required:!1},rippleSpeed:{defaultValue:{value:"0.3",computed:!1},required:!1},liquidWobbleSpeed:{defaultValue:{value:"4.5",computed:!1},required:!1},autoPauseOffscreen:{defaultValue:{value:"true",computed:!1},required:!1},speed:{defaultValue:{value:"0.5",computed:!1},required:!1},transparent:{defaultValue:{value:"true",computed:!1},required:!1},edgeFade:{defaultValue:{value:"0.5",computed:!1},required:!1},noiseAmount:{defaultValue:{value:"0",computed:!1},required:!1}}};const Ne={title:"ReactBits/Backgrounds/PixelBlast",component:pe,parameters:{layout:"fullscreen"},tags:["autodocs"]},G={args:{variant:"square",pixelSize:3,color:"#B19EEF",antialias:!0,patternScale:2,patternDensity:1,liquid:!1,liquidStrength:.1,liquidRadius:1,pixelSizeJitter:0,enableRipples:!0,rippleIntensityScale:1,rippleThickness:.1,rippleSpeed:.3,liquidWobbleSpeed:4.5,autoPauseOffscreen:!0,speed:.5,transparent:!0,edgeFade:.5,noiseAmount:0}};var ce,fe,de;G.parameters={...G.parameters,docs:{...(ce=G.parameters)==null?void 0:ce.docs,source:{originalSource:`{
188
+ `,H=10,pe=({variant:b="square",pixelSize:l=3,color:i="#B19EEF",className:T,style:E,antialias:w=!0,patternScale:m=2,patternDensity:R=1,liquid:F=!1,liquidStrength:k=.1,liquidRadius:I=1,pixelSizeJitter:_=0,enableRipples:B=!0,rippleIntensityScale:a=1,rippleThickness:n=.1,rippleSpeed:c=.3,liquidWobbleSpeed:C=4.5,autoPauseOffscreen:g=!0,speed:h=.5,transparent:p=!0,edgeFade:v=.5,noiseAmount:L=0})=>{const X=z.useRef(null),ve=z.useRef({visible:!0}),$=z.useRef(h),f=z.useRef(null),N=z.useRef(null);return z.useEffect(()=>{var j,J,W;const y=X.current;if(!y)return;$.current=h;const he=["antialias","liquid","noiseAmount"],K={antialias:w,liquid:F,noiseAmount:L};let D=!1;if(!f.current)D=!0;else if(N.current){for(const e of he)if(N.current[e]!==K[e]){D=!0;break}}if(D){if(f.current){const o=f.current;(j=o.resizeObserver)==null||j.disconnect(),cancelAnimationFrame(o.raf),(J=o.quad)==null||J.geometry.dispose(),o.material.dispose(),(W=o.composer)==null||W.dispose(),o.renderer.dispose(),o.renderer.forceContextLoss(),o.renderer.domElement.parentElement===y&&y.removeChild(o.renderer.domElement),f.current=null}const e=document.createElement("canvas"),t=new we({canvas:e,antialias:w,alpha:!0,powerPreference:"high-performance"});t.domElement.style.width="100%",t.domElement.style.height="100%",t.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),y.appendChild(t.domElement),p?t.setClearAlpha(0):t.setClearColor(0,1);const s={uResolution:{value:new ne(0,0)},uTime:{value:0},uColor:{value:new Re(i)},uClickPos:{value:Array.from({length:H},()=>new ne(-1,-1))},uClickTimes:{value:new Float32Array(H)},uShapeType:{value:ue[b]??0},uPixelSize:{value:l*t.getPixelRatio()},uScale:{value:m},uDensity:{value:R},uPixelJitter:{value:_},uEnableRipples:{value:B?1:0},uRippleSpeed:{value:c},uRippleThickness:{value:n},uRippleIntensity:{value:a},uEdgeFade:{value:v}},P=new Ce,A=new Pe(-1,1,1,-1,0,1),Y=new qe({vertexShader:Ve,fragmentShader:_e,uniforms:s,transparent:!0,depthTest:!1,depthWrite:!1,glslVersion:Te}),xe=new be(2,2),Q=new Ae(xe,Y);P.add(Q);const Z=new ze,ee=()=>{var d;const o=y.clientWidth||1,r=y.clientHeight||1;t.setSize(o,r,!1),s.uResolution.value.set(t.domElement.width,t.domElement.height),(d=f.current)!=null&&d.composer&&f.current.composer.setSize(t.domElement.width,t.domElement.height),s.uPixelSize.value=l*t.getPixelRatio()};ee();const te=new ResizeObserver(ee);te.observe(y);const ae=(()=>{var o;if(typeof window<"u"&&((o=window.crypto)!=null&&o.getRandomValues)){const r=new Uint32Array(1);return window.crypto.getRandomValues(r),r[0]/4294967295}return Math.random()})()*1e3;let u,q,V;if(F){q=ke(),q.radiusScale=I,u=new re(t);const o=new le(P,A);V=Ie(q.texture,{strength:k,freq:C});const r=new ie(A,V);r.renderToScreen=!0,u.addPass(o),u.addPass(r)}if(L>0){u||(u=new re(t),u.addPass(new le(P,A)));const o=new me("NoiseEffect","uniform float uTime; uniform float uAmount; float hash(vec2 p){ return fract(sin(dot(p, vec2(127.1,311.7))) * 43758.5453);} void mainUv(inout vec2 uv){} void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){ float n=hash(floor(uv*vec2(1920.0,1080.0))+floor(uTime*60.0)); float g=(n-0.5)*uAmount; outputColor=inputColor+vec4(vec3(g),0.0);} ",{uniforms:new Map([["uTime",new M(0)],["uAmount",new M(L)]])}),r=new ie(A,o);r.renderToScreen=!0,u&&u.passes.length>0&&u.passes.forEach(d=>d.renderToScreen=!1),u.addPass(r)}u&&u.setSize(t.domElement.width,t.domElement.height);const oe=o=>{const r=t.domElement.getBoundingClientRect(),d=t.domElement.width/r.width,x=t.domElement.height/r.height,S=(o.clientX-r.left)*d,Se=(r.height-(o.clientY-r.top))*x;return{fx:S,fy:Se,w:t.domElement.width,h:t.domElement.height}},ge=o=>{var S;const{fx:r,fy:d}=oe(o),x=((S=f.current)==null?void 0:S.clickIx)??0;s.uClickPos.value[x].set(r,d),s.uClickTimes.value[x]=s.uTime.value,f.current&&(f.current.clickIx=(x+1)%H)},ye=o=>{if(!q)return;const{fx:r,fy:d,w:x,h:S}=oe(o);q.addTouch({x:r/x,y:d/S})};t.domElement.addEventListener("pointerdown",ge,{passive:!0}),t.domElement.addEventListener("pointermove",ye,{passive:!0});let O=0;const U=()=>{if(g&&!ve.current.visible){O=requestAnimationFrame(U);return}s.uTime.value=ae+Z.getElapsedTime()*$.current,V&&(V.uniforms.get("uTime").value=s.uTime.value),u?(q&&q.update(),u.passes.forEach(o=>{const r=o.effects;r&&r.forEach(d=>{var S;const x=(S=d.uniforms)==null?void 0:S.get("uTime");x&&(x.value=s.uTime.value)})}),u.render()):t.render(P,A),O=requestAnimationFrame(U)};O=requestAnimationFrame(U),f.current={renderer:t,scene:P,camera:A,material:Y,clock:Z,clickIx:0,uniforms:s,resizeObserver:te,raf:O,quad:Q,timeOffset:ae,composer:u,touch:q,liquidEffect:V}}else{const e=f.current;if(e.uniforms.uShapeType.value=ue[b]??0,e.uniforms.uPixelSize.value=l*e.renderer.getPixelRatio(),e.uniforms.uColor.value.set(i),e.uniforms.uScale.value=m,e.uniforms.uDensity.value=R,e.uniforms.uPixelJitter.value=_,e.uniforms.uEnableRipples.value=B?1:0,e.uniforms.uRippleIntensity.value=a,e.uniforms.uRippleThickness.value=n,e.uniforms.uRippleSpeed.value=c,e.uniforms.uEdgeFade.value=v,p?e.renderer.setClearAlpha(0):e.renderer.setClearColor(0,1),e.liquidEffect){const t=e.liquidEffect;t&&(t.value=k);const s=e.liquidEffect.uniforms.get("uFreq");s&&(s.value=C)}e.touch&&(e.touch.radiusScale=I)}return N.current=K,()=>{var t,s,P;if(f.current&&D||!f.current)return;const e=f.current;(t=e.resizeObserver)==null||t.disconnect(),cancelAnimationFrame(e.raf),(s=e.quad)==null||s.geometry.dispose(),e.material.dispose(),(P=e.composer)==null||P.dispose(),e.renderer.dispose(),e.renderer.forceContextLoss(),e.renderer.domElement.parentElement===y&&y.removeChild(e.renderer.domElement),f.current=null}},[w,F,L,l,m,R,B,a,n,c,_,v,p,k,I,C,g,b,i,h]),Ee.jsx("div",{ref:X,className:`${Fe["pixel-blast-container"]} ${T??""}`,style:E,"aria-label":"PixelBlast interactive background"})};pe.__docgenInfo={description:"",methods:[],displayName:"PixelBlast",props:{variant:{defaultValue:{value:"'square'",computed:!1},required:!1},pixelSize:{defaultValue:{value:"3",computed:!1},required:!1},color:{defaultValue:{value:"'#B19EEF'",computed:!1},required:!1},antialias:{defaultValue:{value:"true",computed:!1},required:!1},patternScale:{defaultValue:{value:"2",computed:!1},required:!1},patternDensity:{defaultValue:{value:"1",computed:!1},required:!1},liquid:{defaultValue:{value:"false",computed:!1},required:!1},liquidStrength:{defaultValue:{value:"0.1",computed:!1},required:!1},liquidRadius:{defaultValue:{value:"1",computed:!1},required:!1},pixelSizeJitter:{defaultValue:{value:"0",computed:!1},required:!1},enableRipples:{defaultValue:{value:"true",computed:!1},required:!1},rippleIntensityScale:{defaultValue:{value:"1",computed:!1},required:!1},rippleThickness:{defaultValue:{value:"0.1",computed:!1},required:!1},rippleSpeed:{defaultValue:{value:"0.3",computed:!1},required:!1},liquidWobbleSpeed:{defaultValue:{value:"4.5",computed:!1},required:!1},autoPauseOffscreen:{defaultValue:{value:"true",computed:!1},required:!1},speed:{defaultValue:{value:"0.5",computed:!1},required:!1},transparent:{defaultValue:{value:"true",computed:!1},required:!1},edgeFade:{defaultValue:{value:"0.5",computed:!1},required:!1},noiseAmount:{defaultValue:{value:"0",computed:!1},required:!1}}};const Ne={title:"ReactBits/Backgrounds/PixelBlast",component:pe,parameters:{layout:"fullscreen"}},G={args:{variant:"square",pixelSize:3,color:"#B19EEF",antialias:!0,patternScale:2,patternDensity:1,liquid:!1,liquidStrength:.1,liquidRadius:1,pixelSizeJitter:0,enableRipples:!0,rippleIntensityScale:1,rippleThickness:.1,rippleSpeed:.3,liquidWobbleSpeed:4.5,autoPauseOffscreen:!0,speed:.5,transparent:!0,edgeFade:.5,noiseAmount:0}};var ce,fe,de;G.parameters={...G.parameters,docs:{...(ce=G.parameters)==null?void 0:ce.docs,source:{originalSource:`{
189
189
  args: {
190
190
  variant: 'square',
191
191
  pixelSize: 3,