@stfrigerio/sito-template 0.1.99 → 0.1.101
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/charts/BooleansHeatmap/BooleansHeatmap.d.ts.map +1 -1
- package/dist/components/organisms/charts/ChordDiagram/ChordDiagram.d.ts +20 -0
- package/dist/components/organisms/charts/ChordDiagram/ChordDiagram.d.ts.map +1 -0
- package/dist/components/organisms/charts/ChordDiagram/ChordDiagram.stories.d.ts +9 -0
- package/dist/components/organisms/charts/ChordDiagram/ChordDiagram.stories.d.ts.map +1 -0
- package/dist/components/organisms/charts/HabitTimeOfDayChart/HabitTimeOfDayChart.d.ts.map +1 -1
- package/dist/components/organisms/charts/PieChart/PieChart.d.ts.map +1 -1
- package/dist/components/organisms/charts/PolarHeatmap/PolarHeatmap.d.ts +30 -0
- package/dist/components/organisms/charts/PolarHeatmap/PolarHeatmap.d.ts.map +1 -0
- package/dist/components/organisms/charts/PolarHeatmap/PolarHeatmap.stories.d.ts +9 -0
- package/dist/components/organisms/charts/PolarHeatmap/PolarHeatmap.stories.d.ts.map +1 -0
- package/dist/components/organisms/charts/ProgressRings/ProgressRings.d.ts +20 -0
- package/dist/components/organisms/charts/ProgressRings/ProgressRings.d.ts.map +1 -0
- package/dist/components/organisms/charts/ProgressRings/ProgressRings.stories.d.ts +9 -0
- package/dist/components/organisms/charts/ProgressRings/ProgressRings.stories.d.ts.map +1 -0
- package/dist/components/organisms/charts/QuantifiableHabitsChart/QuantifiableHabitsChart.d.ts.map +1 -1
- package/dist/components/organisms/charts/RadialDayChart/RadialDayChart.d.ts +30 -0
- package/dist/components/organisms/charts/RadialDayChart/RadialDayChart.d.ts.map +1 -0
- package/dist/components/organisms/charts/RadialDayChart/RadialDayChart.stories.d.ts +9 -0
- package/dist/components/organisms/charts/RadialDayChart/RadialDayChart.stories.d.ts.map +1 -0
- package/dist/components/organisms/charts/SleepChart/SleepChart.d.ts.map +1 -1
- package/dist/components/organisms/charts/SunburstChart/SunburstChart.d.ts.map +1 -1
- package/dist/components/organisms/charts/index.d.ts +7 -0
- package/dist/components/organisms/charts/index.d.ts.map +1 -1
- package/dist/components/organisms/index.d.ts +7 -0
- package/dist/components/organisms/index.d.ts.map +1 -1
- package/dist/index.esm.js +969 -305
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +975 -307
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/storybook-static/assets/{ASCIIText.stories-DSI7g-mB.js → ASCIIText.stories-tIaR8-30.js} +1 -1
- package/storybook-static/assets/{AllAtoms.stories-JflUIS5e.js → AllAtoms.stories-wjImSAbw.js} +1 -1
- package/storybook-static/assets/{AnimatedContent.stories-YR7SgIxb.js → AnimatedContent.stories-2qC-fkJI.js} +1 -1
- package/storybook-static/assets/{AnimatedList.stories-GR75O93H.js → AnimatedList.stories-CylIt0ba.js} +1 -1
- package/storybook-static/assets/{Antigravity.stories-B2MVCdRl.js → Antigravity.stories-ium_rPSJ.js} +1 -1
- package/storybook-static/assets/{ArrayInput.stories-BI_3D81-.js → ArrayInput.stories-CnVg06MK.js} +1 -1
- package/storybook-static/assets/{Aurora.stories-C_w705rr.js → Aurora.stories-DuFv0_k8.js} +1 -1
- package/storybook-static/assets/{Beams.stories-D1L26zBi.js → Beams.stories-DIEOjIBe.js} +1 -1
- package/storybook-static/assets/{BlobCursor.stories-BjywoQ5q.js → BlobCursor.stories-DvG-koWY.js} +1 -1
- package/storybook-static/assets/{BlurText.stories-CSpGTebR.js → BlurText.stories-sWy214Q2.js} +1 -1
- package/storybook-static/assets/BooleansHeatmap.stories-mxTxY_p5.js +63 -0
- package/storybook-static/assets/{BorderGlow.stories-BadihHiQ.js → BorderGlow.stories-E4gpGeWQ.js} +1 -1
- package/storybook-static/assets/{BubbleMenu.stories-Up_UUIWc.js → BubbleMenu.stories-W43-ioFH.js} +1 -1
- package/storybook-static/assets/{Button-DtiJJxMy.js → Button-CTnNAnoF.js} +1 -1
- package/storybook-static/assets/{Button.stories-BG9uxBwH.js → Button.stories-ACvBbIR1.js} +1 -1
- package/storybook-static/assets/{Calendar.stories-CUZikQRy.js → Calendar.stories-iQkvrvgz.js} +1 -1
- package/storybook-static/assets/{Card-BrvmNtM2.js → Card-6j0993HS.js} +1 -1
- package/storybook-static/assets/{Card.stories-Bf_EtMxA.js → Card.stories-DZzRMcRM.js} +1 -1
- package/storybook-static/assets/{CardNav.stories-OiwfVEn3.js → CardNav.stories-BqXRGPFR.js} +1 -1
- package/storybook-static/assets/{Carousel.stories-Gw1aPaNl.js → Carousel.stories-Z9HYvNS6.js} +1 -1
- package/storybook-static/assets/{Checkbox-CJhut6rk.js → Checkbox-6Z_EEcoe.js} +1 -1
- package/storybook-static/assets/{Checkbox.stories-tIqU6B-y.js → Checkbox.stories-CkXxAAOM.js} +1 -1
- package/storybook-static/assets/ChordDiagram-Bk6idINH.css +1 -0
- package/storybook-static/assets/ChordDiagram.stories-BoGS9mXW.js +25 -0
- package/storybook-static/assets/{ChromaGrid.stories-DbsrxAuC.js → ChromaGrid.stories-DZWtESDP.js} +1 -1
- package/storybook-static/assets/{CircularGallery.stories-0ffqgfyn.js → CircularGallery.stories-DQHz7F4g.js} +1 -1
- package/storybook-static/assets/{CircularText.stories-o46bAR53.js → CircularText.stories-hAb1lSel.js} +1 -1
- package/storybook-static/assets/{ClickSpark.stories-Ci-BtpH_.js → ClickSpark.stories-BjzCHr3X.js} +1 -1
- package/storybook-static/assets/{ColorBends.stories-CAiI7Gmw.js → ColorBends.stories-VFe9q7SG.js} +1 -1
- package/storybook-static/assets/{CountUp.stories-CFiYranp.js → CountUp.stories-DMfEJ2_X.js} +1 -1
- package/storybook-static/assets/{Counter.stories-BfaVu_y6.js → Counter.stories-Ddufg4zF.js} +1 -1
- package/storybook-static/assets/{Crosshair.stories-_Hh1nKQp.js → Crosshair.stories-C6quKu3e.js} +1 -1
- package/storybook-static/assets/{Cubes.stories-DXBS_f8J.js → Cubes.stories-B7vxZouX.js} +1 -1
- package/storybook-static/assets/{CurvedLoop.stories-jcgMeMsw.js → CurvedLoop.stories-BGet8MMP.js} +1 -1
- package/storybook-static/assets/{DarkVeil.stories-BwtU9vKO.js → DarkVeil.stories-Bu0Tnu-6.js} +1 -1
- package/storybook-static/assets/{DateInput-6Jn_FyvO.js → DateInput-BuyblN2J.js} +1 -1
- package/storybook-static/assets/{DateInput.stories-C_XBRwB3.js → DateInput.stories-CyRv7sjg.js} +1 -1
- package/storybook-static/assets/{DecayCard.stories-D6kTH79t.js → DecayCard.stories-BD2h63Yc.js} +1 -1
- package/storybook-static/assets/{DecryptedText.stories-B4xWEvyF.js → DecryptedText.stories-BR5w3WHS.js} +1 -1
- package/storybook-static/assets/{Dither.stories-DmAOxBWe.js → Dither.stories-aUCUDBCz.js} +1 -1
- package/storybook-static/assets/{Dock.stories-AHZywNVf.js → Dock.stories-B9c2txIi.js} +1 -1
- package/storybook-static/assets/{EditFAB.stories-BJ5P85ZN.js → EditFAB.stories-DMOijRLx.js} +1 -1
- package/storybook-static/assets/{EvilEye.stories-D0CBPfm1.js → EvilEye.stories-CsOG_d0o.js} +1 -1
- package/storybook-static/assets/{FadeContent.stories-D1capsBJ.js → FadeContent.stories-BR6tybqY.js} +1 -1
- package/storybook-static/assets/{FaultyTerminal.stories-BxqqRf0S.js → FaultyTerminal.stories-DS5Tyv6l.js} +1 -1
- package/storybook-static/assets/{Fbo-DvyLCJ1Y.js → Fbo-CW8HnzJ0.js} +1 -1
- package/storybook-static/assets/{FloatingLines.stories-7ze9ddpl.js → FloatingLines.stories-DpsTsF-M.js} +1 -1
- package/storybook-static/assets/{FlowingMenu.stories-BX9PD8x2.js → FlowingMenu.stories-C7Yw24v8.js} +1 -1
- package/storybook-static/assets/{FluidGlass.stories-DynD7GVO.js → FluidGlass.stories-DL7gsIvR.js} +1 -1
- package/storybook-static/assets/{Folder.stories-DDktLoEO.js → Folder.stories-oUQTik2D.js} +1 -1
- package/storybook-static/assets/{FuzzyText.stories-D9tRARUX.js → FuzzyText.stories-3sz8Ql2j.js} +1 -1
- package/storybook-static/assets/{Galaxy.stories-aSApGekp.js → Galaxy.stories-DNKl8sLe.js} +1 -1
- package/storybook-static/assets/{GhostCursor.stories-5l0di532.js → GhostCursor.stories-BwKhRvGF.js} +1 -1
- package/storybook-static/assets/{GlareHover.stories-Dc69-LbU.js → GlareHover.stories-HqLH7vCz.js} +1 -1
- package/storybook-static/assets/{GlassSurface.stories-DETLyc0H.js → GlassSurface.stories-BI3VNUMA.js} +1 -1
- package/storybook-static/assets/{GlitchText.stories-Bzb3ZMSY.js → GlitchText.stories-DAJVj_2t.js} +1 -1
- package/storybook-static/assets/{GooeyNav.stories-rxdxJjAy.js → GooeyNav.stories-DC9dqubb.js} +1 -1
- package/storybook-static/assets/{GradientBlinds.stories-03LkBbo8.js → GradientBlinds.stories-FtL2FczL.js} +1 -1
- package/storybook-static/assets/{GradientText.stories-CGo9FyNH.js → GradientText.stories-sKX4wnrF.js} +1 -1
- package/storybook-static/assets/{Grainient.stories-CzGAEJr-.js → Grainient.stories-LOYPnd1b.js} +1 -1
- package/storybook-static/assets/{GridMotion.stories-BzeBDaK8.js → GridMotion.stories-D56B4vk1.js} +1 -1
- package/storybook-static/assets/HabitTimeOfDayChart.stories-CSb9GUPx.js +49 -0
- package/storybook-static/assets/{ImageSlideshow.stories-hoGOc1Gf.js → ImageSlideshow.stories-B74RIe-i.js} +1 -1
- package/storybook-static/assets/{Iridescence.stories-CQTjQ1lh.js → Iridescence.stories-CTwtY8eT.js} +1 -1
- package/storybook-static/assets/{LaserFlow.stories-DzkVWskc.js → LaserFlow.stories-BLmaf3AB.js} +1 -1
- package/storybook-static/assets/{LetterGlitch.stories-0wcxCpnJ.js → LetterGlitch.stories-DH37XF0t.js} +1 -1
- package/storybook-static/assets/{LightPillar.stories-C3jRtdg9.js → LightPillar.stories-Ck3qeiN0.js} +1 -1
- package/storybook-static/assets/{LightRays.stories-C52kBsnd.js → LightRays.stories-ua2gmYoU.js} +1 -1
- package/storybook-static/assets/{Lightning.stories-BFVGqmMh.js → Lightning.stories-aH3grKDv.js} +1 -1
- package/storybook-static/assets/{LineWaves.stories-DNdwRrSd.js → LineWaves.stories-Dny9m17l.js} +1 -1
- package/storybook-static/assets/{LiquidChrome.stories-DFTBXxI6.js → LiquidChrome.stories-DhhNq7hu.js} +1 -1
- package/storybook-static/assets/{LiquidEther.stories-BGYmyfDI.js → LiquidEther.stories-QrTDJF0k.js} +1 -1
- package/storybook-static/assets/{LoadingSpinner-D3Kx-V7J.js → LoadingSpinner-1TPKggI4.js} +1 -1
- package/storybook-static/assets/{LoadingSpinner.stories-CP70BGAb.js → LoadingSpinner.stories-hbHHmRIN.js} +1 -1
- package/storybook-static/assets/{MagicRings.stories-BA9xv5mB.js → MagicRings.stories-DVVFiIUt.js} +1 -1
- package/storybook-static/assets/{Magnet.stories-cqBYCb-D.js → Magnet.stories-BbdHeWMA.js} +1 -1
- package/storybook-static/assets/{MagnetLines.stories-QkoPnGKj.js → MagnetLines.stories-DuFdunF1.js} +1 -1
- package/storybook-static/assets/{Masonry.stories-CiGXRf3O.js → Masonry.stories-eCIUqf99.js} +1 -1
- package/storybook-static/assets/{MetaBalls.stories-3l0pQiKn.js → MetaBalls.stories-Dv6jUd7Z.js} +1 -1
- package/storybook-static/assets/{MetallicPaint.stories-DgZJfMr5.js → MetallicPaint.stories-DAVRhJNS.js} +1 -1
- package/storybook-static/assets/MoodChart.stories-Cu2L9ctb.js +40 -0
- package/storybook-static/assets/{MotionConfigContext-BWFxZgdN.js → MotionConfigContext-BOce3hkw.js} +1 -1
- package/storybook-static/assets/{Navbar.stories-C_Zyfhqr.js → Navbar.stories-CA4HG5LC.js} +1 -1
- package/storybook-static/assets/{Noise.stories-Cg7CucgT.js → Noise.stories-CzRiztMU.js} +1 -1
- package/storybook-static/assets/{NumberStepper-DpOu7xmF.js → NumberStepper-CA99F71z.js} +1 -1
- package/storybook-static/assets/{NumberStepper.stories-CvG9oY5Q.js → NumberStepper.stories-BaedWrxw.js} +1 -1
- package/storybook-static/assets/{Orb.stories-BR92tgyW.js → Orb.stories-C3AvU6Ck.js} +1 -1
- package/storybook-static/assets/{OrbitImages.stories-D_-2HcAd.js → OrbitImages.stories-CUQtYBoA.js} +1 -1
- package/storybook-static/assets/PieChart.stories-CuDdoiKR.js +91 -0
- package/storybook-static/assets/{PixelBlast.stories-B6FXuNf4.js → PixelBlast.stories-BZMMgPnx.js} +1 -1
- package/storybook-static/assets/{PixelCard.stories-Dq4CP2Qj.js → PixelCard.stories-BGHIfRb9.js} +1 -1
- package/storybook-static/assets/{PixelSnow.stories-BoQSOear.js → PixelSnow.stories-BxIpxPJS.js} +1 -1
- package/storybook-static/assets/{PixelTransition.stories-CtQQ070z.js → PixelTransition.stories-Do2T23Se.js} +1 -1
- package/storybook-static/assets/{Plasma.stories-D-421jzZ.js → Plasma.stories-SQXqI75y.js} +1 -1
- package/storybook-static/assets/PolarHeatmap.stories-CDFci1PA.js +26 -0
- package/storybook-static/assets/{Prism.stories-BuibpwdU.js → Prism.stories-Ba_UAm8c.js} +1 -1
- package/storybook-static/assets/{PrismaticBurst.stories-CwYzdBlM.js → PrismaticBurst.stories-NskKboMg.js} +1 -1
- package/storybook-static/assets/{ProfileCard.stories-Dj4oJCxw.js → ProfileCard.stories-nhGFawW1.js} +1 -1
- package/storybook-static/assets/ProgressRings-CR8t1see.css +1 -0
- package/storybook-static/assets/ProgressRings.stories-Dq2WYOU1.js +67 -0
- package/storybook-static/assets/QuantifiableHabitsChart.stories-treJexAd.js +125 -0
- package/storybook-static/assets/{Radar.stories-DxNmoYV3.js → Radar.stories-DN8oMfe1.js} +1 -1
- package/storybook-static/assets/RadialDayChart-CjNQ36HL.css +1 -0
- package/storybook-static/assets/RadialDayChart.stories-C_GY1oKa.js +26 -0
- package/storybook-static/assets/{RecurrencePicker.stories-BAicSNhQ.js → RecurrencePicker.stories-yUASJJzk.js} +1 -1
- package/storybook-static/assets/{Ribbons.stories-usN1kCyI.js → Ribbons.stories-2PD9Q7CT.js} +1 -1
- package/storybook-static/assets/{RippleGrid.stories-nTLGHPV6.js → RippleGrid.stories-Bmz86N8L.js} +1 -1
- package/storybook-static/assets/{RotatingText.stories-8CShs_WJ.js → RotatingText.stories-Db0Kj4fU.js} +1 -1
- package/storybook-static/assets/{ScrollFloat.stories-Dp9YyvHK.js → ScrollFloat.stories-BvS3cLTO.js} +1 -1
- package/storybook-static/assets/{ScrollReveal.stories-Dy4JUrqi.js → ScrollReveal.stories-BRz9n7Qk.js} +1 -1
- package/storybook-static/assets/{ScrollVelocity.stories-CUf-OHNp.js → ScrollVelocity.stories-TeCcq0Yc.js} +1 -1
- package/storybook-static/assets/{SearchBar.stories-BKfuRnlK.js → SearchBar.stories-Bu7toOZA.js} +1 -1
- package/storybook-static/assets/{SearchableDropdown-Ctnh_PVq.js → SearchableDropdown-BKDA92Db.js} +1 -1
- package/storybook-static/assets/{SearchableDropdown.stories-1d-goy0G.js → SearchableDropdown.stories-oT9buOsg.js} +1 -1
- package/storybook-static/assets/{SelectInput-C94OHQIl.js → SelectInput-Cej6AIrC.js} +1 -1
- package/storybook-static/assets/{SelectInput.stories-DPV5iKcs.js → SelectInput.stories--hmbh-1I.js} +1 -1
- package/storybook-static/assets/{ShapeBlur.stories-CdASN24B.js → ShapeBlur.stories-BrPB9Dgq.js} +1 -1
- package/storybook-static/assets/{ShapeGrid.stories-Duzq6qpW.js → ShapeGrid.stories-A41-DtIq.js} +1 -1
- package/storybook-static/assets/{ShinyText.stories-Dgqps29_.js → ShinyText.stories-BFTU8GJP.js} +1 -1
- package/storybook-static/assets/{Silk.stories-DWnaBFZp.js → Silk.stories-BxpLiRNx.js} +1 -1
- package/storybook-static/assets/SleepChart.stories-ywhx7_91.js +58 -0
- package/storybook-static/assets/{Slider-C69QbwVa.js → Slider-CuNmEDiZ.js} +1 -1
- package/storybook-static/assets/{Slider.stories-DDhTLU2g.js → Slider.stories-CsQAkQAf.js} +1 -1
- package/storybook-static/assets/{SoftAurora.stories-C5OSOqjj.js → SoftAurora.stories-taxcnhT9.js} +1 -1
- package/storybook-static/assets/{SoundDemo.stories-sb4V9P8H.js → SoundDemo.stories-zh_F_pgW.js} +1 -1
- package/storybook-static/assets/{SplashCursor.stories-PeC0-y78.js → SplashCursor.stories-CmqWbAt-.js} +1 -1
- package/storybook-static/assets/{SpotlightCard.stories-BCCdQhIJ.js → SpotlightCard.stories-CuO7WGGH.js} +1 -1
- package/storybook-static/assets/{Stack.stories-DJekNsdu.js → Stack.stories-7-b3bhlI.js} +1 -1
- package/storybook-static/assets/{StaggeredMenu.stories-BU-AxZRv.js → StaggeredMenu.stories-DBTBz-bp.js} +1 -1
- package/storybook-static/assets/{StarBorder.stories-Dw9LDvMk.js → StarBorder.stories-eXdZPyrG.js} +1 -1
- package/storybook-static/assets/SunburstChart.stories-CMSDNzoY.js +285 -0
- package/storybook-static/assets/{Table.stories-IhtnLV5J.js → Table.stories-SylwgEpv.js} +1 -1
- package/storybook-static/assets/{Tabs.stories-F_Q4-xiR.js → Tabs.stories-DbAMtL9i.js} +1 -1
- package/storybook-static/assets/{TargetCursor.stories-B-Tl1DdA.js → TargetCursor.stories-BRd8eVe6.js} +1 -1
- package/storybook-static/assets/{TextArea-Bb148SaD.js → TextArea-DBXLzMeZ.js} +1 -1
- package/storybook-static/assets/{TextArea.stories-5-dHoUPL.js → TextArea.stories-udebbAVJ.js} +1 -1
- package/storybook-static/assets/{TextCursor.stories-O-EIx7Nu.js → TextCursor.stories-BUDlvRvw.js} +1 -1
- package/storybook-static/assets/{TextInput-BQ78htqq.js → TextInput-Df0ECj-K.js} +1 -1
- package/storybook-static/assets/{TextInput.stories-Bjjfu_5O.js → TextInput.stories-FtH8T5-_.js} +1 -1
- package/storybook-static/assets/{TextPressure.stories-BvXWcayn.js → TextPressure.stories-Dooijbiu.js} +1 -1
- package/storybook-static/assets/{TextType.stories-DL92625c.js → TextType.stories-ClLVvVVk.js} +1 -1
- package/storybook-static/assets/{ThemeSwitcher.stories-BUUyb12v.js → ThemeSwitcher.stories-CwegSINw.js} +1 -1
- package/storybook-static/assets/{Threads.stories-C_LDNe0R.js → Threads.stories-BuN-AxUr.js} +1 -1
- package/storybook-static/assets/{TimeInput.stories-Tj2LrCtN.js → TimeInput.stories-B5IUTUV2.js} +1 -1
- package/storybook-static/assets/{Toggle-BgFXbOVy.js → Toggle-B5sCmBg4.js} +1 -1
- package/storybook-static/assets/{Toggle.stories-voNeGmVh.js → Toggle.stories-BmSHf5DP.js} +1 -1
- package/storybook-static/assets/{ToggleButton-CQLM9369.js → ToggleButton-CP739hB6.js} +1 -1
- package/storybook-static/assets/{ToggleButton.stories-CLdG94qe.js → ToggleButton.stories-m2eCrn7I.js} +1 -1
- package/storybook-static/assets/{TrueFocus.stories-CEC_mKz7.js → TrueFocus.stories-ATT_gCYY.js} +1 -1
- package/storybook-static/assets/{VariableProximity.stories-CoB68xuF.js → VariableProximity.stories-CjhZaqvP.js} +1 -1
- package/storybook-static/assets/{Waves.stories-Cpn9tv6C.js → Waves.stories-l6P0auFd.js} +1 -1
- package/storybook-static/assets/{arc-DgcIQOLP.js → arc--Q2xWRUA.js} +1 -1
- package/storybook-static/assets/back-BxPoHLz2.js +1 -0
- package/storybook-static/assets/{band-Cq25-Mh7.js → band-D-svgzWl.js} +1 -1
- package/storybook-static/assets/{calendar-B90N4a5g.js → calendar-DtZXr8CJ.js} +1 -1
- package/storybook-static/assets/{chart-column-Qn3KVlVm.js → chart-column-Bc8_bGZY.js} +1 -1
- package/storybook-static/assets/{check-BdgefYk0.js → check-pQLEHzEB.js} +1 -1
- package/storybook-static/assets/{chevron-down-rAxqUK0f.js → chevron-down-BwWfy_sP.js} +1 -1
- package/storybook-static/assets/{chevron-right-BQYLOSGD.js → chevron-right-D2pOUpcG.js} +1 -1
- package/storybook-static/assets/client-DyHGB6m6.js +1 -0
- package/storybook-static/assets/{createLucideIcon-CanksmPJ.js → createLucideIcon-B-jPBnP1.js} +1 -1
- package/storybook-static/assets/descending-BO6OmMcj.js +1 -0
- package/storybook-static/assets/{download-BoPCl2gy.js → download-DnhuO1Ek.js} +1 -1
- package/storybook-static/assets/{folder-B0zTnOfo.js → folder-B0kHgyRN.js} +1 -1
- package/storybook-static/assets/{iconBase-jWAd7fUM.js → iconBase-Do-FwLpb.js} +1 -1
- package/storybook-static/assets/{iframe-BTbLpgFM.js → iframe-ClorXKAj.js} +3 -3
- package/storybook-static/assets/{index-D9A3yXPP.js → index-Bs1dRoHq.js} +1 -1
- package/storybook-static/assets/{index-8orVvKs3.js → index-CBJggPN9.js} +1 -1
- package/storybook-static/assets/{index-Dnnp7mc9.js → index-CezVs6bU.js} +1 -1
- package/storybook-static/assets/linear-BTA54h8k.js +1 -0
- package/storybook-static/assets/monotone-Ca9yXB0X.js +1 -0
- package/storybook-static/assets/path-CSVzDSO0.js +1 -0
- package/storybook-static/assets/{proxy-DHiOkbBq.js → proxy-3BlM6Jc4.js} +1 -1
- package/storybook-static/assets/{react-18-RyhzFaVZ.js → react-18-wzICuHUq.js} +1 -1
- package/storybook-static/assets/{react-three-fiber.esm-DyDueq1t.js → react-three-fiber.esm-BmUFa1-S.js} +1 -1
- package/storybook-static/assets/{search-C2F8ucQI.js → search-BKi-6XDz.js} +1 -1
- package/storybook-static/assets/{settings-B4F4kfld.js → settings-BzEV0s0L.js} +1 -1
- package/storybook-static/assets/{sun-CbGl2Vwt.js → sun-C9Sm1WQX.js} +1 -1
- package/storybook-static/assets/{transform-v7fcW145.js → transform-DaumkFRH.js} +1 -1
- package/storybook-static/assets/{trash-2-CNCXZ0wH.js → trash-2-Bb1H8yHr.js} +1 -1
- package/storybook-static/assets/{use-animation-frame-DY1VsI4g.js → use-animation-frame-D9hLiIrP.js} +1 -1
- package/storybook-static/assets/{use-in-view-Cawxv_UZ.js → use-in-view-DKEXTXQI.js} +1 -1
- package/storybook-static/assets/{use-motion-value-BKT0PPfP.js → use-motion-value-BABvebXq.js} +1 -1
- package/storybook-static/assets/{use-spring-CDH8BIpQ.js → use-spring-C8_4zIh_.js} +1 -1
- package/storybook-static/assets/{use-transform-Bj0aHFrd.js → use-transform-CcGdha8D.js} +1 -1
- package/storybook-static/assets/{useSound-OlKqgJtL.js → useSound-BS8g02XJ.js} +1 -1
- package/storybook-static/assets/{users-Oy8C2tFC.js → users-CL9_RODb.js} +1 -1
- package/storybook-static/assets/value-CMZJhU-O.js +1 -0
- package/storybook-static/assets/{x-CR0CkM0G.js → x-BgxSkyBO.js} +1 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.json +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/assets/BooleansHeatmap.stories-CKYZW8W5.js +0 -63
- package/storybook-static/assets/HabitTimeOfDayChart.stories-CbMqUfq0.js +0 -49
- package/storybook-static/assets/MoodChart.stories-UXaQU4EG.js +0 -40
- package/storybook-static/assets/PieChart.stories-CjtEiSJY.js +0 -91
- package/storybook-static/assets/QuantifiableHabitsChart.stories-ZY1-WQ1g.js +0 -125
- package/storybook-static/assets/SleepChart.stories-C1n9aK7B.js +0 -58
- package/storybook-static/assets/SunburstChart.stories-CE4d4r8-.js +0 -285
- package/storybook-static/assets/client-Chg03P_H.js +0 -1
- package/storybook-static/assets/linear-9syG7RFK.js +0 -1
- package/storybook-static/assets/monotone-B6BFTqpP.js +0 -1
- package/storybook-static/assets/path-CbwjOpE9.js +0 -1
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ var dayjs = require('dayjs');
|
|
|
9
9
|
var MobileTimePicker = require('@mui/x-date-pickers/MobileTimePicker');
|
|
10
10
|
var LocalizationProvider = require('@mui/x-date-pickers/LocalizationProvider');
|
|
11
11
|
var AdapterDayjs = require('@mui/x-date-pickers/AdapterDayjs');
|
|
12
|
-
var styles$
|
|
12
|
+
var styles$H = require('@mui/material/styles');
|
|
13
13
|
var rrule = require('rrule');
|
|
14
14
|
var d3 = require('d3');
|
|
15
15
|
|
|
@@ -32,7 +32,7 @@ function _interopNamespaceDefault(e) {
|
|
|
32
32
|
|
|
33
33
|
var d3__namespace = /*#__PURE__*/_interopNamespaceDefault(d3);
|
|
34
34
|
|
|
35
|
-
var styles$
|
|
35
|
+
var styles$G = {"button":"Button-module_button__c6nkW","primary":"Button-module_primary__pMqAs","secondary":"Button-module_secondary__mBWx9","outline":"Button-module_outline__NGGGN","ghost":"Button-module_ghost__u2QBF","danger":"Button-module_danger__2ewhr","icon":"Button-module_icon__JNzlJ","iconLeft":"Button-module_iconLeft__Fpz-y","iconRight":"Button-module_iconRight__kTfjS","small":"Button-module_small__ZI9RX","medium":"Button-module_medium__Wnf9t","large":"Button-module_large__cQCpA","fullWidth":"Button-module_fullWidth__N8vYg","loading":"Button-module_loading__hcSI4","spinner":"Button-module_spinner__HtM96","spin":"Button-module_spin__jblrj"};
|
|
36
36
|
|
|
37
37
|
const SOUND_PACKS = {
|
|
38
38
|
digital: {
|
|
@@ -598,11 +598,11 @@ const Button = ({ variant = 'primary', size = 'medium', fullWidth = false, loadi
|
|
|
598
598
|
const { handlers } = useComponentSound(soundConfig);
|
|
599
599
|
const isIcon = variant === 'icon';
|
|
600
600
|
const buttonClasses = [
|
|
601
|
-
styles$
|
|
602
|
-
styles$
|
|
603
|
-
!isIcon && styles$
|
|
604
|
-
fullWidth && styles$
|
|
605
|
-
loading && styles$
|
|
601
|
+
styles$G.button,
|
|
602
|
+
styles$G[variant],
|
|
603
|
+
!isIcon && styles$G[size],
|
|
604
|
+
fullWidth && styles$G.fullWidth,
|
|
605
|
+
loading && styles$G.loading,
|
|
606
606
|
className
|
|
607
607
|
].filter(Boolean).join(' ');
|
|
608
608
|
const handleClick = (e) => {
|
|
@@ -613,10 +613,10 @@ const Button = ({ variant = 'primary', size = 'medium', fullWidth = false, loadi
|
|
|
613
613
|
handlers.onMouseEnter?.();
|
|
614
614
|
onMouseEnter?.(e);
|
|
615
615
|
};
|
|
616
|
-
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: buttonClasses, disabled: disabled || loading, whileHover: isIcon ? undefined : { scale: disabled || loading ? 1 : 1.02 }, whileTap: { scale: disabled || loading ? 1 : (isIcon ? 0.9 : 0.98) }, transition: { type: "spring", stiffness: 400, damping: 17 }, onClick: handleClick, onMouseEnter: handleMouseEnter, onFocus: onFocus, ...motionProps, ...rest, children: [loading && jsxRuntime.jsx("span", { className: styles$
|
|
616
|
+
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: buttonClasses, disabled: disabled || loading, whileHover: isIcon ? undefined : { scale: disabled || loading ? 1 : 1.02 }, whileTap: { scale: disabled || loading ? 1 : (isIcon ? 0.9 : 0.98) }, transition: { type: "spring", stiffness: 400, damping: 17 }, onClick: handleClick, onMouseEnter: handleMouseEnter, onFocus: onFocus, ...motionProps, ...rest, children: [loading && jsxRuntime.jsx("span", { className: styles$G.spinner }), iconLeft && jsxRuntime.jsx("span", { className: styles$G.iconLeft, children: iconLeft }), children, iconRight && jsxRuntime.jsx("span", { className: styles$G.iconRight, children: iconRight })] }));
|
|
617
617
|
};
|
|
618
618
|
|
|
619
|
-
var styles$
|
|
619
|
+
var styles$F = {"card":"Card-module_card__r2DB2","hoverable":"Card-module_hoverable__X3OpS","elevated":"Card-module_elevated__hGV6-","outlined":"Card-module_outlined__ngRag","flat":"Card-module_flat__xy-xt","glass":"Card-module_glass__Sv-Vs","imageContainer":"Card-module_imageContainer__L4ma6","image":"Card-module_image__bQBt6","header":"Card-module_header__0dtj3","headerContent":"Card-module_headerContent__W7-jD","expandButton":"Card-module_expandButton__I7f49","expandIcon":"Card-module_expandIcon__Lu-OY","expandableContent":"Card-module_expandableContent__BFgO5","expandable":"Card-module_expandable__GMXzo","body":"Card-module_body__K7eL3","footer":"Card-module_footer__L5wO-","title":"Card-module_title__pW9g8","subtitle":"Card-module_subtitle__gejH4","clickable":"Card-module_clickable__Y6fm8","padding":"Card-module_padding__wtyDo","noPadding":"Card-module_noPadding__r5Qq0","loading":"Card-module_loading__S4Wng","loadingShimmer":"Card-module_loadingShimmer__Q1Osr","loadingPulse":"Card-module_loadingPulse__bXQmC"};
|
|
620
620
|
|
|
621
621
|
/**
|
|
622
622
|
* Card Component
|
|
@@ -681,28 +681,28 @@ const Card = ({ variant = 'elevated', hoverable = false, clickable = false, padd
|
|
|
681
681
|
onExpandChange?.(newExpanded);
|
|
682
682
|
};
|
|
683
683
|
const cardClasses = [
|
|
684
|
-
styles$
|
|
685
|
-
styles$
|
|
686
|
-
hoverable && styles$
|
|
687
|
-
clickable && styles$
|
|
688
|
-
!padding && styles$
|
|
689
|
-
expandable && styles$
|
|
684
|
+
styles$F.card,
|
|
685
|
+
styles$F[variant],
|
|
686
|
+
hoverable && styles$F.hoverable,
|
|
687
|
+
clickable && styles$F.clickable,
|
|
688
|
+
!padding && styles$F.noPadding,
|
|
689
|
+
expandable && styles$F.expandable,
|
|
690
690
|
className
|
|
691
691
|
].filter(Boolean).join(' ');
|
|
692
692
|
const renderHeader = () => {
|
|
693
693
|
if (header) {
|
|
694
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
694
|
+
return (jsxRuntime.jsxs("div", { className: styles$F.header, children: [jsxRuntime.jsx("div", { className: styles$F.headerContent, children: header }), expandable && (jsxRuntime.jsx("button", { className: styles$F.expandButton, onClick: handleToggleExpand, "aria-label": isExpanded ? 'Collapse card' : 'Expand card', children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: styles$F.expandIcon, style: { transform: isExpanded ? 'rotate(180deg)' : 'rotate(0deg)' }, children: jsxRuntime.jsx("path", { d: "M6 9l6 6 6-6" }) }) }))] }));
|
|
695
695
|
}
|
|
696
696
|
if (title || subtitle) {
|
|
697
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
697
|
+
return (jsxRuntime.jsxs("div", { className: styles$F.header, children: [jsxRuntime.jsxs("div", { className: styles$F.headerContent, children: [title && jsxRuntime.jsx("h3", { className: styles$F.title, children: title }), subtitle && jsxRuntime.jsx("p", { className: styles$F.subtitle, children: subtitle })] }), expandable && (jsxRuntime.jsx("button", { className: styles$F.expandButton, onClick: handleToggleExpand, "aria-label": isExpanded ? 'Collapse card' : 'Expand card', children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: styles$F.expandIcon, style: { transform: isExpanded ? 'rotate(180deg)' : 'rotate(0deg)' }, children: jsxRuntime.jsx("path", { d: "M6 9l6 6 6-6" }) }) }))] }));
|
|
698
698
|
}
|
|
699
699
|
return null;
|
|
700
700
|
};
|
|
701
|
-
const cardContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [image && (jsxRuntime.jsx("div", { className: styles$
|
|
701
|
+
const cardContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [image && (jsxRuntime.jsx("div", { className: styles$F.imageContainer, children: jsxRuntime.jsx("img", { src: image, alt: imageAlt, className: styles$F.image }) })), renderHeader(), jsxRuntime.jsx(framerMotion.AnimatePresence, { initial: false, children: (!expandable || isExpanded) && (jsxRuntime.jsxs(framerMotion.motion.div, { initial: expandable ? { height: 0, opacity: 0 } : undefined, animate: expandable ? { height: 'auto', opacity: 1 } : undefined, exit: expandable ? { height: 0, opacity: 0 } : undefined, transition: { duration: 0.3, ease: "easeInOut" }, className: styles$F.expandableContent, children: [children && (jsxRuntime.jsx("div", { className: padding ? styles$F.body : undefined, children: children })), footer && jsxRuntime.jsx("div", { className: styles$F.footer, children: footer })] }, "content")) })] }));
|
|
702
702
|
return (jsxRuntime.jsx(framerMotion.motion.div, { className: cardClasses, onClick: clickable ? onClick : undefined, whileHover: hoverable ? { y: -4 } : undefined, transition: { type: "spring", stiffness: 400, damping: 17 }, ...motionProps, ...rest, children: cardContent }));
|
|
703
703
|
};
|
|
704
704
|
|
|
705
|
-
var styles$
|
|
705
|
+
var styles$E = {"wrapper":"EmptyState-module_wrapper__h3Y2E","compact":"EmptyState-module_compact__HdYu1","default":"EmptyState-module_default__ACAbn","large":"EmptyState-module_large__H3ELo","icon":"EmptyState-module_icon__i7-3M","title":"EmptyState-module_title__xCyfH","message":"EmptyState-module_message__Bc5xK","action":"EmptyState-module_action__UpnvZ"};
|
|
706
706
|
|
|
707
707
|
/**
|
|
708
708
|
* EmptyState Component
|
|
@@ -739,11 +739,11 @@ var styles$A = {"wrapper":"EmptyState-module_wrapper__h3Y2E","compact":"EmptySta
|
|
|
739
739
|
* @returns {JSX.Element} The rendered EmptyState component
|
|
740
740
|
*/
|
|
741
741
|
const EmptyState = ({ icon, title, message, action, size = 'default', }) => {
|
|
742
|
-
const wrapperClass = [styles$
|
|
743
|
-
return (jsxRuntime.jsxs("div", { className: wrapperClass, children: [icon && jsxRuntime.jsx("div", { className: styles$
|
|
742
|
+
const wrapperClass = [styles$E.wrapper, styles$E[size]].filter(Boolean).join(' ');
|
|
743
|
+
return (jsxRuntime.jsxs("div", { className: wrapperClass, children: [icon && jsxRuntime.jsx("div", { className: styles$E.icon, children: icon }), title && jsxRuntime.jsx("h3", { className: styles$E.title, children: title }), jsxRuntime.jsx("p", { className: styles$E.message, children: message }), action && jsxRuntime.jsx("div", { className: styles$E.action, children: action })] }));
|
|
744
744
|
};
|
|
745
745
|
|
|
746
|
-
var styles$
|
|
746
|
+
var styles$D = {"backdrop":"Modal-module_backdrop__yOx-a","dialog":"Modal-module_dialog__yEXTq","dialogCompact":"Modal-module_dialogCompact__z1Wxp","dialogWide":"Modal-module_dialogWide__9PTXK","header":"Modal-module_header__NHHKd","title":"Modal-module_title__i3R0x","headerActions":"Modal-module_headerActions__g28UN","closeButton":"Modal-module_closeButton__siC-1","body":"Modal-module_body__U7jvM","bodyFlush":"Modal-module_bodyFlush__wtk3q","backdropSheet":"Modal-module_backdropSheet__o9kW3","dialogSheet":"Modal-module_dialogSheet__EjpwP","grabBar":"Modal-module_grabBar__qhl9f"};
|
|
747
747
|
|
|
748
748
|
const MOBILE_BREAKPOINT = '(max-width: 640px)';
|
|
749
749
|
const useIsMobile = () => {
|
|
@@ -780,14 +780,14 @@ const Modal = ({ open, title, onClose, children, size = 'default', actions, padd
|
|
|
780
780
|
return null;
|
|
781
781
|
const isSheet = mobileVariant === 'sheet' && isMobile;
|
|
782
782
|
const isDraggable = isSheet && draggable;
|
|
783
|
-
const backdropClass = [styles$
|
|
783
|
+
const backdropClass = [styles$D.backdrop, isSheet && styles$D.backdropSheet]
|
|
784
784
|
.filter(Boolean)
|
|
785
785
|
.join(' ');
|
|
786
786
|
const dialogClass = [
|
|
787
|
-
styles$
|
|
788
|
-
size === 'compact' && styles$
|
|
789
|
-
size === 'wide' && styles$
|
|
790
|
-
isSheet && styles$
|
|
787
|
+
styles$D.dialog,
|
|
788
|
+
size === 'compact' && styles$D.dialogCompact,
|
|
789
|
+
size === 'wide' && styles$D.dialogWide,
|
|
790
|
+
isSheet && styles$D.dialogSheet,
|
|
791
791
|
]
|
|
792
792
|
.filter(Boolean)
|
|
793
793
|
.join(' ');
|
|
@@ -803,16 +803,16 @@ const Modal = ({ open, title, onClose, children, size = 'default', actions, padd
|
|
|
803
803
|
: { duration: 0.15, ease: 'easeOut' }, onClick: (e) => e.stopPropagation(), drag: isDraggable ? 'y' : false, dragControls: isDraggable ? dragControls : undefined, dragConstraints: { top: 0 }, dragElastic: { top: 0, bottom: 0.3 }, dragListener: false, onDragEnd: (_, info) => {
|
|
804
804
|
if (info.offset.y > 80)
|
|
805
805
|
onClose();
|
|
806
|
-
}, children: [isSheet && jsxRuntime.jsx("div", { className: styles$
|
|
806
|
+
}, children: [isSheet && jsxRuntime.jsx("div", { className: styles$D.grabBar }), jsxRuntime.jsxs("div", { ref: headerRef, className: styles$D.header, onPointerDown: (e) => {
|
|
807
807
|
if (!isDraggable)
|
|
808
808
|
return;
|
|
809
809
|
if (e.target.closest('button'))
|
|
810
810
|
return;
|
|
811
811
|
dragControls.start(e);
|
|
812
|
-
}, children: [jsxRuntime.jsx("span", { className: styles$
|
|
812
|
+
}, children: [jsxRuntime.jsx("span", { className: styles$D.title, children: title }), actions && jsxRuntime.jsx("div", { className: styles$D.headerActions, children: actions }), jsxRuntime.jsx("button", { className: styles$D.closeButton, onClick: onClose, "aria-label": "Close modal", type: "button", children: jsxRuntime.jsx(lucideReact.X, { size: 16 }) })] }), jsxRuntime.jsx("div", { className: padding ? styles$D.body : styles$D.bodyFlush, children: children })] }) })) }), document.body);
|
|
813
813
|
};
|
|
814
814
|
|
|
815
|
-
var styles$
|
|
815
|
+
var styles$C = {"checkboxLabel":"Checkbox-module_checkboxLabel__4tBVg","checkbox":"Checkbox-module_checkbox__BbJul","checkboxText":"Checkbox-module_checkboxText__oJsc9"};
|
|
816
816
|
|
|
817
817
|
/**
|
|
818
818
|
* Checkbox component - Modern interactive checkbox with animations
|
|
@@ -857,13 +857,13 @@ const Checkbox = ({ checked, onChange, label, disabled = false, indeterminate =
|
|
|
857
857
|
checkboxRef.current.indeterminate = indeterminate;
|
|
858
858
|
}
|
|
859
859
|
}, [indeterminate]);
|
|
860
|
-
return (jsxRuntime.jsxs("label", { className: styles$
|
|
860
|
+
return (jsxRuntime.jsxs("label", { className: styles$C.checkboxLabel, children: [jsxRuntime.jsx("input", { ref: checkboxRef, type: "checkbox", checked: checked, onChange: (e) => {
|
|
861
861
|
const isChecked = e.target.checked;
|
|
862
862
|
onChange(isChecked);
|
|
863
863
|
if (soundConfig?.onClick !== false) {
|
|
864
864
|
playSound('toggle');
|
|
865
865
|
}
|
|
866
|
-
}, className: styles$
|
|
866
|
+
}, className: styles$C.checkbox, disabled: disabled, id: id, name: name, value: value, "aria-checked": indeterminate ? 'mixed' : checked }), label && jsxRuntime.jsx("span", { className: styles$C.checkboxText, children: label })] }));
|
|
867
867
|
};
|
|
868
868
|
|
|
869
869
|
const formatDateToEuropean = (date) => {
|
|
@@ -894,7 +894,7 @@ const parseEuropeanDate = (dateString) => {
|
|
|
894
894
|
return '';
|
|
895
895
|
};
|
|
896
896
|
|
|
897
|
-
var styles$
|
|
897
|
+
var styles$B = {"dateInput":"DateInput-module_dateInput__54VPD","label":"DateInput-module_label__yDdUw","inputWrapper":"DateInput-module_inputWrapper__x-r1d","textInput":"DateInput-module_textInput__ToOSX","calendarButton":"DateInput-module_calendarButton__JzDGD","nativeDateInput":"DateInput-module_nativeDateInput__tbi68","error":"DateInput-module_error__ieuPO","success":"DateInput-module_success__rPA93","loading":"DateInput-module_loading__1DAmD"};
|
|
898
898
|
|
|
899
899
|
/**
|
|
900
900
|
* DateInput component - European format date picker with manual input support
|
|
@@ -954,21 +954,21 @@ function DateInput({ label, value, onChange, placeholder = "25/12/2024", onFocus
|
|
|
954
954
|
}
|
|
955
955
|
};
|
|
956
956
|
const getClassName = () => {
|
|
957
|
-
const classes = [styles$
|
|
957
|
+
const classes = [styles$B.dateInput];
|
|
958
958
|
if (error)
|
|
959
|
-
classes.push(styles$
|
|
959
|
+
classes.push(styles$B.error);
|
|
960
960
|
if (success)
|
|
961
|
-
classes.push(styles$
|
|
961
|
+
classes.push(styles$B.success);
|
|
962
962
|
if (loading)
|
|
963
|
-
classes.push(styles$
|
|
963
|
+
classes.push(styles$B.loading);
|
|
964
964
|
return classes.join(' ');
|
|
965
965
|
};
|
|
966
966
|
// Current ISO value for the native date input (or '' if empty/unparseable)
|
|
967
967
|
const isoValue = value.includes('-') ? value : (parseEuropeanDate(value) || '');
|
|
968
|
-
return (jsxRuntime.jsxs("div", { className: getClassName(), children: [jsxRuntime.jsx("label", { className: styles$
|
|
968
|
+
return (jsxRuntime.jsxs("div", { className: getClassName(), children: [jsxRuntime.jsx("label", { className: styles$B.label, children: label }), jsxRuntime.jsxs("div", { className: styles$B.inputWrapper, children: [jsxRuntime.jsx("input", { type: "text", value: value.includes('-') ? formatDateToEuropean(value) : value, onChange: (e) => handleTextChange(e.target.value), onFocus: onFocus, onBlur: onBlur, placeholder: placeholder, className: styles$B.textInput, disabled: disabled || loading, ...handlers }), jsxRuntime.jsxs("span", { className: styles$B.calendarButton, "aria-hidden": "true", children: [jsxRuntime.jsx(lucideReact.Calendar, {}), jsxRuntime.jsx("input", { type: "date", value: isoValue, onChange: handleCalendarChange, className: styles$B.nativeDateInput, title: "Select date from calendar", "aria-label": label ? `${label} calendar picker` : 'Calendar picker', disabled: disabled || loading })] })] })] }));
|
|
969
969
|
}
|
|
970
970
|
|
|
971
|
-
var styles$
|
|
971
|
+
var styles$A = {"searchableDropdown":"SearchableDropdown-module_searchableDropdown__S2Nh5","dropdownTrigger":"SearchableDropdown-module_dropdownTrigger__dihdr","open":"SearchableDropdown-module_open__P7mRt","dropdownValue":"SearchableDropdown-module_dropdownValue__ydrc2","placeholder":"SearchableDropdown-module_placeholder__BwM2W","dropdownArrow":"SearchableDropdown-module_dropdownArrow__yd5fp","dropdownMenu":"SearchableDropdown-module_dropdownMenu__2Z5cc","dropdownSearch":"SearchableDropdown-module_dropdownSearch__NRk7j","searchInput":"SearchableDropdown-module_searchInput__VS2Hw","searchIcon":"SearchableDropdown-module_searchIcon__2vKFF","dropdownOptions":"SearchableDropdown-module_dropdownOptions__6YXqF","dropdownOption":"SearchableDropdown-module_dropdownOption__YwDr-","selected":"SearchableDropdown-module_selected__31JeB","highlighted":"SearchableDropdown-module_highlighted__P0bBq","checkIcon":"SearchableDropdown-module_checkIcon__YxowK","dropdownNoResults":"SearchableDropdown-module_dropdownNoResults__WW-Da","loading":"SearchableDropdown-module_loading__xlYf0"};
|
|
972
972
|
|
|
973
973
|
/**
|
|
974
974
|
* SearchableDropdown component - Modern filterable dropdown with animations
|
|
@@ -1073,23 +1073,23 @@ function SearchableDropdown({ label, value, onChange, options, placeholder = "Se
|
|
|
1073
1073
|
}
|
|
1074
1074
|
};
|
|
1075
1075
|
const getTriggerClassName = () => {
|
|
1076
|
-
const classes = [styles$
|
|
1076
|
+
const classes = [styles$A.dropdownTrigger];
|
|
1077
1077
|
if (isOpen)
|
|
1078
|
-
classes.push(styles$
|
|
1078
|
+
classes.push(styles$A.open);
|
|
1079
1079
|
if (loading)
|
|
1080
|
-
classes.push(styles$
|
|
1080
|
+
classes.push(styles$A.loading);
|
|
1081
1081
|
if (error)
|
|
1082
|
-
classes.push(styles$
|
|
1082
|
+
classes.push(styles$A.error);
|
|
1083
1083
|
return classes.join(' ');
|
|
1084
1084
|
};
|
|
1085
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
1085
|
+
return (jsxRuntime.jsxs("div", { className: styles$A.searchableDropdown, ref: dropdownRef, onKeyDown: handleKeyDown, children: [jsxRuntime.jsx("label", { children: label }), jsxRuntime.jsxs(framerMotion.motion.button, { type: "button", className: getTriggerClassName(), onClick: () => !disabled && !loading && setIsOpen(!isOpen), whileTap: { scale: disabled ? 1 : 0.98 }, style: { willChange: 'transform' }, disabled: disabled, children: [jsxRuntime.jsx("span", { className: `${styles$A.dropdownValue} ${!displayValue ? styles$A.placeholder : ''}`, children: displayValue || placeholder }), jsxRuntime.jsx(lucideReact.ChevronDown, { className: styles$A.dropdownArrow })] }), jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isOpen && (jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$A.dropdownMenu, initial: { opacity: 0, y: -10, scale: 0.95 }, animate: { opacity: 1, y: 0, scale: 1 }, exit: { opacity: 0, y: -10, scale: 0.95 }, transition: { duration: 0.2, ease: "easeOut" }, children: [jsxRuntime.jsxs("div", { className: styles$A.dropdownSearch, children: [jsxRuntime.jsx(lucideReact.Search, { className: styles$A.searchIcon }), jsxRuntime.jsx("input", { ref: inputRef, type: "text", className: styles$A.searchInput, placeholder: "Cerca...", value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), onClick: (e) => e.stopPropagation() })] }), jsxRuntime.jsxs("div", { className: styles$A.dropdownOptions, children: [allOptions.map((opt, index) => {
|
|
1086
1086
|
const isSelected = value === opt.value;
|
|
1087
1087
|
const isHighlighted = highlightedIndex === index;
|
|
1088
|
-
return (jsxRuntime.jsxs(framerMotion.motion.button, { type: "button", className: `${styles$
|
|
1089
|
-
}), allOptions.length === 0 && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
1088
|
+
return (jsxRuntime.jsxs(framerMotion.motion.button, { type: "button", className: `${styles$A.dropdownOption} ${isSelected ? styles$A.selected : ''} ${isHighlighted ? styles$A.highlighted : ''}`, onClick: () => handleSelect(opt.value), onMouseEnter: () => setHighlightedIndex(index), initial: { opacity: 0, x: -20 }, animate: { opacity: 1, x: 0 }, transition: { delay: index * 0.02 }, whileTap: { scale: 0.98 }, style: { willChange: 'transform' }, children: [jsxRuntime.jsx("span", { children: opt.label }), isSelected && jsxRuntime.jsx(lucideReact.Check, { className: styles$A.checkIcon })] }, `${opt.value}-${index}`));
|
|
1089
|
+
}), allOptions.length === 0 && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$A.dropdownNoResults, initial: { opacity: 0 }, animate: { opacity: 1 }, children: "No results found" }))] })] })) })] }));
|
|
1090
1090
|
}
|
|
1091
1091
|
|
|
1092
|
-
var styles$
|
|
1092
|
+
var styles$z = {"selectInput":"SelectInput-module_selectInput__s6zEg","selectWrapper":"SelectInput-module_selectWrapper__Qr4pl","selectIcon":"SelectInput-module_selectIcon__9pjhf","error":"SelectInput-module_error__3WNJc","success":"SelectInput-module_success__WJ5ga","loading":"SelectInput-module_loading__n35N9"};
|
|
1093
1093
|
|
|
1094
1094
|
/**
|
|
1095
1095
|
* SelectInput component - Styled dropdown selector with flexible option format
|
|
@@ -1127,26 +1127,26 @@ var styles$v = {"selectInput":"SelectInput-module_selectInput__s6zEg","selectWra
|
|
|
1127
1127
|
function SelectInput({ label, value, onChange, options, placeholder = "Select...", disabled = false, error = false, success = false, loading = false, required = false, soundConfig, className }) {
|
|
1128
1128
|
const { handlers, playSound } = useComponentSound(soundConfig);
|
|
1129
1129
|
const getClassName = () => {
|
|
1130
|
-
const classes = [styles$
|
|
1130
|
+
const classes = [styles$z.selectInput];
|
|
1131
1131
|
if (error)
|
|
1132
|
-
classes.push(styles$
|
|
1132
|
+
classes.push(styles$z.error);
|
|
1133
1133
|
if (success)
|
|
1134
|
-
classes.push(styles$
|
|
1134
|
+
classes.push(styles$z.success);
|
|
1135
1135
|
if (loading)
|
|
1136
|
-
classes.push(styles$
|
|
1136
|
+
classes.push(styles$z.loading);
|
|
1137
1137
|
return classes.join(' ');
|
|
1138
1138
|
};
|
|
1139
|
-
return (jsxRuntime.jsxs("div", { className: `${getClassName()}${className ? ` ${className}` : ''}`, children: [jsxRuntime.jsxs("label", { children: [label, required && jsxRuntime.jsx("span", { style: { color: 'var(--color-error)' }, children: " *" })] }), jsxRuntime.jsxs("div", { className: styles$
|
|
1139
|
+
return (jsxRuntime.jsxs("div", { className: `${getClassName()}${className ? ` ${className}` : ''}`, children: [jsxRuntime.jsxs("label", { children: [label, required && jsxRuntime.jsx("span", { style: { color: 'var(--color-error)' }, children: " *" })] }), jsxRuntime.jsxs("div", { className: styles$z.selectWrapper, children: [jsxRuntime.jsxs("select", { value: value, onChange: e => {
|
|
1140
1140
|
playSound('click');
|
|
1141
1141
|
onChange(e.target.value);
|
|
1142
1142
|
}, disabled: disabled || loading, required: required, ...handlers, children: [jsxRuntime.jsx("option", { value: "", children: placeholder }), options.map(opt => {
|
|
1143
1143
|
const optionValue = typeof opt === 'string' ? opt : opt.value;
|
|
1144
1144
|
const optionLabel = typeof opt === 'string' ? opt : opt.label;
|
|
1145
1145
|
return (jsxRuntime.jsx("option", { value: optionValue, children: optionLabel }, optionValue));
|
|
1146
|
-
})] }), jsxRuntime.jsx(lucideReact.ChevronDown, { className: styles$
|
|
1146
|
+
})] }), jsxRuntime.jsx(lucideReact.ChevronDown, { className: styles$z.selectIcon })] })] }));
|
|
1147
1147
|
}
|
|
1148
1148
|
|
|
1149
|
-
var styles$
|
|
1149
|
+
var styles$y = {"textareaContainer":"TextArea-module_textareaContainer__AquFj","compact":"TextArea-module_compact__U5lPn","textareaLabel":"TextArea-module_textareaLabel__7Vmyx","requiredIndicator":"TextArea-module_requiredIndicator__3Fxyy","textareaInput":"TextArea-module_textareaInput__VCDZA","characterCount":"TextArea-module_characterCount__9FO5N","nearLimit":"TextArea-module_nearLimit__cUdnw","atLimit":"TextArea-module_atLimit__GoWCC","error":"TextArea-module_error__ciHgb","success":"TextArea-module_success__a0-xD","loading":"TextArea-module_loading__CSFBR","focusMode":"TextArea-module_focusMode__9A8U-"};
|
|
1150
1150
|
|
|
1151
1151
|
/**
|
|
1152
1152
|
* TextArea component - Multi-line text input with character counting
|
|
@@ -1181,38 +1181,38 @@ var styles$u = {"textareaContainer":"TextArea-module_textareaContainer__AquFj","
|
|
|
1181
1181
|
function TextArea({ label, value, onChange, rows = 5, placeholder = "", required = false, maxLength, disabled = false, error = false, success = false, loading = false, focusMode = false, compact = false, className = "" }) {
|
|
1182
1182
|
const textareaId = `textarea-${Math.random().toString(36).substr(2, 9)}`;
|
|
1183
1183
|
const getContainerClassName = () => {
|
|
1184
|
-
const classes = [styles$
|
|
1184
|
+
const classes = [styles$y.textareaContainer];
|
|
1185
1185
|
if (error)
|
|
1186
|
-
classes.push(styles$
|
|
1186
|
+
classes.push(styles$y.error);
|
|
1187
1187
|
if (success)
|
|
1188
|
-
classes.push(styles$
|
|
1188
|
+
classes.push(styles$y.success);
|
|
1189
1189
|
if (loading)
|
|
1190
|
-
classes.push(styles$
|
|
1190
|
+
classes.push(styles$y.loading);
|
|
1191
1191
|
if (focusMode)
|
|
1192
|
-
classes.push(styles$
|
|
1192
|
+
classes.push(styles$y.focusMode);
|
|
1193
1193
|
if (compact)
|
|
1194
|
-
classes.push(styles$
|
|
1194
|
+
classes.push(styles$y.compact);
|
|
1195
1195
|
if (className)
|
|
1196
1196
|
classes.push(className);
|
|
1197
1197
|
return classes.join(' ');
|
|
1198
1198
|
};
|
|
1199
1199
|
const getCharCountClassName = () => {
|
|
1200
1200
|
if (!maxLength)
|
|
1201
|
-
return styles$
|
|
1202
|
-
const classes = [styles$
|
|
1201
|
+
return styles$y.characterCount;
|
|
1202
|
+
const classes = [styles$y.characterCount];
|
|
1203
1203
|
const percentage = (value.length / maxLength) * 100;
|
|
1204
1204
|
if (percentage >= 100) {
|
|
1205
|
-
classes.push(styles$
|
|
1205
|
+
classes.push(styles$y.atLimit);
|
|
1206
1206
|
}
|
|
1207
1207
|
else if (percentage >= 80) {
|
|
1208
|
-
classes.push(styles$
|
|
1208
|
+
classes.push(styles$y.nearLimit);
|
|
1209
1209
|
}
|
|
1210
1210
|
return classes.join(' ');
|
|
1211
1211
|
};
|
|
1212
|
-
return (jsxRuntime.jsxs("div", { className: getContainerClassName(), children: [label && (jsxRuntime.jsxs("label", { htmlFor: textareaId, className: styles$
|
|
1212
|
+
return (jsxRuntime.jsxs("div", { className: getContainerClassName(), children: [label && (jsxRuntime.jsxs("label", { htmlFor: textareaId, className: styles$y.textareaLabel, children: [label, required && jsxRuntime.jsx("span", { className: styles$y.requiredIndicator, children: "*" })] })), jsxRuntime.jsx("textarea", { id: textareaId, value: value, onChange: (e) => onChange(e.target.value), rows: rows, placeholder: placeholder, maxLength: maxLength, className: styles$y.textareaInput, "aria-required": required, disabled: disabled || loading, "aria-invalid": error }), maxLength && (jsxRuntime.jsxs("div", { className: getCharCountClassName(), children: [jsxRuntime.jsx("span", { children: value.length }), jsxRuntime.jsx("span", { style: { opacity: 0.7 }, children: " / " }), jsxRuntime.jsx("span", { children: maxLength })] }))] }));
|
|
1213
1213
|
}
|
|
1214
1214
|
|
|
1215
|
-
var styles$
|
|
1215
|
+
var styles$x = {"textInput":"TextInput-module_textInput__b2LVM","required":"TextInput-module_required__7uLiM","inputError":"TextInput-module_inputError__QD0a-","errorMessage":"TextInput-module_errorMessage__nIDoQ","success":"TextInput-module_success__KbSS3","loading":"TextInput-module_loading__qXaca","withIcon":"TextInput-module_withIcon__-8swm","inputIcon":"TextInput-module_inputIcon__B4czN","withAction":"TextInput-module_withAction__JD3ku","actionButton":"TextInput-module_actionButton__zFJel"};
|
|
1216
1216
|
|
|
1217
1217
|
/**
|
|
1218
1218
|
* TextInput component - A versatile text input field with label and error handling
|
|
@@ -1249,21 +1249,21 @@ function TextInput({ label, value, onChange, type = "text", onBlur, placeholder,
|
|
|
1249
1249
|
const { handlers, playSound } = useComponentSound(soundConfig);
|
|
1250
1250
|
const prevValueRef = React.useRef(value);
|
|
1251
1251
|
const getContainerClassName = () => {
|
|
1252
|
-
const classes = [styles$
|
|
1252
|
+
const classes = [styles$x.textInput];
|
|
1253
1253
|
if (success)
|
|
1254
|
-
classes.push(styles$
|
|
1254
|
+
classes.push(styles$x.success);
|
|
1255
1255
|
if (loading)
|
|
1256
|
-
classes.push(styles$
|
|
1256
|
+
classes.push(styles$x.loading);
|
|
1257
1257
|
if (icon)
|
|
1258
|
-
classes.push(styles$
|
|
1258
|
+
classes.push(styles$x.withIcon);
|
|
1259
1259
|
if (actionButton)
|
|
1260
|
-
classes.push(styles$
|
|
1260
|
+
classes.push(styles$x.withAction);
|
|
1261
1261
|
return classes.join(' ');
|
|
1262
1262
|
};
|
|
1263
1263
|
React.useEffect(() => {
|
|
1264
1264
|
prevValueRef.current = value;
|
|
1265
1265
|
}, [value]);
|
|
1266
|
-
return (jsxRuntime.jsxs("div", { className: getContainerClassName(), children: [jsxRuntime.jsxs("label", { htmlFor: inputId, children: [label, required && jsxRuntime.jsx("span", { className: styles$
|
|
1266
|
+
return (jsxRuntime.jsxs("div", { className: getContainerClassName(), children: [jsxRuntime.jsxs("label", { htmlFor: inputId, children: [label, required && jsxRuntime.jsx("span", { className: styles$x.required, children: "*" })] }), jsxRuntime.jsxs("div", { style: { position: 'relative' }, children: [icon && jsxRuntime.jsx("div", { className: styles$x.inputIcon, children: icon }), jsxRuntime.jsx("input", { id: inputId, type: type, value: value, onChange: (e) => {
|
|
1267
1267
|
const newValue = e.target.value;
|
|
1268
1268
|
const oldValue = prevValueRef.current;
|
|
1269
1269
|
onChange(newValue);
|
|
@@ -1279,13 +1279,13 @@ function TextInput({ label, value, onChange, type = "text", onBlur, placeholder,
|
|
|
1279
1279
|
if (error && soundConfig?.onError) {
|
|
1280
1280
|
playSound(typeof soundConfig.onError === 'string' ? soundConfig.onError : 'error');
|
|
1281
1281
|
}
|
|
1282
|
-
}, onBlur: onBlur, placeholder: placeholder, className: error ? styles$
|
|
1282
|
+
}, onBlur: onBlur, placeholder: placeholder, className: error ? styles$x.inputError : '', "aria-invalid": !!error, "aria-describedby": error ? `${inputId}-error` : undefined, disabled: disabled || loading, maxLength: maxLength, autoComplete: autoComplete }), actionButton && (jsxRuntime.jsx("button", { type: "button", className: styles$x.actionButton, onClick: () => {
|
|
1283
1283
|
handlers.onClick?.();
|
|
1284
1284
|
actionButton.onClick();
|
|
1285
|
-
}, disabled: disabled || loading, children: actionButton.label }))] }), error && (jsxRuntime.jsx("span", { id: `${inputId}-error`, className: styles$
|
|
1285
|
+
}, disabled: disabled || loading, children: actionButton.label }))] }), error && (jsxRuntime.jsx("span", { id: `${inputId}-error`, className: styles$x.errorMessage, children: error }))] }));
|
|
1286
1286
|
}
|
|
1287
1287
|
|
|
1288
|
-
var styles$
|
|
1288
|
+
var styles$w = {"toggleContainer":"Toggle-module_toggleContainer__QxqQb","toggleButton":"Toggle-module_toggleButton__WUUf-","active":"Toggle-module_active__fX6Io"};
|
|
1289
1289
|
|
|
1290
1290
|
/**
|
|
1291
1291
|
* Toggle Component
|
|
@@ -1346,7 +1346,7 @@ function Toggle(props) {
|
|
|
1346
1346
|
justifyContent: 'center',
|
|
1347
1347
|
...style
|
|
1348
1348
|
};
|
|
1349
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1349
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$w.toggleContainer} ${className || ''}`, children: [jsxRuntime.jsxs(framerMotion.motion.button, { ref: leftButtonRef, className: `${styles$w.toggleButton} ${!isOn ? styles$w.active : ''}`, whileHover: { scale: 1.05 }, whileTap: { scale: 0.95 }, transition: { type: "spring", stiffness: 400, damping: 17 }, onClick: () => {
|
|
1350
1350
|
if (!isOn) {
|
|
1351
1351
|
// Already on left
|
|
1352
1352
|
if (enableCelebration) {
|
|
@@ -1361,7 +1361,7 @@ function Toggle(props) {
|
|
|
1361
1361
|
playSound('toggle');
|
|
1362
1362
|
}
|
|
1363
1363
|
onToggle(false);
|
|
1364
|
-
}, onMouseEnter: () => handlers.onMouseEnter?.(), style: buttonStyle, children: [jsxRuntime.jsx(framerMotion.motion.div, { animate: { scale: !isOn ? 1.1 : 1, rotate: !isOn ? [0, -5, 5, 0] : 0 }, transition: { duration: 0.3 }, children: leftIcon }), leftLabel] }), jsxRuntime.jsxs(framerMotion.motion.button, { ref: rightButtonRef, className: `${styles$
|
|
1364
|
+
}, onMouseEnter: () => handlers.onMouseEnter?.(), style: buttonStyle, children: [jsxRuntime.jsx(framerMotion.motion.div, { animate: { scale: !isOn ? 1.1 : 1, rotate: !isOn ? [0, -5, 5, 0] : 0 }, transition: { duration: 0.3 }, children: leftIcon }), leftLabel] }), jsxRuntime.jsxs(framerMotion.motion.button, { ref: rightButtonRef, className: `${styles$w.toggleButton} ${isOn ? styles$w.active : ''}`, whileHover: { scale: 1.05 }, whileTap: { scale: 0.95 }, transition: { type: "spring", stiffness: 400, damping: 17 }, onClick: () => {
|
|
1365
1365
|
if (isOn) {
|
|
1366
1366
|
// Already on right
|
|
1367
1367
|
if (enableCelebration) {
|
|
@@ -1379,7 +1379,7 @@ function Toggle(props) {
|
|
|
1379
1379
|
}, onMouseEnter: () => handlers.onMouseEnter?.(), style: buttonStyle, children: [jsxRuntime.jsx(framerMotion.motion.div, { animate: { scale: isOn ? 1.1 : 1, rotate: isOn ? [0, 5, -5, 0] : 0 }, transition: { duration: 0.3 }, children: rightIcon }), rightLabel] })] }));
|
|
1380
1380
|
}
|
|
1381
1381
|
|
|
1382
|
-
var styles$
|
|
1382
|
+
var styles$v = {"container":"NumberStepper-module_container__WSGlU","header":"NumberStepper-module_header__qXI1Y","icon":"NumberStepper-module_icon__vHgsw","label":"NumberStepper-module_label__AYr3g","stepper":"NumberStepper-module_stepper__oQhTp","disabled":"NumberStepper-module_disabled__kGB-g","button":"NumberStepper-module_button__YcjRt","buttonIcon":"NumberStepper-module_buttonIcon__odXec","valueContainer":"NumberStepper-module_valueContainer__87w2D","valueWrapper":"NumberStepper-module_valueWrapper__TH65N","value":"NumberStepper-module_value__BxJeD","limits":"NumberStepper-module_limits__-UrRE","limit":"NumberStepper-module_limit__7nbIP","small":"NumberStepper-module_small__P-k96","large":"NumberStepper-module_large__Lz6lk","outlined":"NumberStepper-module_outlined__CIXv7","filled":"NumberStepper-module_filled__IxOg-","minimal":"NumberStepper-module_minimal__y47-W","custom":"NumberStepper-module_custom__XGSVg","vertical":"NumberStepper-module_vertical__nBcL7","tally":"NumberStepper-module_tally__aO2zq","tallyRow":"NumberStepper-module_tallyRow__wcrtj","tallyButton":"NumberStepper-module_tallyButton__EUTXY","tallyButtonIcon":"NumberStepper-module_tallyButtonIcon__A3fDQ","tallyIcon":"NumberStepper-module_tallyIcon__ynB4C","tallyLabel":"NumberStepper-module_tallyLabel__kjXos","tallyBody":"NumberStepper-module_tallyBody__wDBsU","tallyMarks":"NumberStepper-module_tallyMarks__RU5qJ","tallyGroup":"NumberStepper-module_tallyGroup__0qUNo","tallyHint":"NumberStepper-module_tallyHint__zi-GM","tallyValue":"NumberStepper-module_tallyValue__CFJDk","pulse":"NumberStepper-module_pulse__51oUo"};
|
|
1383
1383
|
|
|
1384
1384
|
/**
|
|
1385
1385
|
* NumberStepper Component
|
|
@@ -1566,33 +1566,33 @@ const NumberStepper = ({ value, onChange, min = -Infinity, max = Infinity, step
|
|
|
1566
1566
|
setDisplayValue(finalValue);
|
|
1567
1567
|
}, [displayValue, min, max, step, onChange]);
|
|
1568
1568
|
const containerClasses = [
|
|
1569
|
-
styles$
|
|
1570
|
-
styles$
|
|
1571
|
-
styles$
|
|
1572
|
-
layout === 'vertical' && styles$
|
|
1573
|
-
disabled && styles$
|
|
1569
|
+
styles$v.container,
|
|
1570
|
+
styles$v[size],
|
|
1571
|
+
styles$v[variant],
|
|
1572
|
+
layout === 'vertical' && styles$v.vertical,
|
|
1573
|
+
disabled && styles$v.disabled,
|
|
1574
1574
|
className
|
|
1575
1575
|
].filter(Boolean).join(' ');
|
|
1576
1576
|
// Merge custom styles with hover states
|
|
1577
1577
|
const [isButtonHovered, setIsButtonHovered] = React.useState(null);
|
|
1578
1578
|
const isDecrementDisabled = disabled || value <= min;
|
|
1579
1579
|
const isIncrementDisabled = disabled || value >= max;
|
|
1580
|
-
const stepperContent = (jsxRuntime.jsxs("div", { className: styles$
|
|
1580
|
+
const stepperContent = (jsxRuntime.jsxs("div", { className: styles$v.stepper, style: customStyles.stepper, onKeyDown: handleKeyDown, tabIndex: disabled ? -1 : 0, ...handlers, children: [jsxRuntime.jsx(framerMotion.motion.button, { className: styles$v.button, style: {
|
|
1581
1581
|
...customStyles.button,
|
|
1582
1582
|
...(isButtonHovered === 'decrement' && customStyles.buttonHover)
|
|
1583
|
-
}, onMouseEnter: () => setIsButtonHovered('decrement'), onMouseLeave: () => setIsButtonHovered(null), onClick: handleDecrement, disabled: isDecrementDisabled, whileTap: !isDecrementDisabled ? { scale: 0.9 } : undefined, animate: isDecrementing ? { scale: [1, 1.2, 1] } : undefined, transition: { duration: 0.2 }, "aria-label": "Decrease value", children: customButtons.decrement || (showPlusMinus ? (jsxRuntime.jsx("span", { className: styles$
|
|
1583
|
+
}, onMouseEnter: () => setIsButtonHovered('decrement'), onMouseLeave: () => setIsButtonHovered(null), onClick: handleDecrement, disabled: isDecrementDisabled, whileTap: !isDecrementDisabled ? { scale: 0.9 } : undefined, animate: isDecrementing ? { scale: [1, 1.2, 1] } : undefined, transition: { duration: 0.2 }, "aria-label": "Decrease value", children: customButtons.decrement || (showPlusMinus ? (jsxRuntime.jsx("span", { className: styles$v.buttonIcon, style: customStyles.buttonIcon, children: "\u2212" })) : (jsxRuntime.jsx("svg", { className: styles$v.buttonIcon, style: customStyles.buttonIcon, viewBox: "0 0 24 24", fill: "none", children: jsxRuntime.jsx("path", { d: "M15 18L9 12L15 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }))) }), jsxRuntime.jsx("div", { className: styles$v.valueContainer, style: customStyles.valueContainer, children: jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: jsxRuntime.jsx(framerMotion.motion.div, { initial: { y: isIncrementing ? 10 : isDecrementing ? -10 : 0, opacity: 0 }, animate: { y: 0, opacity: 1 }, exit: { y: isIncrementing ? -10 : isDecrementing ? 10 : 0, opacity: 0 }, transition: { duration: 0.15 }, className: styles$v.valueWrapper, children: jsxRuntime.jsx("input", { type: "text", className: styles$v.value, style: customStyles.value, value: displayValue, onChange: handleInputChange, onBlur: handleInputBlur, disabled: disabled, "aria-label": label || "Number input", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value }) }, value) }) }), jsxRuntime.jsx(framerMotion.motion.button, { className: styles$v.button, style: {
|
|
1584
1584
|
...customStyles.button,
|
|
1585
1585
|
...(isButtonHovered === 'increment' && customStyles.buttonHover)
|
|
1586
|
-
}, onMouseEnter: () => setIsButtonHovered('increment'), onMouseLeave: () => setIsButtonHovered(null), onClick: handleIncrement, disabled: isIncrementDisabled, whileTap: !isIncrementDisabled ? { scale: 0.9 } : undefined, animate: isIncrementing ? { scale: [1, 1.2, 1] } : undefined, transition: { duration: 0.2 }, "aria-label": "Increase value", children: customButtons.increment || (showPlusMinus ? (jsxRuntime.jsx("span", { className: styles$
|
|
1586
|
+
}, onMouseEnter: () => setIsButtonHovered('increment'), onMouseLeave: () => setIsButtonHovered(null), onClick: handleIncrement, disabled: isIncrementDisabled, whileTap: !isIncrementDisabled ? { scale: 0.9 } : undefined, animate: isIncrementing ? { scale: [1, 1.2, 1] } : undefined, transition: { duration: 0.2 }, "aria-label": "Increase value", children: customButtons.increment || (showPlusMinus ? (jsxRuntime.jsx("span", { className: styles$v.buttonIcon, style: customStyles.buttonIcon, children: "+" })) : (jsxRuntime.jsx("svg", { className: styles$v.buttonIcon, style: customStyles.buttonIcon, viewBox: "0 0 24 24", fill: "none", children: jsxRuntime.jsx("path", { d: "M9 18L15 12L9 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }))) })] }));
|
|
1587
1587
|
// ── Tally variant: pen-stroke counter with explicit +/- buttons.
|
|
1588
1588
|
if (variant === 'tally') {
|
|
1589
1589
|
return (jsxRuntime.jsx(TallyRow, { value: value, label: label, icon: icon, color: color, disabled: disabled, emptyHint: tallyEmptyHint, className: containerClasses, customStyles: customStyles, onIncrement: handleIncrement, onDecrement: handleDecrement, ariaLabel: label || 'Tally counter', isDecrementDisabled: isDecrementDisabled, isIncrementDisabled: isIncrementDisabled }));
|
|
1590
1590
|
}
|
|
1591
1591
|
// For custom variant with horizontal layout, render differently
|
|
1592
1592
|
if (variant === 'custom' && (label || icon)) {
|
|
1593
|
-
return (jsxRuntime.jsxs("div", { className: containerClasses, style: { ...customStyles.container, display: 'flex', alignItems: 'center' }, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
1593
|
+
return (jsxRuntime.jsxs("div", { className: containerClasses, style: { ...customStyles.container, display: 'flex', alignItems: 'center' }, children: [jsxRuntime.jsxs("div", { className: styles$v.header, style: { ...customStyles.header, flex: 1, marginBottom: 0 }, children: [icon && jsxRuntime.jsx("span", { className: styles$v.icon, style: customStyles.icon, children: icon }), label && jsxRuntime.jsx("label", { className: styles$v.label, style: customStyles.label, children: label })] }), stepperContent, !hideLimits && (min !== -Infinity || max !== Infinity) && (jsxRuntime.jsxs("div", { className: styles$v.limits, style: customStyles.limits, children: [jsxRuntime.jsx("span", { className: styles$v.limit, children: min !== -Infinity && `Min: ${min}` }), jsxRuntime.jsx("span", { className: styles$v.limit, children: max !== Infinity && `Max: ${max}` })] }))] }));
|
|
1594
1594
|
}
|
|
1595
|
-
return (jsxRuntime.jsxs("div", { className: containerClasses, style: customStyles.container, children: [(label || icon) && (jsxRuntime.jsxs("div", { className: styles$
|
|
1595
|
+
return (jsxRuntime.jsxs("div", { className: containerClasses, style: customStyles.container, children: [(label || icon) && (jsxRuntime.jsxs("div", { className: styles$v.header, style: customStyles.header, children: [icon && jsxRuntime.jsx("span", { className: styles$v.icon, style: customStyles.icon, children: icon }), label && jsxRuntime.jsx("label", { className: styles$v.label, style: customStyles.label, children: label })] })), stepperContent, !hideLimits && (min !== -Infinity || max !== Infinity) && (jsxRuntime.jsxs("div", { className: styles$v.limits, style: customStyles.limits, children: [jsxRuntime.jsx("span", { className: styles$v.limit, children: min !== -Infinity && `Min: ${min}` }), jsxRuntime.jsx("span", { className: styles$v.limit, children: max !== Infinity && `Max: ${max}` })] }))] }));
|
|
1596
1596
|
};
|
|
1597
1597
|
const TallyMarks = ({ count, color }) => {
|
|
1598
1598
|
const groups = [];
|
|
@@ -1602,14 +1602,14 @@ const TallyMarks = ({ count, color }) => {
|
|
|
1602
1602
|
groups.push(n);
|
|
1603
1603
|
left -= n;
|
|
1604
1604
|
}
|
|
1605
|
-
return (jsxRuntime.jsx("div", { className: styles$
|
|
1605
|
+
return (jsxRuntime.jsx("div", { className: styles$v.tallyMarks, "aria-hidden": "true", children: groups.map((n, i) => (jsxRuntime.jsxs("svg", { className: styles$v.tallyGroup, width: "38", height: "22", viewBox: "0 0 38 22", children: [[0, 1, 2, 3].slice(0, Math.min(4, n)).map((j) => (jsxRuntime.jsx("line", { x1: 4 + j * 6, y1: "2", x2: 4 + j * 6, y2: "20", stroke: color, strokeWidth: "2", strokeLinecap: "round" }, j))), n === 5 && (jsxRuntime.jsx("line", { x1: "1", y1: "18", x2: "27", y2: "4", stroke: color, strokeWidth: "2", strokeLinecap: "round" }))] }, i))) }));
|
|
1606
1606
|
};
|
|
1607
1607
|
const TallyRow = ({ value, label, icon, color, disabled, emptyHint, className, customStyles, onIncrement, onDecrement, ariaLabel, isDecrementDisabled, isIncrementDisabled }) => {
|
|
1608
1608
|
const resolvedColor = color || 'currentColor';
|
|
1609
|
-
return (jsxRuntime.jsxs("div", { "aria-label": ariaLabel, "aria-disabled": disabled || undefined, className: `${className} ${styles$
|
|
1609
|
+
return (jsxRuntime.jsxs("div", { "aria-label": ariaLabel, "aria-disabled": disabled || undefined, className: `${className} ${styles$v.tallyRow}`, style: customStyles.container, children: [icon && (jsxRuntime.jsx("span", { className: styles$v.tallyIcon, style: { color: resolvedColor, ...customStyles.icon }, children: icon })), label && (jsxRuntime.jsx("span", { className: styles$v.tallyLabel, style: customStyles.label, children: label })), jsxRuntime.jsx("div", { className: styles$v.tallyBody, children: value <= 0 ? (jsxRuntime.jsx("span", { className: styles$v.tallyHint, children: emptyHint })) : (jsxRuntime.jsx(TallyMarks, { count: value, color: resolvedColor })) }), jsxRuntime.jsx("button", { type: "button", className: styles$v.tallyButton, onClick: onDecrement, disabled: isDecrementDisabled, "aria-label": `Decrease ${label || 'value'}`, children: jsxRuntime.jsx("span", { className: styles$v.tallyButtonIcon, children: "\u2212" }) }), jsxRuntime.jsx("span", { className: styles$v.tallyValue, style: { color: resolvedColor, ...customStyles.value }, "aria-hidden": "true", children: value }), jsxRuntime.jsx("button", { type: "button", className: styles$v.tallyButton, onClick: onIncrement, disabled: isIncrementDisabled, "aria-label": `Increase ${label || 'value'}`, children: jsxRuntime.jsx("span", { className: styles$v.tallyButtonIcon, children: "+" }) })] }));
|
|
1610
1610
|
};
|
|
1611
1611
|
|
|
1612
|
-
var styles$
|
|
1612
|
+
var styles$u = {"button":"ToggleButton-module_button__DTuyY","background":"ToggleButton-module_background__NwfTp","content":"ToggleButton-module_content__NHqIN","iconWrapper":"ToggleButton-module_iconWrapper__yN4sP","icon":"ToggleButton-module_icon__r8juX","label":"ToggleButton-module_label__4mPJP","hideMobile":"ToggleButton-module_hideMobile__GFAc3","checkmark":"ToggleButton-module_checkmark__ZJwf-","ripple":"ToggleButton-module_ripple__2-faB","small":"ToggleButton-module_small__MhfoN","large":"ToggleButton-module_large__A3naL","default":"ToggleButton-module_default__q8QaZ","active":"ToggleButton-module_active__4DjlR","outlined":"ToggleButton-module_outlined__OtqJB","filled":"ToggleButton-module_filled__LySNn","ghost":"ToggleButton-module_ghost__9KXcb","active-primary":"ToggleButton-module_active-primary__vXMP7","active-secondary":"ToggleButton-module_active-secondary__9Ttdx","active-success":"ToggleButton-module_active-success__oi0rr","active-danger":"ToggleButton-module_active-danger__VUdxr","active-warning":"ToggleButton-module_active-warning__77nSu","animation-scale":"ToggleButton-module_animation-scale__j-3mJ","scaleAnimation":"ToggleButton-module_scaleAnimation__Ms1j2","animation-rotate":"ToggleButton-module_animation-rotate__pBmfc","rotateAnimation":"ToggleButton-module_rotateAnimation__xWZJ5","animation-flip":"ToggleButton-module_animation-flip__ErAbm","flipAnimation":"ToggleButton-module_flipAnimation__qwDTb","disabled":"ToggleButton-module_disabled__Gv5ji"};
|
|
1613
1613
|
|
|
1614
1614
|
/**
|
|
1615
1615
|
* ToggleButton Component
|
|
@@ -1648,18 +1648,18 @@ var styles$q = {"button":"ToggleButton-module_button__DTuyY","background":"Toggl
|
|
|
1648
1648
|
const ToggleButton = ({ active, onClick, icon, label, disabled = false, size = 'medium', variant = 'default', activeColor = 'primary', showCheckmark = false, animation = 'scale', className = '', style = {}, color, tooltip, hideLabelOnMobile = false, soundConfig }) => {
|
|
1649
1649
|
const { handlers, playSound } = useComponentSound(soundConfig);
|
|
1650
1650
|
const buttonClasses = [
|
|
1651
|
-
styles$
|
|
1652
|
-
styles$
|
|
1653
|
-
styles$
|
|
1654
|
-
active && styles$
|
|
1655
|
-
active && styles$
|
|
1656
|
-
disabled && styles$
|
|
1657
|
-
animation !== 'none' && styles$
|
|
1651
|
+
styles$u.button,
|
|
1652
|
+
styles$u[size],
|
|
1653
|
+
styles$u[variant],
|
|
1654
|
+
active && styles$u.active,
|
|
1655
|
+
active && styles$u[`active-${activeColor}`],
|
|
1656
|
+
disabled && styles$u.disabled,
|
|
1657
|
+
animation !== 'none' && styles$u[`animation-${animation}`],
|
|
1658
1658
|
className
|
|
1659
1659
|
].filter(Boolean).join(' ');
|
|
1660
1660
|
const labelClasses = [
|
|
1661
|
-
styles$
|
|
1662
|
-
hideLabelOnMobile && styles$
|
|
1661
|
+
styles$u.label,
|
|
1662
|
+
hideLabelOnMobile && styles$u.hideMobile
|
|
1663
1663
|
].filter(Boolean).join(' ');
|
|
1664
1664
|
const iconVariants = {
|
|
1665
1665
|
scale: {
|
|
@@ -1723,10 +1723,10 @@ const ToggleButton = ({ active, onClick, icon, label, disabled = false, size = '
|
|
|
1723
1723
|
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: buttonClasses, style: dynamicStyle, onClick: () => {
|
|
1724
1724
|
playSound('toggle');
|
|
1725
1725
|
onClick();
|
|
1726
|
-
}, disabled: disabled, whileHover: !disabled ? { scale: 1.05 } : undefined, whileTap: !disabled ? { scale: 0.95 } : undefined, title: tooltip, "aria-pressed": active, "aria-label": label, ...handlers, children: [jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
1726
|
+
}, disabled: disabled, whileHover: !disabled ? { scale: 1.05 } : undefined, whileTap: !disabled ? { scale: 0.95 } : undefined, title: tooltip, "aria-pressed": active, "aria-label": label, ...handlers, children: [jsxRuntime.jsx(framerMotion.motion.div, { className: styles$u.background, variants: backgroundVariants, initial: "inactive", animate: active ? "active" : "inactive" }), jsxRuntime.jsxs("div", { className: styles$u.content, children: [icon && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$u.iconWrapper, variants: iconVariants[animation], initial: "inactive", animate: active ? "active" : "inactive", transition: { duration: 0.3 }, children: typeof icon === 'string' ? (jsxRuntime.jsx("span", { className: styles$u.icon, children: icon })) : (jsxRuntime.jsx("div", { className: styles$u.icon, children: icon })) })), label && jsxRuntime.jsx("span", { className: labelClasses, children: label }), jsxRuntime.jsx(framerMotion.AnimatePresence, { children: showCheckmark && active && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$u.checkmark, variants: checkmarkVariants, initial: "hidden", animate: "visible", exit: "hidden", children: jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", fill: "none", children: jsxRuntime.jsx("path", { d: "M20 6L9 17L4 12", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }) }) })) })] }), jsxRuntime.jsx(framerMotion.AnimatePresence, { children: active && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$u.ripple, initial: { scale: 0, opacity: 0.5 }, animate: { scale: 2, opacity: 0 }, exit: { scale: 0, opacity: 0 }, transition: { duration: 0.6 } })) })] }));
|
|
1727
1727
|
};
|
|
1728
1728
|
|
|
1729
|
-
var styles$
|
|
1729
|
+
var styles$t = {"slider":"Slider-module_slider__RD4G7","label":"Slider-module_label__j4H8M","sliderContainer":"Slider-module_sliderContainer__kQICC","track":"Slider-module_track__fQ-oP","dragging":"Slider-module_dragging__rynPv","fill":"Slider-module_fill__AYR4-","input":"Slider-module_input__fqY-G","thumb":"Slider-module_thumb__yQJho","tooltip":"Slider-module_tooltip__ZubHR","tooltipArrow":"Slider-module_tooltipArrow__1aV9s","valueDisplay":"Slider-module_valueDisplay__V6caL","labelsContainer":"Slider-module_labelsContainer__F6ojF","labelItem":"Slider-module_labelItem__FuEaY","dotsContainer":"Slider-module_dotsContainer__zpcZe","dot":"Slider-module_dot__TkGh5","dotFilled":"Slider-module_dotFilled__n779E","size-sm":"Slider-module_size-sm__Y2bmS","size-lg":"Slider-module_size-lg__RSnPf","disabled":"Slider-module_disabled__gxYoH","loading":"Slider-module_loading__6FkKb","loadingTrack":"Slider-module_loadingTrack__8ItT2","loadingIndicator":"Slider-module_loadingIndicator__Elydq"};
|
|
1730
1730
|
|
|
1731
1731
|
/**
|
|
1732
1732
|
* Slider component — responsive, accessible range input with a styled track, fill, and thumb.
|
|
@@ -1765,11 +1765,11 @@ function Slider({ value, onChange, min = 0, max = 100, step = 1, label, showValu
|
|
|
1765
1765
|
};
|
|
1766
1766
|
const endDrag = () => setIsDragging(false);
|
|
1767
1767
|
const dynamicColor = getDynamicColor();
|
|
1768
|
-
const sizeClass = styles$
|
|
1769
|
-
const stateClass = disabled ? styles$
|
|
1770
|
-
const dragClass = isDragging ? styles$
|
|
1768
|
+
const sizeClass = styles$t[`size-${size}`];
|
|
1769
|
+
const stateClass = disabled ? styles$t.disabled : '';
|
|
1770
|
+
const dragClass = isDragging ? styles$t.dragging : '';
|
|
1771
1771
|
if (loading) {
|
|
1772
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1772
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$t.slider} ${sizeClass} ${styles$t.loading} ${className}`, style: style, children: [label && jsxRuntime.jsx("label", { className: styles$t.label, children: label }), jsxRuntime.jsx("div", { className: styles$t.loadingTrack, children: jsxRuntime.jsx(framerMotion.motion.div, { className: styles$t.loadingIndicator, animate: { x: ['-100%', '200%'] }, transition: { repeat: Infinity, duration: 1.5, ease: 'easeInOut' } }) })] }));
|
|
1773
1773
|
}
|
|
1774
1774
|
if (variant === 'dots') {
|
|
1775
1775
|
const dotCount = Math.max(0, Math.floor((max - min) / step));
|
|
@@ -1781,9 +1781,9 @@ function Slider({ value, onChange, min = 0, max = 100, step = 1, label, showValu
|
|
|
1781
1781
|
const next = value === dotValue ? dotValue - step : dotValue;
|
|
1782
1782
|
onChange(Math.max(min, next));
|
|
1783
1783
|
};
|
|
1784
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1784
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$t.slider} ${sizeClass} ${stateClass} ${className}`, style: style, ...handlers, children: [label && jsxRuntime.jsx("label", { className: styles$t.label, children: label }), jsxRuntime.jsx("div", { className: styles$t.dotsContainer, role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, "aria-label": label, children: dotValues.map((dotValue) => {
|
|
1785
1785
|
const filled = dotValue <= value;
|
|
1786
|
-
return (jsxRuntime.jsx("button", { type: "button", className: `${styles$
|
|
1786
|
+
return (jsxRuntime.jsx("button", { type: "button", className: `${styles$t.dot} ${filled ? styles$t.dotFilled : ''}`, style: filled
|
|
1787
1787
|
? {
|
|
1788
1788
|
backgroundColor: dynamicColor,
|
|
1789
1789
|
borderColor: dynamicColor,
|
|
@@ -1791,7 +1791,7 @@ function Slider({ value, onChange, min = 0, max = 100, step = 1, label, showValu
|
|
|
1791
1791
|
: undefined, onClick: () => handleDotClick(dotValue), disabled: disabled, "aria-label": valueFormatter
|
|
1792
1792
|
? valueFormatter(dotValue)
|
|
1793
1793
|
: `Set to ${dotValue}` }, dotValue));
|
|
1794
|
-
}) }), showValue && (jsxRuntime.jsx("div", { className: styles$
|
|
1794
|
+
}) }), showValue && (jsxRuntime.jsx("div", { className: styles$t.valueDisplay, style: { color: dynamicColor }, children: formatValue(value) }))] }));
|
|
1795
1795
|
}
|
|
1796
1796
|
// Inset the thumb so its bounding box stays inside the track at 0/100%.
|
|
1797
1797
|
// At percentage=0: marginLeft=0 → thumb flush-left. At 100%: marginLeft=-thumbSize → flush-right.
|
|
@@ -1799,11 +1799,11 @@ function Slider({ value, onChange, min = 0, max = 100, step = 1, label, showValu
|
|
|
1799
1799
|
left: `${percentage}%`,
|
|
1800
1800
|
marginLeft: `calc(var(--slider-thumb-size) * ${-percentage / 100})`,
|
|
1801
1801
|
};
|
|
1802
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
1802
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$t.slider} ${sizeClass} ${stateClass} ${dragClass} ${className}`, style: style, children: [label && jsxRuntime.jsx("label", { className: styles$t.label, children: label }), jsxRuntime.jsxs("div", { className: styles$t.sliderContainer, children: [jsxRuntime.jsx("div", { className: styles$t.track, children: jsxRuntime.jsx("div", { className: styles$t.fill, style: { width: `${percentage}%`, backgroundColor: dynamicColor } }) }), jsxRuntime.jsx("input", { type: "range", min: min, max: max, step: step, value: value, onChange: handleChange, onPointerDown: startDrag, onPointerUp: endDrag, onPointerCancel: endDrag, onBlur: endDrag, ...handlers, className: styles$t.input, disabled: disabled, "aria-label": label }), jsxRuntime.jsx("div", { className: styles$t.thumb, style: {
|
|
1803
1803
|
...insetStyle,
|
|
1804
1804
|
backgroundColor: dynamicColor,
|
|
1805
1805
|
borderColor: colors.thumb || dynamicColor,
|
|
1806
|
-
} }), jsxRuntime.jsx(framerMotion.AnimatePresence, { children: showTooltip && isDragging && !disabled && (jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$
|
|
1806
|
+
} }), jsxRuntime.jsx(framerMotion.AnimatePresence, { children: showTooltip && isDragging && !disabled && (jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$t.tooltip, style: { ...insetStyle, backgroundColor: dynamicColor }, initial: { opacity: 0, y: 6, scale: 0.9 }, animate: { opacity: 1, y: 0, scale: 1 }, exit: { opacity: 0, y: 6, scale: 0.9 }, transition: { duration: 0.15 }, children: [tooltipContent ? tooltipContent(value) : formatValue(value), jsxRuntime.jsx("div", { className: styles$t.tooltipArrow, style: { borderTopColor: dynamicColor } })] })) })] }), showValue && (jsxRuntime.jsx("div", { className: styles$t.valueDisplay, style: { color: dynamicColor }, children: formatValue(value) })), labels.length > 0 && (jsxRuntime.jsx("div", { className: styles$t.labelsContainer, children: labels.map((labelConfig, index) => {
|
|
1807
1807
|
let position = 0;
|
|
1808
1808
|
if (labelConfig.position === 'start')
|
|
1809
1809
|
position = 0;
|
|
@@ -1811,11 +1811,11 @@ function Slider({ value, onChange, min = 0, max = 100, step = 1, label, showValu
|
|
|
1811
1811
|
position = 100;
|
|
1812
1812
|
else if (typeof labelConfig.position === 'number')
|
|
1813
1813
|
position = labelConfig.position;
|
|
1814
|
-
return (jsxRuntime.jsx("div", { className: styles$
|
|
1814
|
+
return (jsxRuntime.jsx("div", { className: styles$t.labelItem, style: { left: `${position}%`, color: labelConfig.color }, children: labelConfig.label }, index));
|
|
1815
1815
|
}) }))] }));
|
|
1816
1816
|
}
|
|
1817
1817
|
|
|
1818
|
-
var styles$
|
|
1818
|
+
var styles$s = {"loadingContainer":"LoadingSpinner-module_loadingContainer__m5u51","fullScreen":"LoadingSpinner-module_fullScreen__TuAem","overlay":"LoadingSpinner-module_overlay__X7FTa","shimmer":"LoadingSpinner-module_shimmer__xw4AH","small":"LoadingSpinner-module_small__nq8A3","loadingText":"LoadingSpinner-module_loadingText__wWwna","medium":"LoadingSpinner-module_medium__3JC1S","large":"LoadingSpinner-module_large__4MvAc","dotsSpinner":"LoadingSpinner-module_dotsSpinner__PXtfs","dot1":"LoadingSpinner-module_dot1__5YKSi","dot2":"LoadingSpinner-module_dot2__l6Rbu","dot3":"LoadingSpinner-module_dot3__b9YPW","circleSpinner":"LoadingSpinner-module_circleSpinner__ZmmWs","pulseSpinner":"LoadingSpinner-module_pulseSpinner__wTtDJ","textGradient":"LoadingSpinner-module_textGradient__QDrTY","sparkleContainer":"LoadingSpinner-module_sparkleContainer__9XLJG","sparkle":"LoadingSpinner-module_sparkle__LtFFf"};
|
|
1819
1819
|
|
|
1820
1820
|
const defaultMessages = [
|
|
1821
1821
|
'Loading your content...',
|
|
@@ -1899,22 +1899,22 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
1899
1899
|
}
|
|
1900
1900
|
}, [currentMessageIndex, message, messagesToUse, showMessage]);
|
|
1901
1901
|
const containerClasses = [
|
|
1902
|
-
styles$
|
|
1903
|
-
styles$
|
|
1904
|
-
styles$
|
|
1905
|
-
fullScreen && styles$
|
|
1906
|
-
overlay && styles$
|
|
1902
|
+
styles$s.loadingContainer,
|
|
1903
|
+
styles$s[size],
|
|
1904
|
+
styles$s[variant],
|
|
1905
|
+
fullScreen && styles$s.fullScreen,
|
|
1906
|
+
overlay && styles$s.overlay,
|
|
1907
1907
|
className
|
|
1908
1908
|
].filter(Boolean).join(' ');
|
|
1909
1909
|
const customStyle = {
|
|
1910
1910
|
...(color && { '--spinner-color': color }),
|
|
1911
1911
|
...(backgroundColor && { '--spinner-background': backgroundColor }),
|
|
1912
1912
|
};
|
|
1913
|
-
const renderDots = () => (jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$
|
|
1913
|
+
const renderDots = () => (jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$s.dotsSpinner, animate: { rotate: 360 }, transition: {
|
|
1914
1914
|
duration: 2,
|
|
1915
1915
|
repeat: Infinity,
|
|
1916
1916
|
ease: 'linear'
|
|
1917
|
-
}, children: [jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
1917
|
+
}, children: [jsxRuntime.jsx(framerMotion.motion.div, { className: styles$s.dot1, animate: {
|
|
1918
1918
|
scale: [1, 1.3, 1],
|
|
1919
1919
|
y: [0, -6, 0]
|
|
1920
1920
|
}, transition: {
|
|
@@ -1922,7 +1922,7 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
1922
1922
|
repeat: Infinity,
|
|
1923
1923
|
ease: 'easeInOut',
|
|
1924
1924
|
delay: 0
|
|
1925
|
-
} }), jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
1925
|
+
} }), jsxRuntime.jsx(framerMotion.motion.div, { className: styles$s.dot2, animate: {
|
|
1926
1926
|
scale: [1, 1.3, 1],
|
|
1927
1927
|
y: [0, -6, 0]
|
|
1928
1928
|
}, transition: {
|
|
@@ -1930,7 +1930,7 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
1930
1930
|
repeat: Infinity,
|
|
1931
1931
|
ease: 'easeInOut',
|
|
1932
1932
|
delay: 0.5
|
|
1933
|
-
} }), jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
1933
|
+
} }), jsxRuntime.jsx(framerMotion.motion.div, { className: styles$s.dot3, animate: {
|
|
1934
1934
|
scale: [1, 1.3, 1],
|
|
1935
1935
|
y: [0, -6, 0]
|
|
1936
1936
|
}, transition: {
|
|
@@ -1939,12 +1939,12 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
1939
1939
|
ease: 'easeInOut',
|
|
1940
1940
|
delay: 1
|
|
1941
1941
|
} })] }));
|
|
1942
|
-
const renderSpinner = () => (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
1942
|
+
const renderSpinner = () => (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$s.circleSpinner, animate: { rotate: 360 }, transition: {
|
|
1943
1943
|
duration: 1,
|
|
1944
1944
|
repeat: Infinity,
|
|
1945
1945
|
ease: 'linear'
|
|
1946
1946
|
} }));
|
|
1947
|
-
const renderPulse = () => (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
1947
|
+
const renderPulse = () => (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$s.pulseSpinner, animate: {
|
|
1948
1948
|
scale: [1, 1.2, 1],
|
|
1949
1949
|
opacity: [1, 0.7, 1]
|
|
1950
1950
|
}, transition: {
|
|
@@ -1963,10 +1963,10 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
1963
1963
|
return renderDots();
|
|
1964
1964
|
}
|
|
1965
1965
|
};
|
|
1966
|
-
return (jsxRuntime.jsxs("div", { className: containerClasses, style: customStyle, children: [renderSpinnerVariant(), showMessage && (jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: jsxRuntime.jsx(framerMotion.motion.p, { className: styles$
|
|
1966
|
+
return (jsxRuntime.jsxs("div", { className: containerClasses, style: customStyle, children: [renderSpinnerVariant(), showMessage && (jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "wait", children: jsxRuntime.jsx(framerMotion.motion.p, { className: styles$s.loadingText, initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 }, transition: {
|
|
1967
1967
|
duration: 0.4,
|
|
1968
1968
|
ease: 'easeOut'
|
|
1969
|
-
}, children: currentMessage }, currentMessage) })), showSparkles && (jsxRuntime.jsx("div", { className: styles$
|
|
1969
|
+
}, children: currentMessage }, currentMessage) })), showSparkles && (jsxRuntime.jsx("div", { className: styles$s.sparkleContainer, children: [...Array(4)].map((_, i) => (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$s.sparkle, animate: {
|
|
1970
1970
|
opacity: [0, 1, 0],
|
|
1971
1971
|
scale: [0.5, 1, 0.5],
|
|
1972
1972
|
rotate: [0, 180, 360]
|
|
@@ -1981,7 +1981,7 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
1981
1981
|
} }, i))) }))] }));
|
|
1982
1982
|
};
|
|
1983
1983
|
|
|
1984
|
-
var styles$
|
|
1984
|
+
var styles$r = {"wrapper":"DecryptedText-module_wrapper__tuLvf","srOnly":"DecryptedText-module_srOnly__A-K2T"};
|
|
1985
1985
|
|
|
1986
1986
|
/**
|
|
1987
1987
|
* DecryptedText Component
|
|
@@ -2165,13 +2165,13 @@ const DecryptedText = ({ text, speed = 50, maxIterations = 10, sequential = fals
|
|
|
2165
2165
|
onMouseLeave: () => setIsHovering(false),
|
|
2166
2166
|
}
|
|
2167
2167
|
: {};
|
|
2168
|
-
return (jsxRuntime.jsxs(framerMotion.motion.span, { className: `${styles$
|
|
2168
|
+
return (jsxRuntime.jsxs(framerMotion.motion.span, { className: `${styles$r.wrapper} ${parentClassName}`, ref: containerRef, ...hoverProps, ...props, children: [jsxRuntime.jsx("span", { className: styles$r.srOnly, children: displayText }), jsxRuntime.jsx("span", { "aria-hidden": "true", children: displayText.split('').map((char, index) => {
|
|
2169
2169
|
const isRevealedOrDone = revealedIndices.has(index) || !isScrambling || !isHovering;
|
|
2170
2170
|
return (jsxRuntime.jsx("span", { className: isRevealedOrDone ? className : encryptedClassName, children: char }, index));
|
|
2171
2171
|
}) })] }));
|
|
2172
2172
|
};
|
|
2173
2173
|
|
|
2174
|
-
var styles$
|
|
2174
|
+
var styles$q = {"arrayInput":"ArrayInput-module_arrayInput__q1x7A","arrayInputLabel":"ArrayInput-module_arrayInputLabel__HyUC7","arrayInputItem":"ArrayInput-module_arrayInputItem__bFtgl","inputWrapper":"ArrayInput-module_inputWrapper__ajhbW","input":"ArrayInput-module_input__1uywi","complexItem":"ArrayInput-module_complexItem__zr-Q-","fieldsWrapper":"ArrayInput-module_fieldsWrapper__7BVPa","removeButton":"ArrayInput-module_removeButton__gYf8Y","addButton":"ArrayInput-module_addButton__mia29"};
|
|
2175
2175
|
|
|
2176
2176
|
/**
|
|
2177
2177
|
* ArrayInput component - Versatile dynamic list manager
|
|
@@ -2238,11 +2238,11 @@ function SimpleArrayInput({ label, values, onChange, placeholder, itemStyle, inp
|
|
|
2238
2238
|
itemIdsRef.current.splice(index, 1);
|
|
2239
2239
|
onChange(newValues);
|
|
2240
2240
|
};
|
|
2241
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
2241
|
+
return (jsxRuntime.jsxs("div", { className: styles$q.arrayInput, children: [jsxRuntime.jsx("h3", { className: styles$q.arrayInputLabel, children: label }), jsxRuntime.jsx("div", { children: jsxRuntime.jsx(framerMotion.AnimatePresence, { children: values.map((value, index) => (jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$q.arrayInputItem, style: itemStyle, initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0 }, transition: {
|
|
2242
2242
|
duration: 0.3,
|
|
2243
2243
|
ease: "easeInOut",
|
|
2244
2244
|
layout: { duration: 0.2 }
|
|
2245
|
-
}, children: [jsxRuntime.jsx("div", { className: styles$
|
|
2245
|
+
}, children: [jsxRuntime.jsx("div", { className: styles$q.inputWrapper, children: multiline ? (jsxRuntime.jsx("div", { style: inputStyle, children: jsxRuntime.jsx(TextArea, { label: "", value: value, onChange: (newValue) => handleChange(index, newValue), placeholder: placeholder, rows: rows, compact: true }) })) : (jsxRuntime.jsx("input", { type: "text", value: value, onChange: (e) => handleChange(index, e.target.value), placeholder: placeholder, className: styles$q.input, style: inputStyle })) }), jsxRuntime.jsx(Button, { variant: "ghost", size: "small", onClick: () => handleRemove(index), "aria-label": "Remove item", className: styles$q.removeButton, children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) })] }, itemIdsRef.current[index]))) }) }), jsxRuntime.jsx(Button, { variant: buttonVariant, size: "small", onClick: handleAdd, className: styles$q.addButton, children: label })] }));
|
|
2246
2246
|
}
|
|
2247
2247
|
// Complex object array implementation
|
|
2248
2248
|
function ComplexArrayInput({ label, values, onChange, fields, getKey, itemStyle, inputStyle, buttonVariant = 'primary' }) {
|
|
@@ -2267,14 +2267,14 @@ function ComplexArrayInput({ label, values, onChange, fields, getKey, itemStyle,
|
|
|
2267
2267
|
// Generate key from all field values
|
|
2268
2268
|
return fields.map(f => item[f.name] || '').join('-') + `-${index}`;
|
|
2269
2269
|
};
|
|
2270
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
2270
|
+
return (jsxRuntime.jsxs("div", { className: styles$q.arrayInput, children: [jsxRuntime.jsx("h3", { className: styles$q.arrayInputLabel, children: label }), jsxRuntime.jsx("div", { children: jsxRuntime.jsx(framerMotion.AnimatePresence, { children: values.map((value, index) => (jsxRuntime.jsxs(framerMotion.motion.div, { className: `${styles$q.arrayInputItem} ${fields.length > 1 ? styles$q.complexItem : ''}`, style: itemStyle, initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0 }, transition: {
|
|
2271
2271
|
duration: 0.3,
|
|
2272
2272
|
ease: "easeInOut",
|
|
2273
2273
|
layout: { duration: 0.2 }
|
|
2274
|
-
}, children: [jsxRuntime.jsx("div", { className: styles$
|
|
2274
|
+
}, children: [jsxRuntime.jsx("div", { className: styles$q.fieldsWrapper, children: fields.map((field) => (jsxRuntime.jsx("div", { style: inputStyle, children: field.multiline ? (jsxRuntime.jsx(TextArea, { value: value[field.name] || '', onChange: (newValue) => handleChange(index, field.name, newValue), label: field.label, placeholder: field.placeholder, rows: field.rows, compact: true })) : (jsxRuntime.jsx(TextInput, { value: value[field.name] || '', onChange: (newValue) => handleChange(index, field.name, newValue), label: field.label, type: field.type, placeholder: field.placeholder })) }, field.name))) }), jsxRuntime.jsx(Button, { variant: "ghost", size: "small", onClick: () => handleRemove(index), "aria-label": "Remove item", className: styles$q.removeButton, children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: jsxRuntime.jsx("path", { d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" }) }) })] }, generateKey(value, index)))) }) }), jsxRuntime.jsxs(Button, { variant: buttonVariant, size: "small", onClick: handleAdd, className: styles$q.addButton, children: ["Add ", label] })] }));
|
|
2275
2275
|
}
|
|
2276
2276
|
|
|
2277
|
-
var styles$
|
|
2277
|
+
var styles$p = {"fab":"EditFAB-module_fab__nSrTJ","primary":"EditFAB-module_primary__zbA9n","secondary":"EditFAB-module_secondary__BnXs0","success":"EditFAB-module_success__kcLg3","loader":"EditFAB-module_loader__TaJOm","draggable":"EditFAB-module_draggable__eE2vE","dragging":"EditFAB-module_dragging__btRJe"};
|
|
2278
2278
|
|
|
2279
2279
|
const EditFAB = ({ canEdit, isEditMode, hasUnsavedChanges = false, isSaving = false, onEnterEditMode, onExitEditMode, position = { bottom: 32, right: 32 } }) => {
|
|
2280
2280
|
const [isMobile, setIsMobile] = React.useState(false);
|
|
@@ -2359,15 +2359,15 @@ const EditFAB = ({ canEdit, isEditMode, hasUnsavedChanges = false, isSaving = fa
|
|
|
2359
2359
|
};
|
|
2360
2360
|
const getVariantClass = () => {
|
|
2361
2361
|
if (isSaving)
|
|
2362
|
-
return styles$
|
|
2362
|
+
return styles$p.primary;
|
|
2363
2363
|
if (isEditMode) {
|
|
2364
|
-
return hasUnsavedChanges ? styles$
|
|
2364
|
+
return hasUnsavedChanges ? styles$p.success : styles$p.secondary;
|
|
2365
2365
|
}
|
|
2366
|
-
return styles$
|
|
2366
|
+
return styles$p.primary;
|
|
2367
2367
|
};
|
|
2368
2368
|
const getIcon = () => {
|
|
2369
2369
|
if (isSaving) {
|
|
2370
|
-
return jsxRuntime.jsx("div", { className: styles$
|
|
2370
|
+
return jsxRuntime.jsx("div", { className: styles$p.loader });
|
|
2371
2371
|
}
|
|
2372
2372
|
if (isEditMode) {
|
|
2373
2373
|
return hasUnsavedChanges ? jsxRuntime.jsx(lucideReact.Check, { size: 24 }) : jsxRuntime.jsx(lucideReact.X, { size: 24 });
|
|
@@ -2382,14 +2382,14 @@ const EditFAB = ({ canEdit, isEditMode, hasUnsavedChanges = false, isSaving = fa
|
|
|
2382
2382
|
}
|
|
2383
2383
|
return "Enter edit mode";
|
|
2384
2384
|
};
|
|
2385
|
-
return (jsxRuntime.jsx(framerMotion.motion.button, { ref: fabRef, className: `${styles$
|
|
2385
|
+
return (jsxRuntime.jsx(framerMotion.motion.button, { ref: fabRef, className: `${styles$p.fab} ${getVariantClass()} ${isMobile ? styles$p.draggable : ''} ${isDragging ? styles$p.dragging : ''}`, style: getPositionStyles(), onClick: handleClick, onTouchStart: handleTouchStart, onTouchMove: handleTouchMove, onTouchEnd: handleTouchEnd, disabled: isSaving, "aria-label": getAriaLabel(), initial: { scale: 0, opacity: 0 }, animate: { scale: 1, opacity: 1 }, exit: { scale: 0, opacity: 0 }, whileHover: !isSaving && !isDragging ? { scale: 1.1 } : {}, whileTap: !isSaving && !isDragging ? { scale: 0.9 } : {}, transition: {
|
|
2386
2386
|
type: "spring",
|
|
2387
2387
|
stiffness: 260,
|
|
2388
2388
|
damping: 20
|
|
2389
2389
|
}, children: getIcon() }));
|
|
2390
2390
|
};
|
|
2391
2391
|
|
|
2392
|
-
var styles$
|
|
2392
|
+
var styles$o = {"searchContainer":"SearchBar-module_searchContainer__TdM1w","searchInputWrapper":"SearchBar-module_searchInputWrapper__kCZLU","searchIcon":"SearchBar-module_searchIcon__IIxEu","searchInput":"SearchBar-module_searchInput__V4gkE","clearButton":"SearchBar-module_clearButton__7fNIY","filterSelect":"SearchBar-module_filterSelect__xIVE4","resultsDropdown":"SearchBar-module_resultsDropdown__yh6NF","loadingState":"SearchBar-module_loadingState__4gidK","emptyState":"SearchBar-module_emptyState__RbI4s","spinner":"SearchBar-module_spinner__PMc6-","resultsGroups":"SearchBar-module_resultsGroups__U24DC","resultGroup":"SearchBar-module_resultGroup__SoTQH","groupHeader":"SearchBar-module_groupHeader__bFRHA","groupIcon":"SearchBar-module_groupIcon__9ENM-","groupTitle":"SearchBar-module_groupTitle__ZekZs","groupCount":"SearchBar-module_groupCount__PQIqw","groupResults":"SearchBar-module_groupResults__xTF52","resultItem":"SearchBar-module_resultItem__VaKKy","highlighted":"SearchBar-module_highlighted__Q-3sH","resultTitle":"SearchBar-module_resultTitle__i1uqL","resultSubtitle":"SearchBar-module_resultSubtitle__LQOJ1","resultMeta":"SearchBar-module_resultMeta__Kmkrn","resultContent":"SearchBar-module_resultContent__TzVzL","highlight":"SearchBar-module_highlight__Q3PSP"};
|
|
2393
2393
|
|
|
2394
2394
|
// Default filter options for backwards compatibility
|
|
2395
2395
|
const defaultFilterOptions = [
|
|
@@ -2582,20 +2582,20 @@ const SearchBar = ({ className, placeholder = "Search (Ctrl+Space)...", onSearch
|
|
|
2582
2582
|
return text || '';
|
|
2583
2583
|
const regex = new RegExp(`(${highlight.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')})`, 'gi');
|
|
2584
2584
|
const parts = text.split(regex);
|
|
2585
|
-
return parts.map((part, index) => regex.test(part) ? (jsxRuntime.jsx("mark", { className: styles$
|
|
2585
|
+
return parts.map((part, index) => regex.test(part) ? (jsxRuntime.jsx("mark", { className: styles$o.highlight, children: part }, index)) : (part));
|
|
2586
2586
|
};
|
|
2587
|
-
return (jsxRuntime.jsxs("div", { ref: searchRef, className: `${styles$
|
|
2587
|
+
return (jsxRuntime.jsxs("div", { ref: searchRef, className: `${styles$o.searchContainer} ${className || ''}`, children: [jsxRuntime.jsxs("div", { className: styles$o.searchInputWrapper, children: [jsxRuntime.jsx(lucideReact.Search, { className: styles$o.searchIcon }), jsxRuntime.jsx("input", { ref: inputRef, type: "text", value: query, onChange: (e) => setQuery(e.target.value), onKeyDown: handleKeyDown, onFocus: () => query.trim() && results.length > 0 && setIsDropdownOpen(true), placeholder: placeholder, className: styles$o.searchInput, "aria-label": "Search", "aria-expanded": isDropdownOpen, "aria-controls": "search-results", "aria-autocomplete": "list" }), query && (jsxRuntime.jsx(framerMotion.motion.button, { className: styles$o.clearButton, onClick: handleClear, whileHover: { scale: 1.1 }, whileTap: { scale: 0.9 }, initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.8 }, children: jsxRuntime.jsx(lucideReact.X, {}) })), showFilter && (jsxRuntime.jsx("select", { value: filter, onChange: (e) => setFilter(e.target.value), className: styles$o.filterSelect, "aria-label": "Filter search results", children: filterOptions.map(option => (jsxRuntime.jsx("option", { value: option.value, children: option.label }, option.value))) }))] }), jsxRuntime.jsx(framerMotion.AnimatePresence, { children: isDropdownOpen && (jsxRuntime.jsx(framerMotion.motion.div, { ref: resultsRef, id: "search-results", className: styles$o.resultsDropdown, initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 }, transition: { duration: 0.2 }, children: isLoading ? (jsxRuntime.jsxs("div", { className: styles$o.loadingState, children: [jsxRuntime.jsx("div", { className: styles$o.spinner }), jsxRuntime.jsx("span", { children: "Searching..." })] })) : results.length === 0 ? (jsxRuntime.jsxs("div", { className: styles$o.emptyState, children: ["No results found for \"", query, "\""] })) : (jsxRuntime.jsx("div", { className: styles$o.resultsGroups, children: Object.entries(groupedResults).map(([type, groupResults]) => {
|
|
2588
2588
|
const Icon = entityIcons[type];
|
|
2589
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
2589
|
+
return (jsxRuntime.jsxs("div", { className: styles$o.resultGroup, children: [jsxRuntime.jsxs("div", { className: styles$o.groupHeader, children: [Icon && jsxRuntime.jsx(Icon, { className: styles$o.groupIcon }), jsxRuntime.jsx("span", { className: styles$o.groupTitle, children: type.charAt(0).toUpperCase() + type.slice(1) }), jsxRuntime.jsx("span", { className: styles$o.groupCount, children: groupResults.length })] }), jsxRuntime.jsx("div", { className: styles$o.groupResults, children: groupResults.map((result) => {
|
|
2590
2590
|
const globalIndex = results.indexOf(result);
|
|
2591
|
-
return (jsxRuntime.jsxs(framerMotion.motion.button, { "data-result-index": globalIndex, className: `${styles$
|
|
2591
|
+
return (jsxRuntime.jsxs(framerMotion.motion.button, { "data-result-index": globalIndex, className: `${styles$o.resultItem} ${highlightedIndex === globalIndex ? styles$o.highlighted : ''}`, onClick: () => handleResultClick(result), whileHover: { x: 4 }, onMouseEnter: () => setHighlightedIndex(globalIndex), children: [jsxRuntime.jsxs("div", { className: styles$o.resultContent, children: [jsxRuntime.jsx("div", { className: styles$o.resultTitle, children: highlightMatch(result.title || 'Untitled', query) }), result.subtitle && (jsxRuntime.jsx("div", { className: styles$o.resultSubtitle, children: highlightMatch(result.subtitle, query) }))] }), result.meta && (jsxRuntime.jsx("div", { className: styles$o.resultMeta, children: result.meta }))] }, `${result.type}-${result.id}`));
|
|
2592
2592
|
}) })] }, type));
|
|
2593
2593
|
}) })) })) })] }));
|
|
2594
2594
|
};
|
|
2595
2595
|
|
|
2596
|
-
var styles$
|
|
2596
|
+
var styles$n = {"timeInput":"TimeInput-module_timeInput__h1DpT","label":"TimeInput-module_label__d4rZw","required":"TimeInput-module_required__rc1vq","picker":"TimeInput-module_picker__9c6EI","error":"TimeInput-module_error__gJnpk","disabled":"TimeInput-module_disabled__wxiZ-"};
|
|
2597
2597
|
|
|
2598
|
-
const lightTheme = styles$
|
|
2598
|
+
const lightTheme = styles$H.createTheme({
|
|
2599
2599
|
palette: {
|
|
2600
2600
|
mode: 'light',
|
|
2601
2601
|
primary: { main: '#3b82f6' },
|
|
@@ -2609,7 +2609,7 @@ const lightTheme = styles$D.createTheme({
|
|
|
2609
2609
|
},
|
|
2610
2610
|
},
|
|
2611
2611
|
});
|
|
2612
|
-
const darkTheme = styles$
|
|
2612
|
+
const darkTheme = styles$H.createTheme({
|
|
2613
2613
|
palette: {
|
|
2614
2614
|
mode: 'dark',
|
|
2615
2615
|
primary: { main: '#f5b829' },
|
|
@@ -2629,26 +2629,26 @@ function TimeInput({ label, value, onChange, error = false, success = false, loa
|
|
|
2629
2629
|
!!document.documentElement.getAttribute('data-theme')?.includes('dark');
|
|
2630
2630
|
const muiTheme = React.useMemo(() => (isDark ? darkTheme : lightTheme), [isDark]);
|
|
2631
2631
|
const getContainerClassName = () => {
|
|
2632
|
-
const classes = [styles$
|
|
2632
|
+
const classes = [styles$n.timeInput];
|
|
2633
2633
|
if (error)
|
|
2634
|
-
classes.push(styles$
|
|
2634
|
+
classes.push(styles$n.error);
|
|
2635
2635
|
if (success)
|
|
2636
|
-
classes.push(styles$
|
|
2636
|
+
classes.push(styles$n.success);
|
|
2637
2637
|
if (loading)
|
|
2638
|
-
classes.push(styles$
|
|
2638
|
+
classes.push(styles$n.loading);
|
|
2639
2639
|
if (disabled)
|
|
2640
|
-
classes.push(styles$
|
|
2640
|
+
classes.push(styles$n.disabled);
|
|
2641
2641
|
if (className)
|
|
2642
2642
|
classes.push(className);
|
|
2643
2643
|
return classes.join(' ');
|
|
2644
2644
|
};
|
|
2645
|
-
return (jsxRuntime.jsxs("div", { className: getContainerClassName(), children: [label && (jsxRuntime.jsxs("label", { className: styles$
|
|
2645
|
+
return (jsxRuntime.jsxs("div", { className: getContainerClassName(), children: [label && (jsxRuntime.jsxs("label", { className: styles$n.label, children: [label, required && jsxRuntime.jsx("span", { className: styles$n.required, children: "*" })] })), jsxRuntime.jsx(styles$H.ThemeProvider, { theme: muiTheme, children: jsxRuntime.jsx(LocalizationProvider.LocalizationProvider, { dateAdapter: AdapterDayjs.AdapterDayjs, children: jsxRuntime.jsx(MobileTimePicker.MobileTimePicker, { value: dayjsValue, onChange: (newValue) => {
|
|
2646
2646
|
onChange(newValue ? newValue.format('HH:mm') : '');
|
|
2647
2647
|
}, ampm: false, views: ['hours', 'minutes'], disabled: disabled || loading, slotProps: {
|
|
2648
2648
|
textField: {
|
|
2649
2649
|
size: 'small',
|
|
2650
2650
|
fullWidth: true,
|
|
2651
|
-
className: styles$
|
|
2651
|
+
className: styles$n.picker,
|
|
2652
2652
|
sx: {
|
|
2653
2653
|
'& .MuiPickersOutlinedInput-root': {
|
|
2654
2654
|
fontFamily: "'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace",
|
|
@@ -2736,7 +2736,7 @@ const ThemeProvider = ({ children, defaultTheme = 'light', storageKey = 'app-the
|
|
|
2736
2736
|
return (jsxRuntime.jsx(ThemeContext.Provider, { value: { theme, setTheme, toggleTheme }, children: children }));
|
|
2737
2737
|
};
|
|
2738
2738
|
|
|
2739
|
-
var styles$
|
|
2739
|
+
var styles$m = {"button":"ThemeSwitcher-module_button__VfRjU","iconButton":"ThemeSwitcher-module_iconButton__NKYBc","iconWrapper":"ThemeSwitcher-module_iconWrapper__FpHo8","label":"ThemeSwitcher-module_label__2Hfkp","toggle":"ThemeSwitcher-module_toggle__ATXx4","toggleTrack":"ThemeSwitcher-module_toggleTrack__x28Rv","toggleThumb":"ThemeSwitcher-module_toggleThumb__V8QeN","dropdown":"ThemeSwitcher-module_dropdown__3qLdt","dropdownTrigger":"ThemeSwitcher-module_dropdownTrigger__UzYV5","dropdownMenu":"ThemeSwitcher-module_dropdownMenu__3L5hT","dropdownItem":"ThemeSwitcher-module_dropdownItem__inw-K","active":"ThemeSwitcher-module_active__OHP19","icon":"ThemeSwitcher-module_icon__iRZiJ","text":"ThemeSwitcher-module_text__OCOoA"};
|
|
2740
2740
|
|
|
2741
2741
|
const ThemeSwitcher = ({ variant = 'button', showLabel = false, className = '', currentTheme, onThemeChange, themes: customThemes, }) => {
|
|
2742
2742
|
// Use safe version that returns null when outside a ThemeProvider
|
|
@@ -2757,25 +2757,25 @@ const ThemeSwitcher = ({ variant = 'button', showLabel = false, className = '',
|
|
|
2757
2757
|
if (variant === 'toggle') {
|
|
2758
2758
|
// Simple toggle between light and dark
|
|
2759
2759
|
const isDark = theme.includes('dark');
|
|
2760
|
-
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: `${styles$
|
|
2760
|
+
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: `${styles$m.toggle} ${className}`, onClick: () => setTheme(isDark ? 'light' : 'dark'), whileTap: { scale: 0.95 }, "aria-label": "Toggle theme", children: [jsxRuntime.jsx(framerMotion.motion.div, { className: styles$m.toggleTrack, animate: { backgroundColor: isDark ? 'var(--color-primary)' : 'var(--color-border)' }, children: jsxRuntime.jsx(framerMotion.motion.div, { className: styles$m.toggleThumb, animate: { x: isDark ? 24 : 0 }, transition: { type: 'spring', stiffness: 500, damping: 30 }, children: isDark ? jsxRuntime.jsx(lucideReact.Moon, { size: 14 }) : jsxRuntime.jsx(lucideReact.Sun, { size: 14 }) }) }), showLabel && jsxRuntime.jsx("span", { className: styles$m.label, children: isDark ? 'Dark' : 'Light' })] }));
|
|
2761
2761
|
}
|
|
2762
2762
|
if (variant === 'icon') {
|
|
2763
|
-
return (jsxRuntime.jsxs("button", { type: "button", className: `${styles$
|
|
2763
|
+
return (jsxRuntime.jsxs("button", { type: "button", className: `${styles$m.iconButton} ${className}`, onClick: () => {
|
|
2764
2764
|
const nextIndex = (currentThemeIndex + 1) % themes.length;
|
|
2765
2765
|
setTheme(themes[nextIndex].value);
|
|
2766
|
-
}, "aria-label": `Current theme: ${currentThemeData.label}. Click to change.`, title: currentThemeData.label, children: [currentThemeData.icon, showLabel && jsxRuntime.jsx("span", { className: styles$
|
|
2766
|
+
}, "aria-label": `Current theme: ${currentThemeData.label}. Click to change.`, title: currentThemeData.label, children: [currentThemeData.icon, showLabel && jsxRuntime.jsx("span", { className: styles$m.label, children: currentThemeData.label })] }));
|
|
2767
2767
|
}
|
|
2768
2768
|
if (variant === 'dropdown') {
|
|
2769
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
2769
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$m.dropdown} ${className}`, children: [jsxRuntime.jsxs(framerMotion.motion.button, { className: styles$m.dropdownTrigger, whileTap: { scale: 0.98 }, children: [currentThemeData.icon, showLabel && jsxRuntime.jsx("span", { className: styles$m.label, children: currentThemeData.label })] }), jsxRuntime.jsx(framerMotion.motion.div, { className: styles$m.dropdownMenu, initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, children: themes.map((t) => (jsxRuntime.jsxs(framerMotion.motion.button, { className: `${styles$m.dropdownItem} ${theme === t.value ? styles$m.active : ''}`, onClick: () => setTheme(t.value), whileHover: { x: 4 }, whileTap: { scale: 0.98 }, children: [jsxRuntime.jsx("span", { className: styles$m.icon, children: t.icon }), jsxRuntime.jsx("span", { className: styles$m.text, children: t.label })] }, t.value))) })] }));
|
|
2770
2770
|
}
|
|
2771
2771
|
// Default button variant - cycles through themes
|
|
2772
|
-
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: `${styles$
|
|
2772
|
+
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: `${styles$m.button} ${className}`, onClick: () => {
|
|
2773
2773
|
const nextIndex = (currentThemeIndex + 1) % themes.length;
|
|
2774
2774
|
setTheme(themes[nextIndex].value);
|
|
2775
|
-
}, whileTap: { scale: 0.95 }, whileHover: { scale: 1.05 }, "aria-label": `Current theme: ${currentThemeData.label}. Click to change.`, children: [jsxRuntime.jsx(framerMotion.motion.div, { initial: { rotate: -180, opacity: 0 }, animate: { rotate: 0, opacity: 1 }, exit: { rotate: 180, opacity: 0 }, transition: { duration: 0.3 }, className: styles$
|
|
2775
|
+
}, whileTap: { scale: 0.95 }, whileHover: { scale: 1.05 }, "aria-label": `Current theme: ${currentThemeData.label}. Click to change.`, children: [jsxRuntime.jsx(framerMotion.motion.div, { initial: { rotate: -180, opacity: 0 }, animate: { rotate: 0, opacity: 1 }, exit: { rotate: 180, opacity: 0 }, transition: { duration: 0.3 }, className: styles$m.iconWrapper, children: currentThemeData.icon }, theme), showLabel && jsxRuntime.jsx("span", { className: styles$m.label, children: currentThemeData.label })] }));
|
|
2776
2776
|
};
|
|
2777
2777
|
|
|
2778
|
-
var styles$
|
|
2778
|
+
var styles$l = {"tabs":"Tabs-module_tabs__Vlvn7","tab":"Tabs-module_tab__uQKim","tabIcon":"Tabs-module_tabIcon__AgN-O","fullWidth":"Tabs-module_fullWidth__X-GHP"};
|
|
2779
2779
|
|
|
2780
2780
|
// Default tabs for backwards compatibility
|
|
2781
2781
|
const defaultTabs = [
|
|
@@ -2786,39 +2786,39 @@ const defaultTabs = [
|
|
|
2786
2786
|
];
|
|
2787
2787
|
const Tabs = ({ activeTab, onTabChange, tabs: customTabs, className = '', fullWidth = false }) => {
|
|
2788
2788
|
const tabs = customTabs ?? defaultTabs;
|
|
2789
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
2789
|
+
return (jsxRuntime.jsx("div", { className: `${styles$l.tabs} ${fullWidth ? styles$l.fullWidth : ''} ${className}`, children: tabs.map((tab) => {
|
|
2790
2790
|
const isActive = activeTab === tab.id;
|
|
2791
|
-
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: styles$
|
|
2791
|
+
return (jsxRuntime.jsxs(framerMotion.motion.button, { className: styles$l.tab, "data-active": isActive, onClick: () => onTabChange(tab.id), style: { position: 'relative' }, children: [jsxRuntime.jsx(framerMotion.motion.div, { animate: {
|
|
2792
2792
|
rotate: isActive ? [0, -10, 10, -5, 5, 0] : 0,
|
|
2793
2793
|
}, transition: {
|
|
2794
2794
|
rotate: {
|
|
2795
2795
|
duration: 0.5,
|
|
2796
2796
|
ease: 'easeInOut'
|
|
2797
2797
|
}
|
|
2798
|
-
}, children: tab.icon && (React.isValidElement(tab.icon) ? (jsxRuntime.jsx("span", { className: styles$
|
|
2798
|
+
}, children: tab.icon && (React.isValidElement(tab.icon) ? (jsxRuntime.jsx("span", { className: styles$l.tabIcon, children: tab.icon })) : (jsxRuntime.jsx("span", { className: styles$l.tabIcon, children: React.createElement(tab.icon) }))) }), jsxRuntime.jsx("span", { children: tab.label })] }, tab.id));
|
|
2799
2799
|
}) }));
|
|
2800
2800
|
};
|
|
2801
2801
|
|
|
2802
|
-
var styles$
|
|
2802
|
+
var styles$k = {"toastContainer":"Toast-module_toastContainer__gp5C0","toast":"Toast-module_toast__eenNR","toastSuccess":"Toast-module_toastSuccess__e-cSx","toastError":"Toast-module_toastError__6JO9w","toastWarning":"Toast-module_toastWarning__pJoF1","toastInfo":"Toast-module_toastInfo__y33kR","icon":"Toast-module_icon__Z-D6i","iconSuccess":"Toast-module_iconSuccess__ehY27","iconError":"Toast-module_iconError__nXhZz","iconWarning":"Toast-module_iconWarning__Ie8oD","iconInfo":"Toast-module_iconInfo__8vOf5","content":"Toast-module_content__eBhK8","title":"Toast-module_title__EfUfZ","message":"Toast-module_message__l4pyr","closeButton":"Toast-module_closeButton__UWOVG","progressBar":"Toast-module_progressBar__fGwBU"};
|
|
2803
2803
|
|
|
2804
2804
|
const getIcon = (type) => {
|
|
2805
2805
|
switch (type) {
|
|
2806
2806
|
case 'success':
|
|
2807
|
-
return (jsxRuntime.jsx("svg", { className: `${styles$
|
|
2807
|
+
return (jsxRuntime.jsx("svg", { className: `${styles$k.icon} ${styles$k.iconSuccess}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }));
|
|
2808
2808
|
case 'error':
|
|
2809
|
-
return (jsxRuntime.jsx("svg", { className: `${styles$
|
|
2809
|
+
return (jsxRuntime.jsx("svg", { className: `${styles$k.icon} ${styles$k.iconError}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }));
|
|
2810
2810
|
case 'warning':
|
|
2811
|
-
return (jsxRuntime.jsx("svg", { className: `${styles$
|
|
2811
|
+
return (jsxRuntime.jsx("svg", { className: `${styles$k.icon} ${styles$k.iconWarning}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" }) }));
|
|
2812
2812
|
case 'info':
|
|
2813
|
-
return (jsxRuntime.jsx("svg", { className: `${styles$
|
|
2813
|
+
return (jsxRuntime.jsx("svg", { className: `${styles$k.icon} ${styles$k.iconInfo}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }));
|
|
2814
2814
|
}
|
|
2815
2815
|
};
|
|
2816
2816
|
const getToastStyle = (type) => {
|
|
2817
2817
|
switch (type) {
|
|
2818
|
-
case 'success': return styles$
|
|
2819
|
-
case 'error': return styles$
|
|
2820
|
-
case 'warning': return styles$
|
|
2821
|
-
case 'info': return styles$
|
|
2818
|
+
case 'success': return styles$k.toastSuccess;
|
|
2819
|
+
case 'error': return styles$k.toastError;
|
|
2820
|
+
case 'warning': return styles$k.toastWarning;
|
|
2821
|
+
case 'info': return styles$k.toastInfo;
|
|
2822
2822
|
default: return '';
|
|
2823
2823
|
}
|
|
2824
2824
|
};
|
|
@@ -2840,7 +2840,7 @@ const ToastItem = ({ toast, removeToast, }) => {
|
|
|
2840
2840
|
clearInterval(interval);
|
|
2841
2841
|
};
|
|
2842
2842
|
}, [toast.id, duration, removeToast]);
|
|
2843
|
-
return (jsxRuntime.jsxs(framerMotion.motion.div, { className: `${styles$
|
|
2843
|
+
return (jsxRuntime.jsxs(framerMotion.motion.div, { className: `${styles$k.toast} ${getToastStyle(toast.type)}`, initial: { opacity: 0, x: 100, scale: 0.9 }, animate: { opacity: 1, x: 0, scale: 1 }, exit: { opacity: 0, x: 100, scale: 0.9 }, transition: { type: 'spring', stiffness: 500, damping: 40 }, layout: true, children: [getIcon(toast.type), jsxRuntime.jsxs("div", { className: styles$k.content, children: [toast.title && jsxRuntime.jsx("p", { className: styles$k.title, children: toast.title }), jsxRuntime.jsx("p", { className: styles$k.message, children: toast.message })] }), jsxRuntime.jsx("button", { className: styles$k.closeButton, onClick: () => removeToast(toast.id), "aria-label": "Close notification", children: jsxRuntime.jsx("svg", { width: "16", height: "16", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }), jsxRuntime.jsx(framerMotion.motion.div, { className: styles$k.progressBar, initial: { width: '100%' }, animate: { width: `${progress}%` }, style: {
|
|
2844
2844
|
color: toast.type === 'success' ? '#10B981'
|
|
2845
2845
|
: toast.type === 'error' ? '#EF4444'
|
|
2846
2846
|
: toast.type === 'warning' ? '#F59E0B'
|
|
@@ -2850,10 +2850,10 @@ const ToastItem = ({ toast, removeToast, }) => {
|
|
|
2850
2850
|
const ToastContainer = ({ toasts, removeToast }) => {
|
|
2851
2851
|
if (typeof document === 'undefined')
|
|
2852
2852
|
return null;
|
|
2853
|
-
return reactDom.createPortal(jsxRuntime.jsx("div", { className: styles$
|
|
2853
|
+
return reactDom.createPortal(jsxRuntime.jsx("div", { className: styles$k.toastContainer, children: jsxRuntime.jsx(framerMotion.AnimatePresence, { mode: "sync", children: toasts.map((toast) => (jsxRuntime.jsx(ToastItem, { toast: toast, removeToast: removeToast }, toast.id))) }) }), document.body);
|
|
2854
2854
|
};
|
|
2855
2855
|
|
|
2856
|
-
var styles$
|
|
2856
|
+
var styles$j = {"breadcrumb":"Breadcrumb-module_breadcrumb__pGabz","separator":"Breadcrumb-module_separator__UCmyy","item":"Breadcrumb-module_item__0cLOg","link":"Breadcrumb-module_link__udp8M","current":"Breadcrumb-module_current__3DpQc"};
|
|
2857
2857
|
|
|
2858
2858
|
/**
|
|
2859
2859
|
* Breadcrumb Component
|
|
@@ -2872,13 +2872,13 @@ var styles$f = {"breadcrumb":"Breadcrumb-module_breadcrumb__pGabz","separator":"
|
|
|
2872
2872
|
* />
|
|
2873
2873
|
*/
|
|
2874
2874
|
const Breadcrumb = ({ items, onNavigate, className = '' }) => {
|
|
2875
|
-
return (jsxRuntime.jsx("nav", { className: `${styles$
|
|
2875
|
+
return (jsxRuntime.jsx("nav", { className: `${styles$j.breadcrumb} ${className}`, "aria-label": "Breadcrumb", children: items.map((item, index) => {
|
|
2876
2876
|
const isLast = index === items.length - 1;
|
|
2877
|
-
return (jsxRuntime.jsxs(React.Fragment, { children: [index > 0 && jsxRuntime.jsx(lucideReact.ChevronRight, { size: 14, className: styles$
|
|
2877
|
+
return (jsxRuntime.jsxs(React.Fragment, { children: [index > 0 && jsxRuntime.jsx(lucideReact.ChevronRight, { size: 14, className: styles$j.separator }), isLast || !item.href ? (jsxRuntime.jsx("span", { className: `${styles$j.item} ${isLast ? styles$j.current : ''}`, children: item.label })) : (jsxRuntime.jsx("button", { className: `${styles$j.item} ${styles$j.link}`, onClick: () => onNavigate?.(item.href), children: item.label }))] }, index));
|
|
2878
2878
|
}) }));
|
|
2879
2879
|
};
|
|
2880
2880
|
|
|
2881
|
-
var styles$
|
|
2881
|
+
var styles$i = {"overlay":"LiquidButton-module_overlay__-P-xm","container":"LiquidButton-module_container__f1COS","actions":"LiquidButton-module_actions__XBz7p","actionButton":"LiquidButton-module_actionButton__PlEOk","actionLabel":"LiquidButton-module_actionLabel__tIGHE","button":"LiquidButton-module_button__znjyS"};
|
|
2882
2882
|
|
|
2883
2883
|
/**
|
|
2884
2884
|
* LiquidButton Component
|
|
@@ -2904,13 +2904,13 @@ const LiquidButton = ({ actions, icon: Icon = lucideReact.Plus, className = '',
|
|
|
2904
2904
|
setExpanded(false);
|
|
2905
2905
|
action.onClick();
|
|
2906
2906
|
}, []);
|
|
2907
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(framerMotion.AnimatePresence, { children: expanded && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$
|
|
2907
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(framerMotion.AnimatePresence, { children: expanded && (jsxRuntime.jsx(framerMotion.motion.div, { className: styles$i.overlay, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: handleToggle })) }), jsxRuntime.jsxs("div", { className: `${styles$i.container} ${className}`, children: [jsxRuntime.jsx(framerMotion.AnimatePresence, { children: expanded && (jsxRuntime.jsx("div", { className: styles$i.actions, children: actions.map((action, index) => (jsxRuntime.jsxs(framerMotion.motion.button, { type: "button", className: styles$i.actionButton, initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.8 }, transition: {
|
|
2908
2908
|
duration: 0.15,
|
|
2909
2909
|
delay: (actions.length - 1 - index) * 0.05,
|
|
2910
|
-
}, onClick: () => handleAction(action), children: [jsxRuntime.jsx(action.icon, { size: 18, color: action.color }), jsxRuntime.jsx("span", { className: styles$
|
|
2910
|
+
}, onClick: () => handleAction(action), children: [jsxRuntime.jsx(action.icon, { size: 18, color: action.color }), jsxRuntime.jsx("span", { className: styles$i.actionLabel, children: action.label })] }, action.key))) })) }), jsxRuntime.jsx(framerMotion.motion.button, { type: "button", className: styles$i.button, onClick: handleToggle, animate: { rotate: expanded ? 45 : 0 }, transition: { duration: 0.2 }, "aria-label": expanded ? 'Close actions' : 'Open actions', children: jsxRuntime.jsx(Icon, { size: 24, strokeWidth: 2.5 }) })] })] }));
|
|
2911
2911
|
};
|
|
2912
2912
|
|
|
2913
|
-
var styles$
|
|
2913
|
+
var styles$h = {"container":"RecurrencePicker-module_container__2Ewc4","field":"RecurrencePicker-module_field__3rsnB","fieldCentered":"RecurrencePicker-module_fieldCentered__wP27Q","fieldLabel":"RecurrencePicker-module_fieldLabel__HCMBQ","fieldRow":"RecurrencePicker-module_fieldRow__AQ4k7","fieldUnit":"RecurrencePicker-module_fieldUnit__WHbVN","dayPicker":"RecurrencePicker-module_dayPicker__a5ue6","dayBtn":"RecurrencePicker-module_dayBtn__WIxNY","dayBtnActive":"RecurrencePicker-module_dayBtnActive__mX7FB","preview":"RecurrencePicker-module_preview__tfAQ-"};
|
|
2914
2914
|
|
|
2915
2915
|
const DEFAULT_STATE = {
|
|
2916
2916
|
freq: 'WEEKLY',
|
|
@@ -3056,18 +3056,18 @@ const RecurrencePicker = ({ value, onChange, className, }) => {
|
|
|
3056
3056
|
MONTHLY: state.interval === 1 ? 'month' : 'months',
|
|
3057
3057
|
YEARLY: state.interval === 1 ? 'year' : 'years',
|
|
3058
3058
|
};
|
|
3059
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
3059
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$h.container}${className ? ` ${className}` : ''}`, children: [jsxRuntime.jsx("div", { className: styles$h.field, children: jsxRuntime.jsx(SelectInput, { label: "Frequency", value: state.freq, onChange: v => update({ freq: v }), options: [
|
|
3060
3060
|
{ value: 'DAILY', label: 'Daily' },
|
|
3061
3061
|
{ value: 'WEEKLY', label: 'Weekly' },
|
|
3062
3062
|
{ value: 'MONTHLY', label: 'Monthly' },
|
|
3063
3063
|
{ value: 'YEARLY', label: 'Yearly' },
|
|
3064
|
-
] }) }), jsxRuntime.jsxs("div", { className: styles$
|
|
3064
|
+
] }) }), jsxRuntime.jsxs("div", { className: styles$h.field, children: [jsxRuntime.jsx("span", { className: styles$h.fieldLabel, children: "Every" }), jsxRuntime.jsxs("div", { className: styles$h.fieldRow, children: [jsxRuntime.jsx(NumberStepper, { value: state.interval, onChange: v => update({ interval: Math.max(1, v) }), min: 1, max: 99, hideLimits: true, size: "small" }), jsxRuntime.jsx("span", { className: styles$h.fieldUnit, children: unitLabel[state.freq] })] })] }), state.freq === 'WEEKLY' && (jsxRuntime.jsxs("div", { className: `${styles$h.field} ${styles$h.fieldCentered}`, children: [jsxRuntime.jsx("span", { className: styles$h.fieldLabel, children: "On" }), jsxRuntime.jsx("div", { className: styles$h.dayPicker, children: WEEKDAYS.map(d => (jsxRuntime.jsx("button", { type: "button", className: `${styles$h.dayBtn} ${state.byDay.includes(d.code) ? styles$h.dayBtnActive : ''}`, onClick: () => toggleDay(d.code), "aria-label": d.code, children: d.label }, d.code))) })] })), state.freq === 'MONTHLY' && (jsxRuntime.jsxs("div", { className: styles$h.field, children: [jsxRuntime.jsx("span", { className: styles$h.fieldLabel, children: "Day of month" }), jsxRuntime.jsxs("div", { className: styles$h.fieldRow, children: [jsxRuntime.jsx(NumberStepper, { value: state.byMonthDay, onChange: v => update({ byMonthDay: Math.min(31, Math.max(1, v)) }), min: 1, max: 31, disabled: state.monthlyLast, hideLimits: true, size: "small" }), jsxRuntime.jsx(Checkbox, { checked: state.monthlyLast, onChange: v => update({ monthlyLast: v }), label: "Last day" })] })] })), state.freq === 'YEARLY' && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: styles$h.field, children: jsxRuntime.jsx(SelectInput, { label: "Month", value: String(state.byMonth), onChange: v => update({ byMonth: Number(v) }), options: MONTHS$1.map((m, i) => ({
|
|
3065
3065
|
value: String(i + 1),
|
|
3066
3066
|
label: m,
|
|
3067
|
-
})) }) }), jsxRuntime.jsxs("div", { className: styles$
|
|
3067
|
+
})) }) }), jsxRuntime.jsxs("div", { className: styles$h.field, children: [jsxRuntime.jsx("span", { className: styles$h.fieldLabel, children: "Day" }), jsxRuntime.jsx(NumberStepper, { value: state.yearDay, onChange: v => update({ yearDay: Math.min(31, Math.max(1, v)) }), min: 1, max: 31, hideLimits: true, size: "small" })] })] })), jsxRuntime.jsx("div", { className: styles$h.preview, children: preview })] }));
|
|
3068
3068
|
};
|
|
3069
3069
|
|
|
3070
|
-
var styles$
|
|
3070
|
+
var styles$g = {"wrap":"StreamConsole-module_wrap__MnVWw","header":"StreamConsole-module_header__FjnRM","headerLeft":"StreamConsole-module_headerLeft__gNDyh","statusDot":"StreamConsole-module_statusDot__xQ254","spin":"StreamConsole-module_spin__OrOeL","label":"StreamConsole-module_label__rJIDm","statusText":"StreamConsole-module_statusText__oG-ej","dismiss":"StreamConsole-module_dismiss__WH3Kv","body":"StreamConsole-module_body__-HIK-","hint":"StreamConsole-module_hint__BA4SI","line":"StreamConsole-module_line__5hMY2","linePrefix":"StreamConsole-module_linePrefix__xR-Oj","lineText":"StreamConsole-module_lineText__IyRSF","lineLabel":"StreamConsole-module_lineLabel__z-qj4"};
|
|
3071
3071
|
|
|
3072
3072
|
// Known prefixes produced by stream-json summarizers (DAO-style):
|
|
3073
3073
|
// "bash: ls -la", "read: path/to/file", "edit: path/to/file",
|
|
@@ -3133,21 +3133,21 @@ function StreamConsole({ stream, onCancel, onDismiss, hideDismiss = false, runni
|
|
|
3133
3133
|
? successLabel
|
|
3134
3134
|
: errorLabel;
|
|
3135
3135
|
const canShowDismiss = !hideDismiss && (stream.status === 'running' ? !!onCancel : !!onDismiss);
|
|
3136
|
-
return (jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$
|
|
3136
|
+
return (jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$g.wrap, "data-status": stream.status, initial: { opacity: 0, y: -8 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -8 }, transition: { duration: 0.18 }, children: [jsxRuntime.jsxs("header", { className: styles$g.header, children: [jsxRuntime.jsxs("div", { className: styles$g.headerLeft, children: [jsxRuntime.jsx("span", { className: styles$g.statusDot, "data-status": stream.status, children: jsxRuntime.jsx(Icon, { size: 12, className: stream.status === 'running' ? styles$g.spin : '' }) }), jsxRuntime.jsx("span", { className: styles$g.label, children: stream.label }), jsxRuntime.jsx("span", { className: styles$g.statusText, children: statusLabel })] }), canShowDismiss && (jsxRuntime.jsx("button", { type: "button", className: styles$g.dismiss, "aria-label": stream.status === 'running' ? 'Cancel' : 'Dismiss', onClick: () => {
|
|
3137
3137
|
if (stream.status === 'running')
|
|
3138
3138
|
onCancel?.(stream.id);
|
|
3139
3139
|
else
|
|
3140
3140
|
onDismiss?.(stream.id);
|
|
3141
|
-
}, children: jsxRuntime.jsx(lucideReact.X, { size: 14 }) }))] }), jsxRuntime.jsxs("div", { className: styles$
|
|
3141
|
+
}, children: jsxRuntime.jsx(lucideReact.X, { size: 14 }) }))] }), jsxRuntime.jsxs("div", { className: styles$g.body, ref: listRef, children: [stream.events.length === 0 && stream.status === 'running' && (jsxRuntime.jsx("p", { className: styles$g.hint, children: "Waiting for output\u2026" })), stream.events.map((event, i) => {
|
|
3142
3142
|
const step = event.type === 'step' ? parseStep(event.message) : null;
|
|
3143
3143
|
const StepIcon = step?.subtype ? STEP_ICON[step.subtype] : null;
|
|
3144
|
-
return (jsxRuntime.jsxs("p", { className: styles$
|
|
3145
|
-
}), stream.status === 'error' && stream.errorMessage && (jsxRuntime.jsxs("p", { className: styles$
|
|
3144
|
+
return (jsxRuntime.jsxs("p", { className: styles$g.line, "data-type": event.type, "data-subtype": step?.subtype ?? undefined, children: [jsxRuntime.jsx("span", { className: styles$g.linePrefix, children: StepIcon ? (jsxRuntime.jsx(StepIcon, { size: 11 })) : event.type === 'error' ? ('!') : event.type === 'warning' ? ('⚠') : event.type === 'success' ? ('✓') : ('·') }), step?.label ? (jsxRuntime.jsx("span", { className: styles$g.lineLabel, children: step.label })) : null, jsxRuntime.jsx("span", { className: styles$g.lineText, children: step ? step.body : event.message })] }, i));
|
|
3145
|
+
}), stream.status === 'error' && stream.errorMessage && (jsxRuntime.jsxs("p", { className: styles$g.line, "data-type": "error", children: [jsxRuntime.jsx("span", { className: styles$g.linePrefix, children: "!" }), jsxRuntime.jsx("span", { className: styles$g.lineText, children: stream.errorMessage })] }))] })] }));
|
|
3146
3146
|
}
|
|
3147
3147
|
|
|
3148
|
-
var styles$
|
|
3148
|
+
var styles$f = {"calendar":"Calendar-module_calendar__3mIJS","loading":"Calendar-module_loading__59Z9-","loadingSpinner":"Calendar-module_loadingSpinner__7MXqV","header":"Calendar-module_header__cZHNA","navigation":"Calendar-module_navigation__PGkpY","navButton":"Calendar-module_navButton__kOe-w","title":"Calendar-module_title__oJZ7m","controls":"Calendar-module_controls__i1Z38","exportDropdown":"Calendar-module_exportDropdown__yQX4q","exportButton":"Calendar-module_exportButton__dx7--","nightToggle":"Calendar-module_nightToggle__JGvmM","exportMenu":"Calendar-module_exportMenu__-lZ-8","exportMenuItem":"Calendar-module_exportMenuItem__D9MdL","todayButton":"Calendar-module_todayButton__Ac9zc","viewToggle":"Calendar-module_viewToggle__Fhg2t","viewButton":"Calendar-module_viewButton__J2WY6","active":"Calendar-module_active__lIqH-","filterBar":"Calendar-module_filterBar__ZD-lX","filterPill":"Calendar-module_filterPill__f7S8p","filterPillActive":"Calendar-module_filterPillActive__9Wtm9","filterDot":"Calendar-module_filterDot__E1Hp8","weekDays":"Calendar-module_weekDays__4J-8f","withWeekNumbers":"Calendar-module_withWeekNumbers__qbnUY","weekNumberHeader":"Calendar-module_weekNumberHeader__xhKbB","weekDay":"Calendar-module_weekDay__cg8Gr","daysGrid":"Calendar-module_daysGrid__ER0GM","dayCell":"Calendar-module_dayCell__TV-HR","dayNumber":"Calendar-module_dayNumber__ICH-X","today":"Calendar-module_today__eGuUU","events":"Calendar-module_events__qdbs7","event":"Calendar-module_event__Q1Zq3","eventTitle":"Calendar-module_eventTitle__XU7Wd","eventTime":"Calendar-module_eventTime__pMGEB","otherMonth":"Calendar-module_otherMonth__r6VJK","selected":"Calendar-module_selected__5e6h0","compact":"Calendar-module_compact__i0SF3","dots":"Calendar-module_dots__1Q7QR","dot":"Calendar-module_dot__tsCR1","dotMore":"Calendar-module_dotMore__emasD","weekNumberCell":"Calendar-module_weekNumberCell__bydCw","completed":"Calendar-module_completed__B-SHI","completedIcon":"Calendar-module_completedIcon__-oDZ9","moreEvents":"Calendar-module_moreEvents__TIKaT","emptyState":"Calendar-module_emptyState__2fcj7","dayView":"Calendar-module_dayView__PCIos","dayViewHeader":"Calendar-module_dayViewHeader__Gvxx2","timeColumnHeader":"Calendar-module_timeColumnHeader__B0btR","dayColumnHeader":"Calendar-module_dayColumnHeader__Rjqwg","allDayStrip":"Calendar-module_allDayStrip__VOqbV","allDayLabel":"Calendar-module_allDayLabel__2AmyT","allDayList":"Calendar-module_allDayList__6hFSb","dayViewScrollContainer":"Calendar-module_dayViewScrollContainer__84Byq","dayTimelineGrid":"Calendar-module_dayTimelineGrid__r1BNI","hourRow":"Calendar-module_hourRow__U-YN-","hourLabel":"Calendar-module_hourLabel__im84k","hourSlots":"Calendar-module_hourSlots__vbtYy","halfHourSlot":"Calendar-module_halfHourSlot__UWIri","halfHourSlotBottom":"Calendar-module_halfHourSlotBottom__aE5Mo","dayEventAnchor":"Calendar-module_dayEventAnchor__oryAi","weekTimeline":"Calendar-module_weekTimeline__q75EF","weekTimelineHeader":"Calendar-module_weekTimelineHeader__n5i06","weekDayColumnHeader":"Calendar-module_weekDayColumnHeader__u2ghX","weekDayLabel":"Calendar-module_weekDayLabel__i8Rm9","weekDayNumber":"Calendar-module_weekDayNumber__tqFKO","weekTimelineScroll":"Calendar-module_weekTimelineScroll__jesa0","weekTimelineGrid":"Calendar-module_weekTimelineGrid__MxIHF","weekTimeColumn":"Calendar-module_weekTimeColumn__rK4ZV","weekTimeSlot":"Calendar-module_weekTimeSlot__IFPUz","weekHourLabel":"Calendar-module_weekHourLabel__0ANmg","weekDayColumns":"Calendar-module_weekDayColumns__soiyU","weekDayColumn":"Calendar-module_weekDayColumn__sXVu0","weekHourRow":"Calendar-module_weekHourRow__FHcB2","weekEventAnchor":"Calendar-module_weekEventAnchor__nhG4x","currentTimeIndicator":"Calendar-module_currentTimeIndicator__GntOZ"};
|
|
3149
3149
|
|
|
3150
|
-
var styles$
|
|
3150
|
+
var styles$e = {"wrapper":"DayEventCard-module_wrapper__qvRgl","deleteUnderlay":"DayEventCard-module_deleteUnderlay__fTtuX","card":"DayEventCard-module_card__V9xTi","dragging":"DayEventCard-module_dragging__q19ID","completed":"DayEventCard-module_completed__tq8ol","text":"DayEventCard-module_text__3dWF7","grip":"DayEventCard-module_grip__tmim4","checkIcon":"DayEventCard-module_checkIcon__Ki67j","time":"DayEventCard-module_time__Ojdye","editButton":"DayEventCard-module_editButton__nDi-e"};
|
|
3151
3151
|
|
|
3152
3152
|
const SWIPE_DELETE_THRESHOLD = -80;
|
|
3153
3153
|
const DayEventCard = ({ event, color, textColor, onComplete, onEdit, onDelete, onDragEnd, draggable = true, }) => {
|
|
@@ -3209,9 +3209,9 @@ const DayEventCard = ({ event, color, textColor, onComplete, onEdit, onDelete, o
|
|
|
3209
3209
|
};
|
|
3210
3210
|
const canSwipe = !!onDelete;
|
|
3211
3211
|
const showGrip = draggable && !!onDragEnd;
|
|
3212
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
3212
|
+
return (jsxRuntime.jsxs("div", { className: styles$e.wrapper, children: [canSwipe && (jsxRuntime.jsxs(framerMotion.motion.div, { className: styles$e.deleteUnderlay, style: { opacity: deleteOpacity }, children: [jsxRuntime.jsx(lucideReact.Trash2, { size: 16 }), jsxRuntime.jsx("span", { children: "Delete" })] })), jsxRuntime.jsxs(framerMotion.motion.div, { className: `${styles$e.card} ${completed ? styles$e.completed : ''} ${verticalDragging ? styles$e.dragging : ''}`, style: { x, y, background: color, color: textColor, borderLeftColor: color }, drag: canSwipe && !verticalDragging ? 'x' : false, dragConstraints: canSwipe ? { left: -200, right: 0 } : undefined, dragElastic: 0.15, dragDirectionLock: true, onDragStart: () => {
|
|
3213
3213
|
didSwipe.current = true;
|
|
3214
|
-
}, onDragEnd: handleSwipeEnd, whileTap: verticalDragging ? undefined : { scale: 0.98 }, animate: verticalDragging ? { scale: 1.03 } : { scale: 1 }, onClick: handleCardClick, children: [showGrip && (jsxRuntime.jsx("div", { className: styles$
|
|
3214
|
+
}, onDragEnd: handleSwipeEnd, whileTap: verticalDragging ? undefined : { scale: 0.98 }, animate: verticalDragging ? { scale: 1.03 } : { scale: 1 }, onClick: handleCardClick, children: [showGrip && (jsxRuntime.jsx("div", { className: styles$e.grip, onPointerDown: handleGripPointerDown, onPointerMove: handleGripPointerMove, onPointerUp: handleGripPointerUp, onPointerCancel: handleGripPointerUp, onClick: (e) => e.stopPropagation(), children: jsxRuntime.jsx(lucideReact.GripVertical, { size: 14 }) })), completed && jsxRuntime.jsx(lucideReact.Check, { size: 14, className: styles$e.checkIcon, strokeWidth: 3 }), jsxRuntime.jsx("span", { className: styles$e.text, children: event.title }), event.time && jsxRuntime.jsx("span", { className: styles$e.time, children: event.time }), onEdit && (jsxRuntime.jsx("button", { className: styles$e.editButton, onClick: (e) => {
|
|
3215
3215
|
e.stopPropagation();
|
|
3216
3216
|
onEdit(event);
|
|
3217
3217
|
}, "aria-label": "Edit event", children: jsxRuntime.jsx(lucideReact.Pencil, { size: 13 }) }))] })] }));
|
|
@@ -3635,15 +3635,15 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3635
3635
|
return Math.floor(diff / oneWeek) + 1;
|
|
3636
3636
|
};
|
|
3637
3637
|
if (loading) {
|
|
3638
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
3638
|
+
return (jsxRuntime.jsx("div", { className: `${styles$f.calendar} ${styles$f.loading} ${className}`, style: style, children: jsxRuntime.jsx("div", { className: styles$f.loadingSpinner, children: "Loading..." }) }));
|
|
3639
3639
|
}
|
|
3640
|
-
return (jsxRuntime.jsxs("div", { className: `${styles$
|
|
3640
|
+
return (jsxRuntime.jsxs("div", { className: `${styles$f.calendar} ${compact ? styles$f.compact : ''} ${className}`, style: style, children: [!hideHeader && (jsxRuntime.jsxs("div", { className: styles$f.header, children: [jsxRuntime.jsxs("div", { className: styles$f.navigation, children: [jsxRuntime.jsx("button", { onClick: handlePrevious, className: styles$f.navButton, "aria-label": "Previous", children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: jsxRuntime.jsx("polyline", { points: "15,18 9,12 15,6" }) }) }), jsxRuntime.jsx("h3", { className: styles$f.title, children: calendarData.displayTitle }), jsxRuntime.jsx("button", { onClick: handleNext, className: styles$f.navButton, "aria-label": "Next", children: jsxRuntime.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: jsxRuntime.jsx("polyline", { points: "9,6 15,12 9,18" }) }) })] }), categories && categories.length > 0 && (jsxRuntime.jsxs("div", { className: styles$f.filterBar, role: "tablist", "aria-label": "Filter by category", children: [jsxRuntime.jsx("button", { type: "button", role: "tab", "aria-selected": activeCategoryId === null, className: `${styles$f.filterPill} ${activeCategoryId === null ? styles$f.filterPillActive : ''}`, onClick: () => handleCategoryPick(null), children: "All" }), categories.map(cat => {
|
|
3641
3641
|
const active = activeCategoryId === cat.id;
|
|
3642
|
-
return (jsxRuntime.jsxs("button", { type: "button", role: "tab", "aria-selected": active, className: `${styles$
|
|
3643
|
-
})] })), jsxRuntime.jsxs("div", { className: styles$
|
|
3642
|
+
return (jsxRuntime.jsxs("button", { type: "button", role: "tab", "aria-selected": active, className: `${styles$f.filterPill} ${active ? styles$f.filterPillActive : ''}`, style: active ? { background: cat.color, borderColor: cat.color, color: '#ffffff' } : undefined, onClick: () => handleCategoryPick(cat.id), children: [!active && (jsxRuntime.jsx("span", { className: styles$f.filterDot, style: { background: cat.color } })), cat.label] }, cat.id));
|
|
3643
|
+
})] })), jsxRuntime.jsxs("div", { className: styles$f.controls, children: [exportFormats && exportFormats.length > 0 && (jsxRuntime.jsxs("div", { className: styles$f.exportDropdown, ref: exportRef, children: [jsxRuntime.jsx("button", { type: "button", className: styles$f.exportButton, onClick: () => setExportOpen(v => !v), "aria-haspopup": "menu", "aria-expanded": exportOpen, "aria-label": "Export events", title: "Export events", children: jsxRuntime.jsx(lucideReact.Download, { size: 16 }) }), exportOpen && (jsxRuntime.jsx("div", { className: styles$f.exportMenu, role: "menu", children: exportFormats.map(format => (jsxRuntime.jsx("button", { type: "button", role: "menuitem", className: styles$f.exportMenuItem, onClick: () => {
|
|
3644
3644
|
downloadEvents(filteredEvents, format);
|
|
3645
3645
|
setExportOpen(false);
|
|
3646
|
-
}, children: format.toUpperCase() }, format))) }))] })), (currentViewMode === 'day' || currentViewMode === 'week') && (jsxRuntime.jsx("button", { type: "button", className: styles$
|
|
3646
|
+
}, children: format.toUpperCase() }, format))) }))] })), (currentViewMode === 'day' || currentViewMode === 'week') && (jsxRuntime.jsx("button", { type: "button", className: styles$f.nightToggle, onClick: () => setHideNightHours(v => !v), "aria-pressed": hideNightHours, title: hideNightHours ? 'Show night hours' : 'Hide night hours (00:00–08:00)', "aria-label": hideNightHours ? 'Show night hours' : 'Hide night hours', children: hideNightHours ? jsxRuntime.jsx(lucideReact.Sun, { size: 16 }) : jsxRuntime.jsx(lucideReact.Moon, { size: 16 }) })), jsxRuntime.jsx("button", { onClick: handleToday, className: styles$f.todayButton, children: "Today" }), jsxRuntime.jsxs("div", { className: styles$f.viewToggle, children: [jsxRuntime.jsx("button", { className: `${styles$f.viewButton} ${currentViewMode === 'month' ? styles$f.active : ''}`, onClick: () => setCurrentViewMode('month'), children: "Month" }), jsxRuntime.jsx("button", { className: `${styles$f.viewButton} ${currentViewMode === 'week' ? styles$f.active : ''}`, onClick: () => setCurrentViewMode('week'), children: "Week" }), jsxRuntime.jsx("button", { className: `${styles$f.viewButton} ${currentViewMode === 'day' ? styles$f.active : ''}`, onClick: () => setCurrentViewMode('day'), children: "Day" })] })] })] })), currentViewMode === 'month' && (jsxRuntime.jsxs("div", { className: `${styles$f.weekDays} ${showWeekNumbers ? styles$f.withWeekNumbers : ''}`, children: [showWeekNumbers && jsxRuntime.jsx("div", { className: styles$f.weekNumberHeader, children: "Wk" }), finalDayLabels.map((day) => (jsxRuntime.jsx("div", { className: styles$f.weekDay, children: day }, day)))] })), currentViewMode === 'day' ? (
|
|
3647
3647
|
// Day view layout — positioned events with duration, all-day strip, now-line
|
|
3648
3648
|
(() => {
|
|
3649
3649
|
const dayEvents = getDayEvents(currentDate);
|
|
@@ -3678,7 +3678,7 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3678
3678
|
const handleEventDragEnd = (event, clientY) => {
|
|
3679
3679
|
if (!onEventDrop)
|
|
3680
3680
|
return;
|
|
3681
|
-
const gridEl = dayViewScrollRef.current?.querySelector(`.${styles$
|
|
3681
|
+
const gridEl = dayViewScrollRef.current?.querySelector(`.${styles$f.dayTimelineGrid}`);
|
|
3682
3682
|
if (!gridEl)
|
|
3683
3683
|
return;
|
|
3684
3684
|
const rect = gridEl.getBoundingClientRect();
|
|
@@ -3693,7 +3693,7 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3693
3693
|
newDate.setHours(newHour, newMinute, 0, 0);
|
|
3694
3694
|
onEventDrop(event, newDate);
|
|
3695
3695
|
};
|
|
3696
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
3696
|
+
return (jsxRuntime.jsxs("div", { className: styles$f.dayView, children: [jsxRuntime.jsxs("div", { className: styles$f.dayViewHeader, children: [jsxRuntime.jsx("div", { className: styles$f.timeColumnHeader }), jsxRuntime.jsx("div", { className: styles$f.dayColumnHeader, children: currentDate.toLocaleDateString(locale, { weekday: 'short', day: 'numeric' }) })] }), allDayEvents.length > 0 && (jsxRuntime.jsxs("div", { className: styles$f.allDayStrip, children: [jsxRuntime.jsx("span", { className: styles$f.allDayLabel, children: "All day" }), jsxRuntime.jsx("div", { className: styles$f.allDayList, children: allDayEvents.map(event => (jsxRuntime.jsx(DayEventCard, { event: event, color: getEventColor(event), textColor: getEventTextColor(event), onComplete: onEventComplete ?? (onEventClick ? handleEventClick : undefined), onEdit: onEventEdit, onDelete: onEventDelete, draggable: false }, event.id))) })] })), jsxRuntime.jsx("div", { className: styles$f.dayViewScrollContainer, ref: dayViewScrollRef, children: jsxRuntime.jsxs("div", { className: styles$f.dayTimelineGrid, style: { height: timelineHeight }, children: [hours.map(hour => (jsxRuntime.jsxs("div", { className: styles$f.hourRow, style: { height: hourHeight }, children: [jsxRuntime.jsxs("span", { className: styles$f.hourLabel, children: [hour.toString().padStart(2, '0'), ":00"] }), jsxRuntime.jsx("div", { className: styles$f.hourSlots, children: halfHourSlots ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: styles$f.halfHourSlot, onClick: () => handleSlotClick(hour, 0) }), jsxRuntime.jsx("div", { className: `${styles$f.halfHourSlot} ${styles$f.halfHourSlotBottom}`, onClick: () => handleSlotClick(hour, 30) })] })) : (jsxRuntime.jsx("div", { className: styles$f.halfHourSlot, onClick: () => handleSlotClick(hour, 0) })) })] }, hour))), scheduled.map((event) => {
|
|
3697
3697
|
const [h, m] = event.time.split(':').map(Number);
|
|
3698
3698
|
const top = (h - startHour) * hourHeight + (m / 60) * hourHeight;
|
|
3699
3699
|
const duration = eventDuration(event);
|
|
@@ -3701,13 +3701,13 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3701
3701
|
const lane = dayLayout.get(event.id);
|
|
3702
3702
|
const totalCols = lane?.totalCols ?? 1;
|
|
3703
3703
|
const col = lane?.col ?? 0;
|
|
3704
|
-
return (jsxRuntime.jsx("div", { className: styles$
|
|
3704
|
+
return (jsxRuntime.jsx("div", { className: styles$f.dayEventAnchor, style: {
|
|
3705
3705
|
top,
|
|
3706
3706
|
height,
|
|
3707
3707
|
'--lane-col': col,
|
|
3708
3708
|
'--lane-total': totalCols,
|
|
3709
3709
|
}, onClick: (e) => e.stopPropagation(), children: jsxRuntime.jsx(DayEventCard, { event: event, color: getEventColor(event), textColor: getEventTextColor(event), onComplete: onEventComplete ?? (onEventClick ? handleEventClick : undefined), onEdit: onEventEdit, onDelete: onEventDelete, onDragEnd: onEventDrop ? (clientY) => handleEventDragEnd(event, clientY) : undefined }) }, event.id));
|
|
3710
|
-
}), showNow && (jsxRuntime.jsx("div", { className: styles$
|
|
3710
|
+
}), showNow && (jsxRuntime.jsx("div", { className: styles$f.currentTimeIndicator, style: { top: `${nowOffset}px` } }))] }) })] }));
|
|
3711
3711
|
})()) : currentViewMode === 'week' ? (
|
|
3712
3712
|
// Week view layout — 7 side-by-side day timelines. Drag events across
|
|
3713
3713
|
// columns to reschedule to a different day + hour in one gesture.
|
|
@@ -3741,7 +3741,7 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3741
3741
|
const handleWeekDragEnd = (event, clientY, clientX) => {
|
|
3742
3742
|
if (!onEventDrop)
|
|
3743
3743
|
return;
|
|
3744
|
-
const gridEl = weekViewScrollRef.current?.querySelector(`.${styles$
|
|
3744
|
+
const gridEl = weekViewScrollRef.current?.querySelector(`.${styles$f.weekDayColumns}`);
|
|
3745
3745
|
if (!gridEl)
|
|
3746
3746
|
return;
|
|
3747
3747
|
const rect = gridEl.getBoundingClientRect();
|
|
@@ -3759,15 +3759,15 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3759
3759
|
newDate.setHours(newHour, newMinute, 0, 0);
|
|
3760
3760
|
onEventDrop(event, newDate);
|
|
3761
3761
|
};
|
|
3762
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
3762
|
+
return (jsxRuntime.jsxs("div", { className: styles$f.weekTimeline, children: [jsxRuntime.jsxs("div", { className: styles$f.weekTimelineHeader, children: [jsxRuntime.jsx("div", { className: styles$f.timeColumnHeader }), days.map(day => {
|
|
3763
3763
|
const dayIsToday = day.toDateString() === now.toDateString();
|
|
3764
3764
|
const dayIsSelected = selectedDate && day.toDateString() === selectedDate.toDateString();
|
|
3765
|
-
return (jsxRuntime.jsxs("button", { type: "button", className: `${styles$
|
|
3766
|
-
})] }), jsxRuntime.jsx("div", { className: styles$
|
|
3765
|
+
return (jsxRuntime.jsxs("button", { type: "button", className: `${styles$f.weekDayColumnHeader} ${dayIsToday ? styles$f.today : ''} ${dayIsSelected ? styles$f.selected : ''}`, onClick: () => handleDateClick(day), children: [jsxRuntime.jsx("span", { className: styles$f.weekDayLabel, children: day.toLocaleDateString(locale, { weekday: 'short' }) }), jsxRuntime.jsx("span", { className: styles$f.weekDayNumber, children: day.getDate() })] }, day.toISOString()));
|
|
3766
|
+
})] }), jsxRuntime.jsx("div", { className: styles$f.weekTimelineScroll, ref: weekViewScrollRef, children: jsxRuntime.jsxs("div", { className: styles$f.weekTimelineGrid, style: { height: timelineHeight }, children: [jsxRuntime.jsx("div", { className: styles$f.weekTimeColumn, children: hours.map(hour => (jsxRuntime.jsx("div", { className: styles$f.weekTimeSlot, style: { height: hourHeight }, children: jsxRuntime.jsxs("span", { className: styles$f.weekHourLabel, children: [hour.toString().padStart(2, '0'), ":00"] }) }, hour))) }), jsxRuntime.jsx("div", { className: styles$f.weekDayColumns, children: days.map(day => {
|
|
3767
3767
|
const dayEvents = getDayEvents(day).filter(e => !e.allDay && e.time);
|
|
3768
3768
|
const dayIsToday = day.toDateString() === now.toDateString();
|
|
3769
3769
|
const dayLayout = layoutOverlappingEvents(dayEvents);
|
|
3770
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
3770
|
+
return (jsxRuntime.jsxs("div", { className: styles$f.weekDayColumn, children: [hours.map(hour => (jsxRuntime.jsx("div", { className: styles$f.weekHourRow, style: { height: hourHeight }, children: halfHourSlots ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: styles$f.halfHourSlot, onClick: () => handleWeekSlotClick(day, hour, 0) }), jsxRuntime.jsx("div", { className: `${styles$f.halfHourSlot} ${styles$f.halfHourSlotBottom}`, onClick: () => handleWeekSlotClick(day, hour, 30) })] })) : (jsxRuntime.jsx("div", { className: styles$f.halfHourSlot, onClick: () => handleWeekSlotClick(day, hour, 0) })) }, hour))), dayEvents.map(event => {
|
|
3771
3771
|
const [h, m] = event.time.split(':').map(Number);
|
|
3772
3772
|
const top = (h - startHour) * hourHeight + (m / 60) * hourHeight;
|
|
3773
3773
|
const duration = eventDuration(event);
|
|
@@ -3775,34 +3775,34 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3775
3775
|
const lane = dayLayout.get(event.id);
|
|
3776
3776
|
const totalCols = lane?.totalCols ?? 1;
|
|
3777
3777
|
const col = lane?.col ?? 0;
|
|
3778
|
-
return (jsxRuntime.jsx("div", { className: styles$
|
|
3778
|
+
return (jsxRuntime.jsx("div", { className: styles$f.weekEventAnchor, style: {
|
|
3779
3779
|
top,
|
|
3780
3780
|
height,
|
|
3781
3781
|
'--lane-col': col,
|
|
3782
3782
|
'--lane-total': totalCols,
|
|
3783
3783
|
}, onClick: (e) => e.stopPropagation(), children: jsxRuntime.jsx(DayEventCard, { event: event, color: getEventColor(event), textColor: getEventTextColor(event), onComplete: onEventComplete ?? (onEventClick ? handleEventClick : undefined), onEdit: onEventEdit, onDelete: onEventDelete, onDragEnd: onEventDrop ? (cy, cx) => handleWeekDragEnd(event, cy, cx) : undefined }) }, event.id));
|
|
3784
|
-
}), dayIsToday && showNow && (jsxRuntime.jsx("div", { className: styles$
|
|
3784
|
+
}), dayIsToday && showNow && (jsxRuntime.jsx("div", { className: styles$f.currentTimeIndicator, style: { top: `${nowOffset}px`, left: 0 } }))] }, day.toISOString()));
|
|
3785
3785
|
}) })] }) })] }));
|
|
3786
3786
|
})()) : ((() => {
|
|
3787
3787
|
// Fixed month-view cell height derived from maxEventsPerDay.
|
|
3788
3788
|
// Day number + padding ≈ 40px, each event row ≈ 24px.
|
|
3789
3789
|
// Week and compact views keep their own CSS-driven sizing.
|
|
3790
3790
|
const monthCellHeight = !compact ? 40 + maxEventsPerDay * 24 : undefined;
|
|
3791
|
-
return (jsxRuntime.jsx("div", { className: `${styles$
|
|
3791
|
+
return (jsxRuntime.jsx("div", { className: `${styles$f.daysGrid} ${showWeekNumbers ? styles$f.withWeekNumbers : ''}`, children: calendarData.days.map((day, index) => {
|
|
3792
3792
|
const dayEvents = getDayEvents(day);
|
|
3793
3793
|
const dayIsToday = isToday(day);
|
|
3794
3794
|
const isInCurrentMonth = isCurrentMonth(day);
|
|
3795
3795
|
const isWeekStart = showWeekNumbers && (index % 7 === 0);
|
|
3796
3796
|
const dayIsSelected = selectedDate && day.toDateString() === selectedDate.toDateString();
|
|
3797
|
-
return (jsxRuntime.jsxs(React.Fragment, { children: [isWeekStart && (jsxRuntime.jsx("div", { className: styles$
|
|
3797
|
+
return (jsxRuntime.jsxs(React.Fragment, { children: [isWeekStart && (jsxRuntime.jsx("div", { className: styles$f.weekNumberCell, style: monthCellHeight !== undefined ? { height: monthCellHeight, minHeight: monthCellHeight } : undefined, children: getWeekNumber(day) })), jsxRuntime.jsxs(framerMotion.motion.div, { className: `${styles$f.dayCell} ${dayIsToday ? styles$f.today : ''} ${!isInCurrentMonth ? styles$f.otherMonth : ''} ${dayIsSelected ? styles$f.selected : ''}`, style: monthCellHeight !== undefined ? { height: monthCellHeight, minHeight: monthCellHeight } : undefined, initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: {
|
|
3798
3798
|
duration: 0.3,
|
|
3799
3799
|
delay: index * 0.02,
|
|
3800
3800
|
ease: "easeOut"
|
|
3801
|
-
}, onClick: () => handleDateClick(day), children: [jsxRuntime.jsx("div", { className: styles$
|
|
3801
|
+
}, onClick: () => handleDateClick(day), children: [jsxRuntime.jsx("div", { className: styles$f.dayNumber, children: day.getDate() }), dayEvents.length > 0 && compact && currentViewMode === 'month' ? (jsxRuntime.jsxs("div", { className: styles$f.dots, children: [dayEvents.slice(0, maxEventsPerDay).map((event) => (jsxRuntime.jsx("span", { className: styles$f.dot, style: {
|
|
3802
3802
|
backgroundColor: event.status === 'completed'
|
|
3803
3803
|
? '#047857'
|
|
3804
3804
|
: getEventColor(event),
|
|
3805
|
-
} }, event.id))), dayEvents.length > maxEventsPerDay && (jsxRuntime.jsxs("span", { className: styles$
|
|
3805
|
+
} }, event.id))), dayEvents.length > maxEventsPerDay && (jsxRuntime.jsxs("span", { className: styles$f.dotMore, children: ["+", dayEvents.length - maxEventsPerDay] }))] })) : dayEvents.length > 0 ? (jsxRuntime.jsxs("div", { className: styles$f.events, children: [dayEvents.slice(0, maxEventsPerDay).map((event, eventIndex) => (jsxRuntime.jsxs(framerMotion.motion.div, { className: `${styles$f.event} ${event.status === 'completed' ? styles$f.completed : ''}`, style: {
|
|
3806
3806
|
backgroundColor: getEventColor(event),
|
|
3807
3807
|
color: getEventTextColor(event),
|
|
3808
3808
|
opacity: event.status === 'completed' ? 0.7 : 1
|
|
@@ -3820,7 +3820,7 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3820
3820
|
}, whileTap: {
|
|
3821
3821
|
scale: 0.98,
|
|
3822
3822
|
transition: { duration: 0.1 }
|
|
3823
|
-
}, children: [iconRenderer && iconRenderer(event), jsxRuntime.jsxs("span", { className: styles$
|
|
3823
|
+
}, children: [iconRenderer && iconRenderer(event), jsxRuntime.jsxs("span", { className: styles$f.eventTitle, children: [event.time && (jsxRuntime.jsx("span", { className: styles$f.eventTime, children: event.time })), event.title] }), event.status === 'completed' && (jsxRuntime.jsx("svg", { className: styles$f.completedIcon, width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: jsxRuntime.jsx("polyline", { points: "20,6 9,17 4,12" }) }))] }, event.id))), dayEvents.length > maxEventsPerDay && (jsxRuntime.jsxs("div", { className: styles$f.moreEvents, children: ["+", dayEvents.length - maxEventsPerDay, " more"] }))] })) : emptyState ? (jsxRuntime.jsx("div", { className: styles$f.emptyState, children: emptyState })) : null] })] }, `${day.getFullYear()}-${day.getMonth()}-${day.getDate()}`));
|
|
3824
3824
|
}) }));
|
|
3825
3825
|
})())] }));
|
|
3826
3826
|
}
|
|
@@ -3957,7 +3957,7 @@ const Navbar = ({ items, logo, onItemClick, variant = 'sidebar', isMobile = fals
|
|
|
3957
3957
|
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(framerMotion.motion.nav, { className: `${styles.navbar} ${styles[`navbar${variant.charAt(0).toUpperCase() + variant.slice(1)}`]} ${className}`, "data-colored-icons": coloredIconsAttr, initial: variant === 'sidebar' ? { x: -300 } : { opacity: 0 }, animate: variant === 'sidebar' ? { x: 0 } : { opacity: 1 }, transition: { type: 'spring', stiffness: 300, damping: 30 }, children: navContent }) }));
|
|
3958
3958
|
};
|
|
3959
3959
|
|
|
3960
|
-
var styles$
|
|
3960
|
+
var styles$d = {"container":"MoodChart-module_container__MB1Vr","chart":"MoodChart-module_chart__4-spu","gridLine":"MoodChart-module_gridLine__YJpZ8","line":"MoodChart-module_line__LfeUX","area":"MoodChart-module_area__a4BFM","areaStopTop":"MoodChart-module_areaStopTop__KEp49","areaStopBottom":"MoodChart-module_areaStopBottom__cp7Gn","crosshair":"MoodChart-module_crosshair__PHLfW","halo":"MoodChart-module_halo__YQB-7","overlay":"MoodChart-module_overlay__ZwuHi","xAxis":"MoodChart-module_xAxis__SeIWG","yAxis":"MoodChart-module_yAxis__sRjjE","dataPoint":"MoodChart-module_dataPoint__112P1","tooltip":"MoodChart-module_tooltip__vW59y","tooltipHeader":"MoodChart-module_tooltipHeader__U7yvN","tooltipDate":"MoodChart-module_tooltipDate__6Jjeu","tooltipRating":"MoodChart-module_tooltipRating__5A2Yx","ratingValue":"MoodChart-module_ratingValue__7Gpfx","ratingMax":"MoodChart-module_ratingMax__10WcJ","tooltipTags":"MoodChart-module_tooltipTags__FUQrU","tag":"MoodChart-module_tag__QhCh5","tooltipComment":"MoodChart-module_tooltipComment__6driJ"};
|
|
3961
3961
|
|
|
3962
3962
|
const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
3963
3963
|
const svgRef = React.useRef(null);
|
|
@@ -4008,8 +4008,8 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4008
4008
|
.attr('id', gradientId)
|
|
4009
4009
|
.attr('x1', '0%').attr('y1', '0%')
|
|
4010
4010
|
.attr('x2', '0%').attr('y2', '100%');
|
|
4011
|
-
gradient.append('stop').attr('offset', '0%').attr('class', styles$
|
|
4012
|
-
gradient.append('stop').attr('offset', '100%').attr('class', styles$
|
|
4011
|
+
gradient.append('stop').attr('offset', '0%').attr('class', styles$d.areaStopTop);
|
|
4012
|
+
gradient.append('stop').attr('offset', '100%').attr('class', styles$d.areaStopBottom);
|
|
4013
4013
|
const g = svg.append('g')
|
|
4014
4014
|
.attr('transform', `translate(${margin.left},${margin.top})`);
|
|
4015
4015
|
const extentDates = d3__namespace.extent(processedData, d => d.date);
|
|
@@ -4034,7 +4034,7 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4034
4034
|
g.selectAll('.grid-line-y')
|
|
4035
4035
|
.data(yScale.ticks(5))
|
|
4036
4036
|
.enter().append('line')
|
|
4037
|
-
.attr('class', styles$
|
|
4037
|
+
.attr('class', styles$d.gridLine)
|
|
4038
4038
|
.attr('x1', 0)
|
|
4039
4039
|
.attr('y1', d => yScale(d))
|
|
4040
4040
|
.attr('x2', chartWidth)
|
|
@@ -4046,7 +4046,7 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4046
4046
|
.style('opacity', 1);
|
|
4047
4047
|
// Axes (fade in)
|
|
4048
4048
|
g.append('g')
|
|
4049
|
-
.attr('class', styles$
|
|
4049
|
+
.attr('class', styles$d.xAxis)
|
|
4050
4050
|
.attr('transform', `translate(0,${chartHeight})`)
|
|
4051
4051
|
.style('opacity', 0)
|
|
4052
4052
|
.call(d3__namespace.axisBottom(xScale)
|
|
@@ -4056,7 +4056,7 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4056
4056
|
.delay(100)
|
|
4057
4057
|
.style('opacity', 1);
|
|
4058
4058
|
g.append('g')
|
|
4059
|
-
.attr('class', styles$
|
|
4059
|
+
.attr('class', styles$d.yAxis)
|
|
4060
4060
|
.style('opacity', 0)
|
|
4061
4061
|
.call(d3__namespace.axisLeft(yScale))
|
|
4062
4062
|
.transition()
|
|
@@ -4066,14 +4066,14 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4066
4066
|
// Area fill (fades in after line draws past it)
|
|
4067
4067
|
const areaPath = g.append('path')
|
|
4068
4068
|
.datum(processedData)
|
|
4069
|
-
.attr('class', styles$
|
|
4069
|
+
.attr('class', styles$d.area)
|
|
4070
4070
|
.attr('fill', `url(#${gradientId})`)
|
|
4071
4071
|
.attr('d', area)
|
|
4072
4072
|
.style('opacity', 0);
|
|
4073
4073
|
// Line (draw-in animation via stroke-dasharray)
|
|
4074
4074
|
const linePath = g.append('path')
|
|
4075
4075
|
.datum(processedData)
|
|
4076
|
-
.attr('class', styles$
|
|
4076
|
+
.attr('class', styles$d.line)
|
|
4077
4077
|
.attr('d', line);
|
|
4078
4078
|
const lineNode = linePath.node();
|
|
4079
4079
|
const totalLength = lineNode && typeof lineNode.getTotalLength === 'function'
|
|
@@ -4100,14 +4100,14 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4100
4100
|
.style('opacity', 1);
|
|
4101
4101
|
// Crosshair (vertical guide on hover)
|
|
4102
4102
|
const crosshair = g.append('line')
|
|
4103
|
-
.attr('class', styles$
|
|
4103
|
+
.attr('class', styles$d.crosshair)
|
|
4104
4104
|
.attr('y1', 0)
|
|
4105
4105
|
.attr('y2', chartHeight)
|
|
4106
4106
|
.style('opacity', 0)
|
|
4107
4107
|
.style('pointer-events', 'none');
|
|
4108
4108
|
// Pulsing halo behind active point
|
|
4109
4109
|
const halo = g.append('circle')
|
|
4110
|
-
.attr('class', styles$
|
|
4110
|
+
.attr('class', styles$d.halo)
|
|
4111
4111
|
.attr('r', 0)
|
|
4112
4112
|
.style('opacity', 0)
|
|
4113
4113
|
.style('pointer-events', 'none');
|
|
@@ -4118,7 +4118,7 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4118
4118
|
const pointSel = g.selectAll('.mood-circle')
|
|
4119
4119
|
.data(processedData)
|
|
4120
4120
|
.enter().append('circle')
|
|
4121
|
-
.attr('class', styles$
|
|
4121
|
+
.attr('class', styles$d.dataPoint)
|
|
4122
4122
|
.attr('cx', d => xScale(d.date))
|
|
4123
4123
|
.attr('cy', d => yScale(d.rating))
|
|
4124
4124
|
.attr('r', 0)
|
|
@@ -4225,7 +4225,7 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4225
4225
|
// Overlay captures mouse for nearest-point lookup (rendered last so it sits on top)
|
|
4226
4226
|
const bisect = d3__namespace.bisector(d => d.date).center;
|
|
4227
4227
|
g.append('rect')
|
|
4228
|
-
.attr('class', styles$
|
|
4228
|
+
.attr('class', styles$d.overlay)
|
|
4229
4229
|
.attr('width', chartWidth)
|
|
4230
4230
|
.attr('height', chartHeight)
|
|
4231
4231
|
.on('mousemove', function (event) {
|
|
@@ -4248,7 +4248,7 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4248
4248
|
setSelectedMood(null);
|
|
4249
4249
|
};
|
|
4250
4250
|
}, []);
|
|
4251
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
4251
|
+
return (jsxRuntime.jsxs("div", { className: styles$d.container, ref: containerRef, children: [jsxRuntime.jsx("svg", { ref: svgRef, width: width, height: height, className: styles$d.chart }), selectedMood && (jsxRuntime.jsxs("div", { ref: tooltipRef, className: styles$d.tooltip, style: {
|
|
4252
4252
|
position: 'absolute',
|
|
4253
4253
|
pointerEvents: 'auto',
|
|
4254
4254
|
left: tooltipPosition.x,
|
|
@@ -4257,10 +4257,10 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4257
4257
|
}, onMouseEnter: () => setIsHoveringTooltip(true), onMouseLeave: () => {
|
|
4258
4258
|
setIsHoveringTooltip(false);
|
|
4259
4259
|
setSelectedMood(null);
|
|
4260
|
-
}, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
4260
|
+
}, children: [jsxRuntime.jsxs("div", { className: styles$d.tooltipHeader, children: [jsxRuntime.jsx("div", { className: styles$d.tooltipDate, children: selectedMood.date.toLocaleDateString() }), jsxRuntime.jsxs("div", { className: styles$d.tooltipRating, children: [jsxRuntime.jsx("span", { className: styles$d.ratingValue, children: selectedMood.rating }), jsxRuntime.jsx("span", { className: styles$d.ratingMax, children: "/10" })] })] }), selectedMood.tags.length > 0 && (jsxRuntime.jsx("div", { className: styles$d.tooltipTags, children: selectedMood.tags.map((tag, index) => (jsxRuntime.jsx("span", { className: styles$d.tag, children: tag }, index))) })), selectedMood.comment && (jsxRuntime.jsx("div", { className: styles$d.tooltipComment, children: selectedMood.comment }))] }))] }));
|
|
4261
4261
|
};
|
|
4262
4262
|
|
|
4263
|
-
var styles$
|
|
4263
|
+
var styles$c = {"container":"QuantifiableHabitsChart-module_container__X5SBp","controls":"QuantifiableHabitsChart-module_controls__O-ObQ","viewToggle":"QuantifiableHabitsChart-module_viewToggle__24hKA","viewButton":"QuantifiableHabitsChart-module_viewButton__WFU6j","active":"QuantifiableHabitsChart-module_active__Pjqy9","viewIcon":"QuantifiableHabitsChart-module_viewIcon__b2mfk","viewLabel":"QuantifiableHabitsChart-module_viewLabel__9MjCU","aggregationToggle":"QuantifiableHabitsChart-module_aggregationToggle__WnxwB","aggregationButton":"QuantifiableHabitsChart-module_aggregationButton__sGCxX","aggregationIcon":"QuantifiableHabitsChart-module_aggregationIcon__HIaEf","aggregationLabel":"QuantifiableHabitsChart-module_aggregationLabel__Yc-S-","legend":"QuantifiableHabitsChart-module_legend__3Ki7c","compactLegend":"QuantifiableHabitsChart-module_compactLegend__jMpLB","legendItem":"QuantifiableHabitsChart-module_legendItem__Zl7fz","legendEmoji":"QuantifiableHabitsChart-module_legendEmoji__HG9CZ","legendLabel":"QuantifiableHabitsChart-module_legendLabel__H3oFL","inactive":"QuantifiableHabitsChart-module_inactive__TzZC-","legendColor":"QuantifiableHabitsChart-module_legendColor__zbPoV","chart":"QuantifiableHabitsChart-module_chart__FMeA-","gridLine":"QuantifiableHabitsChart-module_gridLine__CTNIq","line":"QuantifiableHabitsChart-module_line__CpYip","crosshair":"QuantifiableHabitsChart-module_crosshair__7hoFL","halo":"QuantifiableHabitsChart-module_halo__YlkOF","overlay":"QuantifiableHabitsChart-module_overlay__ffeNz","xAxis":"QuantifiableHabitsChart-module_xAxis__lbgBG","yAxis":"QuantifiableHabitsChart-module_yAxis__Y6WeV","dataPoint":"QuantifiableHabitsChart-module_dataPoint__s8UMX","tooltip":"QuantifiableHabitsChart-module_tooltip__Fay8N","visible":"QuantifiableHabitsChart-module_visible__-KSJq","tooltipHeader":"QuantifiableHabitsChart-module_tooltipHeader__7Q2up","tooltipEmoji":"QuantifiableHabitsChart-module_tooltipEmoji__atV3T","tooltipDot":"QuantifiableHabitsChart-module_tooltipDot__YbdFh","tooltipInfo":"QuantifiableHabitsChart-module_tooltipInfo__XC7WF","tooltipDate":"QuantifiableHabitsChart-module_tooltipDate__6V6Xi","tooltipValue":"QuantifiableHabitsChart-module_tooltipValue__ldASB"};
|
|
4264
4264
|
|
|
4265
4265
|
const DEFAULT_HABIT_COLORS$1 = {
|
|
4266
4266
|
'Exercise': '#6BCB77',
|
|
@@ -4438,10 +4438,14 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4438
4438
|
const axesGroup = ensureGroup('qhc-axes');
|
|
4439
4439
|
const uiGroup = ensureGroup('qhc-ui');
|
|
4440
4440
|
const dates = aggregateData.dates.map(d => new Date(d));
|
|
4441
|
+
// activeHabits can briefly hold stale keys when the parent swaps `data`
|
|
4442
|
+
// for a row with a different habit set — filter out anything missing from
|
|
4443
|
+
// the current aggregateData so we never index into undefined.
|
|
4444
|
+
const renderableHabits = activeHabits.filter(h => Array.isArray(aggregateData[h]));
|
|
4441
4445
|
const xScale = d3__namespace.scaleTime()
|
|
4442
4446
|
.domain(d3__namespace.extent(dates))
|
|
4443
4447
|
.range([0, chartWidth]);
|
|
4444
|
-
const maxValue = Math.max(1, ...
|
|
4448
|
+
const maxValue = Math.max(1, ...renderableHabits.flatMap(habit => aggregateData[habit].filter(v => typeof v === 'number')));
|
|
4445
4449
|
const yScale = d3__namespace.scaleLinear()
|
|
4446
4450
|
.domain([0, maxValue * 1.1])
|
|
4447
4451
|
.range([chartHeight, 0]);
|
|
@@ -4454,7 +4458,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4454
4458
|
.data(yScale.ticks(5), d => String(d));
|
|
4455
4459
|
gridSel.exit().remove();
|
|
4456
4460
|
const gridEnter = gridSel.enter().append('line')
|
|
4457
|
-
.attr('class', `${styles$
|
|
4461
|
+
.attr('class', `${styles$c.gridLine} qhc-grid-line`)
|
|
4458
4462
|
.style('opacity', 0);
|
|
4459
4463
|
gridEnter.merge(gridSel)
|
|
4460
4464
|
.attr('x1', 0)
|
|
@@ -4510,7 +4514,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4510
4514
|
}
|
|
4511
4515
|
let xAxis = axesGroup.select('g.qhc-x-axis');
|
|
4512
4516
|
if (xAxis.empty()) {
|
|
4513
|
-
xAxis = axesGroup.append('g').attr('class', `${styles$
|
|
4517
|
+
xAxis = axesGroup.append('g').attr('class', `${styles$c.xAxis} qhc-x-axis`);
|
|
4514
4518
|
}
|
|
4515
4519
|
xAxis.attr('transform', `translate(0,${chartHeight})`).call(xAxisGenerator);
|
|
4516
4520
|
xAxis.selectAll('text')
|
|
@@ -4520,7 +4524,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4520
4524
|
.attr('transform', viewType === 'daily' || viewType === 'weekly' ? 'rotate(-45)' : null);
|
|
4521
4525
|
let yAxis = axesGroup.select('g.qhc-y-axis');
|
|
4522
4526
|
if (yAxis.empty()) {
|
|
4523
|
-
yAxis = axesGroup.append('g').attr('class', `${styles$
|
|
4527
|
+
yAxis = axesGroup.append('g').attr('class', `${styles$c.yAxis} qhc-y-axis`);
|
|
4524
4528
|
}
|
|
4525
4529
|
yAxis.call(d3__namespace.axisLeft(yScale));
|
|
4526
4530
|
if (isFirstRender) {
|
|
@@ -4528,7 +4532,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4528
4532
|
yAxis.style('opacity', 0).transition().duration(500).delay(80).style('opacity', 1);
|
|
4529
4533
|
}
|
|
4530
4534
|
// -------- Lines (data join, morph on update) --------
|
|
4531
|
-
const lineData =
|
|
4535
|
+
const lineData = renderableHabits.map(habit => {
|
|
4532
4536
|
const points = dates
|
|
4533
4537
|
.map((date, i) => [date, aggregateData[habit][i]])
|
|
4534
4538
|
.filter(d => typeof d[1] === 'number');
|
|
@@ -4542,7 +4546,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4542
4546
|
.style('opacity', 0)
|
|
4543
4547
|
.remove();
|
|
4544
4548
|
const lineEnter = lineSel.enter().append('path')
|
|
4545
|
-
.attr('class', `${styles$
|
|
4549
|
+
.attr('class', `${styles$c.line} qhc-line`)
|
|
4546
4550
|
.attr('data-habit', d => d.habit)
|
|
4547
4551
|
.attr('fill', 'none')
|
|
4548
4552
|
.attr('stroke', d => d.color)
|
|
@@ -4582,7 +4586,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4582
4586
|
// Hide them during line morph, then spring up from baseline.
|
|
4583
4587
|
pointsGroup.selectAll('*').remove();
|
|
4584
4588
|
const allPoints = [];
|
|
4585
|
-
|
|
4589
|
+
renderableHabits.forEach(habit => {
|
|
4586
4590
|
const color = getColor(habit);
|
|
4587
4591
|
dates.forEach((date, i) => {
|
|
4588
4592
|
const v = aggregateData[habit][i];
|
|
@@ -4599,7 +4603,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4599
4603
|
pointsGroup.selectAll('circle.qhc-point')
|
|
4600
4604
|
.data(allPoints)
|
|
4601
4605
|
.enter().append('circle')
|
|
4602
|
-
.attr('class', `${styles$
|
|
4606
|
+
.attr('class', `${styles$c.dataPoint} qhc-point`)
|
|
4603
4607
|
.attr('data-habit', d => d.habit)
|
|
4604
4608
|
.attr('cx', d => xScale(d.date))
|
|
4605
4609
|
.attr('cy', chartHeight)
|
|
@@ -4616,13 +4620,13 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4616
4620
|
// -------- UI layer (crosshair, halo, overlay) --------
|
|
4617
4621
|
uiGroup.selectAll('*').remove();
|
|
4618
4622
|
const crosshair = uiGroup.append('line')
|
|
4619
|
-
.attr('class', styles$
|
|
4623
|
+
.attr('class', styles$c.crosshair)
|
|
4620
4624
|
.attr('y1', 0)
|
|
4621
4625
|
.attr('y2', chartHeight)
|
|
4622
4626
|
.style('opacity', 0)
|
|
4623
4627
|
.style('pointer-events', 'none');
|
|
4624
4628
|
const halo = uiGroup.append('circle')
|
|
4625
|
-
.attr('class', styles$
|
|
4629
|
+
.attr('class', styles$c.halo)
|
|
4626
4630
|
.attr('r', 0)
|
|
4627
4631
|
.style('opacity', 0)
|
|
4628
4632
|
.style('pointer-events', 'none');
|
|
@@ -4694,7 +4698,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4694
4698
|
setTooltipData(null);
|
|
4695
4699
|
};
|
|
4696
4700
|
uiGroup.append('rect')
|
|
4697
|
-
.attr('class', styles$
|
|
4701
|
+
.attr('class', styles$c.overlay)
|
|
4698
4702
|
.attr('width', chartWidth)
|
|
4699
4703
|
.attr('height', chartHeight)
|
|
4700
4704
|
.on('mousemove', function (event) {
|
|
@@ -4784,16 +4788,16 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4784
4788
|
quarterly: { Icon: lucideReact.BarChart3, label: 'Quarterly' }
|
|
4785
4789
|
};
|
|
4786
4790
|
const shouldShowAggregationToggle = viewType !== 'daily';
|
|
4787
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
4791
|
+
return (jsxRuntime.jsxs("div", { className: styles$c.container, children: [!hideControls && (jsxRuntime.jsxs("div", { className: styles$c.controls, children: [jsxRuntime.jsx("div", { className: styles$c.viewToggle, children: availableViewTypes.map(type => {
|
|
4788
4792
|
const { Icon, label } = viewTypeConfig[type];
|
|
4789
|
-
return (jsxRuntime.jsxs("button", { className: `${styles$
|
|
4790
|
-
}) }), shouldShowAggregationToggle && (jsxRuntime.jsxs("div", { className: styles$
|
|
4793
|
+
return (jsxRuntime.jsxs("button", { className: `${styles$c.viewButton} ${viewType === type ? styles$c.active : ''}`, onClick: () => setViewType(type), title: label, children: [jsxRuntime.jsx("span", { className: styles$c.viewIcon, children: jsxRuntime.jsx(Icon, { size: 16 }) }), jsxRuntime.jsx("span", { className: styles$c.viewLabel, children: label })] }, type));
|
|
4794
|
+
}) }), shouldShowAggregationToggle && (jsxRuntime.jsxs("div", { className: styles$c.aggregationToggle, children: [jsxRuntime.jsxs("button", { className: `${styles$c.aggregationButton} ${aggregationMode === 'average' ? styles$c.active : ''}`, onClick: () => setAggregationMode('average'), title: "Show average values for each period", children: [jsxRuntime.jsx("span", { className: styles$c.aggregationIcon, children: jsxRuntime.jsx(lucideReact.Divide, { size: 16 }) }), jsxRuntime.jsx("span", { className: styles$c.aggregationLabel, children: "Average" })] }), jsxRuntime.jsxs("button", { className: `${styles$c.aggregationButton} ${aggregationMode === 'sum' ? styles$c.active : ''}`, onClick: () => setAggregationMode('sum'), title: "Show total values for each period", children: [jsxRuntime.jsx("span", { className: styles$c.aggregationIcon, children: jsxRuntime.jsx(lucideReact.Sigma, { size: 16 }) }), jsxRuntime.jsx("span", { className: styles$c.aggregationLabel, children: "Sum" })] })] }))] })), jsxRuntime.jsx("div", { className: `${styles$c.legend}${compactLegend ? ` ${styles$c.compactLegend}` : ''}`, children: habits.map(habit => (jsxRuntime.jsxs("button", { className: `${styles$c.legendItem} ${!activeHabits.includes(habit) ? styles$c.inactive : ''}`, onClick: () => toggleHabit(habit), onMouseEnter: () => setHoveredHabit(habit), onMouseLeave: () => setHoveredHabit(null), children: [jsxRuntime.jsx("span", { className: styles$c.legendEmoji, children: customHabitEmojis[habit] || '📊' }), jsxRuntime.jsx("span", { className: styles$c.legendColor, style: { backgroundColor: getColor(habit) } }), jsxRuntime.jsx("span", { className: styles$c.legendLabel, children: habit })] }, habit))) }), jsxRuntime.jsx("svg", { ref: svgRef, viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "xMidYMid meet", className: styles$c.chart }), tooltipData && (jsxRuntime.jsxs("div", { ref: tooltipRef, className: `${styles$c.tooltip} ${tooltipData ? styles$c.visible : ''}`, style: {
|
|
4791
4795
|
left: `${tooltipData.x}px`,
|
|
4792
4796
|
top: `${tooltipData.y - 80}px`
|
|
4793
|
-
}, children: [jsxRuntime.jsxs("div", { className: styles$
|
|
4797
|
+
}, children: [jsxRuntime.jsxs("div", { className: styles$c.tooltipHeader, children: [jsxRuntime.jsx("span", { className: styles$c.tooltipEmoji, children: customHabitEmojis[tooltipData.habit] || '📊' }), jsxRuntime.jsx("span", { className: styles$c.tooltipDot, style: { backgroundColor: getColor(tooltipData.habit) } }), jsxRuntime.jsx("span", { children: tooltipData.habit })] }), jsxRuntime.jsxs("div", { className: styles$c.tooltipInfo, children: [jsxRuntime.jsx("div", { className: styles$c.tooltipDate, children: formatTooltipDate(tooltipData.date, viewType) }), jsxRuntime.jsxs("div", { className: styles$c.tooltipValue, children: [jsxRuntime.jsx("strong", { children: Math.round(tooltipData.value * 10) / 10 }), jsxRuntime.jsx("span", { style: { fontSize: '12px', fontWeight: 'normal', opacity: 0.6 }, children: "units" })] })] })] }))] }));
|
|
4794
4798
|
};
|
|
4795
4799
|
|
|
4796
|
-
var styles$
|
|
4800
|
+
var styles$b = {"container":"HabitTimeOfDayChart-module_container__DCW3B","controls":"HabitTimeOfDayChart-module_controls__2p7mW","viewToggle":"HabitTimeOfDayChart-module_viewToggle__SSfDu","viewButton":"HabitTimeOfDayChart-module_viewButton__DENLF","active":"HabitTimeOfDayChart-module_active__VRrF1","viewIcon":"HabitTimeOfDayChart-module_viewIcon__MXqrp","viewLabel":"HabitTimeOfDayChart-module_viewLabel__XNKhi","legend":"HabitTimeOfDayChart-module_legend__y4Apu","compactLegend":"HabitTimeOfDayChart-module_compactLegend__Gsodv","legendItem":"HabitTimeOfDayChart-module_legendItem__QEXr4","legendEmoji":"HabitTimeOfDayChart-module_legendEmoji__T7zLH","legendLabel":"HabitTimeOfDayChart-module_legendLabel__TUT29","inactive":"HabitTimeOfDayChart-module_inactive__xVIwD","legendColor":"HabitTimeOfDayChart-module_legendColor__SzkAm","chart":"HabitTimeOfDayChart-module_chart__7Plpd","dot":"HabitTimeOfDayChart-module_dot__rxGpu","bar":"HabitTimeOfDayChart-module_bar__F0Rwy","gridLine":"HabitTimeOfDayChart-module_gridLine__waZrZ","xAxis":"HabitTimeOfDayChart-module_xAxis__pQGbi","yAxis":"HabitTimeOfDayChart-module_yAxis__fblot","tooltip":"HabitTimeOfDayChart-module_tooltip__8EPnz","visible":"HabitTimeOfDayChart-module_visible__3yEYR","tooltipHeader":"HabitTimeOfDayChart-module_tooltipHeader__1ywo5","tooltipInfo":"HabitTimeOfDayChart-module_tooltipInfo__xizGe","tooltipValue":"HabitTimeOfDayChart-module_tooltipValue__DcYfO","tooltipUnits":"HabitTimeOfDayChart-module_tooltipUnits__Um-EN","tooltipBreakdown":"HabitTimeOfDayChart-module_tooltipBreakdown__AQ27l","tooltipBreakdownRow":"HabitTimeOfDayChart-module_tooltipBreakdownRow__jHc6D","tooltipDot":"HabitTimeOfDayChart-module_tooltipDot__Khfwh","tooltipCount":"HabitTimeOfDayChart-module_tooltipCount__BRgaU"};
|
|
4797
4801
|
|
|
4798
4802
|
const DEFAULT_HABIT_COLORS = {
|
|
4799
4803
|
Exercise: '#6BCB77',
|
|
@@ -4982,7 +4986,7 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
4982
4986
|
.data([0, 3, 6, 9, 12, 15, 18, 21, 24])
|
|
4983
4987
|
.enter()
|
|
4984
4988
|
.append('line')
|
|
4985
|
-
.attr('class', styles$
|
|
4989
|
+
.attr('class', styles$b.gridLine)
|
|
4986
4990
|
.attr('x1', d => xScale(d))
|
|
4987
4991
|
.attr('x2', d => xScale(d))
|
|
4988
4992
|
.attr('y1', 0)
|
|
@@ -4991,17 +4995,24 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
4991
4995
|
const rowHeight = yScale.bandwidth();
|
|
4992
4996
|
const baseRadius = Math.min(5, Math.max(2, rowHeight / 2));
|
|
4993
4997
|
const maxRadius = baseRadius * 2.2;
|
|
4994
|
-
g.selectAll('circle.dot')
|
|
4998
|
+
const scatterDots = g.selectAll('circle.dot')
|
|
4995
4999
|
.data(clusters)
|
|
4996
5000
|
.enter()
|
|
4997
5001
|
.append('circle')
|
|
4998
|
-
.attr('class', styles$
|
|
5002
|
+
.attr('class', styles$b.dot)
|
|
4999
5003
|
.attr('cx', d => xScale(d.hourFraction) + d.xOffsetPx)
|
|
5000
5004
|
.attr('cy', d => (yScale(d.date) ?? 0) + rowHeight / 2)
|
|
5001
|
-
.attr('r',
|
|
5005
|
+
.attr('r', 0)
|
|
5002
5006
|
.attr('fill', d => getColor(d.habitKey))
|
|
5003
|
-
.attr('opacity',
|
|
5004
|
-
.style('cursor', 'pointer')
|
|
5007
|
+
.attr('opacity', 0)
|
|
5008
|
+
.style('cursor', 'pointer');
|
|
5009
|
+
scatterDots.transition()
|
|
5010
|
+
.delay(d => (xScale(d.hourFraction) / chartWidth) * 600)
|
|
5011
|
+
.duration(380)
|
|
5012
|
+
.ease(d3__namespace.easeBackOut.overshoot(1.8))
|
|
5013
|
+
.attr('r', d => Math.min(maxRadius, baseRadius * Math.sqrt(d.count)))
|
|
5014
|
+
.attr('opacity', d => hoveredHabit && hoveredHabit !== d.habitKey ? 0.15 : 0.8);
|
|
5015
|
+
scatterDots
|
|
5005
5016
|
.on('mouseenter', function (_event, d) {
|
|
5006
5017
|
const rect = svgRef.current?.getBoundingClientRect();
|
|
5007
5018
|
if (!rect)
|
|
@@ -5022,7 +5033,7 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
5022
5033
|
.tickValues([0, 3, 6, 9, 12, 15, 18, 21])
|
|
5023
5034
|
.tickFormat(d => formatHour(d));
|
|
5024
5035
|
g.append('g')
|
|
5025
|
-
.attr('class', styles$
|
|
5036
|
+
.attr('class', styles$b.xAxis)
|
|
5026
5037
|
.attr('transform', `translate(0,${chartHeight})`)
|
|
5027
5038
|
.call(xAxis);
|
|
5028
5039
|
// Y axis (dates) — evenly spaced
|
|
@@ -5035,7 +5046,7 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
5035
5046
|
const [, m, day] = d.split('-');
|
|
5036
5047
|
return `${m}/${day}`;
|
|
5037
5048
|
});
|
|
5038
|
-
g.append('g').attr('class', styles$
|
|
5049
|
+
g.append('g').attr('class', styles$b.yAxis).call(yAxis);
|
|
5039
5050
|
}
|
|
5040
5051
|
else {
|
|
5041
5052
|
// Totals view: stacked bar by hour
|
|
@@ -5051,7 +5062,7 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
5051
5062
|
.data(yScale.ticks(5))
|
|
5052
5063
|
.enter()
|
|
5053
5064
|
.append('line')
|
|
5054
|
-
.attr('class', styles$
|
|
5065
|
+
.attr('class', styles$b.gridLine)
|
|
5055
5066
|
.attr('x1', 0)
|
|
5056
5067
|
.attr('x2', chartWidth)
|
|
5057
5068
|
.attr('y1', d => yScale(d))
|
|
@@ -5059,17 +5070,24 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
5059
5070
|
hourlyTotals.forEach(bucket => {
|
|
5060
5071
|
let cumulative = 0;
|
|
5061
5072
|
const entries = Array.from(bucket.byHabit.entries()).sort(([a], [b]) => a.localeCompare(b));
|
|
5073
|
+
const barDelay = (bucket.hour / 24) * 700;
|
|
5062
5074
|
entries.forEach(([habit, count]) => {
|
|
5063
5075
|
const y = yScale(cumulative + count);
|
|
5064
5076
|
const barHeight = Math.max(0, yScale(cumulative) - yScale(cumulative + count));
|
|
5065
5077
|
g.append('rect')
|
|
5066
|
-
.attr('class', styles$
|
|
5078
|
+
.attr('class', styles$b.bar)
|
|
5067
5079
|
.attr('x', xScale(bucket.hour) ?? 0)
|
|
5068
|
-
.attr('y',
|
|
5080
|
+
.attr('y', chartHeight)
|
|
5069
5081
|
.attr('width', xScale.bandwidth())
|
|
5070
|
-
.attr('height',
|
|
5082
|
+
.attr('height', 0)
|
|
5071
5083
|
.attr('fill', getColor(habit))
|
|
5072
|
-
.attr('opacity', hoveredHabit && hoveredHabit !== habit ? 0.3 : 1)
|
|
5084
|
+
.attr('opacity', hoveredHabit && hoveredHabit !== habit ? 0.3 : 1)
|
|
5085
|
+
.transition()
|
|
5086
|
+
.delay(barDelay)
|
|
5087
|
+
.duration(550)
|
|
5088
|
+
.ease(d3__namespace.easeCubicOut)
|
|
5089
|
+
.attr('y', y)
|
|
5090
|
+
.attr('height', barHeight);
|
|
5073
5091
|
cumulative += count;
|
|
5074
5092
|
});
|
|
5075
5093
|
if (bucket.total > 0) {
|
|
@@ -5101,10 +5119,10 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
5101
5119
|
.tickValues([0, 3, 6, 9, 12, 15, 18, 21])
|
|
5102
5120
|
.tickFormat(d => formatHour(d));
|
|
5103
5121
|
g.append('g')
|
|
5104
|
-
.attr('class', styles$
|
|
5122
|
+
.attr('class', styles$b.xAxis)
|
|
5105
5123
|
.attr('transform', `translate(0,${chartHeight})`)
|
|
5106
5124
|
.call(xAxis);
|
|
5107
|
-
g.append('g').attr('class', styles$
|
|
5125
|
+
g.append('g').attr('class', styles$b.yAxis).call(d3__namespace.axisLeft(yScale).ticks(5));
|
|
5108
5126
|
}
|
|
5109
5127
|
}, [
|
|
5110
5128
|
view,
|
|
@@ -5133,12 +5151,12 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
5133
5151
|
day: 'numeric',
|
|
5134
5152
|
});
|
|
5135
5153
|
};
|
|
5136
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
5154
|
+
return (jsxRuntime.jsxs("div", { className: styles$b.container, children: [!hideControls && (jsxRuntime.jsx("div", { className: styles$b.controls, children: jsxRuntime.jsx("div", { className: styles$b.viewToggle, children: ['scatter', 'totals'].map(type => (jsxRuntime.jsxs("button", { className: `${styles$b.viewButton} ${view === type ? styles$b.active : ''}`, onClick: () => setView(type), title: viewConfig[type].label, children: [jsxRuntime.jsx("span", { className: styles$b.viewIcon, children: viewConfig[type].icon }), jsxRuntime.jsx("span", { className: styles$b.viewLabel, children: viewConfig[type].label })] }, type))) }) })), habits.length > 0 && (jsxRuntime.jsx("div", { className: `${styles$b.legend}${compactLegend ? ` ${styles$b.compactLegend}` : ''}`, children: habits.map(habit => (jsxRuntime.jsxs("button", { className: `${styles$b.legendItem} ${!activeHabits.includes(habit) ? styles$b.inactive : ''}`, onClick: () => toggleHabit(habit), onMouseEnter: () => setHoveredHabit(habit), onMouseLeave: () => setHoveredHabit(null), children: [jsxRuntime.jsx("span", { className: styles$b.legendEmoji, children: customHabitEmojis[habit] || '📊' }), jsxRuntime.jsx("span", { className: styles$b.legendColor, style: { backgroundColor: getColor(habit) } }), jsxRuntime.jsx("span", { className: styles$b.legendLabel, children: habit })] }, habit))) })), jsxRuntime.jsx("svg", { ref: svgRef, viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "xMidYMid meet", className: styles$b.chart }), tooltipData && (jsxRuntime.jsx("div", { className: `${styles$b.tooltip} ${styles$b.visible}`, style: { left: `${tooltipData.x}px`, top: `${tooltipData.y - 70}px` }, children: tooltipData.habit ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("div", { className: styles$b.tooltipHeader, children: [jsxRuntime.jsx("span", { className: styles$b.tooltipDot, style: { backgroundColor: getColor(tooltipData.habit) } }), jsxRuntime.jsxs("span", { children: [customHabitEmojis[tooltipData.habit] || '', " ", tooltipData.habit] })] }), jsxRuntime.jsxs("div", { className: styles$b.tooltipInfo, children: [jsxRuntime.jsxs("div", { className: styles$b.tooltipDate, children: [tooltipData.date ? formatTooltipDate(tooltipData.date) : '', tooltipData.minute !== undefined
|
|
5137
5155
|
? ` · ${formatTime$1(tooltipData.hour, tooltipData.minute)}`
|
|
5138
|
-
: ''] }), tooltipData.count > 1 && (jsxRuntime.jsxs("div", { className: styles$
|
|
5156
|
+
: ''] }), tooltipData.count > 1 && (jsxRuntime.jsxs("div", { className: styles$b.tooltipValue, children: [jsxRuntime.jsx("strong", { children: tooltipData.count }), jsxRuntime.jsx("span", { className: styles$b.tooltipUnits, children: "events" })] }))] })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: styles$b.tooltipHeader, children: jsxRuntime.jsx("span", { children: formatHour(tooltipData.hour) }) }), jsxRuntime.jsxs("div", { className: styles$b.tooltipInfo, children: [jsxRuntime.jsxs("div", { className: styles$b.tooltipValue, children: [jsxRuntime.jsx("strong", { children: tooltipData.count }), jsxRuntime.jsxs("span", { className: styles$b.tooltipUnits, children: ["event", tooltipData.count === 1 ? '' : 's'] })] }), tooltipData.breakdown && tooltipData.breakdown.length > 1 && (jsxRuntime.jsx("div", { className: styles$b.tooltipBreakdown, children: tooltipData.breakdown.map(({ habit, count }) => (jsxRuntime.jsxs("div", { className: styles$b.tooltipBreakdownRow, children: [jsxRuntime.jsx("span", { className: styles$b.tooltipDot, style: { backgroundColor: getColor(habit) } }), jsxRuntime.jsxs("span", { children: [customHabitEmojis[habit] || '', " ", habit] }), jsxRuntime.jsx("span", { className: styles$b.tooltipCount, children: count })] }, habit))) }))] })] })) }))] }));
|
|
5139
5157
|
};
|
|
5140
5158
|
|
|
5141
|
-
var styles$
|
|
5159
|
+
var styles$a = {"container":"SleepChart-module_container__RjHVU","header":"SleepChart-module_header__bcoWe","eyebrow":"SleepChart-module_eyebrow__KH0ox","title":"SleepChart-module_title__6-QII","chart":"SleepChart-module_chart__jC1nL","gridLine":"SleepChart-module_gridLine__hi715","gridLineAccent":"SleepChart-module_gridLineAccent__Sk-l6","sleepBar":"SleepChart-module_sleepBar__Hk76f","sleepBarHover":"SleepChart-module_sleepBarHover__cBTca","squiggle":"SleepChart-module_squiggle__Hxfjx","endpoint":"SleepChart-module_endpoint__vB4WD","endpointSleep":"SleepChart-module_endpointSleep__FA1vK","endpointWake":"SleepChart-module_endpointWake__CWEOB","xAxis":"SleepChart-module_xAxis__xzXyM","yAxis":"SleepChart-module_yAxis__7N-LA","tooltip":"SleepChart-module_tooltip__jQBv1","visible":"SleepChart-module_visible__wy0ck","tooltipDate":"SleepChart-module_tooltipDate__g2kOA","tooltipBody":"SleepChart-module_tooltipBody__RamWJ","tooltipRow":"SleepChart-module_tooltipRow__CuDaE","tooltipTotal":"SleepChart-module_tooltipTotal__5v3dE"};
|
|
5142
5160
|
|
|
5143
5161
|
const parseTimeToDecimal = (time) => {
|
|
5144
5162
|
const [hours, minutes] = time.split(':').map(Number);
|
|
@@ -5149,7 +5167,7 @@ const formatTime = (hour) => {
|
|
|
5149
5167
|
const minutes = Math.round((hour % 1) * 60);
|
|
5150
5168
|
return `${h24.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;
|
|
5151
5169
|
};
|
|
5152
|
-
const formatDuration = (decimal) => {
|
|
5170
|
+
const formatDuration$1 = (decimal) => {
|
|
5153
5171
|
const h = Math.floor(decimal);
|
|
5154
5172
|
const m = Math.round((decimal % 1) * 60);
|
|
5155
5173
|
return `${h}h ${m.toString().padStart(2, '0')}m`;
|
|
@@ -5209,23 +5227,25 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5209
5227
|
.data(d3__namespace.range(18, 43, 3))
|
|
5210
5228
|
.enter()
|
|
5211
5229
|
.append('line')
|
|
5212
|
-
.attr('class', styles$
|
|
5230
|
+
.attr('class', styles$a.gridLine)
|
|
5213
5231
|
.attr('x1', (d) => xScale(d))
|
|
5214
5232
|
.attr('y1', 0)
|
|
5215
5233
|
.attr('x2', (d) => xScale(d))
|
|
5216
5234
|
.attr('y2', chartHeight)
|
|
5217
|
-
.classed(styles$
|
|
5235
|
+
.classed(styles$a.gridLineAccent, (d) => {
|
|
5218
5236
|
const hour = d % 24;
|
|
5219
5237
|
return hour === 0 || hour === 12;
|
|
5220
5238
|
});
|
|
5221
|
-
|
|
5239
|
+
const rowStagger = Math.min(40, 600 / Math.max(1, sleepData.length));
|
|
5240
|
+
sleepData.forEach((dayData, rowIdx) => {
|
|
5222
5241
|
const yValue = yScale(dayData.date);
|
|
5223
5242
|
if (yValue === undefined)
|
|
5224
5243
|
return;
|
|
5244
|
+
const rowDelay = rowIdx * rowStagger;
|
|
5225
5245
|
const barHeight = yScale.bandwidth();
|
|
5226
5246
|
const sleepGroup = g
|
|
5227
5247
|
.append('g')
|
|
5228
|
-
.attr('class', styles$
|
|
5248
|
+
.attr('class', styles$a.sleepBar)
|
|
5229
5249
|
.style('cursor', onDateClick ? 'pointer' : 'default')
|
|
5230
5250
|
.on('click', () => onDateClick?.(dayData.date));
|
|
5231
5251
|
let sleepHour = null;
|
|
@@ -5255,7 +5275,7 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5255
5275
|
const d = buildSquigglePath(x1, x2, y, amplitude, wavelength);
|
|
5256
5276
|
const path = sleepGroup
|
|
5257
5277
|
.append('path')
|
|
5258
|
-
.attr('class', styles$
|
|
5278
|
+
.attr('class', styles$a.squiggle)
|
|
5259
5279
|
.attr('d', d)
|
|
5260
5280
|
.attr('fill', 'none');
|
|
5261
5281
|
const node = path.node();
|
|
@@ -5265,6 +5285,7 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5265
5285
|
path.attr('stroke-dasharray', length)
|
|
5266
5286
|
.attr('stroke-dashoffset', length)
|
|
5267
5287
|
.transition()
|
|
5288
|
+
.delay(rowDelay)
|
|
5268
5289
|
.duration(540)
|
|
5269
5290
|
.ease(d3__namespace.easeCubicOut)
|
|
5270
5291
|
.attr('stroke-dashoffset', 0);
|
|
@@ -5272,32 +5293,32 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5272
5293
|
if (sleepHour !== null) {
|
|
5273
5294
|
sleepGroup
|
|
5274
5295
|
.append('circle')
|
|
5275
|
-
.attr('class', `${styles$
|
|
5296
|
+
.attr('class', `${styles$a.endpoint} ${styles$a.endpointSleep}`)
|
|
5276
5297
|
.attr('cx', xScale(sleepHour))
|
|
5277
5298
|
.attr('cy', yValue + barHeight / 2)
|
|
5278
5299
|
.attr('r', 0)
|
|
5279
5300
|
.transition()
|
|
5280
5301
|
.duration(280)
|
|
5281
|
-
.delay(160)
|
|
5302
|
+
.delay(rowDelay + 160)
|
|
5282
5303
|
.ease(d3__namespace.easeCubicOut)
|
|
5283
5304
|
.attr('r', 3.5);
|
|
5284
5305
|
}
|
|
5285
5306
|
if (wakeHour !== null) {
|
|
5286
5307
|
sleepGroup
|
|
5287
5308
|
.append('circle')
|
|
5288
|
-
.attr('class', `${styles$
|
|
5309
|
+
.attr('class', `${styles$a.endpoint} ${styles$a.endpointWake}`)
|
|
5289
5310
|
.attr('cx', xScale(wakeHour))
|
|
5290
5311
|
.attr('cy', yValue + barHeight / 2)
|
|
5291
5312
|
.attr('r', 0)
|
|
5292
5313
|
.transition()
|
|
5293
5314
|
.duration(280)
|
|
5294
|
-
.delay(220)
|
|
5315
|
+
.delay(rowDelay + 220)
|
|
5295
5316
|
.ease(d3__namespace.easeCubicOut)
|
|
5296
5317
|
.attr('r', 3.5);
|
|
5297
5318
|
}
|
|
5298
5319
|
sleepGroup
|
|
5299
5320
|
.on('mouseenter', function (event) {
|
|
5300
|
-
d3__namespace.select(this).classed(styles$
|
|
5321
|
+
d3__namespace.select(this).classed(styles$a.sleepBarHover, true);
|
|
5301
5322
|
const duration = sleepHour !== null && wakeHour !== null ? wakeHour - sleepHour : null;
|
|
5302
5323
|
setTooltipData({
|
|
5303
5324
|
date: dayData.date,
|
|
@@ -5309,7 +5330,7 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5309
5330
|
});
|
|
5310
5331
|
})
|
|
5311
5332
|
.on('mouseleave', function () {
|
|
5312
|
-
d3__namespace.select(this).classed(styles$
|
|
5333
|
+
d3__namespace.select(this).classed(styles$a.sleepBarHover, false);
|
|
5313
5334
|
setTooltipData(null);
|
|
5314
5335
|
})
|
|
5315
5336
|
.on('mousemove', function (event) {
|
|
@@ -5322,7 +5343,7 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5322
5343
|
}));
|
|
5323
5344
|
const xAxis = g
|
|
5324
5345
|
.append('g')
|
|
5325
|
-
.attr('class', styles$
|
|
5346
|
+
.attr('class', styles$a.xAxis)
|
|
5326
5347
|
.attr('transform', `translate(0,${chartHeight})`)
|
|
5327
5348
|
.call(d3__namespace
|
|
5328
5349
|
.axisBottom(xScale)
|
|
@@ -5338,7 +5359,7 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5338
5359
|
const yAxisTicks = yDomain.filter((_, i) => i % tickEvery === 0);
|
|
5339
5360
|
const yAxis = g
|
|
5340
5361
|
.append('g')
|
|
5341
|
-
.attr('class', styles$
|
|
5362
|
+
.attr('class', styles$a.yAxis)
|
|
5342
5363
|
.call(d3__namespace
|
|
5343
5364
|
.axisLeft(yScale)
|
|
5344
5365
|
.tickValues(yAxisTicks)
|
|
@@ -5352,14 +5373,14 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5352
5373
|
.tickPadding(12));
|
|
5353
5374
|
yAxis.select('.domain').remove();
|
|
5354
5375
|
}, [sleepData, chartWidth, chartHeight, margin, onDateClick, height, width]);
|
|
5355
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
5376
|
+
return (jsxRuntime.jsxs("div", { className: styles$a.container, children: [jsxRuntime.jsxs("header", { className: styles$a.header, children: [jsxRuntime.jsx("span", { className: styles$a.eyebrow, children: "the night" }), jsxRuntime.jsxs("h3", { className: styles$a.title, children: [jsxRuntime.jsx("em", { children: "Sleep" }), " pattern"] })] }), jsxRuntime.jsx("svg", { ref: svgRef, width: width, height: height, className: styles$a.chart }), tooltipData && (jsxRuntime.jsxs("div", { className: `${styles$a.tooltip} ${styles$a.visible}`, style: { left: `${tooltipData.x}px`, top: `${tooltipData.y}px` }, children: [jsxRuntime.jsx("div", { className: styles$a.tooltipDate, children: new Date(tooltipData.date).toLocaleDateString('en-US', {
|
|
5356
5377
|
weekday: 'short',
|
|
5357
5378
|
month: 'short',
|
|
5358
5379
|
day: 'numeric',
|
|
5359
|
-
}) }), jsxRuntime.jsxs("div", { className: styles$
|
|
5380
|
+
}) }), jsxRuntime.jsxs("div", { className: styles$a.tooltipBody, children: [tooltipData.sleepTime && (jsxRuntime.jsxs("div", { className: styles$a.tooltipRow, children: [jsxRuntime.jsx("em", { children: "sleep" }), jsxRuntime.jsx("time", { children: tooltipData.sleepTime })] })), tooltipData.wakeTime && (jsxRuntime.jsxs("div", { className: styles$a.tooltipRow, children: [jsxRuntime.jsx("em", { children: "wake" }), jsxRuntime.jsx("time", { children: tooltipData.wakeTime })] })), tooltipData.duration !== null && (jsxRuntime.jsxs("div", { className: `${styles$a.tooltipRow} ${styles$a.tooltipTotal}`, children: [jsxRuntime.jsx("em", { children: "total" }), jsxRuntime.jsx("time", { children: formatDuration$1(tooltipData.duration) })] }))] })] }))] }));
|
|
5360
5381
|
};
|
|
5361
5382
|
|
|
5362
|
-
var styles$
|
|
5383
|
+
var styles$9 = {"container":"BooleansHeatmap-module_container__IOyeU","title":"BooleansHeatmap-module_title__8DRRQ","habitEmoji":"BooleansHeatmap-module_habitEmoji__Mawv-","chart":"BooleansHeatmap-module_chart__-q0Pc","monthLabel":"BooleansHeatmap-module_monthLabel__MXbIg","dayLabel":"BooleansHeatmap-module_dayLabel__2RRtm","cell":"BooleansHeatmap-module_cell__WADVB","legend":"BooleansHeatmap-module_legend__WqGF8","legendItem":"BooleansHeatmap-module_legendItem__rDE2g","legendColor":"BooleansHeatmap-module_legendColor__Z34-d","tooltip":"BooleansHeatmap-module_tooltip__-fHl7"};
|
|
5363
5384
|
|
|
5364
5385
|
const DAYS_OF_WEEK = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
|
|
5365
5386
|
const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
@@ -5413,20 +5434,20 @@ const BooleansHeatmap = ({ data, habitName, width = 800, height = 200, habitColo
|
|
|
5413
5434
|
g.append('text')
|
|
5414
5435
|
.attr('x', weekIndex * (cellSize + cellGap))
|
|
5415
5436
|
.attr('y', -10)
|
|
5416
|
-
.attr('class', styles$
|
|
5437
|
+
.attr('class', styles$9.monthLabel)
|
|
5417
5438
|
.text(MONTHS[month]);
|
|
5418
5439
|
});
|
|
5419
5440
|
DAYS_OF_WEEK.forEach((day, index) => {
|
|
5420
5441
|
g.append('text')
|
|
5421
5442
|
.attr('x', -10)
|
|
5422
5443
|
.attr('y', index * (cellSize + cellGap) + cellSize / 2)
|
|
5423
|
-
.attr('class', styles$
|
|
5444
|
+
.attr('class', styles$9.dayLabel)
|
|
5424
5445
|
.attr('text-anchor', 'end')
|
|
5425
5446
|
.attr('alignment-baseline', 'middle')
|
|
5426
5447
|
.text(day);
|
|
5427
5448
|
});
|
|
5428
5449
|
const tooltip = d3__namespace.select('body').append('div')
|
|
5429
|
-
.attr('class', styles$
|
|
5450
|
+
.attr('class', styles$9.tooltip)
|
|
5430
5451
|
.style('opacity', 0)
|
|
5431
5452
|
.style('position', 'absolute');
|
|
5432
5453
|
const daysToShow = weeksToShow * 7;
|
|
@@ -5439,16 +5460,29 @@ const BooleansHeatmap = ({ data, habitName, width = 800, height = 200, habitColo
|
|
|
5439
5460
|
const dayOfWeek = (date.getDay() + 6) % 7;
|
|
5440
5461
|
const weekIndex = Math.floor((i + startDayOffset) / 7);
|
|
5441
5462
|
const isTrue = dateString in data && data[dateString];
|
|
5463
|
+
const cx = weekIndex * (cellSize + cellGap) + cellSize / 2;
|
|
5464
|
+
const cy = dayOfWeek * (cellSize + cellGap) + cellSize / 2;
|
|
5442
5465
|
const rect = g.append('rect')
|
|
5466
|
+
.attr('x', cx)
|
|
5467
|
+
.attr('y', cy)
|
|
5468
|
+
.attr('width', 0)
|
|
5469
|
+
.attr('height', 0)
|
|
5470
|
+
.attr('rx', 3)
|
|
5471
|
+
.attr('class', styles$9.cell)
|
|
5472
|
+
.attr('data-date', dateString)
|
|
5473
|
+
.attr('data-value', isTrue ? 'true' : 'false')
|
|
5474
|
+
.style('fill', isTrue ? habitColor : '#4D4D4DFF')
|
|
5475
|
+
.style('opacity', 0);
|
|
5476
|
+
const cellDelay = (weekIndex + dayOfWeek) * 18;
|
|
5477
|
+
rect.transition()
|
|
5478
|
+
.delay(cellDelay)
|
|
5479
|
+
.duration(320)
|
|
5480
|
+
.ease(d3__namespace.easeBackOut.overshoot(1.6))
|
|
5443
5481
|
.attr('x', weekIndex * (cellSize + cellGap))
|
|
5444
5482
|
.attr('y', dayOfWeek * (cellSize + cellGap))
|
|
5445
5483
|
.attr('width', cellSize)
|
|
5446
5484
|
.attr('height', cellSize)
|
|
5447
|
-
.
|
|
5448
|
-
.attr('class', styles$5.cell)
|
|
5449
|
-
.attr('data-date', dateString)
|
|
5450
|
-
.attr('data-value', isTrue ? 'true' : 'false')
|
|
5451
|
-
.style('fill', isTrue ? habitColor : '#4D4D4DFF');
|
|
5485
|
+
.style('opacity', 1);
|
|
5452
5486
|
rect.on('mouseover', function (event) {
|
|
5453
5487
|
tooltip.transition()
|
|
5454
5488
|
.duration(200)
|
|
@@ -5473,10 +5507,10 @@ const BooleansHeatmap = ({ data, habitName, width = 800, height = 200, habitColo
|
|
|
5473
5507
|
tooltip.remove();
|
|
5474
5508
|
};
|
|
5475
5509
|
}, [data, habitName, width, height, startDate, endDate, weeksToShow, habitColor, habitEmoji]);
|
|
5476
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
5510
|
+
return (jsxRuntime.jsxs("div", { className: styles$9.container, children: [jsxRuntime.jsxs("h3", { className: styles$9.title, children: [jsxRuntime.jsx("span", { className: styles$9.habitEmoji, children: habitEmoji }), habitName] }), jsxRuntime.jsx("svg", { ref: svgRef, width: width, height: height, className: styles$9.chart }), jsxRuntime.jsxs("div", { className: styles$9.legend, children: [jsxRuntime.jsxs("span", { className: styles$9.legendItem, children: [jsxRuntime.jsx("span", { className: styles$9.legendColor, style: { backgroundColor: habitColor } }), "Done"] }), jsxRuntime.jsxs("span", { className: styles$9.legendItem, children: [jsxRuntime.jsx("span", { className: styles$9.legendColor, style: { backgroundColor: '#4D4D4DFF' } }), "Not done"] })] })] }));
|
|
5477
5511
|
};
|
|
5478
5512
|
|
|
5479
|
-
var styles$
|
|
5513
|
+
var styles$8 = {"container":"SunburstChart-module_container__w1ZYc","title":"SunburstChart-module_title__T6Ak7","chart":"SunburstChart-module_chart__BFM6E","tooltip":"SunburstChart-module_tooltip__TuTAN"};
|
|
5480
5514
|
|
|
5481
5515
|
const COLOR_PALETTE = [
|
|
5482
5516
|
'#6366f1',
|
|
@@ -5540,7 +5574,8 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
5540
5574
|
node.y0Original = d.y0;
|
|
5541
5575
|
node.y1Original = d.y1;
|
|
5542
5576
|
});
|
|
5543
|
-
|
|
5577
|
+
// arc generator (used for type only — entrance animation builds its own)
|
|
5578
|
+
void d3__namespace
|
|
5544
5579
|
.arc()
|
|
5545
5580
|
.startAngle((d) => d.x0)
|
|
5546
5581
|
.endAngle((d) => d.x1)
|
|
@@ -5550,7 +5585,7 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
5550
5585
|
const tooltip = d3__namespace
|
|
5551
5586
|
.select('body')
|
|
5552
5587
|
.append('div')
|
|
5553
|
-
.attr('class', styles$
|
|
5588
|
+
.attr('class', styles$8.tooltip)
|
|
5554
5589
|
.style('opacity', 0)
|
|
5555
5590
|
.style('position', 'absolute');
|
|
5556
5591
|
// Function to reset to original view
|
|
@@ -5717,7 +5752,6 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
5717
5752
|
.data(nodes.filter((d) => d.depth > 0 && d.value && d.value > 0))
|
|
5718
5753
|
.enter()
|
|
5719
5754
|
.append('path')
|
|
5720
|
-
.attr('d', arc)
|
|
5721
5755
|
.attr('fill', (d) => {
|
|
5722
5756
|
let ancestor = d;
|
|
5723
5757
|
while (ancestor.depth > 1 && ancestor.parent) {
|
|
@@ -5781,6 +5815,46 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
5781
5815
|
.style('left', event.pageX + 10 + 'px')
|
|
5782
5816
|
.style('top', event.pageY - 28 + 'px');
|
|
5783
5817
|
});
|
|
5818
|
+
// Entrance animation: grow segments outward from center, staggered by depth + angle.
|
|
5819
|
+
const entranceDuration = 700;
|
|
5820
|
+
paths
|
|
5821
|
+
.attr('d', (d) => {
|
|
5822
|
+
const collapsedArc = d3__namespace
|
|
5823
|
+
.arc()
|
|
5824
|
+
.startAngle(() => d.x0)
|
|
5825
|
+
.endAngle(() => d.x1)
|
|
5826
|
+
.innerRadius(() => 0)
|
|
5827
|
+
.outerRadius(() => 0)
|
|
5828
|
+
.cornerRadius(3);
|
|
5829
|
+
return collapsedArc(d) || '';
|
|
5830
|
+
})
|
|
5831
|
+
.style('opacity', 0)
|
|
5832
|
+
.transition()
|
|
5833
|
+
.delay((d) => (d.depth - 1) * 120 + ((d.x0 + d.x1) / 2 / (2 * Math.PI)) * 240)
|
|
5834
|
+
.duration(entranceDuration)
|
|
5835
|
+
.ease(d3__namespace.easeCubicOut)
|
|
5836
|
+
.style('opacity', 1)
|
|
5837
|
+
.attrTween('d', function (d) {
|
|
5838
|
+
const node = d;
|
|
5839
|
+
const startY0 = 0;
|
|
5840
|
+
const startY1 = 0;
|
|
5841
|
+
const endY0 = node.y0Original;
|
|
5842
|
+
const endY1 = node.y1Original;
|
|
5843
|
+
return (t) => {
|
|
5844
|
+
const currY0 = d3__namespace.interpolate(startY0, endY0)(t);
|
|
5845
|
+
const currY1 = d3__namespace.interpolate(startY1, endY1)(t);
|
|
5846
|
+
node.y0 = currY0;
|
|
5847
|
+
node.y1 = currY1;
|
|
5848
|
+
const interpolatedArc = d3__namespace
|
|
5849
|
+
.arc()
|
|
5850
|
+
.startAngle(() => node.x0)
|
|
5851
|
+
.endAngle(() => node.x1)
|
|
5852
|
+
.innerRadius(() => Math.sqrt(Math.max(0, currY0)))
|
|
5853
|
+
.outerRadius(() => Math.sqrt(Math.max(0, currY1)))
|
|
5854
|
+
.cornerRadius(3);
|
|
5855
|
+
return interpolatedArc(node) || '';
|
|
5856
|
+
};
|
|
5857
|
+
});
|
|
5784
5858
|
const shouldDisplayLabel = (d) => {
|
|
5785
5859
|
const angle = d.x1 - d.x0;
|
|
5786
5860
|
// When zoomed in, be more lenient with label display since segments are larger
|
|
@@ -5932,8 +6006,9 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
5932
6006
|
.append('text')
|
|
5933
6007
|
.attr('class', 'segment-label')
|
|
5934
6008
|
.attr('transform', (d) => {
|
|
5935
|
-
const
|
|
5936
|
-
const
|
|
6009
|
+
const node = d;
|
|
6010
|
+
const angle = (node.x0 + node.x1) / 2;
|
|
6011
|
+
const radiusVal = (Math.sqrt(node.y0Original) + Math.sqrt(node.y1Original)) / 2;
|
|
5937
6012
|
const x = Math.cos(angle - Math.PI / 2) * radiusVal;
|
|
5938
6013
|
const y = Math.sin(angle - Math.PI / 2) * radiusVal;
|
|
5939
6014
|
return `translate(${x},${y})`;
|
|
@@ -5948,15 +6023,20 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
5948
6023
|
.text((d) => {
|
|
5949
6024
|
const maxLength = d.depth === 1 ? 12 : 8;
|
|
5950
6025
|
return d.data.name.substring(0, maxLength);
|
|
5951
|
-
})
|
|
6026
|
+
})
|
|
6027
|
+
.style('opacity', 0)
|
|
6028
|
+
.transition()
|
|
6029
|
+
.delay((d) => (d.depth - 1) * 120 + ((d.x0 + d.x1) / 2 / (2 * Math.PI)) * 240 + 500)
|
|
6030
|
+
.duration(300)
|
|
6031
|
+
.style('opacity', 1);
|
|
5952
6032
|
return () => {
|
|
5953
6033
|
tooltip.remove();
|
|
5954
6034
|
};
|
|
5955
6035
|
}, [data, width, height, colorMap, radius, tagColors, unit, centerLabel]);
|
|
5956
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
6036
|
+
return (jsxRuntime.jsxs("div", { className: styles$8.container, children: [jsxRuntime.jsx("h3", { className: styles$8.title, children: title }), jsxRuntime.jsx("svg", { ref: svgRef, viewBox: `0 0 ${width} ${height}`, className: styles$8.chart })] }));
|
|
5957
6037
|
};
|
|
5958
6038
|
|
|
5959
|
-
var styles$
|
|
6039
|
+
var styles$7 = {"container":"PieChart-module_container__tXjbe","title":"PieChart-module_title__61o0R","chartContainer":"PieChart-module_chartContainer__uLmOz","chart":"PieChart-module_chart__3nqON","legend":"PieChart-module_legend__rAWgh","legendItem":"PieChart-module_legendItem__Nb031","legendColor":"PieChart-module_legendColor__fLuv9","legendLabel":"PieChart-module_legendLabel__xbjBr","legendValue":"PieChart-module_legendValue__h2WS2","tooltip":"PieChart-module_tooltip__140RU"};
|
|
5960
6040
|
|
|
5961
6041
|
const DEFAULT_COLORS = [
|
|
5962
6042
|
'#6366f1', '#8b5cf6', '#06b6d4', '#10b981',
|
|
@@ -5996,7 +6076,7 @@ const PieChart = ({ data, width = 400, height = 400, title = 'Distribution', sho
|
|
|
5996
6076
|
.innerRadius(radius * 0.7)
|
|
5997
6077
|
.outerRadius(radius * 0.7);
|
|
5998
6078
|
const tooltip = d3__namespace.select('body').append('div')
|
|
5999
|
-
.attr('class', styles$
|
|
6079
|
+
.attr('class', styles$7.tooltip)
|
|
6000
6080
|
.style('opacity', 0)
|
|
6001
6081
|
.style('position', 'absolute');
|
|
6002
6082
|
const pieData = pie(data);
|
|
@@ -6005,13 +6085,25 @@ const PieChart = ({ data, width = 400, height = 400, title = 'Distribution', sho
|
|
|
6005
6085
|
.data(pieData)
|
|
6006
6086
|
.enter().append('g')
|
|
6007
6087
|
.attr('class', 'arc');
|
|
6008
|
-
|
|
6009
|
-
|
|
6088
|
+
const sweepDuration = 900;
|
|
6089
|
+
const arcPaths = arcs.append('path')
|
|
6010
6090
|
.attr('fill', (d, i) => d.data.color || DEFAULT_COLORS[i % DEFAULT_COLORS.length])
|
|
6011
6091
|
.attr('stroke', 'var(--bg-primary)')
|
|
6012
6092
|
.attr('stroke-width', 3)
|
|
6013
6093
|
.style('cursor', 'pointer')
|
|
6014
6094
|
.style('filter', 'drop-shadow(0 2px 8px rgba(0,0,0,0.15))')
|
|
6095
|
+
// Start collapsed at the slice's startAngle (zero-width slice)
|
|
6096
|
+
.attr('d', d => arc({ ...d, endAngle: d.startAngle }));
|
|
6097
|
+
arcPaths
|
|
6098
|
+
.transition()
|
|
6099
|
+
.delay(d => (d.startAngle / (2 * Math.PI)) * sweepDuration)
|
|
6100
|
+
.duration(d => ((d.endAngle - d.startAngle) / (2 * Math.PI)) * sweepDuration + 200)
|
|
6101
|
+
.ease(d3__namespace.easeCubicOut)
|
|
6102
|
+
.attrTween('d', function (d) {
|
|
6103
|
+
const i = d3__namespace.interpolate(d.startAngle, d.endAngle);
|
|
6104
|
+
return (t) => arc({ ...d, endAngle: i(t) }) || '';
|
|
6105
|
+
});
|
|
6106
|
+
arcPaths
|
|
6015
6107
|
.on('mouseover', function (event, d) {
|
|
6016
6108
|
const hoverArc = d3__namespace.arc()
|
|
6017
6109
|
.innerRadius(radius * 0.4)
|
|
@@ -6083,21 +6175,593 @@ const PieChart = ({ data, width = 400, height = 400, title = 'Distribution', sho
|
|
|
6083
6175
|
.style('text-shadow', (d, i) => {
|
|
6084
6176
|
const segmentColor = d.data.color || DEFAULT_COLORS[i % DEFAULT_COLORS.length];
|
|
6085
6177
|
const textColor = getTextColor(segmentColor);
|
|
6086
|
-
// Use contrasting shadow color
|
|
6087
6178
|
const shadowColor = textColor === '#ffffff' ? 'rgba(0,0,0,0.4)' : 'rgba(255,255,255,0.4)';
|
|
6088
6179
|
return `0 1px 2px ${shadowColor}`;
|
|
6089
6180
|
})
|
|
6090
6181
|
.text(d => {
|
|
6091
6182
|
const percentage = ((d.data.value / total) * 100);
|
|
6092
6183
|
return percentage > 8 ? `${percentage.toFixed(0)}%` : '';
|
|
6093
|
-
})
|
|
6184
|
+
})
|
|
6185
|
+
.style('opacity', 0)
|
|
6186
|
+
.transition()
|
|
6187
|
+
.delay(d => (((d.startAngle + d.endAngle) / 2) / (2 * Math.PI)) * sweepDuration + 250)
|
|
6188
|
+
.duration(300)
|
|
6189
|
+
.style('opacity', 1);
|
|
6094
6190
|
return () => {
|
|
6095
6191
|
tooltip.remove();
|
|
6096
6192
|
};
|
|
6097
6193
|
}, [data, width, height, radius, centerLabel, unit]);
|
|
6098
|
-
return (jsxRuntime.jsxs("div", { className: styles$
|
|
6194
|
+
return (jsxRuntime.jsxs("div", { className: styles$7.container, children: [jsxRuntime.jsx("h3", { className: styles$7.title, children: title }), jsxRuntime.jsxs("div", { className: styles$7.chartContainer, children: [jsxRuntime.jsx("svg", { ref: svgRef, width: width, height: height, className: styles$7.chart }), showLegend && (jsxRuntime.jsx("div", { className: styles$7.legend, children: data.map((item, index) => (jsxRuntime.jsxs("div", { className: styles$7.legendItem, children: [jsxRuntime.jsx("span", { className: styles$7.legendColor, style: {
|
|
6099
6195
|
backgroundColor: item.color || DEFAULT_COLORS[index % DEFAULT_COLORS.length]
|
|
6100
|
-
} }), jsxRuntime.jsx("span", { className: styles$
|
|
6196
|
+
} }), jsxRuntime.jsx("span", { className: styles$7.legendLabel, children: item.name }), jsxRuntime.jsx("span", { className: styles$7.legendValue, children: item.value.toLocaleString() })] }, item.name))) }))] })] }));
|
|
6197
|
+
};
|
|
6198
|
+
|
|
6199
|
+
var styles$6 = {"container":"ProgressRings-module_container__7AGya","grid":"ProgressRings-module_grid__aJB-2","ring":"ProgressRings-module_ring__Z2F6p","svg":"ProgressRings-module_svg__Aelkb","center":"ProgressRings-module_center__BIg-q","emoji":"ProgressRings-module_emoji__jA4Yz","pct":"ProgressRings-module_pct__9t8iC","over":"ProgressRings-module_over__0RLdn","label":"ProgressRings-module_label__2Ih08","amounts":"ProgressRings-module_amounts__85r8C","budget":"ProgressRings-module_budget__9xHyq","empty":"ProgressRings-module_empty__eZg6j","tooltip":"ProgressRings-module_tooltip__ApZHH","visible":"ProgressRings-module_visible__2ygIq","tipLabel":"ProgressRings-module_tipLabel__1LHAW","tipRow":"ProgressRings-module_tipRow__0VfOc"};
|
|
6200
|
+
|
|
6201
|
+
const DEFAULT_FORMAT = (n) => n.toLocaleString();
|
|
6202
|
+
const DEFAULT_OVER = (over, fmt) => `Over by ${fmt(over)}`;
|
|
6203
|
+
const DEFAULT_UNDER = (left, fmt) => `${fmt(left)} left`;
|
|
6204
|
+
const ProgressRings = ({ rings, formatValue = DEFAULT_FORMAT, ringSize = 120, stroke = 12, emptyMessage = 'No data to display', overLabel = DEFAULT_OVER, underLabel = DEFAULT_UNDER, }) => {
|
|
6205
|
+
const containerRef = React.useRef(null);
|
|
6206
|
+
const tooltipRef = React.useRef(null);
|
|
6207
|
+
const showTip = React.useCallback((event, html) => {
|
|
6208
|
+
const tip = tooltipRef.current;
|
|
6209
|
+
const ctn = containerRef.current;
|
|
6210
|
+
if (!tip || !ctn)
|
|
6211
|
+
return;
|
|
6212
|
+
const rect = ctn.getBoundingClientRect();
|
|
6213
|
+
tip.style.left = `${event.clientX - rect.left + 12}px`;
|
|
6214
|
+
tip.style.top = `${event.clientY - rect.top - 10}px`;
|
|
6215
|
+
tip.innerHTML = html;
|
|
6216
|
+
tip.classList.add(styles$6.visible);
|
|
6217
|
+
}, []);
|
|
6218
|
+
const hideTip = React.useCallback(() => {
|
|
6219
|
+
tooltipRef.current?.classList.remove(styles$6.visible);
|
|
6220
|
+
}, []);
|
|
6221
|
+
if (rings.length === 0) {
|
|
6222
|
+
return jsxRuntime.jsx("div", { className: styles$6.empty, children: emptyMessage });
|
|
6223
|
+
}
|
|
6224
|
+
const radius = (ringSize - stroke) / 2;
|
|
6225
|
+
const circumference = 2 * Math.PI * radius;
|
|
6226
|
+
return (jsxRuntime.jsxs("div", { className: styles$6.container, ref: containerRef, children: [jsxRuntime.jsx("div", { className: styles$6.grid, children: rings.map((r, idx) => {
|
|
6227
|
+
const ratio = r.target > 0 ? r.value / r.target : 0;
|
|
6228
|
+
const clamped = Math.min(1, ratio);
|
|
6229
|
+
const finalOffset = circumference * (1 - clamped);
|
|
6230
|
+
const pct = Math.round(ratio * 100);
|
|
6231
|
+
const over = ratio > 1;
|
|
6232
|
+
const ringColor = over ? 'var(--color-error)' : (r.color || 'var(--color-primary)');
|
|
6233
|
+
return (jsxRuntime.jsx(Ring, { label: r.label, emoji: r.emoji, ringSize: ringSize, stroke: stroke, radius: radius, circumference: circumference, finalOffset: finalOffset, ringColor: ringColor, value: r.value, target: r.target, pct: pct, over: over, formatValue: formatValue, overLabel: overLabel, underLabel: underLabel, delay: idx * 80, onTip: showTip, onTipLeave: hideTip }, r.label));
|
|
6234
|
+
}) }), jsxRuntime.jsx("div", { ref: tooltipRef, className: styles$6.tooltip })] }));
|
|
6235
|
+
};
|
|
6236
|
+
const Ring = ({ label, emoji, ringSize, stroke, radius, circumference, finalOffset, ringColor, value, target, pct, over, formatValue, overLabel, underLabel, delay, onTip, onTipLeave, }) => {
|
|
6237
|
+
const circleRef = React.useRef(null);
|
|
6238
|
+
React.useEffect(() => {
|
|
6239
|
+
const node = circleRef.current;
|
|
6240
|
+
if (!node)
|
|
6241
|
+
return;
|
|
6242
|
+
// Reset to empty then animate to final offset.
|
|
6243
|
+
node.style.transition = 'none';
|
|
6244
|
+
node.style.strokeDashoffset = `${circumference}`;
|
|
6245
|
+
// Force reflow so the transition picks up the new starting state.
|
|
6246
|
+
void node.getBoundingClientRect();
|
|
6247
|
+
node.style.transition = `stroke-dashoffset 900ms cubic-bezier(0.22, 1, 0.36, 1) ${delay}ms`;
|
|
6248
|
+
node.style.strokeDashoffset = `${finalOffset}`;
|
|
6249
|
+
}, [circumference, finalOffset, delay]);
|
|
6250
|
+
return (jsxRuntime.jsxs("div", { className: styles$6.ring, onMouseMove: (e) => onTip(e, `<div class="${styles$6.tipLabel}">${emoji ?? ''} ${label}</div>` +
|
|
6251
|
+
`<div class="${styles$6.tipRow}">${formatValue(value)} of ${formatValue(target)}</div>` +
|
|
6252
|
+
`<div class="${styles$6.tipRow}" style="color:${over ? 'var(--color-error)' : 'var(--color-success)'}">${over ? overLabel(value - target, formatValue) : underLabel(target - value, formatValue)}</div>`), onMouseLeave: onTipLeave, children: [jsxRuntime.jsxs("svg", { width: ringSize, height: ringSize, className: styles$6.svg, children: [jsxRuntime.jsx("circle", { cx: ringSize / 2, cy: ringSize / 2, r: radius, fill: "none", stroke: "var(--color-border)", strokeWidth: stroke, strokeOpacity: "0.35" }), jsxRuntime.jsx("circle", { ref: circleRef, cx: ringSize / 2, cy: ringSize / 2, r: radius, fill: "none", stroke: ringColor, strokeWidth: stroke, strokeLinecap: "round", strokeDasharray: circumference, strokeDashoffset: circumference, transform: `rotate(-90 ${ringSize / 2} ${ringSize / 2})` })] }), jsxRuntime.jsxs("div", { className: styles$6.center, children: [emoji && jsxRuntime.jsx("div", { className: styles$6.emoji, children: emoji }), jsxRuntime.jsxs("div", { className: `${styles$6.pct} ${over ? styles$6.over : ''}`, children: [pct, "%"] })] }), jsxRuntime.jsx("div", { className: styles$6.label, children: label }), jsxRuntime.jsxs("div", { className: styles$6.amounts, children: [jsxRuntime.jsx("span", { className: over ? styles$6.over : '', children: formatValue(value) }), jsxRuntime.jsxs("span", { className: styles$6.budget, children: [" / ", formatValue(target)] })] })] }));
|
|
6253
|
+
};
|
|
6254
|
+
|
|
6255
|
+
var styles$5 = {"container":"RadialDayChart-module_container__2QM22","clockWrap":"RadialDayChart-module_clockWrap__dThw1","tooltip":"RadialDayChart-module_tooltip__NhrPN","visible":"RadialDayChart-module_visible__0wHWj","tooltipLabel":"RadialDayChart-module_tooltipLabel__--6Gk","tooltipRow":"RadialDayChart-module_tooltipRow__uPfvi"};
|
|
6256
|
+
|
|
6257
|
+
const formatHHMM = (h) => {
|
|
6258
|
+
const hh = Math.floor(h);
|
|
6259
|
+
const mm = Math.floor((h - hh) * 60);
|
|
6260
|
+
return `${String(hh).padStart(2, '0')}:${String(mm).padStart(2, '0')}`;
|
|
6261
|
+
};
|
|
6262
|
+
const formatDuration = (hours) => {
|
|
6263
|
+
const mins = Math.round(hours * 60);
|
|
6264
|
+
if (mins < 60)
|
|
6265
|
+
return `${mins}m`;
|
|
6266
|
+
return `${Math.floor(mins / 60)}h ${mins % 60}m`;
|
|
6267
|
+
};
|
|
6268
|
+
const RadialDayChart = ({ rings, showNowHand = true, centerTopLabel, centerMainLabel, size: fixedSize, minSize = 280, maxSize = 560, }) => {
|
|
6269
|
+
const containerRef = React.useRef(null);
|
|
6270
|
+
const svgRef = React.useRef(null);
|
|
6271
|
+
const tooltipRef = React.useRef(null);
|
|
6272
|
+
const [autoSize, setAutoSize] = React.useState(380);
|
|
6273
|
+
const size = fixedSize ?? autoSize;
|
|
6274
|
+
React.useEffect(() => {
|
|
6275
|
+
if (fixedSize)
|
|
6276
|
+
return;
|
|
6277
|
+
const container = containerRef.current;
|
|
6278
|
+
if (!container)
|
|
6279
|
+
return;
|
|
6280
|
+
const observer = new ResizeObserver((entries) => {
|
|
6281
|
+
for (const entry of entries) {
|
|
6282
|
+
const { width } = entry.contentRect;
|
|
6283
|
+
if (width > 0)
|
|
6284
|
+
setAutoSize(Math.max(minSize, Math.min(maxSize, width)));
|
|
6285
|
+
}
|
|
6286
|
+
});
|
|
6287
|
+
observer.observe(container);
|
|
6288
|
+
return () => observer.disconnect();
|
|
6289
|
+
}, [fixedSize, minSize, maxSize]);
|
|
6290
|
+
const showTooltip = React.useCallback((event, content) => {
|
|
6291
|
+
const tooltip = tooltipRef.current;
|
|
6292
|
+
const container = containerRef.current;
|
|
6293
|
+
if (!tooltip || !container)
|
|
6294
|
+
return;
|
|
6295
|
+
const rect = container.getBoundingClientRect();
|
|
6296
|
+
tooltip.style.left = `${event.clientX - rect.left + 12}px`;
|
|
6297
|
+
tooltip.style.top = `${event.clientY - rect.top - 10}px`;
|
|
6298
|
+
tooltip.innerHTML = content;
|
|
6299
|
+
tooltip.classList.add(styles$5.visible);
|
|
6300
|
+
}, []);
|
|
6301
|
+
const hideTooltip = React.useCallback(() => {
|
|
6302
|
+
tooltipRef.current?.classList.remove(styles$5.visible);
|
|
6303
|
+
}, []);
|
|
6304
|
+
React.useEffect(() => {
|
|
6305
|
+
if (!svgRef.current || rings.length === 0)
|
|
6306
|
+
return;
|
|
6307
|
+
const svg = d3__namespace.select(svgRef.current);
|
|
6308
|
+
svg.selectAll('*').remove();
|
|
6309
|
+
const width = size;
|
|
6310
|
+
const height = size;
|
|
6311
|
+
const cx = width / 2;
|
|
6312
|
+
const cy = height / 2;
|
|
6313
|
+
const outerR = size / 2 - 28;
|
|
6314
|
+
const g = svg
|
|
6315
|
+
.attr('width', width)
|
|
6316
|
+
.attr('height', height)
|
|
6317
|
+
.append('g')
|
|
6318
|
+
.attr('transform', `translate(${cx},${cy})`);
|
|
6319
|
+
const computedStyle = getComputedStyle(document.documentElement);
|
|
6320
|
+
const textColor = computedStyle.getPropertyValue('--color-text-secondary').trim() || '#888';
|
|
6321
|
+
const mutedText = computedStyle.getPropertyValue('--color-text-muted').trim() || '#aaa';
|
|
6322
|
+
const borderColor = computedStyle.getPropertyValue('--color-border').trim() || 'rgba(128,128,128,0.2)';
|
|
6323
|
+
const hourToAngle = (h) => (h / 24) * Math.PI * 2;
|
|
6324
|
+
g.append('circle')
|
|
6325
|
+
.attr('r', outerR + 8)
|
|
6326
|
+
.attr('fill', 'none')
|
|
6327
|
+
.attr('stroke', borderColor)
|
|
6328
|
+
.attr('stroke-width', 1);
|
|
6329
|
+
const centerR = 46;
|
|
6330
|
+
const ringGap = 2;
|
|
6331
|
+
const ringCount = rings.length;
|
|
6332
|
+
const ringWidth = (outerR - centerR - ringGap * (ringCount - 1)) / ringCount;
|
|
6333
|
+
rings.forEach((ring, ringIdx) => {
|
|
6334
|
+
const ringOuter = outerR - ringIdx * (ringWidth + ringGap);
|
|
6335
|
+
const ringInner = ringOuter - ringWidth;
|
|
6336
|
+
const opacity = ring.opacity !== undefined
|
|
6337
|
+
? ring.opacity
|
|
6338
|
+
: ringIdx === 0
|
|
6339
|
+
? 1
|
|
6340
|
+
: Math.max(0.1, 0.85 - (ringIdx / ringCount) * 0.85);
|
|
6341
|
+
const arcGen = d3__namespace
|
|
6342
|
+
.arc()
|
|
6343
|
+
.innerRadius(ringInner)
|
|
6344
|
+
.outerRadius(ringOuter)
|
|
6345
|
+
.startAngle((d) => hourToAngle(d.startHour))
|
|
6346
|
+
.endAngle((d) => hourToAngle(d.endHour))
|
|
6347
|
+
.cornerRadius(2);
|
|
6348
|
+
const arcSel = g
|
|
6349
|
+
.selectAll(`.ring-${ringIdx}`)
|
|
6350
|
+
.data(ring.arcs)
|
|
6351
|
+
.join('path')
|
|
6352
|
+
.attr('class', `ring-${ringIdx}`)
|
|
6353
|
+
.attr('fill', (d) => d.color)
|
|
6354
|
+
.attr('opacity', 0)
|
|
6355
|
+
.attr('stroke', 'var(--color-background)')
|
|
6356
|
+
.attr('stroke-width', 0.6)
|
|
6357
|
+
.style('cursor', 'pointer')
|
|
6358
|
+
.on('mousemove', function (event, d) {
|
|
6359
|
+
const dur = formatDuration(d.endHour - d.startHour);
|
|
6360
|
+
const labelLine = `${d.emoji ?? ''} ${d.label ?? ''}${d.description ? ` — ${d.description}` : ''}`.trim();
|
|
6361
|
+
showTooltip(event, `<div class="${styles$5.tooltipLabel}">${labelLine || '·'}</div>` +
|
|
6362
|
+
`<div class="${styles$5.tooltipRow}">${ring.dayLabel} · ${formatHHMM(d.startHour)} → ${formatHHMM(d.endHour)}</div>` +
|
|
6363
|
+
`<div class="${styles$5.tooltipRow}">${dur}${d.isActive ? ' · running' : ''}</div>`);
|
|
6364
|
+
})
|
|
6365
|
+
.on('mouseleave', hideTooltip);
|
|
6366
|
+
// Sweep-in: arcs grow from startAngle to their actual endAngle, staggered by start time.
|
|
6367
|
+
arcSel
|
|
6368
|
+
.attr('d', (d) => arcGen({ ...d, endHour: d.startHour }))
|
|
6369
|
+
.transition()
|
|
6370
|
+
.delay((d) => (d.startHour / 24) * 600 + ringIdx * 80)
|
|
6371
|
+
.duration(550)
|
|
6372
|
+
.ease(d3__namespace.easeCubicOut)
|
|
6373
|
+
.attr('opacity', opacity)
|
|
6374
|
+
.attrTween('d', function (d) {
|
|
6375
|
+
const i = d3__namespace.interpolate(d.startHour, d.endHour);
|
|
6376
|
+
return (t) => arcGen({ ...d, endHour: i(t) }) || '';
|
|
6377
|
+
});
|
|
6378
|
+
});
|
|
6379
|
+
for (let h = 0; h < 24; h++) {
|
|
6380
|
+
const angle = hourToAngle(h) - Math.PI / 2;
|
|
6381
|
+
const isMajor = h % 3 === 0;
|
|
6382
|
+
const inner = outerR + 2;
|
|
6383
|
+
const outer = outerR + (isMajor ? 9 : 5);
|
|
6384
|
+
g.append('line')
|
|
6385
|
+
.attr('x1', Math.cos(angle) * inner)
|
|
6386
|
+
.attr('y1', Math.sin(angle) * inner)
|
|
6387
|
+
.attr('x2', Math.cos(angle) * outer)
|
|
6388
|
+
.attr('y2', Math.sin(angle) * outer)
|
|
6389
|
+
.attr('stroke', isMajor ? textColor : borderColor)
|
|
6390
|
+
.attr('stroke-width', isMajor ? 2 : 1);
|
|
6391
|
+
if (isMajor) {
|
|
6392
|
+
const labelR = outerR + 22;
|
|
6393
|
+
g.append('text')
|
|
6394
|
+
.attr('x', Math.cos(angle) * labelR)
|
|
6395
|
+
.attr('y', Math.sin(angle) * labelR)
|
|
6396
|
+
.attr('text-anchor', 'middle')
|
|
6397
|
+
.attr('dominant-baseline', 'middle')
|
|
6398
|
+
.attr('fill', mutedText)
|
|
6399
|
+
.attr('font-size', '11px')
|
|
6400
|
+
.attr('font-weight', 600)
|
|
6401
|
+
.text(String(h).padStart(2, '0'));
|
|
6402
|
+
}
|
|
6403
|
+
}
|
|
6404
|
+
g.append('circle')
|
|
6405
|
+
.attr('r', centerR - 2)
|
|
6406
|
+
.attr('fill', 'var(--color-background-secondary)')
|
|
6407
|
+
.attr('stroke', borderColor)
|
|
6408
|
+
.attr('stroke-width', 1);
|
|
6409
|
+
if (centerTopLabel) {
|
|
6410
|
+
g.append('text')
|
|
6411
|
+
.attr('text-anchor', 'middle')
|
|
6412
|
+
.attr('y', centerMainLabel ? -6 : 4)
|
|
6413
|
+
.attr('fill', mutedText)
|
|
6414
|
+
.attr('font-size', '10px')
|
|
6415
|
+
.attr('letter-spacing', '1.5px')
|
|
6416
|
+
.text(centerTopLabel);
|
|
6417
|
+
}
|
|
6418
|
+
if (centerMainLabel) {
|
|
6419
|
+
g.append('text')
|
|
6420
|
+
.attr('text-anchor', 'middle')
|
|
6421
|
+
.attr('y', centerTopLabel ? 14 : 4)
|
|
6422
|
+
.attr('fill', 'var(--color-text)')
|
|
6423
|
+
.attr('font-size', '18px')
|
|
6424
|
+
.attr('font-weight', 700)
|
|
6425
|
+
.text(centerMainLabel);
|
|
6426
|
+
}
|
|
6427
|
+
if (showNowHand) {
|
|
6428
|
+
const now = new Date();
|
|
6429
|
+
const nowHour = now.getHours() + now.getMinutes() / 60;
|
|
6430
|
+
const nowAngle = hourToAngle(nowHour) - Math.PI / 2;
|
|
6431
|
+
const handTipR = outerR + 6;
|
|
6432
|
+
g.append('line')
|
|
6433
|
+
.attr('x1', 0)
|
|
6434
|
+
.attr('y1', 0)
|
|
6435
|
+
.attr('x2', Math.cos(nowAngle) * handTipR)
|
|
6436
|
+
.attr('y2', Math.sin(nowAngle) * handTipR)
|
|
6437
|
+
.attr('stroke', 'var(--color-error)')
|
|
6438
|
+
.attr('stroke-width', 2.5)
|
|
6439
|
+
.attr('stroke-linecap', 'round')
|
|
6440
|
+
.style('opacity', 0)
|
|
6441
|
+
.transition()
|
|
6442
|
+
.delay(800)
|
|
6443
|
+
.duration(300)
|
|
6444
|
+
.style('opacity', 1);
|
|
6445
|
+
g.append('circle')
|
|
6446
|
+
.attr('cx', Math.cos(nowAngle) * handTipR)
|
|
6447
|
+
.attr('cy', Math.sin(nowAngle) * handTipR)
|
|
6448
|
+
.attr('r', 4)
|
|
6449
|
+
.attr('fill', 'var(--color-error)')
|
|
6450
|
+
.style('opacity', 0)
|
|
6451
|
+
.transition()
|
|
6452
|
+
.delay(800)
|
|
6453
|
+
.duration(300)
|
|
6454
|
+
.style('opacity', 1);
|
|
6455
|
+
g.append('circle')
|
|
6456
|
+
.attr('r', 5)
|
|
6457
|
+
.attr('fill', 'var(--color-error)')
|
|
6458
|
+
.attr('stroke', 'var(--color-background)')
|
|
6459
|
+
.attr('stroke-width', 1.5)
|
|
6460
|
+
.style('opacity', 0)
|
|
6461
|
+
.transition()
|
|
6462
|
+
.delay(800)
|
|
6463
|
+
.duration(300)
|
|
6464
|
+
.style('opacity', 1);
|
|
6465
|
+
}
|
|
6466
|
+
}, [size, rings, centerTopLabel, centerMainLabel, showNowHand, showTooltip, hideTooltip]);
|
|
6467
|
+
return (jsxRuntime.jsxs("div", { className: styles$5.container, ref: containerRef, children: [jsxRuntime.jsx("div", { className: styles$5.clockWrap, children: jsxRuntime.jsx("svg", { ref: svgRef }) }), jsxRuntime.jsx("div", { ref: tooltipRef, className: styles$5.tooltip })] }));
|
|
6468
|
+
};
|
|
6469
|
+
|
|
6470
|
+
var styles$4 = {"container":"ChordDiagram-module_container__lf6an","svgWrap":"ChordDiagram-module_svgWrap__T4Gss","tooltip":"ChordDiagram-module_tooltip__86Z2U","visible":"ChordDiagram-module_visible__a-8LE","tipLabel":"ChordDiagram-module_tipLabel__m92kN","tipRow":"ChordDiagram-module_tipRow__nFuWs"};
|
|
6471
|
+
|
|
6472
|
+
const DEFAULT_PALETTE = [
|
|
6473
|
+
'#6366f1', '#8b5cf6', '#06b6d4', '#10b981',
|
|
6474
|
+
'#f59e0b', '#ef4444', '#ec4899', '#84cc16',
|
|
6475
|
+
'#f97316', '#3b82f6', '#14b8a6', '#a855f7',
|
|
6476
|
+
];
|
|
6477
|
+
const ChordDiagram = ({ labels, matrix, colors, emojis, edgeUnit = 'connections', size: fixedSize, minSize = 320, maxSize = 820, }) => {
|
|
6478
|
+
const containerRef = React.useRef(null);
|
|
6479
|
+
const svgRef = React.useRef(null);
|
|
6480
|
+
const tooltipRef = React.useRef(null);
|
|
6481
|
+
const [autoSize, setAutoSize] = React.useState(480);
|
|
6482
|
+
const size = fixedSize ?? autoSize;
|
|
6483
|
+
React.useEffect(() => {
|
|
6484
|
+
if (fixedSize)
|
|
6485
|
+
return;
|
|
6486
|
+
const c = containerRef.current;
|
|
6487
|
+
if (!c)
|
|
6488
|
+
return;
|
|
6489
|
+
const obs = new ResizeObserver((entries) => {
|
|
6490
|
+
for (const e of entries) {
|
|
6491
|
+
const w = e.contentRect.width;
|
|
6492
|
+
if (w > 0)
|
|
6493
|
+
setAutoSize(Math.max(minSize, Math.min(maxSize, w)));
|
|
6494
|
+
}
|
|
6495
|
+
});
|
|
6496
|
+
obs.observe(c);
|
|
6497
|
+
return () => obs.disconnect();
|
|
6498
|
+
}, [fixedSize, minSize, maxSize]);
|
|
6499
|
+
const showTip = React.useCallback((event, html) => {
|
|
6500
|
+
const tip = tooltipRef.current;
|
|
6501
|
+
const ctn = containerRef.current;
|
|
6502
|
+
if (!tip || !ctn)
|
|
6503
|
+
return;
|
|
6504
|
+
const rect = ctn.getBoundingClientRect();
|
|
6505
|
+
tip.style.left = `${event.clientX - rect.left + 12}px`;
|
|
6506
|
+
tip.style.top = `${event.clientY - rect.top - 10}px`;
|
|
6507
|
+
tip.innerHTML = html;
|
|
6508
|
+
tip.classList.add(styles$4.visible);
|
|
6509
|
+
}, []);
|
|
6510
|
+
const hideTip = React.useCallback(() => {
|
|
6511
|
+
tooltipRef.current?.classList.remove(styles$4.visible);
|
|
6512
|
+
}, []);
|
|
6513
|
+
React.useEffect(() => {
|
|
6514
|
+
if (!svgRef.current || labels.length === 0 || matrix.length === 0)
|
|
6515
|
+
return;
|
|
6516
|
+
const svg = d3__namespace.select(svgRef.current);
|
|
6517
|
+
svg.selectAll('*').remove();
|
|
6518
|
+
const inner = size / 2 - 50;
|
|
6519
|
+
const outer = inner + 16;
|
|
6520
|
+
const g = svg
|
|
6521
|
+
.attr('width', size)
|
|
6522
|
+
.attr('height', size)
|
|
6523
|
+
.append('g')
|
|
6524
|
+
.attr('transform', `translate(${size / 2}, ${size / 2})`);
|
|
6525
|
+
const chord = d3__namespace.chord().padAngle(0.04).sortSubgroups(d3__namespace.descending);
|
|
6526
|
+
const chords = chord(matrix);
|
|
6527
|
+
const arc = d3__namespace.arc().innerRadius(inner).outerRadius(outer);
|
|
6528
|
+
const ribbon = d3__namespace.ribbon().radius(inner);
|
|
6529
|
+
const colorOf = (i) => colors?.[i] || DEFAULT_PALETTE[i % DEFAULT_PALETTE.length];
|
|
6530
|
+
const emojiOf = (i) => emojis?.[i] ?? '•';
|
|
6531
|
+
const groupSel = g.append('g')
|
|
6532
|
+
.selectAll('path')
|
|
6533
|
+
.data(chords.groups)
|
|
6534
|
+
.join('path')
|
|
6535
|
+
.attr('d', arc)
|
|
6536
|
+
.attr('fill', (d) => colorOf(d.index))
|
|
6537
|
+
.attr('stroke', 'var(--color-background)')
|
|
6538
|
+
.attr('stroke-width', 1)
|
|
6539
|
+
.style('cursor', 'pointer')
|
|
6540
|
+
.style('opacity', 0)
|
|
6541
|
+
.on('mousemove', function (event, d) {
|
|
6542
|
+
const total = d.value;
|
|
6543
|
+
showTip(event, `<div class="${styles$4.tipLabel}">${emojiOf(d.index)} ${labels[d.index]}</div>` +
|
|
6544
|
+
`<div class="${styles$4.tipRow}">${total} ${edgeUnit}</div>`);
|
|
6545
|
+
})
|
|
6546
|
+
.on('mouseleave', hideTip);
|
|
6547
|
+
groupSel.transition()
|
|
6548
|
+
.delay((_, i) => i * 40)
|
|
6549
|
+
.duration(420)
|
|
6550
|
+
.ease(d3__namespace.easeCubicOut)
|
|
6551
|
+
.style('opacity', 1);
|
|
6552
|
+
const ribbonSel = g.append('g')
|
|
6553
|
+
.selectAll('path')
|
|
6554
|
+
.data(chords)
|
|
6555
|
+
.join('path')
|
|
6556
|
+
.attr('d', ribbon)
|
|
6557
|
+
.attr('fill', (d) => colorOf(d.source.index))
|
|
6558
|
+
.attr('opacity', 0)
|
|
6559
|
+
.attr('stroke', 'var(--color-background)')
|
|
6560
|
+
.attr('stroke-width', 0.4)
|
|
6561
|
+
.style('cursor', 'pointer')
|
|
6562
|
+
.on('mousemove', function (event, d) {
|
|
6563
|
+
const aToB = matrix[d.source.index]?.[d.target.index] ?? 0;
|
|
6564
|
+
const bToA = matrix[d.target.index]?.[d.source.index] ?? 0;
|
|
6565
|
+
showTip(event, `<div class="${styles$4.tipLabel}">${emojiOf(d.source.index)} ${labels[d.source.index]} ↔ ${emojiOf(d.target.index)} ${labels[d.target.index]}</div>` +
|
|
6566
|
+
`<div class="${styles$4.tipRow}">${labels[d.source.index]} → ${labels[d.target.index]}: ${aToB}</div>` +
|
|
6567
|
+
`<div class="${styles$4.tipRow}">${labels[d.target.index]} → ${labels[d.source.index]}: ${bToA}</div>`);
|
|
6568
|
+
})
|
|
6569
|
+
.on('mouseleave', hideTip);
|
|
6570
|
+
ribbonSel.transition()
|
|
6571
|
+
.delay(labels.length * 40 + 120)
|
|
6572
|
+
.duration(500)
|
|
6573
|
+
.ease(d3__namespace.easeCubicOut)
|
|
6574
|
+
.attr('opacity', 0.55);
|
|
6575
|
+
const labelSel = g.append('g')
|
|
6576
|
+
.selectAll('text')
|
|
6577
|
+
.data(chords.groups)
|
|
6578
|
+
.join('text')
|
|
6579
|
+
.attr('transform', (d) => {
|
|
6580
|
+
const angle = (d.startAngle + d.endAngle) / 2 - Math.PI / 2;
|
|
6581
|
+
const r = outer + 18;
|
|
6582
|
+
return `translate(${Math.cos(angle) * r}, ${Math.sin(angle) * r})`;
|
|
6583
|
+
})
|
|
6584
|
+
.attr('text-anchor', 'middle')
|
|
6585
|
+
.attr('dominant-baseline', 'middle')
|
|
6586
|
+
.attr('font-size', '16px')
|
|
6587
|
+
.style('pointer-events', 'none')
|
|
6588
|
+
.style('opacity', 0)
|
|
6589
|
+
.text((d) => emojiOf(d.index));
|
|
6590
|
+
labelSel.transition()
|
|
6591
|
+
.delay((_, i) => i * 40 + 200)
|
|
6592
|
+
.duration(300)
|
|
6593
|
+
.style('opacity', 1);
|
|
6594
|
+
}, [matrix, labels, size, colors, emojis, edgeUnit, showTip, hideTip]);
|
|
6595
|
+
return (jsxRuntime.jsxs("div", { className: styles$4.container, ref: containerRef, children: [jsxRuntime.jsx("div", { className: styles$4.svgWrap, children: jsxRuntime.jsx("svg", { ref: svgRef }) }), jsxRuntime.jsx("div", { ref: tooltipRef, className: styles$4.tooltip })] }));
|
|
6596
|
+
};
|
|
6597
|
+
|
|
6598
|
+
var styles$3 = {"container":"PolarHeatmap-module_container__vkfiq","svgWrap":"PolarHeatmap-module_svgWrap__xrKnU","tooltip":"PolarHeatmap-module_tooltip__uAYch","visible":"PolarHeatmap-module_visible__myNKg","tipLabel":"PolarHeatmap-module_tipLabel__yyjWw","tipRow":"PolarHeatmap-module_tipRow__CQbQi"};
|
|
6599
|
+
|
|
6600
|
+
const DEFAULT_ACCENT = '#c8a14a';
|
|
6601
|
+
const PolarHeatmap = ({ cells, days, accentColor = DEFAULT_ACCENT, centerTopLabel, centerMainLabel, size: fixedSize, minSize = 320, maxSize = 560, }) => {
|
|
6602
|
+
const containerRef = React.useRef(null);
|
|
6603
|
+
const svgRef = React.useRef(null);
|
|
6604
|
+
const tooltipRef = React.useRef(null);
|
|
6605
|
+
const [autoSize, setAutoSize] = React.useState(560);
|
|
6606
|
+
const size = fixedSize ?? autoSize;
|
|
6607
|
+
React.useEffect(() => {
|
|
6608
|
+
if (fixedSize)
|
|
6609
|
+
return;
|
|
6610
|
+
const c = containerRef.current;
|
|
6611
|
+
if (!c)
|
|
6612
|
+
return;
|
|
6613
|
+
const obs = new ResizeObserver((entries) => {
|
|
6614
|
+
for (const e of entries) {
|
|
6615
|
+
const w = e.contentRect.width;
|
|
6616
|
+
if (w > 0)
|
|
6617
|
+
setAutoSize(Math.max(minSize, Math.min(maxSize, w)));
|
|
6618
|
+
}
|
|
6619
|
+
});
|
|
6620
|
+
obs.observe(c);
|
|
6621
|
+
return () => obs.disconnect();
|
|
6622
|
+
}, [fixedSize, minSize, maxSize]);
|
|
6623
|
+
const showTip = React.useCallback((event, html) => {
|
|
6624
|
+
const tip = tooltipRef.current;
|
|
6625
|
+
const ctn = containerRef.current;
|
|
6626
|
+
if (!tip || !ctn)
|
|
6627
|
+
return;
|
|
6628
|
+
const rect = ctn.getBoundingClientRect();
|
|
6629
|
+
tip.style.left = `${event.clientX - rect.left + 12}px`;
|
|
6630
|
+
tip.style.top = `${event.clientY - rect.top - 10}px`;
|
|
6631
|
+
tip.innerHTML = html;
|
|
6632
|
+
tip.classList.add(styles$3.visible);
|
|
6633
|
+
}, []);
|
|
6634
|
+
const hideTip = React.useCallback(() => {
|
|
6635
|
+
tooltipRef.current?.classList.remove(styles$3.visible);
|
|
6636
|
+
}, []);
|
|
6637
|
+
React.useEffect(() => {
|
|
6638
|
+
if (!svgRef.current || cells.length === 0 || days <= 0)
|
|
6639
|
+
return;
|
|
6640
|
+
const svg = d3__namespace.select(svgRef.current);
|
|
6641
|
+
svg.selectAll('*').remove();
|
|
6642
|
+
const outerR = size / 2 - 32;
|
|
6643
|
+
const innerR = 64;
|
|
6644
|
+
const ringGap = 4;
|
|
6645
|
+
const ringWidth = (outerR - innerR - ringGap * (days - 1)) / days;
|
|
6646
|
+
const defs = svg.append('defs');
|
|
6647
|
+
const gradId = `polar-heatmap-glow-${Math.random().toString(36).slice(2, 9)}`;
|
|
6648
|
+
const glow = defs
|
|
6649
|
+
.append('radialGradient')
|
|
6650
|
+
.attr('id', gradId)
|
|
6651
|
+
.attr('cx', '50%')
|
|
6652
|
+
.attr('cy', '50%')
|
|
6653
|
+
.attr('r', '50%');
|
|
6654
|
+
glow.append('stop').attr('offset', '0%').attr('stop-color', accentColor).attr('stop-opacity', 0.18);
|
|
6655
|
+
glow.append('stop').attr('offset', '60%').attr('stop-color', accentColor).attr('stop-opacity', 0.05);
|
|
6656
|
+
glow.append('stop').attr('offset', '100%').attr('stop-color', accentColor).attr('stop-opacity', 0);
|
|
6657
|
+
const g = svg
|
|
6658
|
+
.attr('width', size)
|
|
6659
|
+
.attr('height', size)
|
|
6660
|
+
.append('g')
|
|
6661
|
+
.attr('transform', `translate(${size / 2}, ${size / 2})`);
|
|
6662
|
+
const hourAngle = (h) => (h / 24) * Math.PI * 2;
|
|
6663
|
+
g.append('circle')
|
|
6664
|
+
.attr('r', outerR + 44)
|
|
6665
|
+
.attr('fill', `url(#${gradId})`);
|
|
6666
|
+
for (let h = 0; h < 24; h++) {
|
|
6667
|
+
const angle = hourAngle(h) - Math.PI / 2;
|
|
6668
|
+
g.append('line')
|
|
6669
|
+
.attr('x1', Math.cos(angle) * innerR)
|
|
6670
|
+
.attr('y1', Math.sin(angle) * innerR)
|
|
6671
|
+
.attr('x2', Math.cos(angle) * (outerR + 6))
|
|
6672
|
+
.attr('y2', Math.sin(angle) * (outerR + 6))
|
|
6673
|
+
.attr('stroke', accentColor)
|
|
6674
|
+
.attr('stroke-width', h % 3 === 0 ? 0.7 : 0.35)
|
|
6675
|
+
.attr('opacity', h % 3 === 0 ? 0.55 : 0.25);
|
|
6676
|
+
}
|
|
6677
|
+
const arcGen = d3__namespace
|
|
6678
|
+
.arc()
|
|
6679
|
+
.innerRadius((d) => outerR - d.dayOffset * (ringWidth + ringGap) - ringWidth)
|
|
6680
|
+
.outerRadius((d) => outerR - d.dayOffset * (ringWidth + ringGap))
|
|
6681
|
+
.startAngle((d) => hourAngle(d.hour))
|
|
6682
|
+
.endAngle((d) => hourAngle(d.hour + 1))
|
|
6683
|
+
.padAngle(0.014)
|
|
6684
|
+
.cornerRadius(2.5);
|
|
6685
|
+
const visibleCells = cells.filter((c) => c.dayOffset >= 0 && c.dayOffset < days && c.hour >= 0 && c.hour < 24);
|
|
6686
|
+
const cellSel = g.selectAll('path.cell')
|
|
6687
|
+
.data(visibleCells)
|
|
6688
|
+
.join('path')
|
|
6689
|
+
.attr('class', 'cell')
|
|
6690
|
+
.attr('d', arcGen)
|
|
6691
|
+
.attr('fill', (d) => d.color)
|
|
6692
|
+
.attr('opacity', 0)
|
|
6693
|
+
.style('cursor', (d) => (d.label ? 'pointer' : 'default'))
|
|
6694
|
+
.on('mousemove', function (event, d) {
|
|
6695
|
+
if (!d.label)
|
|
6696
|
+
return;
|
|
6697
|
+
const hr = `${String(d.hour).padStart(2, '0')}:00`;
|
|
6698
|
+
const dayLabel = d.dayLabel ?? (d.dayOffset === 0 ? 'Today' : `${d.dayOffset} days ago`);
|
|
6699
|
+
showTip(event, `<div class="${styles$3.tipLabel}">${d.emoji ?? ''} ${d.label}</div>` +
|
|
6700
|
+
`<div class="${styles$3.tipRow}">${dayLabel} · ${hr}</div>`);
|
|
6701
|
+
})
|
|
6702
|
+
.on('mouseleave', hideTip);
|
|
6703
|
+
cellSel.transition()
|
|
6704
|
+
.delay((d) => (d.hour / 24) * 600 + d.dayOffset * 30)
|
|
6705
|
+
.duration(380)
|
|
6706
|
+
.ease(d3__namespace.easeCubicOut)
|
|
6707
|
+
.attr('opacity', (d) => (d.label ? 0.88 : 0));
|
|
6708
|
+
g.append('circle')
|
|
6709
|
+
.attr('r', outerR + 16)
|
|
6710
|
+
.attr('fill', 'none')
|
|
6711
|
+
.attr('stroke', accentColor)
|
|
6712
|
+
.attr('stroke-width', 0.4)
|
|
6713
|
+
.attr('opacity', 0.4);
|
|
6714
|
+
for (let i = 0; i < 48; i++) {
|
|
6715
|
+
const angle = (i / 48) * Math.PI * 2 - Math.PI / 2;
|
|
6716
|
+
g.append('circle')
|
|
6717
|
+
.attr('cx', Math.cos(angle) * (outerR + 12))
|
|
6718
|
+
.attr('cy', Math.sin(angle) * (outerR + 12))
|
|
6719
|
+
.attr('r', i % 2 === 0 ? 1.4 : 0.6)
|
|
6720
|
+
.attr('fill', accentColor)
|
|
6721
|
+
.attr('opacity', i % 2 === 0 ? 0.75 : 0.4);
|
|
6722
|
+
}
|
|
6723
|
+
for (let h = 0; h < 24; h += 3) {
|
|
6724
|
+
const angle = hourAngle(h) - Math.PI / 2;
|
|
6725
|
+
const labelR = outerR + 28;
|
|
6726
|
+
g.append('text')
|
|
6727
|
+
.attr('x', Math.cos(angle) * labelR)
|
|
6728
|
+
.attr('y', Math.sin(angle) * labelR)
|
|
6729
|
+
.attr('text-anchor', 'middle')
|
|
6730
|
+
.attr('dominant-baseline', 'middle')
|
|
6731
|
+
.attr('fill', accentColor)
|
|
6732
|
+
.attr('font-size', '11px')
|
|
6733
|
+
.attr('font-weight', 600)
|
|
6734
|
+
.attr('letter-spacing', '1px')
|
|
6735
|
+
.attr('opacity', 0.85)
|
|
6736
|
+
.text(String(h).padStart(2, '0'));
|
|
6737
|
+
}
|
|
6738
|
+
g.append('circle')
|
|
6739
|
+
.attr('r', innerR - 4)
|
|
6740
|
+
.attr('fill', 'var(--color-background)');
|
|
6741
|
+
g.append('circle').attr('r', 3).attr('fill', accentColor).attr('opacity', 0.9);
|
|
6742
|
+
if (centerTopLabel) {
|
|
6743
|
+
g.append('text')
|
|
6744
|
+
.attr('text-anchor', 'middle')
|
|
6745
|
+
.attr('y', innerR - 33)
|
|
6746
|
+
.attr('fill', accentColor)
|
|
6747
|
+
.attr('font-size', '9px')
|
|
6748
|
+
.attr('letter-spacing', '3px')
|
|
6749
|
+
.attr('opacity', 0.85)
|
|
6750
|
+
.text(centerTopLabel);
|
|
6751
|
+
}
|
|
6752
|
+
if (centerMainLabel) {
|
|
6753
|
+
g.append('text')
|
|
6754
|
+
.attr('text-anchor', 'middle')
|
|
6755
|
+
.attr('y', innerR + 2)
|
|
6756
|
+
.attr('fill', accentColor)
|
|
6757
|
+
.attr('font-size', '14px')
|
|
6758
|
+
.attr('font-weight', 700)
|
|
6759
|
+
.attr('letter-spacing', '2px')
|
|
6760
|
+
.attr('opacity', 0.95)
|
|
6761
|
+
.text(centerMainLabel);
|
|
6762
|
+
}
|
|
6763
|
+
}, [cells, days, size, accentColor, centerTopLabel, centerMainLabel, showTip, hideTip]);
|
|
6764
|
+
return (jsxRuntime.jsxs("div", { className: styles$3.container, ref: containerRef, children: [jsxRuntime.jsx("div", { className: styles$3.svgWrap, children: jsxRuntime.jsx("svg", { ref: svgRef }) }), jsxRuntime.jsx("div", { ref: tooltipRef, className: styles$3.tooltip })] }));
|
|
6101
6765
|
};
|
|
6102
6766
|
|
|
6103
6767
|
var styles$2 = {"slideshow":"ImageSlideshow-module_slideshow__Ku43h","fullscreen":"ImageSlideshow-module_fullscreen__YhVju","empty":"ImageSlideshow-module_empty__XaCpW","emptyState":"ImageSlideshow-module_emptyState__caEwx","mainContainer":"ImageSlideshow-module_mainContainer__E9aZ3","slide":"ImageSlideshow-module_slide__Wt0U-","image":"ImageSlideshow-module_image__aLHJX","imageLoader":"ImageSlideshow-module_imageLoader__5oAf5","spinner":"ImageSlideshow-module_spinner__fmIFu","control":"ImageSlideshow-module_control__WF7Lz","controlPrev":"ImageSlideshow-module_controlPrev__PCSgw","controlNext":"ImageSlideshow-module_controlNext__RMVX2","controlPlay":"ImageSlideshow-module_controlPlay__183mX","topControls":"ImageSlideshow-module_topControls__AIEJT","controlAction":"ImageSlideshow-module_controlAction__NCD7t","caption":"ImageSlideshow-module_caption__9a3JW","captionTitle":"ImageSlideshow-module_captionTitle__w5Izi","captionText":"ImageSlideshow-module_captionText__FvPyQ","imageMetadata":"ImageSlideshow-module_imageMetadata__5RF2N","metadataItem":"ImageSlideshow-module_metadataItem__6MJDP","indicators":"ImageSlideshow-module_indicators__2cH2G","hasThumbnails":"ImageSlideshow-module_hasThumbnails__0B1N-","indicator":"ImageSlideshow-module_indicator__4zGqm","indicatorActive":"ImageSlideshow-module_indicatorActive__oLeK2","thumbnails":"ImageSlideshow-module_thumbnails__zwiUz","thumbnail":"ImageSlideshow-module_thumbnail__3YyIx","thumbnailActive":"ImageSlideshow-module_thumbnailActive__aADJh","thumbnailImage":"ImageSlideshow-module_thumbnailImage__Ft7Iq"};
|
|
@@ -6700,6 +7364,7 @@ exports.Button = Button;
|
|
|
6700
7364
|
exports.Calendar = Calendar;
|
|
6701
7365
|
exports.Card = Card;
|
|
6702
7366
|
exports.Checkbox = Checkbox;
|
|
7367
|
+
exports.ChordDiagram = ChordDiagram;
|
|
6703
7368
|
exports.ConfirmationModal = ConfirmationModal;
|
|
6704
7369
|
exports.DateInput = DateInput;
|
|
6705
7370
|
exports.DecryptedText = DecryptedText;
|
|
@@ -6714,7 +7379,10 @@ exports.MoodChart = MoodChart;
|
|
|
6714
7379
|
exports.Navbar = Navbar;
|
|
6715
7380
|
exports.NumberStepper = NumberStepper;
|
|
6716
7381
|
exports.PieChart = PieChart;
|
|
7382
|
+
exports.PolarHeatmap = PolarHeatmap;
|
|
7383
|
+
exports.ProgressRings = ProgressRings;
|
|
6717
7384
|
exports.QuantifiableHabitsChart = QuantifiableHabitsChart;
|
|
7385
|
+
exports.RadialDayChart = RadialDayChart;
|
|
6718
7386
|
exports.RecurrencePicker = RecurrencePicker;
|
|
6719
7387
|
exports.SearchBar = SearchBar;
|
|
6720
7388
|
exports.SearchableDropdown = SearchableDropdown;
|