@stfrigerio/sito-template 0.1.100 → 0.1.103
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/Modal/Modal.d.ts +2 -0
- package/dist/components/atoms/Modal/Modal.d.ts.map +1 -1
- package/dist/components/organisms/charts/QuantifiableHabitsChart/QuantifiableHabitsChart.d.ts.map +1 -1
- package/dist/index.esm.js +9 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +9 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/storybook-static/assets/{ASCIIText.stories-pbbzaeoe.js → ASCIIText.stories-tIaR8-30.js} +1 -1
- package/storybook-static/assets/{AllAtoms.stories-Cl6OlQtE.js → AllAtoms.stories-wjImSAbw.js} +1 -1
- package/storybook-static/assets/{AnimatedContent.stories-CBgdeKum.js → AnimatedContent.stories-2qC-fkJI.js} +1 -1
- package/storybook-static/assets/{AnimatedList.stories-BvsDoR0x.js → AnimatedList.stories-CylIt0ba.js} +1 -1
- package/storybook-static/assets/{Antigravity.stories-DDREZ42A.js → Antigravity.stories-ium_rPSJ.js} +1 -1
- package/storybook-static/assets/{ArrayInput.stories-CVoXOB8N.js → ArrayInput.stories-CnVg06MK.js} +1 -1
- package/storybook-static/assets/{Aurora.stories-BBYKIq3G.js → Aurora.stories-DuFv0_k8.js} +1 -1
- package/storybook-static/assets/{Beams.stories-D3pidC9q.js → Beams.stories-DIEOjIBe.js} +1 -1
- package/storybook-static/assets/{BlobCursor.stories-CGYCm6z4.js → BlobCursor.stories-DvG-koWY.js} +1 -1
- package/storybook-static/assets/{BlurText.stories-B3O9QJYR.js → BlurText.stories-sWy214Q2.js} +1 -1
- package/storybook-static/assets/{BooleansHeatmap.stories-BV9FcXUZ.js → BooleansHeatmap.stories-mxTxY_p5.js} +1 -1
- package/storybook-static/assets/{BorderGlow.stories-8Gc0vp0f.js → BorderGlow.stories-E4gpGeWQ.js} +1 -1
- package/storybook-static/assets/{BubbleMenu.stories-C4DR01bC.js → BubbleMenu.stories-W43-ioFH.js} +1 -1
- package/storybook-static/assets/{Button-83Rb3m5a.js → Button-CTnNAnoF.js} +1 -1
- package/storybook-static/assets/{Button.stories-CBYliITN.js → Button.stories-ACvBbIR1.js} +1 -1
- package/storybook-static/assets/{Calendar.stories-Dqi94wuY.js → Calendar.stories-iQkvrvgz.js} +1 -1
- package/storybook-static/assets/{Card-COnu8cMa.js → Card-6j0993HS.js} +1 -1
- package/storybook-static/assets/{Card.stories-Bq9z7byl.js → Card.stories-DZzRMcRM.js} +1 -1
- package/storybook-static/assets/{CardNav.stories-Dt55ZFOT.js → CardNav.stories-BqXRGPFR.js} +1 -1
- package/storybook-static/assets/{Carousel.stories-DPGGh8e2.js → Carousel.stories-Z9HYvNS6.js} +1 -1
- package/storybook-static/assets/{Checkbox-DXyNO7YZ.js → Checkbox-6Z_EEcoe.js} +1 -1
- package/storybook-static/assets/{Checkbox.stories-XFy6_cHg.js → Checkbox.stories-CkXxAAOM.js} +1 -1
- package/storybook-static/assets/{ChordDiagram.stories-BZliaejf.js → ChordDiagram.stories-BoGS9mXW.js} +1 -1
- package/storybook-static/assets/{ChromaGrid.stories-CApS2QXP.js → ChromaGrid.stories-DZWtESDP.js} +1 -1
- package/storybook-static/assets/{CircularGallery.stories-BlNX4k_S.js → CircularGallery.stories-DQHz7F4g.js} +1 -1
- package/storybook-static/assets/{CircularText.stories-Ceh0rRi1.js → CircularText.stories-hAb1lSel.js} +1 -1
- package/storybook-static/assets/{ClickSpark.stories-WnLtsFNk.js → ClickSpark.stories-BjzCHr3X.js} +1 -1
- package/storybook-static/assets/{ColorBends.stories-CLsU0EG8.js → ColorBends.stories-VFe9q7SG.js} +1 -1
- package/storybook-static/assets/{CountUp.stories-reozHM_1.js → CountUp.stories-DMfEJ2_X.js} +1 -1
- package/storybook-static/assets/{Counter.stories-Dku6-Lnw.js → Counter.stories-Ddufg4zF.js} +1 -1
- package/storybook-static/assets/{Crosshair.stories-DybQmZ3h.js → Crosshair.stories-C6quKu3e.js} +1 -1
- package/storybook-static/assets/{Cubes.stories-BjXSc5QW.js → Cubes.stories-B7vxZouX.js} +1 -1
- package/storybook-static/assets/{CurvedLoop.stories-KgersFw2.js → CurvedLoop.stories-BGet8MMP.js} +1 -1
- package/storybook-static/assets/{DarkVeil.stories-CJBTJSz8.js → DarkVeil.stories-Bu0Tnu-6.js} +1 -1
- package/storybook-static/assets/{DateInput-BLV3e07T.js → DateInput-BuyblN2J.js} +1 -1
- package/storybook-static/assets/{DateInput.stories-DLRz8fqR.js → DateInput.stories-CyRv7sjg.js} +1 -1
- package/storybook-static/assets/{DecayCard.stories-DGN4O3Mj.js → DecayCard.stories-BD2h63Yc.js} +1 -1
- package/storybook-static/assets/{DecryptedText.stories-SdAoPuM6.js → DecryptedText.stories-BR5w3WHS.js} +1 -1
- package/storybook-static/assets/{Dither.stories-Dg2Qff92.js → Dither.stories-aUCUDBCz.js} +1 -1
- package/storybook-static/assets/{Dock.stories-D74JtWe-.js → Dock.stories-B9c2txIi.js} +1 -1
- package/storybook-static/assets/{EditFAB.stories-B9Sa836v.js → EditFAB.stories-DMOijRLx.js} +1 -1
- package/storybook-static/assets/{EvilEye.stories-Cw-2c0HG.js → EvilEye.stories-CsOG_d0o.js} +1 -1
- package/storybook-static/assets/{FadeContent.stories-DqJHiF9w.js → FadeContent.stories-BR6tybqY.js} +1 -1
- package/storybook-static/assets/{FaultyTerminal.stories-MgqyW8nH.js → FaultyTerminal.stories-DS5Tyv6l.js} +1 -1
- package/storybook-static/assets/{Fbo-rjI50RR9.js → Fbo-CW8HnzJ0.js} +1 -1
- package/storybook-static/assets/{FloatingLines.stories-DmY-Mkaf.js → FloatingLines.stories-DpsTsF-M.js} +1 -1
- package/storybook-static/assets/{FlowingMenu.stories-DKz3a0Zd.js → FlowingMenu.stories-C7Yw24v8.js} +1 -1
- package/storybook-static/assets/{FluidGlass.stories-DbWDIAaP.js → FluidGlass.stories-DL7gsIvR.js} +1 -1
- package/storybook-static/assets/{Folder.stories-CkEj6N-U.js → Folder.stories-oUQTik2D.js} +1 -1
- package/storybook-static/assets/{FuzzyText.stories-XIFHJ6IE.js → FuzzyText.stories-3sz8Ql2j.js} +1 -1
- package/storybook-static/assets/{Galaxy.stories-Bpx63raQ.js → Galaxy.stories-DNKl8sLe.js} +1 -1
- package/storybook-static/assets/{GhostCursor.stories-DyxjSzii.js → GhostCursor.stories-BwKhRvGF.js} +1 -1
- package/storybook-static/assets/{GlareHover.stories-BwQV1tAW.js → GlareHover.stories-HqLH7vCz.js} +1 -1
- package/storybook-static/assets/{GlassSurface.stories-OC5mV8xA.js → GlassSurface.stories-BI3VNUMA.js} +1 -1
- package/storybook-static/assets/{GlitchText.stories-B0bz69xi.js → GlitchText.stories-DAJVj_2t.js} +1 -1
- package/storybook-static/assets/{GooeyNav.stories-vKC1eIZ7.js → GooeyNav.stories-DC9dqubb.js} +1 -1
- package/storybook-static/assets/{GradientBlinds.stories-BlFIa6E1.js → GradientBlinds.stories-FtL2FczL.js} +1 -1
- package/storybook-static/assets/{GradientText.stories-B662V5lp.js → GradientText.stories-sKX4wnrF.js} +1 -1
- package/storybook-static/assets/{Grainient.stories-ASLiDGhy.js → Grainient.stories-LOYPnd1b.js} +1 -1
- package/storybook-static/assets/{GridMotion.stories-9vYEfFU5.js → GridMotion.stories-D56B4vk1.js} +1 -1
- package/storybook-static/assets/{HabitTimeOfDayChart.stories-DFGnkEfQ.js → HabitTimeOfDayChart.stories-CSb9GUPx.js} +1 -1
- package/storybook-static/assets/{ImageSlideshow.stories-BDdgiAUd.js → ImageSlideshow.stories-B74RIe-i.js} +1 -1
- package/storybook-static/assets/{Iridescence.stories-FZVPa6Zb.js → Iridescence.stories-CTwtY8eT.js} +1 -1
- package/storybook-static/assets/{LaserFlow.stories-DObt_d2n.js → LaserFlow.stories-BLmaf3AB.js} +1 -1
- package/storybook-static/assets/{LetterGlitch.stories-Cf_vULWH.js → LetterGlitch.stories-DH37XF0t.js} +1 -1
- package/storybook-static/assets/{LightPillar.stories-nZkTB0fq.js → LightPillar.stories-Ck3qeiN0.js} +1 -1
- package/storybook-static/assets/{LightRays.stories-K-i71-tu.js → LightRays.stories-ua2gmYoU.js} +1 -1
- package/storybook-static/assets/{Lightning.stories-ByQwF3RZ.js → Lightning.stories-aH3grKDv.js} +1 -1
- package/storybook-static/assets/{LineWaves.stories-CdfUDsCS.js → LineWaves.stories-Dny9m17l.js} +1 -1
- package/storybook-static/assets/{LiquidChrome.stories-BXkNdjZS.js → LiquidChrome.stories-DhhNq7hu.js} +1 -1
- package/storybook-static/assets/{LiquidEther.stories-CGpLWWCj.js → LiquidEther.stories-QrTDJF0k.js} +1 -1
- package/storybook-static/assets/{LoadingSpinner-C2iJvHMr.js → LoadingSpinner-1TPKggI4.js} +1 -1
- package/storybook-static/assets/{LoadingSpinner.stories-C9SM_Yp7.js → LoadingSpinner.stories-hbHHmRIN.js} +1 -1
- package/storybook-static/assets/{MagicRings.stories-CDsUclcL.js → MagicRings.stories-DVVFiIUt.js} +1 -1
- package/storybook-static/assets/{Magnet.stories-CGvgF9lm.js → Magnet.stories-BbdHeWMA.js} +1 -1
- package/storybook-static/assets/{MagnetLines.stories-CAeIkhJn.js → MagnetLines.stories-DuFdunF1.js} +1 -1
- package/storybook-static/assets/{Masonry.stories-CUJK0KGB.js → Masonry.stories-eCIUqf99.js} +1 -1
- package/storybook-static/assets/{MetaBalls.stories-Ct_AsbzH.js → MetaBalls.stories-Dv6jUd7Z.js} +1 -1
- package/storybook-static/assets/{MetallicPaint.stories-Df_Zgq1A.js → MetallicPaint.stories-DAVRhJNS.js} +1 -1
- package/storybook-static/assets/{MoodChart.stories-3V2WoSGm.js → MoodChart.stories-Cu2L9ctb.js} +1 -1
- package/storybook-static/assets/{MotionConfigContext-CRCVf1uh.js → MotionConfigContext-BOce3hkw.js} +1 -1
- package/storybook-static/assets/{Navbar.stories-DnyCDm9i.js → Navbar.stories-CA4HG5LC.js} +1 -1
- package/storybook-static/assets/{Noise.stories-BqQkIZ8v.js → Noise.stories-CzRiztMU.js} +1 -1
- package/storybook-static/assets/{NumberStepper-Cq7QAruL.js → NumberStepper-CA99F71z.js} +1 -1
- package/storybook-static/assets/{NumberStepper.stories-B9Ektv04.js → NumberStepper.stories-BaedWrxw.js} +1 -1
- package/storybook-static/assets/{Orb.stories-CpdPYpRZ.js → Orb.stories-C3AvU6Ck.js} +1 -1
- package/storybook-static/assets/{OrbitImages.stories-B1O85i87.js → OrbitImages.stories-CUQtYBoA.js} +1 -1
- package/storybook-static/assets/{PieChart.stories-DEShZFit.js → PieChart.stories-CuDdoiKR.js} +1 -1
- package/storybook-static/assets/{PixelBlast.stories-toacD96G.js → PixelBlast.stories-BZMMgPnx.js} +1 -1
- package/storybook-static/assets/{PixelCard.stories-C8QPPRqE.js → PixelCard.stories-BGHIfRb9.js} +1 -1
- package/storybook-static/assets/{PixelSnow.stories-DCZqYJ8y.js → PixelSnow.stories-BxIpxPJS.js} +1 -1
- package/storybook-static/assets/{PixelTransition.stories-hOlznl24.js → PixelTransition.stories-Do2T23Se.js} +1 -1
- package/storybook-static/assets/{Plasma.stories-BD2LF5uw.js → Plasma.stories-SQXqI75y.js} +1 -1
- package/storybook-static/assets/{PolarHeatmap.stories-CPPy32mr.js → PolarHeatmap.stories-CDFci1PA.js} +1 -1
- package/storybook-static/assets/{Prism.stories-yp33iZTg.js → Prism.stories-Ba_UAm8c.js} +1 -1
- package/storybook-static/assets/{PrismaticBurst.stories-6MirvK8Q.js → PrismaticBurst.stories-NskKboMg.js} +1 -1
- package/storybook-static/assets/{ProfileCard.stories-l6W358Jg.js → ProfileCard.stories-nhGFawW1.js} +1 -1
- package/storybook-static/assets/{ProgressRings.stories-DQpINdQ5.js → ProgressRings.stories-Dq2WYOU1.js} +1 -1
- package/storybook-static/assets/QuantifiableHabitsChart.stories-treJexAd.js +125 -0
- package/storybook-static/assets/{Radar.stories-cawmnZFr.js → Radar.stories-DN8oMfe1.js} +1 -1
- package/storybook-static/assets/{RadialDayChart.stories-D1QVgDAt.js → RadialDayChart.stories-C_GY1oKa.js} +1 -1
- package/storybook-static/assets/{RecurrencePicker.stories-Dj2MXHV4.js → RecurrencePicker.stories-yUASJJzk.js} +1 -1
- package/storybook-static/assets/{Ribbons.stories-CSQ2SZyL.js → Ribbons.stories-2PD9Q7CT.js} +1 -1
- package/storybook-static/assets/{RippleGrid.stories-CwWpTtq1.js → RippleGrid.stories-Bmz86N8L.js} +1 -1
- package/storybook-static/assets/{RotatingText.stories-Cuq7WFhZ.js → RotatingText.stories-Db0Kj4fU.js} +1 -1
- package/storybook-static/assets/{ScrollFloat.stories-BhUAiHbQ.js → ScrollFloat.stories-BvS3cLTO.js} +1 -1
- package/storybook-static/assets/{ScrollReveal.stories-D8UDTvCL.js → ScrollReveal.stories-BRz9n7Qk.js} +1 -1
- package/storybook-static/assets/{ScrollVelocity.stories-6VBsKp1n.js → ScrollVelocity.stories-TeCcq0Yc.js} +1 -1
- package/storybook-static/assets/{SearchBar.stories-DlWYwaoD.js → SearchBar.stories-Bu7toOZA.js} +1 -1
- package/storybook-static/assets/{SearchableDropdown-C_Ne0TA3.js → SearchableDropdown-BKDA92Db.js} +1 -1
- package/storybook-static/assets/{SearchableDropdown.stories-nwQqM99l.js → SearchableDropdown.stories-oT9buOsg.js} +1 -1
- package/storybook-static/assets/{SelectInput-39F_8d3i.js → SelectInput-Cej6AIrC.js} +1 -1
- package/storybook-static/assets/{SelectInput.stories-7ET-2BZM.js → SelectInput.stories--hmbh-1I.js} +1 -1
- package/storybook-static/assets/{ShapeBlur.stories-DuzZfhXI.js → ShapeBlur.stories-BrPB9Dgq.js} +1 -1
- package/storybook-static/assets/{ShapeGrid.stories-6Emgz4Xz.js → ShapeGrid.stories-A41-DtIq.js} +1 -1
- package/storybook-static/assets/{ShinyText.stories-CPR__VsR.js → ShinyText.stories-BFTU8GJP.js} +1 -1
- package/storybook-static/assets/{Silk.stories-BGWPr5D2.js → Silk.stories-BxpLiRNx.js} +1 -1
- package/storybook-static/assets/{SleepChart.stories-Dmf1Hltv.js → SleepChart.stories-ywhx7_91.js} +1 -1
- package/storybook-static/assets/{Slider-D9vb-_lz.js → Slider-CuNmEDiZ.js} +1 -1
- package/storybook-static/assets/{Slider.stories-CUNPAtd0.js → Slider.stories-CsQAkQAf.js} +1 -1
- package/storybook-static/assets/{SoftAurora.stories-ChcxW0hb.js → SoftAurora.stories-taxcnhT9.js} +1 -1
- package/storybook-static/assets/{SoundDemo.stories-VemKEfkR.js → SoundDemo.stories-zh_F_pgW.js} +1 -1
- package/storybook-static/assets/{SplashCursor.stories-D1ZTyWhi.js → SplashCursor.stories-CmqWbAt-.js} +1 -1
- package/storybook-static/assets/{SpotlightCard.stories-CBaCxWbM.js → SpotlightCard.stories-CuO7WGGH.js} +1 -1
- package/storybook-static/assets/{Stack.stories-65akIYaj.js → Stack.stories-7-b3bhlI.js} +1 -1
- package/storybook-static/assets/{StaggeredMenu.stories-BU40lLcN.js → StaggeredMenu.stories-DBTBz-bp.js} +1 -1
- package/storybook-static/assets/{StarBorder.stories-Cqh86yZs.js → StarBorder.stories-eXdZPyrG.js} +1 -1
- package/storybook-static/assets/{SunburstChart.stories-BGVtmBel.js → SunburstChart.stories-CMSDNzoY.js} +1 -1
- package/storybook-static/assets/{Table.stories-m-dD0hDS.js → Table.stories-SylwgEpv.js} +1 -1
- package/storybook-static/assets/{Tabs.stories-DjpA129B.js → Tabs.stories-DbAMtL9i.js} +1 -1
- package/storybook-static/assets/{TargetCursor.stories-B62hPQV-.js → TargetCursor.stories-BRd8eVe6.js} +1 -1
- package/storybook-static/assets/{TextArea-CMIvdohR.js → TextArea-DBXLzMeZ.js} +1 -1
- package/storybook-static/assets/{TextArea.stories-C2ejt4yi.js → TextArea.stories-udebbAVJ.js} +1 -1
- package/storybook-static/assets/{TextCursor.stories-DbSzkVIZ.js → TextCursor.stories-BUDlvRvw.js} +1 -1
- package/storybook-static/assets/{TextInput-kBi6r-DZ.js → TextInput-Df0ECj-K.js} +1 -1
- package/storybook-static/assets/{TextInput.stories-BSbA4H9h.js → TextInput.stories-FtH8T5-_.js} +1 -1
- package/storybook-static/assets/{TextPressure.stories-BjYHv0dB.js → TextPressure.stories-Dooijbiu.js} +1 -1
- package/storybook-static/assets/{TextType.stories-CTsOM2j0.js → TextType.stories-ClLVvVVk.js} +1 -1
- package/storybook-static/assets/{ThemeSwitcher.stories-BUnyRqDi.js → ThemeSwitcher.stories-CwegSINw.js} +1 -1
- package/storybook-static/assets/{Threads.stories-CbFZ2-LC.js → Threads.stories-BuN-AxUr.js} +1 -1
- package/storybook-static/assets/{TimeInput.stories-CCYb3ycp.js → TimeInput.stories-B5IUTUV2.js} +1 -1
- package/storybook-static/assets/{Toggle-B8i7xSap.js → Toggle-B5sCmBg4.js} +1 -1
- package/storybook-static/assets/{Toggle.stories-IhnDej2s.js → Toggle.stories-BmSHf5DP.js} +1 -1
- package/storybook-static/assets/{ToggleButton-DZOeCY6k.js → ToggleButton-CP739hB6.js} +1 -1
- package/storybook-static/assets/{ToggleButton.stories-Ca6yok5k.js → ToggleButton.stories-m2eCrn7I.js} +1 -1
- package/storybook-static/assets/{TrueFocus.stories-C4zaM767.js → TrueFocus.stories-ATT_gCYY.js} +1 -1
- package/storybook-static/assets/{VariableProximity.stories-CZcw99go.js → VariableProximity.stories-CjhZaqvP.js} +1 -1
- package/storybook-static/assets/{Waves.stories-Mo0BfNOq.js → Waves.stories-l6P0auFd.js} +1 -1
- package/storybook-static/assets/{calendar-bUcBNUjV.js → calendar-DtZXr8CJ.js} +1 -1
- package/storybook-static/assets/{chart-column-CB0l3JOL.js → chart-column-Bc8_bGZY.js} +1 -1
- package/storybook-static/assets/{check-D11muFzc.js → check-pQLEHzEB.js} +1 -1
- package/storybook-static/assets/{chevron-down-D5ipCjUH.js → chevron-down-BwWfy_sP.js} +1 -1
- package/storybook-static/assets/{chevron-right-pxDpP2zm.js → chevron-right-D2pOUpcG.js} +1 -1
- package/storybook-static/assets/client-DyHGB6m6.js +1 -0
- package/storybook-static/assets/{createLucideIcon-S7OoTmdc.js → createLucideIcon-B-jPBnP1.js} +1 -1
- package/storybook-static/assets/{download-nBu86hUE.js → download-DnhuO1Ek.js} +1 -1
- package/storybook-static/assets/{folder-DA8vtXXN.js → folder-B0kHgyRN.js} +1 -1
- package/storybook-static/assets/{iconBase-DEIlaCbU.js → iconBase-Do-FwLpb.js} +1 -1
- package/storybook-static/assets/{iframe-BxepBtx0.js → iframe-ClorXKAj.js} +3 -3
- package/storybook-static/assets/{index-DyYqwgzw.js → index-Bs1dRoHq.js} +1 -1
- package/storybook-static/assets/{index-4UL0sjOk.js → index-CBJggPN9.js} +1 -1
- package/storybook-static/assets/{index-Ct0SUml7.js → index-CezVs6bU.js} +1 -1
- package/storybook-static/assets/{proxy-CriS3ead.js → proxy-3BlM6Jc4.js} +1 -1
- package/storybook-static/assets/{react-18-B5blUeRu.js → react-18-wzICuHUq.js} +1 -1
- package/storybook-static/assets/{react-three-fiber.esm-Bbpjp-0U.js → react-three-fiber.esm-BmUFa1-S.js} +1 -1
- package/storybook-static/assets/{search-Db-1eb78.js → search-BKi-6XDz.js} +1 -1
- package/storybook-static/assets/{settings-DZmzMR5T.js → settings-BzEV0s0L.js} +1 -1
- package/storybook-static/assets/{sun-DC4WyAtt.js → sun-C9Sm1WQX.js} +1 -1
- package/storybook-static/assets/{trash-2-C-dE1YLC.js → trash-2-Bb1H8yHr.js} +1 -1
- package/storybook-static/assets/{use-animation-frame-eP0MSTj9.js → use-animation-frame-D9hLiIrP.js} +1 -1
- package/storybook-static/assets/{use-in-view-BXgNpgg1.js → use-in-view-DKEXTXQI.js} +1 -1
- package/storybook-static/assets/{use-motion-value-DWEoPKqa.js → use-motion-value-BABvebXq.js} +1 -1
- package/storybook-static/assets/{use-spring-CHtlXZ5H.js → use-spring-C8_4zIh_.js} +1 -1
- package/storybook-static/assets/{use-transform-CWJyn-_D.js → use-transform-CcGdha8D.js} +1 -1
- package/storybook-static/assets/{useSound-B4Mjw5gj.js → useSound-BS8g02XJ.js} +1 -1
- package/storybook-static/assets/{users-BKw8hMYi.js → users-CL9_RODb.js} +1 -1
- package/storybook-static/assets/{x-aUMnvdMn.js → x-BgxSkyBO.js} +1 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/assets/QuantifiableHabitsChart.stories-CAbcMOsL.js +0 -125
- package/storybook-static/assets/client-BcH49jwt.js +0 -1
package/storybook-static/assets/{PixelCard.stories-C8QPPRqE.js → PixelCard.stories-BGHIfRb9.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as l,j as V}from"./iframe-
|
|
1
|
+
import{r as l,j as V}from"./iframe-ClorXKAj.js";import"./preload-helper-C1FmrZbK.js";const q={"pixel-canvas":"_pixel-canvas_wo94u_1","pixel-card":"_pixel-card_wo94u_7"};class J{constructor(t,u,p,x,i,y,n){this.width=t.width,this.height=t.height,this.ctx=u,this.x=p,this.y=x,this.color=i,this.speed=this.getRandomValue(.1,.9)*y,this.size=0,this.sizeStep=Math.random()*.4,this.minSize=.5,this.maxSizeInteger=2,this.maxSize=this.getRandomValue(this.minSize,this.maxSizeInteger),this.delay=n,this.counter=0,this.counterStep=Math.random()*4+(this.width+this.height)*.01,this.isIdle=!1,this.isReverse=!1,this.isShimmer=!1}getRandomValue(t,u){return Math.random()*(u-t)+t}draw(){const t=this.maxSizeInteger*.5-this.size*.5;this.ctx.fillStyle=this.color,this.ctx.fillRect(this.x+t,this.y+t,this.size,this.size)}appear(){if(this.isIdle=!1,this.counter<=this.delay){this.counter+=this.counterStep;return}this.size>=this.maxSize&&(this.isShimmer=!0),this.isShimmer?this.shimmer():this.size+=this.sizeStep,this.draw()}disappear(){if(this.isShimmer=!1,this.counter=0,this.size<=0){this.isIdle=!0;return}else this.size-=.1;this.draw()}shimmer(){this.size>=this.maxSize?this.isReverse=!0:this.size<=this.minSize&&(this.isReverse=!1),this.isReverse?this.size-=this.speed:this.size+=this.speed}}function K(m,t){const i=parseInt(m,10);return i<=0||t?0:i>=100?100*.001:i*.001}const T={default:{activeColor:null,gap:5,speed:35,colors:"#f8fafc,#f1f5f9,#cbd5e1",noFocus:!1},blue:{activeColor:"#e0f2fe",gap:10,speed:25,colors:"#e0f2fe,#7dd3fc,#0ea5e9",noFocus:!1},yellow:{activeColor:"#fef08a",gap:3,speed:20,colors:"#fef08a,#fde047,#eab308",noFocus:!1},pink:{activeColor:"#fecdd3",gap:6,speed:80,colors:"#fecdd3,#fda4af,#e11d48",noFocus:!0}};function O({variant:m="default",gap:t,speed:u,colors:p,noFocus:x,className:i="",children:y}){const n=l.useRef(null),s=l.useRef(null),I=l.useRef([]),h=l.useRef(null),F=l.useRef(performance.now()),M=l.useRef(window.matchMedia("(prefers-reduced-motion: reduce)").matches).current,g=T[m]||T.default,C=t??g.gap,A=u??g.speed,_=p??g.colors,v=x??g.noFocus,b=()=>{if(!n.current||!s.current)return;const e=n.current.getBoundingClientRect(),a=Math.floor(e.width),o=Math.floor(e.height),z=s.current.getContext("2d");s.current.width=a,s.current.height=o,s.current.style.width=`${a}px`,s.current.style.height=`${o}px`;const d=_.split(","),f=[];for(let c=0;c<a;c+=parseInt(C,10))for(let r=0;r<o;r+=parseInt(C,10)){const S=d[Math.floor(Math.random()*d.length)],E=c-a/2,N=r-o/2,G=Math.sqrt(E*E+N*N),L=M?0:G;f.push(new J(s.current,z,c,r,S,K(A,M),L))}I.current=f},P=e=>{var c;h.current=requestAnimationFrame(()=>P(e));const a=performance.now(),o=a-F.current,z=1e3/60;if(o<z)return;F.current=a-o%z;const d=(c=s.current)==null?void 0:c.getContext("2d");if(!d||!s.current)return;d.clearRect(0,0,s.current.width,s.current.height);let f=!0;for(let r=0;r<I.current.length;r++){const S=I.current[r];S[e](),S.isIdle||(f=!1)}f&&cancelAnimationFrame(h.current)},R=e=>{cancelAnimationFrame(h.current),h.current=requestAnimationFrame(()=>P(e))},D=()=>R("appear"),H=()=>R("disappear"),W=e=>{e.currentTarget.contains(e.relatedTarget)||R("appear")},k=e=>{e.currentTarget.contains(e.relatedTarget)||R("disappear")};return l.useEffect(()=>{b();const e=new ResizeObserver(()=>{b()});return n.current&&e.observe(n.current),()=>{e.disconnect(),cancelAnimationFrame(h.current)}},[C,A,_,v]),V.jsxs("div",{ref:n,className:`${q["pixel-card"]} ${i}`,onMouseEnter:D,onMouseLeave:H,onFocus:v?void 0:W,onBlur:v?void 0:k,tabIndex:v?-1:0,children:[V.jsx("canvas",{className:`${q["pixel-canvas"]}`,ref:s}),y]})}O.__docgenInfo={description:"",methods:[],displayName:"PixelCard",props:{variant:{defaultValue:{value:"'default'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1}}};const X={title:"ReactBits/Components/PixelCard",component:O,parameters:{layout:"fullscreen"}},w={args:{variant:"default",children:"Hello World"}};var $,j,B;w.parameters={...w.parameters,docs:{...($=w.parameters)==null?void 0:$.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
variant: 'default',
|
|
4
4
|
children: 'Hello World'
|
package/storybook-static/assets/{PixelSnow.stories-DCZqYJ8y.js → PixelSnow.stories-BxIpxPJS.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,j as B}from"./iframe-
|
|
1
|
+
import{r as t,j as B}from"./iframe-ClorXKAj.js";import{n as K,e as O,S as T,a as U,W as X,i as G,d as H,q as W,M as Y}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const J={"pixel-snow-container":"_pixel-snow-container_udm6i_1"},L=`
|
|
2
2
|
void main() {
|
|
3
3
|
gl_Position = vec4(position, 1.0);
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r,j as l}from"./iframe-
|
|
1
|
+
import{r,j as l}from"./iframe-ClorXKAj.js";import{g as d}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const c={"pixelated-image-card":"_pixelated-image-card_12og9_1","pixelated-image-card__default":"_pixelated-image-card__default_12og9_12","pixelated-image-card__active":"_pixelated-image-card__active_12og9_13","pixelated-image-card__pixels":"_pixelated-image-card__pixels_12og9_14","pixelated-image-card__pixel":"_pixelated-image-card__pixel_12og9_14"};function E({firstContent:b,secondContent:F,gridSize:u=7,pixelColor:_="currentColor",animationStepDuration:m=.3,once:v=!1,aspectRatio:$="100%",className:q="",style:S={}}){const T=r.useRef(null),x=r.useRef(null),h=r.useRef(null),g=r.useRef(null),[i,I]=r.useState(!1),o="ontouchstart"in window||navigator.maxTouchPoints>0||window.matchMedia("(pointer: coarse)").matches;r.useEffect(()=>{const t=x.current;if(t){t.innerHTML="";for(let n=0;n<u;n++)for(let a=0;a<u;a++){const e=document.createElement("div");e.classList.add(c["pixelated-image-card__pixel"]),e.setAttribute("data-pixel",""),e.style.backgroundColor=_;const s=100/u;e.style.width=`${s}%`,e.style.height=`${s}%`,e.style.left=`${a*s}%`,e.style.top=`${n*s}%`,t.appendChild(e)}}},[u,_]);const f=t=>{I(t);const n=x.current,a=h.current;if(!n||!a)return;const e=n.querySelectorAll("[data-pixel]");if(!e.length)return;d.killTweensOf(e),g.current&&g.current.kill(),d.set(e,{display:"none"});const s=e.length,R=m/s;d.to(e,{display:"block",duration:0,stagger:{each:R,from:"random"}}),g.current=d.delayedCall(m,()=>{a.style.display=t?"block":"none",a.style.pointerEvents=t?"none":""}),d.to(e,{display:"none",duration:0,delay:m,stagger:{each:R,from:"random"}})},y=()=>{i||f(!0)},C=()=>{i&&!v&&f(!1)},V=()=>{i?i&&!v&&f(!1):f(!0)};return l.jsxs("div",{ref:T,className:`${c["pixelated-image-card"]} ${q}`,style:S,onMouseEnter:o?void 0:y,onMouseLeave:o?void 0:C,onClick:o?V:void 0,onFocus:o?void 0:y,onBlur:o?void 0:C,tabIndex:0,children:[l.jsx("div",{style:{paddingTop:$}}),l.jsx("div",{className:`${c["pixelated-image-card__default"]}`,"aria-hidden":i,children:b}),l.jsx("div",{className:`${c["pixelated-image-card__active"]}`,ref:h,"aria-hidden":!i,children:F}),l.jsx("div",{className:`${c["pixelated-image-card__pixels"]}`,ref:x})]})}E.__docgenInfo={description:"",methods:[],displayName:"PixelTransition",props:{gridSize:{defaultValue:{value:"7",computed:!1},required:!1},pixelColor:{defaultValue:{value:"'currentColor'",computed:!1},required:!1},animationStepDuration:{defaultValue:{value:"0.3",computed:!1},required:!1},once:{defaultValue:{value:"false",computed:!1},required:!1},aspectRatio:{defaultValue:{value:"'100%'",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},style:{defaultValue:{value:"{}",computed:!1},required:!1}}};const A={title:"ReactBits/Animations/PixelTransition",component:E,parameters:{layout:"fullscreen"}},p={args:{firstContent:l.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"#1a1a2e",color:"#fff",fontSize:"2rem"},children:"Hover me"}),secondContent:l.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"#5227FF",color:"#fff",fontSize:"2rem"},children:"Revealed!"}),gridSize:7,pixelColor:"#5227FF",aspectRatio:"100%"}};var j,k,w;p.parameters={...p.parameters,docs:{...(j=p.parameters)==null?void 0:j.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
firstContent: <div style={{
|
|
4
4
|
width: '100%',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as y,j as U}from"./iframe-
|
|
1
|
+
import{r as y,j as U}from"./iframe-ClorXKAj.js";import{R as E,P as Q,M as j}from"./Mesh-CwXV3WjE.js";import{T as k}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const L={"plasma-container":"_plasma-container_4c6hx_1"},N=n=>{const o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n);return o?[parseInt(o[1],16)/255,parseInt(o[2],16)/255,parseInt(o[3],16)/255]:[1,.5,.2]},$=`#version 300 es
|
|
2
2
|
precision highp float;
|
|
3
3
|
in vec2 position;
|
|
4
4
|
in vec2 uv;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as f,j as v}from"./iframe-
|
|
1
|
+
import{r as f,j as v}from"./iframe-ClorXKAj.js";import{s as X,c as J}from"./transform-DaumkFRH.js";import{a as K}from"./arc--Q2xWRUA.js";import"./preload-helper-C1FmrZbK.js";import"./path-CSVzDSO0.js";const Q="_container_1c0jn_1",Z="_svgWrap_1c0jn_9",tt="_tooltip_1c0jn_15",et="_visible_1c0jn_31",at="_tipLabel_1c0jn_35",rt="_tipRow_1c0jn_40",m={container:Q,svgWrap:Z,tooltip:tt,visible:et,tipLabel:at,tipRow:rt},st="#c8a14a",W=({cells:p,days:e,accentColor:a=st,centerTopLabel:i,centerMainLabel:u,size:y,minSize:b=320,maxSize:R=560})=>{const A=f.useRef(null),_=f.useRef(null),j=f.useRef(null),[Y,G]=f.useState(560),g=y??Y;f.useEffect(()=>{if(y)return;const o=A.current;if(!o)return;const s=new ResizeObserver(n=>{for(const d of n){const c=d.contentRect.width;c>0&&G(Math.max(b,Math.min(R,c)))}});return s.observe(o),()=>s.disconnect()},[y,b,R]);const O=f.useCallback((o,s)=>{const n=j.current,d=A.current;if(!n||!d)return;const c=d.getBoundingClientRect();n.style.left=`${o.clientX-c.left+12}px`,n.style.top=`${o.clientY-c.top-10}px`,n.innerHTML=s,n.classList.add(m.visible)},[]),z=f.useCallback(()=>{var o;(o=j.current)==null||o.classList.remove(m.visible)},[]);return f.useEffect(()=>{if(!_.current||p.length===0||e<=0)return;const o=X(_.current);o.selectAll("*").remove();const s=g/2-32,n=64,d=4,c=(s-n-d*(e-1))/e,V=o.append("defs"),$=`polar-heatmap-glow-${Math.random().toString(36).slice(2,9)}`,S=V.append("radialGradient").attr("id",$).attr("cx","50%").attr("cy","50%").attr("r","50%");S.append("stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",.18),S.append("stop").attr("offset","60%").attr("stop-color",a).attr("stop-opacity",.05),S.append("stop").attr("offset","100%").attr("stop-color",a).attr("stop-opacity",0);const l=o.attr("width",g).attr("height",g).append("g").attr("transform",`translate(${g/2}, ${g/2})`),h=t=>t/24*Math.PI*2;l.append("circle").attr("r",s+44).attr("fill",`url(#${$})`);for(let t=0;t<24;t++){const r=h(t)-Math.PI/2;l.append("line").attr("x1",Math.cos(r)*n).attr("y1",Math.sin(r)*n).attr("x2",Math.cos(r)*(s+6)).attr("y2",Math.sin(r)*(s+6)).attr("stroke",a).attr("stroke-width",t%3===0?.7:.35).attr("opacity",t%3===0?.55:.25)}const F=K().innerRadius(t=>s-t.dayOffset*(c+d)-c).outerRadius(t=>s-t.dayOffset*(c+d)).startAngle(t=>h(t.hour)).endAngle(t=>h(t.hour+1)).padAngle(.014).cornerRadius(2.5),B=p.filter(t=>t.dayOffset>=0&&t.dayOffset<e&&t.hour>=0&&t.hour<24);l.selectAll("path.cell").data(B).join("path").attr("class","cell").attr("d",F).attr("fill",t=>t.color).attr("opacity",0).style("cursor",t=>t.label?"pointer":"default").on("mousemove",function(t,r){if(!r.label)return;const x=`${String(r.hour).padStart(2,"0")}:00`,U=r.dayLabel??(r.dayOffset===0?"Today":`${r.dayOffset} days ago`);O(t,`<div class="${m.tipLabel}">${r.emoji??""} ${r.label}</div><div class="${m.tipRow}">${U} · ${x}</div>`)}).on("mouseleave",z).transition().delay(t=>t.hour/24*600+t.dayOffset*30).duration(380).ease(J).attr("opacity",t=>t.label?.88:0),l.append("circle").attr("r",s+16).attr("fill","none").attr("stroke",a).attr("stroke-width",.4).attr("opacity",.4);for(let t=0;t<48;t++){const r=t/48*Math.PI*2-Math.PI/2;l.append("circle").attr("cx",Math.cos(r)*(s+12)).attr("cy",Math.sin(r)*(s+12)).attr("r",t%2===0?1.4:.6).attr("fill",a).attr("opacity",t%2===0?.75:.4)}for(let t=0;t<24;t+=3){const r=h(t)-Math.PI/2,x=s+28;l.append("text").attr("x",Math.cos(r)*x).attr("y",Math.sin(r)*x).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("fill",a).attr("font-size","11px").attr("font-weight",600).attr("letter-spacing","1px").attr("opacity",.85).text(String(t).padStart(2,"0"))}l.append("circle").attr("r",n-4).attr("fill","var(--color-background)"),l.append("circle").attr("r",3).attr("fill",a).attr("opacity",.9),i&&l.append("text").attr("text-anchor","middle").attr("y",n-33).attr("fill",a).attr("font-size","9px").attr("letter-spacing","3px").attr("opacity",.85).text(i),u&&l.append("text").attr("text-anchor","middle").attr("y",n+2).attr("fill",a).attr("font-size","14px").attr("font-weight",700).attr("letter-spacing","2px").attr("opacity",.95).text(u)},[p,e,g,a,i,u,O,z]),v.jsxs("div",{className:m.container,ref:A,children:[v.jsx("div",{className:m.svgWrap,children:v.jsx("svg",{ref:_})}),v.jsx("div",{ref:j,className:m.tooltip})]})};W.__docgenInfo={description:"",methods:[],displayName:"PolarHeatmap",props:{cells:{required:!0,tsType:{name:"Array",elements:[{name:"PolarHeatmapCell"}],raw:"PolarHeatmapCell[]"},description:"Cells: one per (dayOffset, hour). Empty cells can be omitted or set to color='transparent'"},days:{required:!0,tsType:{name:"number"},description:"Number of concentric day rings. Cells with dayOffset >= days are ignored"},accentColor:{required:!1,tsType:{name:"string"},description:"Accent color for ornamental dots/lines/labels around the rim",defaultValue:{value:"'#c8a14a'",computed:!1}},centerTopLabel:{required:!1,tsType:{name:"string"},description:""},centerMainLabel:{required:!1,tsType:{name:"string"},description:""},size:{required:!1,tsType:{name:"number"},description:"Override the size; otherwise the chart fills its container up to maxSize"},minSize:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"320",computed:!1}},maxSize:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"560",computed:!1}}}};const ut={title:"Organisms/Charts/PolarHeatmap",component:W,parameters:{layout:"centered"}},nt={work:{color:"#6366f1",emoji:"💼"},sleep:{color:"#1e293b",emoji:"😴"},eat:{color:"#f59e0b",emoji:"🍽️"},sport:{color:"#10b981",emoji:"🏃"},play:{color:"#ec4899",emoji:"🎮"},read:{color:"#8b5cf6",emoji:"📚"}},ot=(p,e)=>e<7?"sleep":e===7?"eat":e>=8&&e<=12?p%6===0?"play":"work":e===13?"eat":e>=14&&e<=17?p%5===0?"sport":"work":e===18?"sport":e===19||e===20?"eat":e>=21&&e<=22?"read":e===23?"sleep":null,w=p=>{const e=[];for(let a=0;a<p;a++)for(let i=0;i<24;i++){const u=ot(a,i);if(!u){e.push({dayOffset:a,hour:i,color:"transparent"});continue}const y=nt[u],b=a===0?"Today":a===1?"Yesterday":`${a} days ago`;e.push({dayOffset:a,hour:i,color:y.color,emoji:y.emoji,label:u,dayLabel:b})}return e},T={args:{cells:w(30),days:30,centerTopLabel:"LAST",centerMainLabel:"30 DAYS",size:520}},L={args:{cells:w(7),days:7,centerTopLabel:"LAST",centerMainLabel:"7 DAYS",size:460}},M={args:{cells:w(30),days:30,accentColor:"#7c3aed",centerTopLabel:"PAST",centerMainLabel:"MONTH",size:520}};var k,P,C;T.parameters={...T.parameters,docs:{...(k=T.parameters)==null?void 0:k.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
cells: generateCells(30),
|
|
4
4
|
days: 30,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as le,j as Ne}from"./iframe-
|
|
1
|
+
import{r as le,j as Ne}from"./iframe-ClorXKAj.js";import{R as Ye,P as je,M as De}from"./Mesh-CwXV3WjE.js";import{T as Ge}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const Xe={"prism-container":"_prism-container_sjqpx_1"},ce=({height:T=3.5,baseWidth:z=5.5,animationType:h="rotate",glow:W=1,offset:s={x:0,y:0},noise:U=.5,transparent:E=!0,scale:N=3.6,hueShift:Y=0,colorFrequency:j=1,hoverStrength:D=2,inertia:G=.05,bloom:X=1,suspendWhenOffscreen:P=!1,timeScale:Z=.5})=>{const k=le.useRef(null);return le.useEffect(()=>{const r=k.current;if(!r)return;const b=Math.max(.001,T),H=Math.max(.001,z)*.5,fe=Math.max(0,W),Q=Math.max(0,U),me=(s==null?void 0:s.x)??0,de=(s==null?void 0:s.y)??0,ve=E?1.5:1,I=Math.max(.001,N),he=Y||0,pe=Math.max(0,j||1),xe=Math.max(0,X||1),we=1,Me=1,Se=1,R=Math.max(0,Z||1),$=Math.max(0,D||1),J=Math.max(0,Math.min(1,G||.12)),_=Math.min(2,window.devicePixelRatio||1),A=new Ye({dpr:_,alpha:E,antialias:!1}),a=A.gl;a.disable(a.DEPTH_TEST),a.disable(a.CULL_FACE),a.disable(a.BLEND),Object.assign(a.canvas.style,{position:"absolute",inset:"0",width:"100%",height:"100%",display:"block"}),r.appendChild(a.canvas);const ge=`
|
|
2
2
|
attribute vec2 position;
|
|
3
3
|
void main() {
|
|
4
4
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as n,j as te}from"./iframe-
|
|
1
|
+
import{r as n,j as te}from"./iframe-ClorXKAj.js";import{R as re,P as ae,M as ne}from"./Mesh-CwXV3WjE.js";import{T as oe}from"./Texture-BkQWYNP2.js";import{T as se}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const ue={"prismatic-burst-container":"_prismatic-burst-container_u2n5x_1"},ce=`#version 300 es
|
|
2
2
|
in vec2 position;
|
|
3
3
|
in vec2 uv;
|
|
4
4
|
out vec2 vUv;
|
package/storybook-static/assets/{ProfileCard.stories-l6W358Jg.js → ProfileCard.stories-nhGFawW1.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as ve,r as o,j as r}from"./iframe-
|
|
1
|
+
import{R as ve,r as o,j as r}from"./iframe-ClorXKAj.js";import"./preload-helper-C1FmrZbK.js";const he="_active_uxwt3_56",_e="_entering_uxwt3_84",xe="_avatar_uxwt3_252",n={"pc-behind":"_pc-behind_uxwt3_40",active:he,"pc-card":"_pc-card_uxwt3_33","pc-card-shell":"_pc-card-shell_uxwt3_84",entering:_e,"pc-inside":"_pc-inside_uxwt3_100","pc-shine":"_pc-shine_uxwt3_108","pc-glare":"_pc-glare_uxwt3_232","pc-avatar-content":"_pc-avatar-content_uxwt3_245",avatar:xe,"pc-user-info":"_pc-user-info_uxwt3_274","pc-user-details":"_pc-user-details_uxwt3_293","pc-mini-avatar":"_pc-mini-avatar_uxwt3_299","pc-user-text":"_pc-user-text_uxwt3_315","pc-handle":"_pc-handle_uxwt3_322","pc-status":"_pc-status_uxwt3_329","pc-contact-btn":"_pc-contact-btn_uxwt3_335","pc-content":"_pc-content_uxwt3_353","pc-details":"_pc-details_uxwt3_367"},ge="linear-gradient(145deg,#60496e8c 0%,#71C4FF44 100%)",L={INITIAL_DURATION:1200,INITIAL_X_OFFSET:70,INITIAL_Y_OFFSET:60,DEVICE_BETA_OFFSET:20,ENTER_TRANSITION_MS:180},$=(p,d=0,v=100)=>Math.min(Math.max(p,d),v),C=(p,d=3)=>parseFloat(p.toFixed(d)),z=(p,d,v,x,O)=>C(x+(O-x)*(p-d)/(v-d)),Z=({avatarUrl:p="<Placeholder for avatar URL>",iconUrl:d="<Placeholder for icon URL>",grainUrl:v="<Placeholder for grain URL>",innerGradient:x,behindGlowEnabled:O=!0,behindGlowColor:S,behindGlowSize:U,className:ee="",enableTilt:A=!0,enableMobileTilt:V=!1,mobileTiltSensitivity:q=5,miniAvatarUrl:te,name:y="Javi A. Torres",title:ne="Software Engineer",handle:ae="javicodes",status:re="Online",contactText:se="Contact",showUserInfo:ce=!0,onContactClick:F})=>{const M=o.useRef(null),m=o.useRef(null),g=o.useRef(null),h=o.useRef(null),s=o.useMemo(()=>{if(!A)return null;let e=null,t=!1,a=0,c=0,i=0,u=0,f=0;const E=.14,T=.6;let j=0;const H=(l,_)=>{const w=m.current,I=M.current;if(!w||!I)return;const J=w.clientWidth||1,oe=w.clientHeight||1,N=$(100/J*l),b=$(100/oe*_),ue=N-50,de=b-50,pe={"--pointer-x":`${N}%`,"--pointer-y":`${b}%`,"--background-x":`${z(N,0,100,35,65)}%`,"--background-y":`${z(b,0,100,35,65)}%`,"--pointer-from-center":`${$(Math.hypot(b-50,N-50)/50,0,1)}`,"--pointer-from-top":`${b/100}`,"--pointer-from-left":`${N/100}`,"--rotate-x":`${C(-(ue/5))}deg`,"--rotate-y":`${C(de/4)}deg`};for(const[fe,me]of Object.entries(pe))I.style.setProperty(fe,me)},W=l=>{if(!t)return;a===0&&(a=l);const _=(l-a)/1e3;a=l;const w=l<j?T:E,I=1-Math.exp(-_/w);c+=(u-c)*I,i+=(f-i)*I,H(c,i),Math.abs(u-c)>.05||Math.abs(f-i)>.05||document.hasFocus()?e=requestAnimationFrame(W):(t=!1,a=0,e&&(cancelAnimationFrame(e),e=null))},B=()=>{t||(t=!0,a=0,e=requestAnimationFrame(W))};return{setImmediate(l,_){c=l,i=_,H(c,i)},setTarget(l,_){u=l,f=_,B()},toCenter(){const l=m.current;l&&this.setTarget(l.clientWidth/2,l.clientHeight/2)},beginInitial(l){j=performance.now()+l,B()},getCurrent(){return{x:c,y:i,tx:u,ty:f}},cancel(){e&&cancelAnimationFrame(e),e=null,t=!1,a=0}}},[A]),P=(e,t)=>{const a=t.getBoundingClientRect();return{x:e.clientX-a.left,y:e.clientY-a.top}},D=o.useCallback(e=>{const t=m.current;if(!t||!s)return;const{x:a,y:c}=P(e,t);s.setTarget(a,c)},[s]),k=o.useCallback(e=>{const t=m.current;if(!t||!s)return;t.classList.add(n.active),t.classList.add(n.entering),g.current&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>{t.classList.remove(n.entering)},L.ENTER_TRANSITION_MS);const{x:a,y:c}=P(e,t);s.setTarget(a,c)},[s]),X=o.useCallback(()=>{const e=m.current;if(!e||!s)return;s.toCenter();const t=()=>{const{x:a,y:c,tx:i,ty:u}=s.getCurrent();Math.hypot(i-a,u-c)<.6?(e.classList.remove(n.active),h.current=null):h.current=requestAnimationFrame(t)};h.current&&cancelAnimationFrame(h.current),h.current=requestAnimationFrame(t)},[s]),Y=o.useCallback(e=>{const t=m.current;if(!t||!s)return;const{beta:a,gamma:c}=e;if(a==null||c==null)return;const i=t.clientWidth/2,u=t.clientHeight/2,f=$(i+c*q,0,t.clientWidth),E=$(u+(a-L.DEVICE_BETA_OFFSET)*q,0,t.clientHeight);s.setTarget(f,E)},[s,q]);o.useEffect(()=>{if(!A||!s)return;const e=m.current;if(!e)return;const t=D,a=k,c=X,i=Y;e.addEventListener("pointerenter",a),e.addEventListener("pointermove",t),e.addEventListener("pointerleave",c);const u=()=>{if(!V||location.protocol!=="https:")return;const T=window.DeviceMotionEvent;T&&typeof T.requestPermission=="function"?T.requestPermission().then(j=>{j==="granted"&&window.addEventListener("deviceorientation",i)}).catch(console.error):window.addEventListener("deviceorientation",i)};e.addEventListener("click",u);const f=(e.clientWidth||0)-L.INITIAL_X_OFFSET,E=L.INITIAL_Y_OFFSET;return s.setImmediate(f,E),s.toCenter(),s.beginInitial(L.INITIAL_DURATION),()=>{e.removeEventListener("pointerenter",a),e.removeEventListener("pointermove",t),e.removeEventListener("pointerleave",c),e.removeEventListener("click",u),window.removeEventListener("deviceorientation",i),g.current&&window.clearTimeout(g.current),h.current&&cancelAnimationFrame(h.current),s.cancel(),e.classList.remove(n.entering)}},[A,V,s,D,k,X,Y]);const le=o.useMemo(()=>({"--icon":d?`url(${d})`:"none","--grain":v?`url(${v})`:"none","--inner-gradient":x??ge,"--behind-glow-color":S??"rgba(125, 190, 255, 0.67)","--behind-glow-size":U??"50%"}),[d,v,x,S,U]),ie=o.useCallback(()=>{F==null||F()},[F]);return r.jsxs("div",{ref:M,className:`pc-card-wrapper ${ee}`.trim(),style:le,children:[O&&r.jsx("div",{className:`${n["pc-behind"]}`}),r.jsx("div",{ref:m,className:`${n["pc-card-shell"]}`,children:r.jsx("section",{className:`${n["pc-card"]}`,children:r.jsxs("div",{className:`${n["pc-inside"]}`,children:[r.jsx("div",{className:`${n["pc-shine"]}`}),r.jsx("div",{className:`${n["pc-glare"]}`}),r.jsxs("div",{className:`${n["pc-content"]} ${n["pc-avatar-content"]}`,children:[r.jsx("img",{className:`${n.avatar}`,src:p,alt:`${y||"User"} avatar`,loading:"lazy",onError:e=>{const t=e.target;t.style.display="none"}}),ce&&r.jsxs("div",{className:`${n["pc-user-info"]}`,children:[r.jsxs("div",{className:`${n["pc-user-details"]}`,children:[r.jsx("div",{className:`${n["pc-mini-avatar"]}`,children:r.jsx("img",{src:te||p,alt:`${y||"User"} mini avatar`,loading:"lazy",onError:e=>{const t=e.target;t.style.opacity="0.5",t.src=p}})}),r.jsxs("div",{className:`${n["pc-user-text"]}`,children:[r.jsxs("div",{className:`${n["pc-handle"]}`,children:["@",ae]}),r.jsx("div",{className:`${n["pc-status"]}`,children:re})]})]}),r.jsx("button",{className:`${n["pc-contact-btn"]}`,onClick:ie,style:{pointerEvents:"auto"},type:"button","aria-label":`Contact ${y||"user"}`,children:se})]})]}),r.jsx("div",{className:`${n["pc-content"]}`,children:r.jsxs("div",{className:`${n["pc-details"]}`,children:[r.jsx("h3",{children:y}),r.jsx("p",{children:ne})]})})]})})})]})},Ee=ve.memo(Z);Z.__docgenInfo={description:"",methods:[],displayName:"ProfileCardComponent",props:{avatarUrl:{defaultValue:{value:"'<Placeholder for avatar URL>'",computed:!1},required:!1},iconUrl:{defaultValue:{value:"'<Placeholder for icon URL>'",computed:!1},required:!1},grainUrl:{defaultValue:{value:"'<Placeholder for grain URL>'",computed:!1},required:!1},behindGlowEnabled:{defaultValue:{value:"true",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},enableTilt:{defaultValue:{value:"true",computed:!1},required:!1},enableMobileTilt:{defaultValue:{value:"false",computed:!1},required:!1},mobileTiltSensitivity:{defaultValue:{value:"5",computed:!1},required:!1},name:{defaultValue:{value:"'Javi A. Torres'",computed:!1},required:!1},title:{defaultValue:{value:"'Software Engineer'",computed:!1},required:!1},handle:{defaultValue:{value:"'javicodes'",computed:!1},required:!1},status:{defaultValue:{value:"'Online'",computed:!1},required:!1},contactText:{defaultValue:{value:"'Contact'",computed:!1},required:!1},showUserInfo:{defaultValue:{value:"true",computed:!1},required:!1}}};const Ie={title:"ReactBits/Components/ProfileCard",component:Ee,parameters:{layout:"fullscreen"}},R={args:{avatarUrl:"https://i.pravatar.cc/300?img=12",behindGlowEnabled:!0,enableTilt:!0,enableMobileTilt:!1,mobileTiltSensitivity:5,name:"Javi A. Torres",title:"Software Engineer",handle:"javicodes",status:"Online",contactText:"Contact",showUserInfo:!0}};var G,K,Q;R.parameters={...R.parameters,docs:{...(G=R.parameters)==null?void 0:G.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
avatarUrl: 'https://i.pravatar.cc/300?img=12',
|
|
4
4
|
behindGlowEnabled: true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as v,j as r}from"./iframe-
|
|
1
|
+
import{r as v,j as r}from"./iframe-ClorXKAj.js";import"./preload-helper-C1FmrZbK.js";const P="_container_1jujk_1",A="_grid_1jujk_6",F="_ring_1jujk_13",U="_svg_1jujk_22",I="_center_1jujk_26",S="_emoji_1jujk_38",W="_pct_1jujk_44",B="_over_1jujk_51",G="_label_1jujk_59",H="_amounts_1jujk_66",X="_budget_1jujk_72",Y="_empty_1jujk_76",J="_tooltip_1jujk_83",K="_visible_1jujk_99",Q="_tipLabel_1jujk_103",Z="_tipRow_1jujk_108",t={container:P,grid:A,ring:F,svg:U,center:I,emoji:S,pct:W,over:B,label:G,amounts:H,budget:X,empty:Y,tooltip:J,visible:K,tipLabel:Q,tipRow:Z},z=e=>e.toLocaleString(),ee=(e,l)=>`Over by ${l(e)}`,te=(e,l)=>`${l(e)} left`,O=({rings:e,formatValue:l=z,ringSize:s=120,stroke:b=12,emptyMessage:j="No data to display",overLabel:m=ee,underLabel:_=te})=>{const y=v.useRef(null),c=v.useRef(null),d=v.useCallback((n,f)=>{const a=c.current,g=y.current;if(!a||!g)return;const p=g.getBoundingClientRect();a.style.left=`${n.clientX-p.left+12}px`,a.style.top=`${n.clientY-p.top-10}px`,a.innerHTML=f,a.classList.add(t.visible)},[]),R=v.useCallback(()=>{var n;(n=c.current)==null||n.classList.remove(t.visible)},[]);if(e.length===0)return r.jsx("div",{className:t.empty,children:j});const u=(s-b)/2,i=2*Math.PI*u;return r.jsxs("div",{className:t.container,ref:y,children:[r.jsx("div",{className:t.grid,children:e.map((n,f)=>{const a=n.target>0?n.value/n.target:0,g=Math.min(1,a),p=i*(1-g),k=Math.round(a*100),o=a>1,C=o?"var(--color-error)":n.color||"var(--color-primary)";return r.jsx(ne,{label:n.label,emoji:n.emoji,ringSize:s,stroke:b,radius:u,circumference:i,finalOffset:p,ringColor:C,value:n.value,target:n.target,pct:k,over:o,formatValue:l,overLabel:m,underLabel:_,delay:f*80,onTip:d,onTipLeave:R},n.label)})}),r.jsx("div",{ref:c,className:t.tooltip})]})},ne=({label:e,emoji:l,ringSize:s,stroke:b,radius:j,circumference:m,finalOffset:_,ringColor:y,value:c,target:d,pct:R,over:u,formatValue:i,overLabel:n,underLabel:f,delay:a,onTip:g,onTipLeave:p})=>{const k=v.useRef(null);return v.useEffect(()=>{const o=k.current;o&&(o.style.transition="none",o.style.strokeDashoffset=`${m}`,o.getBoundingClientRect(),o.style.transition=`stroke-dashoffset 900ms cubic-bezier(0.22, 1, 0.36, 1) ${a}ms`,o.style.strokeDashoffset=`${_}`)},[m,_,a]),r.jsxs("div",{className:t.ring,onMouseMove:o=>g(o,`<div class="${t.tipLabel}">${l??""} ${e}</div><div class="${t.tipRow}">${i(c)} of ${i(d)}</div><div class="${t.tipRow}" style="color:${u?"var(--color-error)":"var(--color-success)"}">${u?n(c-d,i):f(d-c,i)}</div>`),onMouseLeave:p,children:[r.jsxs("svg",{width:s,height:s,className:t.svg,children:[r.jsx("circle",{cx:s/2,cy:s/2,r:j,fill:"none",stroke:"var(--color-border)",strokeWidth:b,strokeOpacity:"0.35"}),r.jsx("circle",{ref:k,cx:s/2,cy:s/2,r:j,fill:"none",stroke:y,strokeWidth:b,strokeLinecap:"round",strokeDasharray:m,strokeDashoffset:m,transform:`rotate(-90 ${s/2} ${s/2})`})]}),r.jsxs("div",{className:t.center,children:[l&&r.jsx("div",{className:t.emoji,children:l}),r.jsxs("div",{className:`${t.pct} ${u?t.over:""}`,children:[R,"%"]})]}),r.jsx("div",{className:t.label,children:e}),r.jsxs("div",{className:t.amounts,children:[r.jsx("span",{className:u?t.over:"",children:i(c)}),r.jsxs("span",{className:t.budget,children:[" / ",i(d)]})]})]})};O.__docgenInfo={description:"",methods:[],displayName:"ProgressRings",props:{rings:{required:!0,tsType:{name:"Array",elements:[{name:"ProgressRingItem"}],raw:"ProgressRingItem[]"},description:""},formatValue:{required:!1,tsType:{name:"signature",type:"function",raw:"(value: number) => string",signature:{arguments:[{type:{name:"number"},name:"value"}],return:{name:"string"}}},description:"",defaultValue:{value:"(n: number) => n.toLocaleString()",computed:!1}},ringSize:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"120",computed:!1}},stroke:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"12",computed:!1}},emptyMessage:{required:!1,tsType:{name:"string"},description:"",defaultValue:{value:"'No data to display'",computed:!1}},overLabel:{required:!1,tsType:{name:"signature",type:"function",raw:"(over: number, formatValue: (v: number) => string) => string",signature:{arguments:[{type:{name:"number"},name:"over"},{type:{name:"signature",type:"function",raw:"(v: number) => string",signature:{arguments:[{type:{name:"number"},name:"v"}],return:{name:"string"}}},name:"formatValue"}],return:{name:"string"}}},description:"",defaultValue:{value:"(over: number, fmt: (v: number) => string) => `Over by ${fmt(over)}`",computed:!1}},underLabel:{required:!1,tsType:{name:"signature",type:"function",raw:"(left: number, formatValue: (v: number) => string) => string",signature:{arguments:[{type:{name:"number"},name:"left"},{type:{name:"signature",type:"function",raw:"(v: number) => string",signature:{arguments:[{type:{name:"number"},name:"v"}],return:{name:"string"}}},name:"formatValue"}],return:{name:"string"}}},description:"",defaultValue:{value:"(left: number, fmt: (v: number) => string) => `${fmt(left)} left`",computed:!1}}}};const oe={title:"Organisms/Charts/ProgressRings",component:O,parameters:{layout:"centered"}},re=e=>`€${e.toLocaleString("en-US",{maximumFractionDigits:0})}`,h={args:{rings:[{label:"Groceries",emoji:"🥦",color:"#10b981",value:320,target:500},{label:"Rent",emoji:"🏠",color:"#6366f1",value:1200,target:1200},{label:"Eating out",emoji:"🍕",color:"#f59e0b",value:220,target:150},{label:"Transport",emoji:"🚇",color:"#06b6d4",value:60,target:200},{label:"Entertainment",emoji:"🎬",color:"#ec4899",value:95,target:120}],formatValue:re}},$={args:{rings:[{label:"Reading",emoji:"📚",color:"#8b5cf6",value:18,target:30},{label:"Workouts",emoji:"🏋️",color:"#10b981",value:12,target:12},{label:"Meditation",emoji:"🧘",color:"#06b6d4",value:5,target:20}],ringSize:96,stroke:10,formatValue:e=>`${e}`,underLabel:e=>`${e} to go`,overLabel:e=>`+${e} extra`}},x={args:{rings:[]}};var L,T,E;h.parameters={...h.parameters,docs:{...(L=h.parameters)==null?void 0:L.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
rings: [{
|
|
4
4
|
label: 'Groceries',
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import{r as d,j as r}from"./iframe-ClorXKAj.js";import{s as y,c as Mt,f as ae}from"./transform-DaumkFRH.js";import{t as ne,e as re,l as oe,m as se,p as wt}from"./monotone-Ca9yXB0X.js";import{l as ie}from"./linear-BTA54h8k.js";import{C as le}from"./chart-column-Bc8_bGZY.js";import{c as at}from"./createLucideIcon-B-jPBnP1.js";import{C as ce}from"./calendar-DtZXr8CJ.js";import{t as gt}from"./defaultLocale-DJ2q5QjE.js";import{a as de,b as ue}from"./axis-D3QohQNI.js";import{b as kt}from"./back-BxPoHLz2.js";import"./preload-helper-C1FmrZbK.js";import"./array-BKyUJesY.js";import"./path-CSVzDSO0.js";import"./value-CMZJhU-O.js";import"./descending-BO6OmMcj.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 pe=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],he=at("calendar-days",pe);/**
|
|
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 me=[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M17 14h-6",key:"bkmgh3"}],["path",{d:"M13 18H7",key:"bb0bb7"}],["path",{d:"M7 14h.01",key:"1qa3f1"}],["path",{d:"M17 18h.01",key:"1bdyru"}]],ge=at("calendar-range",me);/**
|
|
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 ye=[["circle",{cx:"12",cy:"6",r:"1",key:"1bh7o1"}],["line",{x1:"5",x2:"19",y1:"12",y2:"12",key:"13b5wn"}],["circle",{cx:"12",cy:"18",r:"1",key:"lqb9t5"}]],fe=at("divide",ye);/**
|
|
17
|
+
* @license lucide-react v0.539.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const ve=[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]],be=at("sigma",ve),xe="_container_frpma_1",_e="_controls_frpma_19",Me="_viewToggle_frpma_27",we="_viewButton_frpma_36",ke="_active_frpma_57",Se="_viewIcon_frpma_63",Te="_viewLabel_frpma_68",qe="_aggregationToggle_frpma_78",je="_aggregationButton_frpma_87",Ee="_aggregationIcon_frpma_114",Le="_aggregationLabel_frpma_119",Ce="_legend_frpma_129",De="_compactLegend_frpma_140",Ae="_legendItem_frpma_145",$e="_legendEmoji_frpma_150",Ne="_legendLabel_frpma_154",Ie="_inactive_frpma_178",Ve="_legendColor_frpma_188",Re="_chart_frpma_227",He="_gridLine_frpma_235",We="_line_frpma_241",Fe="_crosshair_frpma_248",Be="_halo_frpma_255",Oe="_overlay_frpma_260",ze="_xAxis_frpma_265",Ge="_yAxis_frpma_266",Pe="_dataPoint_frpma_285",Ye="_tooltip_frpma_289",Qe="_visible_frpma_310",Ue="_tooltipHeader_frpma_315",Xe="_tooltipEmoji_frpma_326",Ke="_tooltipDot_frpma_331",Je="_tooltipInfo_frpma_338",Ze="_tooltipDate_frpma_344",ta="_tooltipValue_frpma_350",e={container:xe,controls:_e,viewToggle:Me,viewButton:we,active:ke,viewIcon:Se,viewLabel:Te,aggregationToggle:qe,aggregationButton:je,aggregationIcon:Ee,aggregationLabel:Le,legend:Ce,compactLegend:De,legendItem:Ae,legendEmoji:$e,legendLabel:Ne,inactive:Ie,legendColor:Ve,chart:Re,gridLine:He,line:We,crosshair:Fe,halo:Be,overlay:Oe,xAxis:ze,yAxis:Ge,dataPoint:Pe,tooltip:Ye,visible:Qe,tooltipHeader:Ue,tooltipEmoji:Xe,tooltipDot:Ke,tooltipInfo:Je,tooltipDate:Ze,tooltipValue:ta},ea={Exercise:"#6BCB77",Meditation:"#4D96FF",Reading:"#FFB319",Water:"#00D9FF",Steps:"#FF6B6B",Sleep:"#9B59B6",Calories:"#FF9F1C",Study:"#C774E8"},St="http://www.w3.org/2000/svg",aa=(n,v,f=80)=>{const L=n&&n.length>0?n:"M0,0",M=v&&v.length>0?v:"M0,0",C=document.createElementNS(St,"path"),D=document.createElementNS(St,"path");C.setAttribute("d",L),D.setAttribute("d",M);const H=typeof C.getTotalLength=="function"?C.getTotalLength():0,Q=typeof D.getTotalLength=="function"?D.getTotalLength():0;if(H===0||Q===0)return()=>M;const A=[],w=[];for(let q=0;q<f;q++){const k=f===1?0:q/(f-1),h=C.getPointAtLength(k*H),i=D.getPointAtLength(k*Q);A.push([h.x,h.y]),w.push([i.x,i.y])}return q=>{let k="";for(let h=0;h<f;h++){const i=A[h][0]+(w[h][0]-A[h][0])*q,rt=A[h][1]+(w[h][1]-A[h][1])*q;k+=(h===0?"M":"L")+i+","+rt}return k}},Rt=({data:n,width:v=800,height:f=400,defaultViewType:L="daily",periodType:M="month",habitColors:C={},habitEmojis:D={},onDataPointClick:H,hideControls:Q=!1,compactLegend:A=!1})=>{const w=d.useRef(null),q=d.useRef(null),k=d.useRef(H),h=d.useRef(!1),[i,rt]=d.useState(L),[ot,yt]=d.useState([]),[z,ft]=d.useState(null),[S,st]=d.useState(null),[U,vt]=d.useState("average");d.useEffect(()=>{k.current=H},[H]);const $=d.useMemo(()=>({top:20,right:20,bottom:50,left:50}),[]),X=v-$.left-$.right,W=f-$.top-$.bottom,G=d.useMemo(()=>Object.keys(n).filter(a=>a!=="dates"),[n]);d.useEffect(()=>{yt(G)},[G]),d.useEffect(()=>{const a=()=>{st(null)};return window.addEventListener("scroll",a,!0),()=>{window.removeEventListener("scroll",a,!0)}},[]);const Ht=d.useMemo(()=>{switch(M){case"week":return["daily"];case"month":return["daily","weekly"];case"quarter":return["weekly","monthly"];case"year":return["daily","weekly","monthly","quarterly"];case"allTime":return["monthly","quarterly"];default:return["daily"]}},[M]),F=d.useCallback(a=>C[a]||ea[a]||`hsl(${Math.abs(a.split("").reduce((l,s)=>l+s.charCodeAt(0),0))%360}, 70%, 50%)`,[C]),b=d.useMemo(()=>{if(i==="daily"||!n.dates.length)return n;const a={dates:[]},l=new Map;return n.dates.forEach((s,_)=>{const j=new Date(s);let m;switch(i){case"weekly":{const c=new Date(j),g=c.getDay(),E=c.getDate()-g+(g===0?-6:1);c.setDate(E),m=c.toISOString().split("T")[0];break}case"monthly":m=`${j.getFullYear()}-${String(j.getMonth()+1).padStart(2,"0")}-01`;break;case"quarterly":{const g=(Math.floor(j.getMonth()/3)+1-1)*3;m=new Date(j.getFullYear(),g,1).toISOString().split("T")[0];break}default:m=s}l.has(m)||l.set(m,[]),l.get(m).push(_)}),a.dates=Array.from(l.keys()).sort(),G.forEach(s=>{a[s]=a.dates.map(_=>{const m=l.get(_).map(c=>n[s][c]).filter(c=>typeof c=="number"&&!isNaN(c));return m.length===0?0:Math.round(U==="sum"?m.reduce((c,g)=>c+g,0):m.reduce((c,g)=>c+g,0)/m.length)})}),a},[n,i,G,U]),Wt=a=>{yt(l=>l.includes(a)?l.filter(s=>s!==a):[...l,a])};d.useEffect(()=>{if(!w.current||b.dates.length===0)return;const a=y(w.current),l=!h.current;h.current=!0;let s=a.select("g.qhc-root");s.empty()&&(s=a.append("g").attr("class","qhc-root")),s.attr("transform",`translate(${$.left},${$.top})`);const _=t=>{let o=s.select(`g.${t}`);return o.empty()&&(o=s.append("g").attr("class",t)),o},j=_("qhc-grid"),m=_("qhc-lines"),c=_("qhc-points"),g=_("qhc-axes"),E=_("qhc-ui"),N=b.dates.map(t=>new Date(t)),it=ot.filter(t=>Array.isArray(b[t])),I=ne().domain(re(N)).range([0,X]),zt=Math.max(1,...it.flatMap(t=>b[t].filter(o=>typeof o=="number"))),V=ie().domain([0,zt*1.1]).range([W,0]),lt=oe().x(t=>I(t[0])).y(t=>V(t[1])).curve(se),ct=j.selectAll("line.qhc-grid-line").data(V.ticks(5),t=>String(t));ct.exit().remove(),ct.enter().append("line").attr("class",`${e.gridLine} qhc-grid-line`).style("opacity",0).merge(ct).attr("x1",0).attr("x2",X).attr("y1",t=>V(t)).attr("y2",t=>V(t)).transition().duration(400).style("opacity",1);const Gt=t=>{const o=new Date(t);o.setHours(0,0,0,0),o.setDate(o.getDate()+3-(o.getDay()+6)%7);const u=new Date(o.getFullYear(),0,4);return 1+Math.round(((o.getTime()-u.getTime())/864e5-3+(u.getDay()+6)%7)/7)},Pt=(()=>{switch(i){case"daily":return gt("%m-%d");case"weekly":return t=>`W${Gt(t).toString().padStart(2,"0")}`;case"monthly":return gt("%b");case"quarterly":return t=>`Q${Math.floor(t.getMonth()/3)+1}`;default:return gt("%m-%d")}})(),bt=(()=>{switch(i){case"daily":return Math.min(10,b.dates.length);case"weekly":return Math.min(12,b.dates.length);case"monthly":return Math.min(12,b.dates.length);case"quarterly":return b.dates.length;default:return}})(),dt=de(I).tickFormat(t=>Pt(t));i==="quarterly"?dt.tickValues(N):bt&&dt.ticks(bt);let P=g.select("g.qhc-x-axis");P.empty()&&(P=g.append("g").attr("class",`${e.xAxis} qhc-x-axis`)),P.attr("transform",`translate(0,${W})`).call(dt),P.selectAll("text").style("text-anchor",i==="daily"||i==="weekly"?"end":"middle").attr("dx",i==="daily"||i==="weekly"?"-.8em":"0").attr("dy",i==="daily"||i==="weekly"?".15em":".71em").attr("transform",i==="daily"||i==="weekly"?"rotate(-45)":null);let K=g.select("g.qhc-y-axis");K.empty()&&(K=g.append("g").attr("class",`${e.yAxis} qhc-y-axis`)),K.call(ue(V)),l&&(P.style("opacity",0).transition().duration(500).delay(80).style("opacity",1),K.style("opacity",0).transition().duration(500).delay(80).style("opacity",1));const Yt=it.map(t=>{const o=N.map((u,p)=>[u,b[t][p]]).filter(u=>typeof u[1]=="number");return{habit:t,color:F(t),points:o}}),ut=m.selectAll("path.qhc-line").data(Yt,t=>t.habit);ut.exit().transition("line-exit").duration(300).style("opacity",0).remove(),ut.enter().append("path").attr("class",`${e.line} qhc-line`).attr("data-habit",t=>t.habit).attr("fill","none").attr("stroke",t=>t.color).attr("opacity",0).attr("d",t=>lt(t.points)||"").each(function(){const t=this,o=typeof t.getTotalLength=="function"?t.getTotalLength():0;o>0&&y(t).attr("stroke-dasharray",`${o} ${o}`).attr("stroke-dashoffset",o)}).transition("line-enter").duration(900).ease(Mt).attr("opacity",1).attr("stroke-dashoffset",0).on("end",function(){y(this).attr("stroke-dasharray",null)}),ut.transition("line-update").duration(700).ease(ae).attr("stroke",t=>t.color).attrTween("d",function(t){const o=y(this).attr("d")||"",u=lt(t.points)||"";return aa(o,u,90)}).on("end",function(t){y(this).attr("d",lt(t.points)||"")}),c.selectAll("*").remove();const pt=[];it.forEach(t=>{const o=F(t);N.forEach((u,p)=>{const x=b[t][p];typeof x=="number"&&!isNaN(x)&&pt.push({habit:t,color:o,date:u,value:x})})});const xt=I(N[0]),Qt=I(N[N.length-1]),Ut=Math.max(1,Qt-xt),Xt=l?100:350,Kt=l?1100:600;c.selectAll("circle.qhc-point").data(pt).enter().append("circle").attr("class",`${e.dataPoint} qhc-point`).attr("data-habit",t=>t.habit).attr("cx",t=>I(t.date)).attr("cy",W).attr("r",0).attr("fill",t=>t.color).style("opacity",0).transition("point-enter").delay(t=>Xt+Kt*((I(t.date)-xt)/Ut)).duration(420).ease(kt.overshoot(2)).attr("cy",t=>V(t.value)).attr("r",4).style("opacity",1),E.selectAll("*").remove();const _t=E.append("line").attr("class",e.crosshair).attr("y1",0).attr("y2",W).style("opacity",0).style("pointer-events","none"),ht=E.append("circle").attr("class",e.halo).attr("r",0).style("opacity",0).style("pointer-events","none");let mt=null;const Jt=(t,o,u)=>{ht.interrupt("halo-pulse").interrupt("halo-out").attr("cx",t).attr("cy",o).attr("fill",u);const p=()=>{ht.attr("r",4).style("opacity",.55).transition("halo-pulse").duration(900).ease(Mt).attr("r",18).style("opacity",0).on("end",p)};p()},Zt=()=>{ht.interrupt("halo-pulse").transition("halo-out").duration(180).style("opacity",0).attr("r",0)},B=pt.map(t=>({habit:t.habit,date:t.date,value:t.value,x:I(t.date),y:V(t.value)})),te=(t,o,u)=>{const p=`${t.habit}|${t.date.toISOString()}`,x=F(t.habit);_t.attr("x1",t.x).attr("x2",t.x).interrupt("crosshair-fade").transition("crosshair-fade").duration(120).style("opacity",1),mt!==p&&(c.selectAll("circle.qhc-point").filter(function(){return y(this).attr("data-active")==="true"}).attr("data-active",null).transition("point-scale").duration(150).attr("r",4),c.selectAll("circle.qhc-point").filter(function(){const T=+y(this).attr("cx"),R=+y(this).attr("cy");return y(this).attr("data-habit")===t.habit&&Math.abs(T-t.x)<.5&&Math.abs(R-t.y)<.5}).attr("data-active","true").transition("point-scale").duration(180).ease(kt.overshoot(2)).attr("r",7),Jt(t.x,t.y,x),mt=p),st({habit:t.habit,date:t.date.toISOString().split("T")[0],value:t.value,x:o,y:u})},ee=()=>{_t.interrupt("crosshair-fade").transition("crosshair-fade").duration(180).style("opacity",0),c.selectAll("circle.qhc-point").filter(function(){return y(this).attr("data-active")==="true"}).attr("data-active",null).transition("point-scale").duration(180).attr("r",4),Zt(),mt=null,st(null)};E.append("rect").attr("class",e.overlay).attr("width",X).attr("height",W).on("mousemove",function(t){if(B.length===0)return;const[o,u]=wt(t,this);let p=B[0],x=1/0;for(const T of B){const R=T.x-o,O=T.y-u,Y=R*R+O*O;Y<x&&(x=Y,p=T)}te(p,t.clientX,t.clientY)}).on("mouseleave",()=>{ee()}).on("click",function(t){if(B.length===0||!k.current)return;const[o,u]=wt(t,this);let p=B[0],x=1/0;for(const T of B){const R=T.x-o,O=T.y-u,Y=R*R+O*O;Y<x&&(x=Y,p=T)}k.current(p.habit,p.date.toISOString().split("T")[0],p.value)}),E.raise()},[b,ot,X,W,$,F,i,v,f]),d.useEffect(()=>{if(!w.current)return;const a=y(w.current);a.selectAll("path.qhc-line").each(function(){const l=this.getAttribute("data-habit"),s=z&&z!==l;y(this).transition("hover-dim").duration(180).attr("opacity",s?.25:1)}),a.selectAll("circle.qhc-point").each(function(){const l=this.getAttribute("data-habit"),s=z&&z!==l;y(this).transition("hover-dim").duration(180).attr("opacity",s?.25:1)})},[z]);const Ft=(a,l)=>{const s=new Date(a);switch(l){case"daily":return s.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});case"weekly":return`Week of ${s.toLocaleDateString("en-US",{month:"short",day:"numeric"})}`;case"monthly":return s.toLocaleDateString("en-US",{month:"long",year:"numeric"});case"quarterly":return`Q${Math.floor(s.getMonth()/3)+1} ${s.getFullYear()}`;default:return a}},Bt={daily:{Icon:ce,label:"Daily"},weekly:{Icon:he,label:"Weekly"},monthly:{Icon:ge,label:"Monthly"},quarterly:{Icon:le,label:"Quarterly"}},Ot=i!=="daily";return r.jsxs("div",{className:e.container,children:[!Q&&r.jsxs("div",{className:e.controls,children:[r.jsx("div",{className:e.viewToggle,children:Ht.map(a=>{const{Icon:l,label:s}=Bt[a];return r.jsxs("button",{className:`${e.viewButton} ${i===a?e.active:""}`,onClick:()=>rt(a),title:s,children:[r.jsx("span",{className:e.viewIcon,children:r.jsx(l,{size:16})}),r.jsx("span",{className:e.viewLabel,children:s})]},a)})}),Ot&&r.jsxs("div",{className:e.aggregationToggle,children:[r.jsxs("button",{className:`${e.aggregationButton} ${U==="average"?e.active:""}`,onClick:()=>vt("average"),title:"Show average values for each period",children:[r.jsx("span",{className:e.aggregationIcon,children:r.jsx(fe,{size:16})}),r.jsx("span",{className:e.aggregationLabel,children:"Average"})]}),r.jsxs("button",{className:`${e.aggregationButton} ${U==="sum"?e.active:""}`,onClick:()=>vt("sum"),title:"Show total values for each period",children:[r.jsx("span",{className:e.aggregationIcon,children:r.jsx(be,{size:16})}),r.jsx("span",{className:e.aggregationLabel,children:"Sum"})]})]})]}),r.jsx("div",{className:`${e.legend}${A?` ${e.compactLegend}`:""}`,children:G.map(a=>r.jsxs("button",{className:`${e.legendItem} ${ot.includes(a)?"":e.inactive}`,onClick:()=>Wt(a),onMouseEnter:()=>ft(a),onMouseLeave:()=>ft(null),children:[r.jsx("span",{className:e.legendEmoji,children:D[a]||"📊"}),r.jsx("span",{className:e.legendColor,style:{backgroundColor:F(a)}}),r.jsx("span",{className:e.legendLabel,children:a})]},a))}),r.jsx("svg",{ref:w,viewBox:`0 0 ${v} ${f}`,preserveAspectRatio:"xMidYMid meet",className:e.chart}),S&&r.jsxs("div",{ref:q,className:`${e.tooltip} ${S?e.visible:""}`,style:{left:`${S.x}px`,top:`${S.y-80}px`},children:[r.jsxs("div",{className:e.tooltipHeader,children:[r.jsx("span",{className:e.tooltipEmoji,children:D[S.habit]||"📊"}),r.jsx("span",{className:e.tooltipDot,style:{backgroundColor:F(S.habit)}}),r.jsx("span",{children:S.habit})]}),r.jsxs("div",{className:e.tooltipInfo,children:[r.jsx("div",{className:e.tooltipDate,children:Ft(S.date,i)}),r.jsxs("div",{className:e.tooltipValue,children:[r.jsx("strong",{children:Math.round(S.value*10)/10}),r.jsx("span",{style:{fontSize:"12px",fontWeight:"normal",opacity:.6},children:"units"})]})]})]})]})};Rt.__docgenInfo={description:"",methods:[],displayName:"QuantifiableHabitsChart",props:{data:{required:!0,tsType:{name:"ChartData"},description:""},width:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"800",computed:!1}},height:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}},defaultViewType:{required:!1,tsType:{name:"union",raw:"'daily' | 'weekly' | 'monthly' | 'quarterly'",elements:[{name:"literal",value:"'daily'"},{name:"literal",value:"'weekly'"},{name:"literal",value:"'monthly'"},{name:"literal",value:"'quarterly'"}]},description:"",defaultValue:{value:"'daily'",computed:!1}},periodType:{required:!1,tsType:{name:"union",raw:"'week' | 'month' | 'quarter' | 'year' | 'allTime'",elements:[{name:"literal",value:"'week'"},{name:"literal",value:"'month'"},{name:"literal",value:"'quarter'"},{name:"literal",value:"'year'"},{name:"literal",value:"'allTime'"}]},description:"",defaultValue:{value:"'month'",computed:!1}},habitColors:{required:!1,tsType:{name:"signature",type:"object",raw:"{ [key: string]: string }",signature:{properties:[{key:{name:"string"},value:{name:"string",required:!0}}]}},description:"",defaultValue:{value:"{}",computed:!1}},habitEmojis:{required:!1,tsType:{name:"signature",type:"object",raw:"{ [key: string]: string }",signature:{properties:[{key:{name:"string"},value:{name:"string",required:!0}}]}},description:"",defaultValue:{value:"{}",computed:!1}},onDataPointClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(habit: string, date: string, value: number) => void",signature:{arguments:[{type:{name:"string"},name:"habit"},{type:{name:"string"},name:"date"},{type:{name:"number"},name:"value"}],return:{name:"void"}}},description:""},hideControls:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},compactLegend:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}}}};const xa={title:"Organisms/Charts/QuantifiableHabitsChart",component:Rt,parameters:{layout:"centered"},argTypes:{width:{control:{type:"number",min:400,max:1200,step:50}},height:{control:{type:"number",min:200,max:600,step:50}},defaultViewType:{control:{type:"select"},options:["daily","weekly","monthly","quarterly"]},periodType:{control:{type:"select"},options:["week","month","quarter","year","allTime"]}}},nt=n=>{const v=[],f=new Date;for(let L=n-1;L>=0;L--){const M=new Date(f);M.setDate(M.getDate()-L),v.push(M.toISOString().split("T")[0])}return v},J={args:{data:(()=>{const n=nt(30);return{dates:n,Exercise:n.map(()=>Math.floor(Math.random()*60)+20),Reading:n.map(()=>Math.floor(Math.random()*120)+30),Water:n.map(()=>Math.floor(Math.random()*8)+2),Steps:n.map(()=>Math.floor(Math.random()*15e3)+5e3)}})(),width:900,height:400,defaultViewType:"daily",periodType:"month",habitColors:{Exercise:"#10b981",Reading:"#8b5cf6",Water:"#3b82f6",Steps:"#f59e0b"},habitEmojis:{Exercise:"🏃",Reading:"📚",Water:"💧",Steps:"👟"}}},Z={args:{data:(()=>{const n=nt(90);return{dates:n,Meditation:n.map(()=>Math.floor(Math.random()*30)+10),Study:n.map(()=>Math.floor(Math.random()*180)+60),Sleep:n.map(()=>Math.floor(Math.random()*3)+6)}})(),width:900,height:400,defaultViewType:"weekly",periodType:"quarter",habitColors:{Meditation:"#a78bfa",Study:"#34d399",Sleep:"#60a5fa"},habitEmojis:{Meditation:"🧘",Study:"📖",Sleep:"😴"}}},tt={args:{data:(()=>{const n=nt(365);return{dates:n,Coding:n.map(()=>Math.floor(Math.random()*240)+120),Exercise:n.map(()=>Math.floor(Math.random()*90)+30),Learning:n.map(()=>Math.floor(Math.random()*120)+60),Socializing:n.map(()=>Math.floor(Math.random()*180)+60)}})(),width:1e3,height:450,defaultViewType:"monthly",periodType:"year",habitColors:{Coding:"#7c3aed",Exercise:"#10b981",Learning:"#f59e0b",Socializing:"#ec4899"},habitEmojis:{Coding:"💻",Exercise:"💪",Learning:"🎓",Socializing:"👥"}}},et={args:{data:(()=>{const n=nt(30);return{dates:n,Weight:n.map((v,f)=>70+Math.sin(f/5)*2+Math.random())}})(),width:800,height:300,defaultViewType:"daily",periodType:"month",habitColors:{Weight:"#3b82f6"},habitEmojis:{Weight:"⚖️"}}};var Tt,qt,jt;J.parameters={...J.parameters,docs:{...(Tt=J.parameters)==null?void 0:Tt.docs,source:{originalSource:`{
|
|
22
|
+
args: {
|
|
23
|
+
data: (() => {
|
|
24
|
+
const dates = generateDateRange(30);
|
|
25
|
+
return {
|
|
26
|
+
dates,
|
|
27
|
+
Exercise: dates.map(() => Math.floor(Math.random() * 60) + 20),
|
|
28
|
+
Reading: dates.map(() => Math.floor(Math.random() * 120) + 30),
|
|
29
|
+
Water: dates.map(() => Math.floor(Math.random() * 8) + 2),
|
|
30
|
+
Steps: dates.map(() => Math.floor(Math.random() * 15000) + 5000)
|
|
31
|
+
};
|
|
32
|
+
})(),
|
|
33
|
+
width: 900,
|
|
34
|
+
height: 400,
|
|
35
|
+
defaultViewType: 'daily',
|
|
36
|
+
periodType: 'month',
|
|
37
|
+
habitColors: {
|
|
38
|
+
Exercise: '#10b981',
|
|
39
|
+
Reading: '#8b5cf6',
|
|
40
|
+
Water: '#3b82f6',
|
|
41
|
+
Steps: '#f59e0b'
|
|
42
|
+
},
|
|
43
|
+
habitEmojis: {
|
|
44
|
+
Exercise: '🏃',
|
|
45
|
+
Reading: '📚',
|
|
46
|
+
Water: '💧',
|
|
47
|
+
Steps: '👟'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}`,...(jt=(qt=J.parameters)==null?void 0:qt.docs)==null?void 0:jt.source}}};var Et,Lt,Ct;Z.parameters={...Z.parameters,docs:{...(Et=Z.parameters)==null?void 0:Et.docs,source:{originalSource:`{
|
|
51
|
+
args: {
|
|
52
|
+
data: (() => {
|
|
53
|
+
const dates = generateDateRange(90);
|
|
54
|
+
return {
|
|
55
|
+
dates,
|
|
56
|
+
Meditation: dates.map(() => Math.floor(Math.random() * 30) + 10),
|
|
57
|
+
Study: dates.map(() => Math.floor(Math.random() * 180) + 60),
|
|
58
|
+
Sleep: dates.map(() => Math.floor(Math.random() * 3) + 6)
|
|
59
|
+
};
|
|
60
|
+
})(),
|
|
61
|
+
width: 900,
|
|
62
|
+
height: 400,
|
|
63
|
+
defaultViewType: 'weekly',
|
|
64
|
+
periodType: 'quarter',
|
|
65
|
+
habitColors: {
|
|
66
|
+
Meditation: '#a78bfa',
|
|
67
|
+
Study: '#34d399',
|
|
68
|
+
Sleep: '#60a5fa'
|
|
69
|
+
},
|
|
70
|
+
habitEmojis: {
|
|
71
|
+
Meditation: '🧘',
|
|
72
|
+
Study: '📖',
|
|
73
|
+
Sleep: '😴'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}`,...(Ct=(Lt=Z.parameters)==null?void 0:Lt.docs)==null?void 0:Ct.source}}};var Dt,At,$t;tt.parameters={...tt.parameters,docs:{...(Dt=tt.parameters)==null?void 0:Dt.docs,source:{originalSource:`{
|
|
77
|
+
args: {
|
|
78
|
+
data: (() => {
|
|
79
|
+
const dates = generateDateRange(365);
|
|
80
|
+
return {
|
|
81
|
+
dates,
|
|
82
|
+
Coding: dates.map(() => Math.floor(Math.random() * 240) + 120),
|
|
83
|
+
Exercise: dates.map(() => Math.floor(Math.random() * 90) + 30),
|
|
84
|
+
Learning: dates.map(() => Math.floor(Math.random() * 120) + 60),
|
|
85
|
+
Socializing: dates.map(() => Math.floor(Math.random() * 180) + 60)
|
|
86
|
+
};
|
|
87
|
+
})(),
|
|
88
|
+
width: 1000,
|
|
89
|
+
height: 450,
|
|
90
|
+
defaultViewType: 'monthly',
|
|
91
|
+
periodType: 'year',
|
|
92
|
+
habitColors: {
|
|
93
|
+
Coding: '#7c3aed',
|
|
94
|
+
Exercise: '#10b981',
|
|
95
|
+
Learning: '#f59e0b',
|
|
96
|
+
Socializing: '#ec4899'
|
|
97
|
+
},
|
|
98
|
+
habitEmojis: {
|
|
99
|
+
Coding: '💻',
|
|
100
|
+
Exercise: '💪',
|
|
101
|
+
Learning: '🎓',
|
|
102
|
+
Socializing: '👥'
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}`,...($t=(At=tt.parameters)==null?void 0:At.docs)==null?void 0:$t.source}}};var Nt,It,Vt;et.parameters={...et.parameters,docs:{...(Nt=et.parameters)==null?void 0:Nt.docs,source:{originalSource:`{
|
|
106
|
+
args: {
|
|
107
|
+
data: (() => {
|
|
108
|
+
const dates = generateDateRange(30);
|
|
109
|
+
return {
|
|
110
|
+
dates,
|
|
111
|
+
Weight: dates.map((_, i) => 70 + Math.sin(i / 5) * 2 + Math.random())
|
|
112
|
+
};
|
|
113
|
+
})(),
|
|
114
|
+
width: 800,
|
|
115
|
+
height: 300,
|
|
116
|
+
defaultViewType: 'daily',
|
|
117
|
+
periodType: 'month',
|
|
118
|
+
habitColors: {
|
|
119
|
+
Weight: '#3b82f6'
|
|
120
|
+
},
|
|
121
|
+
habitEmojis: {
|
|
122
|
+
Weight: '⚖️'
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}`,...(Vt=(It=et.parameters)==null?void 0:It.docs)==null?void 0:Vt.source}}};const _a=["DailyHabits","WeeklyAverages","YearlyOverview","SingleHabit"];export{J as DailyHabits,et as SingleHabit,Z as WeeklyAverages,tt as YearlyOverview,_a as __namedExportsOrder,xa as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as y,j as W}from"./iframe-
|
|
1
|
+
import{r as y,j as W}from"./iframe-ClorXKAj.js";import{R as D,P as G,M as U}from"./Mesh-CwXV3WjE.js";import{T as z}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const j={"radar-container":"_radar-container_51ksp_1"};function L(n){const o=n.replace("#","");return[parseInt(o.slice(0,2),16)/255,parseInt(o.slice(2,4),16)/255,parseInt(o.slice(4,6),16)/255]}const N=`
|
|
2
2
|
attribute vec2 uv;
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
varying vec2 vUv;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,j as k}from"./iframe-
|
|
1
|
+
import{r as u,j as k}from"./iframe-ClorXKAj.js";import{s as it,c as ct}from"./transform-DaumkFRH.js";import{a as lt}from"./arc--Q2xWRUA.js";import{i as dt}from"./value-CMZJhU-O.js";import"./preload-helper-C1FmrZbK.js";import"./path-CSVzDSO0.js";const ut="_container_7142v_1",pt="_clockWrap_7142v_10",mt="_tooltip_7142v_16",yt="_visible_7142v_32",ft="_tooltipLabel_7142v_36",ht="_tooltipRow_7142v_41",p={container:ut,clockWrap:pt,tooltip:mt,visible:yt,tooltipLabel:ft,tooltipRow:ht},G=t=>{const a=Math.floor(t),b=Math.floor((t-a)*60);return`${String(a).padStart(2,"0")}:${String(b).padStart(2,"0")}`},gt=t=>{const a=Math.round(t*60);return a<60?`${a}m`:`${Math.floor(a/60)}h ${a%60}m`},et=({rings:t,showNowHand:a=!0,centerTopLabel:b,centerMainLabel:w,size:_,minSize:N=280,maxSize:O=560})=>{const S=u.useRef(null),j=u.useRef(null),z=u.useRef(null),[ot,at]=u.useState(380),x=_??ot;u.useEffect(()=>{if(_)return;const n=S.current;if(!n)return;const f=new ResizeObserver(c=>{for(const H of c){const{width:h}=H.contentRect;h>0&&at(Math.max(N,Math.min(O,h)))}});return f.observe(n),()=>f.disconnect()},[_,N,O]);const q=u.useCallback((n,f)=>{const c=z.current,H=S.current;if(!c||!H)return;const h=H.getBoundingClientRect();c.style.left=`${n.clientX-h.left+12}px`,c.style.top=`${n.clientY-h.top-10}px`,c.innerHTML=f,c.classList.add(p.visible)},[]),W=u.useCallback(()=>{var n;(n=z.current)==null||n.classList.remove(p.visible)},[]);return u.useEffect(()=>{if(!j.current||t.length===0)return;const n=it(j.current);n.selectAll("*").remove();const f=x,c=x,H=f/2,h=c/2,g=x/2-28,l=n.attr("width",f).attr("height",c).append("g").attr("transform",`translate(${H},${h})`),A=getComputedStyle(document.documentElement),st=A.getPropertyValue("--color-text-secondary").trim()||"#888",P=A.getPropertyValue("--color-text-muted").trim()||"#aaa",D=A.getPropertyValue("--color-border").trim()||"rgba(128,128,128,0.2)",R=r=>r/24*Math.PI*2;l.append("circle").attr("r",g+8).attr("fill","none").attr("stroke",D).attr("stroke-width",1);const V=46,Y=2,C=t.length,B=(g-V-Y*(C-1))/C;t.forEach((r,o)=>{const s=g-o*(B+Y),d=s-B,M=r.opacity!==void 0?r.opacity:o===0?1:Math.max(.1,.85-o/C*.85),v=lt().innerRadius(d).outerRadius(s).startAngle(e=>R(e.startHour)).endAngle(e=>R(e.endHour)).cornerRadius(2);l.selectAll(`.ring-${o}`).data(r.arcs).join("path").attr("class",`ring-${o}`).attr("fill",e=>e.color).attr("opacity",0).attr("stroke","var(--color-background)").attr("stroke-width",.6).style("cursor","pointer").on("mousemove",function(e,i){const E=gt(i.endHour-i.startHour),nt=`${i.emoji??""} ${i.label??""}${i.description?` — ${i.description}`:""}`.trim();q(e,`<div class="${p.tooltipLabel}">${nt||"·"}</div><div class="${p.tooltipRow}">${r.dayLabel} · ${G(i.startHour)} → ${G(i.endHour)}</div><div class="${p.tooltipRow}">${E}${i.isActive?" · running":""}</div>`)}).on("mouseleave",W).attr("d",e=>v({...e,endHour:e.startHour})).transition().delay(e=>e.startHour/24*600+o*80).duration(550).ease(ct).attr("opacity",M).attrTween("d",function(e){const i=dt(e.startHour,e.endHour);return E=>v({...e,endHour:i(E)})||""})});for(let r=0;r<24;r++){const o=R(r)-Math.PI/2,s=r%3===0,d=g+2,M=g+(s?9:5);if(l.append("line").attr("x1",Math.cos(o)*d).attr("y1",Math.sin(o)*d).attr("x2",Math.cos(o)*M).attr("y2",Math.sin(o)*M).attr("stroke",s?st:D).attr("stroke-width",s?2:1),s){const v=g+22;l.append("text").attr("x",Math.cos(o)*v).attr("y",Math.sin(o)*v).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("fill",P).attr("font-size","11px").attr("font-weight",600).text(String(r).padStart(2,"0"))}}if(l.append("circle").attr("r",V-2).attr("fill","var(--color-background-secondary)").attr("stroke",D).attr("stroke-width",1),b&&l.append("text").attr("text-anchor","middle").attr("y",w?-6:4).attr("fill",P).attr("font-size","10px").attr("letter-spacing","1.5px").text(b),w&&l.append("text").attr("text-anchor","middle").attr("y",b?14:4).attr("fill","var(--color-text)").attr("font-size","18px").attr("font-weight",700).text(w),a){const r=new Date,o=r.getHours()+r.getMinutes()/60,s=R(o)-Math.PI/2,d=g+6;l.append("line").attr("x1",0).attr("y1",0).attr("x2",Math.cos(s)*d).attr("y2",Math.sin(s)*d).attr("stroke","var(--color-error)").attr("stroke-width",2.5).attr("stroke-linecap","round").style("opacity",0).transition().delay(800).duration(300).style("opacity",1),l.append("circle").attr("cx",Math.cos(s)*d).attr("cy",Math.sin(s)*d).attr("r",4).attr("fill","var(--color-error)").style("opacity",0).transition().delay(800).duration(300).style("opacity",1),l.append("circle").attr("r",5).attr("fill","var(--color-error)").attr("stroke","var(--color-background)").attr("stroke-width",1.5).style("opacity",0).transition().delay(800).duration(300).style("opacity",1)}},[x,t,b,w,a,q,W]),k.jsxs("div",{className:p.container,ref:S,children:[k.jsx("div",{className:p.clockWrap,children:k.jsx("svg",{ref:j})}),k.jsx("div",{ref:z,className:p.tooltip})]})};et.__docgenInfo={description:"",methods:[],displayName:"RadialDayChart",props:{rings:{required:!0,tsType:{name:"Array",elements:[{name:"RadialRing"}],raw:"RadialRing[]"},description:'Index 0 is the outermost ring (typically "today")'},showNowHand:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},centerTopLabel:{required:!1,tsType:{name:"string"},description:""},centerMainLabel:{required:!1,tsType:{name:"string"},description:""},size:{required:!1,tsType:{name:"number"},description:"Override the size; otherwise the chart fills its container up to maxSize"},minSize:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"280",computed:!1}},maxSize:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"560",computed:!1}}}};const kt={title:"Organisms/Charts/RadialDayChart",component:et,parameters:{layout:"centered"}},m={work:"#6366f1",sleep:"#1e293b",eat:"#f59e0b",sport:"#10b981",read:"#8b5cf6"},y=[{startHour:0,endHour:7.5,color:m.sleep,label:"Sleep",emoji:"😴"},{startHour:7.5,endHour:8,color:m.eat,label:"Breakfast",emoji:"🥐"},{startHour:9,endHour:12.5,color:m.work,label:"Deep work",emoji:"💼"},{startHour:13,endHour:13.75,color:m.eat,label:"Lunch",emoji:"🍝"},{startHour:14,endHour:17,color:m.work,label:"Meetings",emoji:"💼"},{startHour:18,endHour:19,color:m.sport,label:"Run",emoji:"🏃"},{startHour:19.5,endHour:20.5,color:m.eat,label:"Dinner",emoji:"🍣"},{startHour:21,endHour:23,color:m.read,label:"Reading",emoji:"📚"}],rt=[{dayLabel:"Today",arcs:y},{dayLabel:"Yesterday",arcs:y.map(t=>({...t,startHour:t.startHour-.4,endHour:t.endHour-.2}))},{dayLabel:"2 days ago",arcs:y.map(t=>({...t,startHour:t.startHour+.5,endHour:t.endHour+.3}))},{dayLabel:"3 days ago",arcs:y.slice(0,4)},{dayLabel:"4 days ago",arcs:y.slice(2)},{dayLabel:"5 days ago",arcs:y.filter((t,a)=>a%2===0)},{dayLabel:"6 days ago",arcs:y.slice(0,6)}],L={args:{rings:rt,centerTopLabel:"TODAY",centerMainLabel:"11h 30m",size:460}},T={args:{rings:[{dayLabel:"Today",arcs:y}],centerTopLabel:"TODAY",centerMainLabel:"11h 30m",size:380}},$={args:{rings:rt,showNowHand:!1,centerTopLabel:"WEEK",centerMainLabel:"78h",size:460}};var K,I,X;L.parameters={...L.parameters,docs:{...(K=L.parameters)==null?void 0:K.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
rings,
|
|
4
4
|
centerTopLabel: 'TODAY',
|