@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.esm.js
CHANGED
|
@@ -11,7 +11,7 @@ import { createTheme, ThemeProvider as ThemeProvider$1 } from '@mui/material/sty
|
|
|
11
11
|
import { RRule } from 'rrule';
|
|
12
12
|
import * as d3 from 'd3';
|
|
13
13
|
|
|
14
|
-
var styles$
|
|
14
|
+
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"};
|
|
15
15
|
|
|
16
16
|
const SOUND_PACKS = {
|
|
17
17
|
digital: {
|
|
@@ -577,11 +577,11 @@ const Button = ({ variant = 'primary', size = 'medium', fullWidth = false, loadi
|
|
|
577
577
|
const { handlers } = useComponentSound(soundConfig);
|
|
578
578
|
const isIcon = variant === 'icon';
|
|
579
579
|
const buttonClasses = [
|
|
580
|
-
styles$
|
|
581
|
-
styles$
|
|
582
|
-
!isIcon && styles$
|
|
583
|
-
fullWidth && styles$
|
|
584
|
-
loading && styles$
|
|
580
|
+
styles$G.button,
|
|
581
|
+
styles$G[variant],
|
|
582
|
+
!isIcon && styles$G[size],
|
|
583
|
+
fullWidth && styles$G.fullWidth,
|
|
584
|
+
loading && styles$G.loading,
|
|
585
585
|
className
|
|
586
586
|
].filter(Boolean).join(' ');
|
|
587
587
|
const handleClick = (e) => {
|
|
@@ -592,10 +592,10 @@ const Button = ({ variant = 'primary', size = 'medium', fullWidth = false, loadi
|
|
|
592
592
|
handlers.onMouseEnter?.();
|
|
593
593
|
onMouseEnter?.(e);
|
|
594
594
|
};
|
|
595
|
-
return (jsxs(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 && jsx("span", { className: styles$
|
|
595
|
+
return (jsxs(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 && jsx("span", { className: styles$G.spinner }), iconLeft && jsx("span", { className: styles$G.iconLeft, children: iconLeft }), children, iconRight && jsx("span", { className: styles$G.iconRight, children: iconRight })] }));
|
|
596
596
|
};
|
|
597
597
|
|
|
598
|
-
var styles$
|
|
598
|
+
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"};
|
|
599
599
|
|
|
600
600
|
/**
|
|
601
601
|
* Card Component
|
|
@@ -660,28 +660,28 @@ const Card = ({ variant = 'elevated', hoverable = false, clickable = false, padd
|
|
|
660
660
|
onExpandChange?.(newExpanded);
|
|
661
661
|
};
|
|
662
662
|
const cardClasses = [
|
|
663
|
-
styles$
|
|
664
|
-
styles$
|
|
665
|
-
hoverable && styles$
|
|
666
|
-
clickable && styles$
|
|
667
|
-
!padding && styles$
|
|
668
|
-
expandable && styles$
|
|
663
|
+
styles$F.card,
|
|
664
|
+
styles$F[variant],
|
|
665
|
+
hoverable && styles$F.hoverable,
|
|
666
|
+
clickable && styles$F.clickable,
|
|
667
|
+
!padding && styles$F.noPadding,
|
|
668
|
+
expandable && styles$F.expandable,
|
|
669
669
|
className
|
|
670
670
|
].filter(Boolean).join(' ');
|
|
671
671
|
const renderHeader = () => {
|
|
672
672
|
if (header) {
|
|
673
|
-
return (jsxs("div", { className: styles$
|
|
673
|
+
return (jsxs("div", { className: styles$F.header, children: [jsx("div", { className: styles$F.headerContent, children: header }), expandable && (jsx("button", { className: styles$F.expandButton, onClick: handleToggleExpand, "aria-label": isExpanded ? 'Collapse card' : 'Expand card', children: 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: jsx("path", { d: "M6 9l6 6 6-6" }) }) }))] }));
|
|
674
674
|
}
|
|
675
675
|
if (title || subtitle) {
|
|
676
|
-
return (jsxs("div", { className: styles$
|
|
676
|
+
return (jsxs("div", { className: styles$F.header, children: [jsxs("div", { className: styles$F.headerContent, children: [title && jsx("h3", { className: styles$F.title, children: title }), subtitle && jsx("p", { className: styles$F.subtitle, children: subtitle })] }), expandable && (jsx("button", { className: styles$F.expandButton, onClick: handleToggleExpand, "aria-label": isExpanded ? 'Collapse card' : 'Expand card', children: 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: jsx("path", { d: "M6 9l6 6 6-6" }) }) }))] }));
|
|
677
677
|
}
|
|
678
678
|
return null;
|
|
679
679
|
};
|
|
680
|
-
const cardContent = (jsxs(Fragment, { children: [image && (jsx("div", { className: styles$
|
|
680
|
+
const cardContent = (jsxs(Fragment, { children: [image && (jsx("div", { className: styles$F.imageContainer, children: jsx("img", { src: image, alt: imageAlt, className: styles$F.image }) })), renderHeader(), jsx(AnimatePresence, { initial: false, children: (!expandable || isExpanded) && (jsxs(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 && (jsx("div", { className: padding ? styles$F.body : undefined, children: children })), footer && jsx("div", { className: styles$F.footer, children: footer })] }, "content")) })] }));
|
|
681
681
|
return (jsx(motion.div, { className: cardClasses, onClick: clickable ? onClick : undefined, whileHover: hoverable ? { y: -4 } : undefined, transition: { type: "spring", stiffness: 400, damping: 17 }, ...motionProps, ...rest, children: cardContent }));
|
|
682
682
|
};
|
|
683
683
|
|
|
684
|
-
var styles$
|
|
684
|
+
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"};
|
|
685
685
|
|
|
686
686
|
/**
|
|
687
687
|
* EmptyState Component
|
|
@@ -718,11 +718,11 @@ var styles$A = {"wrapper":"EmptyState-module_wrapper__h3Y2E","compact":"EmptySta
|
|
|
718
718
|
* @returns {JSX.Element} The rendered EmptyState component
|
|
719
719
|
*/
|
|
720
720
|
const EmptyState = ({ icon, title, message, action, size = 'default', }) => {
|
|
721
|
-
const wrapperClass = [styles$
|
|
722
|
-
return (jsxs("div", { className: wrapperClass, children: [icon && jsx("div", { className: styles$
|
|
721
|
+
const wrapperClass = [styles$E.wrapper, styles$E[size]].filter(Boolean).join(' ');
|
|
722
|
+
return (jsxs("div", { className: wrapperClass, children: [icon && jsx("div", { className: styles$E.icon, children: icon }), title && jsx("h3", { className: styles$E.title, children: title }), jsx("p", { className: styles$E.message, children: message }), action && jsx("div", { className: styles$E.action, children: action })] }));
|
|
723
723
|
};
|
|
724
724
|
|
|
725
|
-
var styles$
|
|
725
|
+
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"};
|
|
726
726
|
|
|
727
727
|
const MOBILE_BREAKPOINT = '(max-width: 640px)';
|
|
728
728
|
const useIsMobile = () => {
|
|
@@ -759,14 +759,14 @@ const Modal = ({ open, title, onClose, children, size = 'default', actions, padd
|
|
|
759
759
|
return null;
|
|
760
760
|
const isSheet = mobileVariant === 'sheet' && isMobile;
|
|
761
761
|
const isDraggable = isSheet && draggable;
|
|
762
|
-
const backdropClass = [styles$
|
|
762
|
+
const backdropClass = [styles$D.backdrop, isSheet && styles$D.backdropSheet]
|
|
763
763
|
.filter(Boolean)
|
|
764
764
|
.join(' ');
|
|
765
765
|
const dialogClass = [
|
|
766
|
-
styles$
|
|
767
|
-
size === 'compact' && styles$
|
|
768
|
-
size === 'wide' && styles$
|
|
769
|
-
isSheet && styles$
|
|
766
|
+
styles$D.dialog,
|
|
767
|
+
size === 'compact' && styles$D.dialogCompact,
|
|
768
|
+
size === 'wide' && styles$D.dialogWide,
|
|
769
|
+
isSheet && styles$D.dialogSheet,
|
|
770
770
|
]
|
|
771
771
|
.filter(Boolean)
|
|
772
772
|
.join(' ');
|
|
@@ -782,16 +782,16 @@ const Modal = ({ open, title, onClose, children, size = 'default', actions, padd
|
|
|
782
782
|
: { 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) => {
|
|
783
783
|
if (info.offset.y > 80)
|
|
784
784
|
onClose();
|
|
785
|
-
}, children: [isSheet && jsx("div", { className: styles$
|
|
785
|
+
}, children: [isSheet && jsx("div", { className: styles$D.grabBar }), jsxs("div", { ref: headerRef, className: styles$D.header, onPointerDown: (e) => {
|
|
786
786
|
if (!isDraggable)
|
|
787
787
|
return;
|
|
788
788
|
if (e.target.closest('button'))
|
|
789
789
|
return;
|
|
790
790
|
dragControls.start(e);
|
|
791
|
-
}, children: [jsx("span", { className: styles$
|
|
791
|
+
}, children: [jsx("span", { className: styles$D.title, children: title }), actions && jsx("div", { className: styles$D.headerActions, children: actions }), jsx("button", { className: styles$D.closeButton, onClick: onClose, "aria-label": "Close modal", type: "button", children: jsx(X, { size: 16 }) })] }), jsx("div", { className: padding ? styles$D.body : styles$D.bodyFlush, children: children })] }) })) }), document.body);
|
|
792
792
|
};
|
|
793
793
|
|
|
794
|
-
var styles$
|
|
794
|
+
var styles$C = {"checkboxLabel":"Checkbox-module_checkboxLabel__4tBVg","checkbox":"Checkbox-module_checkbox__BbJul","checkboxText":"Checkbox-module_checkboxText__oJsc9"};
|
|
795
795
|
|
|
796
796
|
/**
|
|
797
797
|
* Checkbox component - Modern interactive checkbox with animations
|
|
@@ -836,13 +836,13 @@ const Checkbox = ({ checked, onChange, label, disabled = false, indeterminate =
|
|
|
836
836
|
checkboxRef.current.indeterminate = indeterminate;
|
|
837
837
|
}
|
|
838
838
|
}, [indeterminate]);
|
|
839
|
-
return (jsxs("label", { className: styles$
|
|
839
|
+
return (jsxs("label", { className: styles$C.checkboxLabel, children: [jsx("input", { ref: checkboxRef, type: "checkbox", checked: checked, onChange: (e) => {
|
|
840
840
|
const isChecked = e.target.checked;
|
|
841
841
|
onChange(isChecked);
|
|
842
842
|
if (soundConfig?.onClick !== false) {
|
|
843
843
|
playSound('toggle');
|
|
844
844
|
}
|
|
845
|
-
}, className: styles$
|
|
845
|
+
}, className: styles$C.checkbox, disabled: disabled, id: id, name: name, value: value, "aria-checked": indeterminate ? 'mixed' : checked }), label && jsx("span", { className: styles$C.checkboxText, children: label })] }));
|
|
846
846
|
};
|
|
847
847
|
|
|
848
848
|
const formatDateToEuropean = (date) => {
|
|
@@ -873,7 +873,7 @@ const parseEuropeanDate = (dateString) => {
|
|
|
873
873
|
return '';
|
|
874
874
|
};
|
|
875
875
|
|
|
876
|
-
var styles$
|
|
876
|
+
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"};
|
|
877
877
|
|
|
878
878
|
/**
|
|
879
879
|
* DateInput component - European format date picker with manual input support
|
|
@@ -933,21 +933,21 @@ function DateInput({ label, value, onChange, placeholder = "25/12/2024", onFocus
|
|
|
933
933
|
}
|
|
934
934
|
};
|
|
935
935
|
const getClassName = () => {
|
|
936
|
-
const classes = [styles$
|
|
936
|
+
const classes = [styles$B.dateInput];
|
|
937
937
|
if (error)
|
|
938
|
-
classes.push(styles$
|
|
938
|
+
classes.push(styles$B.error);
|
|
939
939
|
if (success)
|
|
940
|
-
classes.push(styles$
|
|
940
|
+
classes.push(styles$B.success);
|
|
941
941
|
if (loading)
|
|
942
|
-
classes.push(styles$
|
|
942
|
+
classes.push(styles$B.loading);
|
|
943
943
|
return classes.join(' ');
|
|
944
944
|
};
|
|
945
945
|
// Current ISO value for the native date input (or '' if empty/unparseable)
|
|
946
946
|
const isoValue = value.includes('-') ? value : (parseEuropeanDate(value) || '');
|
|
947
|
-
return (jsxs("div", { className: getClassName(), children: [jsx("label", { className: styles$
|
|
947
|
+
return (jsxs("div", { className: getClassName(), children: [jsx("label", { className: styles$B.label, children: label }), jsxs("div", { className: styles$B.inputWrapper, children: [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 }), jsxs("span", { className: styles$B.calendarButton, "aria-hidden": "true", children: [jsx(Calendar$1, {}), 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 })] })] })] }));
|
|
948
948
|
}
|
|
949
949
|
|
|
950
|
-
var styles$
|
|
950
|
+
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"};
|
|
951
951
|
|
|
952
952
|
/**
|
|
953
953
|
* SearchableDropdown component - Modern filterable dropdown with animations
|
|
@@ -1052,23 +1052,23 @@ function SearchableDropdown({ label, value, onChange, options, placeholder = "Se
|
|
|
1052
1052
|
}
|
|
1053
1053
|
};
|
|
1054
1054
|
const getTriggerClassName = () => {
|
|
1055
|
-
const classes = [styles$
|
|
1055
|
+
const classes = [styles$A.dropdownTrigger];
|
|
1056
1056
|
if (isOpen)
|
|
1057
|
-
classes.push(styles$
|
|
1057
|
+
classes.push(styles$A.open);
|
|
1058
1058
|
if (loading)
|
|
1059
|
-
classes.push(styles$
|
|
1059
|
+
classes.push(styles$A.loading);
|
|
1060
1060
|
if (error)
|
|
1061
|
-
classes.push(styles$
|
|
1061
|
+
classes.push(styles$A.error);
|
|
1062
1062
|
return classes.join(' ');
|
|
1063
1063
|
};
|
|
1064
|
-
return (jsxs("div", { className: styles$
|
|
1064
|
+
return (jsxs("div", { className: styles$A.searchableDropdown, ref: dropdownRef, onKeyDown: handleKeyDown, children: [jsx("label", { children: label }), jsxs(motion.button, { type: "button", className: getTriggerClassName(), onClick: () => !disabled && !loading && setIsOpen(!isOpen), whileTap: { scale: disabled ? 1 : 0.98 }, style: { willChange: 'transform' }, disabled: disabled, children: [jsx("span", { className: `${styles$A.dropdownValue} ${!displayValue ? styles$A.placeholder : ''}`, children: displayValue || placeholder }), jsx(ChevronDown, { className: styles$A.dropdownArrow })] }), jsx(AnimatePresence, { children: isOpen && (jsxs(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: [jsxs("div", { className: styles$A.dropdownSearch, children: [jsx(Search, { className: styles$A.searchIcon }), jsx("input", { ref: inputRef, type: "text", className: styles$A.searchInput, placeholder: "Cerca...", value: searchTerm, onChange: (e) => setSearchTerm(e.target.value), onClick: (e) => e.stopPropagation() })] }), jsxs("div", { className: styles$A.dropdownOptions, children: [allOptions.map((opt, index) => {
|
|
1065
1065
|
const isSelected = value === opt.value;
|
|
1066
1066
|
const isHighlighted = highlightedIndex === index;
|
|
1067
|
-
return (jsxs(motion.button, { type: "button", className: `${styles$
|
|
1068
|
-
}), allOptions.length === 0 && (jsx(motion.div, { className: styles$
|
|
1067
|
+
return (jsxs(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: [jsx("span", { children: opt.label }), isSelected && jsx(Check, { className: styles$A.checkIcon })] }, `${opt.value}-${index}`));
|
|
1068
|
+
}), allOptions.length === 0 && (jsx(motion.div, { className: styles$A.dropdownNoResults, initial: { opacity: 0 }, animate: { opacity: 1 }, children: "No results found" }))] })] })) })] }));
|
|
1069
1069
|
}
|
|
1070
1070
|
|
|
1071
|
-
var styles$
|
|
1071
|
+
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"};
|
|
1072
1072
|
|
|
1073
1073
|
/**
|
|
1074
1074
|
* SelectInput component - Styled dropdown selector with flexible option format
|
|
@@ -1106,26 +1106,26 @@ var styles$v = {"selectInput":"SelectInput-module_selectInput__s6zEg","selectWra
|
|
|
1106
1106
|
function SelectInput({ label, value, onChange, options, placeholder = "Select...", disabled = false, error = false, success = false, loading = false, required = false, soundConfig, className }) {
|
|
1107
1107
|
const { handlers, playSound } = useComponentSound(soundConfig);
|
|
1108
1108
|
const getClassName = () => {
|
|
1109
|
-
const classes = [styles$
|
|
1109
|
+
const classes = [styles$z.selectInput];
|
|
1110
1110
|
if (error)
|
|
1111
|
-
classes.push(styles$
|
|
1111
|
+
classes.push(styles$z.error);
|
|
1112
1112
|
if (success)
|
|
1113
|
-
classes.push(styles$
|
|
1113
|
+
classes.push(styles$z.success);
|
|
1114
1114
|
if (loading)
|
|
1115
|
-
classes.push(styles$
|
|
1115
|
+
classes.push(styles$z.loading);
|
|
1116
1116
|
return classes.join(' ');
|
|
1117
1117
|
};
|
|
1118
|
-
return (jsxs("div", { className: `${getClassName()}${className ? ` ${className}` : ''}`, children: [jsxs("label", { children: [label, required && jsx("span", { style: { color: 'var(--color-error)' }, children: " *" })] }), jsxs("div", { className: styles$
|
|
1118
|
+
return (jsxs("div", { className: `${getClassName()}${className ? ` ${className}` : ''}`, children: [jsxs("label", { children: [label, required && jsx("span", { style: { color: 'var(--color-error)' }, children: " *" })] }), jsxs("div", { className: styles$z.selectWrapper, children: [jsxs("select", { value: value, onChange: e => {
|
|
1119
1119
|
playSound('click');
|
|
1120
1120
|
onChange(e.target.value);
|
|
1121
1121
|
}, disabled: disabled || loading, required: required, ...handlers, children: [jsx("option", { value: "", children: placeholder }), options.map(opt => {
|
|
1122
1122
|
const optionValue = typeof opt === 'string' ? opt : opt.value;
|
|
1123
1123
|
const optionLabel = typeof opt === 'string' ? opt : opt.label;
|
|
1124
1124
|
return (jsx("option", { value: optionValue, children: optionLabel }, optionValue));
|
|
1125
|
-
})] }), jsx(ChevronDown, { className: styles$
|
|
1125
|
+
})] }), jsx(ChevronDown, { className: styles$z.selectIcon })] })] }));
|
|
1126
1126
|
}
|
|
1127
1127
|
|
|
1128
|
-
var styles$
|
|
1128
|
+
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-"};
|
|
1129
1129
|
|
|
1130
1130
|
/**
|
|
1131
1131
|
* TextArea component - Multi-line text input with character counting
|
|
@@ -1160,38 +1160,38 @@ var styles$u = {"textareaContainer":"TextArea-module_textareaContainer__AquFj","
|
|
|
1160
1160
|
function TextArea({ label, value, onChange, rows = 5, placeholder = "", required = false, maxLength, disabled = false, error = false, success = false, loading = false, focusMode = false, compact = false, className = "" }) {
|
|
1161
1161
|
const textareaId = `textarea-${Math.random().toString(36).substr(2, 9)}`;
|
|
1162
1162
|
const getContainerClassName = () => {
|
|
1163
|
-
const classes = [styles$
|
|
1163
|
+
const classes = [styles$y.textareaContainer];
|
|
1164
1164
|
if (error)
|
|
1165
|
-
classes.push(styles$
|
|
1165
|
+
classes.push(styles$y.error);
|
|
1166
1166
|
if (success)
|
|
1167
|
-
classes.push(styles$
|
|
1167
|
+
classes.push(styles$y.success);
|
|
1168
1168
|
if (loading)
|
|
1169
|
-
classes.push(styles$
|
|
1169
|
+
classes.push(styles$y.loading);
|
|
1170
1170
|
if (focusMode)
|
|
1171
|
-
classes.push(styles$
|
|
1171
|
+
classes.push(styles$y.focusMode);
|
|
1172
1172
|
if (compact)
|
|
1173
|
-
classes.push(styles$
|
|
1173
|
+
classes.push(styles$y.compact);
|
|
1174
1174
|
if (className)
|
|
1175
1175
|
classes.push(className);
|
|
1176
1176
|
return classes.join(' ');
|
|
1177
1177
|
};
|
|
1178
1178
|
const getCharCountClassName = () => {
|
|
1179
1179
|
if (!maxLength)
|
|
1180
|
-
return styles$
|
|
1181
|
-
const classes = [styles$
|
|
1180
|
+
return styles$y.characterCount;
|
|
1181
|
+
const classes = [styles$y.characterCount];
|
|
1182
1182
|
const percentage = (value.length / maxLength) * 100;
|
|
1183
1183
|
if (percentage >= 100) {
|
|
1184
|
-
classes.push(styles$
|
|
1184
|
+
classes.push(styles$y.atLimit);
|
|
1185
1185
|
}
|
|
1186
1186
|
else if (percentage >= 80) {
|
|
1187
|
-
classes.push(styles$
|
|
1187
|
+
classes.push(styles$y.nearLimit);
|
|
1188
1188
|
}
|
|
1189
1189
|
return classes.join(' ');
|
|
1190
1190
|
};
|
|
1191
|
-
return (jsxs("div", { className: getContainerClassName(), children: [label && (jsxs("label", { htmlFor: textareaId, className: styles$
|
|
1191
|
+
return (jsxs("div", { className: getContainerClassName(), children: [label && (jsxs("label", { htmlFor: textareaId, className: styles$y.textareaLabel, children: [label, required && jsx("span", { className: styles$y.requiredIndicator, children: "*" })] })), 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 && (jsxs("div", { className: getCharCountClassName(), children: [jsx("span", { children: value.length }), jsx("span", { style: { opacity: 0.7 }, children: " / " }), jsx("span", { children: maxLength })] }))] }));
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
1194
|
-
var styles$
|
|
1194
|
+
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"};
|
|
1195
1195
|
|
|
1196
1196
|
/**
|
|
1197
1197
|
* TextInput component - A versatile text input field with label and error handling
|
|
@@ -1228,21 +1228,21 @@ function TextInput({ label, value, onChange, type = "text", onBlur, placeholder,
|
|
|
1228
1228
|
const { handlers, playSound } = useComponentSound(soundConfig);
|
|
1229
1229
|
const prevValueRef = React.useRef(value);
|
|
1230
1230
|
const getContainerClassName = () => {
|
|
1231
|
-
const classes = [styles$
|
|
1231
|
+
const classes = [styles$x.textInput];
|
|
1232
1232
|
if (success)
|
|
1233
|
-
classes.push(styles$
|
|
1233
|
+
classes.push(styles$x.success);
|
|
1234
1234
|
if (loading)
|
|
1235
|
-
classes.push(styles$
|
|
1235
|
+
classes.push(styles$x.loading);
|
|
1236
1236
|
if (icon)
|
|
1237
|
-
classes.push(styles$
|
|
1237
|
+
classes.push(styles$x.withIcon);
|
|
1238
1238
|
if (actionButton)
|
|
1239
|
-
classes.push(styles$
|
|
1239
|
+
classes.push(styles$x.withAction);
|
|
1240
1240
|
return classes.join(' ');
|
|
1241
1241
|
};
|
|
1242
1242
|
React.useEffect(() => {
|
|
1243
1243
|
prevValueRef.current = value;
|
|
1244
1244
|
}, [value]);
|
|
1245
|
-
return (jsxs("div", { className: getContainerClassName(), children: [jsxs("label", { htmlFor: inputId, children: [label, required && jsx("span", { className: styles$
|
|
1245
|
+
return (jsxs("div", { className: getContainerClassName(), children: [jsxs("label", { htmlFor: inputId, children: [label, required && jsx("span", { className: styles$x.required, children: "*" })] }), jsxs("div", { style: { position: 'relative' }, children: [icon && jsx("div", { className: styles$x.inputIcon, children: icon }), jsx("input", { id: inputId, type: type, value: value, onChange: (e) => {
|
|
1246
1246
|
const newValue = e.target.value;
|
|
1247
1247
|
const oldValue = prevValueRef.current;
|
|
1248
1248
|
onChange(newValue);
|
|
@@ -1258,13 +1258,13 @@ function TextInput({ label, value, onChange, type = "text", onBlur, placeholder,
|
|
|
1258
1258
|
if (error && soundConfig?.onError) {
|
|
1259
1259
|
playSound(typeof soundConfig.onError === 'string' ? soundConfig.onError : 'error');
|
|
1260
1260
|
}
|
|
1261
|
-
}, onBlur: onBlur, placeholder: placeholder, className: error ? styles$
|
|
1261
|
+
}, 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 && (jsx("button", { type: "button", className: styles$x.actionButton, onClick: () => {
|
|
1262
1262
|
handlers.onClick?.();
|
|
1263
1263
|
actionButton.onClick();
|
|
1264
|
-
}, disabled: disabled || loading, children: actionButton.label }))] }), error && (jsx("span", { id: `${inputId}-error`, className: styles$
|
|
1264
|
+
}, disabled: disabled || loading, children: actionButton.label }))] }), error && (jsx("span", { id: `${inputId}-error`, className: styles$x.errorMessage, children: error }))] }));
|
|
1265
1265
|
}
|
|
1266
1266
|
|
|
1267
|
-
var styles$
|
|
1267
|
+
var styles$w = {"toggleContainer":"Toggle-module_toggleContainer__QxqQb","toggleButton":"Toggle-module_toggleButton__WUUf-","active":"Toggle-module_active__fX6Io"};
|
|
1268
1268
|
|
|
1269
1269
|
/**
|
|
1270
1270
|
* Toggle Component
|
|
@@ -1325,7 +1325,7 @@ function Toggle(props) {
|
|
|
1325
1325
|
justifyContent: 'center',
|
|
1326
1326
|
...style
|
|
1327
1327
|
};
|
|
1328
|
-
return (jsxs("div", { className: `${styles$
|
|
1328
|
+
return (jsxs("div", { className: `${styles$w.toggleContainer} ${className || ''}`, children: [jsxs(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: () => {
|
|
1329
1329
|
if (!isOn) {
|
|
1330
1330
|
// Already on left
|
|
1331
1331
|
if (enableCelebration) {
|
|
@@ -1340,7 +1340,7 @@ function Toggle(props) {
|
|
|
1340
1340
|
playSound('toggle');
|
|
1341
1341
|
}
|
|
1342
1342
|
onToggle(false);
|
|
1343
|
-
}, onMouseEnter: () => handlers.onMouseEnter?.(), style: buttonStyle, children: [jsx(motion.div, { animate: { scale: !isOn ? 1.1 : 1, rotate: !isOn ? [0, -5, 5, 0] : 0 }, transition: { duration: 0.3 }, children: leftIcon }), leftLabel] }), jsxs(motion.button, { ref: rightButtonRef, className: `${styles$
|
|
1343
|
+
}, onMouseEnter: () => handlers.onMouseEnter?.(), style: buttonStyle, children: [jsx(motion.div, { animate: { scale: !isOn ? 1.1 : 1, rotate: !isOn ? [0, -5, 5, 0] : 0 }, transition: { duration: 0.3 }, children: leftIcon }), leftLabel] }), jsxs(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: () => {
|
|
1344
1344
|
if (isOn) {
|
|
1345
1345
|
// Already on right
|
|
1346
1346
|
if (enableCelebration) {
|
|
@@ -1358,7 +1358,7 @@ function Toggle(props) {
|
|
|
1358
1358
|
}, onMouseEnter: () => handlers.onMouseEnter?.(), style: buttonStyle, children: [jsx(motion.div, { animate: { scale: isOn ? 1.1 : 1, rotate: isOn ? [0, 5, -5, 0] : 0 }, transition: { duration: 0.3 }, children: rightIcon }), rightLabel] })] }));
|
|
1359
1359
|
}
|
|
1360
1360
|
|
|
1361
|
-
var styles$
|
|
1361
|
+
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"};
|
|
1362
1362
|
|
|
1363
1363
|
/**
|
|
1364
1364
|
* NumberStepper Component
|
|
@@ -1545,33 +1545,33 @@ const NumberStepper = ({ value, onChange, min = -Infinity, max = Infinity, step
|
|
|
1545
1545
|
setDisplayValue(finalValue);
|
|
1546
1546
|
}, [displayValue, min, max, step, onChange]);
|
|
1547
1547
|
const containerClasses = [
|
|
1548
|
-
styles$
|
|
1549
|
-
styles$
|
|
1550
|
-
styles$
|
|
1551
|
-
layout === 'vertical' && styles$
|
|
1552
|
-
disabled && styles$
|
|
1548
|
+
styles$v.container,
|
|
1549
|
+
styles$v[size],
|
|
1550
|
+
styles$v[variant],
|
|
1551
|
+
layout === 'vertical' && styles$v.vertical,
|
|
1552
|
+
disabled && styles$v.disabled,
|
|
1553
1553
|
className
|
|
1554
1554
|
].filter(Boolean).join(' ');
|
|
1555
1555
|
// Merge custom styles with hover states
|
|
1556
1556
|
const [isButtonHovered, setIsButtonHovered] = useState(null);
|
|
1557
1557
|
const isDecrementDisabled = disabled || value <= min;
|
|
1558
1558
|
const isIncrementDisabled = disabled || value >= max;
|
|
1559
|
-
const stepperContent = (jsxs("div", { className: styles$
|
|
1559
|
+
const stepperContent = (jsxs("div", { className: styles$v.stepper, style: customStyles.stepper, onKeyDown: handleKeyDown, tabIndex: disabled ? -1 : 0, ...handlers, children: [jsx(motion.button, { className: styles$v.button, style: {
|
|
1560
1560
|
...customStyles.button,
|
|
1561
1561
|
...(isButtonHovered === 'decrement' && customStyles.buttonHover)
|
|
1562
|
-
}, 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 ? (jsx("span", { className: styles$
|
|
1562
|
+
}, 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 ? (jsx("span", { className: styles$v.buttonIcon, style: customStyles.buttonIcon, children: "\u2212" })) : (jsx("svg", { className: styles$v.buttonIcon, style: customStyles.buttonIcon, viewBox: "0 0 24 24", fill: "none", children: jsx("path", { d: "M15 18L9 12L15 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }))) }), jsx("div", { className: styles$v.valueContainer, style: customStyles.valueContainer, children: jsx(AnimatePresence, { mode: "wait", children: jsx(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: 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) }) }), jsx(motion.button, { className: styles$v.button, style: {
|
|
1563
1563
|
...customStyles.button,
|
|
1564
1564
|
...(isButtonHovered === 'increment' && customStyles.buttonHover)
|
|
1565
|
-
}, 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 ? (jsx("span", { className: styles$
|
|
1565
|
+
}, 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 ? (jsx("span", { className: styles$v.buttonIcon, style: customStyles.buttonIcon, children: "+" })) : (jsx("svg", { className: styles$v.buttonIcon, style: customStyles.buttonIcon, viewBox: "0 0 24 24", fill: "none", children: jsx("path", { d: "M9 18L15 12L9 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }))) })] }));
|
|
1566
1566
|
// ── Tally variant: pen-stroke counter with explicit +/- buttons.
|
|
1567
1567
|
if (variant === 'tally') {
|
|
1568
1568
|
return (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 }));
|
|
1569
1569
|
}
|
|
1570
1570
|
// For custom variant with horizontal layout, render differently
|
|
1571
1571
|
if (variant === 'custom' && (label || icon)) {
|
|
1572
|
-
return (jsxs("div", { className: containerClasses, style: { ...customStyles.container, display: 'flex', alignItems: 'center' }, children: [jsxs("div", { className: styles$
|
|
1572
|
+
return (jsxs("div", { className: containerClasses, style: { ...customStyles.container, display: 'flex', alignItems: 'center' }, children: [jsxs("div", { className: styles$v.header, style: { ...customStyles.header, flex: 1, marginBottom: 0 }, children: [icon && jsx("span", { className: styles$v.icon, style: customStyles.icon, children: icon }), label && jsx("label", { className: styles$v.label, style: customStyles.label, children: label })] }), stepperContent, !hideLimits && (min !== -Infinity || max !== Infinity) && (jsxs("div", { className: styles$v.limits, style: customStyles.limits, children: [jsx("span", { className: styles$v.limit, children: min !== -Infinity && `Min: ${min}` }), jsx("span", { className: styles$v.limit, children: max !== Infinity && `Max: ${max}` })] }))] }));
|
|
1573
1573
|
}
|
|
1574
|
-
return (jsxs("div", { className: containerClasses, style: customStyles.container, children: [(label || icon) && (jsxs("div", { className: styles$
|
|
1574
|
+
return (jsxs("div", { className: containerClasses, style: customStyles.container, children: [(label || icon) && (jsxs("div", { className: styles$v.header, style: customStyles.header, children: [icon && jsx("span", { className: styles$v.icon, style: customStyles.icon, children: icon }), label && jsx("label", { className: styles$v.label, style: customStyles.label, children: label })] })), stepperContent, !hideLimits && (min !== -Infinity || max !== Infinity) && (jsxs("div", { className: styles$v.limits, style: customStyles.limits, children: [jsx("span", { className: styles$v.limit, children: min !== -Infinity && `Min: ${min}` }), jsx("span", { className: styles$v.limit, children: max !== Infinity && `Max: ${max}` })] }))] }));
|
|
1575
1575
|
};
|
|
1576
1576
|
const TallyMarks = ({ count, color }) => {
|
|
1577
1577
|
const groups = [];
|
|
@@ -1581,14 +1581,14 @@ const TallyMarks = ({ count, color }) => {
|
|
|
1581
1581
|
groups.push(n);
|
|
1582
1582
|
left -= n;
|
|
1583
1583
|
}
|
|
1584
|
-
return (jsx("div", { className: styles$
|
|
1584
|
+
return (jsx("div", { className: styles$v.tallyMarks, "aria-hidden": "true", children: groups.map((n, i) => (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) => (jsx("line", { x1: 4 + j * 6, y1: "2", x2: 4 + j * 6, y2: "20", stroke: color, strokeWidth: "2", strokeLinecap: "round" }, j))), n === 5 && (jsx("line", { x1: "1", y1: "18", x2: "27", y2: "4", stroke: color, strokeWidth: "2", strokeLinecap: "round" }))] }, i))) }));
|
|
1585
1585
|
};
|
|
1586
1586
|
const TallyRow = ({ value, label, icon, color, disabled, emptyHint, className, customStyles, onIncrement, onDecrement, ariaLabel, isDecrementDisabled, isIncrementDisabled }) => {
|
|
1587
1587
|
const resolvedColor = color || 'currentColor';
|
|
1588
|
-
return (jsxs("div", { "aria-label": ariaLabel, "aria-disabled": disabled || undefined, className: `${className} ${styles$
|
|
1588
|
+
return (jsxs("div", { "aria-label": ariaLabel, "aria-disabled": disabled || undefined, className: `${className} ${styles$v.tallyRow}`, style: customStyles.container, children: [icon && (jsx("span", { className: styles$v.tallyIcon, style: { color: resolvedColor, ...customStyles.icon }, children: icon })), label && (jsx("span", { className: styles$v.tallyLabel, style: customStyles.label, children: label })), jsx("div", { className: styles$v.tallyBody, children: value <= 0 ? (jsx("span", { className: styles$v.tallyHint, children: emptyHint })) : (jsx(TallyMarks, { count: value, color: resolvedColor })) }), jsx("button", { type: "button", className: styles$v.tallyButton, onClick: onDecrement, disabled: isDecrementDisabled, "aria-label": `Decrease ${label || 'value'}`, children: jsx("span", { className: styles$v.tallyButtonIcon, children: "\u2212" }) }), jsx("span", { className: styles$v.tallyValue, style: { color: resolvedColor, ...customStyles.value }, "aria-hidden": "true", children: value }), jsx("button", { type: "button", className: styles$v.tallyButton, onClick: onIncrement, disabled: isIncrementDisabled, "aria-label": `Increase ${label || 'value'}`, children: jsx("span", { className: styles$v.tallyButtonIcon, children: "+" }) })] }));
|
|
1589
1589
|
};
|
|
1590
1590
|
|
|
1591
|
-
var styles$
|
|
1591
|
+
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"};
|
|
1592
1592
|
|
|
1593
1593
|
/**
|
|
1594
1594
|
* ToggleButton Component
|
|
@@ -1627,18 +1627,18 @@ var styles$q = {"button":"ToggleButton-module_button__DTuyY","background":"Toggl
|
|
|
1627
1627
|
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 }) => {
|
|
1628
1628
|
const { handlers, playSound } = useComponentSound(soundConfig);
|
|
1629
1629
|
const buttonClasses = [
|
|
1630
|
-
styles$
|
|
1631
|
-
styles$
|
|
1632
|
-
styles$
|
|
1633
|
-
active && styles$
|
|
1634
|
-
active && styles$
|
|
1635
|
-
disabled && styles$
|
|
1636
|
-
animation !== 'none' && styles$
|
|
1630
|
+
styles$u.button,
|
|
1631
|
+
styles$u[size],
|
|
1632
|
+
styles$u[variant],
|
|
1633
|
+
active && styles$u.active,
|
|
1634
|
+
active && styles$u[`active-${activeColor}`],
|
|
1635
|
+
disabled && styles$u.disabled,
|
|
1636
|
+
animation !== 'none' && styles$u[`animation-${animation}`],
|
|
1637
1637
|
className
|
|
1638
1638
|
].filter(Boolean).join(' ');
|
|
1639
1639
|
const labelClasses = [
|
|
1640
|
-
styles$
|
|
1641
|
-
hideLabelOnMobile && styles$
|
|
1640
|
+
styles$u.label,
|
|
1641
|
+
hideLabelOnMobile && styles$u.hideMobile
|
|
1642
1642
|
].filter(Boolean).join(' ');
|
|
1643
1643
|
const iconVariants = {
|
|
1644
1644
|
scale: {
|
|
@@ -1702,10 +1702,10 @@ const ToggleButton = ({ active, onClick, icon, label, disabled = false, size = '
|
|
|
1702
1702
|
return (jsxs(motion.button, { className: buttonClasses, style: dynamicStyle, onClick: () => {
|
|
1703
1703
|
playSound('toggle');
|
|
1704
1704
|
onClick();
|
|
1705
|
-
}, disabled: disabled, whileHover: !disabled ? { scale: 1.05 } : undefined, whileTap: !disabled ? { scale: 0.95 } : undefined, title: tooltip, "aria-pressed": active, "aria-label": label, ...handlers, children: [jsx(motion.div, { className: styles$
|
|
1705
|
+
}, disabled: disabled, whileHover: !disabled ? { scale: 1.05 } : undefined, whileTap: !disabled ? { scale: 0.95 } : undefined, title: tooltip, "aria-pressed": active, "aria-label": label, ...handlers, children: [jsx(motion.div, { className: styles$u.background, variants: backgroundVariants, initial: "inactive", animate: active ? "active" : "inactive" }), jsxs("div", { className: styles$u.content, children: [icon && (jsx(motion.div, { className: styles$u.iconWrapper, variants: iconVariants[animation], initial: "inactive", animate: active ? "active" : "inactive", transition: { duration: 0.3 }, children: typeof icon === 'string' ? (jsx("span", { className: styles$u.icon, children: icon })) : (jsx("div", { className: styles$u.icon, children: icon })) })), label && jsx("span", { className: labelClasses, children: label }), jsx(AnimatePresence, { children: showCheckmark && active && (jsx(motion.div, { className: styles$u.checkmark, variants: checkmarkVariants, initial: "hidden", animate: "visible", exit: "hidden", children: jsx("svg", { viewBox: "0 0 24 24", fill: "none", children: jsx("path", { d: "M20 6L9 17L4 12", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round" }) }) })) })] }), jsx(AnimatePresence, { children: active && (jsx(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 } })) })] }));
|
|
1706
1706
|
};
|
|
1707
1707
|
|
|
1708
|
-
var styles$
|
|
1708
|
+
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"};
|
|
1709
1709
|
|
|
1710
1710
|
/**
|
|
1711
1711
|
* Slider component — responsive, accessible range input with a styled track, fill, and thumb.
|
|
@@ -1744,11 +1744,11 @@ function Slider({ value, onChange, min = 0, max = 100, step = 1, label, showValu
|
|
|
1744
1744
|
};
|
|
1745
1745
|
const endDrag = () => setIsDragging(false);
|
|
1746
1746
|
const dynamicColor = getDynamicColor();
|
|
1747
|
-
const sizeClass = styles$
|
|
1748
|
-
const stateClass = disabled ? styles$
|
|
1749
|
-
const dragClass = isDragging ? styles$
|
|
1747
|
+
const sizeClass = styles$t[`size-${size}`];
|
|
1748
|
+
const stateClass = disabled ? styles$t.disabled : '';
|
|
1749
|
+
const dragClass = isDragging ? styles$t.dragging : '';
|
|
1750
1750
|
if (loading) {
|
|
1751
|
-
return (jsxs("div", { className: `${styles$
|
|
1751
|
+
return (jsxs("div", { className: `${styles$t.slider} ${sizeClass} ${styles$t.loading} ${className}`, style: style, children: [label && jsx("label", { className: styles$t.label, children: label }), jsx("div", { className: styles$t.loadingTrack, children: jsx(motion.div, { className: styles$t.loadingIndicator, animate: { x: ['-100%', '200%'] }, transition: { repeat: Infinity, duration: 1.5, ease: 'easeInOut' } }) })] }));
|
|
1752
1752
|
}
|
|
1753
1753
|
if (variant === 'dots') {
|
|
1754
1754
|
const dotCount = Math.max(0, Math.floor((max - min) / step));
|
|
@@ -1760,9 +1760,9 @@ function Slider({ value, onChange, min = 0, max = 100, step = 1, label, showValu
|
|
|
1760
1760
|
const next = value === dotValue ? dotValue - step : dotValue;
|
|
1761
1761
|
onChange(Math.max(min, next));
|
|
1762
1762
|
};
|
|
1763
|
-
return (jsxs("div", { className: `${styles$
|
|
1763
|
+
return (jsxs("div", { className: `${styles$t.slider} ${sizeClass} ${stateClass} ${className}`, style: style, ...handlers, children: [label && jsx("label", { className: styles$t.label, children: label }), jsx("div", { className: styles$t.dotsContainer, role: "slider", "aria-valuemin": min, "aria-valuemax": max, "aria-valuenow": value, "aria-label": label, children: dotValues.map((dotValue) => {
|
|
1764
1764
|
const filled = dotValue <= value;
|
|
1765
|
-
return (jsx("button", { type: "button", className: `${styles$
|
|
1765
|
+
return (jsx("button", { type: "button", className: `${styles$t.dot} ${filled ? styles$t.dotFilled : ''}`, style: filled
|
|
1766
1766
|
? {
|
|
1767
1767
|
backgroundColor: dynamicColor,
|
|
1768
1768
|
borderColor: dynamicColor,
|
|
@@ -1770,7 +1770,7 @@ function Slider({ value, onChange, min = 0, max = 100, step = 1, label, showValu
|
|
|
1770
1770
|
: undefined, onClick: () => handleDotClick(dotValue), disabled: disabled, "aria-label": valueFormatter
|
|
1771
1771
|
? valueFormatter(dotValue)
|
|
1772
1772
|
: `Set to ${dotValue}` }, dotValue));
|
|
1773
|
-
}) }), showValue && (jsx("div", { className: styles$
|
|
1773
|
+
}) }), showValue && (jsx("div", { className: styles$t.valueDisplay, style: { color: dynamicColor }, children: formatValue(value) }))] }));
|
|
1774
1774
|
}
|
|
1775
1775
|
// Inset the thumb so its bounding box stays inside the track at 0/100%.
|
|
1776
1776
|
// At percentage=0: marginLeft=0 → thumb flush-left. At 100%: marginLeft=-thumbSize → flush-right.
|
|
@@ -1778,11 +1778,11 @@ function Slider({ value, onChange, min = 0, max = 100, step = 1, label, showValu
|
|
|
1778
1778
|
left: `${percentage}%`,
|
|
1779
1779
|
marginLeft: `calc(var(--slider-thumb-size) * ${-percentage / 100})`,
|
|
1780
1780
|
};
|
|
1781
|
-
return (jsxs("div", { className: `${styles$
|
|
1781
|
+
return (jsxs("div", { className: `${styles$t.slider} ${sizeClass} ${stateClass} ${dragClass} ${className}`, style: style, children: [label && jsx("label", { className: styles$t.label, children: label }), jsxs("div", { className: styles$t.sliderContainer, children: [jsx("div", { className: styles$t.track, children: jsx("div", { className: styles$t.fill, style: { width: `${percentage}%`, backgroundColor: dynamicColor } }) }), 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 }), jsx("div", { className: styles$t.thumb, style: {
|
|
1782
1782
|
...insetStyle,
|
|
1783
1783
|
backgroundColor: dynamicColor,
|
|
1784
1784
|
borderColor: colors.thumb || dynamicColor,
|
|
1785
|
-
} }), jsx(AnimatePresence, { children: showTooltip && isDragging && !disabled && (jsxs(motion.div, { className: styles$
|
|
1785
|
+
} }), jsx(AnimatePresence, { children: showTooltip && isDragging && !disabled && (jsxs(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), jsx("div", { className: styles$t.tooltipArrow, style: { borderTopColor: dynamicColor } })] })) })] }), showValue && (jsx("div", { className: styles$t.valueDisplay, style: { color: dynamicColor }, children: formatValue(value) })), labels.length > 0 && (jsx("div", { className: styles$t.labelsContainer, children: labels.map((labelConfig, index) => {
|
|
1786
1786
|
let position = 0;
|
|
1787
1787
|
if (labelConfig.position === 'start')
|
|
1788
1788
|
position = 0;
|
|
@@ -1790,11 +1790,11 @@ function Slider({ value, onChange, min = 0, max = 100, step = 1, label, showValu
|
|
|
1790
1790
|
position = 100;
|
|
1791
1791
|
else if (typeof labelConfig.position === 'number')
|
|
1792
1792
|
position = labelConfig.position;
|
|
1793
|
-
return (jsx("div", { className: styles$
|
|
1793
|
+
return (jsx("div", { className: styles$t.labelItem, style: { left: `${position}%`, color: labelConfig.color }, children: labelConfig.label }, index));
|
|
1794
1794
|
}) }))] }));
|
|
1795
1795
|
}
|
|
1796
1796
|
|
|
1797
|
-
var styles$
|
|
1797
|
+
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"};
|
|
1798
1798
|
|
|
1799
1799
|
const defaultMessages = [
|
|
1800
1800
|
'Loading your content...',
|
|
@@ -1878,22 +1878,22 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
1878
1878
|
}
|
|
1879
1879
|
}, [currentMessageIndex, message, messagesToUse, showMessage]);
|
|
1880
1880
|
const containerClasses = [
|
|
1881
|
-
styles$
|
|
1882
|
-
styles$
|
|
1883
|
-
styles$
|
|
1884
|
-
fullScreen && styles$
|
|
1885
|
-
overlay && styles$
|
|
1881
|
+
styles$s.loadingContainer,
|
|
1882
|
+
styles$s[size],
|
|
1883
|
+
styles$s[variant],
|
|
1884
|
+
fullScreen && styles$s.fullScreen,
|
|
1885
|
+
overlay && styles$s.overlay,
|
|
1886
1886
|
className
|
|
1887
1887
|
].filter(Boolean).join(' ');
|
|
1888
1888
|
const customStyle = {
|
|
1889
1889
|
...(color && { '--spinner-color': color }),
|
|
1890
1890
|
...(backgroundColor && { '--spinner-background': backgroundColor }),
|
|
1891
1891
|
};
|
|
1892
|
-
const renderDots = () => (jsxs(motion.div, { className: styles$
|
|
1892
|
+
const renderDots = () => (jsxs(motion.div, { className: styles$s.dotsSpinner, animate: { rotate: 360 }, transition: {
|
|
1893
1893
|
duration: 2,
|
|
1894
1894
|
repeat: Infinity,
|
|
1895
1895
|
ease: 'linear'
|
|
1896
|
-
}, children: [jsx(motion.div, { className: styles$
|
|
1896
|
+
}, children: [jsx(motion.div, { className: styles$s.dot1, animate: {
|
|
1897
1897
|
scale: [1, 1.3, 1],
|
|
1898
1898
|
y: [0, -6, 0]
|
|
1899
1899
|
}, transition: {
|
|
@@ -1901,7 +1901,7 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
1901
1901
|
repeat: Infinity,
|
|
1902
1902
|
ease: 'easeInOut',
|
|
1903
1903
|
delay: 0
|
|
1904
|
-
} }), jsx(motion.div, { className: styles$
|
|
1904
|
+
} }), jsx(motion.div, { className: styles$s.dot2, animate: {
|
|
1905
1905
|
scale: [1, 1.3, 1],
|
|
1906
1906
|
y: [0, -6, 0]
|
|
1907
1907
|
}, transition: {
|
|
@@ -1909,7 +1909,7 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
1909
1909
|
repeat: Infinity,
|
|
1910
1910
|
ease: 'easeInOut',
|
|
1911
1911
|
delay: 0.5
|
|
1912
|
-
} }), jsx(motion.div, { className: styles$
|
|
1912
|
+
} }), jsx(motion.div, { className: styles$s.dot3, animate: {
|
|
1913
1913
|
scale: [1, 1.3, 1],
|
|
1914
1914
|
y: [0, -6, 0]
|
|
1915
1915
|
}, transition: {
|
|
@@ -1918,12 +1918,12 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
1918
1918
|
ease: 'easeInOut',
|
|
1919
1919
|
delay: 1
|
|
1920
1920
|
} })] }));
|
|
1921
|
-
const renderSpinner = () => (jsx(motion.div, { className: styles$
|
|
1921
|
+
const renderSpinner = () => (jsx(motion.div, { className: styles$s.circleSpinner, animate: { rotate: 360 }, transition: {
|
|
1922
1922
|
duration: 1,
|
|
1923
1923
|
repeat: Infinity,
|
|
1924
1924
|
ease: 'linear'
|
|
1925
1925
|
} }));
|
|
1926
|
-
const renderPulse = () => (jsx(motion.div, { className: styles$
|
|
1926
|
+
const renderPulse = () => (jsx(motion.div, { className: styles$s.pulseSpinner, animate: {
|
|
1927
1927
|
scale: [1, 1.2, 1],
|
|
1928
1928
|
opacity: [1, 0.7, 1]
|
|
1929
1929
|
}, transition: {
|
|
@@ -1942,10 +1942,10 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
1942
1942
|
return renderDots();
|
|
1943
1943
|
}
|
|
1944
1944
|
};
|
|
1945
|
-
return (jsxs("div", { className: containerClasses, style: customStyle, children: [renderSpinnerVariant(), showMessage && (jsx(AnimatePresence, { mode: "wait", children: jsx(motion.p, { className: styles$
|
|
1945
|
+
return (jsxs("div", { className: containerClasses, style: customStyle, children: [renderSpinnerVariant(), showMessage && (jsx(AnimatePresence, { mode: "wait", children: jsx(motion.p, { className: styles$s.loadingText, initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -10 }, transition: {
|
|
1946
1946
|
duration: 0.4,
|
|
1947
1947
|
ease: 'easeOut'
|
|
1948
|
-
}, children: currentMessage }, currentMessage) })), showSparkles && (jsx("div", { className: styles$
|
|
1948
|
+
}, children: currentMessage }, currentMessage) })), showSparkles && (jsx("div", { className: styles$s.sparkleContainer, children: [...Array(4)].map((_, i) => (jsx(motion.div, { className: styles$s.sparkle, animate: {
|
|
1949
1949
|
opacity: [0, 1, 0],
|
|
1950
1950
|
scale: [0.5, 1, 0.5],
|
|
1951
1951
|
rotate: [0, 180, 360]
|
|
@@ -1960,7 +1960,7 @@ const LoadingSpinner = ({ message, size = 'medium', variant = 'dots', className
|
|
|
1960
1960
|
} }, i))) }))] }));
|
|
1961
1961
|
};
|
|
1962
1962
|
|
|
1963
|
-
var styles$
|
|
1963
|
+
var styles$r = {"wrapper":"DecryptedText-module_wrapper__tuLvf","srOnly":"DecryptedText-module_srOnly__A-K2T"};
|
|
1964
1964
|
|
|
1965
1965
|
/**
|
|
1966
1966
|
* DecryptedText Component
|
|
@@ -2144,13 +2144,13 @@ const DecryptedText = ({ text, speed = 50, maxIterations = 10, sequential = fals
|
|
|
2144
2144
|
onMouseLeave: () => setIsHovering(false),
|
|
2145
2145
|
}
|
|
2146
2146
|
: {};
|
|
2147
|
-
return (jsxs(motion.span, { className: `${styles$
|
|
2147
|
+
return (jsxs(motion.span, { className: `${styles$r.wrapper} ${parentClassName}`, ref: containerRef, ...hoverProps, ...props, children: [jsx("span", { className: styles$r.srOnly, children: displayText }), jsx("span", { "aria-hidden": "true", children: displayText.split('').map((char, index) => {
|
|
2148
2148
|
const isRevealedOrDone = revealedIndices.has(index) || !isScrambling || !isHovering;
|
|
2149
2149
|
return (jsx("span", { className: isRevealedOrDone ? className : encryptedClassName, children: char }, index));
|
|
2150
2150
|
}) })] }));
|
|
2151
2151
|
};
|
|
2152
2152
|
|
|
2153
|
-
var styles$
|
|
2153
|
+
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"};
|
|
2154
2154
|
|
|
2155
2155
|
/**
|
|
2156
2156
|
* ArrayInput component - Versatile dynamic list manager
|
|
@@ -2217,11 +2217,11 @@ function SimpleArrayInput({ label, values, onChange, placeholder, itemStyle, inp
|
|
|
2217
2217
|
itemIdsRef.current.splice(index, 1);
|
|
2218
2218
|
onChange(newValues);
|
|
2219
2219
|
};
|
|
2220
|
-
return (jsxs("div", { className: styles$
|
|
2220
|
+
return (jsxs("div", { className: styles$q.arrayInput, children: [jsx("h3", { className: styles$q.arrayInputLabel, children: label }), jsx("div", { children: jsx(AnimatePresence, { children: values.map((value, index) => (jsxs(motion.div, { className: styles$q.arrayInputItem, style: itemStyle, initial: { opacity: 0, y: 10 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0 }, transition: {
|
|
2221
2221
|
duration: 0.3,
|
|
2222
2222
|
ease: "easeInOut",
|
|
2223
2223
|
layout: { duration: 0.2 }
|
|
2224
|
-
}, children: [jsx("div", { className: styles$
|
|
2224
|
+
}, children: [jsx("div", { className: styles$q.inputWrapper, children: multiline ? (jsx("div", { style: inputStyle, children: jsx(TextArea, { label: "", value: value, onChange: (newValue) => handleChange(index, newValue), placeholder: placeholder, rows: rows, compact: true }) })) : (jsx("input", { type: "text", value: value, onChange: (e) => handleChange(index, e.target.value), placeholder: placeholder, className: styles$q.input, style: inputStyle })) }), jsx(Button, { variant: "ghost", size: "small", onClick: () => handleRemove(index), "aria-label": "Remove item", className: styles$q.removeButton, children: jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: 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]))) }) }), jsx(Button, { variant: buttonVariant, size: "small", onClick: handleAdd, className: styles$q.addButton, children: label })] }));
|
|
2225
2225
|
}
|
|
2226
2226
|
// Complex object array implementation
|
|
2227
2227
|
function ComplexArrayInput({ label, values, onChange, fields, getKey, itemStyle, inputStyle, buttonVariant = 'primary' }) {
|
|
@@ -2246,14 +2246,14 @@ function ComplexArrayInput({ label, values, onChange, fields, getKey, itemStyle,
|
|
|
2246
2246
|
// Generate key from all field values
|
|
2247
2247
|
return fields.map(f => item[f.name] || '').join('-') + `-${index}`;
|
|
2248
2248
|
};
|
|
2249
|
-
return (jsxs("div", { className: styles$
|
|
2249
|
+
return (jsxs("div", { className: styles$q.arrayInput, children: [jsx("h3", { className: styles$q.arrayInputLabel, children: label }), jsx("div", { children: jsx(AnimatePresence, { children: values.map((value, index) => (jsxs(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: {
|
|
2250
2250
|
duration: 0.3,
|
|
2251
2251
|
ease: "easeInOut",
|
|
2252
2252
|
layout: { duration: 0.2 }
|
|
2253
|
-
}, children: [jsx("div", { className: styles$
|
|
2253
|
+
}, children: [jsx("div", { className: styles$q.fieldsWrapper, children: fields.map((field) => (jsx("div", { style: inputStyle, children: field.multiline ? (jsx(TextArea, { value: value[field.name] || '', onChange: (newValue) => handleChange(index, field.name, newValue), label: field.label, placeholder: field.placeholder, rows: field.rows, compact: true })) : (jsx(TextInput, { value: value[field.name] || '', onChange: (newValue) => handleChange(index, field.name, newValue), label: field.label, type: field.type, placeholder: field.placeholder })) }, field.name))) }), jsx(Button, { variant: "ghost", size: "small", onClick: () => handleRemove(index), "aria-label": "Remove item", className: styles$q.removeButton, children: jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "currentColor", children: 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)))) }) }), jsxs(Button, { variant: buttonVariant, size: "small", onClick: handleAdd, className: styles$q.addButton, children: ["Add ", label] })] }));
|
|
2254
2254
|
}
|
|
2255
2255
|
|
|
2256
|
-
var styles$
|
|
2256
|
+
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"};
|
|
2257
2257
|
|
|
2258
2258
|
const EditFAB = ({ canEdit, isEditMode, hasUnsavedChanges = false, isSaving = false, onEnterEditMode, onExitEditMode, position = { bottom: 32, right: 32 } }) => {
|
|
2259
2259
|
const [isMobile, setIsMobile] = useState(false);
|
|
@@ -2338,15 +2338,15 @@ const EditFAB = ({ canEdit, isEditMode, hasUnsavedChanges = false, isSaving = fa
|
|
|
2338
2338
|
};
|
|
2339
2339
|
const getVariantClass = () => {
|
|
2340
2340
|
if (isSaving)
|
|
2341
|
-
return styles$
|
|
2341
|
+
return styles$p.primary;
|
|
2342
2342
|
if (isEditMode) {
|
|
2343
|
-
return hasUnsavedChanges ? styles$
|
|
2343
|
+
return hasUnsavedChanges ? styles$p.success : styles$p.secondary;
|
|
2344
2344
|
}
|
|
2345
|
-
return styles$
|
|
2345
|
+
return styles$p.primary;
|
|
2346
2346
|
};
|
|
2347
2347
|
const getIcon = () => {
|
|
2348
2348
|
if (isSaving) {
|
|
2349
|
-
return jsx("div", { className: styles$
|
|
2349
|
+
return jsx("div", { className: styles$p.loader });
|
|
2350
2350
|
}
|
|
2351
2351
|
if (isEditMode) {
|
|
2352
2352
|
return hasUnsavedChanges ? jsx(Check, { size: 24 }) : jsx(X, { size: 24 });
|
|
@@ -2361,14 +2361,14 @@ const EditFAB = ({ canEdit, isEditMode, hasUnsavedChanges = false, isSaving = fa
|
|
|
2361
2361
|
}
|
|
2362
2362
|
return "Enter edit mode";
|
|
2363
2363
|
};
|
|
2364
|
-
return (jsx(motion.button, { ref: fabRef, className: `${styles$
|
|
2364
|
+
return (jsx(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: {
|
|
2365
2365
|
type: "spring",
|
|
2366
2366
|
stiffness: 260,
|
|
2367
2367
|
damping: 20
|
|
2368
2368
|
}, children: getIcon() }));
|
|
2369
2369
|
};
|
|
2370
2370
|
|
|
2371
|
-
var styles$
|
|
2371
|
+
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"};
|
|
2372
2372
|
|
|
2373
2373
|
// Default filter options for backwards compatibility
|
|
2374
2374
|
const defaultFilterOptions = [
|
|
@@ -2561,18 +2561,18 @@ const SearchBar = ({ className, placeholder = "Search (Ctrl+Space)...", onSearch
|
|
|
2561
2561
|
return text || '';
|
|
2562
2562
|
const regex = new RegExp(`(${highlight.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')})`, 'gi');
|
|
2563
2563
|
const parts = text.split(regex);
|
|
2564
|
-
return parts.map((part, index) => regex.test(part) ? (jsx("mark", { className: styles$
|
|
2564
|
+
return parts.map((part, index) => regex.test(part) ? (jsx("mark", { className: styles$o.highlight, children: part }, index)) : (part));
|
|
2565
2565
|
};
|
|
2566
|
-
return (jsxs("div", { ref: searchRef, className: `${styles$
|
|
2566
|
+
return (jsxs("div", { ref: searchRef, className: `${styles$o.searchContainer} ${className || ''}`, children: [jsxs("div", { className: styles$o.searchInputWrapper, children: [jsx(Search, { className: styles$o.searchIcon }), 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 && (jsx(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: jsx(X, {}) })), showFilter && (jsx("select", { value: filter, onChange: (e) => setFilter(e.target.value), className: styles$o.filterSelect, "aria-label": "Filter search results", children: filterOptions.map(option => (jsx("option", { value: option.value, children: option.label }, option.value))) }))] }), jsx(AnimatePresence, { children: isDropdownOpen && (jsx(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 ? (jsxs("div", { className: styles$o.loadingState, children: [jsx("div", { className: styles$o.spinner }), jsx("span", { children: "Searching..." })] })) : results.length === 0 ? (jsxs("div", { className: styles$o.emptyState, children: ["No results found for \"", query, "\""] })) : (jsx("div", { className: styles$o.resultsGroups, children: Object.entries(groupedResults).map(([type, groupResults]) => {
|
|
2567
2567
|
const Icon = entityIcons[type];
|
|
2568
|
-
return (jsxs("div", { className: styles$
|
|
2568
|
+
return (jsxs("div", { className: styles$o.resultGroup, children: [jsxs("div", { className: styles$o.groupHeader, children: [Icon && jsx(Icon, { className: styles$o.groupIcon }), jsx("span", { className: styles$o.groupTitle, children: type.charAt(0).toUpperCase() + type.slice(1) }), jsx("span", { className: styles$o.groupCount, children: groupResults.length })] }), jsx("div", { className: styles$o.groupResults, children: groupResults.map((result) => {
|
|
2569
2569
|
const globalIndex = results.indexOf(result);
|
|
2570
|
-
return (jsxs(motion.button, { "data-result-index": globalIndex, className: `${styles$
|
|
2570
|
+
return (jsxs(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: [jsxs("div", { className: styles$o.resultContent, children: [jsx("div", { className: styles$o.resultTitle, children: highlightMatch(result.title || 'Untitled', query) }), result.subtitle && (jsx("div", { className: styles$o.resultSubtitle, children: highlightMatch(result.subtitle, query) }))] }), result.meta && (jsx("div", { className: styles$o.resultMeta, children: result.meta }))] }, `${result.type}-${result.id}`));
|
|
2571
2571
|
}) })] }, type));
|
|
2572
2572
|
}) })) })) })] }));
|
|
2573
2573
|
};
|
|
2574
2574
|
|
|
2575
|
-
var styles$
|
|
2575
|
+
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-"};
|
|
2576
2576
|
|
|
2577
2577
|
const lightTheme = createTheme({
|
|
2578
2578
|
palette: {
|
|
@@ -2608,26 +2608,26 @@ function TimeInput({ label, value, onChange, error = false, success = false, loa
|
|
|
2608
2608
|
!!document.documentElement.getAttribute('data-theme')?.includes('dark');
|
|
2609
2609
|
const muiTheme = useMemo(() => (isDark ? darkTheme : lightTheme), [isDark]);
|
|
2610
2610
|
const getContainerClassName = () => {
|
|
2611
|
-
const classes = [styles$
|
|
2611
|
+
const classes = [styles$n.timeInput];
|
|
2612
2612
|
if (error)
|
|
2613
|
-
classes.push(styles$
|
|
2613
|
+
classes.push(styles$n.error);
|
|
2614
2614
|
if (success)
|
|
2615
|
-
classes.push(styles$
|
|
2615
|
+
classes.push(styles$n.success);
|
|
2616
2616
|
if (loading)
|
|
2617
|
-
classes.push(styles$
|
|
2617
|
+
classes.push(styles$n.loading);
|
|
2618
2618
|
if (disabled)
|
|
2619
|
-
classes.push(styles$
|
|
2619
|
+
classes.push(styles$n.disabled);
|
|
2620
2620
|
if (className)
|
|
2621
2621
|
classes.push(className);
|
|
2622
2622
|
return classes.join(' ');
|
|
2623
2623
|
};
|
|
2624
|
-
return (jsxs("div", { className: getContainerClassName(), children: [label && (jsxs("label", { className: styles$
|
|
2624
|
+
return (jsxs("div", { className: getContainerClassName(), children: [label && (jsxs("label", { className: styles$n.label, children: [label, required && jsx("span", { className: styles$n.required, children: "*" })] })), jsx(ThemeProvider$1, { theme: muiTheme, children: jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, children: jsx(MobileTimePicker, { value: dayjsValue, onChange: (newValue) => {
|
|
2625
2625
|
onChange(newValue ? newValue.format('HH:mm') : '');
|
|
2626
2626
|
}, ampm: false, views: ['hours', 'minutes'], disabled: disabled || loading, slotProps: {
|
|
2627
2627
|
textField: {
|
|
2628
2628
|
size: 'small',
|
|
2629
2629
|
fullWidth: true,
|
|
2630
|
-
className: styles$
|
|
2630
|
+
className: styles$n.picker,
|
|
2631
2631
|
sx: {
|
|
2632
2632
|
'& .MuiPickersOutlinedInput-root': {
|
|
2633
2633
|
fontFamily: "'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace",
|
|
@@ -2715,7 +2715,7 @@ const ThemeProvider = ({ children, defaultTheme = 'light', storageKey = 'app-the
|
|
|
2715
2715
|
return (jsx(ThemeContext.Provider, { value: { theme, setTheme, toggleTheme }, children: children }));
|
|
2716
2716
|
};
|
|
2717
2717
|
|
|
2718
|
-
var styles$
|
|
2718
|
+
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"};
|
|
2719
2719
|
|
|
2720
2720
|
const ThemeSwitcher = ({ variant = 'button', showLabel = false, className = '', currentTheme, onThemeChange, themes: customThemes, }) => {
|
|
2721
2721
|
// Use safe version that returns null when outside a ThemeProvider
|
|
@@ -2736,25 +2736,25 @@ const ThemeSwitcher = ({ variant = 'button', showLabel = false, className = '',
|
|
|
2736
2736
|
if (variant === 'toggle') {
|
|
2737
2737
|
// Simple toggle between light and dark
|
|
2738
2738
|
const isDark = theme.includes('dark');
|
|
2739
|
-
return (jsxs(motion.button, { className: `${styles$
|
|
2739
|
+
return (jsxs(motion.button, { className: `${styles$m.toggle} ${className}`, onClick: () => setTheme(isDark ? 'light' : 'dark'), whileTap: { scale: 0.95 }, "aria-label": "Toggle theme", children: [jsx(motion.div, { className: styles$m.toggleTrack, animate: { backgroundColor: isDark ? 'var(--color-primary)' : 'var(--color-border)' }, children: jsx(motion.div, { className: styles$m.toggleThumb, animate: { x: isDark ? 24 : 0 }, transition: { type: 'spring', stiffness: 500, damping: 30 }, children: isDark ? jsx(Moon, { size: 14 }) : jsx(Sun, { size: 14 }) }) }), showLabel && jsx("span", { className: styles$m.label, children: isDark ? 'Dark' : 'Light' })] }));
|
|
2740
2740
|
}
|
|
2741
2741
|
if (variant === 'icon') {
|
|
2742
|
-
return (jsxs("button", { type: "button", className: `${styles$
|
|
2742
|
+
return (jsxs("button", { type: "button", className: `${styles$m.iconButton} ${className}`, onClick: () => {
|
|
2743
2743
|
const nextIndex = (currentThemeIndex + 1) % themes.length;
|
|
2744
2744
|
setTheme(themes[nextIndex].value);
|
|
2745
|
-
}, "aria-label": `Current theme: ${currentThemeData.label}. Click to change.`, title: currentThemeData.label, children: [currentThemeData.icon, showLabel && jsx("span", { className: styles$
|
|
2745
|
+
}, "aria-label": `Current theme: ${currentThemeData.label}. Click to change.`, title: currentThemeData.label, children: [currentThemeData.icon, showLabel && jsx("span", { className: styles$m.label, children: currentThemeData.label })] }));
|
|
2746
2746
|
}
|
|
2747
2747
|
if (variant === 'dropdown') {
|
|
2748
|
-
return (jsxs("div", { className: `${styles$
|
|
2748
|
+
return (jsxs("div", { className: `${styles$m.dropdown} ${className}`, children: [jsxs(motion.button, { className: styles$m.dropdownTrigger, whileTap: { scale: 0.98 }, children: [currentThemeData.icon, showLabel && jsx("span", { className: styles$m.label, children: currentThemeData.label })] }), jsx(motion.div, { className: styles$m.dropdownMenu, initial: { opacity: 0, y: -10 }, animate: { opacity: 1, y: 0 }, children: themes.map((t) => (jsxs(motion.button, { className: `${styles$m.dropdownItem} ${theme === t.value ? styles$m.active : ''}`, onClick: () => setTheme(t.value), whileHover: { x: 4 }, whileTap: { scale: 0.98 }, children: [jsx("span", { className: styles$m.icon, children: t.icon }), jsx("span", { className: styles$m.text, children: t.label })] }, t.value))) })] }));
|
|
2749
2749
|
}
|
|
2750
2750
|
// Default button variant - cycles through themes
|
|
2751
|
-
return (jsxs(motion.button, { className: `${styles$
|
|
2751
|
+
return (jsxs(motion.button, { className: `${styles$m.button} ${className}`, onClick: () => {
|
|
2752
2752
|
const nextIndex = (currentThemeIndex + 1) % themes.length;
|
|
2753
2753
|
setTheme(themes[nextIndex].value);
|
|
2754
|
-
}, whileTap: { scale: 0.95 }, whileHover: { scale: 1.05 }, "aria-label": `Current theme: ${currentThemeData.label}. Click to change.`, children: [jsx(motion.div, { initial: { rotate: -180, opacity: 0 }, animate: { rotate: 0, opacity: 1 }, exit: { rotate: 180, opacity: 0 }, transition: { duration: 0.3 }, className: styles$
|
|
2754
|
+
}, whileTap: { scale: 0.95 }, whileHover: { scale: 1.05 }, "aria-label": `Current theme: ${currentThemeData.label}. Click to change.`, children: [jsx(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 && jsx("span", { className: styles$m.label, children: currentThemeData.label })] }));
|
|
2755
2755
|
};
|
|
2756
2756
|
|
|
2757
|
-
var styles$
|
|
2757
|
+
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"};
|
|
2758
2758
|
|
|
2759
2759
|
// Default tabs for backwards compatibility
|
|
2760
2760
|
const defaultTabs = [
|
|
@@ -2765,39 +2765,39 @@ const defaultTabs = [
|
|
|
2765
2765
|
];
|
|
2766
2766
|
const Tabs = ({ activeTab, onTabChange, tabs: customTabs, className = '', fullWidth = false }) => {
|
|
2767
2767
|
const tabs = customTabs ?? defaultTabs;
|
|
2768
|
-
return (jsx("div", { className: `${styles$
|
|
2768
|
+
return (jsx("div", { className: `${styles$l.tabs} ${fullWidth ? styles$l.fullWidth : ''} ${className}`, children: tabs.map((tab) => {
|
|
2769
2769
|
const isActive = activeTab === tab.id;
|
|
2770
|
-
return (jsxs(motion.button, { className: styles$
|
|
2770
|
+
return (jsxs(motion.button, { className: styles$l.tab, "data-active": isActive, onClick: () => onTabChange(tab.id), style: { position: 'relative' }, children: [jsx(motion.div, { animate: {
|
|
2771
2771
|
rotate: isActive ? [0, -10, 10, -5, 5, 0] : 0,
|
|
2772
2772
|
}, transition: {
|
|
2773
2773
|
rotate: {
|
|
2774
2774
|
duration: 0.5,
|
|
2775
2775
|
ease: 'easeInOut'
|
|
2776
2776
|
}
|
|
2777
|
-
}, children: tab.icon && (React.isValidElement(tab.icon) ? (jsx("span", { className: styles$
|
|
2777
|
+
}, children: tab.icon && (React.isValidElement(tab.icon) ? (jsx("span", { className: styles$l.tabIcon, children: tab.icon })) : (jsx("span", { className: styles$l.tabIcon, children: React.createElement(tab.icon) }))) }), jsx("span", { children: tab.label })] }, tab.id));
|
|
2778
2778
|
}) }));
|
|
2779
2779
|
};
|
|
2780
2780
|
|
|
2781
|
-
var styles$
|
|
2781
|
+
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"};
|
|
2782
2782
|
|
|
2783
2783
|
const getIcon = (type) => {
|
|
2784
2784
|
switch (type) {
|
|
2785
2785
|
case 'success':
|
|
2786
|
-
return (jsx("svg", { className: `${styles$
|
|
2786
|
+
return (jsx("svg", { className: `${styles$k.icon} ${styles$k.iconSuccess}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }));
|
|
2787
2787
|
case 'error':
|
|
2788
|
-
return (jsx("svg", { className: `${styles$
|
|
2788
|
+
return (jsx("svg", { className: `${styles$k.icon} ${styles$k.iconError}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }));
|
|
2789
2789
|
case 'warning':
|
|
2790
|
-
return (jsx("svg", { className: `${styles$
|
|
2790
|
+
return (jsx("svg", { className: `${styles$k.icon} ${styles$k.iconWarning}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: 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" }) }));
|
|
2791
2791
|
case 'info':
|
|
2792
|
-
return (jsx("svg", { className: `${styles$
|
|
2792
|
+
return (jsx("svg", { className: `${styles$k.icon} ${styles$k.iconInfo}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: 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" }) }));
|
|
2793
2793
|
}
|
|
2794
2794
|
};
|
|
2795
2795
|
const getToastStyle = (type) => {
|
|
2796
2796
|
switch (type) {
|
|
2797
|
-
case 'success': return styles$
|
|
2798
|
-
case 'error': return styles$
|
|
2799
|
-
case 'warning': return styles$
|
|
2800
|
-
case 'info': return styles$
|
|
2797
|
+
case 'success': return styles$k.toastSuccess;
|
|
2798
|
+
case 'error': return styles$k.toastError;
|
|
2799
|
+
case 'warning': return styles$k.toastWarning;
|
|
2800
|
+
case 'info': return styles$k.toastInfo;
|
|
2801
2801
|
default: return '';
|
|
2802
2802
|
}
|
|
2803
2803
|
};
|
|
@@ -2819,7 +2819,7 @@ const ToastItem = ({ toast, removeToast, }) => {
|
|
|
2819
2819
|
clearInterval(interval);
|
|
2820
2820
|
};
|
|
2821
2821
|
}, [toast.id, duration, removeToast]);
|
|
2822
|
-
return (jsxs(motion.div, { className: `${styles$
|
|
2822
|
+
return (jsxs(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), jsxs("div", { className: styles$k.content, children: [toast.title && jsx("p", { className: styles$k.title, children: toast.title }), jsx("p", { className: styles$k.message, children: toast.message })] }), jsx("button", { className: styles$k.closeButton, onClick: () => removeToast(toast.id), "aria-label": "Close notification", children: jsx("svg", { width: "16", height: "16", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }) }), jsx(motion.div, { className: styles$k.progressBar, initial: { width: '100%' }, animate: { width: `${progress}%` }, style: {
|
|
2823
2823
|
color: toast.type === 'success' ? '#10B981'
|
|
2824
2824
|
: toast.type === 'error' ? '#EF4444'
|
|
2825
2825
|
: toast.type === 'warning' ? '#F59E0B'
|
|
@@ -2829,10 +2829,10 @@ const ToastItem = ({ toast, removeToast, }) => {
|
|
|
2829
2829
|
const ToastContainer = ({ toasts, removeToast }) => {
|
|
2830
2830
|
if (typeof document === 'undefined')
|
|
2831
2831
|
return null;
|
|
2832
|
-
return createPortal(jsx("div", { className: styles$
|
|
2832
|
+
return createPortal(jsx("div", { className: styles$k.toastContainer, children: jsx(AnimatePresence, { mode: "sync", children: toasts.map((toast) => (jsx(ToastItem, { toast: toast, removeToast: removeToast }, toast.id))) }) }), document.body);
|
|
2833
2833
|
};
|
|
2834
2834
|
|
|
2835
|
-
var styles$
|
|
2835
|
+
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"};
|
|
2836
2836
|
|
|
2837
2837
|
/**
|
|
2838
2838
|
* Breadcrumb Component
|
|
@@ -2851,13 +2851,13 @@ var styles$f = {"breadcrumb":"Breadcrumb-module_breadcrumb__pGabz","separator":"
|
|
|
2851
2851
|
* />
|
|
2852
2852
|
*/
|
|
2853
2853
|
const Breadcrumb = ({ items, onNavigate, className = '' }) => {
|
|
2854
|
-
return (jsx("nav", { className: `${styles$
|
|
2854
|
+
return (jsx("nav", { className: `${styles$j.breadcrumb} ${className}`, "aria-label": "Breadcrumb", children: items.map((item, index) => {
|
|
2855
2855
|
const isLast = index === items.length - 1;
|
|
2856
|
-
return (jsxs(React.Fragment, { children: [index > 0 && jsx(ChevronRight, { size: 14, className: styles$
|
|
2856
|
+
return (jsxs(React.Fragment, { children: [index > 0 && jsx(ChevronRight, { size: 14, className: styles$j.separator }), isLast || !item.href ? (jsx("span", { className: `${styles$j.item} ${isLast ? styles$j.current : ''}`, children: item.label })) : (jsx("button", { className: `${styles$j.item} ${styles$j.link}`, onClick: () => onNavigate?.(item.href), children: item.label }))] }, index));
|
|
2857
2857
|
}) }));
|
|
2858
2858
|
};
|
|
2859
2859
|
|
|
2860
|
-
var styles$
|
|
2860
|
+
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"};
|
|
2861
2861
|
|
|
2862
2862
|
/**
|
|
2863
2863
|
* LiquidButton Component
|
|
@@ -2883,13 +2883,13 @@ const LiquidButton = ({ actions, icon: Icon = Plus, className = '', }) => {
|
|
|
2883
2883
|
setExpanded(false);
|
|
2884
2884
|
action.onClick();
|
|
2885
2885
|
}, []);
|
|
2886
|
-
return (jsxs(Fragment, { children: [jsx(AnimatePresence, { children: expanded && (jsx(motion.div, { className: styles$
|
|
2886
|
+
return (jsxs(Fragment, { children: [jsx(AnimatePresence, { children: expanded && (jsx(motion.div, { className: styles$i.overlay, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: handleToggle })) }), jsxs("div", { className: `${styles$i.container} ${className}`, children: [jsx(AnimatePresence, { children: expanded && (jsx("div", { className: styles$i.actions, children: actions.map((action, index) => (jsxs(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: {
|
|
2887
2887
|
duration: 0.15,
|
|
2888
2888
|
delay: (actions.length - 1 - index) * 0.05,
|
|
2889
|
-
}, onClick: () => handleAction(action), children: [jsx(action.icon, { size: 18, color: action.color }), jsx("span", { className: styles$
|
|
2889
|
+
}, onClick: () => handleAction(action), children: [jsx(action.icon, { size: 18, color: action.color }), jsx("span", { className: styles$i.actionLabel, children: action.label })] }, action.key))) })) }), jsx(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: jsx(Icon, { size: 24, strokeWidth: 2.5 }) })] })] }));
|
|
2890
2890
|
};
|
|
2891
2891
|
|
|
2892
|
-
var styles$
|
|
2892
|
+
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-"};
|
|
2893
2893
|
|
|
2894
2894
|
const DEFAULT_STATE = {
|
|
2895
2895
|
freq: 'WEEKLY',
|
|
@@ -3035,18 +3035,18 @@ const RecurrencePicker = ({ value, onChange, className, }) => {
|
|
|
3035
3035
|
MONTHLY: state.interval === 1 ? 'month' : 'months',
|
|
3036
3036
|
YEARLY: state.interval === 1 ? 'year' : 'years',
|
|
3037
3037
|
};
|
|
3038
|
-
return (jsxs("div", { className: `${styles$
|
|
3038
|
+
return (jsxs("div", { className: `${styles$h.container}${className ? ` ${className}` : ''}`, children: [jsx("div", { className: styles$h.field, children: jsx(SelectInput, { label: "Frequency", value: state.freq, onChange: v => update({ freq: v }), options: [
|
|
3039
3039
|
{ value: 'DAILY', label: 'Daily' },
|
|
3040
3040
|
{ value: 'WEEKLY', label: 'Weekly' },
|
|
3041
3041
|
{ value: 'MONTHLY', label: 'Monthly' },
|
|
3042
3042
|
{ value: 'YEARLY', label: 'Yearly' },
|
|
3043
|
-
] }) }), jsxs("div", { className: styles$
|
|
3043
|
+
] }) }), jsxs("div", { className: styles$h.field, children: [jsx("span", { className: styles$h.fieldLabel, children: "Every" }), jsxs("div", { className: styles$h.fieldRow, children: [jsx(NumberStepper, { value: state.interval, onChange: v => update({ interval: Math.max(1, v) }), min: 1, max: 99, hideLimits: true, size: "small" }), jsx("span", { className: styles$h.fieldUnit, children: unitLabel[state.freq] })] })] }), state.freq === 'WEEKLY' && (jsxs("div", { className: `${styles$h.field} ${styles$h.fieldCentered}`, children: [jsx("span", { className: styles$h.fieldLabel, children: "On" }), jsx("div", { className: styles$h.dayPicker, children: WEEKDAYS.map(d => (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' && (jsxs("div", { className: styles$h.field, children: [jsx("span", { className: styles$h.fieldLabel, children: "Day of month" }), jsxs("div", { className: styles$h.fieldRow, children: [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" }), jsx(Checkbox, { checked: state.monthlyLast, onChange: v => update({ monthlyLast: v }), label: "Last day" })] })] })), state.freq === 'YEARLY' && (jsxs(Fragment, { children: [jsx("div", { className: styles$h.field, children: jsx(SelectInput, { label: "Month", value: String(state.byMonth), onChange: v => update({ byMonth: Number(v) }), options: MONTHS$1.map((m, i) => ({
|
|
3044
3044
|
value: String(i + 1),
|
|
3045
3045
|
label: m,
|
|
3046
|
-
})) }) }), jsxs("div", { className: styles$
|
|
3046
|
+
})) }) }), jsxs("div", { className: styles$h.field, children: [jsx("span", { className: styles$h.fieldLabel, children: "Day" }), jsx(NumberStepper, { value: state.yearDay, onChange: v => update({ yearDay: Math.min(31, Math.max(1, v)) }), min: 1, max: 31, hideLimits: true, size: "small" })] })] })), jsx("div", { className: styles$h.preview, children: preview })] }));
|
|
3047
3047
|
};
|
|
3048
3048
|
|
|
3049
|
-
var styles$
|
|
3049
|
+
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"};
|
|
3050
3050
|
|
|
3051
3051
|
// Known prefixes produced by stream-json summarizers (DAO-style):
|
|
3052
3052
|
// "bash: ls -la", "read: path/to/file", "edit: path/to/file",
|
|
@@ -3112,21 +3112,21 @@ function StreamConsole({ stream, onCancel, onDismiss, hideDismiss = false, runni
|
|
|
3112
3112
|
? successLabel
|
|
3113
3113
|
: errorLabel;
|
|
3114
3114
|
const canShowDismiss = !hideDismiss && (stream.status === 'running' ? !!onCancel : !!onDismiss);
|
|
3115
|
-
return (jsxs(motion.div, { className: styles$
|
|
3115
|
+
return (jsxs(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: [jsxs("header", { className: styles$g.header, children: [jsxs("div", { className: styles$g.headerLeft, children: [jsx("span", { className: styles$g.statusDot, "data-status": stream.status, children: jsx(Icon, { size: 12, className: stream.status === 'running' ? styles$g.spin : '' }) }), jsx("span", { className: styles$g.label, children: stream.label }), jsx("span", { className: styles$g.statusText, children: statusLabel })] }), canShowDismiss && (jsx("button", { type: "button", className: styles$g.dismiss, "aria-label": stream.status === 'running' ? 'Cancel' : 'Dismiss', onClick: () => {
|
|
3116
3116
|
if (stream.status === 'running')
|
|
3117
3117
|
onCancel?.(stream.id);
|
|
3118
3118
|
else
|
|
3119
3119
|
onDismiss?.(stream.id);
|
|
3120
|
-
}, children: jsx(X, { size: 14 }) }))] }), jsxs("div", { className: styles$
|
|
3120
|
+
}, children: jsx(X, { size: 14 }) }))] }), jsxs("div", { className: styles$g.body, ref: listRef, children: [stream.events.length === 0 && stream.status === 'running' && (jsx("p", { className: styles$g.hint, children: "Waiting for output\u2026" })), stream.events.map((event, i) => {
|
|
3121
3121
|
const step = event.type === 'step' ? parseStep(event.message) : null;
|
|
3122
3122
|
const StepIcon = step?.subtype ? STEP_ICON[step.subtype] : null;
|
|
3123
|
-
return (jsxs("p", { className: styles$
|
|
3124
|
-
}), stream.status === 'error' && stream.errorMessage && (jsxs("p", { className: styles$
|
|
3123
|
+
return (jsxs("p", { className: styles$g.line, "data-type": event.type, "data-subtype": step?.subtype ?? undefined, children: [jsx("span", { className: styles$g.linePrefix, children: StepIcon ? (jsx(StepIcon, { size: 11 })) : event.type === 'error' ? ('!') : event.type === 'warning' ? ('⚠') : event.type === 'success' ? ('✓') : ('·') }), step?.label ? (jsx("span", { className: styles$g.lineLabel, children: step.label })) : null, jsx("span", { className: styles$g.lineText, children: step ? step.body : event.message })] }, i));
|
|
3124
|
+
}), stream.status === 'error' && stream.errorMessage && (jsxs("p", { className: styles$g.line, "data-type": "error", children: [jsx("span", { className: styles$g.linePrefix, children: "!" }), jsx("span", { className: styles$g.lineText, children: stream.errorMessage })] }))] })] }));
|
|
3125
3125
|
}
|
|
3126
3126
|
|
|
3127
|
-
var styles$
|
|
3127
|
+
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"};
|
|
3128
3128
|
|
|
3129
|
-
var styles$
|
|
3129
|
+
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"};
|
|
3130
3130
|
|
|
3131
3131
|
const SWIPE_DELETE_THRESHOLD = -80;
|
|
3132
3132
|
const DayEventCard = ({ event, color, textColor, onComplete, onEdit, onDelete, onDragEnd, draggable = true, }) => {
|
|
@@ -3188,9 +3188,9 @@ const DayEventCard = ({ event, color, textColor, onComplete, onEdit, onDelete, o
|
|
|
3188
3188
|
};
|
|
3189
3189
|
const canSwipe = !!onDelete;
|
|
3190
3190
|
const showGrip = draggable && !!onDragEnd;
|
|
3191
|
-
return (jsxs("div", { className: styles$
|
|
3191
|
+
return (jsxs("div", { className: styles$e.wrapper, children: [canSwipe && (jsxs(motion.div, { className: styles$e.deleteUnderlay, style: { opacity: deleteOpacity }, children: [jsx(Trash2, { size: 16 }), jsx("span", { children: "Delete" })] })), jsxs(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: () => {
|
|
3192
3192
|
didSwipe.current = true;
|
|
3193
|
-
}, onDragEnd: handleSwipeEnd, whileTap: verticalDragging ? undefined : { scale: 0.98 }, animate: verticalDragging ? { scale: 1.03 } : { scale: 1 }, onClick: handleCardClick, children: [showGrip && (jsx("div", { className: styles$
|
|
3193
|
+
}, onDragEnd: handleSwipeEnd, whileTap: verticalDragging ? undefined : { scale: 0.98 }, animate: verticalDragging ? { scale: 1.03 } : { scale: 1 }, onClick: handleCardClick, children: [showGrip && (jsx("div", { className: styles$e.grip, onPointerDown: handleGripPointerDown, onPointerMove: handleGripPointerMove, onPointerUp: handleGripPointerUp, onPointerCancel: handleGripPointerUp, onClick: (e) => e.stopPropagation(), children: jsx(GripVertical, { size: 14 }) })), completed && jsx(Check, { size: 14, className: styles$e.checkIcon, strokeWidth: 3 }), jsx("span", { className: styles$e.text, children: event.title }), event.time && jsx("span", { className: styles$e.time, children: event.time }), onEdit && (jsx("button", { className: styles$e.editButton, onClick: (e) => {
|
|
3194
3194
|
e.stopPropagation();
|
|
3195
3195
|
onEdit(event);
|
|
3196
3196
|
}, "aria-label": "Edit event", children: jsx(Pencil, { size: 13 }) }))] })] }));
|
|
@@ -3614,15 +3614,15 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3614
3614
|
return Math.floor(diff / oneWeek) + 1;
|
|
3615
3615
|
};
|
|
3616
3616
|
if (loading) {
|
|
3617
|
-
return (jsx("div", { className: `${styles$
|
|
3617
|
+
return (jsx("div", { className: `${styles$f.calendar} ${styles$f.loading} ${className}`, style: style, children: jsx("div", { className: styles$f.loadingSpinner, children: "Loading..." }) }));
|
|
3618
3618
|
}
|
|
3619
|
-
return (jsxs("div", { className: `${styles$
|
|
3619
|
+
return (jsxs("div", { className: `${styles$f.calendar} ${compact ? styles$f.compact : ''} ${className}`, style: style, children: [!hideHeader && (jsxs("div", { className: styles$f.header, children: [jsxs("div", { className: styles$f.navigation, children: [jsx("button", { onClick: handlePrevious, className: styles$f.navButton, "aria-label": "Previous", children: jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: jsx("polyline", { points: "15,18 9,12 15,6" }) }) }), jsx("h3", { className: styles$f.title, children: calendarData.displayTitle }), jsx("button", { onClick: handleNext, className: styles$f.navButton, "aria-label": "Next", children: jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: jsx("polyline", { points: "9,6 15,12 9,18" }) }) })] }), categories && categories.length > 0 && (jsxs("div", { className: styles$f.filterBar, role: "tablist", "aria-label": "Filter by category", children: [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 => {
|
|
3620
3620
|
const active = activeCategoryId === cat.id;
|
|
3621
|
-
return (jsxs("button", { type: "button", role: "tab", "aria-selected": active, className: `${styles$
|
|
3622
|
-
})] })), jsxs("div", { className: styles$
|
|
3621
|
+
return (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 && (jsx("span", { className: styles$f.filterDot, style: { background: cat.color } })), cat.label] }, cat.id));
|
|
3622
|
+
})] })), jsxs("div", { className: styles$f.controls, children: [exportFormats && exportFormats.length > 0 && (jsxs("div", { className: styles$f.exportDropdown, ref: exportRef, children: [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: jsx(Download, { size: 16 }) }), exportOpen && (jsx("div", { className: styles$f.exportMenu, role: "menu", children: exportFormats.map(format => (jsx("button", { type: "button", role: "menuitem", className: styles$f.exportMenuItem, onClick: () => {
|
|
3623
3623
|
downloadEvents(filteredEvents, format);
|
|
3624
3624
|
setExportOpen(false);
|
|
3625
|
-
}, children: format.toUpperCase() }, format))) }))] })), (currentViewMode === 'day' || currentViewMode === 'week') && (jsx("button", { type: "button", className: styles$
|
|
3625
|
+
}, children: format.toUpperCase() }, format))) }))] })), (currentViewMode === 'day' || currentViewMode === 'week') && (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 ? jsx(Sun, { size: 16 }) : jsx(Moon, { size: 16 }) })), jsx("button", { onClick: handleToday, className: styles$f.todayButton, children: "Today" }), jsxs("div", { className: styles$f.viewToggle, children: [jsx("button", { className: `${styles$f.viewButton} ${currentViewMode === 'month' ? styles$f.active : ''}`, onClick: () => setCurrentViewMode('month'), children: "Month" }), jsx("button", { className: `${styles$f.viewButton} ${currentViewMode === 'week' ? styles$f.active : ''}`, onClick: () => setCurrentViewMode('week'), children: "Week" }), jsx("button", { className: `${styles$f.viewButton} ${currentViewMode === 'day' ? styles$f.active : ''}`, onClick: () => setCurrentViewMode('day'), children: "Day" })] })] })] })), currentViewMode === 'month' && (jsxs("div", { className: `${styles$f.weekDays} ${showWeekNumbers ? styles$f.withWeekNumbers : ''}`, children: [showWeekNumbers && jsx("div", { className: styles$f.weekNumberHeader, children: "Wk" }), finalDayLabels.map((day) => (jsx("div", { className: styles$f.weekDay, children: day }, day)))] })), currentViewMode === 'day' ? (
|
|
3626
3626
|
// Day view layout — positioned events with duration, all-day strip, now-line
|
|
3627
3627
|
(() => {
|
|
3628
3628
|
const dayEvents = getDayEvents(currentDate);
|
|
@@ -3657,7 +3657,7 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3657
3657
|
const handleEventDragEnd = (event, clientY) => {
|
|
3658
3658
|
if (!onEventDrop)
|
|
3659
3659
|
return;
|
|
3660
|
-
const gridEl = dayViewScrollRef.current?.querySelector(`.${styles$
|
|
3660
|
+
const gridEl = dayViewScrollRef.current?.querySelector(`.${styles$f.dayTimelineGrid}`);
|
|
3661
3661
|
if (!gridEl)
|
|
3662
3662
|
return;
|
|
3663
3663
|
const rect = gridEl.getBoundingClientRect();
|
|
@@ -3672,7 +3672,7 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3672
3672
|
newDate.setHours(newHour, newMinute, 0, 0);
|
|
3673
3673
|
onEventDrop(event, newDate);
|
|
3674
3674
|
};
|
|
3675
|
-
return (jsxs("div", { className: styles$
|
|
3675
|
+
return (jsxs("div", { className: styles$f.dayView, children: [jsxs("div", { className: styles$f.dayViewHeader, children: [jsx("div", { className: styles$f.timeColumnHeader }), jsx("div", { className: styles$f.dayColumnHeader, children: currentDate.toLocaleDateString(locale, { weekday: 'short', day: 'numeric' }) })] }), allDayEvents.length > 0 && (jsxs("div", { className: styles$f.allDayStrip, children: [jsx("span", { className: styles$f.allDayLabel, children: "All day" }), jsx("div", { className: styles$f.allDayList, children: allDayEvents.map(event => (jsx(DayEventCard, { event: event, color: getEventColor(event), textColor: getEventTextColor(event), onComplete: onEventComplete ?? (onEventClick ? handleEventClick : undefined), onEdit: onEventEdit, onDelete: onEventDelete, draggable: false }, event.id))) })] })), jsx("div", { className: styles$f.dayViewScrollContainer, ref: dayViewScrollRef, children: jsxs("div", { className: styles$f.dayTimelineGrid, style: { height: timelineHeight }, children: [hours.map(hour => (jsxs("div", { className: styles$f.hourRow, style: { height: hourHeight }, children: [jsxs("span", { className: styles$f.hourLabel, children: [hour.toString().padStart(2, '0'), ":00"] }), jsx("div", { className: styles$f.hourSlots, children: halfHourSlots ? (jsxs(Fragment, { children: [jsx("div", { className: styles$f.halfHourSlot, onClick: () => handleSlotClick(hour, 0) }), jsx("div", { className: `${styles$f.halfHourSlot} ${styles$f.halfHourSlotBottom}`, onClick: () => handleSlotClick(hour, 30) })] })) : (jsx("div", { className: styles$f.halfHourSlot, onClick: () => handleSlotClick(hour, 0) })) })] }, hour))), scheduled.map((event) => {
|
|
3676
3676
|
const [h, m] = event.time.split(':').map(Number);
|
|
3677
3677
|
const top = (h - startHour) * hourHeight + (m / 60) * hourHeight;
|
|
3678
3678
|
const duration = eventDuration(event);
|
|
@@ -3680,13 +3680,13 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3680
3680
|
const lane = dayLayout.get(event.id);
|
|
3681
3681
|
const totalCols = lane?.totalCols ?? 1;
|
|
3682
3682
|
const col = lane?.col ?? 0;
|
|
3683
|
-
return (jsx("div", { className: styles$
|
|
3683
|
+
return (jsx("div", { className: styles$f.dayEventAnchor, style: {
|
|
3684
3684
|
top,
|
|
3685
3685
|
height,
|
|
3686
3686
|
'--lane-col': col,
|
|
3687
3687
|
'--lane-total': totalCols,
|
|
3688
3688
|
}, onClick: (e) => e.stopPropagation(), children: 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));
|
|
3689
|
-
}), showNow && (jsx("div", { className: styles$
|
|
3689
|
+
}), showNow && (jsx("div", { className: styles$f.currentTimeIndicator, style: { top: `${nowOffset}px` } }))] }) })] }));
|
|
3690
3690
|
})()) : currentViewMode === 'week' ? (
|
|
3691
3691
|
// Week view layout — 7 side-by-side day timelines. Drag events across
|
|
3692
3692
|
// columns to reschedule to a different day + hour in one gesture.
|
|
@@ -3720,7 +3720,7 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3720
3720
|
const handleWeekDragEnd = (event, clientY, clientX) => {
|
|
3721
3721
|
if (!onEventDrop)
|
|
3722
3722
|
return;
|
|
3723
|
-
const gridEl = weekViewScrollRef.current?.querySelector(`.${styles$
|
|
3723
|
+
const gridEl = weekViewScrollRef.current?.querySelector(`.${styles$f.weekDayColumns}`);
|
|
3724
3724
|
if (!gridEl)
|
|
3725
3725
|
return;
|
|
3726
3726
|
const rect = gridEl.getBoundingClientRect();
|
|
@@ -3738,15 +3738,15 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3738
3738
|
newDate.setHours(newHour, newMinute, 0, 0);
|
|
3739
3739
|
onEventDrop(event, newDate);
|
|
3740
3740
|
};
|
|
3741
|
-
return (jsxs("div", { className: styles$
|
|
3741
|
+
return (jsxs("div", { className: styles$f.weekTimeline, children: [jsxs("div", { className: styles$f.weekTimelineHeader, children: [jsx("div", { className: styles$f.timeColumnHeader }), days.map(day => {
|
|
3742
3742
|
const dayIsToday = day.toDateString() === now.toDateString();
|
|
3743
3743
|
const dayIsSelected = selectedDate && day.toDateString() === selectedDate.toDateString();
|
|
3744
|
-
return (jsxs("button", { type: "button", className: `${styles$
|
|
3745
|
-
})] }), jsx("div", { className: styles$
|
|
3744
|
+
return (jsxs("button", { type: "button", className: `${styles$f.weekDayColumnHeader} ${dayIsToday ? styles$f.today : ''} ${dayIsSelected ? styles$f.selected : ''}`, onClick: () => handleDateClick(day), children: [jsx("span", { className: styles$f.weekDayLabel, children: day.toLocaleDateString(locale, { weekday: 'short' }) }), jsx("span", { className: styles$f.weekDayNumber, children: day.getDate() })] }, day.toISOString()));
|
|
3745
|
+
})] }), jsx("div", { className: styles$f.weekTimelineScroll, ref: weekViewScrollRef, children: jsxs("div", { className: styles$f.weekTimelineGrid, style: { height: timelineHeight }, children: [jsx("div", { className: styles$f.weekTimeColumn, children: hours.map(hour => (jsx("div", { className: styles$f.weekTimeSlot, style: { height: hourHeight }, children: jsxs("span", { className: styles$f.weekHourLabel, children: [hour.toString().padStart(2, '0'), ":00"] }) }, hour))) }), jsx("div", { className: styles$f.weekDayColumns, children: days.map(day => {
|
|
3746
3746
|
const dayEvents = getDayEvents(day).filter(e => !e.allDay && e.time);
|
|
3747
3747
|
const dayIsToday = day.toDateString() === now.toDateString();
|
|
3748
3748
|
const dayLayout = layoutOverlappingEvents(dayEvents);
|
|
3749
|
-
return (jsxs("div", { className: styles$
|
|
3749
|
+
return (jsxs("div", { className: styles$f.weekDayColumn, children: [hours.map(hour => (jsx("div", { className: styles$f.weekHourRow, style: { height: hourHeight }, children: halfHourSlots ? (jsxs(Fragment, { children: [jsx("div", { className: styles$f.halfHourSlot, onClick: () => handleWeekSlotClick(day, hour, 0) }), jsx("div", { className: `${styles$f.halfHourSlot} ${styles$f.halfHourSlotBottom}`, onClick: () => handleWeekSlotClick(day, hour, 30) })] })) : (jsx("div", { className: styles$f.halfHourSlot, onClick: () => handleWeekSlotClick(day, hour, 0) })) }, hour))), dayEvents.map(event => {
|
|
3750
3750
|
const [h, m] = event.time.split(':').map(Number);
|
|
3751
3751
|
const top = (h - startHour) * hourHeight + (m / 60) * hourHeight;
|
|
3752
3752
|
const duration = eventDuration(event);
|
|
@@ -3754,34 +3754,34 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3754
3754
|
const lane = dayLayout.get(event.id);
|
|
3755
3755
|
const totalCols = lane?.totalCols ?? 1;
|
|
3756
3756
|
const col = lane?.col ?? 0;
|
|
3757
|
-
return (jsx("div", { className: styles$
|
|
3757
|
+
return (jsx("div", { className: styles$f.weekEventAnchor, style: {
|
|
3758
3758
|
top,
|
|
3759
3759
|
height,
|
|
3760
3760
|
'--lane-col': col,
|
|
3761
3761
|
'--lane-total': totalCols,
|
|
3762
3762
|
}, onClick: (e) => e.stopPropagation(), children: 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));
|
|
3763
|
-
}), dayIsToday && showNow && (jsx("div", { className: styles$
|
|
3763
|
+
}), dayIsToday && showNow && (jsx("div", { className: styles$f.currentTimeIndicator, style: { top: `${nowOffset}px`, left: 0 } }))] }, day.toISOString()));
|
|
3764
3764
|
}) })] }) })] }));
|
|
3765
3765
|
})()) : ((() => {
|
|
3766
3766
|
// Fixed month-view cell height derived from maxEventsPerDay.
|
|
3767
3767
|
// Day number + padding ≈ 40px, each event row ≈ 24px.
|
|
3768
3768
|
// Week and compact views keep their own CSS-driven sizing.
|
|
3769
3769
|
const monthCellHeight = !compact ? 40 + maxEventsPerDay * 24 : undefined;
|
|
3770
|
-
return (jsx("div", { className: `${styles$
|
|
3770
|
+
return (jsx("div", { className: `${styles$f.daysGrid} ${showWeekNumbers ? styles$f.withWeekNumbers : ''}`, children: calendarData.days.map((day, index) => {
|
|
3771
3771
|
const dayEvents = getDayEvents(day);
|
|
3772
3772
|
const dayIsToday = isToday(day);
|
|
3773
3773
|
const isInCurrentMonth = isCurrentMonth(day);
|
|
3774
3774
|
const isWeekStart = showWeekNumbers && (index % 7 === 0);
|
|
3775
3775
|
const dayIsSelected = selectedDate && day.toDateString() === selectedDate.toDateString();
|
|
3776
|
-
return (jsxs(Fragment$1, { children: [isWeekStart && (jsx("div", { className: styles$
|
|
3776
|
+
return (jsxs(Fragment$1, { children: [isWeekStart && (jsx("div", { className: styles$f.weekNumberCell, style: monthCellHeight !== undefined ? { height: monthCellHeight, minHeight: monthCellHeight } : undefined, children: getWeekNumber(day) })), jsxs(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: {
|
|
3777
3777
|
duration: 0.3,
|
|
3778
3778
|
delay: index * 0.02,
|
|
3779
3779
|
ease: "easeOut"
|
|
3780
|
-
}, onClick: () => handleDateClick(day), children: [jsx("div", { className: styles$
|
|
3780
|
+
}, onClick: () => handleDateClick(day), children: [jsx("div", { className: styles$f.dayNumber, children: day.getDate() }), dayEvents.length > 0 && compact && currentViewMode === 'month' ? (jsxs("div", { className: styles$f.dots, children: [dayEvents.slice(0, maxEventsPerDay).map((event) => (jsx("span", { className: styles$f.dot, style: {
|
|
3781
3781
|
backgroundColor: event.status === 'completed'
|
|
3782
3782
|
? '#047857'
|
|
3783
3783
|
: getEventColor(event),
|
|
3784
|
-
} }, event.id))), dayEvents.length > maxEventsPerDay && (jsxs("span", { className: styles$
|
|
3784
|
+
} }, event.id))), dayEvents.length > maxEventsPerDay && (jsxs("span", { className: styles$f.dotMore, children: ["+", dayEvents.length - maxEventsPerDay] }))] })) : dayEvents.length > 0 ? (jsxs("div", { className: styles$f.events, children: [dayEvents.slice(0, maxEventsPerDay).map((event, eventIndex) => (jsxs(motion.div, { className: `${styles$f.event} ${event.status === 'completed' ? styles$f.completed : ''}`, style: {
|
|
3785
3785
|
backgroundColor: getEventColor(event),
|
|
3786
3786
|
color: getEventTextColor(event),
|
|
3787
3787
|
opacity: event.status === 'completed' ? 0.7 : 1
|
|
@@ -3799,7 +3799,7 @@ function Calendar({ events, onEventClick, onDateClick, onEventClickByView, onDat
|
|
|
3799
3799
|
}, whileTap: {
|
|
3800
3800
|
scale: 0.98,
|
|
3801
3801
|
transition: { duration: 0.1 }
|
|
3802
|
-
}, children: [iconRenderer && iconRenderer(event), jsxs("span", { className: styles$
|
|
3802
|
+
}, children: [iconRenderer && iconRenderer(event), jsxs("span", { className: styles$f.eventTitle, children: [event.time && (jsx("span", { className: styles$f.eventTime, children: event.time })), event.title] }), event.status === 'completed' && (jsx("svg", { className: styles$f.completedIcon, width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", children: jsx("polyline", { points: "20,6 9,17 4,12" }) }))] }, event.id))), dayEvents.length > maxEventsPerDay && (jsxs("div", { className: styles$f.moreEvents, children: ["+", dayEvents.length - maxEventsPerDay, " more"] }))] })) : emptyState ? (jsx("div", { className: styles$f.emptyState, children: emptyState })) : null] })] }, `${day.getFullYear()}-${day.getMonth()}-${day.getDate()}`));
|
|
3803
3803
|
}) }));
|
|
3804
3804
|
})())] }));
|
|
3805
3805
|
}
|
|
@@ -3936,7 +3936,7 @@ const Navbar = ({ items, logo, onItemClick, variant = 'sidebar', isMobile = fals
|
|
|
3936
3936
|
return (jsx(Fragment, { children: jsx(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 }) }));
|
|
3937
3937
|
};
|
|
3938
3938
|
|
|
3939
|
-
var styles$
|
|
3939
|
+
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"};
|
|
3940
3940
|
|
|
3941
3941
|
const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
3942
3942
|
const svgRef = useRef(null);
|
|
@@ -3987,8 +3987,8 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
3987
3987
|
.attr('id', gradientId)
|
|
3988
3988
|
.attr('x1', '0%').attr('y1', '0%')
|
|
3989
3989
|
.attr('x2', '0%').attr('y2', '100%');
|
|
3990
|
-
gradient.append('stop').attr('offset', '0%').attr('class', styles$
|
|
3991
|
-
gradient.append('stop').attr('offset', '100%').attr('class', styles$
|
|
3990
|
+
gradient.append('stop').attr('offset', '0%').attr('class', styles$d.areaStopTop);
|
|
3991
|
+
gradient.append('stop').attr('offset', '100%').attr('class', styles$d.areaStopBottom);
|
|
3992
3992
|
const g = svg.append('g')
|
|
3993
3993
|
.attr('transform', `translate(${margin.left},${margin.top})`);
|
|
3994
3994
|
const extentDates = d3.extent(processedData, d => d.date);
|
|
@@ -4013,7 +4013,7 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4013
4013
|
g.selectAll('.grid-line-y')
|
|
4014
4014
|
.data(yScale.ticks(5))
|
|
4015
4015
|
.enter().append('line')
|
|
4016
|
-
.attr('class', styles$
|
|
4016
|
+
.attr('class', styles$d.gridLine)
|
|
4017
4017
|
.attr('x1', 0)
|
|
4018
4018
|
.attr('y1', d => yScale(d))
|
|
4019
4019
|
.attr('x2', chartWidth)
|
|
@@ -4025,7 +4025,7 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4025
4025
|
.style('opacity', 1);
|
|
4026
4026
|
// Axes (fade in)
|
|
4027
4027
|
g.append('g')
|
|
4028
|
-
.attr('class', styles$
|
|
4028
|
+
.attr('class', styles$d.xAxis)
|
|
4029
4029
|
.attr('transform', `translate(0,${chartHeight})`)
|
|
4030
4030
|
.style('opacity', 0)
|
|
4031
4031
|
.call(d3.axisBottom(xScale)
|
|
@@ -4035,7 +4035,7 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4035
4035
|
.delay(100)
|
|
4036
4036
|
.style('opacity', 1);
|
|
4037
4037
|
g.append('g')
|
|
4038
|
-
.attr('class', styles$
|
|
4038
|
+
.attr('class', styles$d.yAxis)
|
|
4039
4039
|
.style('opacity', 0)
|
|
4040
4040
|
.call(d3.axisLeft(yScale))
|
|
4041
4041
|
.transition()
|
|
@@ -4045,14 +4045,14 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4045
4045
|
// Area fill (fades in after line draws past it)
|
|
4046
4046
|
const areaPath = g.append('path')
|
|
4047
4047
|
.datum(processedData)
|
|
4048
|
-
.attr('class', styles$
|
|
4048
|
+
.attr('class', styles$d.area)
|
|
4049
4049
|
.attr('fill', `url(#${gradientId})`)
|
|
4050
4050
|
.attr('d', area)
|
|
4051
4051
|
.style('opacity', 0);
|
|
4052
4052
|
// Line (draw-in animation via stroke-dasharray)
|
|
4053
4053
|
const linePath = g.append('path')
|
|
4054
4054
|
.datum(processedData)
|
|
4055
|
-
.attr('class', styles$
|
|
4055
|
+
.attr('class', styles$d.line)
|
|
4056
4056
|
.attr('d', line);
|
|
4057
4057
|
const lineNode = linePath.node();
|
|
4058
4058
|
const totalLength = lineNode && typeof lineNode.getTotalLength === 'function'
|
|
@@ -4079,14 +4079,14 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4079
4079
|
.style('opacity', 1);
|
|
4080
4080
|
// Crosshair (vertical guide on hover)
|
|
4081
4081
|
const crosshair = g.append('line')
|
|
4082
|
-
.attr('class', styles$
|
|
4082
|
+
.attr('class', styles$d.crosshair)
|
|
4083
4083
|
.attr('y1', 0)
|
|
4084
4084
|
.attr('y2', chartHeight)
|
|
4085
4085
|
.style('opacity', 0)
|
|
4086
4086
|
.style('pointer-events', 'none');
|
|
4087
4087
|
// Pulsing halo behind active point
|
|
4088
4088
|
const halo = g.append('circle')
|
|
4089
|
-
.attr('class', styles$
|
|
4089
|
+
.attr('class', styles$d.halo)
|
|
4090
4090
|
.attr('r', 0)
|
|
4091
4091
|
.style('opacity', 0)
|
|
4092
4092
|
.style('pointer-events', 'none');
|
|
@@ -4097,7 +4097,7 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4097
4097
|
const pointSel = g.selectAll('.mood-circle')
|
|
4098
4098
|
.data(processedData)
|
|
4099
4099
|
.enter().append('circle')
|
|
4100
|
-
.attr('class', styles$
|
|
4100
|
+
.attr('class', styles$d.dataPoint)
|
|
4101
4101
|
.attr('cx', d => xScale(d.date))
|
|
4102
4102
|
.attr('cy', d => yScale(d.rating))
|
|
4103
4103
|
.attr('r', 0)
|
|
@@ -4204,7 +4204,7 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4204
4204
|
// Overlay captures mouse for nearest-point lookup (rendered last so it sits on top)
|
|
4205
4205
|
const bisect = d3.bisector(d => d.date).center;
|
|
4206
4206
|
g.append('rect')
|
|
4207
|
-
.attr('class', styles$
|
|
4207
|
+
.attr('class', styles$d.overlay)
|
|
4208
4208
|
.attr('width', chartWidth)
|
|
4209
4209
|
.attr('height', chartHeight)
|
|
4210
4210
|
.on('mousemove', function (event) {
|
|
@@ -4227,7 +4227,7 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4227
4227
|
setSelectedMood(null);
|
|
4228
4228
|
};
|
|
4229
4229
|
}, []);
|
|
4230
|
-
return (jsxs("div", { className: styles$
|
|
4230
|
+
return (jsxs("div", { className: styles$d.container, ref: containerRef, children: [jsx("svg", { ref: svgRef, width: width, height: height, className: styles$d.chart }), selectedMood && (jsxs("div", { ref: tooltipRef, className: styles$d.tooltip, style: {
|
|
4231
4231
|
position: 'absolute',
|
|
4232
4232
|
pointerEvents: 'auto',
|
|
4233
4233
|
left: tooltipPosition.x,
|
|
@@ -4236,10 +4236,10 @@ const MoodChart = ({ moodData, width = 800, height = 400 }) => {
|
|
|
4236
4236
|
}, onMouseEnter: () => setIsHoveringTooltip(true), onMouseLeave: () => {
|
|
4237
4237
|
setIsHoveringTooltip(false);
|
|
4238
4238
|
setSelectedMood(null);
|
|
4239
|
-
}, children: [jsxs("div", { className: styles$
|
|
4239
|
+
}, children: [jsxs("div", { className: styles$d.tooltipHeader, children: [jsx("div", { className: styles$d.tooltipDate, children: selectedMood.date.toLocaleDateString() }), jsxs("div", { className: styles$d.tooltipRating, children: [jsx("span", { className: styles$d.ratingValue, children: selectedMood.rating }), jsx("span", { className: styles$d.ratingMax, children: "/10" })] })] }), selectedMood.tags.length > 0 && (jsx("div", { className: styles$d.tooltipTags, children: selectedMood.tags.map((tag, index) => (jsx("span", { className: styles$d.tag, children: tag }, index))) })), selectedMood.comment && (jsx("div", { className: styles$d.tooltipComment, children: selectedMood.comment }))] }))] }));
|
|
4240
4240
|
};
|
|
4241
4241
|
|
|
4242
|
-
var styles$
|
|
4242
|
+
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"};
|
|
4243
4243
|
|
|
4244
4244
|
const DEFAULT_HABIT_COLORS$1 = {
|
|
4245
4245
|
'Exercise': '#6BCB77',
|
|
@@ -4417,10 +4417,14 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4417
4417
|
const axesGroup = ensureGroup('qhc-axes');
|
|
4418
4418
|
const uiGroup = ensureGroup('qhc-ui');
|
|
4419
4419
|
const dates = aggregateData.dates.map(d => new Date(d));
|
|
4420
|
+
// activeHabits can briefly hold stale keys when the parent swaps `data`
|
|
4421
|
+
// for a row with a different habit set — filter out anything missing from
|
|
4422
|
+
// the current aggregateData so we never index into undefined.
|
|
4423
|
+
const renderableHabits = activeHabits.filter(h => Array.isArray(aggregateData[h]));
|
|
4420
4424
|
const xScale = d3.scaleTime()
|
|
4421
4425
|
.domain(d3.extent(dates))
|
|
4422
4426
|
.range([0, chartWidth]);
|
|
4423
|
-
const maxValue = Math.max(1, ...
|
|
4427
|
+
const maxValue = Math.max(1, ...renderableHabits.flatMap(habit => aggregateData[habit].filter(v => typeof v === 'number')));
|
|
4424
4428
|
const yScale = d3.scaleLinear()
|
|
4425
4429
|
.domain([0, maxValue * 1.1])
|
|
4426
4430
|
.range([chartHeight, 0]);
|
|
@@ -4433,7 +4437,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4433
4437
|
.data(yScale.ticks(5), d => String(d));
|
|
4434
4438
|
gridSel.exit().remove();
|
|
4435
4439
|
const gridEnter = gridSel.enter().append('line')
|
|
4436
|
-
.attr('class', `${styles$
|
|
4440
|
+
.attr('class', `${styles$c.gridLine} qhc-grid-line`)
|
|
4437
4441
|
.style('opacity', 0);
|
|
4438
4442
|
gridEnter.merge(gridSel)
|
|
4439
4443
|
.attr('x1', 0)
|
|
@@ -4489,7 +4493,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4489
4493
|
}
|
|
4490
4494
|
let xAxis = axesGroup.select('g.qhc-x-axis');
|
|
4491
4495
|
if (xAxis.empty()) {
|
|
4492
|
-
xAxis = axesGroup.append('g').attr('class', `${styles$
|
|
4496
|
+
xAxis = axesGroup.append('g').attr('class', `${styles$c.xAxis} qhc-x-axis`);
|
|
4493
4497
|
}
|
|
4494
4498
|
xAxis.attr('transform', `translate(0,${chartHeight})`).call(xAxisGenerator);
|
|
4495
4499
|
xAxis.selectAll('text')
|
|
@@ -4499,7 +4503,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4499
4503
|
.attr('transform', viewType === 'daily' || viewType === 'weekly' ? 'rotate(-45)' : null);
|
|
4500
4504
|
let yAxis = axesGroup.select('g.qhc-y-axis');
|
|
4501
4505
|
if (yAxis.empty()) {
|
|
4502
|
-
yAxis = axesGroup.append('g').attr('class', `${styles$
|
|
4506
|
+
yAxis = axesGroup.append('g').attr('class', `${styles$c.yAxis} qhc-y-axis`);
|
|
4503
4507
|
}
|
|
4504
4508
|
yAxis.call(d3.axisLeft(yScale));
|
|
4505
4509
|
if (isFirstRender) {
|
|
@@ -4507,7 +4511,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4507
4511
|
yAxis.style('opacity', 0).transition().duration(500).delay(80).style('opacity', 1);
|
|
4508
4512
|
}
|
|
4509
4513
|
// -------- Lines (data join, morph on update) --------
|
|
4510
|
-
const lineData =
|
|
4514
|
+
const lineData = renderableHabits.map(habit => {
|
|
4511
4515
|
const points = dates
|
|
4512
4516
|
.map((date, i) => [date, aggregateData[habit][i]])
|
|
4513
4517
|
.filter(d => typeof d[1] === 'number');
|
|
@@ -4521,7 +4525,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4521
4525
|
.style('opacity', 0)
|
|
4522
4526
|
.remove();
|
|
4523
4527
|
const lineEnter = lineSel.enter().append('path')
|
|
4524
|
-
.attr('class', `${styles$
|
|
4528
|
+
.attr('class', `${styles$c.line} qhc-line`)
|
|
4525
4529
|
.attr('data-habit', d => d.habit)
|
|
4526
4530
|
.attr('fill', 'none')
|
|
4527
4531
|
.attr('stroke', d => d.color)
|
|
@@ -4561,7 +4565,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4561
4565
|
// Hide them during line morph, then spring up from baseline.
|
|
4562
4566
|
pointsGroup.selectAll('*').remove();
|
|
4563
4567
|
const allPoints = [];
|
|
4564
|
-
|
|
4568
|
+
renderableHabits.forEach(habit => {
|
|
4565
4569
|
const color = getColor(habit);
|
|
4566
4570
|
dates.forEach((date, i) => {
|
|
4567
4571
|
const v = aggregateData[habit][i];
|
|
@@ -4578,7 +4582,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4578
4582
|
pointsGroup.selectAll('circle.qhc-point')
|
|
4579
4583
|
.data(allPoints)
|
|
4580
4584
|
.enter().append('circle')
|
|
4581
|
-
.attr('class', `${styles$
|
|
4585
|
+
.attr('class', `${styles$c.dataPoint} qhc-point`)
|
|
4582
4586
|
.attr('data-habit', d => d.habit)
|
|
4583
4587
|
.attr('cx', d => xScale(d.date))
|
|
4584
4588
|
.attr('cy', chartHeight)
|
|
@@ -4595,13 +4599,13 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4595
4599
|
// -------- UI layer (crosshair, halo, overlay) --------
|
|
4596
4600
|
uiGroup.selectAll('*').remove();
|
|
4597
4601
|
const crosshair = uiGroup.append('line')
|
|
4598
|
-
.attr('class', styles$
|
|
4602
|
+
.attr('class', styles$c.crosshair)
|
|
4599
4603
|
.attr('y1', 0)
|
|
4600
4604
|
.attr('y2', chartHeight)
|
|
4601
4605
|
.style('opacity', 0)
|
|
4602
4606
|
.style('pointer-events', 'none');
|
|
4603
4607
|
const halo = uiGroup.append('circle')
|
|
4604
|
-
.attr('class', styles$
|
|
4608
|
+
.attr('class', styles$c.halo)
|
|
4605
4609
|
.attr('r', 0)
|
|
4606
4610
|
.style('opacity', 0)
|
|
4607
4611
|
.style('pointer-events', 'none');
|
|
@@ -4673,7 +4677,7 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4673
4677
|
setTooltipData(null);
|
|
4674
4678
|
};
|
|
4675
4679
|
uiGroup.append('rect')
|
|
4676
|
-
.attr('class', styles$
|
|
4680
|
+
.attr('class', styles$c.overlay)
|
|
4677
4681
|
.attr('width', chartWidth)
|
|
4678
4682
|
.attr('height', chartHeight)
|
|
4679
4683
|
.on('mousemove', function (event) {
|
|
@@ -4763,16 +4767,16 @@ const QuantifiableHabitsChart = ({ data, width = 800, height = 400, defaultViewT
|
|
|
4763
4767
|
quarterly: { Icon: BarChart3, label: 'Quarterly' }
|
|
4764
4768
|
};
|
|
4765
4769
|
const shouldShowAggregationToggle = viewType !== 'daily';
|
|
4766
|
-
return (jsxs("div", { className: styles$
|
|
4770
|
+
return (jsxs("div", { className: styles$c.container, children: [!hideControls && (jsxs("div", { className: styles$c.controls, children: [jsx("div", { className: styles$c.viewToggle, children: availableViewTypes.map(type => {
|
|
4767
4771
|
const { Icon, label } = viewTypeConfig[type];
|
|
4768
|
-
return (jsxs("button", { className: `${styles$
|
|
4769
|
-
}) }), shouldShowAggregationToggle && (jsxs("div", { className: styles$
|
|
4772
|
+
return (jsxs("button", { className: `${styles$c.viewButton} ${viewType === type ? styles$c.active : ''}`, onClick: () => setViewType(type), title: label, children: [jsx("span", { className: styles$c.viewIcon, children: jsx(Icon, { size: 16 }) }), jsx("span", { className: styles$c.viewLabel, children: label })] }, type));
|
|
4773
|
+
}) }), shouldShowAggregationToggle && (jsxs("div", { className: styles$c.aggregationToggle, children: [jsxs("button", { className: `${styles$c.aggregationButton} ${aggregationMode === 'average' ? styles$c.active : ''}`, onClick: () => setAggregationMode('average'), title: "Show average values for each period", children: [jsx("span", { className: styles$c.aggregationIcon, children: jsx(Divide, { size: 16 }) }), jsx("span", { className: styles$c.aggregationLabel, children: "Average" })] }), jsxs("button", { className: `${styles$c.aggregationButton} ${aggregationMode === 'sum' ? styles$c.active : ''}`, onClick: () => setAggregationMode('sum'), title: "Show total values for each period", children: [jsx("span", { className: styles$c.aggregationIcon, children: jsx(Sigma, { size: 16 }) }), jsx("span", { className: styles$c.aggregationLabel, children: "Sum" })] })] }))] })), jsx("div", { className: `${styles$c.legend}${compactLegend ? ` ${styles$c.compactLegend}` : ''}`, children: habits.map(habit => (jsxs("button", { className: `${styles$c.legendItem} ${!activeHabits.includes(habit) ? styles$c.inactive : ''}`, onClick: () => toggleHabit(habit), onMouseEnter: () => setHoveredHabit(habit), onMouseLeave: () => setHoveredHabit(null), children: [jsx("span", { className: styles$c.legendEmoji, children: customHabitEmojis[habit] || '📊' }), jsx("span", { className: styles$c.legendColor, style: { backgroundColor: getColor(habit) } }), jsx("span", { className: styles$c.legendLabel, children: habit })] }, habit))) }), jsx("svg", { ref: svgRef, viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "xMidYMid meet", className: styles$c.chart }), tooltipData && (jsxs("div", { ref: tooltipRef, className: `${styles$c.tooltip} ${tooltipData ? styles$c.visible : ''}`, style: {
|
|
4770
4774
|
left: `${tooltipData.x}px`,
|
|
4771
4775
|
top: `${tooltipData.y - 80}px`
|
|
4772
|
-
}, children: [jsxs("div", { className: styles$
|
|
4776
|
+
}, children: [jsxs("div", { className: styles$c.tooltipHeader, children: [jsx("span", { className: styles$c.tooltipEmoji, children: customHabitEmojis[tooltipData.habit] || '📊' }), jsx("span", { className: styles$c.tooltipDot, style: { backgroundColor: getColor(tooltipData.habit) } }), jsx("span", { children: tooltipData.habit })] }), jsxs("div", { className: styles$c.tooltipInfo, children: [jsx("div", { className: styles$c.tooltipDate, children: formatTooltipDate(tooltipData.date, viewType) }), jsxs("div", { className: styles$c.tooltipValue, children: [jsx("strong", { children: Math.round(tooltipData.value * 10) / 10 }), jsx("span", { style: { fontSize: '12px', fontWeight: 'normal', opacity: 0.6 }, children: "units" })] })] })] }))] }));
|
|
4773
4777
|
};
|
|
4774
4778
|
|
|
4775
|
-
var styles$
|
|
4779
|
+
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"};
|
|
4776
4780
|
|
|
4777
4781
|
const DEFAULT_HABIT_COLORS = {
|
|
4778
4782
|
Exercise: '#6BCB77',
|
|
@@ -4961,7 +4965,7 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
4961
4965
|
.data([0, 3, 6, 9, 12, 15, 18, 21, 24])
|
|
4962
4966
|
.enter()
|
|
4963
4967
|
.append('line')
|
|
4964
|
-
.attr('class', styles$
|
|
4968
|
+
.attr('class', styles$b.gridLine)
|
|
4965
4969
|
.attr('x1', d => xScale(d))
|
|
4966
4970
|
.attr('x2', d => xScale(d))
|
|
4967
4971
|
.attr('y1', 0)
|
|
@@ -4970,17 +4974,24 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
4970
4974
|
const rowHeight = yScale.bandwidth();
|
|
4971
4975
|
const baseRadius = Math.min(5, Math.max(2, rowHeight / 2));
|
|
4972
4976
|
const maxRadius = baseRadius * 2.2;
|
|
4973
|
-
g.selectAll('circle.dot')
|
|
4977
|
+
const scatterDots = g.selectAll('circle.dot')
|
|
4974
4978
|
.data(clusters)
|
|
4975
4979
|
.enter()
|
|
4976
4980
|
.append('circle')
|
|
4977
|
-
.attr('class', styles$
|
|
4981
|
+
.attr('class', styles$b.dot)
|
|
4978
4982
|
.attr('cx', d => xScale(d.hourFraction) + d.xOffsetPx)
|
|
4979
4983
|
.attr('cy', d => (yScale(d.date) ?? 0) + rowHeight / 2)
|
|
4980
|
-
.attr('r',
|
|
4984
|
+
.attr('r', 0)
|
|
4981
4985
|
.attr('fill', d => getColor(d.habitKey))
|
|
4982
|
-
.attr('opacity',
|
|
4983
|
-
.style('cursor', 'pointer')
|
|
4986
|
+
.attr('opacity', 0)
|
|
4987
|
+
.style('cursor', 'pointer');
|
|
4988
|
+
scatterDots.transition()
|
|
4989
|
+
.delay(d => (xScale(d.hourFraction) / chartWidth) * 600)
|
|
4990
|
+
.duration(380)
|
|
4991
|
+
.ease(d3.easeBackOut.overshoot(1.8))
|
|
4992
|
+
.attr('r', d => Math.min(maxRadius, baseRadius * Math.sqrt(d.count)))
|
|
4993
|
+
.attr('opacity', d => hoveredHabit && hoveredHabit !== d.habitKey ? 0.15 : 0.8);
|
|
4994
|
+
scatterDots
|
|
4984
4995
|
.on('mouseenter', function (_event, d) {
|
|
4985
4996
|
const rect = svgRef.current?.getBoundingClientRect();
|
|
4986
4997
|
if (!rect)
|
|
@@ -5001,7 +5012,7 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
5001
5012
|
.tickValues([0, 3, 6, 9, 12, 15, 18, 21])
|
|
5002
5013
|
.tickFormat(d => formatHour(d));
|
|
5003
5014
|
g.append('g')
|
|
5004
|
-
.attr('class', styles$
|
|
5015
|
+
.attr('class', styles$b.xAxis)
|
|
5005
5016
|
.attr('transform', `translate(0,${chartHeight})`)
|
|
5006
5017
|
.call(xAxis);
|
|
5007
5018
|
// Y axis (dates) — evenly spaced
|
|
@@ -5014,7 +5025,7 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
5014
5025
|
const [, m, day] = d.split('-');
|
|
5015
5026
|
return `${m}/${day}`;
|
|
5016
5027
|
});
|
|
5017
|
-
g.append('g').attr('class', styles$
|
|
5028
|
+
g.append('g').attr('class', styles$b.yAxis).call(yAxis);
|
|
5018
5029
|
}
|
|
5019
5030
|
else {
|
|
5020
5031
|
// Totals view: stacked bar by hour
|
|
@@ -5030,7 +5041,7 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
5030
5041
|
.data(yScale.ticks(5))
|
|
5031
5042
|
.enter()
|
|
5032
5043
|
.append('line')
|
|
5033
|
-
.attr('class', styles$
|
|
5044
|
+
.attr('class', styles$b.gridLine)
|
|
5034
5045
|
.attr('x1', 0)
|
|
5035
5046
|
.attr('x2', chartWidth)
|
|
5036
5047
|
.attr('y1', d => yScale(d))
|
|
@@ -5038,17 +5049,24 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
5038
5049
|
hourlyTotals.forEach(bucket => {
|
|
5039
5050
|
let cumulative = 0;
|
|
5040
5051
|
const entries = Array.from(bucket.byHabit.entries()).sort(([a], [b]) => a.localeCompare(b));
|
|
5052
|
+
const barDelay = (bucket.hour / 24) * 700;
|
|
5041
5053
|
entries.forEach(([habit, count]) => {
|
|
5042
5054
|
const y = yScale(cumulative + count);
|
|
5043
5055
|
const barHeight = Math.max(0, yScale(cumulative) - yScale(cumulative + count));
|
|
5044
5056
|
g.append('rect')
|
|
5045
|
-
.attr('class', styles$
|
|
5057
|
+
.attr('class', styles$b.bar)
|
|
5046
5058
|
.attr('x', xScale(bucket.hour) ?? 0)
|
|
5047
|
-
.attr('y',
|
|
5059
|
+
.attr('y', chartHeight)
|
|
5048
5060
|
.attr('width', xScale.bandwidth())
|
|
5049
|
-
.attr('height',
|
|
5061
|
+
.attr('height', 0)
|
|
5050
5062
|
.attr('fill', getColor(habit))
|
|
5051
|
-
.attr('opacity', hoveredHabit && hoveredHabit !== habit ? 0.3 : 1)
|
|
5063
|
+
.attr('opacity', hoveredHabit && hoveredHabit !== habit ? 0.3 : 1)
|
|
5064
|
+
.transition()
|
|
5065
|
+
.delay(barDelay)
|
|
5066
|
+
.duration(550)
|
|
5067
|
+
.ease(d3.easeCubicOut)
|
|
5068
|
+
.attr('y', y)
|
|
5069
|
+
.attr('height', barHeight);
|
|
5052
5070
|
cumulative += count;
|
|
5053
5071
|
});
|
|
5054
5072
|
if (bucket.total > 0) {
|
|
@@ -5080,10 +5098,10 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
5080
5098
|
.tickValues([0, 3, 6, 9, 12, 15, 18, 21])
|
|
5081
5099
|
.tickFormat(d => formatHour(d));
|
|
5082
5100
|
g.append('g')
|
|
5083
|
-
.attr('class', styles$
|
|
5101
|
+
.attr('class', styles$b.xAxis)
|
|
5084
5102
|
.attr('transform', `translate(0,${chartHeight})`)
|
|
5085
5103
|
.call(xAxis);
|
|
5086
|
-
g.append('g').attr('class', styles$
|
|
5104
|
+
g.append('g').attr('class', styles$b.yAxis).call(d3.axisLeft(yScale).ticks(5));
|
|
5087
5105
|
}
|
|
5088
5106
|
}, [
|
|
5089
5107
|
view,
|
|
@@ -5112,12 +5130,12 @@ const HabitTimeOfDayChart = ({ events, width = 800, height = 400, startDate, end
|
|
|
5112
5130
|
day: 'numeric',
|
|
5113
5131
|
});
|
|
5114
5132
|
};
|
|
5115
|
-
return (jsxs("div", { className: styles$
|
|
5133
|
+
return (jsxs("div", { className: styles$b.container, children: [!hideControls && (jsx("div", { className: styles$b.controls, children: jsx("div", { className: styles$b.viewToggle, children: ['scatter', 'totals'].map(type => (jsxs("button", { className: `${styles$b.viewButton} ${view === type ? styles$b.active : ''}`, onClick: () => setView(type), title: viewConfig[type].label, children: [jsx("span", { className: styles$b.viewIcon, children: viewConfig[type].icon }), jsx("span", { className: styles$b.viewLabel, children: viewConfig[type].label })] }, type))) }) })), habits.length > 0 && (jsx("div", { className: `${styles$b.legend}${compactLegend ? ` ${styles$b.compactLegend}` : ''}`, children: habits.map(habit => (jsxs("button", { className: `${styles$b.legendItem} ${!activeHabits.includes(habit) ? styles$b.inactive : ''}`, onClick: () => toggleHabit(habit), onMouseEnter: () => setHoveredHabit(habit), onMouseLeave: () => setHoveredHabit(null), children: [jsx("span", { className: styles$b.legendEmoji, children: customHabitEmojis[habit] || '📊' }), jsx("span", { className: styles$b.legendColor, style: { backgroundColor: getColor(habit) } }), jsx("span", { className: styles$b.legendLabel, children: habit })] }, habit))) })), jsx("svg", { ref: svgRef, viewBox: `0 0 ${width} ${height}`, preserveAspectRatio: "xMidYMid meet", className: styles$b.chart }), tooltipData && (jsx("div", { className: `${styles$b.tooltip} ${styles$b.visible}`, style: { left: `${tooltipData.x}px`, top: `${tooltipData.y - 70}px` }, children: tooltipData.habit ? (jsxs(Fragment, { children: [jsxs("div", { className: styles$b.tooltipHeader, children: [jsx("span", { className: styles$b.tooltipDot, style: { backgroundColor: getColor(tooltipData.habit) } }), jsxs("span", { children: [customHabitEmojis[tooltipData.habit] || '', " ", tooltipData.habit] })] }), jsxs("div", { className: styles$b.tooltipInfo, children: [jsxs("div", { className: styles$b.tooltipDate, children: [tooltipData.date ? formatTooltipDate(tooltipData.date) : '', tooltipData.minute !== undefined
|
|
5116
5134
|
? ` · ${formatTime$1(tooltipData.hour, tooltipData.minute)}`
|
|
5117
|
-
: ''] }), tooltipData.count > 1 && (jsxs("div", { className: styles$
|
|
5135
|
+
: ''] }), tooltipData.count > 1 && (jsxs("div", { className: styles$b.tooltipValue, children: [jsx("strong", { children: tooltipData.count }), jsx("span", { className: styles$b.tooltipUnits, children: "events" })] }))] })] })) : (jsxs(Fragment, { children: [jsx("div", { className: styles$b.tooltipHeader, children: jsx("span", { children: formatHour(tooltipData.hour) }) }), jsxs("div", { className: styles$b.tooltipInfo, children: [jsxs("div", { className: styles$b.tooltipValue, children: [jsx("strong", { children: tooltipData.count }), jsxs("span", { className: styles$b.tooltipUnits, children: ["event", tooltipData.count === 1 ? '' : 's'] })] }), tooltipData.breakdown && tooltipData.breakdown.length > 1 && (jsx("div", { className: styles$b.tooltipBreakdown, children: tooltipData.breakdown.map(({ habit, count }) => (jsxs("div", { className: styles$b.tooltipBreakdownRow, children: [jsx("span", { className: styles$b.tooltipDot, style: { backgroundColor: getColor(habit) } }), jsxs("span", { children: [customHabitEmojis[habit] || '', " ", habit] }), jsx("span", { className: styles$b.tooltipCount, children: count })] }, habit))) }))] })] })) }))] }));
|
|
5118
5136
|
};
|
|
5119
5137
|
|
|
5120
|
-
var styles$
|
|
5138
|
+
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"};
|
|
5121
5139
|
|
|
5122
5140
|
const parseTimeToDecimal = (time) => {
|
|
5123
5141
|
const [hours, minutes] = time.split(':').map(Number);
|
|
@@ -5128,7 +5146,7 @@ const formatTime = (hour) => {
|
|
|
5128
5146
|
const minutes = Math.round((hour % 1) * 60);
|
|
5129
5147
|
return `${h24.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}`;
|
|
5130
5148
|
};
|
|
5131
|
-
const formatDuration = (decimal) => {
|
|
5149
|
+
const formatDuration$1 = (decimal) => {
|
|
5132
5150
|
const h = Math.floor(decimal);
|
|
5133
5151
|
const m = Math.round((decimal % 1) * 60);
|
|
5134
5152
|
return `${h}h ${m.toString().padStart(2, '0')}m`;
|
|
@@ -5188,23 +5206,25 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5188
5206
|
.data(d3.range(18, 43, 3))
|
|
5189
5207
|
.enter()
|
|
5190
5208
|
.append('line')
|
|
5191
|
-
.attr('class', styles$
|
|
5209
|
+
.attr('class', styles$a.gridLine)
|
|
5192
5210
|
.attr('x1', (d) => xScale(d))
|
|
5193
5211
|
.attr('y1', 0)
|
|
5194
5212
|
.attr('x2', (d) => xScale(d))
|
|
5195
5213
|
.attr('y2', chartHeight)
|
|
5196
|
-
.classed(styles$
|
|
5214
|
+
.classed(styles$a.gridLineAccent, (d) => {
|
|
5197
5215
|
const hour = d % 24;
|
|
5198
5216
|
return hour === 0 || hour === 12;
|
|
5199
5217
|
});
|
|
5200
|
-
|
|
5218
|
+
const rowStagger = Math.min(40, 600 / Math.max(1, sleepData.length));
|
|
5219
|
+
sleepData.forEach((dayData, rowIdx) => {
|
|
5201
5220
|
const yValue = yScale(dayData.date);
|
|
5202
5221
|
if (yValue === undefined)
|
|
5203
5222
|
return;
|
|
5223
|
+
const rowDelay = rowIdx * rowStagger;
|
|
5204
5224
|
const barHeight = yScale.bandwidth();
|
|
5205
5225
|
const sleepGroup = g
|
|
5206
5226
|
.append('g')
|
|
5207
|
-
.attr('class', styles$
|
|
5227
|
+
.attr('class', styles$a.sleepBar)
|
|
5208
5228
|
.style('cursor', onDateClick ? 'pointer' : 'default')
|
|
5209
5229
|
.on('click', () => onDateClick?.(dayData.date));
|
|
5210
5230
|
let sleepHour = null;
|
|
@@ -5234,7 +5254,7 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5234
5254
|
const d = buildSquigglePath(x1, x2, y, amplitude, wavelength);
|
|
5235
5255
|
const path = sleepGroup
|
|
5236
5256
|
.append('path')
|
|
5237
|
-
.attr('class', styles$
|
|
5257
|
+
.attr('class', styles$a.squiggle)
|
|
5238
5258
|
.attr('d', d)
|
|
5239
5259
|
.attr('fill', 'none');
|
|
5240
5260
|
const node = path.node();
|
|
@@ -5244,6 +5264,7 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5244
5264
|
path.attr('stroke-dasharray', length)
|
|
5245
5265
|
.attr('stroke-dashoffset', length)
|
|
5246
5266
|
.transition()
|
|
5267
|
+
.delay(rowDelay)
|
|
5247
5268
|
.duration(540)
|
|
5248
5269
|
.ease(d3.easeCubicOut)
|
|
5249
5270
|
.attr('stroke-dashoffset', 0);
|
|
@@ -5251,32 +5272,32 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5251
5272
|
if (sleepHour !== null) {
|
|
5252
5273
|
sleepGroup
|
|
5253
5274
|
.append('circle')
|
|
5254
|
-
.attr('class', `${styles$
|
|
5275
|
+
.attr('class', `${styles$a.endpoint} ${styles$a.endpointSleep}`)
|
|
5255
5276
|
.attr('cx', xScale(sleepHour))
|
|
5256
5277
|
.attr('cy', yValue + barHeight / 2)
|
|
5257
5278
|
.attr('r', 0)
|
|
5258
5279
|
.transition()
|
|
5259
5280
|
.duration(280)
|
|
5260
|
-
.delay(160)
|
|
5281
|
+
.delay(rowDelay + 160)
|
|
5261
5282
|
.ease(d3.easeCubicOut)
|
|
5262
5283
|
.attr('r', 3.5);
|
|
5263
5284
|
}
|
|
5264
5285
|
if (wakeHour !== null) {
|
|
5265
5286
|
sleepGroup
|
|
5266
5287
|
.append('circle')
|
|
5267
|
-
.attr('class', `${styles$
|
|
5288
|
+
.attr('class', `${styles$a.endpoint} ${styles$a.endpointWake}`)
|
|
5268
5289
|
.attr('cx', xScale(wakeHour))
|
|
5269
5290
|
.attr('cy', yValue + barHeight / 2)
|
|
5270
5291
|
.attr('r', 0)
|
|
5271
5292
|
.transition()
|
|
5272
5293
|
.duration(280)
|
|
5273
|
-
.delay(220)
|
|
5294
|
+
.delay(rowDelay + 220)
|
|
5274
5295
|
.ease(d3.easeCubicOut)
|
|
5275
5296
|
.attr('r', 3.5);
|
|
5276
5297
|
}
|
|
5277
5298
|
sleepGroup
|
|
5278
5299
|
.on('mouseenter', function (event) {
|
|
5279
|
-
d3.select(this).classed(styles$
|
|
5300
|
+
d3.select(this).classed(styles$a.sleepBarHover, true);
|
|
5280
5301
|
const duration = sleepHour !== null && wakeHour !== null ? wakeHour - sleepHour : null;
|
|
5281
5302
|
setTooltipData({
|
|
5282
5303
|
date: dayData.date,
|
|
@@ -5288,7 +5309,7 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5288
5309
|
});
|
|
5289
5310
|
})
|
|
5290
5311
|
.on('mouseleave', function () {
|
|
5291
|
-
d3.select(this).classed(styles$
|
|
5312
|
+
d3.select(this).classed(styles$a.sleepBarHover, false);
|
|
5292
5313
|
setTooltipData(null);
|
|
5293
5314
|
})
|
|
5294
5315
|
.on('mousemove', function (event) {
|
|
@@ -5301,7 +5322,7 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5301
5322
|
}));
|
|
5302
5323
|
const xAxis = g
|
|
5303
5324
|
.append('g')
|
|
5304
|
-
.attr('class', styles$
|
|
5325
|
+
.attr('class', styles$a.xAxis)
|
|
5305
5326
|
.attr('transform', `translate(0,${chartHeight})`)
|
|
5306
5327
|
.call(d3
|
|
5307
5328
|
.axisBottom(xScale)
|
|
@@ -5317,7 +5338,7 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5317
5338
|
const yAxisTicks = yDomain.filter((_, i) => i % tickEvery === 0);
|
|
5318
5339
|
const yAxis = g
|
|
5319
5340
|
.append('g')
|
|
5320
|
-
.attr('class', styles$
|
|
5341
|
+
.attr('class', styles$a.yAxis)
|
|
5321
5342
|
.call(d3
|
|
5322
5343
|
.axisLeft(yScale)
|
|
5323
5344
|
.tickValues(yAxisTicks)
|
|
@@ -5331,14 +5352,14 @@ const SleepChart = ({ sleepData, width = 800, height = 400, onDateClick, }) => {
|
|
|
5331
5352
|
.tickPadding(12));
|
|
5332
5353
|
yAxis.select('.domain').remove();
|
|
5333
5354
|
}, [sleepData, chartWidth, chartHeight, margin, onDateClick, height, width]);
|
|
5334
|
-
return (jsxs("div", { className: styles$
|
|
5355
|
+
return (jsxs("div", { className: styles$a.container, children: [jsxs("header", { className: styles$a.header, children: [jsx("span", { className: styles$a.eyebrow, children: "the night" }), jsxs("h3", { className: styles$a.title, children: [jsx("em", { children: "Sleep" }), " pattern"] })] }), jsx("svg", { ref: svgRef, width: width, height: height, className: styles$a.chart }), tooltipData && (jsxs("div", { className: `${styles$a.tooltip} ${styles$a.visible}`, style: { left: `${tooltipData.x}px`, top: `${tooltipData.y}px` }, children: [jsx("div", { className: styles$a.tooltipDate, children: new Date(tooltipData.date).toLocaleDateString('en-US', {
|
|
5335
5356
|
weekday: 'short',
|
|
5336
5357
|
month: 'short',
|
|
5337
5358
|
day: 'numeric',
|
|
5338
|
-
}) }), jsxs("div", { className: styles$
|
|
5359
|
+
}) }), jsxs("div", { className: styles$a.tooltipBody, children: [tooltipData.sleepTime && (jsxs("div", { className: styles$a.tooltipRow, children: [jsx("em", { children: "sleep" }), jsx("time", { children: tooltipData.sleepTime })] })), tooltipData.wakeTime && (jsxs("div", { className: styles$a.tooltipRow, children: [jsx("em", { children: "wake" }), jsx("time", { children: tooltipData.wakeTime })] })), tooltipData.duration !== null && (jsxs("div", { className: `${styles$a.tooltipRow} ${styles$a.tooltipTotal}`, children: [jsx("em", { children: "total" }), jsx("time", { children: formatDuration$1(tooltipData.duration) })] }))] })] }))] }));
|
|
5339
5360
|
};
|
|
5340
5361
|
|
|
5341
|
-
var styles$
|
|
5362
|
+
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"};
|
|
5342
5363
|
|
|
5343
5364
|
const DAYS_OF_WEEK = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'];
|
|
5344
5365
|
const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
|
|
@@ -5392,20 +5413,20 @@ const BooleansHeatmap = ({ data, habitName, width = 800, height = 200, habitColo
|
|
|
5392
5413
|
g.append('text')
|
|
5393
5414
|
.attr('x', weekIndex * (cellSize + cellGap))
|
|
5394
5415
|
.attr('y', -10)
|
|
5395
|
-
.attr('class', styles$
|
|
5416
|
+
.attr('class', styles$9.monthLabel)
|
|
5396
5417
|
.text(MONTHS[month]);
|
|
5397
5418
|
});
|
|
5398
5419
|
DAYS_OF_WEEK.forEach((day, index) => {
|
|
5399
5420
|
g.append('text')
|
|
5400
5421
|
.attr('x', -10)
|
|
5401
5422
|
.attr('y', index * (cellSize + cellGap) + cellSize / 2)
|
|
5402
|
-
.attr('class', styles$
|
|
5423
|
+
.attr('class', styles$9.dayLabel)
|
|
5403
5424
|
.attr('text-anchor', 'end')
|
|
5404
5425
|
.attr('alignment-baseline', 'middle')
|
|
5405
5426
|
.text(day);
|
|
5406
5427
|
});
|
|
5407
5428
|
const tooltip = d3.select('body').append('div')
|
|
5408
|
-
.attr('class', styles$
|
|
5429
|
+
.attr('class', styles$9.tooltip)
|
|
5409
5430
|
.style('opacity', 0)
|
|
5410
5431
|
.style('position', 'absolute');
|
|
5411
5432
|
const daysToShow = weeksToShow * 7;
|
|
@@ -5418,16 +5439,29 @@ const BooleansHeatmap = ({ data, habitName, width = 800, height = 200, habitColo
|
|
|
5418
5439
|
const dayOfWeek = (date.getDay() + 6) % 7;
|
|
5419
5440
|
const weekIndex = Math.floor((i + startDayOffset) / 7);
|
|
5420
5441
|
const isTrue = dateString in data && data[dateString];
|
|
5442
|
+
const cx = weekIndex * (cellSize + cellGap) + cellSize / 2;
|
|
5443
|
+
const cy = dayOfWeek * (cellSize + cellGap) + cellSize / 2;
|
|
5421
5444
|
const rect = g.append('rect')
|
|
5445
|
+
.attr('x', cx)
|
|
5446
|
+
.attr('y', cy)
|
|
5447
|
+
.attr('width', 0)
|
|
5448
|
+
.attr('height', 0)
|
|
5449
|
+
.attr('rx', 3)
|
|
5450
|
+
.attr('class', styles$9.cell)
|
|
5451
|
+
.attr('data-date', dateString)
|
|
5452
|
+
.attr('data-value', isTrue ? 'true' : 'false')
|
|
5453
|
+
.style('fill', isTrue ? habitColor : '#4D4D4DFF')
|
|
5454
|
+
.style('opacity', 0);
|
|
5455
|
+
const cellDelay = (weekIndex + dayOfWeek) * 18;
|
|
5456
|
+
rect.transition()
|
|
5457
|
+
.delay(cellDelay)
|
|
5458
|
+
.duration(320)
|
|
5459
|
+
.ease(d3.easeBackOut.overshoot(1.6))
|
|
5422
5460
|
.attr('x', weekIndex * (cellSize + cellGap))
|
|
5423
5461
|
.attr('y', dayOfWeek * (cellSize + cellGap))
|
|
5424
5462
|
.attr('width', cellSize)
|
|
5425
5463
|
.attr('height', cellSize)
|
|
5426
|
-
.
|
|
5427
|
-
.attr('class', styles$5.cell)
|
|
5428
|
-
.attr('data-date', dateString)
|
|
5429
|
-
.attr('data-value', isTrue ? 'true' : 'false')
|
|
5430
|
-
.style('fill', isTrue ? habitColor : '#4D4D4DFF');
|
|
5464
|
+
.style('opacity', 1);
|
|
5431
5465
|
rect.on('mouseover', function (event) {
|
|
5432
5466
|
tooltip.transition()
|
|
5433
5467
|
.duration(200)
|
|
@@ -5452,10 +5486,10 @@ const BooleansHeatmap = ({ data, habitName, width = 800, height = 200, habitColo
|
|
|
5452
5486
|
tooltip.remove();
|
|
5453
5487
|
};
|
|
5454
5488
|
}, [data, habitName, width, height, startDate, endDate, weeksToShow, habitColor, habitEmoji]);
|
|
5455
|
-
return (jsxs("div", { className: styles$
|
|
5489
|
+
return (jsxs("div", { className: styles$9.container, children: [jsxs("h3", { className: styles$9.title, children: [jsx("span", { className: styles$9.habitEmoji, children: habitEmoji }), habitName] }), jsx("svg", { ref: svgRef, width: width, height: height, className: styles$9.chart }), jsxs("div", { className: styles$9.legend, children: [jsxs("span", { className: styles$9.legendItem, children: [jsx("span", { className: styles$9.legendColor, style: { backgroundColor: habitColor } }), "Done"] }), jsxs("span", { className: styles$9.legendItem, children: [jsx("span", { className: styles$9.legendColor, style: { backgroundColor: '#4D4D4DFF' } }), "Not done"] })] })] }));
|
|
5456
5490
|
};
|
|
5457
5491
|
|
|
5458
|
-
var styles$
|
|
5492
|
+
var styles$8 = {"container":"SunburstChart-module_container__w1ZYc","title":"SunburstChart-module_title__T6Ak7","chart":"SunburstChart-module_chart__BFM6E","tooltip":"SunburstChart-module_tooltip__TuTAN"};
|
|
5459
5493
|
|
|
5460
5494
|
const COLOR_PALETTE = [
|
|
5461
5495
|
'#6366f1',
|
|
@@ -5519,7 +5553,8 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
5519
5553
|
node.y0Original = d.y0;
|
|
5520
5554
|
node.y1Original = d.y1;
|
|
5521
5555
|
});
|
|
5522
|
-
|
|
5556
|
+
// arc generator (used for type only — entrance animation builds its own)
|
|
5557
|
+
void d3
|
|
5523
5558
|
.arc()
|
|
5524
5559
|
.startAngle((d) => d.x0)
|
|
5525
5560
|
.endAngle((d) => d.x1)
|
|
@@ -5529,7 +5564,7 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
5529
5564
|
const tooltip = d3
|
|
5530
5565
|
.select('body')
|
|
5531
5566
|
.append('div')
|
|
5532
|
-
.attr('class', styles$
|
|
5567
|
+
.attr('class', styles$8.tooltip)
|
|
5533
5568
|
.style('opacity', 0)
|
|
5534
5569
|
.style('position', 'absolute');
|
|
5535
5570
|
// Function to reset to original view
|
|
@@ -5696,7 +5731,6 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
5696
5731
|
.data(nodes.filter((d) => d.depth > 0 && d.value && d.value > 0))
|
|
5697
5732
|
.enter()
|
|
5698
5733
|
.append('path')
|
|
5699
|
-
.attr('d', arc)
|
|
5700
5734
|
.attr('fill', (d) => {
|
|
5701
5735
|
let ancestor = d;
|
|
5702
5736
|
while (ancestor.depth > 1 && ancestor.parent) {
|
|
@@ -5760,6 +5794,46 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
5760
5794
|
.style('left', event.pageX + 10 + 'px')
|
|
5761
5795
|
.style('top', event.pageY - 28 + 'px');
|
|
5762
5796
|
});
|
|
5797
|
+
// Entrance animation: grow segments outward from center, staggered by depth + angle.
|
|
5798
|
+
const entranceDuration = 700;
|
|
5799
|
+
paths
|
|
5800
|
+
.attr('d', (d) => {
|
|
5801
|
+
const collapsedArc = d3
|
|
5802
|
+
.arc()
|
|
5803
|
+
.startAngle(() => d.x0)
|
|
5804
|
+
.endAngle(() => d.x1)
|
|
5805
|
+
.innerRadius(() => 0)
|
|
5806
|
+
.outerRadius(() => 0)
|
|
5807
|
+
.cornerRadius(3);
|
|
5808
|
+
return collapsedArc(d) || '';
|
|
5809
|
+
})
|
|
5810
|
+
.style('opacity', 0)
|
|
5811
|
+
.transition()
|
|
5812
|
+
.delay((d) => (d.depth - 1) * 120 + ((d.x0 + d.x1) / 2 / (2 * Math.PI)) * 240)
|
|
5813
|
+
.duration(entranceDuration)
|
|
5814
|
+
.ease(d3.easeCubicOut)
|
|
5815
|
+
.style('opacity', 1)
|
|
5816
|
+
.attrTween('d', function (d) {
|
|
5817
|
+
const node = d;
|
|
5818
|
+
const startY0 = 0;
|
|
5819
|
+
const startY1 = 0;
|
|
5820
|
+
const endY0 = node.y0Original;
|
|
5821
|
+
const endY1 = node.y1Original;
|
|
5822
|
+
return (t) => {
|
|
5823
|
+
const currY0 = d3.interpolate(startY0, endY0)(t);
|
|
5824
|
+
const currY1 = d3.interpolate(startY1, endY1)(t);
|
|
5825
|
+
node.y0 = currY0;
|
|
5826
|
+
node.y1 = currY1;
|
|
5827
|
+
const interpolatedArc = d3
|
|
5828
|
+
.arc()
|
|
5829
|
+
.startAngle(() => node.x0)
|
|
5830
|
+
.endAngle(() => node.x1)
|
|
5831
|
+
.innerRadius(() => Math.sqrt(Math.max(0, currY0)))
|
|
5832
|
+
.outerRadius(() => Math.sqrt(Math.max(0, currY1)))
|
|
5833
|
+
.cornerRadius(3);
|
|
5834
|
+
return interpolatedArc(node) || '';
|
|
5835
|
+
};
|
|
5836
|
+
});
|
|
5763
5837
|
const shouldDisplayLabel = (d) => {
|
|
5764
5838
|
const angle = d.x1 - d.x0;
|
|
5765
5839
|
// When zoomed in, be more lenient with label display since segments are larger
|
|
@@ -5911,8 +5985,9 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
5911
5985
|
.append('text')
|
|
5912
5986
|
.attr('class', 'segment-label')
|
|
5913
5987
|
.attr('transform', (d) => {
|
|
5914
|
-
const
|
|
5915
|
-
const
|
|
5988
|
+
const node = d;
|
|
5989
|
+
const angle = (node.x0 + node.x1) / 2;
|
|
5990
|
+
const radiusVal = (Math.sqrt(node.y0Original) + Math.sqrt(node.y1Original)) / 2;
|
|
5916
5991
|
const x = Math.cos(angle - Math.PI / 2) * radiusVal;
|
|
5917
5992
|
const y = Math.sin(angle - Math.PI / 2) * radiusVal;
|
|
5918
5993
|
return `translate(${x},${y})`;
|
|
@@ -5927,15 +6002,20 @@ const SunburstChart = ({ data, width = 500, height = 500, title = 'Sunburst Char
|
|
|
5927
6002
|
.text((d) => {
|
|
5928
6003
|
const maxLength = d.depth === 1 ? 12 : 8;
|
|
5929
6004
|
return d.data.name.substring(0, maxLength);
|
|
5930
|
-
})
|
|
6005
|
+
})
|
|
6006
|
+
.style('opacity', 0)
|
|
6007
|
+
.transition()
|
|
6008
|
+
.delay((d) => (d.depth - 1) * 120 + ((d.x0 + d.x1) / 2 / (2 * Math.PI)) * 240 + 500)
|
|
6009
|
+
.duration(300)
|
|
6010
|
+
.style('opacity', 1);
|
|
5931
6011
|
return () => {
|
|
5932
6012
|
tooltip.remove();
|
|
5933
6013
|
};
|
|
5934
6014
|
}, [data, width, height, colorMap, radius, tagColors, unit, centerLabel]);
|
|
5935
|
-
return (jsxs("div", { className: styles$
|
|
6015
|
+
return (jsxs("div", { className: styles$8.container, children: [jsx("h3", { className: styles$8.title, children: title }), jsx("svg", { ref: svgRef, viewBox: `0 0 ${width} ${height}`, className: styles$8.chart })] }));
|
|
5936
6016
|
};
|
|
5937
6017
|
|
|
5938
|
-
var styles$
|
|
6018
|
+
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"};
|
|
5939
6019
|
|
|
5940
6020
|
const DEFAULT_COLORS = [
|
|
5941
6021
|
'#6366f1', '#8b5cf6', '#06b6d4', '#10b981',
|
|
@@ -5975,7 +6055,7 @@ const PieChart = ({ data, width = 400, height = 400, title = 'Distribution', sho
|
|
|
5975
6055
|
.innerRadius(radius * 0.7)
|
|
5976
6056
|
.outerRadius(radius * 0.7);
|
|
5977
6057
|
const tooltip = d3.select('body').append('div')
|
|
5978
|
-
.attr('class', styles$
|
|
6058
|
+
.attr('class', styles$7.tooltip)
|
|
5979
6059
|
.style('opacity', 0)
|
|
5980
6060
|
.style('position', 'absolute');
|
|
5981
6061
|
const pieData = pie(data);
|
|
@@ -5984,13 +6064,25 @@ const PieChart = ({ data, width = 400, height = 400, title = 'Distribution', sho
|
|
|
5984
6064
|
.data(pieData)
|
|
5985
6065
|
.enter().append('g')
|
|
5986
6066
|
.attr('class', 'arc');
|
|
5987
|
-
|
|
5988
|
-
|
|
6067
|
+
const sweepDuration = 900;
|
|
6068
|
+
const arcPaths = arcs.append('path')
|
|
5989
6069
|
.attr('fill', (d, i) => d.data.color || DEFAULT_COLORS[i % DEFAULT_COLORS.length])
|
|
5990
6070
|
.attr('stroke', 'var(--bg-primary)')
|
|
5991
6071
|
.attr('stroke-width', 3)
|
|
5992
6072
|
.style('cursor', 'pointer')
|
|
5993
6073
|
.style('filter', 'drop-shadow(0 2px 8px rgba(0,0,0,0.15))')
|
|
6074
|
+
// Start collapsed at the slice's startAngle (zero-width slice)
|
|
6075
|
+
.attr('d', d => arc({ ...d, endAngle: d.startAngle }));
|
|
6076
|
+
arcPaths
|
|
6077
|
+
.transition()
|
|
6078
|
+
.delay(d => (d.startAngle / (2 * Math.PI)) * sweepDuration)
|
|
6079
|
+
.duration(d => ((d.endAngle - d.startAngle) / (2 * Math.PI)) * sweepDuration + 200)
|
|
6080
|
+
.ease(d3.easeCubicOut)
|
|
6081
|
+
.attrTween('d', function (d) {
|
|
6082
|
+
const i = d3.interpolate(d.startAngle, d.endAngle);
|
|
6083
|
+
return (t) => arc({ ...d, endAngle: i(t) }) || '';
|
|
6084
|
+
});
|
|
6085
|
+
arcPaths
|
|
5994
6086
|
.on('mouseover', function (event, d) {
|
|
5995
6087
|
const hoverArc = d3.arc()
|
|
5996
6088
|
.innerRadius(radius * 0.4)
|
|
@@ -6062,21 +6154,593 @@ const PieChart = ({ data, width = 400, height = 400, title = 'Distribution', sho
|
|
|
6062
6154
|
.style('text-shadow', (d, i) => {
|
|
6063
6155
|
const segmentColor = d.data.color || DEFAULT_COLORS[i % DEFAULT_COLORS.length];
|
|
6064
6156
|
const textColor = getTextColor(segmentColor);
|
|
6065
|
-
// Use contrasting shadow color
|
|
6066
6157
|
const shadowColor = textColor === '#ffffff' ? 'rgba(0,0,0,0.4)' : 'rgba(255,255,255,0.4)';
|
|
6067
6158
|
return `0 1px 2px ${shadowColor}`;
|
|
6068
6159
|
})
|
|
6069
6160
|
.text(d => {
|
|
6070
6161
|
const percentage = ((d.data.value / total) * 100);
|
|
6071
6162
|
return percentage > 8 ? `${percentage.toFixed(0)}%` : '';
|
|
6072
|
-
})
|
|
6163
|
+
})
|
|
6164
|
+
.style('opacity', 0)
|
|
6165
|
+
.transition()
|
|
6166
|
+
.delay(d => (((d.startAngle + d.endAngle) / 2) / (2 * Math.PI)) * sweepDuration + 250)
|
|
6167
|
+
.duration(300)
|
|
6168
|
+
.style('opacity', 1);
|
|
6073
6169
|
return () => {
|
|
6074
6170
|
tooltip.remove();
|
|
6075
6171
|
};
|
|
6076
6172
|
}, [data, width, height, radius, centerLabel, unit]);
|
|
6077
|
-
return (jsxs("div", { className: styles$
|
|
6173
|
+
return (jsxs("div", { className: styles$7.container, children: [jsx("h3", { className: styles$7.title, children: title }), jsxs("div", { className: styles$7.chartContainer, children: [jsx("svg", { ref: svgRef, width: width, height: height, className: styles$7.chart }), showLegend && (jsx("div", { className: styles$7.legend, children: data.map((item, index) => (jsxs("div", { className: styles$7.legendItem, children: [jsx("span", { className: styles$7.legendColor, style: {
|
|
6078
6174
|
backgroundColor: item.color || DEFAULT_COLORS[index % DEFAULT_COLORS.length]
|
|
6079
|
-
} }), jsx("span", { className: styles$
|
|
6175
|
+
} }), jsx("span", { className: styles$7.legendLabel, children: item.name }), jsx("span", { className: styles$7.legendValue, children: item.value.toLocaleString() })] }, item.name))) }))] })] }));
|
|
6176
|
+
};
|
|
6177
|
+
|
|
6178
|
+
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"};
|
|
6179
|
+
|
|
6180
|
+
const DEFAULT_FORMAT = (n) => n.toLocaleString();
|
|
6181
|
+
const DEFAULT_OVER = (over, fmt) => `Over by ${fmt(over)}`;
|
|
6182
|
+
const DEFAULT_UNDER = (left, fmt) => `${fmt(left)} left`;
|
|
6183
|
+
const ProgressRings = ({ rings, formatValue = DEFAULT_FORMAT, ringSize = 120, stroke = 12, emptyMessage = 'No data to display', overLabel = DEFAULT_OVER, underLabel = DEFAULT_UNDER, }) => {
|
|
6184
|
+
const containerRef = useRef(null);
|
|
6185
|
+
const tooltipRef = useRef(null);
|
|
6186
|
+
const showTip = useCallback((event, html) => {
|
|
6187
|
+
const tip = tooltipRef.current;
|
|
6188
|
+
const ctn = containerRef.current;
|
|
6189
|
+
if (!tip || !ctn)
|
|
6190
|
+
return;
|
|
6191
|
+
const rect = ctn.getBoundingClientRect();
|
|
6192
|
+
tip.style.left = `${event.clientX - rect.left + 12}px`;
|
|
6193
|
+
tip.style.top = `${event.clientY - rect.top - 10}px`;
|
|
6194
|
+
tip.innerHTML = html;
|
|
6195
|
+
tip.classList.add(styles$6.visible);
|
|
6196
|
+
}, []);
|
|
6197
|
+
const hideTip = useCallback(() => {
|
|
6198
|
+
tooltipRef.current?.classList.remove(styles$6.visible);
|
|
6199
|
+
}, []);
|
|
6200
|
+
if (rings.length === 0) {
|
|
6201
|
+
return jsx("div", { className: styles$6.empty, children: emptyMessage });
|
|
6202
|
+
}
|
|
6203
|
+
const radius = (ringSize - stroke) / 2;
|
|
6204
|
+
const circumference = 2 * Math.PI * radius;
|
|
6205
|
+
return (jsxs("div", { className: styles$6.container, ref: containerRef, children: [jsx("div", { className: styles$6.grid, children: rings.map((r, idx) => {
|
|
6206
|
+
const ratio = r.target > 0 ? r.value / r.target : 0;
|
|
6207
|
+
const clamped = Math.min(1, ratio);
|
|
6208
|
+
const finalOffset = circumference * (1 - clamped);
|
|
6209
|
+
const pct = Math.round(ratio * 100);
|
|
6210
|
+
const over = ratio > 1;
|
|
6211
|
+
const ringColor = over ? 'var(--color-error)' : (r.color || 'var(--color-primary)');
|
|
6212
|
+
return (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));
|
|
6213
|
+
}) }), jsx("div", { ref: tooltipRef, className: styles$6.tooltip })] }));
|
|
6214
|
+
};
|
|
6215
|
+
const Ring = ({ label, emoji, ringSize, stroke, radius, circumference, finalOffset, ringColor, value, target, pct, over, formatValue, overLabel, underLabel, delay, onTip, onTipLeave, }) => {
|
|
6216
|
+
const circleRef = useRef(null);
|
|
6217
|
+
useEffect(() => {
|
|
6218
|
+
const node = circleRef.current;
|
|
6219
|
+
if (!node)
|
|
6220
|
+
return;
|
|
6221
|
+
// Reset to empty then animate to final offset.
|
|
6222
|
+
node.style.transition = 'none';
|
|
6223
|
+
node.style.strokeDashoffset = `${circumference}`;
|
|
6224
|
+
// Force reflow so the transition picks up the new starting state.
|
|
6225
|
+
void node.getBoundingClientRect();
|
|
6226
|
+
node.style.transition = `stroke-dashoffset 900ms cubic-bezier(0.22, 1, 0.36, 1) ${delay}ms`;
|
|
6227
|
+
node.style.strokeDashoffset = `${finalOffset}`;
|
|
6228
|
+
}, [circumference, finalOffset, delay]);
|
|
6229
|
+
return (jsxs("div", { className: styles$6.ring, onMouseMove: (e) => onTip(e, `<div class="${styles$6.tipLabel}">${emoji ?? ''} ${label}</div>` +
|
|
6230
|
+
`<div class="${styles$6.tipRow}">${formatValue(value)} of ${formatValue(target)}</div>` +
|
|
6231
|
+
`<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: [jsxs("svg", { width: ringSize, height: ringSize, className: styles$6.svg, children: [jsx("circle", { cx: ringSize / 2, cy: ringSize / 2, r: radius, fill: "none", stroke: "var(--color-border)", strokeWidth: stroke, strokeOpacity: "0.35" }), 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})` })] }), jsxs("div", { className: styles$6.center, children: [emoji && jsx("div", { className: styles$6.emoji, children: emoji }), jsxs("div", { className: `${styles$6.pct} ${over ? styles$6.over : ''}`, children: [pct, "%"] })] }), jsx("div", { className: styles$6.label, children: label }), jsxs("div", { className: styles$6.amounts, children: [jsx("span", { className: over ? styles$6.over : '', children: formatValue(value) }), jsxs("span", { className: styles$6.budget, children: [" / ", formatValue(target)] })] })] }));
|
|
6232
|
+
};
|
|
6233
|
+
|
|
6234
|
+
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"};
|
|
6235
|
+
|
|
6236
|
+
const formatHHMM = (h) => {
|
|
6237
|
+
const hh = Math.floor(h);
|
|
6238
|
+
const mm = Math.floor((h - hh) * 60);
|
|
6239
|
+
return `${String(hh).padStart(2, '0')}:${String(mm).padStart(2, '0')}`;
|
|
6240
|
+
};
|
|
6241
|
+
const formatDuration = (hours) => {
|
|
6242
|
+
const mins = Math.round(hours * 60);
|
|
6243
|
+
if (mins < 60)
|
|
6244
|
+
return `${mins}m`;
|
|
6245
|
+
return `${Math.floor(mins / 60)}h ${mins % 60}m`;
|
|
6246
|
+
};
|
|
6247
|
+
const RadialDayChart = ({ rings, showNowHand = true, centerTopLabel, centerMainLabel, size: fixedSize, minSize = 280, maxSize = 560, }) => {
|
|
6248
|
+
const containerRef = useRef(null);
|
|
6249
|
+
const svgRef = useRef(null);
|
|
6250
|
+
const tooltipRef = useRef(null);
|
|
6251
|
+
const [autoSize, setAutoSize] = useState(380);
|
|
6252
|
+
const size = fixedSize ?? autoSize;
|
|
6253
|
+
useEffect(() => {
|
|
6254
|
+
if (fixedSize)
|
|
6255
|
+
return;
|
|
6256
|
+
const container = containerRef.current;
|
|
6257
|
+
if (!container)
|
|
6258
|
+
return;
|
|
6259
|
+
const observer = new ResizeObserver((entries) => {
|
|
6260
|
+
for (const entry of entries) {
|
|
6261
|
+
const { width } = entry.contentRect;
|
|
6262
|
+
if (width > 0)
|
|
6263
|
+
setAutoSize(Math.max(minSize, Math.min(maxSize, width)));
|
|
6264
|
+
}
|
|
6265
|
+
});
|
|
6266
|
+
observer.observe(container);
|
|
6267
|
+
return () => observer.disconnect();
|
|
6268
|
+
}, [fixedSize, minSize, maxSize]);
|
|
6269
|
+
const showTooltip = useCallback((event, content) => {
|
|
6270
|
+
const tooltip = tooltipRef.current;
|
|
6271
|
+
const container = containerRef.current;
|
|
6272
|
+
if (!tooltip || !container)
|
|
6273
|
+
return;
|
|
6274
|
+
const rect = container.getBoundingClientRect();
|
|
6275
|
+
tooltip.style.left = `${event.clientX - rect.left + 12}px`;
|
|
6276
|
+
tooltip.style.top = `${event.clientY - rect.top - 10}px`;
|
|
6277
|
+
tooltip.innerHTML = content;
|
|
6278
|
+
tooltip.classList.add(styles$5.visible);
|
|
6279
|
+
}, []);
|
|
6280
|
+
const hideTooltip = useCallback(() => {
|
|
6281
|
+
tooltipRef.current?.classList.remove(styles$5.visible);
|
|
6282
|
+
}, []);
|
|
6283
|
+
useEffect(() => {
|
|
6284
|
+
if (!svgRef.current || rings.length === 0)
|
|
6285
|
+
return;
|
|
6286
|
+
const svg = d3.select(svgRef.current);
|
|
6287
|
+
svg.selectAll('*').remove();
|
|
6288
|
+
const width = size;
|
|
6289
|
+
const height = size;
|
|
6290
|
+
const cx = width / 2;
|
|
6291
|
+
const cy = height / 2;
|
|
6292
|
+
const outerR = size / 2 - 28;
|
|
6293
|
+
const g = svg
|
|
6294
|
+
.attr('width', width)
|
|
6295
|
+
.attr('height', height)
|
|
6296
|
+
.append('g')
|
|
6297
|
+
.attr('transform', `translate(${cx},${cy})`);
|
|
6298
|
+
const computedStyle = getComputedStyle(document.documentElement);
|
|
6299
|
+
const textColor = computedStyle.getPropertyValue('--color-text-secondary').trim() || '#888';
|
|
6300
|
+
const mutedText = computedStyle.getPropertyValue('--color-text-muted').trim() || '#aaa';
|
|
6301
|
+
const borderColor = computedStyle.getPropertyValue('--color-border').trim() || 'rgba(128,128,128,0.2)';
|
|
6302
|
+
const hourToAngle = (h) => (h / 24) * Math.PI * 2;
|
|
6303
|
+
g.append('circle')
|
|
6304
|
+
.attr('r', outerR + 8)
|
|
6305
|
+
.attr('fill', 'none')
|
|
6306
|
+
.attr('stroke', borderColor)
|
|
6307
|
+
.attr('stroke-width', 1);
|
|
6308
|
+
const centerR = 46;
|
|
6309
|
+
const ringGap = 2;
|
|
6310
|
+
const ringCount = rings.length;
|
|
6311
|
+
const ringWidth = (outerR - centerR - ringGap * (ringCount - 1)) / ringCount;
|
|
6312
|
+
rings.forEach((ring, ringIdx) => {
|
|
6313
|
+
const ringOuter = outerR - ringIdx * (ringWidth + ringGap);
|
|
6314
|
+
const ringInner = ringOuter - ringWidth;
|
|
6315
|
+
const opacity = ring.opacity !== undefined
|
|
6316
|
+
? ring.opacity
|
|
6317
|
+
: ringIdx === 0
|
|
6318
|
+
? 1
|
|
6319
|
+
: Math.max(0.1, 0.85 - (ringIdx / ringCount) * 0.85);
|
|
6320
|
+
const arcGen = d3
|
|
6321
|
+
.arc()
|
|
6322
|
+
.innerRadius(ringInner)
|
|
6323
|
+
.outerRadius(ringOuter)
|
|
6324
|
+
.startAngle((d) => hourToAngle(d.startHour))
|
|
6325
|
+
.endAngle((d) => hourToAngle(d.endHour))
|
|
6326
|
+
.cornerRadius(2);
|
|
6327
|
+
const arcSel = g
|
|
6328
|
+
.selectAll(`.ring-${ringIdx}`)
|
|
6329
|
+
.data(ring.arcs)
|
|
6330
|
+
.join('path')
|
|
6331
|
+
.attr('class', `ring-${ringIdx}`)
|
|
6332
|
+
.attr('fill', (d) => d.color)
|
|
6333
|
+
.attr('opacity', 0)
|
|
6334
|
+
.attr('stroke', 'var(--color-background)')
|
|
6335
|
+
.attr('stroke-width', 0.6)
|
|
6336
|
+
.style('cursor', 'pointer')
|
|
6337
|
+
.on('mousemove', function (event, d) {
|
|
6338
|
+
const dur = formatDuration(d.endHour - d.startHour);
|
|
6339
|
+
const labelLine = `${d.emoji ?? ''} ${d.label ?? ''}${d.description ? ` — ${d.description}` : ''}`.trim();
|
|
6340
|
+
showTooltip(event, `<div class="${styles$5.tooltipLabel}">${labelLine || '·'}</div>` +
|
|
6341
|
+
`<div class="${styles$5.tooltipRow}">${ring.dayLabel} · ${formatHHMM(d.startHour)} → ${formatHHMM(d.endHour)}</div>` +
|
|
6342
|
+
`<div class="${styles$5.tooltipRow}">${dur}${d.isActive ? ' · running' : ''}</div>`);
|
|
6343
|
+
})
|
|
6344
|
+
.on('mouseleave', hideTooltip);
|
|
6345
|
+
// Sweep-in: arcs grow from startAngle to their actual endAngle, staggered by start time.
|
|
6346
|
+
arcSel
|
|
6347
|
+
.attr('d', (d) => arcGen({ ...d, endHour: d.startHour }))
|
|
6348
|
+
.transition()
|
|
6349
|
+
.delay((d) => (d.startHour / 24) * 600 + ringIdx * 80)
|
|
6350
|
+
.duration(550)
|
|
6351
|
+
.ease(d3.easeCubicOut)
|
|
6352
|
+
.attr('opacity', opacity)
|
|
6353
|
+
.attrTween('d', function (d) {
|
|
6354
|
+
const i = d3.interpolate(d.startHour, d.endHour);
|
|
6355
|
+
return (t) => arcGen({ ...d, endHour: i(t) }) || '';
|
|
6356
|
+
});
|
|
6357
|
+
});
|
|
6358
|
+
for (let h = 0; h < 24; h++) {
|
|
6359
|
+
const angle = hourToAngle(h) - Math.PI / 2;
|
|
6360
|
+
const isMajor = h % 3 === 0;
|
|
6361
|
+
const inner = outerR + 2;
|
|
6362
|
+
const outer = outerR + (isMajor ? 9 : 5);
|
|
6363
|
+
g.append('line')
|
|
6364
|
+
.attr('x1', Math.cos(angle) * inner)
|
|
6365
|
+
.attr('y1', Math.sin(angle) * inner)
|
|
6366
|
+
.attr('x2', Math.cos(angle) * outer)
|
|
6367
|
+
.attr('y2', Math.sin(angle) * outer)
|
|
6368
|
+
.attr('stroke', isMajor ? textColor : borderColor)
|
|
6369
|
+
.attr('stroke-width', isMajor ? 2 : 1);
|
|
6370
|
+
if (isMajor) {
|
|
6371
|
+
const labelR = outerR + 22;
|
|
6372
|
+
g.append('text')
|
|
6373
|
+
.attr('x', Math.cos(angle) * labelR)
|
|
6374
|
+
.attr('y', Math.sin(angle) * labelR)
|
|
6375
|
+
.attr('text-anchor', 'middle')
|
|
6376
|
+
.attr('dominant-baseline', 'middle')
|
|
6377
|
+
.attr('fill', mutedText)
|
|
6378
|
+
.attr('font-size', '11px')
|
|
6379
|
+
.attr('font-weight', 600)
|
|
6380
|
+
.text(String(h).padStart(2, '0'));
|
|
6381
|
+
}
|
|
6382
|
+
}
|
|
6383
|
+
g.append('circle')
|
|
6384
|
+
.attr('r', centerR - 2)
|
|
6385
|
+
.attr('fill', 'var(--color-background-secondary)')
|
|
6386
|
+
.attr('stroke', borderColor)
|
|
6387
|
+
.attr('stroke-width', 1);
|
|
6388
|
+
if (centerTopLabel) {
|
|
6389
|
+
g.append('text')
|
|
6390
|
+
.attr('text-anchor', 'middle')
|
|
6391
|
+
.attr('y', centerMainLabel ? -6 : 4)
|
|
6392
|
+
.attr('fill', mutedText)
|
|
6393
|
+
.attr('font-size', '10px')
|
|
6394
|
+
.attr('letter-spacing', '1.5px')
|
|
6395
|
+
.text(centerTopLabel);
|
|
6396
|
+
}
|
|
6397
|
+
if (centerMainLabel) {
|
|
6398
|
+
g.append('text')
|
|
6399
|
+
.attr('text-anchor', 'middle')
|
|
6400
|
+
.attr('y', centerTopLabel ? 14 : 4)
|
|
6401
|
+
.attr('fill', 'var(--color-text)')
|
|
6402
|
+
.attr('font-size', '18px')
|
|
6403
|
+
.attr('font-weight', 700)
|
|
6404
|
+
.text(centerMainLabel);
|
|
6405
|
+
}
|
|
6406
|
+
if (showNowHand) {
|
|
6407
|
+
const now = new Date();
|
|
6408
|
+
const nowHour = now.getHours() + now.getMinutes() / 60;
|
|
6409
|
+
const nowAngle = hourToAngle(nowHour) - Math.PI / 2;
|
|
6410
|
+
const handTipR = outerR + 6;
|
|
6411
|
+
g.append('line')
|
|
6412
|
+
.attr('x1', 0)
|
|
6413
|
+
.attr('y1', 0)
|
|
6414
|
+
.attr('x2', Math.cos(nowAngle) * handTipR)
|
|
6415
|
+
.attr('y2', Math.sin(nowAngle) * handTipR)
|
|
6416
|
+
.attr('stroke', 'var(--color-error)')
|
|
6417
|
+
.attr('stroke-width', 2.5)
|
|
6418
|
+
.attr('stroke-linecap', 'round')
|
|
6419
|
+
.style('opacity', 0)
|
|
6420
|
+
.transition()
|
|
6421
|
+
.delay(800)
|
|
6422
|
+
.duration(300)
|
|
6423
|
+
.style('opacity', 1);
|
|
6424
|
+
g.append('circle')
|
|
6425
|
+
.attr('cx', Math.cos(nowAngle) * handTipR)
|
|
6426
|
+
.attr('cy', Math.sin(nowAngle) * handTipR)
|
|
6427
|
+
.attr('r', 4)
|
|
6428
|
+
.attr('fill', 'var(--color-error)')
|
|
6429
|
+
.style('opacity', 0)
|
|
6430
|
+
.transition()
|
|
6431
|
+
.delay(800)
|
|
6432
|
+
.duration(300)
|
|
6433
|
+
.style('opacity', 1);
|
|
6434
|
+
g.append('circle')
|
|
6435
|
+
.attr('r', 5)
|
|
6436
|
+
.attr('fill', 'var(--color-error)')
|
|
6437
|
+
.attr('stroke', 'var(--color-background)')
|
|
6438
|
+
.attr('stroke-width', 1.5)
|
|
6439
|
+
.style('opacity', 0)
|
|
6440
|
+
.transition()
|
|
6441
|
+
.delay(800)
|
|
6442
|
+
.duration(300)
|
|
6443
|
+
.style('opacity', 1);
|
|
6444
|
+
}
|
|
6445
|
+
}, [size, rings, centerTopLabel, centerMainLabel, showNowHand, showTooltip, hideTooltip]);
|
|
6446
|
+
return (jsxs("div", { className: styles$5.container, ref: containerRef, children: [jsx("div", { className: styles$5.clockWrap, children: jsx("svg", { ref: svgRef }) }), jsx("div", { ref: tooltipRef, className: styles$5.tooltip })] }));
|
|
6447
|
+
};
|
|
6448
|
+
|
|
6449
|
+
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"};
|
|
6450
|
+
|
|
6451
|
+
const DEFAULT_PALETTE = [
|
|
6452
|
+
'#6366f1', '#8b5cf6', '#06b6d4', '#10b981',
|
|
6453
|
+
'#f59e0b', '#ef4444', '#ec4899', '#84cc16',
|
|
6454
|
+
'#f97316', '#3b82f6', '#14b8a6', '#a855f7',
|
|
6455
|
+
];
|
|
6456
|
+
const ChordDiagram = ({ labels, matrix, colors, emojis, edgeUnit = 'connections', size: fixedSize, minSize = 320, maxSize = 820, }) => {
|
|
6457
|
+
const containerRef = useRef(null);
|
|
6458
|
+
const svgRef = useRef(null);
|
|
6459
|
+
const tooltipRef = useRef(null);
|
|
6460
|
+
const [autoSize, setAutoSize] = useState(480);
|
|
6461
|
+
const size = fixedSize ?? autoSize;
|
|
6462
|
+
useEffect(() => {
|
|
6463
|
+
if (fixedSize)
|
|
6464
|
+
return;
|
|
6465
|
+
const c = containerRef.current;
|
|
6466
|
+
if (!c)
|
|
6467
|
+
return;
|
|
6468
|
+
const obs = new ResizeObserver((entries) => {
|
|
6469
|
+
for (const e of entries) {
|
|
6470
|
+
const w = e.contentRect.width;
|
|
6471
|
+
if (w > 0)
|
|
6472
|
+
setAutoSize(Math.max(minSize, Math.min(maxSize, w)));
|
|
6473
|
+
}
|
|
6474
|
+
});
|
|
6475
|
+
obs.observe(c);
|
|
6476
|
+
return () => obs.disconnect();
|
|
6477
|
+
}, [fixedSize, minSize, maxSize]);
|
|
6478
|
+
const showTip = useCallback((event, html) => {
|
|
6479
|
+
const tip = tooltipRef.current;
|
|
6480
|
+
const ctn = containerRef.current;
|
|
6481
|
+
if (!tip || !ctn)
|
|
6482
|
+
return;
|
|
6483
|
+
const rect = ctn.getBoundingClientRect();
|
|
6484
|
+
tip.style.left = `${event.clientX - rect.left + 12}px`;
|
|
6485
|
+
tip.style.top = `${event.clientY - rect.top - 10}px`;
|
|
6486
|
+
tip.innerHTML = html;
|
|
6487
|
+
tip.classList.add(styles$4.visible);
|
|
6488
|
+
}, []);
|
|
6489
|
+
const hideTip = useCallback(() => {
|
|
6490
|
+
tooltipRef.current?.classList.remove(styles$4.visible);
|
|
6491
|
+
}, []);
|
|
6492
|
+
useEffect(() => {
|
|
6493
|
+
if (!svgRef.current || labels.length === 0 || matrix.length === 0)
|
|
6494
|
+
return;
|
|
6495
|
+
const svg = d3.select(svgRef.current);
|
|
6496
|
+
svg.selectAll('*').remove();
|
|
6497
|
+
const inner = size / 2 - 50;
|
|
6498
|
+
const outer = inner + 16;
|
|
6499
|
+
const g = svg
|
|
6500
|
+
.attr('width', size)
|
|
6501
|
+
.attr('height', size)
|
|
6502
|
+
.append('g')
|
|
6503
|
+
.attr('transform', `translate(${size / 2}, ${size / 2})`);
|
|
6504
|
+
const chord = d3.chord().padAngle(0.04).sortSubgroups(d3.descending);
|
|
6505
|
+
const chords = chord(matrix);
|
|
6506
|
+
const arc = d3.arc().innerRadius(inner).outerRadius(outer);
|
|
6507
|
+
const ribbon = d3.ribbon().radius(inner);
|
|
6508
|
+
const colorOf = (i) => colors?.[i] || DEFAULT_PALETTE[i % DEFAULT_PALETTE.length];
|
|
6509
|
+
const emojiOf = (i) => emojis?.[i] ?? '•';
|
|
6510
|
+
const groupSel = g.append('g')
|
|
6511
|
+
.selectAll('path')
|
|
6512
|
+
.data(chords.groups)
|
|
6513
|
+
.join('path')
|
|
6514
|
+
.attr('d', arc)
|
|
6515
|
+
.attr('fill', (d) => colorOf(d.index))
|
|
6516
|
+
.attr('stroke', 'var(--color-background)')
|
|
6517
|
+
.attr('stroke-width', 1)
|
|
6518
|
+
.style('cursor', 'pointer')
|
|
6519
|
+
.style('opacity', 0)
|
|
6520
|
+
.on('mousemove', function (event, d) {
|
|
6521
|
+
const total = d.value;
|
|
6522
|
+
showTip(event, `<div class="${styles$4.tipLabel}">${emojiOf(d.index)} ${labels[d.index]}</div>` +
|
|
6523
|
+
`<div class="${styles$4.tipRow}">${total} ${edgeUnit}</div>`);
|
|
6524
|
+
})
|
|
6525
|
+
.on('mouseleave', hideTip);
|
|
6526
|
+
groupSel.transition()
|
|
6527
|
+
.delay((_, i) => i * 40)
|
|
6528
|
+
.duration(420)
|
|
6529
|
+
.ease(d3.easeCubicOut)
|
|
6530
|
+
.style('opacity', 1);
|
|
6531
|
+
const ribbonSel = g.append('g')
|
|
6532
|
+
.selectAll('path')
|
|
6533
|
+
.data(chords)
|
|
6534
|
+
.join('path')
|
|
6535
|
+
.attr('d', ribbon)
|
|
6536
|
+
.attr('fill', (d) => colorOf(d.source.index))
|
|
6537
|
+
.attr('opacity', 0)
|
|
6538
|
+
.attr('stroke', 'var(--color-background)')
|
|
6539
|
+
.attr('stroke-width', 0.4)
|
|
6540
|
+
.style('cursor', 'pointer')
|
|
6541
|
+
.on('mousemove', function (event, d) {
|
|
6542
|
+
const aToB = matrix[d.source.index]?.[d.target.index] ?? 0;
|
|
6543
|
+
const bToA = matrix[d.target.index]?.[d.source.index] ?? 0;
|
|
6544
|
+
showTip(event, `<div class="${styles$4.tipLabel}">${emojiOf(d.source.index)} ${labels[d.source.index]} ↔ ${emojiOf(d.target.index)} ${labels[d.target.index]}</div>` +
|
|
6545
|
+
`<div class="${styles$4.tipRow}">${labels[d.source.index]} → ${labels[d.target.index]}: ${aToB}</div>` +
|
|
6546
|
+
`<div class="${styles$4.tipRow}">${labels[d.target.index]} → ${labels[d.source.index]}: ${bToA}</div>`);
|
|
6547
|
+
})
|
|
6548
|
+
.on('mouseleave', hideTip);
|
|
6549
|
+
ribbonSel.transition()
|
|
6550
|
+
.delay(labels.length * 40 + 120)
|
|
6551
|
+
.duration(500)
|
|
6552
|
+
.ease(d3.easeCubicOut)
|
|
6553
|
+
.attr('opacity', 0.55);
|
|
6554
|
+
const labelSel = g.append('g')
|
|
6555
|
+
.selectAll('text')
|
|
6556
|
+
.data(chords.groups)
|
|
6557
|
+
.join('text')
|
|
6558
|
+
.attr('transform', (d) => {
|
|
6559
|
+
const angle = (d.startAngle + d.endAngle) / 2 - Math.PI / 2;
|
|
6560
|
+
const r = outer + 18;
|
|
6561
|
+
return `translate(${Math.cos(angle) * r}, ${Math.sin(angle) * r})`;
|
|
6562
|
+
})
|
|
6563
|
+
.attr('text-anchor', 'middle')
|
|
6564
|
+
.attr('dominant-baseline', 'middle')
|
|
6565
|
+
.attr('font-size', '16px')
|
|
6566
|
+
.style('pointer-events', 'none')
|
|
6567
|
+
.style('opacity', 0)
|
|
6568
|
+
.text((d) => emojiOf(d.index));
|
|
6569
|
+
labelSel.transition()
|
|
6570
|
+
.delay((_, i) => i * 40 + 200)
|
|
6571
|
+
.duration(300)
|
|
6572
|
+
.style('opacity', 1);
|
|
6573
|
+
}, [matrix, labels, size, colors, emojis, edgeUnit, showTip, hideTip]);
|
|
6574
|
+
return (jsxs("div", { className: styles$4.container, ref: containerRef, children: [jsx("div", { className: styles$4.svgWrap, children: jsx("svg", { ref: svgRef }) }), jsx("div", { ref: tooltipRef, className: styles$4.tooltip })] }));
|
|
6575
|
+
};
|
|
6576
|
+
|
|
6577
|
+
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"};
|
|
6578
|
+
|
|
6579
|
+
const DEFAULT_ACCENT = '#c8a14a';
|
|
6580
|
+
const PolarHeatmap = ({ cells, days, accentColor = DEFAULT_ACCENT, centerTopLabel, centerMainLabel, size: fixedSize, minSize = 320, maxSize = 560, }) => {
|
|
6581
|
+
const containerRef = useRef(null);
|
|
6582
|
+
const svgRef = useRef(null);
|
|
6583
|
+
const tooltipRef = useRef(null);
|
|
6584
|
+
const [autoSize, setAutoSize] = useState(560);
|
|
6585
|
+
const size = fixedSize ?? autoSize;
|
|
6586
|
+
useEffect(() => {
|
|
6587
|
+
if (fixedSize)
|
|
6588
|
+
return;
|
|
6589
|
+
const c = containerRef.current;
|
|
6590
|
+
if (!c)
|
|
6591
|
+
return;
|
|
6592
|
+
const obs = new ResizeObserver((entries) => {
|
|
6593
|
+
for (const e of entries) {
|
|
6594
|
+
const w = e.contentRect.width;
|
|
6595
|
+
if (w > 0)
|
|
6596
|
+
setAutoSize(Math.max(minSize, Math.min(maxSize, w)));
|
|
6597
|
+
}
|
|
6598
|
+
});
|
|
6599
|
+
obs.observe(c);
|
|
6600
|
+
return () => obs.disconnect();
|
|
6601
|
+
}, [fixedSize, minSize, maxSize]);
|
|
6602
|
+
const showTip = useCallback((event, html) => {
|
|
6603
|
+
const tip = tooltipRef.current;
|
|
6604
|
+
const ctn = containerRef.current;
|
|
6605
|
+
if (!tip || !ctn)
|
|
6606
|
+
return;
|
|
6607
|
+
const rect = ctn.getBoundingClientRect();
|
|
6608
|
+
tip.style.left = `${event.clientX - rect.left + 12}px`;
|
|
6609
|
+
tip.style.top = `${event.clientY - rect.top - 10}px`;
|
|
6610
|
+
tip.innerHTML = html;
|
|
6611
|
+
tip.classList.add(styles$3.visible);
|
|
6612
|
+
}, []);
|
|
6613
|
+
const hideTip = useCallback(() => {
|
|
6614
|
+
tooltipRef.current?.classList.remove(styles$3.visible);
|
|
6615
|
+
}, []);
|
|
6616
|
+
useEffect(() => {
|
|
6617
|
+
if (!svgRef.current || cells.length === 0 || days <= 0)
|
|
6618
|
+
return;
|
|
6619
|
+
const svg = d3.select(svgRef.current);
|
|
6620
|
+
svg.selectAll('*').remove();
|
|
6621
|
+
const outerR = size / 2 - 32;
|
|
6622
|
+
const innerR = 64;
|
|
6623
|
+
const ringGap = 4;
|
|
6624
|
+
const ringWidth = (outerR - innerR - ringGap * (days - 1)) / days;
|
|
6625
|
+
const defs = svg.append('defs');
|
|
6626
|
+
const gradId = `polar-heatmap-glow-${Math.random().toString(36).slice(2, 9)}`;
|
|
6627
|
+
const glow = defs
|
|
6628
|
+
.append('radialGradient')
|
|
6629
|
+
.attr('id', gradId)
|
|
6630
|
+
.attr('cx', '50%')
|
|
6631
|
+
.attr('cy', '50%')
|
|
6632
|
+
.attr('r', '50%');
|
|
6633
|
+
glow.append('stop').attr('offset', '0%').attr('stop-color', accentColor).attr('stop-opacity', 0.18);
|
|
6634
|
+
glow.append('stop').attr('offset', '60%').attr('stop-color', accentColor).attr('stop-opacity', 0.05);
|
|
6635
|
+
glow.append('stop').attr('offset', '100%').attr('stop-color', accentColor).attr('stop-opacity', 0);
|
|
6636
|
+
const g = svg
|
|
6637
|
+
.attr('width', size)
|
|
6638
|
+
.attr('height', size)
|
|
6639
|
+
.append('g')
|
|
6640
|
+
.attr('transform', `translate(${size / 2}, ${size / 2})`);
|
|
6641
|
+
const hourAngle = (h) => (h / 24) * Math.PI * 2;
|
|
6642
|
+
g.append('circle')
|
|
6643
|
+
.attr('r', outerR + 44)
|
|
6644
|
+
.attr('fill', `url(#${gradId})`);
|
|
6645
|
+
for (let h = 0; h < 24; h++) {
|
|
6646
|
+
const angle = hourAngle(h) - Math.PI / 2;
|
|
6647
|
+
g.append('line')
|
|
6648
|
+
.attr('x1', Math.cos(angle) * innerR)
|
|
6649
|
+
.attr('y1', Math.sin(angle) * innerR)
|
|
6650
|
+
.attr('x2', Math.cos(angle) * (outerR + 6))
|
|
6651
|
+
.attr('y2', Math.sin(angle) * (outerR + 6))
|
|
6652
|
+
.attr('stroke', accentColor)
|
|
6653
|
+
.attr('stroke-width', h % 3 === 0 ? 0.7 : 0.35)
|
|
6654
|
+
.attr('opacity', h % 3 === 0 ? 0.55 : 0.25);
|
|
6655
|
+
}
|
|
6656
|
+
const arcGen = d3
|
|
6657
|
+
.arc()
|
|
6658
|
+
.innerRadius((d) => outerR - d.dayOffset * (ringWidth + ringGap) - ringWidth)
|
|
6659
|
+
.outerRadius((d) => outerR - d.dayOffset * (ringWidth + ringGap))
|
|
6660
|
+
.startAngle((d) => hourAngle(d.hour))
|
|
6661
|
+
.endAngle((d) => hourAngle(d.hour + 1))
|
|
6662
|
+
.padAngle(0.014)
|
|
6663
|
+
.cornerRadius(2.5);
|
|
6664
|
+
const visibleCells = cells.filter((c) => c.dayOffset >= 0 && c.dayOffset < days && c.hour >= 0 && c.hour < 24);
|
|
6665
|
+
const cellSel = g.selectAll('path.cell')
|
|
6666
|
+
.data(visibleCells)
|
|
6667
|
+
.join('path')
|
|
6668
|
+
.attr('class', 'cell')
|
|
6669
|
+
.attr('d', arcGen)
|
|
6670
|
+
.attr('fill', (d) => d.color)
|
|
6671
|
+
.attr('opacity', 0)
|
|
6672
|
+
.style('cursor', (d) => (d.label ? 'pointer' : 'default'))
|
|
6673
|
+
.on('mousemove', function (event, d) {
|
|
6674
|
+
if (!d.label)
|
|
6675
|
+
return;
|
|
6676
|
+
const hr = `${String(d.hour).padStart(2, '0')}:00`;
|
|
6677
|
+
const dayLabel = d.dayLabel ?? (d.dayOffset === 0 ? 'Today' : `${d.dayOffset} days ago`);
|
|
6678
|
+
showTip(event, `<div class="${styles$3.tipLabel}">${d.emoji ?? ''} ${d.label}</div>` +
|
|
6679
|
+
`<div class="${styles$3.tipRow}">${dayLabel} · ${hr}</div>`);
|
|
6680
|
+
})
|
|
6681
|
+
.on('mouseleave', hideTip);
|
|
6682
|
+
cellSel.transition()
|
|
6683
|
+
.delay((d) => (d.hour / 24) * 600 + d.dayOffset * 30)
|
|
6684
|
+
.duration(380)
|
|
6685
|
+
.ease(d3.easeCubicOut)
|
|
6686
|
+
.attr('opacity', (d) => (d.label ? 0.88 : 0));
|
|
6687
|
+
g.append('circle')
|
|
6688
|
+
.attr('r', outerR + 16)
|
|
6689
|
+
.attr('fill', 'none')
|
|
6690
|
+
.attr('stroke', accentColor)
|
|
6691
|
+
.attr('stroke-width', 0.4)
|
|
6692
|
+
.attr('opacity', 0.4);
|
|
6693
|
+
for (let i = 0; i < 48; i++) {
|
|
6694
|
+
const angle = (i / 48) * Math.PI * 2 - Math.PI / 2;
|
|
6695
|
+
g.append('circle')
|
|
6696
|
+
.attr('cx', Math.cos(angle) * (outerR + 12))
|
|
6697
|
+
.attr('cy', Math.sin(angle) * (outerR + 12))
|
|
6698
|
+
.attr('r', i % 2 === 0 ? 1.4 : 0.6)
|
|
6699
|
+
.attr('fill', accentColor)
|
|
6700
|
+
.attr('opacity', i % 2 === 0 ? 0.75 : 0.4);
|
|
6701
|
+
}
|
|
6702
|
+
for (let h = 0; h < 24; h += 3) {
|
|
6703
|
+
const angle = hourAngle(h) - Math.PI / 2;
|
|
6704
|
+
const labelR = outerR + 28;
|
|
6705
|
+
g.append('text')
|
|
6706
|
+
.attr('x', Math.cos(angle) * labelR)
|
|
6707
|
+
.attr('y', Math.sin(angle) * labelR)
|
|
6708
|
+
.attr('text-anchor', 'middle')
|
|
6709
|
+
.attr('dominant-baseline', 'middle')
|
|
6710
|
+
.attr('fill', accentColor)
|
|
6711
|
+
.attr('font-size', '11px')
|
|
6712
|
+
.attr('font-weight', 600)
|
|
6713
|
+
.attr('letter-spacing', '1px')
|
|
6714
|
+
.attr('opacity', 0.85)
|
|
6715
|
+
.text(String(h).padStart(2, '0'));
|
|
6716
|
+
}
|
|
6717
|
+
g.append('circle')
|
|
6718
|
+
.attr('r', innerR - 4)
|
|
6719
|
+
.attr('fill', 'var(--color-background)');
|
|
6720
|
+
g.append('circle').attr('r', 3).attr('fill', accentColor).attr('opacity', 0.9);
|
|
6721
|
+
if (centerTopLabel) {
|
|
6722
|
+
g.append('text')
|
|
6723
|
+
.attr('text-anchor', 'middle')
|
|
6724
|
+
.attr('y', innerR - 33)
|
|
6725
|
+
.attr('fill', accentColor)
|
|
6726
|
+
.attr('font-size', '9px')
|
|
6727
|
+
.attr('letter-spacing', '3px')
|
|
6728
|
+
.attr('opacity', 0.85)
|
|
6729
|
+
.text(centerTopLabel);
|
|
6730
|
+
}
|
|
6731
|
+
if (centerMainLabel) {
|
|
6732
|
+
g.append('text')
|
|
6733
|
+
.attr('text-anchor', 'middle')
|
|
6734
|
+
.attr('y', innerR + 2)
|
|
6735
|
+
.attr('fill', accentColor)
|
|
6736
|
+
.attr('font-size', '14px')
|
|
6737
|
+
.attr('font-weight', 700)
|
|
6738
|
+
.attr('letter-spacing', '2px')
|
|
6739
|
+
.attr('opacity', 0.95)
|
|
6740
|
+
.text(centerMainLabel);
|
|
6741
|
+
}
|
|
6742
|
+
}, [cells, days, size, accentColor, centerTopLabel, centerMainLabel, showTip, hideTip]);
|
|
6743
|
+
return (jsxs("div", { className: styles$3.container, ref: containerRef, children: [jsx("div", { className: styles$3.svgWrap, children: jsx("svg", { ref: svgRef }) }), jsx("div", { ref: tooltipRef, className: styles$3.tooltip })] }));
|
|
6080
6744
|
};
|
|
6081
6745
|
|
|
6082
6746
|
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"};
|
|
@@ -6672,5 +7336,5 @@ const ConfirmationModal = ({ isOpen, onClose, onConfirm, title, message, confirm
|
|
|
6672
7336
|
return (jsx(AnimatePresence, { children: isOpen && (jsxs(Fragment, { children: [jsx(motion.div, { className: styles.overlay, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, onClick: !isLoading ? onClose : undefined }), jsx("div", { className: styles.positioner, children: jsxs(motion.div, { className: styles.modal, initial: { opacity: 0, scale: 0.9, y: 20 }, animate: { opacity: 1, scale: 1, y: 0 }, exit: { opacity: 0, scale: 0.9, y: 20 }, transition: { type: 'spring', stiffness: 300, damping: 30 }, children: [jsxs("div", { className: `${styles.header} ${styles[variant]}`, children: [jsx("h2", { className: styles.title, children: title }), !isLoading && (jsx("button", { className: styles.closeButton, onClick: onClose, type: "button", "aria-label": "Close", children: "\u2715" }))] }), jsx("div", { className: styles.content, children: jsx("p", { className: styles.message, children: message }) }), jsxs("div", { className: styles.footer, children: [jsx(Button, { type: "button", variant: "ghost", onClick: onClose, disabled: isLoading, children: cancelText }), jsx(Button, { type: "button", variant: variant === 'danger' ? 'danger' : 'primary', onClick: handleConfirm, disabled: isLoading, loading: isLoading, children: confirmText })] })] }) })] })) }));
|
|
6673
7337
|
};
|
|
6674
7338
|
|
|
6675
|
-
export { ArrayInput, BooleansHeatmap, Breadcrumb, Button, Calendar, Card, Checkbox, ConfirmationModal, DateInput, DecryptedText, EditFAB, EmptyState, HabitTimeOfDayChart, ImageSlideshow, LiquidButton, LoadingSpinner, Modal, MoodChart, Navbar, NumberStepper, PieChart, QuantifiableHabitsChart, RecurrencePicker, SearchBar, SearchableDropdown, SelectInput, SleepChart, Slider, StreamConsole, SunburstChart, Table, Tabs, TextArea, TextInput, ThemeProvider, ThemeSwitcher, TimeInput, ToastContainer, Toggle, ToggleButton, soundManager, useComponentSound, useSound, useTheme, useThemeSafe };
|
|
7339
|
+
export { ArrayInput, BooleansHeatmap, Breadcrumb, Button, Calendar, Card, Checkbox, ChordDiagram, ConfirmationModal, DateInput, DecryptedText, EditFAB, EmptyState, HabitTimeOfDayChart, ImageSlideshow, LiquidButton, LoadingSpinner, Modal, MoodChart, Navbar, NumberStepper, PieChart, PolarHeatmap, ProgressRings, QuantifiableHabitsChart, RadialDayChart, RecurrencePicker, SearchBar, SearchableDropdown, SelectInput, SleepChart, Slider, StreamConsole, SunburstChart, Table, Tabs, TextArea, TextInput, ThemeProvider, ThemeSwitcher, TimeInput, ToastContainer, Toggle, ToggleButton, soundManager, useComponentSound, useSound, useTheme, useThemeSafe };
|
|
6676
7340
|
//# sourceMappingURL=index.esm.js.map
|