@stfrigerio/sito-template 0.1.37 → 0.1.39
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/organisms/Navbar/Navbar.d.ts.map +1 -1
- package/dist/index.esm.js +76 -18
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +76 -18
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +2 -2
- package/storybook-static/assets/3d/bar.glb +0 -0
- package/storybook-static/assets/3d/cube.glb +0 -0
- package/storybook-static/assets/3d/lens.glb +0 -0
- package/storybook-static/assets/ASCIIText.stories-C2xDENP3.js +82 -0
- package/storybook-static/assets/AllAtoms.stories-B6sDWol9.js +109 -0
- package/storybook-static/assets/AnimatedContent.stories-BsmULV3s.js +18 -0
- package/storybook-static/assets/AnimatedList-B3_lNwJZ.css +1 -0
- package/storybook-static/assets/AnimatedList.stories-CpaOS5Tg.js +26 -0
- package/storybook-static/assets/Antigravity.stories-Bt6bMzsu.js +19 -0
- package/storybook-static/assets/ArrayInput.stories-DWAGBtBK.js +232 -0
- package/storybook-static/assets/Aurora-JSo3CGBi.css +1 -0
- package/storybook-static/assets/Aurora.stories-D2saYiRk.js +97 -0
- package/storybook-static/assets/Beams-BaZopjLr.css +1 -0
- package/storybook-static/assets/Beams.stories-BnM_wPsm.js +122 -0
- package/storybook-static/assets/BlobCursor-sr9FxN5W.css +1 -0
- package/storybook-static/assets/BlobCursor.stories-DDxFJs49.js +24 -0
- package/storybook-static/assets/BlurText.stories-Bpt2Pxty.js +11 -0
- package/storybook-static/assets/{BooleansHeatmap.stories-2u4SThph.js → BooleansHeatmap.stories-3npXygec.js} +8 -8
- package/storybook-static/assets/BorderGlow-BkXv9hP6.css +1 -0
- package/storybook-static/assets/BorderGlow.stories-Ctdci-vM.js +15 -0
- package/storybook-static/assets/BubbleMenu-C856-Amm.css +1 -0
- package/storybook-static/assets/BubbleMenu.stories-D0BfU9Sn.js +57 -0
- package/storybook-static/assets/{Button-VfdDKp2T.js → Button-Bkr9S309.js} +2 -2
- package/storybook-static/assets/Button.stories-9jnfGkHf.js +93 -0
- package/storybook-static/assets/Calendar-BSjjdOp3.css +1 -0
- package/storybook-static/assets/Calendar.stories-Bv76X2vb.js +470 -0
- package/storybook-static/assets/Camera-BM3HOhP6.js +1 -0
- package/storybook-static/assets/Card-BLzDBn78.js +49 -0
- package/storybook-static/assets/Card-BxyVZ-1r.css +1 -0
- package/storybook-static/assets/Card.stories-BbHJW4z7.js +127 -0
- package/storybook-static/assets/CardNav-DJBuAE3a.css +1 -0
- package/storybook-static/assets/CardNav.stories-0AGDiezF.js +55 -0
- package/storybook-static/assets/Carousel-DQYq51gd.css +1 -0
- package/storybook-static/assets/Carousel.stories-TJ2kpedN.js +58 -0
- package/storybook-static/assets/{Checkbox-BHwlDfRP.js → Checkbox-CpADrZij.js} +2 -2
- package/storybook-static/assets/{Checkbox.stories-DxTQrFgm.js → Checkbox.stories-RTwjfwnG.js} +2 -2
- package/storybook-static/assets/ChromaGrid-DuVAYWII.css +1 -0
- package/storybook-static/assets/ChromaGrid.stories-BQ3E28Hi.js +59 -0
- package/storybook-static/assets/CircularGallery-Dw0kM5fT.css +1 -0
- package/storybook-static/assets/CircularGallery.stories-DJqMMKX-.js +95 -0
- package/storybook-static/assets/CircularText-DofQkQcn.css +1 -0
- package/storybook-static/assets/CircularText.stories-BFdO2vvu.js +7 -0
- package/storybook-static/assets/ClickSpark.stories-C9eRAhrL.js +12 -0
- package/storybook-static/assets/Color-AVL7NMMY-_tP8XmFH.js +1 -0
- package/storybook-static/assets/Color-YRkaOI4u.js +1 -0
- package/storybook-static/assets/ColorBends-BkbPScKk.css +1 -0
- package/storybook-static/assets/ColorBends.stories-BzjHvboa.js +103 -0
- package/storybook-static/assets/CountUp.stories-C4KGivWd.js +11 -0
- package/storybook-static/assets/Counter-NM41Ofe9.css +1 -0
- package/storybook-static/assets/Counter.stories-D0YBBEvJ.js +15 -0
- package/storybook-static/assets/Crosshair.stories-DM0VkVrQ.js +6 -0
- package/storybook-static/assets/Cubes-BbZLRUsz.css +1 -0
- package/storybook-static/assets/Cubes.stories-CDK6pjAy.js +1 -0
- package/storybook-static/assets/CurvedLoop-DyoDI-mm.css +1 -0
- package/storybook-static/assets/CurvedLoop.stories-gsnw1c_E.js +9 -0
- package/storybook-static/assets/DarkVeil-CeIthsg1.css +1 -0
- package/storybook-static/assets/DarkVeil.stories-C5L7QoIF.js +79 -0
- package/storybook-static/assets/DateInput-DDPZqyBR.js +38 -0
- package/storybook-static/assets/{DateInput.stories-BGB5zJBm.js → DateInput.stories-B2N9buuW.js} +2 -2
- package/storybook-static/assets/DecayCard-2Nc9J_8G.css +1 -0
- package/storybook-static/assets/DecayCard.stories-YGHrmyBt.js +8 -0
- package/storybook-static/assets/DecryptedText.stories-B5x1eEwu.js +15 -0
- package/storybook-static/assets/Dither-CDTFjgCl.css +1 -0
- package/storybook-static/assets/Dither.stories-1NJxvHAv.js +134 -0
- package/storybook-static/assets/Dock-DwLYexgF.css +1 -0
- package/storybook-static/assets/Dock.stories-BkL_Ddtn.js +40 -0
- package/storybook-static/assets/{DocsRenderer-PQXLIZUC-q9kcQxfH.js → DocsRenderer-PQXLIZUC-e7izZ1Ax.js} +8 -8
- package/storybook-static/assets/{EditFAB.stories-CmfJxWns.js → EditFAB.stories-CHva2s7W.js} +12 -42
- package/storybook-static/assets/EvilEye-QIF3Ik1Y.css +1 -0
- package/storybook-static/assets/EvilEye.stories-QosS4nGr.js +103 -0
- package/storybook-static/assets/FadeContent.stories-CQDQC3hl.js +14 -0
- package/storybook-static/assets/FaultyTerminal-D6zQXJ-g.css +1 -0
- package/storybook-static/assets/FaultyTerminal.stories-CPrObG0w.js +224 -0
- package/storybook-static/assets/Fbo-CjO1EXQj.js +1 -0
- package/storybook-static/assets/FloatingLines-BPpNRsJk.css +1 -0
- package/storybook-static/assets/FloatingLines.stories-D3I_iw-g.js +187 -0
- package/storybook-static/assets/FlowingMenu-Cff-letA.css +1 -0
- package/storybook-static/assets/FlowingMenu.stories-BmR27_hE.js +27 -0
- package/storybook-static/assets/FluidGlass.stories-CrjfBTV6.js +490 -0
- package/storybook-static/assets/Folder-BFuU52Ao.css +1 -0
- package/storybook-static/assets/Folder.stories-DQJN6c0j.js +13 -0
- package/storybook-static/assets/FuzzyText.stories-zdwwY1Eh.js +22 -0
- package/storybook-static/assets/Galaxy-Cj2Xx-fN.css +1 -0
- package/storybook-static/assets/Galaxy.stories-B3moXy9j.js +184 -0
- package/storybook-static/assets/GhostCursor-CLKgvqwd.css +1 -0
- package/storybook-static/assets/GhostCursor.stories-l58_4Z7e.js +276 -0
- package/storybook-static/assets/GlareHover-D8gfoeb7.css +1 -0
- package/storybook-static/assets/GlareHover.stories-BRGDypMB.js +1 -0
- package/storybook-static/assets/GlassSurface-D51dj98P.css +1 -0
- package/storybook-static/assets/GlassSurface.stories-BghO_KVP.js +43 -0
- package/storybook-static/assets/GlitchText-CsL0nL6_.css +1 -0
- package/storybook-static/assets/GlitchText.stories-rGZAjXwr.js +8 -0
- package/storybook-static/assets/GooeyNav-8BBsSYWJ.css +1 -0
- package/storybook-static/assets/GooeyNav.stories-Ca-d0UXQ.js +24 -0
- package/storybook-static/assets/GradientBlinds-CBpfmlwu.css +1 -0
- package/storybook-static/assets/GradientBlinds.stories-BQDyziZr.js +136 -0
- package/storybook-static/assets/GradientText-Bsx4jZeS.css +1 -0
- package/storybook-static/assets/GradientText.stories-DgmckSCu.js +11 -0
- package/storybook-static/assets/Grainient.stories-8y3SuU8n.js +113 -0
- package/storybook-static/assets/GridMotion-GSkrJvrd.css +1 -0
- package/storybook-static/assets/GridMotion.stories-DbXQdTvS.js +6 -0
- package/storybook-static/assets/ImageSlideshow-CrquLxbj.css +1 -0
- package/storybook-static/assets/ImageSlideshow.stories-BXFPrrNl.js +385 -0
- package/storybook-static/assets/Iridescence-DkXB1G15.css +1 -0
- package/storybook-static/assets/Iridescence.stories-DuPTQ9Fo.js +47 -0
- package/storybook-static/assets/LaserFlow-YpDTX0s9.css +1 -0
- package/storybook-static/assets/LaserFlow.stories-DkwNBv4p.js +253 -0
- package/storybook-static/assets/LetterGlitch.stories-BqwpeJRY.js +1 -0
- package/storybook-static/assets/LightPillar-B1pSzH3x.css +1 -0
- package/storybook-static/assets/LightPillar.stories-BR4beWO5.js +103 -0
- package/storybook-static/assets/LightRays.stories-B3LIIkr4.js +114 -0
- package/storybook-static/assets/Lightning-Duov5diw.css +1 -0
- package/storybook-static/assets/Lightning.stories-DMfFw1rE.js +92 -0
- package/storybook-static/assets/LineWaves-CGZ5Tp0W.css +1 -0
- package/storybook-static/assets/LineWaves.stories-1wQVWsio.js +132 -0
- package/storybook-static/assets/LiquidChrome-C8jkHJD4.css +1 -0
- package/storybook-static/assets/LiquidChrome.stories-DjaXtUK6.js +60 -0
- package/storybook-static/assets/LiquidEther-BTKKmNQk.css +1 -0
- package/storybook-static/assets/LiquidEther.stories-CBrhorPT.js +161 -0
- package/storybook-static/assets/LoadingSpinner-1jvNgxlI.css +1 -0
- package/storybook-static/assets/LoadingSpinner-Cz1P0luX.js +49 -0
- package/storybook-static/assets/LoadingSpinner.stories-Es0dDszY.js +169 -0
- package/storybook-static/assets/MagicRings-B15iCWeD.css +1 -0
- package/storybook-static/assets/MagicRings.stories-BeLXvBv9.js +81 -0
- package/storybook-static/assets/Magnet.stories-CICXGf2j.js +12 -0
- package/storybook-static/assets/MagnetLines-BMVF8tvL.css +1 -0
- package/storybook-static/assets/MagnetLines.stories-D6mS1H0S.js +1 -0
- package/storybook-static/assets/Masonry-JijTuZ6o.css +1 -0
- package/storybook-static/assets/Masonry.stories-DeNkhLqR.js +53 -0
- package/storybook-static/assets/Mesh-CwXV3WjE.js +7 -0
- package/storybook-static/assets/MetaBalls-Do7Vo_Ig.css +1 -0
- package/storybook-static/assets/MetaBalls.stories-CJw3g9l_.js +63 -0
- package/storybook-static/assets/MetallicPaint-rQ3s8Y0v.css +1 -0
- package/storybook-static/assets/MetallicPaint.stories-DXrEd8Sz.js +159 -0
- package/storybook-static/assets/MoodChart.stories-DYRAoHr7.js +40 -0
- package/storybook-static/assets/MotionConfigContext-C_Ro_xsO.js +1 -0
- package/storybook-static/assets/Navbar-BPWxCB-U.css +1 -0
- package/storybook-static/assets/Navbar.stories-B0_sa2Hr.js +325 -0
- package/storybook-static/assets/Noise-wMLTuki1.css +1 -0
- package/storybook-static/assets/Noise.stories-CFYN81ep.js +9 -0
- package/storybook-static/assets/NumberStepper-CWsYbCdm.js +110 -0
- package/storybook-static/assets/NumberStepper-C_00aeJp.css +1 -0
- package/storybook-static/assets/NumberStepper.stories-DtsWeT0-.js +436 -0
- package/storybook-static/assets/Orb-CS8T832d.css +1 -0
- package/storybook-static/assets/Orb.stories-CDw4x9GM.js +177 -0
- package/storybook-static/assets/OrbitImages-DqsOGdeH.css +1 -0
- package/storybook-static/assets/OrbitImages.stories-DLeS6BKi.js +26 -0
- package/storybook-static/assets/PieChart.stories-ByeJD3jM.js +199 -0
- package/storybook-static/assets/PixelBlast-xjKshbH4.css +1 -0
- package/storybook-static/assets/PixelBlast.stories-DZHlNBbC.js +211 -0
- package/storybook-static/assets/PixelCard-dyv8Jzsb.css +1 -0
- package/storybook-static/assets/PixelCard.stories-DD3uedTX.js +6 -0
- package/storybook-static/assets/PixelSnow-Mq8jFd6s.css +1 -0
- package/storybook-static/assets/PixelSnow.stories-GOOKq9Jo.js +155 -0
- package/storybook-static/assets/PixelTransition-4YlpcBIO.css +1 -0
- package/storybook-static/assets/PixelTransition.stories-7l0r4CEg.js +27 -0
- package/storybook-static/assets/Plasma-hc6I4S4K.css +1 -0
- package/storybook-static/assets/Plasma.stories-BNQMi2qs.js +78 -0
- package/storybook-static/assets/Prism-1A7MRUuH.css +1 -0
- package/storybook-static/assets/Prism.stories-DD-1CeHx.js +121 -0
- package/storybook-static/assets/PrismaticBurst-CJEX1JKp.css +1 -0
- package/storybook-static/assets/PrismaticBurst.stories-Bgr0PBrA.js +170 -0
- package/storybook-static/assets/ProfileCard-CO0Gk0e9.css +1 -0
- package/storybook-static/assets/ProfileCard.stories-DAHKcZT1.js +15 -0
- package/storybook-static/assets/QuantifiableHabitsChart-Bam6n9X_.css +1 -0
- package/storybook-static/assets/QuantifiableHabitsChart.stories-6RkqSLP7.js +105 -0
- package/storybook-static/assets/Radar-xwRKh0lP.css +1 -0
- package/storybook-static/assets/Radar.stories-BFyFeDmo.js +88 -0
- package/storybook-static/assets/Ribbons-CjSeVzzZ.css +1 -0
- package/storybook-static/assets/Ribbons.stories-D20uKPGq.js +132 -0
- package/storybook-static/assets/RippleGrid-NvomE-YP.css +1 -0
- package/storybook-static/assets/RippleGrid.stories-BKV-9TCI.js +113 -0
- package/storybook-static/assets/RotatingText-BGK56OzZ.css +1 -0
- package/storybook-static/assets/RotatingText.stories-BnBClUQv.js +12 -0
- package/storybook-static/assets/ScrollFloat-CuaI6iDB.css +1 -0
- package/storybook-static/assets/ScrollFloat.stories-tzqiOgHH.js +12 -0
- package/storybook-static/assets/ScrollReveal-7GSimuFY.css +1 -0
- package/storybook-static/assets/ScrollReveal.stories-4a1gyKmu.js +13 -0
- package/storybook-static/assets/ScrollTrigger-D1XJUMov.js +15 -0
- package/storybook-static/assets/ScrollVelocity-BQllEnJm.css +1 -0
- package/storybook-static/assets/ScrollVelocity.stories-1YFBGtbZ.js +9 -0
- package/storybook-static/assets/{SearchBar.stories-DmHIaDZB.js → SearchBar.stories-T1tR-GmV.js} +30 -15
- package/storybook-static/assets/SearchableDropdown-DhEHRY6d.js +38 -0
- package/storybook-static/assets/{SearchableDropdown.stories-ByZj6lJu.js → SearchableDropdown.stories-E1pMIVn_.js} +8 -8
- package/storybook-static/assets/SelectInput-BrdH7gJ5.js +31 -0
- package/storybook-static/assets/SelectInput.stories-BJ8-v1VC.js +129 -0
- package/storybook-static/assets/ShapeBlur.stories-BD9LHX3y.js +131 -0
- package/storybook-static/assets/ShapeGrid-D5w-KuEm.css +1 -0
- package/storybook-static/assets/ShapeGrid.stories-MtqpqIIh.js +11 -0
- package/storybook-static/assets/ShinyText-D0_UmCBv.css +1 -0
- package/storybook-static/assets/ShinyText.stories-qP5FdChR.js +14 -0
- package/storybook-static/assets/Silk.stories-BHYeNKYP.js +62 -0
- package/storybook-static/assets/SleepChart-DBRb08s_.css +1 -0
- package/storybook-static/assets/SleepChart.stories-BcwHExRn.js +58 -0
- package/storybook-static/assets/Slider-A51SjNTF.js +32 -0
- package/storybook-static/assets/Slider-Bq7zObwV.css +1 -0
- package/storybook-static/assets/Slider.stories-lOqz9gMz.js +99 -0
- package/storybook-static/assets/SoftAurora-2A7ssVQp.css +1 -0
- package/storybook-static/assets/SoftAurora.stories-sSXHgJo6.js +147 -0
- package/storybook-static/assets/SoundDemo.stories-tUFyk4lU.js +3 -0
- package/storybook-static/assets/SplashCursor.stories-DerGqkHm.js +244 -0
- package/storybook-static/assets/SpotlightCard-Bi63T6N0.css +1 -0
- package/storybook-static/assets/SpotlightCard.stories-DBsgFOws.js +6 -0
- package/storybook-static/assets/Stack-CBKeDK5i.css +1 -0
- package/storybook-static/assets/Stack.stories-DAcB1tOU.js +32 -0
- package/storybook-static/assets/StaggeredMenu-DjV6Ra1C.css +1 -0
- package/storybook-static/assets/StaggeredMenu.stories-goFBD6nv.js +45 -0
- package/storybook-static/assets/StarBorder-isNlSycS.css +1 -0
- package/storybook-static/assets/StarBorder.stories-DBM6IkZW.js +9 -0
- package/storybook-static/assets/SunburstChart.stories-cY39K-7Q.js +285 -0
- package/storybook-static/assets/Table-DnhtoClE.css +1 -0
- package/storybook-static/assets/Table.stories-rAe1I70z.js +227 -0
- package/storybook-static/assets/Tabs.stories-D3bsFZfU.js +64 -0
- package/storybook-static/assets/TargetCursor-CWS-TuGF.css +1 -0
- package/storybook-static/assets/TargetCursor.stories-uvcMTfQh.js +9 -0
- package/storybook-static/assets/TextArea-CbqMjFCN.js +28 -0
- package/storybook-static/assets/{TextArea.stories-CCqRRpwq.js → TextArea.stories-CuMypTf4.js} +18 -8
- package/storybook-static/assets/TextCursor-DDqF-3pV.css +1 -0
- package/storybook-static/assets/TextCursor.stories-Bu6iMunU.js +11 -0
- package/storybook-static/assets/TextInput-BpsPIO3D.js +28 -0
- package/storybook-static/assets/{TextInput.stories-CtvOb60q.js → TextInput.stories-C0oXgEQ2.js} +7 -7
- package/storybook-static/assets/TextPressure.stories-DNGUmrTD.js +47 -0
- package/storybook-static/assets/TextType-BYHLKnc2.css +1 -0
- package/storybook-static/assets/TextType.stories-BKNycUNL.js +19 -0
- package/storybook-static/assets/Texture-BkQWYNP2.js +1 -0
- package/storybook-static/assets/ThemeSwitcher.stories-D5lsOFPy.js +62 -0
- package/storybook-static/assets/Threads-C5ItmUMV.css +1 -0
- package/storybook-static/assets/Threads.stories-VyvPNiLc.js +121 -0
- package/storybook-static/assets/TimeInput.stories-BC5vDv_Y.js +55 -0
- package/storybook-static/assets/Toggle-BZxwy2el.js +41 -0
- package/storybook-static/assets/Toggle.stories-VQMzqzt7.js +199 -0
- package/storybook-static/assets/ToggleButton-CijvK4iQ.js +32 -0
- package/storybook-static/assets/ToggleButton-DJU3CV_i.css +1 -0
- package/storybook-static/assets/ToggleButton.stories-DY0c1Gny.js +163 -0
- package/storybook-static/assets/Triangle-64ffRKNB.js +1 -0
- package/storybook-static/assets/TrueFocus-C4c7GDsQ.css +1 -0
- package/storybook-static/assets/TrueFocus.stories-DEScRjfz.js +12 -0
- package/storybook-static/assets/VariableProximity-E64p6UBv.css +1 -0
- package/storybook-static/assets/VariableProximity.stories-DbTKbjW_.js +14 -0
- package/storybook-static/assets/Vec2-Cf1C3GIc.js +1 -0
- package/storybook-static/assets/Waves-C7txy_IO.css +1 -0
- package/storybook-static/assets/Waves.stories-tLQsX0Mg.js +1 -0
- package/storybook-static/assets/axis-D3QohQNI.js +1 -0
- package/storybook-static/assets/check-CAskjz10.js +6 -0
- package/storybook-static/assets/chevron-down-BI8IU4ZZ.js +6 -0
- package/storybook-static/assets/chevron-right-DUHx58vO.js +6 -0
- package/storybook-static/assets/client-DFRPWCQR.js +1 -0
- package/storybook-static/assets/createLucideIcon-C7zEcVM7.js +21 -0
- package/storybook-static/assets/demo/cs1.webp +0 -0
- package/storybook-static/assets/demo/cs2.webp +0 -0
- package/storybook-static/assets/demo/cs3.webp +0 -0
- package/storybook-static/assets/folder-CR6tETf-.js +6 -0
- package/storybook-static/assets/iconBase-AISesxwq.js +1 -0
- package/storybook-static/assets/{iframe-BUaP2gIF.js → iframe-Cz1R6gKZ.js} +192 -192
- package/storybook-static/assets/iframe-Df7_64QT.css +1 -0
- package/storybook-static/assets/{index-CBmvvqzc.js → index-C2Ys00st.js} +1 -1
- package/storybook-static/assets/index-C8pce-KX.js +15 -0
- package/storybook-static/assets/index-CIvCfZMj.js +9 -0
- package/storybook-static/assets/index-DcRHiSf7.js +128 -0
- package/storybook-static/assets/index-jFY_uKTI.js +24 -0
- package/storybook-static/assets/layout-grid-CE52it1h.js +6 -0
- package/storybook-static/assets/linear-dkJHgUri.js +1 -0
- package/storybook-static/assets/{monotone-BYG7Mesf.js → monotone-DHdPkfDP.js} +1 -1
- package/storybook-static/assets/proxy-CAwOFzsk.js +1 -0
- package/storybook-static/assets/react-18-DoKaDswt.js +1 -0
- package/storybook-static/assets/react-three-fiber.esm-t8sCLCER.js +43 -0
- package/storybook-static/assets/search-DcwY6Xta.js +6 -0
- package/storybook-static/assets/sun-DeCJTUMz.js +11 -0
- package/storybook-static/assets/three.module--_vTUKhS.js +4057 -0
- package/storybook-static/assets/{transform-NloTqvdv.js → transform-BKmuZieF.js} +1 -1
- package/storybook-static/assets/use-animation-frame-DhanRv3Z.js +1 -0
- package/storybook-static/assets/use-in-view-D50EZJ4s.js +1 -0
- package/storybook-static/assets/use-motion-value-BgGWOnBX.js +1 -0
- package/storybook-static/assets/use-spring-CKPLi_a5.js +1 -0
- package/storybook-static/assets/use-transform-CJxjUEuh.js +1 -0
- package/storybook-static/assets/useSound-DOpt9DfD.js +1 -0
- package/storybook-static/assets/users-C7jpE6gP.js +6 -0
- package/storybook-static/assets/x-CP8OMUcV.js +6 -0
- package/storybook-static/iframe.html +7 -40
- package/storybook-static/index.json +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/sb-addons/chromatic-com-storybook-4/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/docs-2/manager-bundle.js +2 -2
- package/storybook-static/sb-addons/links-3/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/storybook-5/manager-bundle.js +1 -1
- package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +3 -3
- package/storybook-static/assets/AllAtoms.stories-DBoQZmq-.js +0 -109
- package/storybook-static/assets/AnimationPlayer-UXJjBKtF.css +0 -1
- package/storybook-static/assets/AnimationPlayer.stories-yXQ8fqUT.js +0 -379
- package/storybook-static/assets/ArrayInput.stories-CRqKExgm.js +0 -221
- package/storybook-static/assets/Button.stories-BeeBKHoX.js +0 -117
- package/storybook-static/assets/Calendar-BTQfDDfP.css +0 -1
- package/storybook-static/assets/Calendar.stories-CKOG4XAn.js +0 -545
- package/storybook-static/assets/Card-Bc7TyfBx.css +0 -1
- package/storybook-static/assets/Card-D-kcaQHV.js +0 -49
- package/storybook-static/assets/Card.stories-CpcboxKs.js +0 -130
- package/storybook-static/assets/Color-AVL7NMMY-BzNNgCT5.js +0 -1
- package/storybook-static/assets/DateInput-Cu3PZYc0.js +0 -33
- package/storybook-static/assets/MoodChart.stories-V-wKOSu-.js +0 -40
- package/storybook-static/assets/Navbar-B8vEvGnB.css +0 -1
- package/storybook-static/assets/Navbar.stories-Dkf77idX.js +0 -235
- package/storybook-static/assets/NumberStepper-BVHPJutJ.css +0 -1
- package/storybook-static/assets/NumberStepper-BZGlrWCN.js +0 -30
- package/storybook-static/assets/NumberStepper.stories-NZw7r4Oh.js +0 -127
- package/storybook-static/assets/PieChart.stories-BkfNODjW.js +0 -199
- package/storybook-static/assets/QuantifiableHabitsChart-BEfzqND4.css +0 -1
- package/storybook-static/assets/QuantifiableHabitsChart.stories-Df6rcrdD.js +0 -105
- package/storybook-static/assets/SearchableDropdown-ByAXm1md.js +0 -38
- package/storybook-static/assets/SelectInput-D-AwfWVz.js +0 -31
- package/storybook-static/assets/SelectInput.stories-MyE-GqOw.js +0 -112
- package/storybook-static/assets/SleepChart-yGsG5RlQ.css +0 -1
- package/storybook-static/assets/SleepChart.stories-Dsz1U6F9.js +0 -58
- package/storybook-static/assets/SunburstChart.stories-CphfyDsR.js +0 -285
- package/storybook-static/assets/Tabs.stories-c24Ffu3K.js +0 -49
- package/storybook-static/assets/TextArea-B_sATPlw.js +0 -28
- package/storybook-static/assets/TextInput-ZGg8LTL_.js +0 -28
- package/storybook-static/assets/ThemeSwitcher.stories-BvkX1SDm.js +0 -62
- package/storybook-static/assets/TimeInput.stories-BchhRfKo.js +0 -50
- package/storybook-static/assets/Toggle-BQ2KHBDr.js +0 -39
- package/storybook-static/assets/Toggle.stories-BUSZc6m3.js +0 -194
- package/storybook-static/assets/ToggleButton-Dl6hvkJv.js +0 -32
- package/storybook-static/assets/ToggleButton-gfPoPxTQ.css +0 -1
- package/storybook-static/assets/ToggleButton.stories-BKN4zU3N.js +0 -143
- package/storybook-static/assets/iframe-BOc1hSA-.css +0 -1
- package/storybook-static/assets/index-5bdJXrkD.js +0 -1
- package/storybook-static/assets/index-CZs7_DA6.js +0 -9
- package/storybook-static/assets/linear-4t_RuQok.js +0 -1
- package/storybook-static/assets/proxy-9Y4F2rF8.js +0 -1
- package/storybook-static/assets/react-18-D4c-_GAk.js +0 -24
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import{r as d,j as a}from"./iframe-Cz1R6gKZ.js";import{L as de,m as aa}from"./proxy-CAwOFzsk.js";import{u as na,f as ta}from"./MotionConfigContext-C_Ro_xsO.js";import{A as sa}from"./index-CIvCfZMj.js";import"./preload-helper-C1FmrZbK.js";const ra=s=>!s.isLayoutDirty&&s.willUpdate(!1);function ue(){const s=new Set,i=new WeakMap,p=()=>s.forEach(ra);return{add:c=>{s.add(c),i.set(c,c.addEventListener("willUpdate",p))},remove:c=>{s.delete(c);const h=i.get(c);h&&(h(),i.delete(c)),p()},dirty:p}}const oa=d.createContext(null);function la(){const s=d.useRef(!1);return na(()=>(s.current=!0,()=>{s.current=!1}),[]),s}function ia(){const s=la(),[i,p]=d.useState(0),c=d.useCallback(()=>{s.current&&p(i+1)},[i]);return[d.useCallback(()=>ta.postRender(c),[c]),i]}const Pe=s=>s===!0,ca=s=>Pe(s===!0)||s==="id",da=({children:s,id:i,inherit:p=!0})=>{const c=d.useContext(de),h=d.useContext(oa),[$,j]=ia(),u=d.useRef(null),b=c.id||h;u.current===null&&(ca(p)&&b&&(i=i?b+"-"+i:b),u.current={id:i,group:Pe(p)&&c.group||ue()});const y=d.useMemo(()=>({...u.current,forceRender:$}),[j]);return a.jsx(de.Provider,{value:y,children:s})},ua="_container_11eom_1",ma="_header_11eom_15",pa="_title_11eom_23",ha="_actions_11eom_31",ga="_controls_11eom_37",ba="_searchBox_11eom_45",fa="_searchIcon_11eom_52",xa="_searchInput_11eom_59",_a="_clearButton_11eom_76",ya="_clearFiltersButton_11eom_93",ka="_resultCount_11eom_109",va="_loading_11eom_117",Ca="_spinner_11eom_126",Sa="_empty_11eom_141",ja="_emptyIcon_11eom_147",wa="_tableWrapper_11eom_160",Na="_stickyHeader_11eom_167",Ta="_table_11eom_160",$a="_striped_11eom_189",za="_compact_11eom_193",Da="_th_11eom_193",Ia="_td_11eom_194",Aa="_hoverable_11eom_198",Ma="_headerCell_11eom_213",Ea="_headerText_11eom_220",La="_sortButton_11eom_225",Pa="_sortIcon_11eom_244",Wa="_columnFilter_11eom_261",Ra="_tr_11eom_279",qa="_selected_11eom_285",Ba="_clickable_11eom_290",Va="_checkboxColumn_11eom_315",Ua="_actionsColumn_11eom_326",Fa="_actionButtons_11eom_338",Oa="_actionButton_11eom_338",Ha="_actionButtonPrimary_11eom_438",Ga="_actionButtonSecondary_11eom_459",Ja="_actionButtonDanger_11eom_478",Qa="_actionButtonWarning_11eom_500",Ka="_actionButtonSuccess_11eom_522",Xa="_checkbox_11eom_315",Ya="_nullValue_11eom_552",Za="_badge_11eom_558",en="_badgeSuccess_11eom_569",an="_badgeDanger_11eom_574",nn="_code_11eom_579",tn="_pagination_11eom_593",sn="_pageInfo_11eom_602",rn="_pageControls_11eom_608",on="_pageButton_11eom_614",ln="_pageNumber_11eom_639",cn="_pageSizeSelect_11eom_646",dn="_bulkActions_11eom_675",un="_bulkActionButtons_11eom_740",mn="_bulkActionButton_11eom_740",pn="_selectionCount_11eom_817",hn="_bulkPrimary_11eom_828",gn="_bulkSecondary_11eom_844",bn="_bulkDanger_11eom_861",fn="_bulkWarning_11eom_871",xn="_bulkSuccess_11eom_881",_n="_bulkCustom_11eom_891",yn="_horizontalScroll_11eom_901",n={container:ua,header:ma,title:pa,actions:ha,controls:ga,searchBox:ba,searchIcon:fa,searchInput:xa,clearButton:_a,clearFiltersButton:ya,resultCount:ka,loading:va,spinner:Ca,empty:Sa,emptyIcon:ja,tableWrapper:wa,stickyHeader:Na,table:Ta,striped:$a,compact:za,th:Da,td:Ia,hoverable:Aa,headerCell:Ma,headerText:Ea,sortButton:La,sortIcon:Pa,columnFilter:Wa,tr:Ra,selected:qa,clickable:Ba,checkboxColumn:Va,actionsColumn:Ua,actionButtons:Fa,actionButton:Oa,actionButtonPrimary:Ha,actionButtonSecondary:Ga,actionButtonDanger:Ja,actionButtonWarning:Qa,actionButtonSuccess:Ka,checkbox:Xa,nullValue:Ya,badge:Za,badgeSuccess:en,badgeDanger:an,code:nn,pagination:tn,pageInfo:sn,pageControls:rn,pageButton:on,pageNumber:ln,pageSizeSelect:cn,bulkActions:dn,bulkActionButtons:un,bulkActionButton:mn,selectionCount:pn,bulkPrimary:hn,bulkSecondary:gn,bulkDanger:bn,bulkWarning:fn,bulkSuccess:xn,bulkCustom:_n,horizontalScroll:yn},We=function({data:i,columns:p,keyField:c="id",title:h,searchable:$=!1,selectable:j=!1,pagination:u=!1,onRowClick:b,onSelectionChange:y,actions:P,bulkActions:D,rowActions:k,actionButtonStyles:l,emptyMessage:qe="No data available",loading:Be=!1,striped:Ve=!1,hoverable:Ue=!0,compact:Fe=!1,stickyHeader:Oe=!1,animated:He=!0,horizontalScroll:Ge=!1,className:H=""}){const[g,Q]=d.useState(new Set),[w,G]=d.useState(""),[I,K]=d.useState({}),[f,X]=d.useState({key:null,direction:"asc"}),[x,v]=d.useState(1),[C,Je]=d.useState(typeof u=="object"&&u.pageSize?u.pageSize:10),Qe=d.useMemo(()=>typeof u=="object"&&u.pageSizeOptions?u.pageSizeOptions:[10,25,50,100],[u]),Y=d.useMemo(()=>p.map(e=>e.key),[p]),A=d.useMemo(()=>{if(!w&&Object.keys(I).length===0)return i;let e=i;if($&&w){const r=w.toLowerCase();e=e.filter(t=>Y.some(o=>{const m=t[o];return m!=null&&String(m).toLowerCase().includes(r)}))}for(const[r,t]of Object.entries(I))if(t){const o=t.toLowerCase();e=e.filter(m=>{const N=m[r];return N!=null&&String(N).toLowerCase().includes(o)})}return e},[i,Y,w,I,$]),S=d.useMemo(()=>f.key?[...A].sort((e,r)=>{const t=e[f.key],o=r[f.key];if(t==null)return 1;if(o==null)return-1;let m=0;return typeof t=="number"&&typeof o=="number"?m=t-o:t instanceof Date&&o instanceof Date?m=t.getTime()-o.getTime():m=String(t).localeCompare(String(o)),f.direction==="asc"?m:-m}):A,[A,f]),M=d.useMemo(()=>{if(!u)return S;const e=(x-1)*C,r=e+C;return S.slice(e,r)},[S,u,x,C]),z=d.useMemo(()=>u?Math.ceil(S.length/C):1,[S,C,u]),Ke=d.useCallback(e=>{X(r=>r.key!==e?{key:e,direction:"asc"}:r.direction==="asc"?{key:e,direction:"desc"}:{key:null,direction:"asc"})},[]),Xe=d.useCallback(()=>{const e=M.map(o=>o[c]),r=e.every(o=>g.has(o)),t=new Set(g);if(r?e.forEach(o=>t.delete(o)):e.forEach(o=>t.add(o)),Q(t),y){const o=i.filter(m=>t.has(m[c]));y(o)}},[M,g,c,i,y]),Z=d.useCallback(e=>{const r=new Set(g);if(r.has(e)?r.delete(e):r.add(e),Q(r),y){const t=i.filter(o=>r.has(o[c]));y(t)}},[g,i,c,y]),Ye=d.useCallback((e,r)=>{K(t=>({...t,[e]:r})),v(1)},[]),Ze=d.useCallback(()=>{G(""),K({}),X({key:null,direction:"asc"}),v(1)},[]),ee=w||Object.values(I).some(e=>e),J=M.map(e=>e[c]),ae=j&&J.length>0&&J.every(e=>g.has(e)),ea=j&&J.some(e=>g.has(e)),_=d.useMemo(()=>i.filter(e=>g.has(e[c])),[i,g,c]),ne=d.useCallback(e=>{var m,N,E,se,re,oe,le,ie,ce;const r=(l==null?void 0:l.size)||36,t=((m=e.buttonStyles)==null?void 0:m.size)||r,o={width:t,height:t,borderRadius:((N=e.buttonStyles)==null?void 0:N.borderRadius)||(l==null?void 0:l.borderRadius)||"50%",fontSize:((E=e.buttonStyles)==null?void 0:E.fontSize)||(l==null?void 0:l.fontSize),padding:((se=e.buttonStyles)==null?void 0:se.padding)||(l==null?void 0:l.padding),...l==null?void 0:l.style,...e.style,...(re=e.buttonStyles)==null?void 0:re.style};return((oe=e.buttonStyles)!=null&&oe.iconSize||l!=null&&l.iconSize)&&(o["--icon-size"]=typeof(((le=e.buttonStyles)==null?void 0:le.iconSize)||(l==null?void 0:l.iconSize))=="number"?`${((ie=e.buttonStyles)==null?void 0:ie.iconSize)||(l==null?void 0:l.iconSize)}px`:((ce=e.buttonStyles)==null?void 0:ce.iconSize)||(l==null?void 0:l.iconSize)),o},[l]),te=d.useCallback(e=>{var E;const r=n.actionButton,t=e.variant==="primary"?n.actionButtonPrimary:e.variant==="danger"?n.actionButtonDanger:e.variant==="warning"?n.actionButtonWarning:e.variant==="success"?n.actionButtonSuccess:e.variant==="custom"?"":n.actionButtonSecondary,o=(l==null?void 0:l.className)||"",m=e.className||"",N=((E=e.buttonStyles)==null?void 0:E.className)||"";return`${r} ${t} ${o} ${m} ${N}`.trim()},[l]);return Be?a.jsx("div",{className:`${n.container} ${H}`,children:a.jsxs("div",{className:n.loading,children:[a.jsx("div",{className:n.spinner}),a.jsx("span",{children:"Loading..."})]})}):i.length===0?a.jsxs("div",{className:`${n.container} ${H}`,children:[h&&a.jsx("h2",{className:n.title,children:h}),a.jsxs("div",{className:n.empty,children:[a.jsx("span",{className:n.emptyIcon,children:"📊"}),a.jsx("p",{children:qe})]})]}):a.jsxs("div",{className:`${n.container} ${H}`,children:[(h||P||D)&&a.jsxs("div",{className:n.header,children:[h&&a.jsx("h2",{className:n.title,children:h}),(P||D)&&a.jsxs("div",{className:n.bulkActions,children:[P&&_.length>0&&a.jsx("div",{className:n.actions,children:P(_)}),D&&D.length>0&&_.length>0&&a.jsx("div",{className:n.bulkActionButtons,children:D.map((e,r)=>{const t=e.disabled&&e.disabled(_)||e.minSelection&&_.length<e.minSelection||e.maxSelection&&_.length>e.maxSelection;return a.jsxs("button",{className:`${n.bulkActionButton} ${e.variant==="primary"?n.bulkPrimary:e.variant==="secondary"?n.bulkSecondary:e.variant==="danger"?n.bulkDanger:e.variant==="warning"?n.bulkWarning:e.variant==="success"?n.bulkSuccess:e.variant==="custom"?n.bulkCustom:n.bulkPrimary} ${e.className||""}`,style:e.style,disabled:!!t,onClick:async()=>{if(e.confirmMessage){const o=typeof e.confirmMessage=="function"?e.confirmMessage(_):e.confirmMessage;if(!confirm(o))return}await e.onClick(_)},title:e.label,"aria-label":e.label,children:[e.icon,a.jsx("span",{children:e.label}),a.jsxs("span",{className:n.selectionCount,children:["(",_.length,")"]})]},r)})})]})]}),($||ee)&&a.jsxs("div",{className:n.controls,children:[$&&a.jsxs("div",{className:n.searchBox,children:[a.jsx("span",{className:n.searchIcon,children:"🔍"}),a.jsx("input",{type:"text",placeholder:"Search...",value:w,onChange:e=>{G(e.target.value),v(1)},className:n.searchInput}),w&&a.jsx("button",{className:n.clearButton,onClick:()=>G(""),children:"✕"})]}),ee&&a.jsx("button",{className:n.clearFiltersButton,onClick:Ze,children:"Clear All Filters"}),a.jsxs("div",{className:n.resultCount,children:[A.length," ",A.length===1?"result":"results"]})]}),a.jsx("div",{className:`${n.tableWrapper} ${Oe?n.stickyHeader:""} ${Ge?n.horizontalScroll:""}`,children:a.jsxs("table",{className:`
|
|
2
|
+
${n.table}
|
|
3
|
+
${Ve?n.striped:""}
|
|
4
|
+
${Ue?n.hoverable:""}
|
|
5
|
+
${Fe?n.compact:""}
|
|
6
|
+
`,role:"table","aria-label":h||"Data table","aria-rowcount":S.length,"aria-describedby":h?`${h.replace(/\s+/g,"-").toLowerCase()}-summary`:void 0,children:[a.jsx("thead",{children:a.jsxs("tr",{children:[j&&a.jsx("th",{className:n.checkboxColumn,scope:"col",children:a.jsx("input",{type:"checkbox",checked:ae,ref:e=>{e&&(e.indeterminate=!ae&&ea)},onChange:Xe,className:n.checkbox,"aria-label":"Select all rows"})}),p.map(e=>a.jsx("th",{className:`${n.th} ${e.className||""}`,style:{width:e.width,textAlign:e.align||"left"},scope:"col",role:"columnheader","aria-sort":f.key===e.key?f.direction==="asc"?"ascending":"descending":e.sortable?"none":void 0,children:a.jsxs("div",{className:n.headerCell,children:[e.sortable?a.jsxs("button",{className:n.sortButton,onClick:()=>Ke(e.key),"aria-label":`Sort by ${e.header} ${f.key===e.key&&f.direction==="asc"?"(descending)":"(ascending)"}`,children:[a.jsx("span",{children:e.header}),a.jsx("span",{className:n.sortIcon,"aria-hidden":"true",children:f.key===e.key?f.direction==="asc"?"↑":"↓":"↕"})]}):a.jsx("span",{className:n.headerText,children:e.header}),e.filterable&&a.jsx("input",{type:"text",placeholder:"Filter...",value:I[e.key]||"",onChange:r=>Ye(e.key,r.target.value),onClick:r=>r.stopPropagation(),className:n.columnFilter,"aria-label":`Filter ${e.header}`})]})},e.key)),k&&k.length>0&&a.jsx("th",{className:n.actionsColumn,scope:"col",children:a.jsx("span",{className:n.headerText,children:"Actions"})})]})}),a.jsx("tbody",{children:He?a.jsx(da,{children:a.jsx(sa,{mode:"popLayout",children:M.map((e,r)=>a.jsxs(aa.tr,{layout:"position",initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1,transition:{duration:.12,delay:Math.min(r*.005,.08),ease:[.25,.46,.45,.94]}},exit:{opacity:0,scale:.98,transition:{duration:.08}},className:`
|
|
7
|
+
${n.tr}
|
|
8
|
+
${g.has(e[c])?n.selected:""}
|
|
9
|
+
${b?n.clickable:""}
|
|
10
|
+
`,onClick:()=>b==null?void 0:b(e,r),children:[j&&a.jsx("td",{className:n.checkboxColumn,children:a.jsx("input",{type:"checkbox",checked:g.has(e[c]),onChange:()=>Z(e[c]),onClick:t=>t.stopPropagation(),className:n.checkbox})}),p.map(t=>a.jsx("td",{className:`${n.td} ${t.className||""}`,style:{textAlign:t.align||"left"},children:t.render?t.render(e[t.key],e,r):me(e[t.key])},t.key)),k&&k.length>0&&a.jsx("td",{className:n.actionsColumn,onClick:t=>t.stopPropagation(),children:a.jsx("div",{className:n.actionButtons,children:k.map((t,o)=>a.jsx("button",{className:te(t),style:ne(t),onClick:()=>t.onClick(e,r),disabled:t.disabled?t.disabled(e):!1,title:t.label,"aria-label":t.label,children:t.icon},o))})})]},`${String(e[c])}-${x}`))})}):M.map((e,r)=>a.jsxs("tr",{className:`
|
|
11
|
+
${n.tr}
|
|
12
|
+
${g.has(e[c])?n.selected:""}
|
|
13
|
+
${b?n.clickable:""}
|
|
14
|
+
`,onClick:()=>b==null?void 0:b(e,r),children:[j&&a.jsx("td",{className:n.checkboxColumn,children:a.jsx("input",{type:"checkbox",checked:g.has(e[c]),onChange:()=>Z(e[c]),onClick:t=>t.stopPropagation(),className:n.checkbox})}),p.map(t=>a.jsx("td",{className:`${n.td} ${t.className||""}`,style:{textAlign:t.align||"left"},children:t.render?t.render(e[t.key],e,r):me(e[t.key])},t.key)),k&&k.length>0&&a.jsx("td",{className:n.actionsColumn,onClick:t=>t.stopPropagation(),children:a.jsx("div",{className:n.actionButtons,children:k.map((t,o)=>a.jsx("button",{className:te(t),style:ne(t),onClick:()=>t.onClick(e,r),disabled:t.disabled?t.disabled(e):!1,title:t.label,"aria-label":t.label,children:t.icon},o))})})]},String(e[c])))})]})}),u&&z>1&&a.jsxs("div",{className:n.pagination,children:[a.jsxs("div",{className:n.pageInfo,children:["Showing ",(x-1)*C+1,"-",Math.min(x*C,S.length)," of ",S.length]}),a.jsxs("div",{className:n.pageControls,children:[a.jsx("button",{className:n.pageButton,onClick:()=>v(1),disabled:x===1,children:"⟨⟨"}),a.jsx("button",{className:n.pageButton,onClick:()=>v(e=>Math.max(1,e-1)),disabled:x===1,children:"⟨"}),a.jsxs("span",{className:n.pageNumber,children:["Page ",x," of ",z]}),a.jsx("button",{className:n.pageButton,onClick:()=>v(e=>Math.min(z,e+1)),disabled:x===z,children:"⟩"}),a.jsx("button",{className:n.pageButton,onClick:()=>v(z),disabled:x===z,children:"⟩⟩"})]}),typeof u=="object"&&a.jsx("select",{className:n.pageSizeSelect,value:C,onChange:e=>{Je(Number(e.target.value)),v(1)},children:Qe.map(e=>a.jsxs("option",{value:e,children:[e," per page"]},e))})]})]})};function me(s){return s==null?a.jsx("span",{className:n.nullValue,children:"—"}):typeof s=="boolean"?a.jsx("span",{className:`${n.badge} ${s?n.badgeSuccess:n.badgeDanger}`,children:s?"✓":"✗"}):s instanceof Date?s.toLocaleDateString():typeof s=="object"?a.jsx("code",{className:n.code,children:JSON.stringify(s,null,2)}):String(s)}const kn=d.memo(We);We.__docgenInfo={description:`A comprehensive table component with sorting, filtering, pagination, selection, and row actions.
|
|
15
|
+
|
|
16
|
+
Features:
|
|
17
|
+
- Sorting by clicking column headers
|
|
18
|
+
- Global search and per-column filtering
|
|
19
|
+
- Row selection with bulk actions
|
|
20
|
+
- Pagination with customizable page sizes
|
|
21
|
+
- Row-level action buttons
|
|
22
|
+
- Responsive design with sticky headers
|
|
23
|
+
- Framer Motion animations (can be disabled for performance)
|
|
24
|
+
- Full theme integration via CSS custom properties
|
|
25
|
+
|
|
26
|
+
@template T - The type of data objects in the table
|
|
27
|
+
@param props - Table configuration and data
|
|
28
|
+
@returns React component
|
|
29
|
+
|
|
30
|
+
@example
|
|
31
|
+
\`\`\`tsx
|
|
32
|
+
const users = [{ id: 1, name: 'John', email: 'john@example.com' }]
|
|
33
|
+
const columns = [
|
|
34
|
+
{ key: 'name', header: 'Name', sortable: true },
|
|
35
|
+
{ key: 'email', header: 'Email', filterable: true }
|
|
36
|
+
]
|
|
37
|
+
|
|
38
|
+
<Table
|
|
39
|
+
data={users}
|
|
40
|
+
columns={columns}
|
|
41
|
+
searchable
|
|
42
|
+
pagination
|
|
43
|
+
rowActions={[
|
|
44
|
+
{
|
|
45
|
+
icon: <EditIcon />,
|
|
46
|
+
label: 'Edit user',
|
|
47
|
+
onClick: (user) => editUser(user),
|
|
48
|
+
variant: 'primary'
|
|
49
|
+
}
|
|
50
|
+
]}
|
|
51
|
+
/>
|
|
52
|
+
\`\`\``,methods:[],displayName:"TableComponent",props:{data:{required:!0,tsType:{name:"Array",elements:[{name:"T"}],raw:"T[]"},description:"Array of data objects to display in the table"},columns:{required:!0,tsType:{name:"Array",elements:[{name:"Column",elements:[{name:"T"}],raw:"Column<T>"}],raw:"Column<T>[]"},description:"Column configuration defining how to display data fields"},keyField:{required:!1,tsType:{name:"string"},description:"Field name to use as unique identifier for rows (defaults to 'id')",defaultValue:{value:"'id'",computed:!1}},title:{required:!1,tsType:{name:"string"},description:"Optional title displayed above the table"},searchable:{required:!1,tsType:{name:"boolean"},description:"Enable global search functionality",defaultValue:{value:"false",computed:!1}},selectable:{required:!1,tsType:{name:"boolean"},description:"Enable row selection with checkboxes",defaultValue:{value:"false",computed:!1}},pagination:{required:!1,tsType:{name:"union",raw:"boolean | { pageSize?: number; pageSizeOptions?: number[] }",elements:[{name:"boolean"},{name:"signature",type:"object",raw:"{ pageSize?: number; pageSizeOptions?: number[] }",signature:{properties:[{key:"pageSize",value:{name:"number",required:!1}},{key:"pageSizeOptions",value:{name:"Array",elements:[{name:"number"}],raw:"number[]",required:!1}}]}}]},description:"Enable pagination (boolean for default settings or object for custom configuration)",defaultValue:{value:"false",computed:!1}},onRowClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(item: T, index: number) => void",signature:{arguments:[{type:{name:"T"},name:"item"},{type:{name:"number"},name:"index"}],return:{name:"void"}}},description:"Function called when a table row is clicked"},onSelectionChange:{required:!1,tsType:{name:"signature",type:"function",raw:"(selectedItems: T[]) => void",signature:{arguments:[{type:{name:"Array",elements:[{name:"T"}],raw:"T[]"},name:"selectedItems"}],return:{name:"void"}}},description:"Function called when row selection changes (only when selectable=true)"},bulkActions:{required:!1,tsType:{name:"Array",elements:[{name:"BulkAction",elements:[{name:"T"}],raw:"BulkAction<T>"}],raw:"BulkAction<T>[]"},description:"Array of bulk actions available when rows are selected"},actions:{required:!1,tsType:{name:"signature",type:"function",raw:"(selectedItems: T[]) => ReactNode",signature:{arguments:[{type:{name:"Array",elements:[{name:"T"}],raw:"T[]"},name:"selectedItems"}],return:{name:"ReactNode"}}},description:"@deprecated Use bulkActions instead. Function that returns action buttons for selected rows"},rowActions:{required:!1,tsType:{name:"Array",elements:[{name:"RowAction",elements:[{name:"T"}],raw:"RowAction<T>"}],raw:"RowAction<T>[]"},description:"Configuration for action buttons displayed in each row"},actionButtonStyles:{required:!1,tsType:{name:"ActionButtonStyles"},description:"Global styling configuration for all action buttons"},emptyMessage:{required:!1,tsType:{name:"string"},description:"Message displayed when table is empty",defaultValue:{value:"'No data available'",computed:!1}},loading:{required:!1,tsType:{name:"boolean"},description:"Show loading state",defaultValue:{value:"false",computed:!1}},striped:{required:!1,tsType:{name:"boolean"},description:"Apply alternating row background colors",defaultValue:{value:"false",computed:!1}},hoverable:{required:!1,tsType:{name:"boolean"},description:"Enable hover effects on table rows",defaultValue:{value:"true",computed:!1}},compact:{required:!1,tsType:{name:"boolean"},description:"Use compact row spacing",defaultValue:{value:"false",computed:!1}},stickyHeader:{required:!1,tsType:{name:"boolean"},description:"Make table header sticky when scrolling",defaultValue:{value:"false",computed:!1}},animated:{required:!1,tsType:{name:"boolean"},description:"Enable Framer Motion animations (disable for better performance with large datasets)",defaultValue:{value:"true",computed:!1}},horizontalScroll:{required:!1,tsType:{name:"boolean"},description:"Enable horizontal scrolling for tables with many columns",defaultValue:{value:"false",computed:!1}},className:{required:!1,tsType:{name:"string"},description:"Additional CSS class for the table container",defaultValue:{value:"''",computed:!1}}}};const L=[{id:1,name:"John Doe",email:"john@example.com",age:28,active:!0,createdAt:new Date("2023-01-15")},{id:2,name:"Jane Smith",email:"jane@example.com",age:34,active:!1,createdAt:new Date("2023-02-20")},{id:3,name:"Bob Johnson",email:"bob@example.com",age:42,active:!0,createdAt:new Date("2023-03-10")},{id:4,name:"Alice Brown",email:"alice@example.com",age:26,active:!0,createdAt:new Date("2023-04-05")},{id:5,name:"Charlie Wilson",email:"charlie@example.com",age:31,active:!1,createdAt:new Date("2023-05-12")}],T=[{key:"name",header:"Name",sortable:!0,filterable:!0,width:"200px"},{key:"email",header:"Email",sortable:!0,filterable:!0,width:"250px"},{key:"age",header:"Age",sortable:!0,align:"center",width:"80px"},{key:"active",header:"Status",sortable:!0,align:"center",width:"100px"},{key:"createdAt",header:"Created",sortable:!0,width:"120px",render:s=>s.toLocaleDateString()}],vn=()=>a.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),a.jsx("path",{d:"m18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]}),Re=()=>a.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("polyline",{points:"3,6 5,6 21,6"}),a.jsx("path",{d:"m19,6v14a2,2 0 0,1 -2,2H7a2,2 0 0,1 -2,-2V6m3,0V4a2,2 0 0,1 2,-2h4a2,2 0 0,1 2,2v2"})]}),Cn=()=>a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),a.jsx("polyline",{points:"17,8 12,3 7,8"}),a.jsx("line",{x1:"12",y1:"3",x2:"12",y2:"15"})]}),$n={title:"Organisms/Table",component:kn,parameters:{layout:"padded"},argTypes:{data:{control:!1},columns:{control:!1},rowActions:{control:!1},onRowClick:{action:"row clicked"},onSelectionChange:{action:"selection changed"},searchable:{control:"boolean"},selectable:{control:"boolean"},striped:{control:"boolean"},compact:{control:"boolean"},hoverable:{control:"boolean"},stickyHeader:{control:"boolean"},animated:{control:"boolean"}}},W={args:{data:L,columns:T,title:"Users Table",searchable:!0}},R={args:{data:Array.from({length:50},(s,i)=>({id:i+1,name:`User ${i+1}`,email:`user${i+1}@example.com`,age:20+i%40,active:Math.random()>.3,createdAt:new Date(Date.now()-Math.random()*365*24*60*60*1e3)})),columns:T,title:"Paginated Table",pagination:{pageSize:10,pageSizeOptions:[5,10,20,50]},searchable:!0,selectable:!0}},q={args:{data:L,columns:T,title:"Table with Row Actions",searchable:!0,hoverable:!0,rowActions:[{icon:a.jsx(vn,{}),label:"Edit user",onClick:s=>alert(`Editing ${s.name}`),variant:"primary"},{icon:a.jsx(Re,{}),label:"Delete user",onClick:s=>alert(`Deleting ${s.name}`),variant:"danger",disabled:s=>s.active}]}},B={args:{data:L,columns:T,title:"Table with Bulk Actions",selectable:!0,searchable:!0,bulkActions:[{icon:a.jsx(Cn,{}),label:"Export Selected",onClick:s=>alert(`Exporting ${s.length} users`),variant:"success",minSelection:1},{icon:a.jsx(Re,{}),label:"Delete Selected",onClick:s=>alert(`Deleted ${s.length} users`),variant:"danger",minSelection:1,confirmMessage:s=>`Delete ${s.length} users? This cannot be undone.`}]}},V={args:{data:L,columns:[{key:"name",header:"User",sortable:!0,width:"250px",render:(s,i)=>a.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[a.jsx("div",{style:{width:"32px",height:"32px",borderRadius:"50%",backgroundColor:"var(--color-primary)",display:"flex",alignItems:"center",justifyContent:"center",color:"white",fontWeight:"bold",fontSize:"14px"},children:String(s).charAt(0)}),a.jsxs("div",{children:[a.jsx("div",{style:{fontWeight:"600"},children:String(s)}),a.jsx("div",{style:{fontSize:"12px",opacity:"0.7"},children:String(i.email)})]})]})},{key:"active",header:"Status",sortable:!0,align:"center",width:"120px",render:s=>a.jsx("span",{style:{padding:"4px 12px",borderRadius:"20px",fontSize:"12px",fontWeight:"600",backgroundColor:s?"#dcfce7":"#fee2e2",color:s?"#166534":"#991b1b"},children:s?"Active":"Inactive"})},{key:"age",header:"Age",sortable:!0,align:"center",width:"80px"}],title:"Custom Cell Rendering",hoverable:!0}},U={args:{data:[],columns:T,title:"Empty Table",emptyMessage:"No users found. Try adding some users first."}},F={args:{data:[],columns:T,title:"Loading Table",loading:!0}},O={args:{data:L,columns:[...T,{key:"id",header:"Department",width:"150px",render:()=>"Engineering"},{key:"id",header:"Manager",width:"150px",render:()=>"John Smith"},{key:"id",header:"Location",width:"150px",render:()=>"San Francisco"},{key:"id",header:"Salary",width:"120px",render:()=>"$75,000"}],title:"Horizontally Scrollable Table",horizontalScroll:!0,searchable:!0}};var pe,he,ge;W.parameters={...W.parameters,docs:{...(pe=W.parameters)==null?void 0:pe.docs,source:{originalSource:`{
|
|
53
|
+
args: {
|
|
54
|
+
data: sampleUsers,
|
|
55
|
+
columns: userColumns,
|
|
56
|
+
title: 'Users Table',
|
|
57
|
+
searchable: true
|
|
58
|
+
}
|
|
59
|
+
}`,...(ge=(he=W.parameters)==null?void 0:he.docs)==null?void 0:ge.source}}};var be,fe,xe;R.parameters={...R.parameters,docs:{...(be=R.parameters)==null?void 0:be.docs,source:{originalSource:`{
|
|
60
|
+
args: {
|
|
61
|
+
data: Array.from({
|
|
62
|
+
length: 50
|
|
63
|
+
}, (_, i) => ({
|
|
64
|
+
id: i + 1,
|
|
65
|
+
name: \`User \${i + 1}\`,
|
|
66
|
+
email: \`user\${i + 1}@example.com\`,
|
|
67
|
+
age: 20 + i % 40,
|
|
68
|
+
active: Math.random() > 0.3,
|
|
69
|
+
createdAt: new Date(Date.now() - Math.random() * 365 * 24 * 60 * 60 * 1000)
|
|
70
|
+
})),
|
|
71
|
+
columns: userColumns,
|
|
72
|
+
title: 'Paginated Table',
|
|
73
|
+
pagination: {
|
|
74
|
+
pageSize: 10,
|
|
75
|
+
pageSizeOptions: [5, 10, 20, 50]
|
|
76
|
+
},
|
|
77
|
+
searchable: true,
|
|
78
|
+
selectable: true
|
|
79
|
+
}
|
|
80
|
+
}`,...(xe=(fe=R.parameters)==null?void 0:fe.docs)==null?void 0:xe.source}}};var _e,ye,ke;q.parameters={...q.parameters,docs:{...(_e=q.parameters)==null?void 0:_e.docs,source:{originalSource:`{
|
|
81
|
+
args: {
|
|
82
|
+
data: sampleUsers,
|
|
83
|
+
columns: userColumns,
|
|
84
|
+
title: 'Table with Row Actions',
|
|
85
|
+
searchable: true,
|
|
86
|
+
hoverable: true,
|
|
87
|
+
rowActions: [{
|
|
88
|
+
icon: <EditIcon />,
|
|
89
|
+
label: 'Edit user',
|
|
90
|
+
onClick: user => alert(\`Editing \${(user as User).name}\`),
|
|
91
|
+
variant: 'primary'
|
|
92
|
+
}, {
|
|
93
|
+
icon: <DeleteIcon />,
|
|
94
|
+
label: 'Delete user',
|
|
95
|
+
onClick: user => alert(\`Deleting \${(user as User).name}\`),
|
|
96
|
+
variant: 'danger',
|
|
97
|
+
disabled: user => (user as User).active
|
|
98
|
+
}]
|
|
99
|
+
}
|
|
100
|
+
}`,...(ke=(ye=q.parameters)==null?void 0:ye.docs)==null?void 0:ke.source}}};var ve,Ce,Se;B.parameters={...B.parameters,docs:{...(ve=B.parameters)==null?void 0:ve.docs,source:{originalSource:`{
|
|
101
|
+
args: {
|
|
102
|
+
data: sampleUsers,
|
|
103
|
+
columns: userColumns,
|
|
104
|
+
title: 'Table with Bulk Actions',
|
|
105
|
+
selectable: true,
|
|
106
|
+
searchable: true,
|
|
107
|
+
bulkActions: [{
|
|
108
|
+
icon: <ExportIcon />,
|
|
109
|
+
label: 'Export Selected',
|
|
110
|
+
onClick: items => alert(\`Exporting \${items.length} users\`),
|
|
111
|
+
variant: 'success',
|
|
112
|
+
minSelection: 1
|
|
113
|
+
}, {
|
|
114
|
+
icon: <DeleteIcon />,
|
|
115
|
+
label: 'Delete Selected',
|
|
116
|
+
onClick: items => alert(\`Deleted \${items.length} users\`),
|
|
117
|
+
variant: 'danger',
|
|
118
|
+
minSelection: 1,
|
|
119
|
+
confirmMessage: items => \`Delete \${items.length} users? This cannot be undone.\`
|
|
120
|
+
}]
|
|
121
|
+
}
|
|
122
|
+
}`,...(Se=(Ce=B.parameters)==null?void 0:Ce.docs)==null?void 0:Se.source}}};var je,we,Ne;V.parameters={...V.parameters,docs:{...(je=V.parameters)==null?void 0:je.docs,source:{originalSource:`{
|
|
123
|
+
args: {
|
|
124
|
+
data: sampleUsers,
|
|
125
|
+
columns: [{
|
|
126
|
+
key: 'name',
|
|
127
|
+
header: 'User',
|
|
128
|
+
sortable: true,
|
|
129
|
+
width: '250px',
|
|
130
|
+
render: (value, item) => <div style={{
|
|
131
|
+
display: 'flex',
|
|
132
|
+
alignItems: 'center',
|
|
133
|
+
gap: '12px'
|
|
134
|
+
}}>
|
|
135
|
+
<div style={{
|
|
136
|
+
width: '32px',
|
|
137
|
+
height: '32px',
|
|
138
|
+
borderRadius: '50%',
|
|
139
|
+
backgroundColor: 'var(--color-primary)',
|
|
140
|
+
display: 'flex',
|
|
141
|
+
alignItems: 'center',
|
|
142
|
+
justifyContent: 'center',
|
|
143
|
+
color: 'white',
|
|
144
|
+
fontWeight: 'bold',
|
|
145
|
+
fontSize: '14px'
|
|
146
|
+
}}>
|
|
147
|
+
{String(value).charAt(0)}
|
|
148
|
+
</div>
|
|
149
|
+
<div>
|
|
150
|
+
<div style={{
|
|
151
|
+
fontWeight: '600'
|
|
152
|
+
}}>{String(value)}</div>
|
|
153
|
+
<div style={{
|
|
154
|
+
fontSize: '12px',
|
|
155
|
+
opacity: '0.7'
|
|
156
|
+
}}>{String((item as User).email)}</div>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
}, {
|
|
160
|
+
key: 'active',
|
|
161
|
+
header: 'Status',
|
|
162
|
+
sortable: true,
|
|
163
|
+
align: 'center',
|
|
164
|
+
width: '120px',
|
|
165
|
+
render: value => <span style={{
|
|
166
|
+
padding: '4px 12px',
|
|
167
|
+
borderRadius: '20px',
|
|
168
|
+
fontSize: '12px',
|
|
169
|
+
fontWeight: '600',
|
|
170
|
+
backgroundColor: value ? '#dcfce7' : '#fee2e2',
|
|
171
|
+
color: value ? '#166534' : '#991b1b'
|
|
172
|
+
}}>
|
|
173
|
+
{value ? 'Active' : 'Inactive'}
|
|
174
|
+
</span>
|
|
175
|
+
}, {
|
|
176
|
+
key: 'age',
|
|
177
|
+
header: 'Age',
|
|
178
|
+
sortable: true,
|
|
179
|
+
align: 'center',
|
|
180
|
+
width: '80px'
|
|
181
|
+
}],
|
|
182
|
+
title: 'Custom Cell Rendering',
|
|
183
|
+
hoverable: true
|
|
184
|
+
}
|
|
185
|
+
}`,...(Ne=(we=V.parameters)==null?void 0:we.docs)==null?void 0:Ne.source}}};var Te,$e,ze;U.parameters={...U.parameters,docs:{...(Te=U.parameters)==null?void 0:Te.docs,source:{originalSource:`{
|
|
186
|
+
args: {
|
|
187
|
+
data: [],
|
|
188
|
+
columns: userColumns,
|
|
189
|
+
title: 'Empty Table',
|
|
190
|
+
emptyMessage: 'No users found. Try adding some users first.'
|
|
191
|
+
}
|
|
192
|
+
}`,...(ze=($e=U.parameters)==null?void 0:$e.docs)==null?void 0:ze.source}}};var De,Ie,Ae;F.parameters={...F.parameters,docs:{...(De=F.parameters)==null?void 0:De.docs,source:{originalSource:`{
|
|
193
|
+
args: {
|
|
194
|
+
data: [],
|
|
195
|
+
columns: userColumns,
|
|
196
|
+
title: 'Loading Table',
|
|
197
|
+
loading: true
|
|
198
|
+
}
|
|
199
|
+
}`,...(Ae=(Ie=F.parameters)==null?void 0:Ie.docs)==null?void 0:Ae.source}}};var Me,Ee,Le;O.parameters={...O.parameters,docs:{...(Me=O.parameters)==null?void 0:Me.docs,source:{originalSource:`{
|
|
200
|
+
args: {
|
|
201
|
+
data: sampleUsers,
|
|
202
|
+
columns: [...userColumns, {
|
|
203
|
+
key: 'id',
|
|
204
|
+
header: 'Department',
|
|
205
|
+
width: '150px',
|
|
206
|
+
render: () => 'Engineering'
|
|
207
|
+
}, {
|
|
208
|
+
key: 'id',
|
|
209
|
+
header: 'Manager',
|
|
210
|
+
width: '150px',
|
|
211
|
+
render: () => 'John Smith'
|
|
212
|
+
}, {
|
|
213
|
+
key: 'id',
|
|
214
|
+
header: 'Location',
|
|
215
|
+
width: '150px',
|
|
216
|
+
render: () => 'San Francisco'
|
|
217
|
+
}, {
|
|
218
|
+
key: 'id',
|
|
219
|
+
header: 'Salary',
|
|
220
|
+
width: '120px',
|
|
221
|
+
render: () => '$75,000'
|
|
222
|
+
}],
|
|
223
|
+
title: 'Horizontally Scrollable Table',
|
|
224
|
+
horizontalScroll: true,
|
|
225
|
+
searchable: true
|
|
226
|
+
}
|
|
227
|
+
}`,...(Le=(Ee=O.parameters)==null?void 0:Ee.docs)==null?void 0:Le.source}}};const zn=["Default","WithPagination","WithRowActions","WithBulkActions","CustomRendering","EmptyState","LoadingState","HorizontalScrolling"];export{V as CustomRendering,W as Default,U as EmptyState,O as HorizontalScrolling,F as LoadingState,B as WithBulkActions,R as WithPagination,q as WithRowActions,zn as __namedExportsOrder,$n as default};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import{j as e,R as p,r as l}from"./iframe-Cz1R6gKZ.js";import{c as u}from"./createLucideIcon-C7zEcVM7.js";import{m as T}from"./proxy-CAwOFzsk.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-C_Ro_xsO.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 M=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],q=u("github",M);/**
|
|
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 E=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],g=u("info",E);/**
|
|
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 G=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 7v7",key:"1x2jlm"}],["path",{d:"M12 7v4",key:"xawao1"}],["path",{d:"M16 7v9",key:"1hp2iy"}]],$=u("square-kanban",G),D="_tabs_jgahw_1",J="_tab_jgahw_1",R="_tabIcon_jgahw_83",r={tabs:D,tab:J,tabIcon:R},F=[{id:"details",icon:g,label:"Dettagli"},{id:"github",icon:q,label:"GitHub"},{id:"jira",icon:$,label:"Jira"},{id:"functional",icon:g,label:"Analisi funzionale"}],i=({activeTab:a,onTabChange:t,tabs:n,className:I=""})=>{const N=n??F;return e.jsx("div",{className:`${r.tabs} ${I}`,children:N.map(s=>{const v=a===s.id;return e.jsxs(T.button,{className:r.tab,"data-active":v,onClick:()=>t(s.id),style:{position:"relative"},children:[e.jsx(T.div,{animate:{rotate:v?[0,-10,10,-5,5,0]:0},transition:{rotate:{duration:.5,ease:"easeInOut"}},children:s.icon&&(p.isValidElement(s.icon)?e.jsx("span",{className:r.tabIcon,children:s.icon}):e.jsx("span",{className:r.tabIcon,children:p.createElement(s.icon)}))}),e.jsx("span",{children:s.label})]},s.id)})})};i.__docgenInfo={description:"",methods:[],displayName:"Tabs",props:{activeTab:{required:!0,tsType:{name:"string"},description:""},onTabChange:{required:!0,tsType:{name:"signature",type:"function",raw:"(tab: string) => void",signature:{arguments:[{type:{name:"string"},name:"tab"}],return:{name:"void"}}},description:""},tabs:{required:!1,tsType:{name:"Array",elements:[{name:"Tab"}],raw:"Tab[]"},description:""},className:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"''",computed:!1}}}};const L={title:"Molecules/Tabs",component:i,parameters:{layout:"centered"},tags:["autodocs"],argTypes:{activeTab:{control:"select",options:["details","github","jira","functional"]}}},c={render:a=>{const[t,n]=l.useState("details");return e.jsx("div",{style:{width:"600px"},children:e.jsx(i,{...a,activeTab:t,onTabChange:n})})},args:{activeTab:"details"}},o={render:a=>{const[t,n]=l.useState("github");return e.jsx("div",{style:{width:"600px"},children:e.jsx(i,{...a,activeTab:t,onTabChange:n})})},args:{activeTab:"github"}},d={render:a=>{const[t,n]=l.useState("jira");return e.jsx("div",{style:{width:"600px"},children:e.jsx(i,{...a,activeTab:t,onTabChange:n})})},args:{activeTab:"jira"}},b={render:a=>{const[t,n]=l.useState("functional");return e.jsx("div",{style:{width:"600px"},children:e.jsx(i,{...a,activeTab:t,onTabChange:n})})},args:{activeTab:"functional"}};var m,h,y;c.parameters={...c.parameters,docs:{...(m=c.parameters)==null?void 0:m.docs,source:{originalSource:`{
|
|
17
|
+
render: args => {
|
|
18
|
+
const [activeTab, setActiveTab] = useState<string>('details');
|
|
19
|
+
return <div style={{
|
|
20
|
+
width: '600px'
|
|
21
|
+
}}>
|
|
22
|
+
<Tabs {...args} activeTab={activeTab} onTabChange={setActiveTab} />
|
|
23
|
+
</div>;
|
|
24
|
+
},
|
|
25
|
+
args: {
|
|
26
|
+
activeTab: 'details'
|
|
27
|
+
}
|
|
28
|
+
}`,...(y=(h=c.parameters)==null?void 0:h.docs)==null?void 0:y.source}}};var x,j,f;o.parameters={...o.parameters,docs:{...(x=o.parameters)==null?void 0:x.docs,source:{originalSource:`{
|
|
29
|
+
render: args => {
|
|
30
|
+
const [activeTab, setActiveTab] = useState<string>('github');
|
|
31
|
+
return <div style={{
|
|
32
|
+
width: '600px'
|
|
33
|
+
}}>
|
|
34
|
+
<Tabs {...args} activeTab={activeTab} onTabChange={setActiveTab} />
|
|
35
|
+
</div>;
|
|
36
|
+
},
|
|
37
|
+
args: {
|
|
38
|
+
activeTab: 'github'
|
|
39
|
+
}
|
|
40
|
+
}`,...(f=(j=o.parameters)==null?void 0:j.docs)==null?void 0:f.source}}};var A,_,w;d.parameters={...d.parameters,docs:{...(A=d.parameters)==null?void 0:A.docs,source:{originalSource:`{
|
|
41
|
+
render: args => {
|
|
42
|
+
const [activeTab, setActiveTab] = useState<string>('jira');
|
|
43
|
+
return <div style={{
|
|
44
|
+
width: '600px'
|
|
45
|
+
}}>
|
|
46
|
+
<Tabs {...args} activeTab={activeTab} onTabChange={setActiveTab} />
|
|
47
|
+
</div>;
|
|
48
|
+
},
|
|
49
|
+
args: {
|
|
50
|
+
activeTab: 'jira'
|
|
51
|
+
}
|
|
52
|
+
}`,...(w=(_=d.parameters)==null?void 0:_.docs)==null?void 0:w.source}}};var S,k,C;b.parameters={...b.parameters,docs:{...(S=b.parameters)==null?void 0:S.docs,source:{originalSource:`{
|
|
53
|
+
render: args => {
|
|
54
|
+
const [activeTab, setActiveTab] = useState<string>('functional');
|
|
55
|
+
return <div style={{
|
|
56
|
+
width: '600px'
|
|
57
|
+
}}>
|
|
58
|
+
<Tabs {...args} activeTab={activeTab} onTabChange={setActiveTab} />
|
|
59
|
+
</div>;
|
|
60
|
+
},
|
|
61
|
+
args: {
|
|
62
|
+
activeTab: 'functional'
|
|
63
|
+
}
|
|
64
|
+
}`,...(C=(k=b.parameters)==null?void 0:k.docs)==null?void 0:C.source}}};const B=["Default","GithubActive","JiraActive","FunctionalActive"];export{c as Default,b as FunctionalActive,o as GithubActive,d as JiraActive,B as __namedExportsOrder,L as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._target-cursor-wrapper_11z20_1{position:fixed;top:0;left:0;width:0;height:0;pointer-events:none;z-index:9999;mix-blend-mode:difference;transform:translate(-50%,-50%)}._target-cursor-dot_11z20_13{position:absolute;left:50%;top:50%;width:4px;height:4px;background:#fff;border-radius:50%;transform:translate(-50%,-50%);will-change:transform}._target-cursor-corner_11z20_25{position:absolute;left:50%;top:50%;width:12px;height:12px;border:3px solid #fff;will-change:transform}._corner-tl_11z20_35{transform:translate(-150%,-150%);border-right:none;border-bottom:none}._corner-tr_11z20_41{transform:translate(50%,-150%);border-left:none;border-bottom:none}._corner-br_11z20_47{transform:translate(50%,50%);border-left:none;border-top:none}._corner-bl_11z20_53{transform:translate(-150%,50%);border-right:none;border-top:none}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import{r as c,j as _}from"./iframe-Cz1R6gKZ.js";import{g as e}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const l={"target-cursor-wrapper":"_target-cursor-wrapper_11z20_1","target-cursor-dot":"_target-cursor-dot_11z20_13","target-cursor-corner":"_target-cursor-corner_11z20_25","corner-tl":"_corner-tl_11z20_35","corner-tr":"_corner-tr_11z20_41","corner-br":"_corner-br_11z20_47","corner-bl":"_corner-bl_11z20_53"},Q=({targetSelector:$=".cursor-target",spinDuration:x=2,hideDefaultCursor:Y=!0,hoverDuration:q=.2,parallaxOn:D=!0})=>{const r=c.useRef(null),p=c.useRef(null),o=c.useRef(null),b=c.useRef(null),j=c.useRef(!1),d=c.useRef(null),R=c.useRef(null),C=c.useRef(0),E=c.useMemo(()=>{if(typeof window>"u")return!1;const T="ontouchstart"in window||navigator.maxTouchPoints>0,g=window.innerWidth<=768,s=navigator.userAgent||navigator.vendor||window.opera,w=/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(s.toLowerCase());return T&&g||w},[]),H=c.useMemo(()=>({borderWidth:3,cornerSize:12}),[]),M=c.useCallback((T,g)=>{r.current&&e.to(r.current,{x:T,y:g,duration:.1,ease:"power3.out"})},[]);return c.useEffect(()=>{if(E||!r.current)return;const T=document.body.style.cursor;Y&&(document.body.style.cursor="none");const g=r.current;p.current=g.querySelectorAll(".target-cursor-corner");let s=null,v=null,w=null;const O=t=>{v&&t.removeEventListener("mouseleave",v),v=null};e.set(g,{xPercent:-50,yPercent:-50,x:window.innerWidth/2,y:window.innerHeight/2}),(()=>{o.current&&o.current.kill(),o.current=e.timeline({repeat:-1}).to(g,{rotation:"+=360",duration:x,ease:"none"})})();const Z=()=>{if(!d.current||!r.current||!p.current)return;const t=C.current;if(t===0)return;const S=e.getProperty(r.current,"x"),f=e.getProperty(r.current,"y");Array.from(p.current).forEach((i,k)=>{const u=e.getProperty(i,"x"),a=e.getProperty(i,"y"),h=d.current[k].x-S,N=d.current[k].y-f,X=u+(h-u)*t,z=a+(N-a)*t,L=t>=.99?D?.2:0:.05;e.to(i,{x:X,y:z,duration:L,ease:L===0?"none":"power1.out",overwrite:"auto"})})};R.current=Z;const V=t=>M(t.clientX,t.clientY);window.addEventListener("mousemove",V);const W=()=>{if(!s||!r.current)return;const t=e.getProperty(r.current,"x"),S=e.getProperty(r.current,"y"),f=document.elementFromPoint(t,S);f&&(f===s||f.closest($)===s)||v&&v()};window.addEventListener("scroll",W,{passive:!0});const F=()=>{b.current&&(e.to(b.current,{scale:.7,duration:.3}),e.to(r.current,{scale:.9,duration:.2}))},U=()=>{b.current&&(e.to(b.current,{scale:1,duration:.3}),e.to(r.current,{scale:1,duration:.2}))};window.addEventListener("mousedown",F),window.addEventListener("mouseup",U);const B=t=>{var L;const S=t.target,f=[];let m=S;for(;m&&m!==document.body;)m.matches($)&&f.push(m),m=m.parentElement;const i=f[0]||null;if(!i||!r.current||!p.current||s===i)return;s&&O(s),w&&(clearTimeout(w),w=null),s=i;const k=Array.from(p.current);k.forEach(y=>e.killTweensOf(y)),e.killTweensOf(r.current,"rotation"),(L=o.current)==null||L.pause(),e.set(r.current,{rotation:0});const u=i.getBoundingClientRect(),{borderWidth:a,cornerSize:h}=H,N=e.getProperty(r.current,"x"),X=e.getProperty(r.current,"y");d.current=[{x:u.left-a,y:u.top-a},{x:u.right+a-h,y:u.top-a},{x:u.right+a-h,y:u.bottom+a-h},{x:u.left-a,y:u.bottom+a-h}],j.current=!0,e.ticker.add(R.current),e.to(C,{current:1,duration:q,ease:"power2.out"}),k.forEach((y,n)=>{e.to(y,{x:d.current[n].x-N,y:d.current[n].y-X,duration:.2,ease:"power2.out"})});const z=()=>{if(e.ticker.remove(R.current),j.current=!1,d.current=null,e.set(C,{current:0,overwrite:!0}),s=null,p.current){const y=Array.from(p.current);e.killTweensOf(y);const{cornerSize:n}=H,P=[{x:-n*1.5,y:-n*1.5},{x:n*.5,y:-n*1.5},{x:n*.5,y:n*.5},{x:-n*1.5,y:n*.5}],ee=e.timeline();y.forEach((re,I)=>{ee.to(re,{x:P[I].x,y:P[I].y,duration:.3,ease:"power3.out"},0)})}w=setTimeout(()=>{if(!s&&r.current&&o.current){const n=e.getProperty(r.current,"rotation")%360;o.current.kill(),o.current=e.timeline({repeat:-1}).to(r.current,{rotation:"+=360",duration:x,ease:"none"}),e.to(r.current,{rotation:n+360,duration:x*(1-n/360),ease:"none",onComplete:()=>{var P;(P=o.current)==null||P.restart()}})}w=null},50),O(i)};v=z,i.addEventListener("mouseleave",z)};return window.addEventListener("mouseover",B,{passive:!0}),()=>{var t;R.current&&e.ticker.remove(R.current),window.removeEventListener("mousemove",V),window.removeEventListener("mouseover",B),window.removeEventListener("scroll",W),window.removeEventListener("mousedown",F),window.removeEventListener("mouseup",U),s&&O(s),(t=o.current)==null||t.kill(),document.body.style.cursor=T,j.current=!1,d.current=null,C.current=0}},[$,x,M,H,Y,E,q,D]),c.useEffect(()=>{E||!r.current||!o.current||o.current.isActive()&&(o.current.kill(),o.current=e.timeline({repeat:-1}).to(r.current,{rotation:"+=360",duration:x,ease:"none"}))},[x,E]),E?null:_.jsxs("div",{ref:r,className:`${l["target-cursor-wrapper"]}`,children:[_.jsx("div",{ref:b,className:`${l["target-cursor-dot"]}`}),_.jsx("div",{className:`${l["target-cursor-corner"]} ${l["corner-tl"]}`}),_.jsx("div",{className:`${l["target-cursor-corner"]} ${l["corner-tr"]}`}),_.jsx("div",{className:`${l["target-cursor-corner"]} ${l["corner-br"]}`}),_.jsx("div",{className:`${l["target-cursor-corner"]} ${l["corner-bl"]}`})]})};Q.__docgenInfo={description:"",methods:[],displayName:"TargetCursor",props:{targetSelector:{defaultValue:{value:"'.cursor-target'",computed:!1},required:!1},spinDuration:{defaultValue:{value:"2",computed:!1},required:!1},hideDefaultCursor:{defaultValue:{value:"true",computed:!1},required:!1},hoverDuration:{defaultValue:{value:"0.2",computed:!1},required:!1},parallaxOn:{defaultValue:{value:"true",computed:!1},required:!1}}};const ce={title:"ReactBits/Animations/TargetCursor",component:Q,parameters:{layout:"fullscreen"},tags:["autodocs"]},A={args:{targetSelector:".cursor-target",spinDuration:2,hideDefaultCursor:!0,hoverDuration:.2,parallaxOn:!0}};var G,J,K;A.parameters={...A.parameters,docs:{...(G=A.parameters)==null?void 0:G.docs,source:{originalSource:`{
|
|
2
|
+
args: {
|
|
3
|
+
targetSelector: '.cursor-target',
|
|
4
|
+
spinDuration: 2,
|
|
5
|
+
hideDefaultCursor: true,
|
|
6
|
+
hoverDuration: 0.2,
|
|
7
|
+
parallaxOn: true
|
|
8
|
+
}
|
|
9
|
+
}`,...(K=(J=A.parameters)==null?void 0:J.docs)==null?void 0:K.source}}};const ue=["Default"];export{A as Default,ue as __namedExportsOrder,ce as default};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{j as t}from"./iframe-Cz1R6gKZ.js";const v="_textareaContainer_1p1q8_1",b="_compact_1p1q8_6",j="_textareaLabel_1p1q8_10",I="_requiredIndicator_1p1q8_25",L="_textareaInput_1p1q8_31",V="_characterCount_1p1q8_90",N="_nearLimit_1p1q8_115",M="_atLimit_1p1q8_124",T="_error_1p1q8_180",w="_success_1p1q8_205",A="_loading_1p1q8_232",y="_focusMode_1p1q8_249",a={textareaContainer:v,compact:b,textareaLabel:j,requiredIndicator:I,textareaInput:L,characterCount:V,nearLimit:N,atLimit:M,error:T,success:w,loading:A,focusMode:y};function B({label:n,value:r,onChange:p,rows:f=5,placeholder:m="",required:o=!1,maxLength:s,disabled:h=!1,error:i=!1,success:_=!1,loading:l=!1,focusMode:x=!1,compact:q=!1,className:c=""}){const u=`textarea-${Math.random().toString(36).substr(2,9)}`,g=()=>{const e=[a.textareaContainer];return i&&e.push(a.error),_&&e.push(a.success),l&&e.push(a.loading),x&&e.push(a.focusMode),q&&e.push(a.compact),c&&e.push(c),e.join(" ")},C=()=>{if(!s)return a.characterCount;const e=[a.characterCount],d=r.length/s*100;return d>=100?e.push(a.atLimit):d>=80&&e.push(a.nearLimit),e.join(" ")};return t.jsxs("div",{className:g(),children:[n&&t.jsxs("label",{htmlFor:u,className:a.textareaLabel,children:[n,o&&t.jsx("span",{className:a.requiredIndicator,children:"*"})]}),t.jsx("textarea",{id:u,value:r,onChange:e=>p(e.target.value),rows:f,placeholder:m,maxLength:s,className:a.textareaInput,"aria-required":o,disabled:h||l,"aria-invalid":i}),s&&t.jsxs("div",{className:C(),children:[t.jsx("span",{children:r.length}),t.jsx("span",{style:{opacity:.7},children:" / "}),t.jsx("span",{children:s})]})]})}B.__docgenInfo={description:`TextArea component - Multi-line text input with character counting
|
|
2
|
+
|
|
3
|
+
@component
|
|
4
|
+
@description
|
|
5
|
+
A resizable text area component designed for longer form content like descriptions,
|
|
6
|
+
comments, or messages. Features automatic character counting when maxLength is set,
|
|
7
|
+
and maintains consistent styling with other form inputs. The component is optimized
|
|
8
|
+
for both desktop and mobile experiences with appropriate touch targets.
|
|
9
|
+
|
|
10
|
+
@example
|
|
11
|
+
// Basic usage
|
|
12
|
+
<TextArea
|
|
13
|
+
label="Description"
|
|
14
|
+
value={description}
|
|
15
|
+
onChange={setDescription}
|
|
16
|
+
rows={4}
|
|
17
|
+
placeholder="Enter a detailed description..."
|
|
18
|
+
/>
|
|
19
|
+
|
|
20
|
+
@example
|
|
21
|
+
// With character limit
|
|
22
|
+
<TextArea
|
|
23
|
+
label="Bio"
|
|
24
|
+
value={bio}
|
|
25
|
+
onChange={setBio}
|
|
26
|
+
maxLength={500}
|
|
27
|
+
required
|
|
28
|
+
/>`,methods:[],displayName:"TextArea",props:{rows:{defaultValue:{value:"5",computed:!1},required:!1},placeholder:{defaultValue:{value:'""',computed:!1},required:!1},required:{defaultValue:{value:"false",computed:!1},required:!1},disabled:{defaultValue:{value:"false",computed:!1},required:!1},error:{defaultValue:{value:"false",computed:!1},required:!1},success:{defaultValue:{value:"false",computed:!1},required:!1},loading:{defaultValue:{value:"false",computed:!1},required:!1},focusMode:{defaultValue:{value:"false",computed:!1},required:!1},compact:{defaultValue:{value:"false",computed:!1},required:!1},className:{defaultValue:{value:'""',computed:!1},required:!1}}};export{B as T};
|
package/storybook-static/assets/{TextArea.stories-CCqRRpwq.js → TextArea.stories-CuMypTf4.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as
|
|
1
|
+
import{r as h,j as e}from"./iframe-Cz1R6gKZ.js";import{T as u}from"./TextArea-CbqMjFCN.js";import"./preload-helper-C1FmrZbK.js";const O={title:"Atoms/TextArea",component:u,parameters:{layout:"centered",docs:{description:{component:"A multiline text input component with character counter support and compact mode for arrays."}}},tags:["autodocs"],argTypes:{label:{control:"text",description:"Label text for the textarea"},value:{control:"text",description:"Current value of the textarea"},placeholder:{control:"text",description:"Placeholder text"},rows:{control:"number",description:"Number of visible rows"},maxLength:{control:"number",description:"Maximum character limit"},required:{control:"boolean",description:"Whether the textarea is required"},compact:{control:"boolean",description:"Compact mode for use in arrays or dense layouts"},onChange:{action:"changed"}}},s={args:{label:"Description",value:"",placeholder:"Enter your description here...",rows:4,onChange:()=>{}}},l={args:{label:"Bio",value:"Software developer passionate about creating great user experiences.",placeholder:"Tell us about yourself...",rows:4,maxLength:200,onChange:()=>{}}},i={args:{label:"Required Message",value:"",placeholder:"This field is required",required:!0,rows:3,onChange:()=>{}}},c={args:{label:"Notes",value:"",placeholder:"Compact mode for arrays...",rows:3,compact:!0,onChange:()=>{}}},m={args:{label:"",value:"",placeholder:"No label, compact mode...",rows:2,compact:!0,onChange:()=>{}}},d={args:{label:"Comparison",value:"",onChange:()=>{}},render:()=>{const[t,o]=h.useState(""),[x,g]=h.useState("");return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"2rem",width:"400px"},children:[e.jsxs("div",{children:[e.jsx("h4",{style:{marginBottom:"1rem",color:"#333"},children:"Regular TextArea"}),e.jsx(u,{label:"Description",value:t,onChange:o,placeholder:"Regular size textarea...",rows:4,maxLength:200})]}),e.jsxs("div",{children:[e.jsx("h4",{style:{marginBottom:"1rem",color:"#333"},children:"Compact TextArea"}),e.jsx(u,{label:"Description",value:x,onChange:g,placeholder:"Compact size textarea...",rows:4,maxLength:200,compact:!0})]})]})},parameters:{controls:{disable:!0}}},p={args:{label:"Array Demo",value:"",onChange:()=>{}},render:()=>{const[t,o]=h.useState(["First item with some text",""]),x=(n,r)=>{const a=[...t];a[n]=r,o(a)},g=()=>{o([...t,""])},W=n=>{o(t.filter((r,a)=>a!==n))};return e.jsxs("div",{style:{width:"400px"},children:[e.jsx("h4",{style:{marginBottom:"1rem",color:"#333"},children:"TextArea in Array Context (Compact Mode)"}),e.jsxs("div",{style:{background:"#f8f9fa",padding:"1rem",borderRadius:"8px",border:"1px solid #dee2e6"},children:[t.map((n,r)=>e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"0.5rem",marginBottom:r<t.length-1?"1rem":"0"},children:[e.jsx(u,{label:"",value:n,onChange:a=>x(r,a),placeholder:`Item ${r+1}...`,rows:2,compact:!0}),e.jsx("button",{onClick:()=>W(r),style:{background:"#dc3545",color:"white",border:"none",borderRadius:"4px",padding:"4px 8px",cursor:"pointer",fontSize:"12px",marginTop:"2px"},children:"x"})]},r)),e.jsx("button",{onClick:g,style:{background:"#007bff",color:"white",border:"none",borderRadius:"4px",padding:"8px 16px",cursor:"pointer",fontSize:"14px",marginTop:"1rem"},children:"+ Add Item"})]})]})},parameters:{controls:{disable:!0}}};var b,C,v;s.parameters={...s.parameters,docs:{...(b=s.parameters)==null?void 0:b.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
label: 'Description',
|
|
4
4
|
value: '',
|
|
@@ -15,7 +15,7 @@ import{r as g,j as e}from"./iframe-BUaP2gIF.js";import{T as u}from"./TextArea-B_
|
|
|
15
15
|
maxLength: 200,
|
|
16
16
|
onChange: () => {}
|
|
17
17
|
}
|
|
18
|
-
}`,...(w=(y=l.parameters)==null?void 0:y.docs)==null?void 0:w.source}}};var T,I,A;
|
|
18
|
+
}`,...(w=(y=l.parameters)==null?void 0:y.docs)==null?void 0:w.source}}};var T,I,A;i.parameters={...i.parameters,docs:{...(T=i.parameters)==null?void 0:T.docs,source:{originalSource:`{
|
|
19
19
|
args: {
|
|
20
20
|
label: 'Required Message',
|
|
21
21
|
value: '',
|
|
@@ -24,7 +24,7 @@ import{r as g,j as e}from"./iframe-BUaP2gIF.js";import{T as u}from"./TextArea-B_
|
|
|
24
24
|
rows: 3,
|
|
25
25
|
onChange: () => {}
|
|
26
26
|
}
|
|
27
|
-
}`,...(A=(I=
|
|
27
|
+
}`,...(A=(I=i.parameters)==null?void 0:I.docs)==null?void 0:A.source}}};var S,R,j;c.parameters={...c.parameters,docs:{...(S=c.parameters)==null?void 0:S.docs,source:{originalSource:`{
|
|
28
28
|
args: {
|
|
29
29
|
label: 'Notes',
|
|
30
30
|
value: '',
|
|
@@ -33,7 +33,7 @@ import{r as g,j as e}from"./iframe-BUaP2gIF.js";import{T as u}from"./TextArea-B_
|
|
|
33
33
|
compact: true,
|
|
34
34
|
onChange: () => {}
|
|
35
35
|
}
|
|
36
|
-
}`,...(j=(R=
|
|
36
|
+
}`,...(j=(R=c.parameters)==null?void 0:R.docs)==null?void 0:j.source}}};var D,L,k;m.parameters={...m.parameters,docs:{...(D=m.parameters)==null?void 0:D.docs,source:{originalSource:`{
|
|
37
37
|
args: {
|
|
38
38
|
label: '',
|
|
39
39
|
value: '',
|
|
@@ -42,7 +42,12 @@ import{r as g,j as e}from"./iframe-BUaP2gIF.js";import{T as u}from"./TextArea-B_
|
|
|
42
42
|
compact: true,
|
|
43
43
|
onChange: () => {}
|
|
44
44
|
}
|
|
45
|
-
}`,...(k=(L=
|
|
45
|
+
}`,...(k=(L=m.parameters)==null?void 0:L.docs)==null?void 0:k.source}}};var q,B,z;d.parameters={...d.parameters,docs:{...(q=d.parameters)==null?void 0:q.docs,source:{originalSource:`{
|
|
46
|
+
args: {
|
|
47
|
+
label: 'Comparison',
|
|
48
|
+
value: '',
|
|
49
|
+
onChange: () => {}
|
|
50
|
+
},
|
|
46
51
|
render: () => {
|
|
47
52
|
const [regularText, setRegularText] = useState('');
|
|
48
53
|
const [compactText, setCompactText] = useState('');
|
|
@@ -73,7 +78,12 @@ import{r as g,j as e}from"./iframe-BUaP2gIF.js";import{T as u}from"./TextArea-B_
|
|
|
73
78
|
disable: true
|
|
74
79
|
}
|
|
75
80
|
}
|
|
76
|
-
}`,...(z=(B=
|
|
81
|
+
}`,...(z=(B=d.parameters)==null?void 0:B.docs)==null?void 0:z.source}}};var E,M,N;p.parameters={...p.parameters,docs:{...(E=p.parameters)==null?void 0:E.docs,source:{originalSource:`{
|
|
82
|
+
args: {
|
|
83
|
+
label: 'Array Demo',
|
|
84
|
+
value: '',
|
|
85
|
+
onChange: () => {}
|
|
86
|
+
},
|
|
77
87
|
render: () => {
|
|
78
88
|
const [items, setItems] = useState(['First item with some text', '']);
|
|
79
89
|
const handleItemChange = (index: number, value: string) => {
|
|
@@ -119,7 +129,7 @@ import{r as g,j as e}from"./iframe-BUaP2gIF.js";import{T as u}from"./TextArea-B_
|
|
|
119
129
|
fontSize: '12px',
|
|
120
130
|
marginTop: '2px'
|
|
121
131
|
}}>
|
|
122
|
-
|
|
132
|
+
x
|
|
123
133
|
</button>
|
|
124
134
|
</div>)}
|
|
125
135
|
<button onClick={addItem} style={{
|
|
@@ -142,4 +152,4 @@ import{r as g,j as e}from"./iframe-BUaP2gIF.js";import{T as u}from"./TextArea-B_
|
|
|
142
152
|
disable: true
|
|
143
153
|
}
|
|
144
154
|
}
|
|
145
|
-
}`,...(N=(M=p.parameters)==null?void 0:M.docs)==null?void 0:N.source}}};const P=["Default","WithCharacterLimit","Required","Compact","CompactWithoutLabel","CompactComparison","ArrayInputDemo"];export{p as ArrayInputDemo,
|
|
155
|
+
}`,...(N=(M=p.parameters)==null?void 0:M.docs)==null?void 0:N.source}}};const P=["Default","WithCharacterLimit","Required","Compact","CompactWithoutLabel","CompactComparison","ArrayInputDemo"];export{p as ArrayInputDemo,c as Compact,d as CompactComparison,m as CompactWithoutLabel,s as Default,i as Required,l as WithCharacterLimit,P as __namedExportsOrder,O as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._text-cursor-container_uryua_1{width:100%;min-height:100vh;position:relative}._text-cursor-inner_uryua_7{position:absolute;top:0;left:0;right:0;bottom:0;pointer-events:none}._text-cursor-item_uryua_16{position:absolute;-webkit-user-select:none;user-select:none;white-space:nowrap;font-size:1.875rem}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import{r as a,j as c}from"./iframe-Cz1R6gKZ.js";import{A as B}from"./index-CIvCfZMj.js";import{m as L}from"./proxy-CAwOFzsk.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-C_Ro_xsO.js";const p={"text-cursor-container":"_text-cursor-container_uryua_1","text-cursor-inner":"_text-cursor-inner_uryua_7","text-cursor-item":"_text-cursor-item_uryua_16"},E=({text:V="⚛️",spacing:d=100,followMouseDirection:j=!0,randomFloat:n=!0,exitDuration:A=.5,removalInterval:x=30,maxPoints:y=5})=>{const[C,g]=a.useState([]),o=a.useRef(null),v=a.useRef(Date.now()),h=a.useRef(0),M=e=>{if(!o.current)return;const r=o.current.getBoundingClientRect(),_=e.clientX-r.left,D=e.clientY-r.top,I=()=>n?{randomX:Math.random()*10-5,randomY:Math.random()*10-5,randomRotate:Math.random()*10-5}:{};g(O=>{const t=[...O];if(t.length===0)t.push({id:h.current++,x:_,y:D,angle:0,...I()});else{const s=t[t.length-1],u=_-s.x,l=D-s.y,f=Math.sqrt(u*u+l*l);if(f>=d){let X=Math.atan2(l,u)*180/Math.PI;const Y=j?X:0,N=Math.floor(f/d);for(let m=1;m<=N;m++){const R=d*m/f,P=s.x+u*R,$=s.y+l*R;t.push({id:h.current++,x:P,y:$,angle:Y,...I()})}}}return t.length>y?t.slice(t.length-y):t}),v.current=Date.now()};return a.useEffect(()=>{const e=o.current;if(e)return e.addEventListener("mousemove",M),()=>e.removeEventListener("mousemove",M)},[]),a.useEffect(()=>{const e=setInterval(()=>{Date.now()-v.current>100&&g(r=>r.length>0?r.slice(1):r)},x);return()=>clearInterval(e)},[x]),c.jsx("div",{ref:o,className:`${p["text-cursor-container"]}`,children:c.jsx("div",{className:`${p["text-cursor-inner"]}`,children:c.jsx(B,{children:C.map(e=>c.jsx(L.div,{initial:{opacity:0,scale:1,rotate:e.angle},animate:{opacity:1,scale:1,x:n?[0,e.randomX||0,0]:0,y:n?[0,e.randomY||0,0]:0,rotate:n?[e.angle,e.angle+(e.randomRotate||0),e.angle]:e.angle},exit:{opacity:0,scale:0},transition:{opacity:{duration:A,ease:"easeOut"},...n&&{x:{duration:2,ease:"easeInOut",repeat:1/0,repeatType:"mirror"},y:{duration:2,ease:"easeInOut",repeat:1/0,repeatType:"mirror"},rotate:{duration:2,ease:"easeInOut",repeat:1/0,repeatType:"mirror"}}},className:`${p["text-cursor-item"]}`,style:{left:e.x,top:e.y},children:V},e.id))})})})};E.__docgenInfo={description:"",methods:[],displayName:"TextCursor",props:{text:{defaultValue:{value:"'⚛️'",computed:!1},required:!1},spacing:{defaultValue:{value:"100",computed:!1},required:!1},followMouseDirection:{defaultValue:{value:"true",computed:!1},required:!1},randomFloat:{defaultValue:{value:"true",computed:!1},required:!1},exitDuration:{defaultValue:{value:"0.5",computed:!1},required:!1},removalInterval:{defaultValue:{value:"30",computed:!1},required:!1},maxPoints:{defaultValue:{value:"5",computed:!1},required:!1}}};const H={title:"ReactBits/TextAnimations/TextCursor",component:E,parameters:{layout:"fullscreen"},tags:["autodocs"]},i={args:{text:"⚛️",spacing:100,followMouseDirection:!0,randomFloat:!0,exitDuration:.5,removalInterval:30,maxPoints:5}};var w,T,q;i.parameters={...i.parameters,docs:{...(w=i.parameters)==null?void 0:w.docs,source:{originalSource:`{
|
|
2
|
+
args: {
|
|
3
|
+
text: '⚛️',
|
|
4
|
+
spacing: 100,
|
|
5
|
+
followMouseDirection: true,
|
|
6
|
+
randomFloat: true,
|
|
7
|
+
exitDuration: 0.5,
|
|
8
|
+
removalInterval: 30,
|
|
9
|
+
maxPoints: 5
|
|
10
|
+
}
|
|
11
|
+
}`,...(q=(T=i.parameters)==null?void 0:T.docs)==null?void 0:q.source}}};const J=["Default"];export{i as Default,J as __namedExportsOrder,H as default};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import{R as _,j as n}from"./iframe-Cz1R6gKZ.js";import{u as T}from"./useSound-DOpt9DfD.js";const V="_textInput_mb1yv_1",A="_required_mb1yv_82",k="_inputError_mb1yv_89",M="_errorMessage_mb1yv_102",R="_success_mb1yv_138",S="_loading_mb1yv_167",P="_withIcon_mb1yv_184",$="_inputIcon_mb1yv_192",B="_withAction_mb1yv_209",F="_actionButton_mb1yv_213",t={textInput:V,required:A,inputError:k,errorMessage:M,success:R,loading:S,withIcon:P,inputIcon:$,withAction:B,actionButton:F};function H({label:b,value:r,onChange:v,type:x="text",onBlur:y,placeholder:I,error:a,required:w,disabled:m=!1,success:g=!1,loading:o=!1,icon:c,actionButton:l,maxLength:E,autoComplete:j,soundConfig:s,enableTypingSounds:q=!1}){const i=`input-${Math.random().toString(36).substr(2,9)}`,{handlers:u,playSound:p}=T(s),h=_.useRef(r),N=()=>{const e=[t.textInput];return g&&e.push(t.success),o&&e.push(t.loading),c&&e.push(t.withIcon),l&&e.push(t.withAction),e.join(" ")};return _.useEffect(()=>{h.current=r},[r]),n.jsxs("div",{className:N(),children:[n.jsxs("label",{htmlFor:i,children:[b,w&&n.jsx("span",{className:t.required,children:"*"})]}),n.jsxs("div",{style:{position:"relative"},children:[c&&n.jsx("div",{className:t.inputIcon,children:c}),n.jsx("input",{id:i,type:x,value:r,onChange:e=>{const d=e.target.value,f=h.current;v(d),(q||s!=null&&s.onClick)&&(d.length>f.length?p("type"):d.length<f.length&&p("delete")),a&&(s!=null&&s.onError)&&p(typeof s.onError=="string"?s.onError:"error")},onBlur:y,placeholder:I,className:a?t.inputError:"","aria-invalid":!!a,"aria-describedby":a?`${i}-error`:void 0,disabled:m||o,maxLength:E,autoComplete:j}),l&&n.jsx("button",{type:"button",className:t.actionButton,onClick:()=>{var e;(e=u.onClick)==null||e.call(u),l.onClick()},disabled:m||o,children:l.label})]}),a&&n.jsx("span",{id:`${i}-error`,className:t.errorMessage,children:a})]})}H.__docgenInfo={description:`TextInput component - A versatile text input field with label and error handling
|
|
2
|
+
|
|
3
|
+
@component
|
|
4
|
+
@description
|
|
5
|
+
A foundational input component that provides a clean, accessible text field with
|
|
6
|
+
built-in support for labels, validation errors, and various HTML5 input types.
|
|
7
|
+
Follows design system tokens for consistent theming across light/dark modes.
|
|
8
|
+
|
|
9
|
+
@example
|
|
10
|
+
// Basic usage
|
|
11
|
+
<TextInput
|
|
12
|
+
label="Email Address"
|
|
13
|
+
value={email}
|
|
14
|
+
onChange={setEmail}
|
|
15
|
+
type="email"
|
|
16
|
+
placeholder="Enter your email"
|
|
17
|
+
/>
|
|
18
|
+
|
|
19
|
+
@example
|
|
20
|
+
// With validation error
|
|
21
|
+
<TextInput
|
|
22
|
+
label="Password"
|
|
23
|
+
value={password}
|
|
24
|
+
onChange={setPassword}
|
|
25
|
+
type="password"
|
|
26
|
+
error="Password must be at least 8 characters"
|
|
27
|
+
required
|
|
28
|
+
/>`,methods:[],displayName:"TextInput",props:{type:{defaultValue:{value:'"text"',computed:!1},required:!1},disabled:{defaultValue:{value:"false",computed:!1},required:!1},success:{defaultValue:{value:"false",computed:!1},required:!1},loading:{defaultValue:{value:"false",computed:!1},required:!1},enableTypingSounds:{defaultValue:{value:"false",computed:!1},required:!1}}};export{H as T};
|