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