@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.
- package/dist/components/atoms/Button/Button.stories.d.ts +0 -1
- package/dist/components/atoms/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/atoms/Card/Card.stories.d.ts +0 -1
- package/dist/components/atoms/Card/Card.stories.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.stories.d.ts +0 -7
- package/dist/components/atoms/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/dist/components/atoms/DateInput/DateInput.stories.d.ts +0 -7
- package/dist/components/atoms/DateInput/DateInput.stories.d.ts.map +1 -1
- package/dist/components/atoms/LoadingSpinner/LoadingSpinner.stories.d.ts +1 -15
- package/dist/components/atoms/LoadingSpinner/LoadingSpinner.stories.d.ts.map +1 -1
- package/dist/components/atoms/NumberStepper/NumberStepper.stories.d.ts +0 -16
- package/dist/components/atoms/NumberStepper/NumberStepper.stories.d.ts.map +1 -1
- package/dist/components/atoms/SearchableDropdown/SearchableDropdown.stories.d.ts +0 -9
- package/dist/components/atoms/SearchableDropdown/SearchableDropdown.stories.d.ts.map +1 -1
- package/dist/components/atoms/SelectInput/SelectInput.stories.d.ts +0 -6
- package/dist/components/atoms/SelectInput/SelectInput.stories.d.ts.map +1 -1
- package/dist/components/atoms/Slider/Slider.stories.d.ts.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.stories.d.ts +0 -10
- package/dist/components/atoms/TextArea/TextArea.stories.d.ts.map +1 -1
- package/dist/components/atoms/TextInput/TextInput.stories.d.ts +0 -14
- package/dist/components/atoms/TextInput/TextInput.stories.d.ts.map +1 -1
- package/dist/components/atoms/Toggle/Toggle.stories.d.ts +0 -8
- package/dist/components/atoms/Toggle/Toggle.stories.d.ts.map +1 -1
- package/dist/components/atoms/ToggleButton/ToggleButton.stories.d.ts +0 -7
- package/dist/components/atoms/ToggleButton/ToggleButton.stories.d.ts.map +1 -1
- package/dist/components/molecules/ArrayInput/ArrayInput.stories.d.ts +0 -9
- package/dist/components/molecules/ArrayInput/ArrayInput.stories.d.ts.map +1 -1
- package/dist/components/molecules/EditFAB/EditFAB.stories.d.ts +1 -12
- package/dist/components/molecules/EditFAB/EditFAB.stories.d.ts.map +1 -1
- package/dist/components/molecules/SearchBar/SearchBar.stories.d.ts +0 -8
- package/dist/components/molecules/SearchBar/SearchBar.stories.d.ts.map +1 -1
- package/dist/components/molecules/Tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/components/molecules/ThemeSwitcher/ThemeSwitcher.stories.d.ts +0 -3
- package/dist/components/molecules/ThemeSwitcher/ThemeSwitcher.stories.d.ts.map +1 -1
- package/dist/components/molecules/TimeInput/TimeInput.stories.d.ts +0 -6
- package/dist/components/molecules/TimeInput/TimeInput.stories.d.ts.map +1 -1
- package/dist/components/organisms/Calendar/Calendar.d.ts +21 -1
- package/dist/components/organisms/Calendar/Calendar.d.ts.map +1 -1
- package/dist/components/organisms/Calendar/Calendar.stories.d.ts +1 -1
- package/dist/components/organisms/Calendar/Calendar.stories.d.ts.map +1 -1
- package/dist/components/organisms/Calendar/DayEventCard.d.ts +1 -1
- package/dist/components/organisms/Calendar/DayEventCard.d.ts.map +1 -1
- package/dist/components/organisms/ImageSlideshow/ImageSlideshow.stories.d.ts +0 -23
- package/dist/components/organisms/ImageSlideshow/ImageSlideshow.stories.d.ts.map +1 -1
- package/dist/components/organisms/Navbar/Navbar.d.ts +1 -0
- package/dist/components/organisms/Navbar/Navbar.d.ts.map +1 -1
- package/dist/components/organisms/Navbar/Navbar.stories.d.ts +1 -7
- package/dist/components/organisms/Navbar/Navbar.stories.d.ts.map +1 -1
- package/dist/components/organisms/charts/BooleansHeatmap/BooleansHeatmap.stories.d.ts +1 -4
- package/dist/components/organisms/charts/BooleansHeatmap/BooleansHeatmap.stories.d.ts.map +1 -1
- package/dist/components/organisms/charts/PieChart/PieChart.stories.d.ts +1 -5
- package/dist/components/organisms/charts/PieChart/PieChart.stories.d.ts.map +1 -1
- package/dist/index.esm.js +148 -60
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +147 -59
- package/dist/index.js.map +1 -1
- package/dist/stories/utils.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/dist/themes/dao.css +16 -1
- package/dist/themes/globals.css +2 -5
- package/package.json +1 -1
- package/storybook-static/assets/{ASCIIText.stories-LbmvFzzv.js → ASCIIText.stories-CsG3yKr5.js} +4 -4
- package/storybook-static/assets/{AllAtoms.stories-CLunFOjI.js → AllAtoms.stories-D2Pzz8c7.js} +1 -1
- package/storybook-static/assets/{AnimatedContent.stories-B8hBaVkK.js → AnimatedContent.stories-BP9feFGz.js} +1 -1
- package/storybook-static/assets/{AnimatedList.stories-D8a9eYqH.js → AnimatedList.stories-DQ8jdk44.js} +2 -2
- package/storybook-static/assets/{Antigravity.stories-D_mJbWK0.js → Antigravity.stories-BTIHyYKU.js} +1 -1
- package/storybook-static/assets/ArrayInput.stories-d5_OJJMu.js +138 -0
- package/storybook-static/assets/{Aurora.stories-BN4MataE.js → Aurora.stories-D_eQNPaB.js} +2 -2
- package/storybook-static/assets/{Beams.stories-CCtZOw8G.js → Beams.stories-VLKuYE0_.js} +6 -6
- package/storybook-static/assets/{BlobCursor.stories-CdB55R5G.js → BlobCursor.stories-BQJgTsuD.js} +1 -1
- package/storybook-static/assets/{BlurText.stories-Bg2Ih2Je.js → BlurText.stories-oSn5_w7h.js} +2 -2
- package/storybook-static/assets/BooleansHeatmap-C8cFXa7K.css +1 -0
- package/storybook-static/assets/BooleansHeatmap.stories-CHoCYK4N.js +63 -0
- package/storybook-static/assets/{BorderGlow.stories-CUxbrsvW.js → BorderGlow.stories-D-vgIU3S.js} +1 -1
- package/storybook-static/assets/{BubbleMenu.stories-DuVDLBsV.js → BubbleMenu.stories-DcWoqA7_.js} +1 -1
- package/storybook-static/assets/{Button-CQGdvhpN.js → Button-DgpqJWgD.js} +1 -1
- package/storybook-static/assets/{Button.stories-D8Xx3I9p.js → Button.stories-TQXKQagp.js} +2 -2
- package/storybook-static/assets/Calendar-BZCyXxvF.css +1 -0
- package/storybook-static/assets/Calendar.stories-D5CKBagI.js +321 -0
- package/storybook-static/assets/{Card-DNp-cUnt.js → Card-Bu54h8gN.js} +1 -1
- package/storybook-static/assets/{Card.stories-D1f1NTVU.js → Card.stories-Dw2bPvLo.js} +1 -1
- package/storybook-static/assets/{CardNav.stories-Cd4zEw8p.js → CardNav.stories-CnbwwAde.js} +1 -1
- package/storybook-static/assets/{Carousel.stories-BxbGwXE5.js → Carousel.stories-ChBLLqBg.js} +2 -2
- package/storybook-static/assets/{Checkbox-Dw8W2w74.js → Checkbox-Duyafa-Y.js} +1 -1
- package/storybook-static/assets/Checkbox.stories-Co7IxmK1.js +55 -0
- package/storybook-static/assets/{ChromaGrid.stories-DBHYiDPV.js → ChromaGrid.stories-68ukohGs.js} +1 -1
- package/storybook-static/assets/{CircularGallery.stories-TJN6o_RG.js → CircularGallery.stories-CV4iXVIX.js} +2 -2
- package/storybook-static/assets/{CircularText.stories-rNjRUNn2.js → CircularText.stories-DqYHtbPW.js} +1 -1
- package/storybook-static/assets/{ClickSpark.stories-BfqByoGe.js → ClickSpark.stories-DvAOxLjs.js} +1 -1
- package/storybook-static/assets/{ColorBends.stories-IEMOWAyf.js → ColorBends.stories-Dm4nxTTN.js} +2 -2
- package/storybook-static/assets/{CountUp.stories-DXPrKAQb.js → CountUp.stories-DTaL8Yfy.js} +1 -1
- package/storybook-static/assets/{Counter.stories-DMdecsw_.js → Counter.stories-Bf_2Js0l.js} +2 -2
- package/storybook-static/assets/{Crosshair.stories-CYzDxRSn.js → Crosshair.stories-DJjjCcED.js} +2 -2
- package/storybook-static/assets/{Cubes.stories-Drq4ULo3.js → Cubes.stories-Qh3JqlQW.js} +1 -1
- package/storybook-static/assets/{CurvedLoop.stories-C9GMKnIw.js → CurvedLoop.stories-BvyrCuM7.js} +1 -1
- package/storybook-static/assets/{DarkVeil.stories-BtLNfEH8.js → DarkVeil.stories-BVY870pm.js} +2 -2
- package/storybook-static/assets/{DateInput-CW4PsZAQ.js → DateInput-DfGES3te.js} +2 -2
- package/storybook-static/assets/DateInput-Dhcb9x13.css +1 -0
- package/storybook-static/assets/DateInput.stories-BXF8Ttde.js +51 -0
- package/storybook-static/assets/{DecayCard.stories-CAU_wTc7.js → DecayCard.stories-B0g2xWqX.js} +1 -1
- package/storybook-static/assets/{DecryptedText.stories-Dvba9C1V.js → DecryptedText.stories-fqDZfjv8.js} +1 -1
- package/storybook-static/assets/{Dither.stories-B5KfMprl.js → Dither.stories-B4N3Z5sW.js} +2 -2
- package/storybook-static/assets/{Dock.stories-oyQGRzlM.js → Dock.stories-f_YKz-pl.js} +1 -1
- package/storybook-static/assets/EditFAB.stories-LhVUDgtx.js +233 -0
- package/storybook-static/assets/{EvilEye.stories-C1820-DG.js → EvilEye.stories-BtBvvs31.js} +2 -2
- package/storybook-static/assets/{FadeContent.stories-B4z_JRy9.js → FadeContent.stories-oNqKrfSe.js} +1 -1
- package/storybook-static/assets/{FaultyTerminal.stories-DmkguJql.js → FaultyTerminal.stories-7nV4DvrW.js} +2 -2
- package/storybook-static/assets/{Fbo-CTQm-4Bw.js → Fbo-Clk04E0N.js} +1 -1
- package/storybook-static/assets/{FloatingLines.stories-CQvqKSpH.js → FloatingLines.stories-DgxhGl_b.js} +2 -2
- package/storybook-static/assets/{FlowingMenu.stories-DmOspv0B.js → FlowingMenu.stories-C5dfG25U.js} +1 -1
- package/storybook-static/assets/{FluidGlass.stories-CZSqxrNt.js → FluidGlass.stories-DGLlp1x1.js} +2 -2
- package/storybook-static/assets/{Folder.stories-7vb52Lfi.js → Folder.stories-BJGdA6Qb.js} +1 -1
- package/storybook-static/assets/{FuzzyText.stories-BdXN4VK1.js → FuzzyText.stories-DygRT6bB.js} +1 -1
- package/storybook-static/assets/{Galaxy.stories-BhT1GZh5.js → Galaxy.stories-BU6XCHeu.js} +2 -2
- package/storybook-static/assets/{GhostCursor.stories-DkXqCjE9.js → GhostCursor.stories-D_HIFPUl.js} +2 -2
- package/storybook-static/assets/{GlareHover.stories-CznX3yTV.js → GlareHover.stories-D5_-xnyP.js} +1 -1
- package/storybook-static/assets/{GlassSurface.stories-BnwwYK95.js → GlassSurface.stories-CrZqAGRq.js} +2 -2
- package/storybook-static/assets/{GlitchText.stories-CVcTBUVS.js → GlitchText.stories-BRqI-kBX.js} +2 -2
- package/storybook-static/assets/{GooeyNav.stories-C0abTHBc.js → GooeyNav.stories-DjR0-Th2.js} +1 -1
- package/storybook-static/assets/{GradientBlinds.stories-CpSguKtv.js → GradientBlinds.stories-CiIDtPz3.js} +2 -2
- package/storybook-static/assets/{GradientText.stories-B4hMx13h.js → GradientText.stories-pLA_An71.js} +1 -1
- package/storybook-static/assets/{Grainient.stories-5EakpvU2.js → Grainient.stories-BthRrRMd.js} +2 -2
- package/storybook-static/assets/{GridMotion.stories-Bm3DD7cb.js → GridMotion.stories-BSwjL8IE.js} +1 -1
- package/storybook-static/assets/ImageSlideshow.stories-BYAQMHlZ.js +108 -0
- package/storybook-static/assets/{Iridescence.stories-Cykk3hHZ.js → Iridescence.stories-ChHTH2TM.js} +2 -2
- package/storybook-static/assets/{LaserFlow.stories-CfiM4ZZ5.js → LaserFlow.stories-DlDx8Vr8.js} +2 -2
- package/storybook-static/assets/{LetterGlitch.stories-BXb7iSeX.js → LetterGlitch.stories-C-S2SRjU.js} +1 -1
- package/storybook-static/assets/{LightPillar.stories-CwI-8_BF.js → LightPillar.stories-D0PF-h7T.js} +3 -3
- package/storybook-static/assets/{LightRays.stories-BIIfv6Ky.js → LightRays.stories-Cbkl7wuP.js} +2 -2
- package/storybook-static/assets/{Lightning.stories-B8GNkzSN.js → Lightning.stories-BUs-gwYj.js} +2 -2
- package/storybook-static/assets/{LineWaves.stories-CjxdD_yt.js → LineWaves.stories-D2GXzteP.js} +2 -2
- package/storybook-static/assets/{LiquidChrome.stories-G7bVFJM9.js → LiquidChrome.stories-CtDp7th1.js} +2 -2
- package/storybook-static/assets/{LiquidEther.stories-C8n27zuA.js → LiquidEther.stories-DM2n5oEm.js} +2 -2
- package/storybook-static/assets/{LoadingSpinner-Br8TYFlF.js → LoadingSpinner-DaUSIVPY.js} +1 -1
- package/storybook-static/assets/LoadingSpinner.stories-Cx4_nNAf.js +21 -0
- package/storybook-static/assets/{MagicRings.stories-D50m_2UF.js → MagicRings.stories-CZt-cHcL.js} +2 -2
- package/storybook-static/assets/{Magnet.stories-BP9fjpzP.js → Magnet.stories-B6js1VeO.js} +1 -1
- package/storybook-static/assets/{MagnetLines.stories-DvbytV0Y.js → MagnetLines.stories-BKQ9YC_E.js} +1 -1
- package/storybook-static/assets/{Masonry.stories-xXYQw2uD.js → Masonry.stories-BGkTkNUa.js} +1 -1
- package/storybook-static/assets/{MetaBalls.stories-DKD3gVUH.js → MetaBalls.stories-Cao6Tqjg.js} +2 -2
- package/storybook-static/assets/{MetallicPaint.stories-Bz-uS-L_.js → MetallicPaint.stories-DF9qb3W_.js} +2 -2
- package/storybook-static/assets/MoodChart-ba3aY_qF.css +1 -0
- package/storybook-static/assets/MoodChart.stories-AGxwnR6s.js +40 -0
- package/storybook-static/assets/{MotionConfigContext-D5hZdVGx.js → MotionConfigContext-BCa1jVYq.js} +1 -1
- package/storybook-static/assets/Navbar-CH6O1IzY.css +1 -0
- package/storybook-static/assets/Navbar.stories-CFHb1c22.js +186 -0
- package/storybook-static/assets/{Noise.stories-D6C6-k8-.js → Noise.stories-ConXbyqm.js} +2 -2
- package/storybook-static/assets/{NumberStepper--0cJcLNZ.js → NumberStepper-DH9y3k8b.js} +1 -1
- package/storybook-static/assets/NumberStepper.stories-PMwPqbsn.js +88 -0
- package/storybook-static/assets/{Orb.stories-CS__2PJW.js → Orb.stories-DcXSWhV1.js} +2 -2
- package/storybook-static/assets/{OrbitImages.stories-CcaelcY5.js → OrbitImages.stories-Dk417qKA.js} +1 -1
- package/storybook-static/assets/PieChart-DXPBsaZR.css +1 -0
- package/storybook-static/assets/PieChart.stories-6sgfe6Xk.js +91 -0
- package/storybook-static/assets/{PixelBlast.stories-CyK8BxPq.js → PixelBlast.stories-_cBuognT.js} +2 -2
- package/storybook-static/assets/{PixelCard.stories-D_Og1Eve.js → PixelCard.stories-D_EZOUox.js} +1 -1
- package/storybook-static/assets/{PixelSnow.stories-CoCZucVV.js → PixelSnow.stories-DcD7737G.js} +2 -2
- package/storybook-static/assets/{PixelTransition.stories-DmVJ4jdu.js → PixelTransition.stories-BwNcUv5J.js} +1 -1
- package/storybook-static/assets/{Plasma.stories-DUqrW-qq.js → Plasma.stories-BLolMCfR.js} +2 -2
- package/storybook-static/assets/{Prism.stories-DWdVDcBG.js → Prism.stories-CG2_KGsq.js} +2 -2
- package/storybook-static/assets/{PrismaticBurst.stories-BEVYTjXo.js → PrismaticBurst.stories-DzS--Ffu.js} +2 -2
- package/storybook-static/assets/{ProfileCard.stories-CAoKQpAZ.js → ProfileCard.stories-vI_ispYe.js} +1 -1
- package/storybook-static/assets/QuantifiableHabitsChart-BiMp7Kkq.css +1 -0
- package/storybook-static/assets/{QuantifiableHabitsChart.stories-CMexb5Ij.js → QuantifiableHabitsChart.stories-D5yeGCZ5.js} +2 -2
- package/storybook-static/assets/{Radar.stories-Dcjnm9Bu.js → Radar.stories-DLv_hY9T.js} +2 -2
- package/storybook-static/assets/{Ribbons.stories-Cs3Eg2Gz.js → Ribbons.stories-4BbVINtW.js} +4 -4
- package/storybook-static/assets/{RippleGrid.stories-QV9Doq9P.js → RippleGrid.stories-CFh8tigy.js} +2 -2
- package/storybook-static/assets/{RotatingText.stories-DkntoAXJ.js → RotatingText.stories-AM4GcpU2.js} +2 -2
- package/storybook-static/assets/{ScrollFloat.stories-BaX43Ike.js → ScrollFloat.stories-Ct_ZkL7k.js} +1 -1
- package/storybook-static/assets/{ScrollReveal.stories-C2IWpLpI.js → ScrollReveal.stories-B7fcgLZ3.js} +1 -1
- package/storybook-static/assets/{ScrollVelocity.stories-LaYJ5WQN.js → ScrollVelocity.stories-BRDv3Fdk.js} +1 -1
- package/storybook-static/assets/SearchBar.stories-Dnmegbak.js +64 -0
- package/storybook-static/assets/{SearchableDropdown-4HgWY0Ck.js → SearchableDropdown-BtIsuxmT.js} +1 -1
- package/storybook-static/assets/SearchableDropdown.stories-DVub17TN.js +44 -0
- package/storybook-static/assets/{SelectInput-DvSeeIw5.js → SelectInput-C0kBLYgX.js} +1 -1
- package/storybook-static/assets/SelectInput.stories-HoF32-Km.js +94 -0
- package/storybook-static/assets/{ShapeBlur.stories-ZQV0yHkn.js → ShapeBlur.stories-C3RyLvBh.js} +2 -2
- package/storybook-static/assets/{ShapeGrid.stories-G_tZAcp9.js → ShapeGrid.stories-ltmu466o.js} +1 -1
- package/storybook-static/assets/{ShinyText.stories-C6BrLI0x.js → ShinyText.stories-JO2F4CpJ.js} +1 -1
- package/storybook-static/assets/{Silk.stories-BpsR4txJ.js → Silk.stories-CUzWiwqP.js} +2 -2
- package/storybook-static/assets/SleepChart-CjpdWR_T.css +1 -0
- package/storybook-static/assets/SleepChart.stories-YvCzf0BI.js +58 -0
- package/storybook-static/assets/Slider-BaDHm9m3.css +1 -0
- package/storybook-static/assets/{Slider-3iog5_du.js → Slider-CI9mXQSu.js} +1 -1
- package/storybook-static/assets/{Slider.stories-C8eUZ7Ne.js → Slider.stories-DQYlBjGq.js} +1 -1
- package/storybook-static/assets/{SoftAurora.stories--Rcyqxiu.js → SoftAurora.stories-ubq_KV8Q.js} +2 -2
- package/storybook-static/assets/{SoundDemo.stories-DvhKS2Fi.js → SoundDemo.stories-Cie-leKw.js} +1 -1
- package/storybook-static/assets/{SplashCursor.stories-FzRIUaX9.js → SplashCursor.stories-Clea3dMy.js} +2 -2
- package/storybook-static/assets/{SpotlightCard.stories-CifqsSUc.js → SpotlightCard.stories-BWv0AuTI.js} +1 -1
- package/storybook-static/assets/{Stack.stories-Dq82x0TG.js → Stack.stories-DxVGTJ6l.js} +1 -1
- package/storybook-static/assets/{StaggeredMenu.stories-CsiTDJGG.js → StaggeredMenu.stories-1UB8ravq.js} +1 -1
- package/storybook-static/assets/{StarBorder.stories-Ba14_TPk.js → StarBorder.stories-DiSAqN3r.js} +2 -2
- package/storybook-static/assets/{SunburstChart.stories-fREzDXM9.js → SunburstChart.stories-DLjQA_I1.js} +1 -1
- package/storybook-static/assets/Table-BFjXRRk3.css +1 -0
- package/storybook-static/assets/{Table.stories-CXsQAQrR.js → Table.stories-wQGb96WC.js} +6 -6
- package/storybook-static/assets/Tabs-CDVjuS9_.css +1 -0
- package/storybook-static/assets/{Tabs.stories-HeiG8gYN.js → Tabs.stories-jkioQ4xt.js} +4 -4
- package/storybook-static/assets/{TargetCursor.stories-B16pWZaP.js → TargetCursor.stories-B4ACbrmW.js} +1 -1
- package/storybook-static/assets/{TextArea-DKx3k6hV.js → TextArea-DN6IYITs.js} +1 -1
- package/storybook-static/assets/TextArea.stories-CwLLZFoD.js +118 -0
- package/storybook-static/assets/{TextCursor.stories-CY2eIn6Z.js → TextCursor.stories-NORQhkfy.js} +1 -1
- package/storybook-static/assets/TextInput-6V0mlIuS.css +1 -0
- package/storybook-static/assets/TextInput-CLgIGUn3.js +28 -0
- package/storybook-static/assets/TextInput.stories-BNooOWA2.js +89 -0
- package/storybook-static/assets/{TextPressure.stories-sH-cgdL2.js → TextPressure.stories-BaCAyBD4.js} +2 -2
- package/storybook-static/assets/{TextType.stories-B7Oy3P9u.js → TextType.stories-DG4mQ3HF.js} +1 -1
- package/storybook-static/assets/ThemeSwitcher.stories-slxIamHU.js +47 -0
- package/storybook-static/assets/{Threads.stories-e52ErKbM.js → Threads.stories-Rsg8lRsX.js} +2 -2
- package/storybook-static/assets/TimeInput-BT44V2P0.css +1 -0
- package/storybook-static/assets/TimeInput.stories-CaO8_PY2.js +13 -0
- package/storybook-static/assets/{Toggle-BntWdyUe.js → Toggle-CTTN-13k.js} +1 -1
- package/storybook-static/assets/Toggle.stories-DrNYDjFB.js +163 -0
- package/storybook-static/assets/{ToggleButton-BQqJdlB_.js → ToggleButton-CXK855yx.js} +1 -1
- package/storybook-static/assets/ToggleButton.stories-DNsNH9vH.js +103 -0
- package/storybook-static/assets/{TrueFocus.stories-wm4VXWCk.js → TrueFocus.stories-zG6Ml8RP.js} +1 -1
- package/storybook-static/assets/{VariableProximity.stories-BNSYs_rC.js → VariableProximity.stories-CMZW-Tov.js} +1 -1
- package/storybook-static/assets/{Waves.stories-Ce2ZJFsV.js → Waves.stories-CscXTp_S.js} +1 -1
- package/storybook-static/assets/{check-Cty-Z1Ib.js → check-DLeHG_Da.js} +1 -1
- package/storybook-static/assets/{chevron-down-OhqRl4eJ.js → chevron-down-Ciks5pXx.js} +1 -1
- package/storybook-static/assets/{chevron-right-CZm4bArI.js → chevron-right-DjeluSA0.js} +1 -1
- package/storybook-static/assets/client-D1KVnN68.js +1 -0
- package/storybook-static/assets/{createLucideIcon-BNUG5osq.js → createLucideIcon-dvowvj4F.js} +1 -1
- package/storybook-static/assets/{folder-BjriMpXc.js → folder-CCqkDvFG.js} +1 -1
- package/storybook-static/assets/{iconBase-DmcmY1l-.js → iconBase-nrk1zV8Q.js} +1 -1
- package/storybook-static/assets/iframe-CU5nRRrn.css +1 -0
- package/storybook-static/assets/{iframe-B8pH-Lvr.js → iframe-Cw8dCV4Z.js} +180 -181
- package/storybook-static/assets/{index-PY_vM88c.js → index-A7l1uA6_.js} +6 -6
- package/storybook-static/assets/{index-BN99WpBo.js → index-Bm5msOcI.js} +1 -1
- package/storybook-static/assets/{index-DBfrIdYd.js → index-CzApopWo.js} +1 -1
- package/storybook-static/assets/{proxy-BA3VZtN5.js → proxy-p8L3T_Zy.js} +1 -1
- package/storybook-static/assets/{react-18-7dGub68c.js → react-18-D7YhBYbX.js} +1 -1
- package/storybook-static/assets/{react-three-fiber.esm-DI-wNJmP.js → react-three-fiber.esm-BnMrba87.js} +1 -1
- package/storybook-static/assets/{search-2YqBkJlG.js → search-7V6DOf2z.js} +1 -1
- package/storybook-static/assets/{settings-DvzICcFU.js → settings-B8s5hJGs.js} +1 -1
- package/storybook-static/assets/{sun-DgDhCM_S.js → sun-5V6ee2LJ.js} +1 -1
- package/storybook-static/assets/{trash-2-BwI5jvsn.js → trash-2-DeQvYdO7.js} +1 -1
- package/storybook-static/assets/{use-animation-frame-CF42h0i5.js → use-animation-frame-DovyG_Es.js} +1 -1
- package/storybook-static/assets/{use-in-view-Zn8evg3J.js → use-in-view-Dv3LTdsl.js} +1 -1
- package/storybook-static/assets/{use-motion-value--XhiA2Gt.js → use-motion-value-BVm7csqA.js} +1 -1
- package/storybook-static/assets/{use-spring-CrWzlBMd.js → use-spring-BkrdNVnG.js} +1 -1
- package/storybook-static/assets/{use-transform-vyDqMhf-.js → use-transform-CQNghMvr.js} +1 -1
- package/storybook-static/assets/{useSound-Bk2W5gkV.js → useSound-D23BsIr4.js} +1 -1
- package/storybook-static/assets/{users-aNPxMiig.js → users-R6T-yLyH.js} +1 -1
- package/storybook-static/assets/{x-BC8LCdn9.js → x-CypMgsiv.js} +1 -1
- package/storybook-static/iframe.html +3 -3
- package/storybook-static/index.html +5 -19
- package/storybook-static/index.json +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/addon-visual-tests-assets/visual-test-illustration.mp4 +0 -0
- package/storybook-static/assets/ArrayInput.stories-Cshz2s-a.js +0 -232
- package/storybook-static/assets/BooleansHeatmap-BV4VTyo6.css +0 -1
- package/storybook-static/assets/BooleansHeatmap.stories-CpNxqSED.js +0 -123
- package/storybook-static/assets/Calendar-tbpzwSIm.css +0 -1
- package/storybook-static/assets/Calendar.stories-Cx2JEddO.js +0 -229
- package/storybook-static/assets/Checkbox.stories-BwsnN3CP.js +0 -83
- package/storybook-static/assets/Color-AVL7NMMY-CoWQkAiP.js +0 -1
- package/storybook-static/assets/DateInput-C4-Rlnpy.css +0 -1
- package/storybook-static/assets/DateInput.stories-d46zYiZA.js +0 -119
- package/storybook-static/assets/DocsRenderer-PQXLIZUC-C2AYT361.js +0 -1243
- package/storybook-static/assets/EditFAB.stories-DvtpW34v.js +0 -378
- package/storybook-static/assets/ImageSlideshow.stories-BasuECRV.js +0 -385
- package/storybook-static/assets/LoadingSpinner.stories-Dj0bMFhR.js +0 -169
- package/storybook-static/assets/MoodChart-2hr_Y2GI.css +0 -1
- package/storybook-static/assets/MoodChart.stories-Bk0jtB4g.js +0 -40
- package/storybook-static/assets/Navbar-BPWxCB-U.css +0 -1
- package/storybook-static/assets/Navbar.stories-Dos3kovt.js +0 -320
- package/storybook-static/assets/NumberStepper.stories-BvFwBEjt.js +0 -436
- package/storybook-static/assets/PieChart-OfDGlJ4g.css +0 -1
- package/storybook-static/assets/PieChart.stories-XZqxh_GW.js +0 -199
- package/storybook-static/assets/QuantifiableHabitsChart-Bam6n9X_.css +0 -1
- package/storybook-static/assets/SearchBar.stories-CGaj__zF.js +0 -169
- package/storybook-static/assets/SearchableDropdown.stories-CfeFR5Rk.js +0 -282
- package/storybook-static/assets/SelectInput.stories-DByYKCGI.js +0 -129
- package/storybook-static/assets/SleepChart-DBRb08s_.css +0 -1
- package/storybook-static/assets/SleepChart.stories-DcoBwiEm.js +0 -58
- package/storybook-static/assets/Slider-Bq7zObwV.css +0 -1
- package/storybook-static/assets/Table-DnhtoClE.css +0 -1
- package/storybook-static/assets/Tabs-D5ZPN7MM.css +0 -1
- package/storybook-static/assets/TextArea.stories-Bpqlv7j5.js +0 -155
- package/storybook-static/assets/TextInput-BjVJQEYN.css +0 -1
- package/storybook-static/assets/TextInput-CLyTHgK9.js +0 -28
- package/storybook-static/assets/TextInput.stories-BP1LSkLG.js +0 -203
- package/storybook-static/assets/ThemeSwitcher.stories-Bj0YQKM5.js +0 -62
- package/storybook-static/assets/TimeInput-C3enPYoV.css +0 -1
- package/storybook-static/assets/TimeInput.stories-Cd28zwwR.js +0 -55
- package/storybook-static/assets/Toggle.stories-DtqFmh3E.js +0 -199
- package/storybook-static/assets/ToggleButton.stories-DkN_4qpp.js +0 -163
- package/storybook-static/assets/client-0pKYCVHx.js +0 -1
- package/storybook-static/assets/iframe-B7RIyArP.css +0 -1
- package/storybook-static/assets/index-bi5z6E3I.js +0 -1
- package/storybook-static/assets/layout-grid-TssXYNzv.js +0 -6
- package/storybook-static/sb-addons/chromatic-com-storybook-4/manager-bundle.js +0 -356
- package/storybook-static/sb-addons/chromatic-com-storybook-4/manager-bundle.js.LEGAL.txt +0 -40
- package/storybook-static/sb-addons/docs-2/manager-bundle.js +0 -151
- package/storybook-static/sb-addons/onboarding-1/manager-bundle.js +0 -127
- /package/storybook-static/sb-addons/{links-3 → links-1}/manager-bundle.js +0 -0
- /package/storybook-static/sb-addons/{storybook-5 → storybook-2}/manager-bundle.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as d,j as e}from"./iframe-
|
|
1
|
+
import{r as d,j as e}from"./iframe-Cw8dCV4Z.js";import{u as y}from"./use-motion-value-BVm7csqA.js";import{u as S}from"./use-transform-CQNghMvr.js";import{u as H}from"./use-spring-BkrdNVnG.js";import{m as k}from"./proxy-p8L3T_Zy.js";import{A as D}from"./index-CzApopWo.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-BCa1jVYq.js";const p={"dock-outer":"_dock-outer_12xx3_1","dock-panel":"_dock-panel_12xx3_8","dock-item":"_dock-item_12xx3_23","dock-icon":"_dock-icon_12xx3_38","dock-label":"_dock-label_12xx3_44"};function M({children:t,className:l="",onClick:i,mouseX:o,spring:m,distance:a,magnification:r,baseItemSize:c}){const u=d.useRef(null),s=y(0),x=S(o,n=>{var v;const b=((v=u.current)==null?void 0:v.getBoundingClientRect())??{x:0};return n-b.x-c/2}),g=S(x,[-a,0,a],[c,r,c]),f=H(g,m);return e.jsx(k.div,{ref:u,style:{width:f,height:f},onHoverStart:()=>s.set(1),onHoverEnd:()=>s.set(0),onFocus:()=>s.set(1),onBlur:()=>s.set(0),onClick:i,className:`${p["dock-item"]} ${l}`,tabIndex:0,role:"button","aria-haspopup":"true",children:d.Children.map(t,n=>d.cloneElement(n,{isHovered:s}))})}function V({children:t,className:l="",...i}){const{isHovered:o}=i,[m,a]=d.useState(!1);return d.useEffect(()=>{const r=o.on("change",c=>{a(c===1)});return()=>r()},[o]),e.jsx(D,{children:m&&e.jsx(k.div,{initial:{opacity:0,y:0},animate:{opacity:1,y:-10},exit:{opacity:0,y:0},transition:{duration:.2},className:`${p["dock-label"]} ${l}`,role:"tooltip",style:{x:"-50%"},children:t})})}function N({children:t,className:l=""}){return e.jsx("div",{className:`${p["dock-icon"]} ${l}`,children:t})}function z({items:t,className:l="",spring:i={mass:.1,stiffness:150,damping:12},magnification:o=70,distance:m=200,panelHeight:a=68,dockHeight:r=256,baseItemSize:c=50}){const u=y(1/0),s=y(0),x=d.useMemo(()=>Math.max(r,o+o/2+4),[o,r]),g=S(s,[0,1],[a,x]),f=H(g,i);return e.jsx(k.div,{style:{height:f,scrollbarWidth:"none"},className:`${p["dock-outer"]}`,children:e.jsx(k.div,{onMouseMove:({pageX:n})=>{s.set(1),u.set(n)},onMouseLeave:()=>{s.set(0),u.set(1/0)},className:`${p["dock-panel"]} ${l}`,style:{height:a},role:"toolbar","aria-label":"Application dock",children:t.map((n,b)=>e.jsxs(M,{onClick:n.onClick,className:n.className,mouseX:u,spring:i,distance:m,magnification:o,baseItemSize:c,children:[e.jsx(N,{children:n.icon}),e.jsx(V,{children:n.label})]},b))})})}z.__docgenInfo={description:"",methods:[],displayName:"Dock",props:{className:{defaultValue:{value:"''",computed:!1},required:!1},spring:{defaultValue:{value:"{ mass: 0.1, stiffness: 150, damping: 12 }",computed:!1},required:!1},magnification:{defaultValue:{value:"70",computed:!1},required:!1},distance:{defaultValue:{value:"200",computed:!1},required:!1},panelHeight:{defaultValue:{value:"68",computed:!1},required:!1},dockHeight:{defaultValue:{value:"256",computed:!1},required:!1},baseItemSize:{defaultValue:{value:"50",computed:!1},required:!1}}};const L={title:"ReactBits/Components/Dock",component:z,parameters:{layout:"fullscreen"}},h={args:{items:[{icon:e.jsx("span",{style:{fontSize:24},children:"🏠"}),label:"Home",onClick:()=>console.log("Home")},{icon:e.jsx("span",{style:{fontSize:24},children:"📄"}),label:"Documents",onClick:()=>console.log("Documents")},{icon:e.jsx("span",{style:{fontSize:24},children:"⚙️"}),label:"Settings",onClick:()=>console.log("Settings")},{icon:e.jsx("span",{style:{fontSize:24},children:"📧"}),label:"Mail",onClick:()=>console.log("Mail")},{icon:e.jsx("span",{style:{fontSize:24},children:"🔍"}),label:"Search",onClick:()=>console.log("Search")}],magnification:70,distance:200,panelHeight:68,dockHeight:256,baseItemSize:50}};var _,j,C;h.parameters={...h.parameters,docs:{...(_=h.parameters)==null?void 0:_.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
items: [{
|
|
4
4
|
icon: <span style={{
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import{r as a,j as e}from"./iframe-Cw8dCV4Z.js";import{m as Y}from"./proxy-p8L3T_Zy.js";import{C as O}from"./check-DLeHG_Da.js";import{X as G}from"./x-CypMgsiv.js";import{c as J}from"./createLucideIcon-dvowvj4F.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 K=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Q=J("square-pen",K),Z="_fab_1ffxw_2",ee="_primary_1ffxw_54",te="_secondary_1ffxw_64",ne="_success_1ffxw_74",ae="_loader_1ffxw_85",se="_draggable_1ffxw_102",ie="_dragging_1ffxw_110",d={fab:Z,primary:ee,secondary:te,success:ne,loader:ae,draggable:se,dragging:ie},w=({canEdit:l,isEditMode:s,hasUnsavedChanges:n=!1,isSaving:t=!1,onEnterEditMode:f,onExitEditMode:E,position:c={bottom:32,right:32}})=>{const[u,C]=a.useState(!1),[m,i]=a.useState(null),[r,k]=a.useState(!1),j=a.useRef(null),h=a.useRef(null),p=a.useRef(null);a.useEffect(()=>{const o=()=>{C(window.innerWidth<=768)};return o(),window.addEventListener("resize",o),()=>{window.removeEventListener("resize",o)}},[]);const P=o=>{var x;if(!u)return;const v=o.touches[0],g=(x=j.current)==null?void 0:x.getBoundingClientRect();g&&(h.current={x:v.clientX,y:v.clientY},p.current={x:g.left+g.width/2,y:g.top+g.height/2},k(!0))},R=o=>{if(!r||!h.current||!p.current)return;o.preventDefault();const v=o.touches[0],g=v.clientX-h.current.x,x=v.clientY-h.current.y;let U=p.current.x+g,_=p.current.y+x;const y=30;U=Math.max(y,Math.min(window.innerWidth-y,U)),_=Math.max(y,Math.min(window.innerHeight-y,_)),i({x:U,y:_})},F=()=>{k(!1),h.current=null,p.current=null},N=o=>{!r&&!t&&(s?E():f())};if(!l)return null;const W=()=>m?{position:"fixed",left:`${m.x}px`,top:`${m.y}px`,transform:"translate(-50%, -50%)",touchAction:"none"}:{position:"fixed",...c,touchAction:u?"none":"auto"},V=()=>t?d.primary:s?n?d.success:d.secondary:d.primary,$=()=>t?e.jsx("div",{className:d.loader}):s?n?e.jsx(O,{size:24}):e.jsx(G,{size:24}):e.jsx(Q,{size:24}),X=()=>t?"Saving changes":s?n?"Save and exit edit mode":"Exit edit mode":"Enter edit mode";return e.jsx(Y.button,{ref:j,className:`${d.fab} ${V()} ${u?d.draggable:""} ${r?d.dragging:""}`,style:W(),onClick:N,onTouchStart:P,onTouchMove:R,onTouchEnd:F,disabled:t,"aria-label":X(),initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},whileHover:!t&&!r?{scale:1.1}:{},whileTap:!t&&!r?{scale:.9}:{},transition:{type:"spring",stiffness:260,damping:20},children:$()})};w.__docgenInfo={description:"",methods:[],displayName:"EditFAB",props:{canEdit:{required:!0,tsType:{name:"boolean"},description:""},isEditMode:{required:!0,tsType:{name:"boolean"},description:""},hasUnsavedChanges:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},isSaving:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},onEnterEditMode:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},onExitEditMode:{required:!0,tsType:{name:"signature",type:"function",raw:"() => void",signature:{arguments:[],return:{name:"void"}}},description:""},position:{required:!1,tsType:{name:"signature",type:"object",raw:`{
|
|
7
|
+
bottom?: string | number;
|
|
8
|
+
right?: string | number;
|
|
9
|
+
top?: string | number;
|
|
10
|
+
left?: string | number;
|
|
11
|
+
}`,signature:{properties:[{key:"bottom",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!1}},{key:"right",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!1}},{key:"top",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!1}},{key:"left",value:{name:"union",raw:"string | number",elements:[{name:"string"},{name:"number"}],required:!1}}]}},description:"",defaultValue:{value:"{ bottom: 32, right: 32 }",computed:!1}}}};const me={title:"Molecules/EditFAB",component:w,parameters:{layout:"fullscreen",docs:{description:{component:"A floating action button for edit mode with touch-friendly mobile dragging support and state management."}}},tags:["autodocs"],argTypes:{canEdit:{control:"boolean"},isEditMode:{control:"boolean"},hasUnsavedChanges:{control:"boolean"},isSaving:{control:"boolean"},position:{control:"object"},onEnterEditMode:{action:"enter-edit-mode"},onExitEditMode:{action:"exit-edit-mode"}}},b={args:{canEdit:!0,isEditMode:!1,hasUnsavedChanges:!1,isSaving:!1,onEnterEditMode:()=>{},onExitEditMode:()=>{}}},S={args:{canEdit:!0,isEditMode:!1,hasUnsavedChanges:!1,isSaving:!1,onEnterEditMode:()=>{},onExitEditMode:()=>{}},render:()=>e.jsx("div",{style:{position:"relative",height:"100vh",background:"var(--color-background-secondary)",padding:"2rem"},children:e.jsx("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(280px, 1fr))",gap:"2rem",maxWidth:"1200px",margin:"0 auto"},children:[{title:"View Mode",desc:"Default — not editing",props:{canEdit:!0,isEditMode:!1,hasUnsavedChanges:!1,isSaving:!1}},{title:"Edit Mode (No Changes)",desc:"Editing, nothing changed yet",props:{canEdit:!0,isEditMode:!0,hasUnsavedChanges:!1,isSaving:!1}},{title:"Unsaved Changes",desc:"Edits made, not saved",props:{canEdit:!0,isEditMode:!0,hasUnsavedChanges:!0,isSaving:!1}},{title:"Saving",desc:"Save in progress",props:{canEdit:!0,isEditMode:!0,hasUnsavedChanges:!0,isSaving:!0}},{title:"No Permission",desc:"canEdit=false hides FAB",props:{canEdit:!1,isEditMode:!1,hasUnsavedChanges:!1,isSaving:!1}}].map(({title:l,desc:s,props:n},t)=>e.jsxs("div",{style:{position:"relative",padding:"1.5rem",background:"var(--color-background)",borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-sm)",minHeight:160},children:[e.jsx("h3",{style:{marginTop:0},children:l}),e.jsx("p",{style:{fontSize:"0.875rem",color:"var(--color-text-secondary)"},children:s}),e.jsx(w,{canEdit:n.canEdit,isEditMode:n.isEditMode,hasUnsavedChanges:n.hasUnsavedChanges,isSaving:n.isSaving,onEnterEditMode:()=>{},onExitEditMode:()=>{},position:{bottom:16,right:16}})]},t))})}),parameters:{controls:{disable:!0}}},M={args:{canEdit:!0,isEditMode:!1,hasUnsavedChanges:!1,isSaving:!1,onEnterEditMode:()=>{},onExitEditMode:()=>{}},render:()=>{const[l,s]=a.useState(!1),[n,t]=a.useState(!1),[f,E]=a.useState(!1),[c,u]=a.useState({title:"Project Documentation",content:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",lastSaved:new Date().toLocaleTimeString()}),C=()=>{s(!0),t(!1)},m=async()=>{n&&(E(!0),await new Promise(i=>setTimeout(i,1500)),u(i=>({...i,lastSaved:new Date().toLocaleTimeString()})),E(!1)),s(!1),t(!1)};return e.jsxs("div",{style:{position:"relative",height:"100vh",background:"var(--color-background-secondary)"},children:[e.jsxs("div",{style:{maxWidth:"800px",margin:"0 auto",padding:"2rem",background:"var(--color-background)",minHeight:"100vh"},children:[e.jsxs("div",{style:{borderBottom:"2px solid var(--color-border)",paddingBottom:"1rem",marginBottom:"2rem"},children:[l?e.jsx("input",{type:"text",value:c.title,onChange:i=>{u(r=>({...r,title:i.target.value})),t(!0)},style:{fontSize:"2rem",fontWeight:"bold",width:"100%",padding:"0.5rem",borderRadius:"var(--radius-sm)"}}):e.jsx("h1",{style:{margin:0,fontSize:"2rem"},children:c.title}),e.jsxs("p",{style:{margin:"0.5rem 0 0",fontSize:"0.875rem",color:"var(--color-text-secondary)"},children:["Last saved: ",c.lastSaved," | Status:"," ",f?"Saving...":n?"Unsaved changes":"All changes saved"]})]}),l?e.jsx("textarea",{value:c.content,onChange:i=>{u(r=>({...r,content:i.target.value})),t(!0)},style:{width:"100%",height:"400px",padding:"1rem",borderRadius:"var(--radius-md)",fontSize:"1rem",lineHeight:1.6,resize:"vertical",fontFamily:"inherit"}}):e.jsx("div",{style:{padding:"1rem",lineHeight:1.8,fontSize:"1rem",minHeight:"400px",whiteSpace:"pre-wrap"},children:c.content})]}),e.jsx(w,{canEdit:!0,isEditMode:l,hasUnsavedChanges:n,isSaving:f,onEnterEditMode:C,onExitEditMode:m,position:{bottom:32,right:32}})]})},parameters:{controls:{disable:!0}}};var T,z,D;b.parameters={...b.parameters,docs:{...(T=b.parameters)==null?void 0:T.docs,source:{originalSource:`{
|
|
12
|
+
args: {
|
|
13
|
+
canEdit: true,
|
|
14
|
+
isEditMode: false,
|
|
15
|
+
hasUnsavedChanges: false,
|
|
16
|
+
isSaving: false,
|
|
17
|
+
onEnterEditMode: () => {},
|
|
18
|
+
onExitEditMode: () => {}
|
|
19
|
+
}
|
|
20
|
+
}`,...(D=(z=b.parameters)==null?void 0:z.docs)==null?void 0:D.source}}};var H,q,A;S.parameters={...S.parameters,docs:{...(H=S.parameters)==null?void 0:H.docs,source:{originalSource:`{
|
|
21
|
+
args: {
|
|
22
|
+
canEdit: true,
|
|
23
|
+
isEditMode: false,
|
|
24
|
+
hasUnsavedChanges: false,
|
|
25
|
+
isSaving: false,
|
|
26
|
+
onEnterEditMode: () => {},
|
|
27
|
+
onExitEditMode: () => {}
|
|
28
|
+
},
|
|
29
|
+
render: () => <div style={{
|
|
30
|
+
position: 'relative',
|
|
31
|
+
height: '100vh',
|
|
32
|
+
background: 'var(--color-background-secondary)',
|
|
33
|
+
padding: '2rem'
|
|
34
|
+
}}>
|
|
35
|
+
<div style={{
|
|
36
|
+
display: 'grid',
|
|
37
|
+
gridTemplateColumns: 'repeat(auto-fit, minmax(280px, 1fr))',
|
|
38
|
+
gap: '2rem',
|
|
39
|
+
maxWidth: '1200px',
|
|
40
|
+
margin: '0 auto'
|
|
41
|
+
}}>
|
|
42
|
+
{[{
|
|
43
|
+
title: 'View Mode',
|
|
44
|
+
desc: 'Default — not editing',
|
|
45
|
+
props: {
|
|
46
|
+
canEdit: true,
|
|
47
|
+
isEditMode: false,
|
|
48
|
+
hasUnsavedChanges: false,
|
|
49
|
+
isSaving: false
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
title: 'Edit Mode (No Changes)',
|
|
53
|
+
desc: 'Editing, nothing changed yet',
|
|
54
|
+
props: {
|
|
55
|
+
canEdit: true,
|
|
56
|
+
isEditMode: true,
|
|
57
|
+
hasUnsavedChanges: false,
|
|
58
|
+
isSaving: false
|
|
59
|
+
}
|
|
60
|
+
}, {
|
|
61
|
+
title: 'Unsaved Changes',
|
|
62
|
+
desc: 'Edits made, not saved',
|
|
63
|
+
props: {
|
|
64
|
+
canEdit: true,
|
|
65
|
+
isEditMode: true,
|
|
66
|
+
hasUnsavedChanges: true,
|
|
67
|
+
isSaving: false
|
|
68
|
+
}
|
|
69
|
+
}, {
|
|
70
|
+
title: 'Saving',
|
|
71
|
+
desc: 'Save in progress',
|
|
72
|
+
props: {
|
|
73
|
+
canEdit: true,
|
|
74
|
+
isEditMode: true,
|
|
75
|
+
hasUnsavedChanges: true,
|
|
76
|
+
isSaving: true
|
|
77
|
+
}
|
|
78
|
+
}, {
|
|
79
|
+
title: 'No Permission',
|
|
80
|
+
desc: 'canEdit=false hides FAB',
|
|
81
|
+
props: {
|
|
82
|
+
canEdit: false,
|
|
83
|
+
isEditMode: false,
|
|
84
|
+
hasUnsavedChanges: false,
|
|
85
|
+
isSaving: false
|
|
86
|
+
}
|
|
87
|
+
}].map(({
|
|
88
|
+
title,
|
|
89
|
+
desc,
|
|
90
|
+
props
|
|
91
|
+
}, i) => <div key={i} style={{
|
|
92
|
+
position: 'relative',
|
|
93
|
+
padding: '1.5rem',
|
|
94
|
+
background: 'var(--color-background)',
|
|
95
|
+
borderRadius: 'var(--radius-md)',
|
|
96
|
+
boxShadow: 'var(--shadow-sm)',
|
|
97
|
+
minHeight: 160
|
|
98
|
+
}}>
|
|
99
|
+
<h3 style={{
|
|
100
|
+
marginTop: 0
|
|
101
|
+
}}>{title}</h3>
|
|
102
|
+
<p style={{
|
|
103
|
+
fontSize: '0.875rem',
|
|
104
|
+
color: 'var(--color-text-secondary)'
|
|
105
|
+
}}>{desc}</p>
|
|
106
|
+
<EditFAB canEdit={props.canEdit} isEditMode={props.isEditMode} hasUnsavedChanges={props.hasUnsavedChanges} isSaving={props.isSaving} onEnterEditMode={() => {}} onExitEditMode={() => {}} position={{
|
|
107
|
+
bottom: 16,
|
|
108
|
+
right: 16
|
|
109
|
+
}} />
|
|
110
|
+
</div>)}
|
|
111
|
+
</div>
|
|
112
|
+
</div>,
|
|
113
|
+
parameters: {
|
|
114
|
+
controls: {
|
|
115
|
+
disable: true
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}`,...(A=(q=S.parameters)==null?void 0:q.docs)==null?void 0:A.source}}};var B,I,L;M.parameters={...M.parameters,docs:{...(B=M.parameters)==null?void 0:B.docs,source:{originalSource:`{
|
|
119
|
+
args: {
|
|
120
|
+
canEdit: true,
|
|
121
|
+
isEditMode: false,
|
|
122
|
+
hasUnsavedChanges: false,
|
|
123
|
+
isSaving: false,
|
|
124
|
+
onEnterEditMode: () => {},
|
|
125
|
+
onExitEditMode: () => {}
|
|
126
|
+
},
|
|
127
|
+
render: () => {
|
|
128
|
+
const [isEditMode, setIsEditMode] = useState(false);
|
|
129
|
+
const [hasUnsavedChanges, setHasUnsavedChanges] = useState(false);
|
|
130
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
131
|
+
const [document, setDocument] = useState({
|
|
132
|
+
title: 'Project Documentation',
|
|
133
|
+
content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
|
|
134
|
+
lastSaved: new Date().toLocaleTimeString()
|
|
135
|
+
});
|
|
136
|
+
const handleEnterEditMode = () => {
|
|
137
|
+
setIsEditMode(true);
|
|
138
|
+
setHasUnsavedChanges(false);
|
|
139
|
+
};
|
|
140
|
+
const handleExitEditMode = async () => {
|
|
141
|
+
if (hasUnsavedChanges) {
|
|
142
|
+
setIsSaving(true);
|
|
143
|
+
await new Promise(resolve => setTimeout(resolve, 1500));
|
|
144
|
+
setDocument(prev => ({
|
|
145
|
+
...prev,
|
|
146
|
+
lastSaved: new Date().toLocaleTimeString()
|
|
147
|
+
}));
|
|
148
|
+
setIsSaving(false);
|
|
149
|
+
}
|
|
150
|
+
setIsEditMode(false);
|
|
151
|
+
setHasUnsavedChanges(false);
|
|
152
|
+
};
|
|
153
|
+
return <div style={{
|
|
154
|
+
position: 'relative',
|
|
155
|
+
height: '100vh',
|
|
156
|
+
background: 'var(--color-background-secondary)'
|
|
157
|
+
}}>
|
|
158
|
+
<div style={{
|
|
159
|
+
maxWidth: '800px',
|
|
160
|
+
margin: '0 auto',
|
|
161
|
+
padding: '2rem',
|
|
162
|
+
background: 'var(--color-background)',
|
|
163
|
+
minHeight: '100vh'
|
|
164
|
+
}}>
|
|
165
|
+
<div style={{
|
|
166
|
+
borderBottom: '2px solid var(--color-border)',
|
|
167
|
+
paddingBottom: '1rem',
|
|
168
|
+
marginBottom: '2rem'
|
|
169
|
+
}}>
|
|
170
|
+
{isEditMode ? <input type="text" value={document.title} onChange={e => {
|
|
171
|
+
setDocument(prev => ({
|
|
172
|
+
...prev,
|
|
173
|
+
title: e.target.value
|
|
174
|
+
}));
|
|
175
|
+
setHasUnsavedChanges(true);
|
|
176
|
+
}} style={{
|
|
177
|
+
fontSize: '2rem',
|
|
178
|
+
fontWeight: 'bold',
|
|
179
|
+
width: '100%',
|
|
180
|
+
padding: '0.5rem',
|
|
181
|
+
borderRadius: 'var(--radius-sm)'
|
|
182
|
+
}} /> : <h1 style={{
|
|
183
|
+
margin: 0,
|
|
184
|
+
fontSize: '2rem'
|
|
185
|
+
}}>{document.title}</h1>}
|
|
186
|
+
<p style={{
|
|
187
|
+
margin: '0.5rem 0 0',
|
|
188
|
+
fontSize: '0.875rem',
|
|
189
|
+
color: 'var(--color-text-secondary)'
|
|
190
|
+
}}>
|
|
191
|
+
Last saved: {document.lastSaved} | Status:{' '}
|
|
192
|
+
{isSaving ? 'Saving...' : hasUnsavedChanges ? 'Unsaved changes' : 'All changes saved'}
|
|
193
|
+
</p>
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
{isEditMode ? <textarea value={document.content} onChange={e => {
|
|
197
|
+
setDocument(prev => ({
|
|
198
|
+
...prev,
|
|
199
|
+
content: e.target.value
|
|
200
|
+
}));
|
|
201
|
+
setHasUnsavedChanges(true);
|
|
202
|
+
}} style={{
|
|
203
|
+
width: '100%',
|
|
204
|
+
height: '400px',
|
|
205
|
+
padding: '1rem',
|
|
206
|
+
borderRadius: 'var(--radius-md)',
|
|
207
|
+
fontSize: '1rem',
|
|
208
|
+
lineHeight: 1.6,
|
|
209
|
+
resize: 'vertical',
|
|
210
|
+
fontFamily: 'inherit'
|
|
211
|
+
}} /> : <div style={{
|
|
212
|
+
padding: '1rem',
|
|
213
|
+
lineHeight: 1.8,
|
|
214
|
+
fontSize: '1rem',
|
|
215
|
+
minHeight: '400px',
|
|
216
|
+
whiteSpace: 'pre-wrap'
|
|
217
|
+
}}>
|
|
218
|
+
{document.content}
|
|
219
|
+
</div>}
|
|
220
|
+
</div>
|
|
221
|
+
|
|
222
|
+
<EditFAB canEdit isEditMode={isEditMode} hasUnsavedChanges={hasUnsavedChanges} isSaving={isSaving} onEnterEditMode={handleEnterEditMode} onExitEditMode={handleExitEditMode} position={{
|
|
223
|
+
bottom: 32,
|
|
224
|
+
right: 32
|
|
225
|
+
}} />
|
|
226
|
+
</div>;
|
|
227
|
+
},
|
|
228
|
+
parameters: {
|
|
229
|
+
controls: {
|
|
230
|
+
disable: true
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}`,...(L=(I=M.parameters)==null?void 0:I.docs)==null?void 0:L.source}}};const he=["Default","AllStates","DocumentEditor"];export{S as AllStates,b as Default,M as DocumentEditor,he as __namedExportsOrder,me as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as G,j as P}from"./iframe-
|
|
1
|
+
import{r as G,j as P}from"./iframe-Cw8dCV4Z.js";import{R as _,P as V,M as q}from"./Mesh-CwXV3WjE.js";import{T as L}from"./Texture-BkQWYNP2.js";import{T as U}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const D={"evil-eye-container":"_evil-eye-container_184dx_1"};function C(i){const r=i.replace("#","");return[parseInt(r.slice(0,2),16)/255,parseInt(r.slice(2,4),16)/255,parseInt(r.slice(4,6),16)/255]}function W(i=256){const r=new Uint8Array(i*i*4);function m(s,c,a){let n=s*374761393+c*668265263+a*1274126177;return n=Math.imul(n^n>>>13,1274126177),((n^n>>>16)>>>0)/4294967296}function w(s,c,a,n){const p=s/i*a,v=c/i*a,l=Math.floor(p),o=Math.floor(v),f=p-l,t=v-o,e=a|0,d=m((l%e+e)%e,(o%e+e)%e,n),u=m(((l+1)%e+e)%e,(o%e+e)%e,n),h=m((l%e+e)%e,((o+1)%e+e)%e,n),E=m(((l+1)%e+e)%e,((o+1)%e+e)%e,n);return d*(1-f)*(1-t)+u*f*(1-t)+h*(1-f)*t+E*f*t}for(let s=0;s<i;s++)for(let c=0;c<i;c++){let a=0,n=.4,p=0;for(let o=0;o<8;o++){const f=32*(1<<o);a+=n*w(c,s,f,o*31),p+=n,n*=.65}a/=p,a=(a-.5)*2.2+.5,a=Math.max(0,Math.min(1,a));const v=Math.round(a*255),l=(s*i+c)*4;r[l]=v,r[l+1]=v,r[l+2]=v,r[l+3]=255}return r}const b=`
|
|
2
2
|
attribute vec2 uv;
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
varying vec2 vUv;
|
|
@@ -87,7 +87,7 @@ void main() {
|
|
|
87
87
|
|
|
88
88
|
gl_FragColor = vec4(color, 1.0);
|
|
89
89
|
}
|
|
90
|
-
`;function N({eyeColor:i="#FF6F37",intensity:r=1.5,pupilSize:m=.6,irisWidth:w=.25,glowIntensity:s=.35,scale:c=.8,noiseScale:a=1,pupilFollow:n=1,flameSpeed:p=1,backgroundColor:v="#000000"}){const
|
|
90
|
+
`;function N({eyeColor:i="#FF6F37",intensity:r=1.5,pupilSize:m=.6,irisWidth:w=.25,glowIntensity:s=.35,scale:c=.8,noiseScale:a=1,pupilFollow:n=1,flameSpeed:p=1,backgroundColor:v="#000000"}){const l=G.useRef(null);return G.useEffect(()=>{if(!l.current)return;const o=l.current,f=new _({alpha:!0,premultipliedAlpha:!1}),t=f.gl;t.clearColor(0,0,0,0);const e=W(256),d=new L(t,{image:e,width:256,height:256,generateMipmaps:!1,flipY:!1});d.minFilter=t.LINEAR,d.magFilter=t.LINEAR,d.wrapS=t.REPEAT,d.wrapT=t.REPEAT;const u={x:0,y:0,tx:0,ty:0};function h(g){const x=o.getBoundingClientRect();u.tx=(g.clientX-x.left)/x.width*2-1,u.ty=-((g.clientY-x.top)/x.height*2-1)}function E(){u.tx=0,u.ty=0}o.addEventListener("mousemove",h),o.addEventListener("mouseleave",E);let y;function F(){f.setSize(o.offsetWidth,o.offsetHeight),y&&(y.uniforms.uResolution.value=[t.canvas.width,t.canvas.height,t.canvas.width/t.canvas.height])}window.addEventListener("resize",F),F();const A=new U(t);y=new V(t,{vertex:b,fragment:O,uniforms:{uTime:{value:0},uResolution:{value:[t.canvas.width,t.canvas.height,t.canvas.width/t.canvas.height]},uNoiseTexture:{value:d},uPupilSize:{value:m},uIrisWidth:{value:w},uGlowIntensity:{value:s},uIntensity:{value:r},uScale:{value:c},uNoiseScale:{value:a},uMouse:{value:[0,0]},uPupilFollow:{value:n},uFlameSpeed:{value:p},uEyeColor:{value:C(i)},uBgColor:{value:C(v)}}});const k=new q(t,{geometry:A,program:y});o.appendChild(t.canvas);let M;function S(g){M=requestAnimationFrame(S),u.x+=(u.tx-u.x)*.05,u.y+=(u.ty-u.y)*.05,y.uniforms.uMouse.value=[u.x,u.y],y.uniforms.uTime.value=g*.001,f.render({scene:k})}return M=requestAnimationFrame(S),()=>{var g;cancelAnimationFrame(M),window.removeEventListener("resize",F),o.removeEventListener("mousemove",h),o.removeEventListener("mouseleave",E),o.removeChild(t.canvas),(g=t.getExtension("WEBGL_lose_context"))==null||g.loseContext()}},[i,r,m,w,s,c,a,n,p,v]),P.jsx("div",{ref:l,className:`${D["evil-eye-container"]}`})}N.__docgenInfo={description:"",methods:[],displayName:"EvilEye",props:{eyeColor:{defaultValue:{value:"'#FF6F37'",computed:!1},required:!1},intensity:{defaultValue:{value:"1.5",computed:!1},required:!1},pupilSize:{defaultValue:{value:"0.6",computed:!1},required:!1},irisWidth:{defaultValue:{value:"0.25",computed:!1},required:!1},glowIntensity:{defaultValue:{value:"0.35",computed:!1},required:!1},scale:{defaultValue:{value:"0.8",computed:!1},required:!1},noiseScale:{defaultValue:{value:"1.0",computed:!1},required:!1},pupilFollow:{defaultValue:{value:"1.0",computed:!1},required:!1},flameSpeed:{defaultValue:{value:"1.0",computed:!1},required:!1},backgroundColor:{defaultValue:{value:"'#000000'",computed:!1},required:!1}}};const $={title:"ReactBits/Backgrounds/EvilEye",component:N,parameters:{layout:"fullscreen"}},R={args:{eyeColor:"#FF6F37",intensity:1.5,pupilSize:.6,irisWidth:.25,glowIntensity:.35,scale:.8,noiseScale:1,pupilFollow:1,flameSpeed:1,backgroundColor:"#000000"}};var I,T,B;R.parameters={...R.parameters,docs:{...(I=R.parameters)==null?void 0:I.docs,source:{originalSource:`{
|
|
91
91
|
args: {
|
|
92
92
|
eyeColor: '#FF6F37',
|
|
93
93
|
intensity: 1.5,
|
package/storybook-static/assets/{FadeContent.stories-B4z_JRy9.js → FadeContent.stories-oNqKrfSe.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as c,j as R}from"./iframe-
|
|
1
|
+
import{r as c,j as R}from"./iframe-Cw8dCV4Z.js";import{g as a}from"./index-C8pce-KX.js";import{S as h}from"./ScrollTrigger-D1XJUMov.js";import"./preload-helper-C1FmrZbK.js";a.registerPlugin(h);const w=({children:q,container:x,blur:d=!1,duration:V=1e3,ease:E="power2.out",delay:b=0,threshold:v=.1,initialOpacity:i=0,disappearAfter:n=0,disappearDuration:S=.5,disappearEase:A="power2.in",onComplete:f,onDisappearanceComplete:s,className:O="",style:_,...j})=>{const p=c.useRef(null);return c.useEffect(()=>{const e=p.current;if(!e)return;let r=x||document.getElementById("snap-main-container")||null;typeof r=="string"&&(r=document.querySelector(r));const k=(1-v)*100,t=l=>typeof l=="number"&&l>10?l/1e3:l;a.set(e,{autoAlpha:i,filter:d?"blur(10px)":"blur(0px)",willChange:"opacity, filter, transform"});const o=a.timeline({paused:!0,delay:t(b),onComplete:()=>{f&&f(),n>0&&a.to(e,{autoAlpha:i,filter:d?"blur(10px)":"blur(0px)",delay:t(n),duration:t(S),ease:A,onComplete:()=>s==null?void 0:s()})}});o.to(e,{autoAlpha:1,filter:"blur(0px)",duration:t(V),ease:E});const F=h.create({trigger:e,scroller:r||window,start:`top ${k}%`,once:!0,onEnter:()=>o.play()});return()=>{F.kill(),o.kill(),a.killTweensOf(e)}},[]),R.jsx("div",{ref:p,className:O,style:_,...j,children:q})};w.__docgenInfo={description:"",methods:[],displayName:"FadeContent",props:{blur:{defaultValue:{value:"false",computed:!1},required:!1},duration:{defaultValue:{value:"1000",computed:!1},required:!1},ease:{defaultValue:{value:"'power2.out'",computed:!1},required:!1},delay:{defaultValue:{value:"0",computed:!1},required:!1},threshold:{defaultValue:{value:"0.1",computed:!1},required:!1},initialOpacity:{defaultValue:{value:"0",computed:!1},required:!1},disappearAfter:{defaultValue:{value:"0",computed:!1},required:!1},disappearDuration:{defaultValue:{value:"0.5",computed:!1},required:!1},disappearEase:{defaultValue:{value:"'power2.in'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1}}};const H={title:"ReactBits/Animations/FadeContent",component:w,parameters:{layout:"fullscreen"}},u={args:{children:"Hello World",blur:!1,duration:1e3,ease:"power2.out",delay:0,threshold:.1,initialOpacity:0,disappearAfter:0,disappearDuration:.5,disappearEase:"power2.in"}};var m,g,y;u.parameters={...u.parameters,docs:{...(m=u.parameters)==null?void 0:m.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
children: 'Hello World',
|
|
4
4
|
blur: false,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as a,j as ee}from"./iframe-
|
|
1
|
+
import{r as a,j as ee}from"./iframe-Cw8dCV4Z.js";import{R as te,P as ae,M as oe}from"./Mesh-CwXV3WjE.js";import{T as re}from"./Triangle-64ffRKNB.js";import{C as w}from"./Color-YRkaOI4u.js";import"./preload-helper-C1FmrZbK.js";const ie={"faulty-terminal-container":"_faulty-terminal-container_kw0wy_1"},ne=`
|
|
2
2
|
attribute vec2 position;
|
|
3
3
|
attribute vec2 uv;
|
|
4
4
|
varying vec2 vUv;
|
|
@@ -200,7 +200,7 @@ void main() {
|
|
|
200
200
|
|
|
201
201
|
gl_FragColor = vec4(col, 1.0);
|
|
202
202
|
}
|
|
203
|
-
`;function le(d){let n=d.replace("#","").trim();n.length===3&&(n=n.split("").map(s=>s+s).join(""));const u=parseInt(n,16);return[(u>>16&255)/255,(u>>8&255)/255,(u&255)/255]}function H({scale:d=1,gridMul:n=[2,1],digitSize:u=1.5,timeScale:s=.3,pause:q=!1,scanlineIntensity:C=.3,glitchAmount:S=1,flickerAmount:T=1,noiseAmp:P=0,chromaticAberration:V=0,dither:p=0,curvature:F=.2,tint:D="#ffffff",mouseReact:f=!0,mouseStrength:_=.2,dpr:k=Math.min(window.devicePixelRatio||1,2),pageLoadAnimation:c=!0,brightness:U=1,className:X,style:Y,...J}){const x=a.useRef(null),K=a.useRef(null),Q=a.useRef(null),z=a.useRef({x:.5,y:.5}),b=a.useRef({x:.5,y:.5}),E=a.useRef(0),R=a.useRef(0),m=a.useRef(0),I=a.useRef(Math.random()*100),v=a.useMemo(()=>le(D),[D]),L=a.useMemo(()=>typeof p=="boolean"?p?1:0:p,[p]),M=a.useCallback(t=>{const r=x.current;if(!r)return;const e=r.getBoundingClientRect(),A=(t.clientX-e.left)/e.width,o=1-(t.clientY-e.top)/e.height;z.current={x:A,y:o}},[]);return a.useEffect(()=>{const t=x.current;if(!t)return;const r=new te({dpr:k});Q.current=r;const e=r.gl;e.clearColor(0,0,0,1);const A=new re(e),o=new ae(e,{vertex:ne,fragment:ue,uniforms:{iTime:{value:0},iResolution:{value:new w(e.canvas.width,e.canvas.height,e.canvas.width/e.canvas.height)},uScale:{value:d},uGridMul:{value:new Float32Array(n)},uDigitSize:{value:u},uScanlineIntensity:{value:C},uGlitchAmount:{value:S},uFlickerAmount:{value:T},uNoiseAmp:{value:P},uChromaticAberration:{value:V},uDither:{value:L},uCurvature:{value:F},uTint:{value:new w(v[0],v[1],v[2])},uMouse:{value:new Float32Array([b.current.x,b.current.y])},uMouseStrength:{value:_},uUseMouse:{value:f?1:0},uPageLoadProgress:{value:c?0:1},uUsePageLoadAnimation:{value:c?1:0},uBrightness:{value:U}}});K.current=o;const Z=new oe(e,{geometry:A,program:o});function G(){!t||!r||(r.setSize(t.offsetWidth,t.offsetHeight),o.uniforms.iResolution.value=new w(e.canvas.width,e.canvas.height,e.canvas.width/e.canvas.height))}const O=new ResizeObserver(()=>G());O.observe(t),G();const j=l=>{if(R.current=requestAnimationFrame(j),c&&m.current===0&&(m.current=l),q)o.uniforms.iTime.value=E.current;else{const g=(l*.001+I.current)*s;o.uniforms.iTime.value=g,E.current=g}if(c&&m.current>0){const i=l-m.current,h=Math.min(i/2e3,1);o.uniforms.uPageLoadProgress.value=h}if(f){const i=b.current,h=z.current;i.x+=(h.x-i.x)*.08,i.y+=(h.y-i.y)*.08;const B=o.uniforms.uMouse.value;B[0]=i.x,B[1]=i.y}r.render({scene:Z})};return R.current=requestAnimationFrame(j),t.appendChild(e.canvas),f&&t.addEventListener("mousemove",M),()=>{var l;cancelAnimationFrame(R.current),O.disconnect(),f&&t.removeEventListener("mousemove",M),e.canvas.parentElement===t&&t.removeChild(e.canvas),(l=e.getExtension("WEBGL_lose_context"))==null||l.loseContext(),m.current=0,I.current=Math.random()*100}},[k,q,s,d,n,u,C,S,T,P,V,L,F,v,f,_,c,U,M]),ee.jsx("div",{ref:x,className:`${ie["faulty-terminal-container"]} ${X}`,style:Y,...J})}H.__docgenInfo={description:"",methods:[],displayName:"FaultyTerminal",props:{scale:{defaultValue:{value:"1",computed:!1},required:!1},gridMul:{defaultValue:{value:"[2, 1]",computed:!1},required:!1},digitSize:{defaultValue:{value:"1.5",computed:!1},required:!1},timeScale:{defaultValue:{value:"0.3",computed:!1},required:!1},pause:{defaultValue:{value:"false",computed:!1},required:!1},scanlineIntensity:{defaultValue:{value:"0.3",computed:!1},required:!1},glitchAmount:{defaultValue:{value:"1",computed:!1},required:!1},flickerAmount:{defaultValue:{value:"1",computed:!1},required:!1},noiseAmp:{defaultValue:{value:"0",computed:!1},required:!1},chromaticAberration:{defaultValue:{value:"0",computed:!1},required:!1},dither:{defaultValue:{value:"0",computed:!1},required:!1},curvature:{defaultValue:{value:"0.2",computed:!1},required:!1},tint:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},mouseReact:{defaultValue:{value:"true",computed:!1},required:!1},mouseStrength:{defaultValue:{value:"0.2",computed:!1},required:!1},dpr:{defaultValue:{value:"Math.min(window.devicePixelRatio || 1, 2)",computed:!0},required:!1},pageLoadAnimation:{defaultValue:{value:"true",computed:!1},required:!1},brightness:{defaultValue:{value:"1",computed:!1},required:!1}}};const pe={title:"ReactBits/Backgrounds/FaultyTerminal",component:H,parameters:{layout:"fullscreen"}
|
|
203
|
+
`;function le(d){let n=d.replace("#","").trim();n.length===3&&(n=n.split("").map(s=>s+s).join(""));const u=parseInt(n,16);return[(u>>16&255)/255,(u>>8&255)/255,(u&255)/255]}function H({scale:d=1,gridMul:n=[2,1],digitSize:u=1.5,timeScale:s=.3,pause:q=!1,scanlineIntensity:C=.3,glitchAmount:S=1,flickerAmount:T=1,noiseAmp:P=0,chromaticAberration:V=0,dither:p=0,curvature:F=.2,tint:D="#ffffff",mouseReact:f=!0,mouseStrength:_=.2,dpr:k=Math.min(window.devicePixelRatio||1,2),pageLoadAnimation:c=!0,brightness:U=1,className:X,style:Y,...J}){const x=a.useRef(null),K=a.useRef(null),Q=a.useRef(null),z=a.useRef({x:.5,y:.5}),b=a.useRef({x:.5,y:.5}),E=a.useRef(0),R=a.useRef(0),m=a.useRef(0),I=a.useRef(Math.random()*100),v=a.useMemo(()=>le(D),[D]),L=a.useMemo(()=>typeof p=="boolean"?p?1:0:p,[p]),M=a.useCallback(t=>{const r=x.current;if(!r)return;const e=r.getBoundingClientRect(),A=(t.clientX-e.left)/e.width,o=1-(t.clientY-e.top)/e.height;z.current={x:A,y:o}},[]);return a.useEffect(()=>{const t=x.current;if(!t)return;const r=new te({dpr:k});Q.current=r;const e=r.gl;e.clearColor(0,0,0,1);const A=new re(e),o=new ae(e,{vertex:ne,fragment:ue,uniforms:{iTime:{value:0},iResolution:{value:new w(e.canvas.width,e.canvas.height,e.canvas.width/e.canvas.height)},uScale:{value:d},uGridMul:{value:new Float32Array(n)},uDigitSize:{value:u},uScanlineIntensity:{value:C},uGlitchAmount:{value:S},uFlickerAmount:{value:T},uNoiseAmp:{value:P},uChromaticAberration:{value:V},uDither:{value:L},uCurvature:{value:F},uTint:{value:new w(v[0],v[1],v[2])},uMouse:{value:new Float32Array([b.current.x,b.current.y])},uMouseStrength:{value:_},uUseMouse:{value:f?1:0},uPageLoadProgress:{value:c?0:1},uUsePageLoadAnimation:{value:c?1:0},uBrightness:{value:U}}});K.current=o;const Z=new oe(e,{geometry:A,program:o});function G(){!t||!r||(r.setSize(t.offsetWidth,t.offsetHeight),o.uniforms.iResolution.value=new w(e.canvas.width,e.canvas.height,e.canvas.width/e.canvas.height))}const O=new ResizeObserver(()=>G());O.observe(t),G();const j=l=>{if(R.current=requestAnimationFrame(j),c&&m.current===0&&(m.current=l),q)o.uniforms.iTime.value=E.current;else{const g=(l*.001+I.current)*s;o.uniforms.iTime.value=g,E.current=g}if(c&&m.current>0){const i=l-m.current,h=Math.min(i/2e3,1);o.uniforms.uPageLoadProgress.value=h}if(f){const i=b.current,h=z.current;i.x+=(h.x-i.x)*.08,i.y+=(h.y-i.y)*.08;const B=o.uniforms.uMouse.value;B[0]=i.x,B[1]=i.y}r.render({scene:Z})};return R.current=requestAnimationFrame(j),t.appendChild(e.canvas),f&&t.addEventListener("mousemove",M),()=>{var l;cancelAnimationFrame(R.current),O.disconnect(),f&&t.removeEventListener("mousemove",M),e.canvas.parentElement===t&&t.removeChild(e.canvas),(l=e.getExtension("WEBGL_lose_context"))==null||l.loseContext(),m.current=0,I.current=Math.random()*100}},[k,q,s,d,n,u,C,S,T,P,V,L,F,v,f,_,c,U,M]),ee.jsx("div",{ref:x,className:`${ie["faulty-terminal-container"]} ${X}`,style:Y,...J})}H.__docgenInfo={description:"",methods:[],displayName:"FaultyTerminal",props:{scale:{defaultValue:{value:"1",computed:!1},required:!1},gridMul:{defaultValue:{value:"[2, 1]",computed:!1},required:!1},digitSize:{defaultValue:{value:"1.5",computed:!1},required:!1},timeScale:{defaultValue:{value:"0.3",computed:!1},required:!1},pause:{defaultValue:{value:"false",computed:!1},required:!1},scanlineIntensity:{defaultValue:{value:"0.3",computed:!1},required:!1},glitchAmount:{defaultValue:{value:"1",computed:!1},required:!1},flickerAmount:{defaultValue:{value:"1",computed:!1},required:!1},noiseAmp:{defaultValue:{value:"0",computed:!1},required:!1},chromaticAberration:{defaultValue:{value:"0",computed:!1},required:!1},dither:{defaultValue:{value:"0",computed:!1},required:!1},curvature:{defaultValue:{value:"0.2",computed:!1},required:!1},tint:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},mouseReact:{defaultValue:{value:"true",computed:!1},required:!1},mouseStrength:{defaultValue:{value:"0.2",computed:!1},required:!1},dpr:{defaultValue:{value:"Math.min(window.devicePixelRatio || 1, 2)",computed:!0},required:!1},pageLoadAnimation:{defaultValue:{value:"true",computed:!1},required:!1},brightness:{defaultValue:{value:"1",computed:!1},required:!1}}};const pe={title:"ReactBits/Backgrounds/FaultyTerminal",component:H,parameters:{layout:"fullscreen"}},y={args:{scale:1,gridMul:[2,1],digitSize:1.5,timeScale:.3,pause:!1,scanlineIntensity:.3,glitchAmount:1,flickerAmount:1,noiseAmp:0,chromaticAberration:0,dither:0,curvature:.2,tint:"#ffffff",mouseReact:!0,mouseStrength:.2,dpr:Math.min(window.devicePixelRatio||1,2),pageLoadAnimation:!0,brightness:1}};var N,W,$;y.parameters={...y.parameters,docs:{...(N=y.parameters)==null?void 0:N.docs,source:{originalSource:`{
|
|
204
204
|
args: {
|
|
205
205
|
scale: 1,
|
|
206
206
|
gridMul: [2, 1],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u}from"./iframe-
|
|
1
|
+
import{r as u}from"./iframe-Cw8dCV4Z.js";import{u as f}from"./react-three-fiber.esm-BnMrba87.js";import{k as d,H as b,z as m,D as F,E as T}from"./three.module--_vTUKhS.js";function g(){return g=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var s=arguments[a];for(var r in s)({}).hasOwnProperty.call(s,r)&&(e[r]=s[r])}return e},g.apply(null,arguments)}function w(e,a,s){const r=f(t=>t.size),c=f(t=>t.viewport),o=typeof e=="number"?e:r.width*c.dpr,i=r.height*c.dpr,l=(typeof e=="number"?s:e)||{},{samples:p=0,depth:h,...y}=l,n=u.useMemo(()=>{const t=new d(o,i,{minFilter:m,magFilter:m,type:b,...y});return h&&(t.depthTexture=new F(o,i,T)),t.samples=p,t},[]);return u.useLayoutEffect(()=>{n.setSize(o,i),p&&(n.samples=p)},[p,n,o,i]),u.useEffect(()=>()=>n.dispose(),[]),n}export{g as _,w as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as d,j as se}from"./iframe-
|
|
1
|
+
import{r as d,j as se}from"./iframe-Cw8dCV4Z.js";import{d as g,S as fe,a as de,W as me,e as x,i as ve,q as pe,M as ge,f as xe}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const he={"floating-lines-container":"_floating-lines-container_1a3kk_1"},be=`
|
|
2
2
|
precision highp float;
|
|
3
3
|
|
|
4
4
|
void main() {
|
|
@@ -184,4 +184,4 @@ void main() {
|
|
|
184
184
|
mainImage(color, gl_FragCoord.xy);
|
|
185
185
|
gl_FragColor = color;
|
|
186
186
|
}
|
|
187
|
-
`,Y=8;function Le(v){let e=v.trim();e.startsWith("#")&&(e=e.slice(1));let i=255,u=255,n=255;return e.length===3?(i=parseInt(e[0]+e[0],16),u=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16)):e.length===6&&(i=parseInt(e.slice(0,2),16),u=parseInt(e.slice(2,4),16),n=parseInt(e.slice(4,6),16)),new x(i/255,u/255,n/255)}function Q({linesGradient:v,enabledWaves:e=["top","middle","bottom"],lineCount:i=[6],lineDistance:u=[5],topWavePosition:n,middleWavePosition:r,bottomWavePosition:a={x:2,y:-.7,rotate:-1},animationSpeed:M=1,interactive:h=!0,bendRadius:_=5,bendStrength:S=-.5,mouseDamping:b=.05,parallax:C=!0,parallaxStrength:L=.2,mixBlendMode:Z="screen"}){const V=d.useRef(null),q=d.useRef(new g(-1e3,-1e3)),B=d.useRef(new g(-1e3,-1e3)),w=d.useRef(0),E=d.useRef(0),G=d.useRef(new g(0,0)),O=d.useRef(new g(0,0)),U=o=>{if(typeof i=="number")return i;if(!e.includes(o))return 0;const c=e.indexOf(o);return i[c]??6},I=o=>{if(typeof u=="number")return u;if(!e.includes(o))return .1;const c=e.indexOf(o);return u[c]??.1},P=e.includes("top")?U("top"):0,W=e.includes("middle")?U("middle"):0,ee=e.includes("bottom")?U("bottom"):0,te=e.includes("top")?I("top")*.01:.01,ne=e.includes("middle")?I("middle")*.01:.01,oe=e.includes("bottom")?I("bottom")*.01:.01;return d.useEffect(()=>{const o=V.current;if(!o)return;let c=!0;const D=new fe,T=new de(-1,1,1,-1,0,1);T.position.z=1;const t=new me({antialias:!0,alpha:!1});t.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),t.domElement.style.width="100%",t.domElement.style.height="100%",o.appendChild(t.domElement);const s={iTime:{value:0},iResolution:{value:new x(1,1,1)},animationSpeed:{value:M},enableTop:{value:e.includes("top")},enableMiddle:{value:e.includes("middle")},enableBottom:{value:e.includes("bottom")},topLineCount:{value:P},middleLineCount:{value:W},bottomLineCount:{value:ee},topLineDistance:{value:te},middleLineDistance:{value:ne},bottomLineDistance:{value:oe},topWavePosition:{value:new x((n==null?void 0:n.x)??10,(n==null?void 0:n.y)??.5,(n==null?void 0:n.rotate)??-.4)},middleWavePosition:{value:new x((r==null?void 0:r.x)??5,(r==null?void 0:r.y)??0,(r==null?void 0:r.rotate)??.2)},bottomWavePosition:{value:new x((a==null?void 0:a.x)??2,(a==null?void 0:a.y)??-.7,(a==null?void 0:a.rotate)??.4)},iMouse:{value:new g(-1e3,-1e3)},interactive:{value:h},bendRadius:{value:_},bendStrength:{value:S},bendInfluence:{value:0},parallax:{value:C},parallaxStrength:{value:L},parallaxOffset:{value:new g(0,0)},lineGradient:{value:Array.from({length:Y},()=>new x(1,1,1))},lineGradientCount:{value:0}};if(v&&v.length>0){const m=v.slice(0,Y);s.lineGradientCount.value=m.length,m.forEach((l,p)=>{const f=Le(l);s.lineGradient.value[p].set(f.x,f.y,f.z)})}const z=new ve({uniforms:s,vertexShader:be,fragmentShader:Ce}),A=new pe(2,2),le=new ge(A,z);D.add(le);const re=new xe,k=()=>{if(!c)return;const m=o.clientWidth||1,l=o.clientHeight||1;t.setSize(m,l,!1);const p=t.domElement.width,f=t.domElement.height;s.iResolution.value.set(p,f,1)};k();const y=typeof ResizeObserver<"u"?new ResizeObserver(()=>{c&&k()}):null;y&&y.observe(o);const F=m=>{const l=t.domElement.getBoundingClientRect(),p=m.clientX-l.left,f=m.clientY-l.top,X=t.getPixelRatio();if(q.current.set(p*X,(l.height-f)*X),w.current=1,C){const ae=l.width/2,ie=l.height/2,ue=(p-ae)/l.width,ce=-(f-ie)/l.height;G.current.set(ue*L,ce*L)}},K=()=>{w.current=0};h&&(t.domElement.addEventListener("pointermove",F),t.domElement.addEventListener("pointerleave",K));let N=0;const j=()=>{c&&(s.iTime.value=re.getElapsedTime(),h&&(B.current.lerp(q.current,b),s.iMouse.value.copy(B.current),E.current+=(w.current-E.current)*b,s.bendInfluence.value=E.current),C&&(O.current.lerp(G.current,b),s.parallaxOffset.value.copy(O.current)),t.render(D,T),N=requestAnimationFrame(j))};return j(),()=>{c=!1,cancelAnimationFrame(N),y&&y.disconnect(),h&&(t.domElement.removeEventListener("pointermove",F),t.domElement.removeEventListener("pointerleave",K)),A.dispose(),z.dispose(),t.dispose(),t.forceContextLoss(),t.domElement.parentElement&&t.domElement.parentElement.removeChild(t.domElement)}},[v,e,i,u,n,r,a,M,h,_,S,b,C,L]),se.jsx("div",{ref:V,className:`${he["floating-lines-container"]}`,style:{mixBlendMode:Z}})}Q.__docgenInfo={description:"",methods:[],displayName:"FloatingLines",props:{enabledWaves:{defaultValue:{value:"['top', 'middle', 'bottom']",computed:!1},required:!1},lineCount:{defaultValue:{value:"[6]",computed:!1},required:!1},lineDistance:{defaultValue:{value:"[5]",computed:!1},required:!1},bottomWavePosition:{defaultValue:{value:"{ x: 2.0, y: -0.7, rotate: -1 }",computed:!1},required:!1},animationSpeed:{defaultValue:{value:"1",computed:!1},required:!1},interactive:{defaultValue:{value:"true",computed:!1},required:!1},bendRadius:{defaultValue:{value:"5.0",computed:!1},required:!1},bendStrength:{defaultValue:{value:"-0.5",computed:!1},required:!1},mouseDamping:{defaultValue:{value:"0.05",computed:!1},required:!1},parallax:{defaultValue:{value:"true",computed:!1},required:!1},parallaxStrength:{defaultValue:{value:"0.2",computed:!1},required:!1},mixBlendMode:{defaultValue:{value:"'screen'",computed:!1},required:!1}}};const Ee={title:"ReactBits/Backgrounds/FloatingLines",component:Q,parameters:{layout:"fullscreen"}
|
|
187
|
+
`,Y=8;function Le(v){let e=v.trim();e.startsWith("#")&&(e=e.slice(1));let i=255,u=255,n=255;return e.length===3?(i=parseInt(e[0]+e[0],16),u=parseInt(e[1]+e[1],16),n=parseInt(e[2]+e[2],16)):e.length===6&&(i=parseInt(e.slice(0,2),16),u=parseInt(e.slice(2,4),16),n=parseInt(e.slice(4,6),16)),new x(i/255,u/255,n/255)}function Q({linesGradient:v,enabledWaves:e=["top","middle","bottom"],lineCount:i=[6],lineDistance:u=[5],topWavePosition:n,middleWavePosition:r,bottomWavePosition:a={x:2,y:-.7,rotate:-1},animationSpeed:M=1,interactive:h=!0,bendRadius:_=5,bendStrength:S=-.5,mouseDamping:b=.05,parallax:C=!0,parallaxStrength:L=.2,mixBlendMode:Z="screen"}){const V=d.useRef(null),q=d.useRef(new g(-1e3,-1e3)),B=d.useRef(new g(-1e3,-1e3)),w=d.useRef(0),E=d.useRef(0),G=d.useRef(new g(0,0)),O=d.useRef(new g(0,0)),U=o=>{if(typeof i=="number")return i;if(!e.includes(o))return 0;const c=e.indexOf(o);return i[c]??6},I=o=>{if(typeof u=="number")return u;if(!e.includes(o))return .1;const c=e.indexOf(o);return u[c]??.1},P=e.includes("top")?U("top"):0,W=e.includes("middle")?U("middle"):0,ee=e.includes("bottom")?U("bottom"):0,te=e.includes("top")?I("top")*.01:.01,ne=e.includes("middle")?I("middle")*.01:.01,oe=e.includes("bottom")?I("bottom")*.01:.01;return d.useEffect(()=>{const o=V.current;if(!o)return;let c=!0;const D=new fe,T=new de(-1,1,1,-1,0,1);T.position.z=1;const t=new me({antialias:!0,alpha:!1});t.setPixelRatio(Math.min(window.devicePixelRatio||1,2)),t.domElement.style.width="100%",t.domElement.style.height="100%",o.appendChild(t.domElement);const s={iTime:{value:0},iResolution:{value:new x(1,1,1)},animationSpeed:{value:M},enableTop:{value:e.includes("top")},enableMiddle:{value:e.includes("middle")},enableBottom:{value:e.includes("bottom")},topLineCount:{value:P},middleLineCount:{value:W},bottomLineCount:{value:ee},topLineDistance:{value:te},middleLineDistance:{value:ne},bottomLineDistance:{value:oe},topWavePosition:{value:new x((n==null?void 0:n.x)??10,(n==null?void 0:n.y)??.5,(n==null?void 0:n.rotate)??-.4)},middleWavePosition:{value:new x((r==null?void 0:r.x)??5,(r==null?void 0:r.y)??0,(r==null?void 0:r.rotate)??.2)},bottomWavePosition:{value:new x((a==null?void 0:a.x)??2,(a==null?void 0:a.y)??-.7,(a==null?void 0:a.rotate)??.4)},iMouse:{value:new g(-1e3,-1e3)},interactive:{value:h},bendRadius:{value:_},bendStrength:{value:S},bendInfluence:{value:0},parallax:{value:C},parallaxStrength:{value:L},parallaxOffset:{value:new g(0,0)},lineGradient:{value:Array.from({length:Y},()=>new x(1,1,1))},lineGradientCount:{value:0}};if(v&&v.length>0){const m=v.slice(0,Y);s.lineGradientCount.value=m.length,m.forEach((l,p)=>{const f=Le(l);s.lineGradient.value[p].set(f.x,f.y,f.z)})}const z=new ve({uniforms:s,vertexShader:be,fragmentShader:Ce}),A=new pe(2,2),le=new ge(A,z);D.add(le);const re=new xe,k=()=>{if(!c)return;const m=o.clientWidth||1,l=o.clientHeight||1;t.setSize(m,l,!1);const p=t.domElement.width,f=t.domElement.height;s.iResolution.value.set(p,f,1)};k();const y=typeof ResizeObserver<"u"?new ResizeObserver(()=>{c&&k()}):null;y&&y.observe(o);const F=m=>{const l=t.domElement.getBoundingClientRect(),p=m.clientX-l.left,f=m.clientY-l.top,X=t.getPixelRatio();if(q.current.set(p*X,(l.height-f)*X),w.current=1,C){const ae=l.width/2,ie=l.height/2,ue=(p-ae)/l.width,ce=-(f-ie)/l.height;G.current.set(ue*L,ce*L)}},K=()=>{w.current=0};h&&(t.domElement.addEventListener("pointermove",F),t.domElement.addEventListener("pointerleave",K));let N=0;const j=()=>{c&&(s.iTime.value=re.getElapsedTime(),h&&(B.current.lerp(q.current,b),s.iMouse.value.copy(B.current),E.current+=(w.current-E.current)*b,s.bendInfluence.value=E.current),C&&(O.current.lerp(G.current,b),s.parallaxOffset.value.copy(O.current)),t.render(D,T),N=requestAnimationFrame(j))};return j(),()=>{c=!1,cancelAnimationFrame(N),y&&y.disconnect(),h&&(t.domElement.removeEventListener("pointermove",F),t.domElement.removeEventListener("pointerleave",K)),A.dispose(),z.dispose(),t.dispose(),t.forceContextLoss(),t.domElement.parentElement&&t.domElement.parentElement.removeChild(t.domElement)}},[v,e,i,u,n,r,a,M,h,_,S,b,C,L]),se.jsx("div",{ref:V,className:`${he["floating-lines-container"]}`,style:{mixBlendMode:Z}})}Q.__docgenInfo={description:"",methods:[],displayName:"FloatingLines",props:{enabledWaves:{defaultValue:{value:"['top', 'middle', 'bottom']",computed:!1},required:!1},lineCount:{defaultValue:{value:"[6]",computed:!1},required:!1},lineDistance:{defaultValue:{value:"[5]",computed:!1},required:!1},bottomWavePosition:{defaultValue:{value:"{ x: 2.0, y: -0.7, rotate: -1 }",computed:!1},required:!1},animationSpeed:{defaultValue:{value:"1",computed:!1},required:!1},interactive:{defaultValue:{value:"true",computed:!1},required:!1},bendRadius:{defaultValue:{value:"5.0",computed:!1},required:!1},bendStrength:{defaultValue:{value:"-0.5",computed:!1},required:!1},mouseDamping:{defaultValue:{value:"0.05",computed:!1},required:!1},parallax:{defaultValue:{value:"true",computed:!1},required:!1},parallaxStrength:{defaultValue:{value:"0.2",computed:!1},required:!1},mixBlendMode:{defaultValue:{value:"'screen'",computed:!1},required:!1}}};const Ee={title:"ReactBits/Backgrounds/FloatingLines",component:Q,parameters:{layout:"fullscreen"}},R={};var H,$,J;R.parameters={...R.parameters,docs:{...(H=R.parameters)==null?void 0:H.docs,source:{originalSource:"{}",...(J=($=R.parameters)==null?void 0:$.docs)==null?void 0:J.source}}};const Ue=["Default"];export{R as Default,Ue as __namedExportsOrder,Ee as default};
|
package/storybook-static/assets/{FlowingMenu.stories-DmOspv0B.js → FlowingMenu.stories-C5dfG25U.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u,r as c}from"./iframe-
|
|
1
|
+
import{j as u,r as c}from"./iframe-Cw8dCV4Z.js";import{g as v}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const W="_menu_hu66r_1",B="_menu__item_hu66r_15",S="_marquee_hu66r_49",T="_marquee__inner_hu66r_60",I="_marquee__part_hu66r_75",L="_marquee__img_hu66r_90",a={"menu-wrap":"_menu-wrap_hu66r_1",menu:W,menu__item:B,"menu__item-link":"_menu__item-link_hu66r_27",marquee:S,"marquee__inner-wrap":"_marquee__inner-wrap_hu66r_60",marquee__inner:T,marquee__part:I,marquee__img:L};function N({items:q=[],speed:l=15,textColor:f="#fff",bgColor:p="#060010",marqueeBgColor:g="#fff",marqueeTextColor:x="#060010",borderColor:C="#fff"}){return u.jsx("div",{className:`${a["menu-wrap"]}`,style:{backgroundColor:p},children:u.jsx("nav",{className:`${a.menu}`,children:q.map((y,i)=>u.jsx(A,{...y,speed:l,textColor:f,marqueeBgColor:g,marqueeTextColor:x,borderColor:C},i))})})}function A({link:q,text:l,image:f,speed:p,textColor:g,marqueeBgColor:x,marqueeTextColor:C,borderColor:y}){const i=c.useRef(null),m=c.useRef(null),o=c.useRef(null),d=c.useRef(null),[w,$]=c.useState(4),k={duration:.6,ease:"expo"},b=(t,e,r,n)=>{const s=j(t,e,r/2,0),_=j(t,e,r/2,n);return s<_?"top":"bottom"},j=(t,e,r,n)=>{const s=t-r,_=e-n;return s*s+_*_};c.useEffect(()=>{const t=()=>{if(!o.current)return;const e=o.current.querySelector("[data-marquee-part]");if(!e)return;const r=e.offsetWidth,n=window.innerWidth,s=Math.ceil(n/r)+2;$(Math.max(4,s))};return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[l,f]),c.useEffect(()=>{const e=setTimeout(()=>{if(!o.current)return;const r=o.current.querySelector("[data-marquee-part]");if(!r)return;const n=r.offsetWidth;n!==0&&(d.current&&d.current.kill(),d.current=v.to(o.current,{x:-n,duration:p,ease:"none",repeat:-1}))},50);return()=>{clearTimeout(e),d.current&&d.current.kill()}},[l,f,w,p]);const D=t=>{if(!i.current||!m.current||!o.current)return;const e=i.current.getBoundingClientRect(),r=t.clientX-e.left,n=t.clientY-e.top,s=b(r,n,e.width,e.height);v.timeline({defaults:k}).set(m.current,{y:s==="top"?"-101%":"101%"},0).set(o.current,{y:s==="top"?"101%":"-101%"},0).to([m.current,o.current],{y:"0%"},0)},V=t=>{if(!i.current||!m.current||!o.current)return;const e=i.current.getBoundingClientRect(),r=t.clientX-e.left,n=t.clientY-e.top,s=b(r,n,e.width,e.height);v.timeline({defaults:k}).to(m.current,{y:s==="top"?"-101%":"101%"},0).to(o.current,{y:s==="top"?"101%":"-101%"},0)};return u.jsxs("div",{className:`${a.menu__item}`,ref:i,style:{borderColor:y},children:[u.jsx("a",{className:`${a["menu__item-link"]}`,href:q,onMouseEnter:D,onMouseLeave:V,style:{color:g},children:l}),u.jsx("div",{className:`${a.marquee}`,ref:m,style:{backgroundColor:x},children:u.jsx("div",{className:`${a["marquee__inner-wrap"]}`,children:u.jsx("div",{className:`${a.marquee__inner}`,ref:o,"aria-hidden":"true",children:[...Array(w)].map((t,e)=>u.jsxs("div",{className:`${a.marquee__part}`,"data-marquee-part":!0,style:{color:C},children:[u.jsx("span",{children:l}),u.jsx("div",{className:`${a.marquee__img}`,style:{backgroundImage:`url(${f})`}})]},e))})})})]})}N.__docgenInfo={description:"",methods:[],displayName:"FlowingMenu",props:{items:{defaultValue:{value:"[]",computed:!1},required:!1},speed:{defaultValue:{value:"15",computed:!1},required:!1},textColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1},bgColor:{defaultValue:{value:"'#060010'",computed:!1},required:!1},marqueeBgColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1},marqueeTextColor:{defaultValue:{value:"'#060010'",computed:!1},required:!1},borderColor:{defaultValue:{value:"'#fff'",computed:!1},required:!1}}};const P={title:"ReactBits/Components/FlowingMenu",component:N,parameters:{layout:"fullscreen"}},h={args:{items:[{link:"#",text:"Home",image:"https://picsum.photos/seed/a/600/400"},{link:"#",text:"About",image:"https://picsum.photos/seed/b/600/400"},{link:"#",text:"Projects",image:"https://picsum.photos/seed/c/600/400"},{link:"#",text:"Contact",image:"https://picsum.photos/seed/d/600/400"}],speed:15,textColor:"#fff",bgColor:"#060010",marqueeBgColor:"#fff",marqueeTextColor:"#060010",borderColor:"#fff"}};var R,M,E;h.parameters={...h.parameters,docs:{...(R=h.parameters)==null?void 0:R.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
items: [{
|
|
4
4
|
link: '#',
|