erp-pro-ui 0.2.6 → 0.2.7
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/accordion.cjs +1 -1
- package/dist/accordion.mjs +1 -1
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +1 -1
- package/dist/animated-content.cjs +1 -1
- package/dist/animated-content.mjs +1 -1
- package/dist/ascii-text.cjs +1 -1
- package/dist/ascii-text.mjs +1 -1
- package/dist/background-gradient-animation.cjs +1 -1
- package/dist/background-gradient-animation.mjs +1 -1
- package/dist/button-hover-border-gradient.cjs +1 -1
- package/dist/button-hover-border-gradient.mjs +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +1 -1
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +1 -1
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +1 -1
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +1 -1
- package/dist/catalog.cjs +7 -0
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.d.ts +13 -1
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.mjs +7 -0
- package/dist/catalog.mjs.map +1 -1
- package/dist/charts.cjs +1 -1
- package/dist/charts.mjs +1 -1
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +1 -1
- package/dist/chip.cjs +1 -1
- package/dist/chip.mjs +1 -1
- package/dist/chroma-grid.cjs +1 -1
- package/dist/chroma-grid.mjs +1 -1
- package/dist/chunks/{Drawer-Y0_sJni5.mjs → Drawer-BhTTQV8Q.mjs} +2 -2
- package/dist/chunks/{Drawer-Y0_sJni5.mjs.map → Drawer-BhTTQV8Q.mjs.map} +1 -1
- package/dist/chunks/{Drawer-D72Xi2Gq.cjs → Drawer-C_DLqrus.cjs} +2 -3
- package/dist/chunks/{Drawer-D72Xi2Gq.cjs.map → Drawer-C_DLqrus.cjs.map} +1 -1
- package/dist/chunks/{DropdownMenu-BQ4WlaGp.mjs → DropdownMenu-B18BI5l7.mjs} +2 -2
- package/dist/chunks/{DropdownMenu-BQ4WlaGp.mjs.map → DropdownMenu-B18BI5l7.mjs.map} +1 -1
- package/dist/chunks/{DropdownMenu-yh04burS.cjs → DropdownMenu-CEmlmX7P.cjs} +2 -3
- package/dist/chunks/{DropdownMenu-yh04burS.cjs.map → DropdownMenu-CEmlmX7P.cjs.map} +1 -1
- package/dist/chunks/{HoverBorderGradient-DEtm3owk.mjs → HoverBorderGradient-CGKcviEd.mjs} +2 -2
- package/dist/chunks/{HoverBorderGradient-DEtm3owk.mjs.map → HoverBorderGradient-CGKcviEd.mjs.map} +1 -1
- package/dist/chunks/{HoverBorderGradient-DMMyr2L3.cjs → HoverBorderGradient-DTKasFZO.cjs} +2 -3
- package/dist/chunks/{HoverBorderGradient-DMMyr2L3.cjs.map → HoverBorderGradient-DTKasFZO.cjs.map} +1 -1
- package/dist/chunks/{SunToMoonButton-BOKHzC1H.mjs → SunToMoonButton-DIMK53fW.mjs} +2 -2
- package/dist/chunks/{SunToMoonButton-BOKHzC1H.mjs.map → SunToMoonButton-DIMK53fW.mjs.map} +1 -1
- package/dist/chunks/{SunToMoonButton-gX4Kk_5B.cjs → SunToMoonButton-DUuIqw22.cjs} +2 -3
- package/dist/chunks/{SunToMoonButton-gX4Kk_5B.cjs.map → SunToMoonButton-DUuIqw22.cjs.map} +1 -1
- package/dist/chunks/{Tooltip-nnaiqJTT.cjs → Tooltip-1yPGRJ2Q.cjs} +1 -2
- package/dist/chunks/{Tooltip-nnaiqJTT.cjs.map → Tooltip-1yPGRJ2Q.cjs.map} +1 -1
- package/dist/chunks/{Tooltip-LbOKP__2.mjs → Tooltip-CEj-I4JO.mjs} +1 -1
- package/dist/chunks/{Tooltip-LbOKP__2.mjs.map → Tooltip-CEj-I4JO.mjs.map} +1 -1
- package/dist/chunks/{accordion-CLcjNX_X.mjs → accordion-Cf-Q3rec.mjs} +2 -2
- package/dist/chunks/{accordion-CLcjNX_X.mjs.map → accordion-Cf-Q3rec.mjs.map} +1 -1
- package/dist/chunks/{accordion-Bj3Sj0mC.cjs → accordion-X4PNqWkW.cjs} +2 -3
- package/dist/chunks/{accordion-Bj3Sj0mC.cjs.map → accordion-X4PNqWkW.cjs.map} +1 -1
- package/dist/chunks/{alert-BBA4Sh4e.cjs → alert-BEMULPIi.cjs} +2 -3
- package/dist/chunks/{alert-BBA4Sh4e.cjs.map → alert-BEMULPIi.cjs.map} +1 -1
- package/dist/chunks/{alert-oUz79MGc.mjs → alert-GImBqaCY.mjs} +2 -2
- package/dist/chunks/{alert-oUz79MGc.mjs.map → alert-GImBqaCY.mjs.map} +1 -1
- package/dist/chunks/{animated-content-CiNJLgbq.mjs → animated-content-Bp-Yt0_7.mjs} +1 -1
- package/dist/chunks/{animated-content-CiNJLgbq.mjs.map → animated-content-Bp-Yt0_7.mjs.map} +1 -1
- package/dist/chunks/{animated-content-B3wbiWQI.cjs → animated-content-tSHXDZq2.cjs} +1 -2
- package/dist/chunks/{animated-content-B3wbiWQI.cjs.map → animated-content-tSHXDZq2.cjs.map} +1 -1
- package/dist/chunks/{ascii-text-KwVE41Hw.cjs → ascii-text-Ctua6ucZ.cjs} +2 -2
- package/dist/chunks/{ascii-text-KwVE41Hw.cjs.map → ascii-text-Ctua6ucZ.cjs.map} +1 -1
- package/dist/chunks/{ascii-text-C6JegLhP.mjs → ascii-text-QyP7JU7g.mjs} +1 -1
- package/dist/chunks/{ascii-text-C6JegLhP.mjs.map → ascii-text-QyP7JU7g.mjs.map} +1 -1
- package/dist/chunks/{background-gradient-animation-CTc2ZR74.mjs → background-gradient-animation-CZUD_aq2.mjs} +2 -2
- package/dist/chunks/{background-gradient-animation-CTc2ZR74.mjs.map → background-gradient-animation-CZUD_aq2.mjs.map} +1 -1
- package/dist/chunks/{background-gradient-animation-1LZY3DYT.cjs → background-gradient-animation-PvM0i88k.cjs} +2 -3
- package/dist/chunks/{background-gradient-animation-1LZY3DYT.cjs.map → background-gradient-animation-PvM0i88k.cjs.map} +1 -1
- package/dist/chunks/{button-IDShmQqA.mjs → button-CAU9ej3h.mjs} +2 -2
- package/dist/chunks/{button-IDShmQqA.mjs.map → button-CAU9ej3h.mjs.map} +1 -1
- package/dist/chunks/{button-uD87K76W.cjs → button-D2ZYmVda.cjs} +2 -3
- package/dist/chunks/{button-uD87K76W.cjs.map → button-D2ZYmVda.cjs.map} +1 -1
- package/dist/chunks/{button-hover-border-gradient-DGZqd8je.cjs → button-hover-border-gradient-D12Zjmd3.cjs} +2 -3
- package/dist/chunks/{button-hover-border-gradient-DGZqd8je.cjs.map → button-hover-border-gradient-D12Zjmd3.cjs.map} +1 -1
- package/dist/chunks/{button-hover-border-gradient-B2ebbDek.mjs → button-hover-border-gradient-VNEg4V0o.mjs} +2 -2
- package/dist/chunks/{button-hover-border-gradient-B2ebbDek.mjs.map → button-hover-border-gradient-VNEg4V0o.mjs.map} +1 -1
- package/dist/chunks/calendar-BlUhssD4.mjs +203 -0
- package/dist/chunks/calendar-BlUhssD4.mjs.map +1 -0
- package/dist/chunks/calendar-CdKKhdx5.cjs +208 -0
- package/dist/chunks/calendar-CdKKhdx5.cjs.map +1 -0
- package/dist/chunks/{card-Cuud0jIt.cjs → card-C_Qr7E6E.cjs} +1 -2
- package/dist/chunks/{card-Cuud0jIt.cjs.map → card-C_Qr7E6E.cjs.map} +1 -1
- package/dist/chunks/{card-DNeC6jqk.mjs → card-DYHDNCPK.mjs} +1 -1
- package/dist/chunks/{card-DNeC6jqk.mjs.map → card-DYHDNCPK.mjs.map} +1 -1
- package/dist/chunks/{carousel-xHkrV_pt.cjs → carousel-DtOJEbEU.cjs} +4 -5
- package/dist/chunks/{carousel-xHkrV_pt.cjs.map → carousel-DtOJEbEU.cjs.map} +1 -1
- package/dist/chunks/{carousel-Dpe5QLJK.mjs → carousel-eeqWZZHE.mjs} +4 -4
- package/dist/chunks/{carousel-Dpe5QLJK.mjs.map → carousel-eeqWZZHE.mjs.map} +1 -1
- package/dist/chunks/{chartStyles-BADmRKZo.cjs → chartStyles-2mTluDoo.cjs} +1 -1
- package/dist/chunks/{chartStyles-BADmRKZo.cjs.map → chartStyles-2mTluDoo.cjs.map} +1 -1
- package/dist/chunks/{chartStyles-DPXgYmGn.mjs → chartStyles-DrHVYS5N.mjs} +1 -1
- package/dist/chunks/{chartStyles-DPXgYmGn.mjs.map → chartStyles-DrHVYS5N.mjs.map} +1 -1
- package/dist/chunks/{charts-COx3IbI2.cjs → charts-DMu4zp8j.cjs} +4 -4
- package/dist/chunks/{charts-COx3IbI2.cjs.map → charts-DMu4zp8j.cjs.map} +1 -1
- package/dist/chunks/{charts-C-KQ3Nk5.mjs → charts-DlskmT1J.mjs} +3 -3
- package/dist/chunks/{charts-C-KQ3Nk5.mjs.map → charts-DlskmT1J.mjs.map} +1 -1
- package/dist/chunks/{checkbox-Y04NlzB8.mjs → checkbox-D7EJQbqC.mjs} +1 -1
- package/dist/chunks/{checkbox-Y04NlzB8.mjs.map → checkbox-D7EJQbqC.mjs.map} +1 -1
- package/dist/chunks/{checkbox-CDknzh89.cjs → checkbox-Lw2UqyNE.cjs} +1 -2
- package/dist/chunks/{checkbox-CDknzh89.cjs.map → checkbox-Lw2UqyNE.cjs.map} +1 -1
- package/dist/chunks/{chip-sfQlzrbo.cjs → chip-D5i9VT9O.cjs} +4 -5
- package/dist/chunks/{chip-sfQlzrbo.cjs.map → chip-D5i9VT9O.cjs.map} +1 -1
- package/dist/chunks/{chip-B3j6R6sO.mjs → chip-DBlSQcqR.mjs} +4 -4
- package/dist/chunks/{chip-B3j6R6sO.mjs.map → chip-DBlSQcqR.mjs.map} +1 -1
- package/dist/chunks/{chroma-grid-Bp55pKEm.cjs → chroma-grid-CTDtdFUm.cjs} +2 -3
- package/dist/chunks/{chroma-grid-Bp55pKEm.cjs.map → chroma-grid-CTDtdFUm.cjs.map} +1 -1
- package/dist/chunks/{chroma-grid-BHS9qAn_.mjs → chroma-grid-DuLTfGVP.mjs} +2 -2
- package/dist/chunks/{chroma-grid-BHS9qAn_.mjs.map → chroma-grid-DuLTfGVP.mjs.map} +1 -1
- package/dist/chunks/{color-palette-Duud5Iqq.cjs → color-palette-DQQ9UV0N.cjs} +2 -2
- package/dist/chunks/{color-palette-Duud5Iqq.cjs.map → color-palette-DQQ9UV0N.cjs.map} +1 -1
- package/dist/chunks/{color-palette-D9Qlw2Cx.mjs → color-palette-G1HUXWJP.mjs} +1 -1
- package/dist/chunks/{color-palette-D9Qlw2Cx.mjs.map → color-palette-G1HUXWJP.mjs.map} +1 -1
- package/dist/chunks/{combobox-C3a2iogC.cjs → combobox-CkNzH1YV.cjs} +6 -6
- package/dist/chunks/{combobox-C3a2iogC.cjs.map → combobox-CkNzH1YV.cjs.map} +1 -1
- package/dist/chunks/{combobox-neBItbtz.mjs → combobox-xNmFFHd6.mjs} +5 -5
- package/dist/chunks/{combobox-neBItbtz.mjs.map → combobox-xNmFFHd6.mjs.map} +1 -1
- package/dist/chunks/dashboard-cards-Bww66_5K.cjs +6570 -0
- package/dist/chunks/dashboard-cards-Bww66_5K.cjs.map +1 -0
- package/dist/chunks/dashboard-cards-lnifLEyj.mjs +6385 -0
- package/dist/chunks/dashboard-cards-lnifLEyj.mjs.map +1 -0
- package/dist/chunks/{data-table-BZEiSZI2.cjs → data-table-BCVbzkLo.cjs} +16 -17
- package/dist/chunks/{data-table-BZEiSZI2.cjs.map → data-table-BCVbzkLo.cjs.map} +1 -1
- package/dist/chunks/{data-table-EfGKkerd.mjs → data-table-C25KHEn4.mjs} +14 -15
- package/dist/chunks/{data-table-EfGKkerd.mjs.map → data-table-C25KHEn4.mjs.map} +1 -1
- package/dist/chunks/date-picker--cqsgsIV.mjs +587 -0
- package/dist/chunks/date-picker--cqsgsIV.mjs.map +1 -0
- package/dist/chunks/date-picker-BJQdFyqr.cjs +592 -0
- package/dist/chunks/date-picker-BJQdFyqr.cjs.map +1 -0
- package/dist/chunks/{dialog-B60BjJz0.mjs → dialog-BHIeG3Sg.mjs} +3 -3
- package/dist/chunks/{dialog-B60BjJz0.mjs.map → dialog-BHIeG3Sg.mjs.map} +1 -1
- package/dist/chunks/{dialog-i9LdkXmF.cjs → dialog-CLKU0cXX.cjs} +3 -4
- package/dist/chunks/{dialog-i9LdkXmF.cjs.map → dialog-CLKU0cXX.cjs.map} +1 -1
- package/dist/chunks/draggable-grid-2L_eHKfp.cjs +245 -0
- package/dist/chunks/draggable-grid-2L_eHKfp.cjs.map +1 -0
- package/dist/chunks/draggable-grid-IuCMSOsE.mjs +240 -0
- package/dist/chunks/draggable-grid-IuCMSOsE.mjs.map +1 -0
- package/dist/chunks/{event-calendar-BbFOUDov.mjs → event-calendar-CO2doGJW.mjs} +11 -11
- package/dist/chunks/{event-calendar-BbFOUDov.mjs.map → event-calendar-CO2doGJW.mjs.map} +1 -1
- package/dist/chunks/{event-calendar-Bljd_7PI.cjs → event-calendar-CvficOuV.cjs} +11 -12
- package/dist/chunks/{event-calendar-Bljd_7PI.cjs.map → event-calendar-CvficOuV.cjs.map} +1 -1
- package/dist/chunks/{form-DGwdlSW2.cjs → form-DARN6jtX.cjs} +1 -2
- package/dist/chunks/{form-DGwdlSW2.cjs.map → form-DARN6jtX.cjs.map} +1 -1
- package/dist/chunks/{form-CDc9UM3r.mjs → form-DNuFklNR.mjs} +1 -1
- package/dist/chunks/{form-CDc9UM3r.mjs.map → form-DNuFklNR.mjs.map} +1 -1
- package/dist/chunks/{gradual-blur-BNYVlqb1.cjs → gradual-blur-BBLbpXD4.cjs} +2 -3
- package/dist/chunks/{gradual-blur-BNYVlqb1.cjs.map → gradual-blur-BBLbpXD4.cjs.map} +1 -1
- package/dist/chunks/{gradual-blur-Bw2KNmXb.mjs → gradual-blur-BPx2MSWI.mjs} +2 -2
- package/dist/chunks/{gradual-blur-Bw2KNmXb.mjs.map → gradual-blur-BPx2MSWI.mjs.map} +1 -1
- package/dist/chunks/{hover-card-G66SUyjq.mjs → hover-card-BkVHGXz6.mjs} +1 -1
- package/dist/chunks/{hover-card-G66SUyjq.mjs.map → hover-card-BkVHGXz6.mjs.map} +1 -1
- package/dist/chunks/{hover-card-Dp6Y2h2J.cjs → hover-card-DwZFtu8w.cjs} +1 -2
- package/dist/chunks/{hover-card-Dp6Y2h2J.cjs.map → hover-card-DwZFtu8w.cjs.map} +1 -1
- package/dist/chunks/{icons-ub9iu-JG.cjs → icons-Ci8yEvvF.cjs} +48 -2
- package/dist/chunks/icons-Ci8yEvvF.cjs.map +1 -0
- package/dist/chunks/{icons-JzMKLygv.mjs → icons-CkVHNbbN.mjs} +43 -2
- package/dist/chunks/icons-CkVHNbbN.mjs.map +1 -0
- package/dist/chunks/{input-CRc3MKb_.mjs → input-B-XSdnfh.mjs} +4 -4
- package/dist/chunks/{input-CRc3MKb_.mjs.map → input-B-XSdnfh.mjs.map} +1 -1
- package/dist/chunks/{input-DMTwz27q.cjs → input-EH7x0pQY.cjs} +4 -5
- package/dist/chunks/{input-DMTwz27q.cjs.map → input-EH7x0pQY.cjs.map} +1 -1
- package/dist/chunks/{label-Bc_r54NU.mjs → label-CcsncrKQ.mjs} +1 -1
- package/dist/chunks/{label-Bc_r54NU.mjs.map → label-CcsncrKQ.mjs.map} +1 -1
- package/dist/chunks/{label-B5Ugq0Nk.cjs → label-Du-5H7wd.cjs} +1 -2
- package/dist/chunks/{label-B5Ugq0Nk.cjs.map → label-Du-5H7wd.cjs.map} +1 -1
- package/dist/chunks/{loading-ll2L6lc7.mjs → loading-2Lh_355V.mjs} +2 -2
- package/dist/chunks/{loading-ll2L6lc7.mjs.map → loading-2Lh_355V.mjs.map} +1 -1
- package/dist/chunks/{loading-DZKJc3e7.cjs → loading-DeGHTDO2.cjs} +2 -3
- package/dist/chunks/{loading-DZKJc3e7.cjs.map → loading-DeGHTDO2.cjs.map} +1 -1
- package/dist/chunks/{multi-select-combobox-C_8sxaiL.mjs → multi-select-combobox-BOdKmPj2.mjs} +4 -4
- package/dist/chunks/{multi-select-combobox-C_8sxaiL.mjs.map → multi-select-combobox-BOdKmPj2.mjs.map} +1 -1
- package/dist/chunks/{multi-select-combobox-CFJGq1hn.cjs → multi-select-combobox-PPYRcaPg.cjs} +5 -5
- package/dist/chunks/{multi-select-combobox-CFJGq1hn.cjs.map → multi-select-combobox-PPYRcaPg.cjs.map} +1 -1
- package/dist/chunks/{otp-input-BpcTJOmU.mjs → otp-input--_itTXaL.mjs} +1 -1
- package/dist/chunks/{otp-input-BpcTJOmU.mjs.map → otp-input--_itTXaL.mjs.map} +1 -1
- package/dist/chunks/{otp-input-B5-tuc0q.cjs → otp-input-Dgw_47Z7.cjs} +1 -2
- package/dist/chunks/{otp-input-B5-tuc0q.cjs.map → otp-input-Dgw_47Z7.cjs.map} +1 -1
- package/dist/chunks/{overlay-DzE_GyYf.cjs → overlay-15EzdrIu.cjs} +1 -2
- package/dist/chunks/{overlay-DzE_GyYf.cjs.map → overlay-15EzdrIu.cjs.map} +1 -1
- package/dist/chunks/{overlay-CG1dMYtO.mjs → overlay-BMbhF-EC.mjs} +1 -1
- package/dist/chunks/{overlay-CG1dMYtO.mjs.map → overlay-BMbhF-EC.mjs.map} +1 -1
- package/dist/chunks/{password-strength-meter-_o1T1HLO.cjs → password-strength-meter-Be1c-dnK.cjs} +2 -3
- package/dist/chunks/{password-strength-meter-_o1T1HLO.cjs.map → password-strength-meter-Be1c-dnK.cjs.map} +1 -1
- package/dist/chunks/{password-strength-meter-CH6uQAuK.mjs → password-strength-meter-Q1Qr-4tz.mjs} +2 -2
- package/dist/chunks/{password-strength-meter-CH6uQAuK.mjs.map → password-strength-meter-Q1Qr-4tz.mjs.map} +1 -1
- package/dist/chunks/{progress-bar-FfdFVvTT.cjs → progress-bar-BsnX079N.cjs} +3 -3
- package/dist/chunks/{progress-bar-FfdFVvTT.cjs.map → progress-bar-BsnX079N.cjs.map} +1 -1
- package/dist/chunks/{progress-bar-BAvRSW1b.mjs → progress-bar-l5WpbpZf.mjs} +2 -2
- package/dist/chunks/{progress-bar-BAvRSW1b.mjs.map → progress-bar-l5WpbpZf.mjs.map} +1 -1
- package/dist/chunks/{radio-BMOnxnUS.mjs → radio-B94_TGtz.mjs} +2 -2
- package/dist/chunks/{radio-BMOnxnUS.mjs.map → radio-B94_TGtz.mjs.map} +1 -1
- package/dist/chunks/{radio-wagafWwx.cjs → radio-W_NiS_dO.cjs} +2 -3
- package/dist/chunks/{radio-wagafWwx.cjs.map → radio-W_NiS_dO.cjs.map} +1 -1
- package/dist/chunks/{select-zFFyNmlY.cjs → select-C5lkcrSB.cjs} +5 -6
- package/dist/chunks/{select-zFFyNmlY.cjs.map → select-C5lkcrSB.cjs.map} +1 -1
- package/dist/chunks/{select--DeSgPdn.mjs → select-DnSSxddm.mjs} +5 -5
- package/dist/chunks/{select--DeSgPdn.mjs.map → select-DnSSxddm.mjs.map} +1 -1
- package/dist/chunks/{sidebar-oemmRzCL.mjs → sidebar-C3Sx87wD.mjs} +10 -11
- package/dist/chunks/{sidebar-oemmRzCL.mjs.map → sidebar-C3Sx87wD.mjs.map} +1 -1
- package/dist/chunks/{sidebar-Cq7UbKJT.cjs → sidebar-DDRWkz5k.cjs} +10 -12
- package/dist/chunks/{sidebar-Cq7UbKJT.cjs.map → sidebar-DDRWkz5k.cjs.map} +1 -1
- package/dist/chunks/{skeleton-DWvVc17T.cjs → skeleton-B2u9c1xJ.cjs} +2 -3
- package/dist/chunks/{skeleton-DWvVc17T.cjs.map → skeleton-B2u9c1xJ.cjs.map} +1 -1
- package/dist/chunks/{skeleton-BsDMlWZG.mjs → skeleton-DVAlrOq2.mjs} +2 -2
- package/dist/chunks/{skeleton-BsDMlWZG.mjs.map → skeleton-DVAlrOq2.mjs.map} +1 -1
- package/dist/chunks/{spinners-DlMcokJa.mjs → spinners-BQtIp2ov.mjs} +2 -2
- package/dist/chunks/{spinners-DlMcokJa.mjs.map → spinners-BQtIp2ov.mjs.map} +1 -1
- package/dist/chunks/{spinners-DBAJliAj.cjs → spinners-BiebALzS.cjs} +2 -3
- package/dist/chunks/{spinners-DBAJliAj.cjs.map → spinners-BiebALzS.cjs.map} +1 -1
- package/dist/chunks/{splash-cursor-CQ6_HwHV.cjs → splash-cursor-8b7ORB2k.cjs} +2 -3
- package/dist/chunks/{splash-cursor-CQ6_HwHV.cjs.map → splash-cursor-8b7ORB2k.cjs.map} +1 -1
- package/dist/chunks/{splash-cursor-Bb7LSzaO.mjs → splash-cursor-CeZffMed.mjs} +2 -2
- package/dist/chunks/{splash-cursor-Bb7LSzaO.mjs.map → splash-cursor-CeZffMed.mjs.map} +1 -1
- package/dist/chunks/{spotlight-card-COfSD7ns.cjs → spotlight-card-BQjp7hO1.cjs} +2 -3
- package/dist/chunks/{spotlight-card-COfSD7ns.cjs.map → spotlight-card-BQjp7hO1.cjs.map} +1 -1
- package/dist/chunks/{spotlight-card-Bs0iiSLc.mjs → spotlight-card-DiPtBCAK.mjs} +2 -2
- package/dist/chunks/{spotlight-card-Bs0iiSLc.mjs.map → spotlight-card-DiPtBCAK.mjs.map} +1 -1
- package/dist/chunks/{stepper-CTteR-Kj.cjs → stepper-BuhQfQTH.cjs} +5 -6
- package/dist/chunks/{stepper-CTteR-Kj.cjs.map → stepper-BuhQfQTH.cjs.map} +1 -1
- package/dist/chunks/{stepper-B9NdZ6ZV.mjs → stepper-CVNcexxq.mjs} +5 -5
- package/dist/chunks/{stepper-B9NdZ6ZV.mjs.map → stepper-CVNcexxq.mjs.map} +1 -1
- package/dist/chunks/{sun-to-moon-button-lt-1vmWm.cjs → sun-to-moon-button-BzYGFhrg.cjs} +4 -5
- package/dist/chunks/{sun-to-moon-button-lt-1vmWm.cjs.map → sun-to-moon-button-BzYGFhrg.cjs.map} +1 -1
- package/dist/chunks/{sun-to-moon-button-DWHDpP5B.mjs → sun-to-moon-button-CRXBMFZb.mjs} +4 -4
- package/dist/chunks/{sun-to-moon-button-DWHDpP5B.mjs.map → sun-to-moon-button-CRXBMFZb.mjs.map} +1 -1
- package/dist/chunks/{switch-BbFl5b4t.cjs → switch-CEoT3MgX.cjs} +1 -2
- package/dist/chunks/{switch-BbFl5b4t.cjs.map → switch-CEoT3MgX.cjs.map} +1 -1
- package/dist/chunks/{switch--68scepb.mjs → switch-DUnNe4xP.mjs} +1 -1
- package/dist/chunks/{switch--68scepb.mjs.map → switch-DUnNe4xP.mjs.map} +1 -1
- package/dist/chunks/{textarea-U_JeSWI3.cjs → textarea-Bschfj24.cjs} +2 -3
- package/dist/chunks/{textarea-U_JeSWI3.cjs.map → textarea-Bschfj24.cjs.map} +1 -1
- package/dist/chunks/{textarea-CEj9voUJ.mjs → textarea-CfeKo5HA.mjs} +2 -2
- package/dist/chunks/{textarea-CEj9voUJ.mjs.map → textarea-CfeKo5HA.mjs.map} +1 -1
- package/dist/chunks/{theme-koPrLKQv.mjs → theme-BXML6jHE.mjs} +1 -1
- package/dist/chunks/{theme-koPrLKQv.mjs.map → theme-BXML6jHE.mjs.map} +1 -1
- package/dist/chunks/{theme-D6B-FaoE.cjs → theme-BzTaXYZ8.cjs} +1 -2
- package/dist/chunks/{theme-D6B-FaoE.cjs.map → theme-BzTaXYZ8.cjs.map} +1 -1
- package/dist/chunks/{toast-CyY8VZN7.mjs → toast-D1W0BvoH.mjs} +2 -2
- package/dist/chunks/{toast-CyY8VZN7.mjs.map → toast-D1W0BvoH.mjs.map} +1 -1
- package/dist/chunks/{toast-2yq4Q7-q.cjs → toast-DL8svc6q.cjs} +2 -3
- package/dist/chunks/{toast-2yq4Q7-q.cjs.map → toast-DL8svc6q.cjs.map} +1 -1
- package/dist/chunks/{truncated-text-CswjmrHZ.cjs → truncated-text-D0t4atw5.cjs} +3 -3
- package/dist/chunks/{truncated-text-CswjmrHZ.cjs.map → truncated-text-D0t4atw5.cjs.map} +1 -1
- package/dist/chunks/{truncated-text-DUYTW1KP.mjs → truncated-text-DIkg-8Vo.mjs} +2 -2
- package/dist/chunks/{truncated-text-DUYTW1KP.mjs.map → truncated-text-DIkg-8Vo.mjs.map} +1 -1
- package/dist/chunks/{typography-CFIiYk1d.cjs → typography-C5fYwhp2.cjs} +3 -3
- package/dist/chunks/{typography-CFIiYk1d.cjs.map → typography-C5fYwhp2.cjs.map} +1 -1
- package/dist/chunks/{typography-DHE9sUZ8.mjs → typography-Czi7t5y4.mjs} +2 -2
- package/dist/chunks/{typography-DHE9sUZ8.mjs.map → typography-Czi7t5y4.mjs.map} +1 -1
- package/dist/chunks/{utils-LRbEQHYs.cjs → utils-CoA0q63n.cjs} +84 -4
- package/dist/chunks/utils-CoA0q63n.cjs.map +1 -0
- package/dist/chunks/{utils-7S0u48mU.mjs → utils-Dc7j29ec.mjs} +84 -4
- package/dist/chunks/utils-Dc7j29ec.mjs.map +1 -0
- package/dist/color-palette.cjs +1 -1
- package/dist/color-palette.mjs +1 -1
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.mjs +1 -1
- package/dist/components/data-display/dashboard-cards/AIFeatureAdoptionCard.d.ts +26 -0
- package/dist/components/data-display/dashboard-cards/AIFeatureAdoptionCard.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/AIInsightsCard.d.ts +30 -0
- package/dist/components/data-display/dashboard-cards/AIInsightsCard.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/AcquisitionChannelCard.d.ts +24 -0
- package/dist/components/data-display/dashboard-cards/AcquisitionChannelCard.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/BarBreakdownCard.d.ts +49 -0
- package/dist/components/data-display/dashboard-cards/BarBreakdownCard.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/CustomerLifecycleCard.d.ts +24 -0
- package/dist/components/data-display/dashboard-cards/CustomerLifecycleCard.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/EarningReportsTabsCard.d.ts +111 -2
- package/dist/components/data-display/dashboard-cards/EarningReportsTabsCard.d.ts.map +1 -1
- package/dist/components/data-display/dashboard-cards/FinancialPLCard.d.ts +78 -0
- package/dist/components/data-display/dashboard-cards/FinancialPLCard.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/InventoryCards.d.ts +44 -0
- package/dist/components/data-display/dashboard-cards/InventoryCards.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/PaymentSummaryCard.d.ts +45 -0
- package/dist/components/data-display/dashboard-cards/PaymentSummaryCard.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/SalesHeatmapCard.d.ts +36 -0
- package/dist/components/data-display/dashboard-cards/SalesHeatmapCard.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/SeatUtilizationCard.d.ts +22 -0
- package/dist/components/data-display/dashboard-cards/SeatUtilizationCard.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/SubscriptionHealthCard.d.ts +23 -0
- package/dist/components/data-display/dashboard-cards/SubscriptionHealthCard.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/ToolUsageOverviewCard.d.ts +22 -0
- package/dist/components/data-display/dashboard-cards/ToolUsageOverviewCard.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/TopPlansCard.d.ts +23 -0
- package/dist/components/data-display/dashboard-cards/TopPlansCard.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/TopSellingItemsCard.d.ts +42 -0
- package/dist/components/data-display/dashboard-cards/TopSellingItemsCard.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/TopToolsCard.d.ts +22 -0
- package/dist/components/data-display/dashboard-cards/TopToolsCard.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/_PLCardHeader.d.ts +63 -0
- package/dist/components/data-display/dashboard-cards/_PLCardHeader.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/_PLCharts.d.ts +33 -0
- package/dist/components/data-display/dashboard-cards/_PLCharts.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/_PLKpiStrip.d.ts +11 -0
- package/dist/components/data-display/dashboard-cards/_PLKpiStrip.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/_PLOverview.d.ts +9 -0
- package/dist/components/data-display/dashboard-cards/_PLOverview.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/_TabTooltip.d.ts +8 -0
- package/dist/components/data-display/dashboard-cards/_TabTooltip.d.ts.map +1 -0
- package/dist/components/data-display/dashboard-cards/index.d.ts +32 -1
- package/dist/components/data-display/dashboard-cards/index.d.ts.map +1 -1
- package/dist/components/forms/calendar/Calendar.d.ts +1 -1
- package/dist/components/forms/calendar/Calendar.d.ts.map +1 -1
- package/dist/components/forms/calendar/types.d.ts +6 -0
- package/dist/components/forms/calendar/types.d.ts.map +1 -1
- package/dist/components/forms/date-picker/DatePicker.d.ts.map +1 -1
- package/dist/components/layout/draggable-grid/DraggableGrid.d.ts +20 -0
- package/dist/components/layout/draggable-grid/DraggableGrid.d.ts.map +1 -0
- package/dist/components/layout/draggable-grid/index.d.ts +3 -0
- package/dist/components/layout/draggable-grid/index.d.ts.map +1 -0
- package/dist/components/navigation/sidebar/DashboardSidebarShell.d.ts.map +1 -1
- package/dist/dashboard-cards.cjs +16 -1
- package/dist/dashboard-cards.mjs +2 -2
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.mjs +1 -1
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.mjs +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +1 -1
- package/dist/docs.cjs +13 -0
- package/dist/docs.cjs.map +1 -1
- package/dist/docs.d.ts.map +1 -1
- package/dist/docs.mjs +13 -0
- package/dist/docs.mjs.map +1 -1
- package/dist/draggable-grid.cjs +3 -0
- package/dist/draggable-grid.d.ts +2 -0
- package/dist/draggable-grid.mjs +2 -0
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +1 -1
- package/dist/event-calendar.cjs +1 -1
- package/dist/event-calendar.mjs +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +1 -1
- package/dist/gradual-blur.cjs +1 -1
- package/dist/gradual-blur.mjs +1 -1
- package/dist/hover-border-gradient.cjs +1 -1
- package/dist/hover-border-gradient.mjs +1 -1
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +1 -1
- package/dist/icons.cjs +2 -3
- package/dist/icons.mjs +1 -2
- package/dist/index.cjs +71 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +55 -55
- package/dist/index.mjs.map +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +1 -1
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +1 -1
- package/dist/loading.cjs +1 -1
- package/dist/loading.mjs +1 -1
- package/dist/multi-select-combobox.cjs +1 -1
- package/dist/multi-select-combobox.mjs +1 -1
- package/dist/otp-input.cjs +1 -1
- package/dist/otp-input.mjs +1 -1
- package/dist/password-strength-meter.cjs +1 -1
- package/dist/password-strength-meter.mjs +1 -1
- package/dist/progress-bar.cjs +1 -1
- package/dist/progress-bar.mjs +1 -1
- package/dist/radio.cjs +1 -1
- package/dist/radio.mjs +1 -1
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +1 -1
- package/dist/sidebar.cjs +1 -1
- package/dist/sidebar.mjs +1 -1
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +1 -1
- package/dist/spinners.cjs +1 -1
- package/dist/spinners.mjs +1 -1
- package/dist/splash-cursor.cjs +1 -1
- package/dist/splash-cursor.mjs +1 -1
- package/dist/spotlight-card.cjs +1 -1
- package/dist/spotlight-card.mjs +1 -1
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.mjs +1 -1
- package/dist/sun-to-moon-button.cjs +2 -2
- package/dist/sun-to-moon-button.mjs +2 -2
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.mjs +1 -1
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +1 -1
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +1 -1
- package/dist/truncated-text.cjs +1 -1
- package/dist/truncated-text.mjs +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.mjs +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.mjs +1 -1
- package/package.json +34 -13
- package/dist/chunks/EllipsisVerticalIcon-BJw3MNkg.cjs +0 -51
- package/dist/chunks/EllipsisVerticalIcon-BJw3MNkg.cjs.map +0 -1
- package/dist/chunks/EllipsisVerticalIcon-C2b2KMfE.mjs +0 -45
- package/dist/chunks/EllipsisVerticalIcon-C2b2KMfE.mjs.map +0 -1
- package/dist/chunks/calendar-DCkikZYb.cjs +0 -184
- package/dist/chunks/calendar-DCkikZYb.cjs.map +0 -1
- package/dist/chunks/calendar-FxAmm_ao.mjs +0 -178
- package/dist/chunks/calendar-FxAmm_ao.mjs.map +0 -1
- package/dist/chunks/dashboard-cards-BnPt0gDW.mjs +0 -2428
- package/dist/chunks/dashboard-cards-BnPt0gDW.mjs.map +0 -1
- package/dist/chunks/dashboard-cards-DNWJPKRu.cjs +0 -2524
- package/dist/chunks/dashboard-cards-DNWJPKRu.cjs.map +0 -1
- package/dist/chunks/date-picker-3IDSmb9Z.mjs +0 -228
- package/dist/chunks/date-picker-3IDSmb9Z.mjs.map +0 -1
- package/dist/chunks/date-picker-_EVYpGga.cjs +0 -234
- package/dist/chunks/date-picker-_EVYpGga.cjs.map +0 -1
- package/dist/chunks/icons-JzMKLygv.mjs.map +0 -1
- package/dist/chunks/icons-ub9iu-JG.cjs.map +0 -1
- package/dist/chunks/utils-7S0u48mU.mjs.map +0 -1
- package/dist/chunks/utils-LRbEQHYs.cjs.map +0 -1
- /package/dist/chunks/{chunk-B_GkZjkl.cjs → chunk-D6vf50IK.cjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel-xHkrV_pt.cjs","names":[],"sources":["../../src/components/navigation/carousel/Carousel.tsx"],"sourcesContent":["import { useState, useEffect, useCallback, useRef } from \"react\";\nimport { motion, AnimatePresence } from \"framer-motion\";\n\nimport { ChevronLeftIcon, ChevronRightIcon } from \"../../icons\";\nimport { mergeClassNames } from \"../../../utils\";\nimport type { CarouselProps, CarouselAnimation } from \"./types\";\n\nconst variantStyles = {\n default: \"ui:bg-ds-surface-1 ui:shadow-xl\",\n glass:\n \"ui:bg-ds-surface-1/70 ui:backdrop-blur-2xl ui:border ui:border-ds-border-2\",\n minimal: \"ui:bg-transparent\",\n};\n\n// Animation variants for different carousel transitions\nconst getAnimationVariants = (animation: CarouselAnimation) => {\n const variants = {\n slide: {\n enter: (direction: number) => ({\n x: direction > 0 ? \"100%\" : \"-100%\",\n opacity: 0,\n }),\n center: { x: 0, opacity: 1 },\n exit: (direction: number) => ({\n x: direction < 0 ? \"100%\" : \"-100%\",\n opacity: 0,\n }),\n },\n fade: {\n enter: () => ({ opacity: 0 }),\n center: { opacity: 1 },\n exit: () => ({ opacity: 0 }),\n },\n scale: {\n enter: (direction: number) => ({\n scale: 0.8,\n opacity: 0,\n x: direction > 0 ? 50 : -50,\n }),\n center: { scale: 1, opacity: 1, x: 0 },\n exit: (direction: number) => ({\n scale: 0.8,\n opacity: 0,\n x: direction < 0 ? 50 : -50,\n }),\n },\n flip: {\n enter: (direction: number) => ({\n rotateY: direction > 0 ? 90 : -90,\n opacity: 0,\n }),\n center: { rotateY: 0, opacity: 1 },\n exit: (direction: number) => ({\n rotateY: direction < 0 ? 90 : -90,\n opacity: 0,\n }),\n },\n cube: {\n enter: (direction: number) => ({\n rotateY: direction > 0 ? 90 : -90,\n x: direction > 0 ? \"50%\" : \"-50%\",\n opacity: 0,\n scale: 0.8,\n }),\n center: { rotateY: 0, x: 0, opacity: 1, scale: 1 },\n exit: (direction: number) => ({\n rotateY: direction < 0 ? 90 : -90,\n x: direction < 0 ? \"50%\" : \"-50%\",\n opacity: 0,\n scale: 0.8,\n }),\n },\n cards: {\n enter: (direction: number) => ({\n scale: 0.9,\n opacity: 0,\n y: direction > 0 ? 100 : -100,\n rotateZ: direction > 0 ? 5 : -5,\n }),\n center: { scale: 1, opacity: 1, y: 0, rotateZ: 0 },\n exit: (direction: number) => ({\n scale: 0.9,\n opacity: 0,\n y: direction < 0 ? 100 : -100,\n rotateZ: direction < 0 ? 5 : -5,\n }),\n },\n };\n return variants[animation];\n};\n\n// Transition configs for each animation\nconst getTransitionConfig = (\n animation: CarouselAnimation,\n duration: number,\n) => {\n const durationSec = duration / 1000;\n const configs: Record<CarouselAnimation, object> = {\n slide: {\n x: { type: \"spring\", stiffness: 300, damping: 30 },\n opacity: { duration: durationSec },\n },\n fade: {\n opacity: { duration: durationSec, ease: \"easeInOut\" },\n },\n scale: {\n type: \"spring\",\n stiffness: 200,\n damping: 25,\n opacity: { duration: durationSec },\n },\n flip: {\n type: \"spring\",\n stiffness: 100,\n damping: 20,\n opacity: { duration: durationSec * 0.5 },\n },\n cube: {\n type: \"spring\",\n stiffness: 100,\n damping: 20,\n opacity: { duration: durationSec * 0.5 },\n },\n cards: {\n type: \"spring\",\n stiffness: 150,\n damping: 20,\n opacity: { duration: durationSec },\n },\n };\n return configs[animation];\n};\n\nexport const Carousel = ({\n items,\n className,\n autoPlay = 0,\n showArrows = true,\n showDots = true,\n infinite = true,\n pauseOnHover = true,\n animationDuration = 500,\n // gap and slidesPerView reserved for future multi-slide support\n gap: _gap = 0,\n slidesPerView: _slidesPerView = 1,\n renderArrow,\n renderDot,\n onSlideChange,\n variant = \"glass\",\n height = 400,\n style,\n initialSlide = 0,\n draggable = true,\n animation = \"slide\",\n}: CarouselProps) => {\n const animationVariants = getAnimationVariants(animation);\n const transitionConfig = getTransitionConfig(animation, animationDuration);\n const [[currentIndex, direction], setSlide] = useState([initialSlide, 0]);\n const [isPaused, setIsPaused] = useState(false);\n const intervalRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const totalSlides = items.length;\n\n const goToSlide = useCallback(\n (index: number, dir?: number) => {\n let newIndex = index;\n if (infinite) {\n if (index < 0) newIndex = totalSlides - 1;\n else if (index >= totalSlides) newIndex = 0;\n } else {\n if (index < 0) newIndex = 0;\n else if (index >= totalSlides) newIndex = totalSlides - 1;\n }\n const newDirection = dir ?? (newIndex > currentIndex ? 1 : -1);\n setSlide([newIndex, newDirection]);\n onSlideChange?.(newIndex);\n },\n [currentIndex, infinite, totalSlides, onSlideChange],\n );\n\n const goNext = useCallback(\n () => goToSlide(currentIndex + 1, 1),\n [currentIndex, goToSlide],\n );\n const goPrev = useCallback(\n () => goToSlide(currentIndex - 1, -1),\n [currentIndex, goToSlide],\n );\n\n // Auto-play\n useEffect(() => {\n if (autoPlay > 0 && !isPaused) {\n intervalRef.current = setInterval(goNext, autoPlay);\n }\n return () => {\n if (intervalRef.current) clearInterval(intervalRef.current);\n };\n }, [autoPlay, isPaused, goNext]);\n\n // Keyboard navigation\n useEffect(() => {\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"ArrowLeft\") goPrev();\n if (e.key === \"ArrowRight\") goNext();\n };\n window.addEventListener(\"keydown\", handleKeyDown);\n return () => window.removeEventListener(\"keydown\", handleKeyDown);\n }, [goNext, goPrev]);\n\n // Drag handling\n const handleDragEnd = (\n _event: MouseEvent | TouchEvent | PointerEvent,\n info: {\n offset: { x: number; y: number };\n velocity: { x: number; y: number };\n },\n ) => {\n const threshold = 50;\n if (info.offset.x < -threshold) goNext();\n else if (info.offset.x > threshold) goPrev();\n };\n\n const currentItem = items[currentIndex];\n\n return (\n <div\n className={mergeClassNames(\n \"ui:relative ui:overflow-hidden ui:rounded-2xl ui:w-full\",\n variantStyles[variant],\n className,\n )}\n style={{\n height: typeof height === \"number\" ? `${height}px` : height,\n ...style,\n }}\n onMouseEnter={() => pauseOnHover && setIsPaused(true)}\n onMouseLeave={() => pauseOnHover && setIsPaused(false)}\n >\n {/* Slides */}\n <AnimatePresence initial={false} custom={direction} mode=\"wait\">\n <motion.div\n key={currentIndex}\n custom={direction}\n variants={animationVariants}\n initial=\"enter\"\n animate=\"center\"\n exit=\"exit\"\n transition={transitionConfig}\n drag={draggable ? \"x\" : false}\n dragConstraints={{ left: 0, right: 0 }}\n dragElastic={0.2}\n onDragEnd={handleDragEnd}\n className=\"ui:absolute ui:inset-0 ui:flex ui:items-center ui:justify-center ui:cursor-grab active:ui:cursor-grabbing\"\n style={{\n perspective:\n animation === \"flip\" || animation === \"cube\" ? 1000 : undefined,\n }}\n >\n {currentItem.image ? (\n <div className=\"ui:relative ui:w-full ui:h-full\">\n <img\n src={currentItem.image}\n alt={currentItem.alt || currentItem.title || \"Carousel slide\"}\n className=\"ui:w-full ui:h-full ui:object-cover\"\n />\n {(currentItem.title || currentItem.description) && (\n <div className=\"ui:absolute ui:bottom-0 ui:left-0 ui:right-0 ui:p-6 ui:bg-gradient-to-t ui:from-black/70 ui:to-transparent\">\n {currentItem.title && (\n <h3 className=\"ui:text-2xl ui:font-bold ui:text-ds-on-accent ui:mb-2\">\n {currentItem.title}\n </h3>\n )}\n {currentItem.description && (\n <p className=\"ui:text-ds-on-accent/80\">\n {currentItem.description}\n </p>\n )}\n </div>\n )}\n </div>\n ) : (\n <div className=\"ui:w-full ui:h-full ui:flex ui:items-center ui:justify-center ui:p-6\">\n {currentItem.content}\n </div>\n )}\n </motion.div>\n </AnimatePresence>\n\n {/* Navigation Arrows */}\n {showArrows && totalSlides > 1 && (\n <>\n {renderArrow ? (\n <>\n {renderArrow({ direction: \"prev\", onClick: goPrev })}\n {renderArrow({ direction: \"next\", onClick: goNext })}\n </>\n ) : (\n <>\n <motion.button\n type=\"button\"\n onClick={goPrev}\n className=\"ui:absolute ui:left-4 ui:top-1/2 ui:-translate-y-1/2 ui:z-20 ui:p-2 ui:rounded-full ui:bg-ds-surface-1/85 ui:backdrop-blur-sm ui:text-ds-1 ui:shadow-lg ui:transition-all hover:ui:bg-ds-surface-2\"\n whileHover={{ scale: 1.1 }}\n whileTap={{ scale: 0.9 }}\n aria-label=\"Previous slide\"\n >\n <ChevronLeftIcon className=\"ui:w-6 ui:h-6\" aria-hidden=\"true\" />\n </motion.button>\n <motion.button\n type=\"button\"\n onClick={goNext}\n className=\"ui:absolute ui:right-4 ui:top-1/2 ui:-translate-y-1/2 ui:z-20 ui:p-2 ui:rounded-full ui:bg-ds-surface-1/85 ui:backdrop-blur-sm ui:text-ds-1 ui:shadow-lg ui:transition-all hover:ui:bg-ds-surface-2\"\n whileHover={{ scale: 1.1 }}\n whileTap={{ scale: 0.9 }}\n aria-label=\"Next slide\"\n >\n <ChevronRightIcon\n className=\"ui:w-6 ui:h-6\"\n aria-hidden=\"true\"\n />\n </motion.button>\n </>\n )}\n </>\n )}\n\n {/* Dot Indicators */}\n {showDots && totalSlides > 1 && (\n <div className=\"ui:absolute ui:bottom-4 ui:left-1/2 ui:-translate-x-1/2 ui:z-20 ui:flex ui:gap-2 ui:rounded-full ui:bg-ds-surface-1/30 ui:p-2 ui:backdrop-blur-sm\">\n {items.map((_, index) =>\n renderDot ? (\n renderDot({\n index,\n active: index === currentIndex,\n onClick: () => goToSlide(index),\n })\n ) : (\n <motion.button\n key={index}\n type=\"button\"\n onClick={() => goToSlide(index)}\n className={mergeClassNames(\n \"ui:rounded-full ui:transition-all ui:duration-300\",\n index === currentIndex\n ? \"ui:h-2.5 ui:w-8 ui:bg-ds-accent ui:shadow-lg\"\n : \"ui:h-2.5 ui:w-2.5 ui:bg-ds-surface-3 hover:ui:bg-ds-border-3\",\n )}\n whileHover={{ scale: 1.2 }}\n whileTap={{ scale: 0.9 }}\n aria-label={`Go to slide ${index + 1}`}\n aria-current={index === currentIndex ? \"true\" : undefined}\n />\n ),\n )}\n </div>\n )}\n\n {/* Progress indicator */}\n {autoPlay > 0 && !isPaused && (\n <motion.div\n className=\"ui:absolute ui:bottom-0 ui:left-0 ui:h-1 ui:bg-ds-accent/80 ui:rounded-full\"\n initial={{ width: \"0%\" }}\n animate={{ width: \"100%\" }}\n transition={{ duration: autoPlay / 1000, ease: \"linear\" }}\n key={currentIndex}\n />\n )}\n </div>\n );\n};\n\nCarousel.displayName = \"Carousel\";\n\nexport default Carousel;\n"],"mappings":";;;;;;;AAOA,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E,WAAU;IACV,SAAS,EAAE,OAAO,MAAM;IACxB,SAAS,EAAE,OAAO,QAAQ;IAC1B,YAAY;KAAE,UAAU,WAAW;KAAM,MAAM;KAAU;IAEzD,EADK,aACL;GAEA;;;AAIV,SAAS,cAAc"}
|
|
1
|
+
{"version":3,"file":"carousel-DtOJEbEU.cjs","names":[],"sources":["../../src/components/navigation/carousel/Carousel.tsx"],"sourcesContent":["import { useState, useEffect, useCallback, useRef } from \"react\";\nimport { motion, AnimatePresence } from \"framer-motion\";\n\nimport { ChevronLeftIcon, ChevronRightIcon } from \"../../icons\";\nimport { mergeClassNames } from \"../../../utils\";\nimport type { CarouselProps, CarouselAnimation } from \"./types\";\n\nconst variantStyles = {\n default: \"ui:bg-ds-surface-1 ui:shadow-xl\",\n glass:\n \"ui:bg-ds-surface-1/70 ui:backdrop-blur-2xl ui:border ui:border-ds-border-2\",\n minimal: \"ui:bg-transparent\",\n};\n\n// Animation variants for different carousel transitions\nconst getAnimationVariants = (animation: CarouselAnimation) => {\n const variants = {\n slide: {\n enter: (direction: number) => ({\n x: direction > 0 ? \"100%\" : \"-100%\",\n opacity: 0,\n }),\n center: { x: 0, opacity: 1 },\n exit: (direction: number) => ({\n x: direction < 0 ? \"100%\" : \"-100%\",\n opacity: 0,\n }),\n },\n fade: {\n enter: () => ({ opacity: 0 }),\n center: { opacity: 1 },\n exit: () => ({ opacity: 0 }),\n },\n scale: {\n enter: (direction: number) => ({\n scale: 0.8,\n opacity: 0,\n x: direction > 0 ? 50 : -50,\n }),\n center: { scale: 1, opacity: 1, x: 0 },\n exit: (direction: number) => ({\n scale: 0.8,\n opacity: 0,\n x: direction < 0 ? 50 : -50,\n }),\n },\n flip: {\n enter: (direction: number) => ({\n rotateY: direction > 0 ? 90 : -90,\n opacity: 0,\n }),\n center: { rotateY: 0, opacity: 1 },\n exit: (direction: number) => ({\n rotateY: direction < 0 ? 90 : -90,\n opacity: 0,\n }),\n },\n cube: {\n enter: (direction: number) => ({\n rotateY: direction > 0 ? 90 : -90,\n x: direction > 0 ? \"50%\" : \"-50%\",\n opacity: 0,\n scale: 0.8,\n }),\n center: { rotateY: 0, x: 0, opacity: 1, scale: 1 },\n exit: (direction: number) => ({\n rotateY: direction < 0 ? 90 : -90,\n x: direction < 0 ? \"50%\" : \"-50%\",\n opacity: 0,\n scale: 0.8,\n }),\n },\n cards: {\n enter: (direction: number) => ({\n scale: 0.9,\n opacity: 0,\n y: direction > 0 ? 100 : -100,\n rotateZ: direction > 0 ? 5 : -5,\n }),\n center: { scale: 1, opacity: 1, y: 0, rotateZ: 0 },\n exit: (direction: number) => ({\n scale: 0.9,\n opacity: 0,\n y: direction < 0 ? 100 : -100,\n rotateZ: direction < 0 ? 5 : -5,\n }),\n },\n };\n return variants[animation];\n};\n\n// Transition configs for each animation\nconst getTransitionConfig = (\n animation: CarouselAnimation,\n duration: number,\n) => {\n const durationSec = duration / 1000;\n const configs: Record<CarouselAnimation, object> = {\n slide: {\n x: { type: \"spring\", stiffness: 300, damping: 30 },\n opacity: { duration: durationSec },\n },\n fade: {\n opacity: { duration: durationSec, ease: \"easeInOut\" },\n },\n scale: {\n type: \"spring\",\n stiffness: 200,\n damping: 25,\n opacity: { duration: durationSec },\n },\n flip: {\n type: \"spring\",\n stiffness: 100,\n damping: 20,\n opacity: { duration: durationSec * 0.5 },\n },\n cube: {\n type: \"spring\",\n stiffness: 100,\n damping: 20,\n opacity: { duration: durationSec * 0.5 },\n },\n cards: {\n type: \"spring\",\n stiffness: 150,\n damping: 20,\n opacity: { duration: durationSec },\n },\n };\n return configs[animation];\n};\n\nexport const Carousel = ({\n items,\n className,\n autoPlay = 0,\n showArrows = true,\n showDots = true,\n infinite = true,\n pauseOnHover = true,\n animationDuration = 500,\n // gap and slidesPerView reserved for future multi-slide support\n gap: _gap = 0,\n slidesPerView: _slidesPerView = 1,\n renderArrow,\n renderDot,\n onSlideChange,\n variant = \"glass\",\n height = 400,\n style,\n initialSlide = 0,\n draggable = true,\n animation = \"slide\",\n}: CarouselProps) => {\n const animationVariants = getAnimationVariants(animation);\n const transitionConfig = getTransitionConfig(animation, animationDuration);\n const [[currentIndex, direction], setSlide] = useState([initialSlide, 0]);\n const [isPaused, setIsPaused] = useState(false);\n const intervalRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const totalSlides = items.length;\n\n const goToSlide = useCallback(\n (index: number, dir?: number) => {\n let newIndex = index;\n if (infinite) {\n if (index < 0) newIndex = totalSlides - 1;\n else if (index >= totalSlides) newIndex = 0;\n } else {\n if (index < 0) newIndex = 0;\n else if (index >= totalSlides) newIndex = totalSlides - 1;\n }\n const newDirection = dir ?? (newIndex > currentIndex ? 1 : -1);\n setSlide([newIndex, newDirection]);\n onSlideChange?.(newIndex);\n },\n [currentIndex, infinite, totalSlides, onSlideChange],\n );\n\n const goNext = useCallback(\n () => goToSlide(currentIndex + 1, 1),\n [currentIndex, goToSlide],\n );\n const goPrev = useCallback(\n () => goToSlide(currentIndex - 1, -1),\n [currentIndex, goToSlide],\n );\n\n // Auto-play\n useEffect(() => {\n if (autoPlay > 0 && !isPaused) {\n intervalRef.current = setInterval(goNext, autoPlay);\n }\n return () => {\n if (intervalRef.current) clearInterval(intervalRef.current);\n };\n }, [autoPlay, isPaused, goNext]);\n\n // Keyboard navigation\n useEffect(() => {\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"ArrowLeft\") goPrev();\n if (e.key === \"ArrowRight\") goNext();\n };\n window.addEventListener(\"keydown\", handleKeyDown);\n return () => window.removeEventListener(\"keydown\", handleKeyDown);\n }, [goNext, goPrev]);\n\n // Drag handling\n const handleDragEnd = (\n _event: MouseEvent | TouchEvent | PointerEvent,\n info: {\n offset: { x: number; y: number };\n velocity: { x: number; y: number };\n },\n ) => {\n const threshold = 50;\n if (info.offset.x < -threshold) goNext();\n else if (info.offset.x > threshold) goPrev();\n };\n\n const currentItem = items[currentIndex];\n\n return (\n <div\n className={mergeClassNames(\n \"ui:relative ui:overflow-hidden ui:rounded-2xl ui:w-full\",\n variantStyles[variant],\n className,\n )}\n style={{\n height: typeof height === \"number\" ? `${height}px` : height,\n ...style,\n }}\n onMouseEnter={() => pauseOnHover && setIsPaused(true)}\n onMouseLeave={() => pauseOnHover && setIsPaused(false)}\n >\n {/* Slides */}\n <AnimatePresence initial={false} custom={direction} mode=\"wait\">\n <motion.div\n key={currentIndex}\n custom={direction}\n variants={animationVariants}\n initial=\"enter\"\n animate=\"center\"\n exit=\"exit\"\n transition={transitionConfig}\n drag={draggable ? \"x\" : false}\n dragConstraints={{ left: 0, right: 0 }}\n dragElastic={0.2}\n onDragEnd={handleDragEnd}\n className=\"ui:absolute ui:inset-0 ui:flex ui:items-center ui:justify-center ui:cursor-grab active:ui:cursor-grabbing\"\n style={{\n perspective:\n animation === \"flip\" || animation === \"cube\" ? 1000 : undefined,\n }}\n >\n {currentItem.image ? (\n <div className=\"ui:relative ui:w-full ui:h-full\">\n <img\n src={currentItem.image}\n alt={currentItem.alt || currentItem.title || \"Carousel slide\"}\n className=\"ui:w-full ui:h-full ui:object-cover\"\n />\n {(currentItem.title || currentItem.description) && (\n <div className=\"ui:absolute ui:bottom-0 ui:left-0 ui:right-0 ui:p-6 ui:bg-gradient-to-t ui:from-black/70 ui:to-transparent\">\n {currentItem.title && (\n <h3 className=\"ui:text-2xl ui:font-bold ui:text-ds-on-accent ui:mb-2\">\n {currentItem.title}\n </h3>\n )}\n {currentItem.description && (\n <p className=\"ui:text-ds-on-accent/80\">\n {currentItem.description}\n </p>\n )}\n </div>\n )}\n </div>\n ) : (\n <div className=\"ui:w-full ui:h-full ui:flex ui:items-center ui:justify-center ui:p-6\">\n {currentItem.content}\n </div>\n )}\n </motion.div>\n </AnimatePresence>\n\n {/* Navigation Arrows */}\n {showArrows && totalSlides > 1 && (\n <>\n {renderArrow ? (\n <>\n {renderArrow({ direction: \"prev\", onClick: goPrev })}\n {renderArrow({ direction: \"next\", onClick: goNext })}\n </>\n ) : (\n <>\n <motion.button\n type=\"button\"\n onClick={goPrev}\n className=\"ui:absolute ui:left-4 ui:top-1/2 ui:-translate-y-1/2 ui:z-20 ui:p-2 ui:rounded-full ui:bg-ds-surface-1/85 ui:backdrop-blur-sm ui:text-ds-1 ui:shadow-lg ui:transition-all hover:ui:bg-ds-surface-2\"\n whileHover={{ scale: 1.1 }}\n whileTap={{ scale: 0.9 }}\n aria-label=\"Previous slide\"\n >\n <ChevronLeftIcon className=\"ui:w-6 ui:h-6\" aria-hidden=\"true\" />\n </motion.button>\n <motion.button\n type=\"button\"\n onClick={goNext}\n className=\"ui:absolute ui:right-4 ui:top-1/2 ui:-translate-y-1/2 ui:z-20 ui:p-2 ui:rounded-full ui:bg-ds-surface-1/85 ui:backdrop-blur-sm ui:text-ds-1 ui:shadow-lg ui:transition-all hover:ui:bg-ds-surface-2\"\n whileHover={{ scale: 1.1 }}\n whileTap={{ scale: 0.9 }}\n aria-label=\"Next slide\"\n >\n <ChevronRightIcon\n className=\"ui:w-6 ui:h-6\"\n aria-hidden=\"true\"\n />\n </motion.button>\n </>\n )}\n </>\n )}\n\n {/* Dot Indicators */}\n {showDots && totalSlides > 1 && (\n <div className=\"ui:absolute ui:bottom-4 ui:left-1/2 ui:-translate-x-1/2 ui:z-20 ui:flex ui:gap-2 ui:rounded-full ui:bg-ds-surface-1/30 ui:p-2 ui:backdrop-blur-sm\">\n {items.map((_, index) =>\n renderDot ? (\n renderDot({\n index,\n active: index === currentIndex,\n onClick: () => goToSlide(index),\n })\n ) : (\n <motion.button\n key={index}\n type=\"button\"\n onClick={() => goToSlide(index)}\n className={mergeClassNames(\n \"ui:rounded-full ui:transition-all ui:duration-300\",\n index === currentIndex\n ? \"ui:h-2.5 ui:w-8 ui:bg-ds-accent ui:shadow-lg\"\n : \"ui:h-2.5 ui:w-2.5 ui:bg-ds-surface-3 hover:ui:bg-ds-border-3\",\n )}\n whileHover={{ scale: 1.2 }}\n whileTap={{ scale: 0.9 }}\n aria-label={`Go to slide ${index + 1}`}\n aria-current={index === currentIndex ? \"true\" : undefined}\n />\n ),\n )}\n </div>\n )}\n\n {/* Progress indicator */}\n {autoPlay > 0 && !isPaused && (\n <motion.div\n className=\"ui:absolute ui:bottom-0 ui:left-0 ui:h-1 ui:bg-ds-accent/80 ui:rounded-full\"\n initial={{ width: \"0%\" }}\n animate={{ width: \"100%\" }}\n transition={{ duration: autoPlay / 1000, ease: \"linear\" }}\n key={currentIndex}\n />\n )}\n </div>\n );\n};\n\nCarousel.displayName = \"Carousel\";\n\nexport default Carousel;\n"],"mappings":";;;;;;AAOA,IAAM,gBAAgB;CACpB,SAAS;CACT,OACE;CACF,SAAS;AACX;AAGA,IAAM,wBAAwB,cAAiC;CAyE7D,OAAO;EAvEL,OAAO;GACL,QAAQ,eAAuB;IAC7B,GAAG,YAAY,IAAI,SAAS;IAC5B,SAAS;GACX;GACA,QAAQ;IAAE,GAAG;IAAG,SAAS;GAAE;GAC3B,OAAO,eAAuB;IAC5B,GAAG,YAAY,IAAI,SAAS;IAC5B,SAAS;GACX;EACF;EACA,MAAM;GACJ,cAAc,EAAE,SAAS,EAAE;GAC3B,QAAQ,EAAE,SAAS,EAAE;GACrB,aAAa,EAAE,SAAS,EAAE;EAC5B;EACA,OAAO;GACL,QAAQ,eAAuB;IAC7B,OAAO;IACP,SAAS;IACT,GAAG,YAAY,IAAI,KAAK;GAC1B;GACA,QAAQ;IAAE,OAAO;IAAG,SAAS;IAAG,GAAG;GAAE;GACrC,OAAO,eAAuB;IAC5B,OAAO;IACP,SAAS;IACT,GAAG,YAAY,IAAI,KAAK;GAC1B;EACF;EACA,MAAM;GACJ,QAAQ,eAAuB;IAC7B,SAAS,YAAY,IAAI,KAAK;IAC9B,SAAS;GACX;GACA,QAAQ;IAAE,SAAS;IAAG,SAAS;GAAE;GACjC,OAAO,eAAuB;IAC5B,SAAS,YAAY,IAAI,KAAK;IAC9B,SAAS;GACX;EACF;EACA,MAAM;GACJ,QAAQ,eAAuB;IAC7B,SAAS,YAAY,IAAI,KAAK;IAC9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IAChC,CAAC,IAED,iBAAA,GAAA,kBAAA,KAAC,cAAA,OAAO,QAAR;KAEE,MAAK;KACL,eAAe,UAAU,KAAK;KAC9B,WAAW,cAAA,gBACT,qDACA,UAAU,eACN,iDACA,8DACN;KACA,YAAY,EAAE,OAAO,IAAI;KACzB,UAAU,EAAE,OAAO,GAAI;KACvB,cAAY,eAAe,QAAQ;KACnC,gBAAc,UAAU,eAAe,SAAS,KAAA;IACjD,GAbM,KAaN,CAEL;GACG,CAAA;GAIN,WAAW,KAAK,CAAC,YAChB,iBAAA,GAAA,kBAAA,KAAC,cAAA,OAAO,KAAR;IACE,WAAU;IACV,SAAS,EAAE,OAAO,KAAK;IACvB,SAAS,EAAE,OAAO,OAAO;IACzB,YAAY;KAAE,UAAU,WAAW;KAAM,MAAM;IAAS;GAEzD,GADM,YACN;EAEA;;AAET;AAEA,SAAS,cAAc"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as mergeClassNames } from "./utils-
|
|
2
|
-
import {
|
|
1
|
+
import { n as mergeClassNames } from "./utils-Dc7j29ec.mjs";
|
|
2
|
+
import { M as ChevronLeftIcon, j as ChevronRightIcon } from "./icons-CkVHNbbN.mjs";
|
|
3
3
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { AnimatePresence, motion } from "framer-motion";
|
|
@@ -188,7 +188,7 @@ var Carousel = ({ items, className, autoPlay = 0, showArrows = true, showDots =
|
|
|
188
188
|
}, [goNext, goPrev]);
|
|
189
189
|
const handleDragEnd = (_event, info) => {
|
|
190
190
|
const threshold = 50;
|
|
191
|
-
if (info.offset.x < -
|
|
191
|
+
if (info.offset.x < -50) goNext();
|
|
192
192
|
else if (info.offset.x > threshold) goPrev();
|
|
193
193
|
};
|
|
194
194
|
const currentItem = items[currentIndex];
|
|
@@ -304,4 +304,4 @@ Carousel.displayName = "Carousel";
|
|
|
304
304
|
//#endregion
|
|
305
305
|
export { Carousel as t };
|
|
306
306
|
|
|
307
|
-
//# sourceMappingURL=carousel-
|
|
307
|
+
//# sourceMappingURL=carousel-eeqWZZHE.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel-Dpe5QLJK.mjs","names":[],"sources":["../../src/components/navigation/carousel/Carousel.tsx"],"sourcesContent":["import { useState, useEffect, useCallback, useRef } from \"react\";\nimport { motion, AnimatePresence } from \"framer-motion\";\n\nimport { ChevronLeftIcon, ChevronRightIcon } from \"../../icons\";\nimport { mergeClassNames } from \"../../../utils\";\nimport type { CarouselProps, CarouselAnimation } from \"./types\";\n\nconst variantStyles = {\n default: \"ui:bg-ds-surface-1 ui:shadow-xl\",\n glass:\n \"ui:bg-ds-surface-1/70 ui:backdrop-blur-2xl ui:border ui:border-ds-border-2\",\n minimal: \"ui:bg-transparent\",\n};\n\n// Animation variants for different carousel transitions\nconst getAnimationVariants = (animation: CarouselAnimation) => {\n const variants = {\n slide: {\n enter: (direction: number) => ({\n x: direction > 0 ? \"100%\" : \"-100%\",\n opacity: 0,\n }),\n center: { x: 0, opacity: 1 },\n exit: (direction: number) => ({\n x: direction < 0 ? \"100%\" : \"-100%\",\n opacity: 0,\n }),\n },\n fade: {\n enter: () => ({ opacity: 0 }),\n center: { opacity: 1 },\n exit: () => ({ opacity: 0 }),\n },\n scale: {\n enter: (direction: number) => ({\n scale: 0.8,\n opacity: 0,\n x: direction > 0 ? 50 : -50,\n }),\n center: { scale: 1, opacity: 1, x: 0 },\n exit: (direction: number) => ({\n scale: 0.8,\n opacity: 0,\n x: direction < 0 ? 50 : -50,\n }),\n },\n flip: {\n enter: (direction: number) => ({\n rotateY: direction > 0 ? 90 : -90,\n opacity: 0,\n }),\n center: { rotateY: 0, opacity: 1 },\n exit: (direction: number) => ({\n rotateY: direction < 0 ? 90 : -90,\n opacity: 0,\n }),\n },\n cube: {\n enter: (direction: number) => ({\n rotateY: direction > 0 ? 90 : -90,\n x: direction > 0 ? \"50%\" : \"-50%\",\n opacity: 0,\n scale: 0.8,\n }),\n center: { rotateY: 0, x: 0, opacity: 1, scale: 1 },\n exit: (direction: number) => ({\n rotateY: direction < 0 ? 90 : -90,\n x: direction < 0 ? \"50%\" : \"-50%\",\n opacity: 0,\n scale: 0.8,\n }),\n },\n cards: {\n enter: (direction: number) => ({\n scale: 0.9,\n opacity: 0,\n y: direction > 0 ? 100 : -100,\n rotateZ: direction > 0 ? 5 : -5,\n }),\n center: { scale: 1, opacity: 1, y: 0, rotateZ: 0 },\n exit: (direction: number) => ({\n scale: 0.9,\n opacity: 0,\n y: direction < 0 ? 100 : -100,\n rotateZ: direction < 0 ? 5 : -5,\n }),\n },\n };\n return variants[animation];\n};\n\n// Transition configs for each animation\nconst getTransitionConfig = (\n animation: CarouselAnimation,\n duration: number,\n) => {\n const durationSec = duration / 1000;\n const configs: Record<CarouselAnimation, object> = {\n slide: {\n x: { type: \"spring\", stiffness: 300, damping: 30 },\n opacity: { duration: durationSec },\n },\n fade: {\n opacity: { duration: durationSec, ease: \"easeInOut\" },\n },\n scale: {\n type: \"spring\",\n stiffness: 200,\n damping: 25,\n opacity: { duration: durationSec },\n },\n flip: {\n type: \"spring\",\n stiffness: 100,\n damping: 20,\n opacity: { duration: durationSec * 0.5 },\n },\n cube: {\n type: \"spring\",\n stiffness: 100,\n damping: 20,\n opacity: { duration: durationSec * 0.5 },\n },\n cards: {\n type: \"spring\",\n stiffness: 150,\n damping: 20,\n opacity: { duration: durationSec },\n },\n };\n return configs[animation];\n};\n\nexport const Carousel = ({\n items,\n className,\n autoPlay = 0,\n showArrows = true,\n showDots = true,\n infinite = true,\n pauseOnHover = true,\n animationDuration = 500,\n // gap and slidesPerView reserved for future multi-slide support\n gap: _gap = 0,\n slidesPerView: _slidesPerView = 1,\n renderArrow,\n renderDot,\n onSlideChange,\n variant = \"glass\",\n height = 400,\n style,\n initialSlide = 0,\n draggable = true,\n animation = \"slide\",\n}: CarouselProps) => {\n const animationVariants = getAnimationVariants(animation);\n const transitionConfig = getTransitionConfig(animation, animationDuration);\n const [[currentIndex, direction], setSlide] = useState([initialSlide, 0]);\n const [isPaused, setIsPaused] = useState(false);\n const intervalRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const totalSlides = items.length;\n\n const goToSlide = useCallback(\n (index: number, dir?: number) => {\n let newIndex = index;\n if (infinite) {\n if (index < 0) newIndex = totalSlides - 1;\n else if (index >= totalSlides) newIndex = 0;\n } else {\n if (index < 0) newIndex = 0;\n else if (index >= totalSlides) newIndex = totalSlides - 1;\n }\n const newDirection = dir ?? (newIndex > currentIndex ? 1 : -1);\n setSlide([newIndex, newDirection]);\n onSlideChange?.(newIndex);\n },\n [currentIndex, infinite, totalSlides, onSlideChange],\n );\n\n const goNext = useCallback(\n () => goToSlide(currentIndex + 1, 1),\n [currentIndex, goToSlide],\n );\n const goPrev = useCallback(\n () => goToSlide(currentIndex - 1, -1),\n [currentIndex, goToSlide],\n );\n\n // Auto-play\n useEffect(() => {\n if (autoPlay > 0 && !isPaused) {\n intervalRef.current = setInterval(goNext, autoPlay);\n }\n return () => {\n if (intervalRef.current) clearInterval(intervalRef.current);\n };\n }, [autoPlay, isPaused, goNext]);\n\n // Keyboard navigation\n useEffect(() => {\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"ArrowLeft\") goPrev();\n if (e.key === \"ArrowRight\") goNext();\n };\n window.addEventListener(\"keydown\", handleKeyDown);\n return () => window.removeEventListener(\"keydown\", handleKeyDown);\n }, [goNext, goPrev]);\n\n // Drag handling\n const handleDragEnd = (\n _event: MouseEvent | TouchEvent | PointerEvent,\n info: {\n offset: { x: number; y: number };\n velocity: { x: number; y: number };\n },\n ) => {\n const threshold = 50;\n if (info.offset.x < -threshold) goNext();\n else if (info.offset.x > threshold) goPrev();\n };\n\n const currentItem = items[currentIndex];\n\n return (\n <div\n className={mergeClassNames(\n \"ui:relative ui:overflow-hidden ui:rounded-2xl ui:w-full\",\n variantStyles[variant],\n className,\n )}\n style={{\n height: typeof height === \"number\" ? `${height}px` : height,\n ...style,\n }}\n onMouseEnter={() => pauseOnHover && setIsPaused(true)}\n onMouseLeave={() => pauseOnHover && setIsPaused(false)}\n >\n {/* Slides */}\n <AnimatePresence initial={false} custom={direction} mode=\"wait\">\n <motion.div\n key={currentIndex}\n custom={direction}\n variants={animationVariants}\n initial=\"enter\"\n animate=\"center\"\n exit=\"exit\"\n transition={transitionConfig}\n drag={draggable ? \"x\" : false}\n dragConstraints={{ left: 0, right: 0 }}\n dragElastic={0.2}\n onDragEnd={handleDragEnd}\n className=\"ui:absolute ui:inset-0 ui:flex ui:items-center ui:justify-center ui:cursor-grab active:ui:cursor-grabbing\"\n style={{\n perspective:\n animation === \"flip\" || animation === \"cube\" ? 1000 : undefined,\n }}\n >\n {currentItem.image ? (\n <div className=\"ui:relative ui:w-full ui:h-full\">\n <img\n src={currentItem.image}\n alt={currentItem.alt || currentItem.title || \"Carousel slide\"}\n className=\"ui:w-full ui:h-full ui:object-cover\"\n />\n {(currentItem.title || currentItem.description) && (\n <div className=\"ui:absolute ui:bottom-0 ui:left-0 ui:right-0 ui:p-6 ui:bg-gradient-to-t ui:from-black/70 ui:to-transparent\">\n {currentItem.title && (\n <h3 className=\"ui:text-2xl ui:font-bold ui:text-ds-on-accent ui:mb-2\">\n {currentItem.title}\n </h3>\n )}\n {currentItem.description && (\n <p className=\"ui:text-ds-on-accent/80\">\n {currentItem.description}\n </p>\n )}\n </div>\n )}\n </div>\n ) : (\n <div className=\"ui:w-full ui:h-full ui:flex ui:items-center ui:justify-center ui:p-6\">\n {currentItem.content}\n </div>\n )}\n </motion.div>\n </AnimatePresence>\n\n {/* Navigation Arrows */}\n {showArrows && totalSlides > 1 && (\n <>\n {renderArrow ? (\n <>\n {renderArrow({ direction: \"prev\", onClick: goPrev })}\n {renderArrow({ direction: \"next\", onClick: goNext })}\n </>\n ) : (\n <>\n <motion.button\n type=\"button\"\n onClick={goPrev}\n className=\"ui:absolute ui:left-4 ui:top-1/2 ui:-translate-y-1/2 ui:z-20 ui:p-2 ui:rounded-full ui:bg-ds-surface-1/85 ui:backdrop-blur-sm ui:text-ds-1 ui:shadow-lg ui:transition-all hover:ui:bg-ds-surface-2\"\n whileHover={{ scale: 1.1 }}\n whileTap={{ scale: 0.9 }}\n aria-label=\"Previous slide\"\n >\n <ChevronLeftIcon className=\"ui:w-6 ui:h-6\" aria-hidden=\"true\" />\n </motion.button>\n <motion.button\n type=\"button\"\n onClick={goNext}\n className=\"ui:absolute ui:right-4 ui:top-1/2 ui:-translate-y-1/2 ui:z-20 ui:p-2 ui:rounded-full ui:bg-ds-surface-1/85 ui:backdrop-blur-sm ui:text-ds-1 ui:shadow-lg ui:transition-all hover:ui:bg-ds-surface-2\"\n whileHover={{ scale: 1.1 }}\n whileTap={{ scale: 0.9 }}\n aria-label=\"Next slide\"\n >\n <ChevronRightIcon\n className=\"ui:w-6 ui:h-6\"\n aria-hidden=\"true\"\n />\n </motion.button>\n </>\n )}\n </>\n )}\n\n {/* Dot Indicators */}\n {showDots && totalSlides > 1 && (\n <div className=\"ui:absolute ui:bottom-4 ui:left-1/2 ui:-translate-x-1/2 ui:z-20 ui:flex ui:gap-2 ui:rounded-full ui:bg-ds-surface-1/30 ui:p-2 ui:backdrop-blur-sm\">\n {items.map((_, index) =>\n renderDot ? (\n renderDot({\n index,\n active: index === currentIndex,\n onClick: () => goToSlide(index),\n })\n ) : (\n <motion.button\n key={index}\n type=\"button\"\n onClick={() => goToSlide(index)}\n className={mergeClassNames(\n \"ui:rounded-full ui:transition-all ui:duration-300\",\n index === currentIndex\n ? \"ui:h-2.5 ui:w-8 ui:bg-ds-accent ui:shadow-lg\"\n : \"ui:h-2.5 ui:w-2.5 ui:bg-ds-surface-3 hover:ui:bg-ds-border-3\",\n )}\n whileHover={{ scale: 1.2 }}\n whileTap={{ scale: 0.9 }}\n aria-label={`Go to slide ${index + 1}`}\n aria-current={index === currentIndex ? \"true\" : undefined}\n />\n ),\n )}\n </div>\n )}\n\n {/* Progress indicator */}\n {autoPlay > 0 && !isPaused && (\n <motion.div\n className=\"ui:absolute ui:bottom-0 ui:left-0 ui:h-1 ui:bg-ds-accent/80 ui:rounded-full\"\n initial={{ width: \"0%\" }}\n animate={{ width: \"100%\" }}\n transition={{ duration: autoPlay / 1000, ease: \"linear\" }}\n key={currentIndex}\n />\n )}\n </div>\n );\n};\n\nCarousel.displayName = \"Carousel\";\n\nexport default Carousel;\n"],"mappings":";;;;;;AAOA,IAAM,gBAAgB;CACpB,SAAS;CACT,OACE;CACF,SAAS;CACV;AAGD,IAAM,wBAAwB,cAAiC;AAyE7D,QAAO;EAvEL,OAAO;GACL,QAAQ,eAAuB;IAC7B,GAAG,YAAY,IAAI,SAAS;IAC5B,SAAS;IACV;GACD,QAAQ;IAAE,GAAG;IAAG,SAAS;IAAG;GAC5B,OAAO,eAAuB;IAC5B,GAAG,YAAY,IAAI,SAAS;IAC5B,SAAS;IACV;GACF;EACD,MAAM;GACJ,cAAc,EAAE,SAAS,GAAG;GAC5B,QAAQ,EAAE,SAAS,GAAG;GACtB,aAAa,EAAE,SAAS,GAAG;GAC5B;EACD,OAAO;GACL,QAAQ,eAAuB;IAC7B,OAAO;IACP,SAAS;IACT,GAAG,YAAY,IAAI,KAAK;IACzB;GACD,QAAQ;IAAE,OAAO;IAAG,SAAS;IAAG,GAAG;IAAG;GACtC,OAAO,eAAuB;IAC5B,OAAO;IACP,SAAS;IACT,GAAG,YAAY,IAAI,KAAK;IACzB;GACF;EACD,MAAM;GACJ,QAAQ,eAAuB;IAC7B,SAAS,YAAY,IAAI,KAAK;IAC9B,SAAS;IACV;GACD,QAAQ;IAAE,SAAS;IAAG,SAAS;IAAG;GAClC,OAAO,eAAuB;IAC5B,SAAS,YAAY,IAAI,KAAK;IAC9B,SAAS;IACV;GACF;EACD,MAAM;GACJ,QAAQ,eAAuB;IAC7B,SAAS,YAAY,IAAI,KAAK;IAC9B,GAAG,YAAY,IAAI,QAA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x"],"sourcesContent":["import { useState, useEffect, useCallback, useRef } from \"react\";\nimport { motion, AnimatePresence } from \"framer-motion\";\n\nimport { ChevronLeftIcon, ChevronRightIcon } from \"../../icons\";\nimport { mergeClassNames } from \"../../../utils\";\nimport type { CarouselProps, CarouselAnimation } from \"./types\";\n\nconst variantStyles = {\n default: \"ui:bg-ds-surface-1 ui:shadow-xl\",\n glass:\n \"ui:bg-ds-surface-1/70 ui:backdrop-blur-2xl ui:border ui:border-ds-border-2\",\n minimal: \"ui:bg-transparent\",\n};\n\n// Animation variants for different carousel transitions\nconst getAnimationVariants = (animation: CarouselAnimation) => {\n const variants = {\n slide: {\n enter: (direction: number) => ({\n x: direction > 0 ? \"100%\" : \"-100%\",\n opacity: 0,\n }),\n center: { x: 0, opacity: 1 },\n exit: (direction: number) => ({\n x: direction < 0 ? \"100%\" : \"-100%\",\n opacity: 0,\n }),\n },\n fade: {\n enter: () => ({ opacity: 0 }),\n center: { opacity: 1 },\n exit: () => ({ opacity: 0 }),\n },\n scale: {\n enter: (direction: number) => ({\n scale: 0.8,\n opacity: 0,\n x: direction > 0 ? 50 : -50,\n }),\n center: { scale: 1, opacity: 1, x: 0 },\n exit: (direction: number) => ({\n scale: 0.8,\n opacity: 0,\n x: direction < 0 ? 50 : -50,\n }),\n },\n flip: {\n enter: (direction: number) => ({\n rotateY: direction > 0 ? 90 : -90,\n opacity: 0,\n }),\n center: { rotateY: 0, opacity: 1 },\n exit: (direction: number) => ({\n rotateY: direction < 0 ? 90 : -90,\n opacity: 0,\n }),\n },\n cube: {\n enter: (direction: number) => ({\n rotateY: direction > 0 ? 90 : -90,\n x: direction > 0 ? \"50%\" : \"-50%\",\n opacity: 0,\n scale: 0.8,\n }),\n center: { rotateY: 0, x: 0, opacity: 1, scale: 1 },\n exit: (direction: number) => ({\n rotateY: direction < 0 ? 90 : -90,\n x: direction < 0 ? \"50%\" : \"-50%\",\n opacity: 0,\n scale: 0.8,\n }),\n },\n cards: {\n enter: (direction: number) => ({\n scale: 0.9,\n opacity: 0,\n y: direction > 0 ? 100 : -100,\n rotateZ: direction > 0 ? 5 : -5,\n }),\n center: { scale: 1, opacity: 1, y: 0, rotateZ: 0 },\n exit: (direction: number) => ({\n scale: 0.9,\n opacity: 0,\n y: direction < 0 ? 100 : -100,\n rotateZ: direction < 0 ? 5 : -5,\n }),\n },\n };\n return variants[animation];\n};\n\n// Transition configs for each animation\nconst getTransitionConfig = (\n animation: CarouselAnimation,\n duration: number,\n) => {\n const durationSec = duration / 1000;\n const configs: Record<CarouselAnimation, object> = {\n slide: {\n x: { type: \"spring\", stiffness: 300, damping: 30 },\n opacity: { duration: durationSec },\n },\n fade: {\n opacity: { duration: durationSec, ease: \"easeInOut\" },\n },\n scale: {\n type: \"spring\",\n stiffness: 200,\n damping: 25,\n opacity: { duration: durationSec },\n },\n flip: {\n type: \"spring\",\n stiffness: 100,\n damping: 20,\n opacity: { duration: durationSec * 0.5 },\n },\n cube: {\n type: \"spring\",\n stiffness: 100,\n damping: 20,\n opacity: { duration: durationSec * 0.5 },\n },\n cards: {\n type: \"spring\",\n stiffness: 150,\n damping: 20,\n opacity: { duration: durationSec },\n },\n };\n return configs[animation];\n};\n\nexport const Carousel = ({\n items,\n className,\n autoPlay = 0,\n showArrows = true,\n showDots = true,\n infinite = true,\n pauseOnHover = true,\n animationDuration = 500,\n // gap and slidesPerView reserved for future multi-slide support\n gap: _gap = 0,\n slidesPerView: _slidesPerView = 1,\n renderArrow,\n renderDot,\n onSlideChange,\n variant = \"glass\",\n height = 400,\n style,\n initialSlide = 0,\n draggable = true,\n animation = \"slide\",\n}: CarouselProps) => {\n const animationVariants = getAnimationVariants(animation);\n const transitionConfig = getTransitionConfig(animation, animationDuration);\n const [[currentIndex, direction], setSlide] = useState([initialSlide, 0]);\n const [isPaused, setIsPaused] = useState(false);\n const intervalRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const totalSlides = items.length;\n\n const goToSlide = useCallback(\n (index: number, dir?: number) => {\n let newIndex = index;\n if (infinite) {\n if (index < 0) newIndex = totalSlides - 1;\n else if (index >= totalSlides) newIndex = 0;\n } else {\n if (index < 0) newIndex = 0;\n else if (index >= totalSlides) newIndex = totalSlides - 1;\n }\n const newDirection = dir ?? (newIndex > currentIndex ? 1 : -1);\n setSlide([newIndex, newDirection]);\n onSlideChange?.(newIndex);\n },\n [currentIndex, infinite, totalSlides, onSlideChange],\n );\n\n const goNext = useCallback(\n () => goToSlide(currentIndex + 1, 1),\n [currentIndex, goToSlide],\n );\n const goPrev = useCallback(\n () => goToSlide(currentIndex - 1, -1),\n [currentIndex, goToSlide],\n );\n\n // Auto-play\n useEffect(() => {\n if (autoPlay > 0 && !isPaused) {\n intervalRef.current = setInterval(goNext, autoPlay);\n }\n return () => {\n if (intervalRef.current) clearInterval(intervalRef.current);\n };\n }, [autoPlay, isPaused, goNext]);\n\n // Keyboard navigation\n useEffect(() => {\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"ArrowLeft\") goPrev();\n if (e.key === \"ArrowRight\") goNext();\n };\n window.addEventListener(\"keydown\", handleKeyDown);\n return () => window.removeEventListener(\"keydown\", handleKeyDown);\n }, [goNext, goPrev]);\n\n // Drag handling\n const handleDragEnd = (\n _event: MouseEvent | TouchEvent | PointerEvent,\n info: {\n offset: { x: number; y: number };\n velocity: { x: number; y: number };\n },\n ) => {\n const threshold = 50;\n if (info.offset.x < -threshold) goNext();\n else if (info.offset.x > threshold) goPrev();\n };\n\n const currentItem = items[currentIndex];\n\n return (\n <div\n className={mergeClassNames(\n \"ui:relative ui:overflow-hidden ui:rounded-2xl ui:w-full\",\n variantStyles[variant],\n className,\n )}\n style={{\n height: typeof height === \"number\" ? `${height}px` : height,\n ...style,\n }}\n onMouseEnter={() => pauseOnHover && setIsPaused(true)}\n onMouseLeave={() => pauseOnHover && setIsPaused(false)}\n >\n {/* Slides */}\n <AnimatePresence initial={false} custom={direction} mode=\"wait\">\n <motion.div\n key={currentIndex}\n custom={direction}\n variants={animationVariants}\n initial=\"enter\"\n animate=\"center\"\n exit=\"exit\"\n transition={transitionConfig}\n drag={draggable ? \"x\" : false}\n dragConstraints={{ left: 0, right: 0 }}\n dragElastic={0.2}\n onDragEnd={handleDragEnd}\n className=\"ui:absolute ui:inset-0 ui:flex ui:items-center ui:justify-center ui:cursor-grab active:ui:cursor-grabbing\"\n style={{\n perspective:\n animation === \"flip\" || animation === \"cube\" ? 1000 : undefined,\n }}\n >\n {currentItem.image ? (\n <div className=\"ui:relative ui:w-full ui:h-full\">\n <img\n src={currentItem.image}\n alt={currentItem.alt || currentItem.title || \"Carousel slide\"}\n className=\"ui:w-full ui:h-full ui:object-cover\"\n />\n {(currentItem.title || currentItem.description) && (\n <div className=\"ui:absolute ui:bottom-0 ui:left-0 ui:right-0 ui:p-6 ui:bg-gradient-to-t ui:from-black/70 ui:to-transparent\">\n {currentItem.title && (\n <h3 className=\"ui:text-2xl ui:font-bold ui:text-ds-on-accent ui:mb-2\">\n {currentItem.title}\n </h3>\n )}\n {currentItem.description && (\n <p className=\"ui:text-ds-on-accent/80\">\n {currentItem.description}\n </p>\n )}\n </div>\n )}\n </div>\n ) : (\n <div className=\"ui:w-full ui:h-full ui:flex ui:items-center ui:justify-center ui:p-6\">\n {currentItem.content}\n </div>\n )}\n </motion.div>\n </AnimatePresence>\n\n {/* Navigation Arrows */}\n {showArrows && totalSlides > 1 && (\n <>\n {renderArrow ? (\n <>\n {renderArrow({ direction: \"prev\", onClick: goPrev })}\n {renderArrow({ direction: \"next\", onClick: goNext })}\n </>\n ) : (\n <>\n <motion.button\n type=\"button\"\n onClick={goPrev}\n className=\"ui:absolute ui:left-4 ui:top-1/2 ui:-translate-y-1/2 ui:z-20 ui:p-2 ui:rounded-full ui:bg-ds-surface-1/85 ui:backdrop-blur-sm ui:text-ds-1 ui:shadow-lg ui:transition-all hover:ui:bg-ds-surface-2\"\n whileHover={{ scale: 1.1 }}\n whileTap={{ scale: 0.9 }}\n aria-label=\"Previous slide\"\n >\n <ChevronLeftIcon className=\"ui:w-6 ui:h-6\" aria-hidden=\"true\" />\n </motion.button>\n <motion.button\n type=\"button\"\n onClick={goNext}\n className=\"ui:absolute ui:right-4 ui:top-1/2 ui:-translate-y-1/2 ui:z-20 ui:p-2 ui:rounded-full ui:bg-ds-surface-1/85 ui:backdrop-blur-sm ui:text-ds-1 ui:shadow-lg ui:transition-all hover:ui:bg-ds-surface-2\"\n whileHover={{ scale: 1.1 }}\n whileTap={{ scale: 0.9 }}\n aria-label=\"Next slide\"\n >\n <ChevronRightIcon\n className=\"ui:w-6 ui:h-6\"\n aria-hidden=\"true\"\n />\n </motion.button>\n </>\n )}\n </>\n )}\n\n {/* Dot Indicators */}\n {showDots && totalSlides > 1 && (\n <div className=\"ui:absolute ui:bottom-4 ui:left-1/2 ui:-translate-x-1/2 ui:z-20 ui:flex ui:gap-2 ui:rounded-full ui:bg-ds-surface-1/30 ui:p-2 ui:backdrop-blur-sm\">\n {items.map((_, index) =>\n renderDot ? (\n renderDot({\n index,\n active: index === currentIndex,\n onClick: () => goToSlide(index),\n })\n ) : (\n <motion.button\n key={index}\n type=\"button\"\n onClick={() => goToSlide(index)}\n className={mergeClassNames(\n \"ui:rounded-full ui:transition-all ui:duration-300\",\n index === currentIndex\n ? \"ui:h-2.5 ui:w-8 ui:bg-ds-accent ui:shadow-lg\"\n : \"ui:h-2.5 ui:w-2.5 ui:bg-ds-surface-3 hover:ui:bg-ds-border-3\",\n )}\n whileHover={{ scale: 1.2 }}\n whileTap={{ scale: 0.9 }}\n aria-label={`Go to slide ${index + 1}`}\n aria-current={index === currentIndex ? \"true\" : undefined}\n />\n ),\n )}\n </div>\n )}\n\n {/* Progress indicator */}\n {autoPlay > 0 && !isPaused && (\n <motion.div\n className=\"ui:absolute ui:bottom-0 ui:left-0 ui:h-1 ui:bg-ds-accent/80 ui:rounded-full\"\n initial={{ width: \"0%\" }}\n animate={{ width: \"100%\" }}\n transition={{ duration: autoPlay / 1000, ease: \"linear\" }}\n key={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,OAAO,IAAI;IACzB,UAAU,EAAE,OAAO,GAAI;IACvB,cAAW;cAEX,oBAAC,iBAAD;KAAiB,WAAU;KAAgB,eAAY;IAAQ,CAAA;GAClD,CAAA,GACf,oBAAC,OAAO,QAAR;IACE,MAAK;IACL,SAAS;IACT,WAAU;IACV,YAAY,EAAE,OAAO,IAAI;IACzB,UAAU,EAAE,OAAO,GAAI;IACvB,cAAW;cAEX,oBAAC,kBAAD;KACE,WAAU;KACV,eAAY;IACb,CAAA;GACY,CAAA,CACf,EAAA,CAAA,EAEJ,CAAA;GAIH,YAAY,cAAc,KACzB,oBAAC,OAAD;IAAK,WAAU;cACZ,MAAM,KAAK,GAAG,UACb,YACE,UAAU;KACR;KACA,QAAQ,UAAU;KAClB,eAAe,UAAU,KAAK;IAChC,CAAC,IAED,oBAAC,OAAO,QAAR;KAEE,MAAK;KACL,eAAe,UAAU,KAAK;KAC9B,WAAW,gBACT,qDACA,UAAU,eACN,iDACA,8DACN;KACA,YAAY,EAAE,OAAO,IAAI;KACzB,UAAU,EAAE,OAAO,GAAI;KACvB,cAAY,eAAe,QAAQ;KACnC,gBAAc,UAAU,eAAe,SAAS,KAAA;IACjD,GAbM,KAaN,CAEL;GACG,CAAA;GAIN,WAAW,KAAK,CAAC,YAChB,oBAAC,OAAO,KAAR;IACE,WAAU;IACV,SAAS,EAAE,OAAO,KAAK;IACvB,SAAS,EAAE,OAAO,OAAO;IACzB,YAAY;KAAE,UAAU,WAAW;KAAM,MAAM;IAAS;GAEzD,GADM,YACN;EAEA;;AAET;AAEA,SAAS,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chartStyles-
|
|
1
|
+
{"version":3,"file":"chartStyles-2mTluDoo.cjs","names":[],"sources":["../../src/components/data-display/charts/chartStyles.ts"],"sourcesContent":["import React from \"react\";\n\nexport const chartTooltipContentStyle: React.CSSProperties = {\n background:\n \"linear-gradient(135deg, color-mix(in srgb, var(--ds-color-bg-surface) 88%, transparent), color-mix(in srgb, var(--ds-color-bg-elevated) 74%, transparent))\",\n border:\n \"1px solid color-mix(in srgb, var(--ds-color-border-strong) 72%, transparent)\",\n borderRadius: \"12px\",\n backdropFilter: \"blur(18px) saturate(180%)\",\n WebkitBackdropFilter: \"blur(18px) saturate(180%)\",\n boxShadow:\n \"0 18px 40px color-mix(in srgb, var(--ds-color-fg) 14%, transparent), inset 0 1px 0 color-mix(in srgb, var(--ds-color-bg-surface) 36%, transparent)\",\n color: \"var(--ds-color-fg)\",\n padding: \"0.75rem 0.875rem\",\n};\n\nexport const chartTooltipLabelStyle: React.CSSProperties = {\n color: \"var(--ds-color-fg)\",\n fontSize: \"0.8125rem\",\n fontWeight: 600,\n marginBottom: \"0.375rem\",\n};\n\nexport const chartTooltipItemStyle: React.CSSProperties = {\n color: \"var(--ds-color-fg)\",\n fontSize: \"0.8125rem\",\n fontWeight: 500,\n padding: 0,\n};\n\nexport const chartTooltipWrapperStyle: React.CSSProperties = {\n outline: \"none\",\n};\n\nexport const chartLegendTextStyle: React.CSSProperties = {\n fontSize: \"12px\",\n color: \"var(--ds-color-fg-muted)\",\n};\n\nexport const chartBandHoverCursorStyle = {\n fill: \"color-mix(in srgb, var(--ds-color-accent) 12%, transparent)\",\n stroke:\n \"color-mix(in srgb, var(--ds-color-accent) 34%, var(--ds-color-border-strong))\",\n strokeWidth: 1,\n};\n\nexport const chartLineHoverCursorStyle = {\n stroke:\n \"color-mix(in srgb, var(--ds-color-accent) 42%, var(--ds-color-border-strong))\",\n strokeWidth: 1.25,\n strokeDasharray: \"4 4\",\n};\n\nexport const getChartActiveDotStyle = (\n strokeColor: string,\n): {\n fill: string;\n r: number;\n stroke: string;\n strokeWidth: number;\n} => ({\n r: 6,\n fill: \"color-mix(in srgb, var(--ds-color-bg-surface) 90%, transparent)\",\n stroke: strokeColor,\n strokeWidth: 2.5,\n});\n\nexport const chartPillTooltipStyle: React.CSSProperties = {\n background:\n \"linear-gradient(135deg, color-mix(in srgb, var(--ds-color-bg-surface) 90%, transparent), color-mix(in srgb, var(--ds-color-bg-elevated) 76%, transparent))\",\n border:\n \"1px solid color-mix(in srgb, var(--ds-color-border-strong) 70%, transparent)\",\n boxShadow:\n \"0 14px 32px color-mix(in srgb, var(--ds-color-fg) 14%, transparent), inset 0 1px 0 color-mix(in srgb, var(--ds-color-bg-surface) 34%, transparent)\",\n backdropFilter: \"blur(16px) saturate(170%)\",\n WebkitBackdropFilter: \"blur(16px) saturate(170%)\",\n};\n"],"mappings":";AAEA,IAAa,2BAAgD;CAC3D,YACE;CACF,QACE;CACF,cAAc;CACd,gBAAgB;CAChB,sBAAsB;CACtB,WACE;CACF,OAAO;CACP,SAAS;AACX;AAEA,IAAa,yBAA8C;CACzD,OAAO;CACP,UAAU;CACV,YAAY;CACZ,cAAc;AAChB;AAEA,IAAa,wBAA6C;CACxD,OAAO;CACP,UAAU;CACV,YAAY;CACZ,SAAS;AACX;AAEA,IAAa,2BAAgD,EAC3D,SAAS,OACX;AAEA,IAAa,uBAA4C;CACvD,UAAU;CACV,OAAO;AACT;AAEA,IAAa,4BAA4B;CACvC,MAAM;CACN,QACE;CACF,aAAa;AACf;AAEA,IAAa,4BAA4B;CACvC,QACE;CACF,aAAa;CACb,iBAAiB;AACnB;AAEA,IAAa,0BACX,iBAMI;CACJ,GAAG;CACH,MAAM;CACN,QAAQ;CACR,aAAa;AACf;AAEA,IAAa,wBAA6C;CACxD,YACE;CACF,QACE;CACF,WACE;CACF,gBAAgB;CAChB,sBAAsB;AACxB"}
|
|
@@ -52,4 +52,4 @@ var chartPillTooltipStyle = {
|
|
|
52
52
|
//#endregion
|
|
53
53
|
export { chartTooltipContentStyle as a, chartTooltipWrapperStyle as c, chartPillTooltipStyle as i, getChartActiveDotStyle as l, chartLegendTextStyle as n, chartTooltipItemStyle as o, chartLineHoverCursorStyle as r, chartTooltipLabelStyle as s, chartBandHoverCursorStyle as t };
|
|
54
54
|
|
|
55
|
-
//# sourceMappingURL=chartStyles-
|
|
55
|
+
//# sourceMappingURL=chartStyles-DrHVYS5N.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chartStyles-
|
|
1
|
+
{"version":3,"file":"chartStyles-DrHVYS5N.mjs","names":[],"sources":["../../src/components/data-display/charts/chartStyles.ts"],"sourcesContent":["import React from \"react\";\n\nexport const chartTooltipContentStyle: React.CSSProperties = {\n background:\n \"linear-gradient(135deg, color-mix(in srgb, var(--ds-color-bg-surface) 88%, transparent), color-mix(in srgb, var(--ds-color-bg-elevated) 74%, transparent))\",\n border:\n \"1px solid color-mix(in srgb, var(--ds-color-border-strong) 72%, transparent)\",\n borderRadius: \"12px\",\n backdropFilter: \"blur(18px) saturate(180%)\",\n WebkitBackdropFilter: \"blur(18px) saturate(180%)\",\n boxShadow:\n \"0 18px 40px color-mix(in srgb, var(--ds-color-fg) 14%, transparent), inset 0 1px 0 color-mix(in srgb, var(--ds-color-bg-surface) 36%, transparent)\",\n color: \"var(--ds-color-fg)\",\n padding: \"0.75rem 0.875rem\",\n};\n\nexport const chartTooltipLabelStyle: React.CSSProperties = {\n color: \"var(--ds-color-fg)\",\n fontSize: \"0.8125rem\",\n fontWeight: 600,\n marginBottom: \"0.375rem\",\n};\n\nexport const chartTooltipItemStyle: React.CSSProperties = {\n color: \"var(--ds-color-fg)\",\n fontSize: \"0.8125rem\",\n fontWeight: 500,\n padding: 0,\n};\n\nexport const chartTooltipWrapperStyle: React.CSSProperties = {\n outline: \"none\",\n};\n\nexport const chartLegendTextStyle: React.CSSProperties = {\n fontSize: \"12px\",\n color: \"var(--ds-color-fg-muted)\",\n};\n\nexport const chartBandHoverCursorStyle = {\n fill: \"color-mix(in srgb, var(--ds-color-accent) 12%, transparent)\",\n stroke:\n \"color-mix(in srgb, var(--ds-color-accent) 34%, var(--ds-color-border-strong))\",\n strokeWidth: 1,\n};\n\nexport const chartLineHoverCursorStyle = {\n stroke:\n \"color-mix(in srgb, var(--ds-color-accent) 42%, var(--ds-color-border-strong))\",\n strokeWidth: 1.25,\n strokeDasharray: \"4 4\",\n};\n\nexport const getChartActiveDotStyle = (\n strokeColor: string,\n): {\n fill: string;\n r: number;\n stroke: string;\n strokeWidth: number;\n} => ({\n r: 6,\n fill: \"color-mix(in srgb, var(--ds-color-bg-surface) 90%, transparent)\",\n stroke: strokeColor,\n strokeWidth: 2.5,\n});\n\nexport const chartPillTooltipStyle: React.CSSProperties = {\n background:\n \"linear-gradient(135deg, color-mix(in srgb, var(--ds-color-bg-surface) 90%, transparent), color-mix(in srgb, var(--ds-color-bg-elevated) 76%, transparent))\",\n border:\n \"1px solid color-mix(in srgb, var(--ds-color-border-strong) 70%, transparent)\",\n boxShadow:\n \"0 14px 32px color-mix(in srgb, var(--ds-color-fg) 14%, transparent), inset 0 1px 0 color-mix(in srgb, var(--ds-color-bg-surface) 34%, transparent)\",\n backdropFilter: \"blur(16px) saturate(170%)\",\n WebkitBackdropFilter: \"blur(16px) saturate(170%)\",\n};\n"],"mappings":";AAEA,IAAa,2BAAgD;CAC3D,YACE;CACF,QACE;CACF,cAAc;CACd,gBAAgB;CAChB,sBAAsB;CACtB,WACE;CACF,OAAO;CACP,SAAS;AACX;AAEA,IAAa,yBAA8C;CACzD,OAAO;CACP,UAAU;CACV,YAAY;CACZ,cAAc;AAChB;AAEA,IAAa,wBAA6C;CACxD,OAAO;CACP,UAAU;CACV,YAAY;CACZ,SAAS;AACX;AAEA,IAAa,2BAAgD,EAC3D,SAAS,OACX;AAEA,IAAa,uBAA4C;CACvD,UAAU;CACV,OAAO;AACT;AAEA,IAAa,4BAA4B;CACvC,MAAM;CACN,QACE;CACF,aAAa;AACf;AAEA,IAAa,4BAA4B;CACvC,QACE;CACF,aAAa;CACb,iBAAiB;AACnB;AAEA,IAAa,0BACX,iBAMI;CACJ,GAAG;CACH,MAAM;CACN,QAAQ;CACR,aAAa;AACf;AAEA,IAAa,wBAA6C;CACxD,YACE;CACF,QACE;CACF,WACE;CACF,gBAAgB;CAChB,sBAAsB;AACxB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_chunk = require("./chunk-
|
|
2
|
-
const require_chartStyles = require("./chartStyles-
|
|
3
|
-
const require_truncated_text = require("./truncated-text-
|
|
1
|
+
const require_chunk = require("./chunk-D6vf50IK.cjs");
|
|
2
|
+
const require_chartStyles = require("./chartStyles-2mTluDoo.cjs");
|
|
3
|
+
const require_truncated_text = require("./truncated-text-D0t4atw5.cjs");
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_chunk.__toESM(react, 1);
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -1029,4 +1029,4 @@ Object.defineProperty(exports, "getChartPalette", {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
});
|
|
1031
1031
|
|
|
1032
|
-
//# sourceMappingURL=charts-
|
|
1032
|
+
//# sourceMappingURL=charts-DMu4zp8j.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"charts-COx3IbI2.cjs","names":[],"sources":["../../src/components/data-display/charts/chartPalette.ts","../../src/components/data-display/charts/NeonLineChart.tsx","../../src/components/data-display/charts/MiniNeonSparkline.tsx","../../src/components/data-display/charts/StackedBarChart.tsx","../../src/components/data-display/charts/ThinBreakdownBar.tsx","../../src/components/data-display/charts/AreaChart.tsx","../../src/components/data-display/charts/BarChart.tsx","../../src/components/data-display/charts/PositiveNegativeBarChart.tsx","../../src/components/data-display/charts/PieChart.tsx"],"sourcesContent":["const chartColorSlots = [\n 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n] as const;\n\nexport type ChartColorSlot = (typeof chartColorSlots)[number];\nexport type ChartColorToken = `chart-${ChartColorSlot}`;\n\nexport const chartColorTokens = chartColorSlots.map(\n (slot) => `chart-${slot}` as ChartColorToken,\n);\n\nconst chartPalette = chartColorSlots.map((slot) => `var(--ds-chart-${slot})`);\n\ntype RgbColor = {\n r: number;\n g: number;\n b: number;\n};\n\nconst resolvedColorCache = new Map<string, RgbColor | null>();\n\nconst chartTokenPattern = /^chart-(\\d+)$/i;\nconst chartVariablePattern = /^--((?:ds|color)-chart-(\\d+))$/i;\n\nconst getChartSlotValue = (slot: ChartColorSlot | ChartColorToken): number =>\n typeof slot === \"number\" ? slot : Number(slot.replace(\"chart-\", \"\"));\n\nexport const getChartColorVar = (\n slot: ChartColorSlot | ChartColorToken,\n namespace: \"ds\" | \"color\" = \"ds\",\n): string => `var(--${namespace}-chart-${getChartSlotValue(slot)})`;\n\nexport const normalizeChartColorValue = (\n value?: string,\n): string | undefined => {\n const normalizedValue = value?.trim();\n\n if (!normalizedValue) {\n return undefined;\n }\n\n const tokenMatch = normalizedValue.match(chartTokenPattern);\n if (tokenMatch) {\n return `var(--ds-chart-${tokenMatch[1]})`;\n }\n\n const variableMatch = normalizedValue.match(chartVariablePattern);\n if (variableMatch) {\n return `var(--${variableMatch[1]})`;\n }\n\n return normalizedValue;\n};\n\nconst getThemeSignature = (): string => {\n if (typeof document === \"undefined\") return \"\";\n\n const root = document.documentElement;\n return [\n root.getAttribute(\"data-brand\") ?? \"\",\n root.getAttribute(\"data-mode\") ?? \"\",\n root.getAttribute(\"data-theme\") ?? \"\",\n ].join(\"|\");\n};\n\nconst resolveColor = (value: string): RgbColor | null => {\n if (typeof document === \"undefined\") return null;\n\n const cacheKey = `${getThemeSignature()}::${value}`;\n const cached = resolvedColorCache.get(cacheKey);\n if (cached !== undefined) {\n return cached;\n }\n\n const probe = document.createElement(\"span\");\n probe.style.color = value;\n probe.style.position = \"fixed\";\n probe.style.opacity = \"0\";\n probe.style.pointerEvents = \"none\";\n document.body.appendChild(probe);\n\n const computedColor = getComputedStyle(probe).color;\n document.body.removeChild(probe);\n\n const match = computedColor.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)/i);\n\n const resolved = match\n ? {\n r: Number(match[1]),\n g: Number(match[2]),\n b: Number(match[3]),\n }\n : null;\n\n resolvedColorCache.set(cacheKey, resolved);\n return resolved;\n};\n\nconst getColorDistance = (left: RgbColor, right: RgbColor): number => {\n const deltaR = left.r - right.r;\n const deltaG = left.g - right.g;\n const deltaB = left.b - right.b;\n\n return Math.sqrt(deltaR ** 2 + deltaG ** 2 + deltaB ** 2);\n};\n\nconst isTooSimilar = (\n candidate: string,\n usedColors: readonly string[],\n minDistance = 84,\n): boolean => {\n if (usedColors.includes(candidate)) {\n return true;\n }\n\n const candidateRgb = resolveColor(candidate);\n if (!candidateRgb) {\n return false;\n }\n\n return usedColors.some((usedColor) => {\n const usedRgb = resolveColor(usedColor);\n return usedRgb\n ? getColorDistance(candidateRgb, usedRgb) < minDistance\n : false;\n });\n};\n\nexport const getChartPalette = (count = chartPalette.length): string[] =>\n Array.from(\n { length: count },\n (_, index) => chartPalette[index % chartPalette.length],\n );\n\nexport const normalizeChartColors = (\n requestedColors: readonly (string | undefined)[],\n): string[] => {\n const usedColors: string[] = [];\n let paletteIndex = 0;\n\n const getNextDistinctPaletteColor = (): string => {\n for (let attempt = 0; attempt < chartPalette.length; attempt++) {\n const candidate =\n chartPalette[(paletteIndex + attempt) % chartPalette.length];\n\n if (!isTooSimilar(candidate, usedColors)) {\n paletteIndex = (paletteIndex + attempt + 1) % chartPalette.length;\n return candidate;\n }\n }\n\n const fallback = chartPalette[paletteIndex % chartPalette.length];\n paletteIndex = (paletteIndex + 1) % chartPalette.length;\n return fallback;\n };\n\n return requestedColors.map((requestedColor) => {\n const normalizedRequestedColor = normalizeChartColorValue(requestedColor);\n const resolvedColor =\n normalizedRequestedColor &&\n !isTooSimilar(normalizedRequestedColor, usedColors)\n ? normalizedRequestedColor\n : getNextDistinctPaletteColor();\n\n usedColors.push(resolvedColor);\n return resolvedColor;\n });\n};\n","\"use client\";\n\nimport React from \"react\";\nimport {\n LineChart,\n Line,\n XAxis,\n YAxis,\n CartesianGrid,\n Tooltip,\n ResponsiveContainer,\n} from \"recharts\";\n\nimport {\n getChartColorVar,\n normalizeChartColorValue,\n normalizeChartColors,\n} from \"./chartPalette\";\nimport {\n chartLineHoverCursorStyle,\n chartTooltipContentStyle,\n chartTooltipItemStyle,\n chartTooltipLabelStyle,\n chartTooltipWrapperStyle,\n getChartActiveDotStyle,\n} from \"./chartStyles\";\n\ninterface DataPoint {\n name: string;\n value: number;\n}\n\ninterface NeonLineChartProps {\n data: DataPoint[];\n height?: number | string;\n lineColorStop1?: string;\n lineColorStop2?: string;\n className?: string;\n glowColor?: string;\n}\n\nexport const NeonLineChart: React.FC<NeonLineChartProps> = ({\n data,\n height = 300,\n lineColorStop1 = getChartColorVar(2),\n lineColorStop2 = getChartColorVar(1),\n glowColor = getChartColorVar(1),\n className = \"\",\n}) => {\n const [normalizedStop1, normalizedStop2] = React.useMemo(\n () => normalizeChartColors([lineColorStop1, lineColorStop2]),\n [lineColorStop1, lineColorStop2],\n );\n const normalizedGlowColor = React.useMemo(\n () => normalizeChartColorValue(glowColor) ?? getChartColorVar(1),\n [glowColor],\n );\n\n return (\n <div className={`w-full relative ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <LineChart\n data={data}\n margin={{ top: 20, right: 30, left: 10, bottom: 20 }}\n >\n <defs>\n {/* Linear Gradient for the Line */}\n <linearGradient id=\"neonGradient\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n <stop offset=\"0%\" stopColor={normalizedStop1} />\n <stop offset=\"100%\" stopColor={normalizedStop2} />\n </linearGradient>\n\n {/* Glowing Drop Shadow Filter */}\n <filter id=\"neonGlow\" x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\">\n <feDropShadow\n dx=\"0\"\n dy=\"6\"\n stdDeviation=\"8\"\n floodColor={normalizedGlowColor}\n floodOpacity=\"0.8\"\n />\n <feDropShadow\n dx=\"0\"\n dy=\"0\"\n stdDeviation=\"15\"\n floodColor={normalizedStop1}\n floodOpacity=\"0.3\"\n />\n </filter>\n </defs>\n\n {/* Minimal Grid */}\n <CartesianGrid\n strokeDasharray=\"3 3\"\n vertical={false}\n stroke=\"var(--ds-color-border)\"\n opacity={0.5}\n />\n\n <XAxis\n dataKey=\"name\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dy={10}\n />\n\n <YAxis\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dx={-10}\n />\n\n <Tooltip\n contentStyle={chartTooltipContentStyle}\n cursor={chartLineHoverCursorStyle}\n itemStyle={chartTooltipItemStyle}\n labelStyle={chartTooltipLabelStyle}\n wrapperStyle={chartTooltipWrapperStyle}\n />\n\n {/* The Neon Line */}\n <Line\n type=\"monotone\"\n dataKey=\"value\"\n stroke=\"url(#neonGradient)\"\n strokeWidth={3}\n dot={false}\n activeDot={getChartActiveDotStyle(normalizedStop2)}\n filter=\"url(#neonGlow)\"\n />\n </LineChart>\n </ResponsiveContainer>\n </div>\n );\n};\n","\"use client\";\n\nimport React from \"react\";\nimport { Area, AreaChart, Line, ResponsiveContainer, Tooltip } from \"recharts\";\n\nimport { getChartColorVar, normalizeChartColorValue } from \"./chartPalette\";\n\nexport interface MiniNeonSparklinePoint {\n label: string;\n value: number;\n}\n\nexport type MiniNeonSparklineTone =\n | \"default\"\n | \"success\"\n | \"warning\"\n | \"danger\"\n | \"info\";\n\nexport interface MiniNeonSparklineProps {\n data: MiniNeonSparklinePoint[];\n height?: number;\n strokeWidth?: number;\n className?: string;\n showArea?: boolean;\n showTooltip?: boolean;\n tone?: MiniNeonSparklineTone;\n}\n\nconst toneColorMap: Record<MiniNeonSparklineTone, string> = {\n default: getChartColorVar(1),\n success: \"var(--ds-color-success)\",\n warning: \"var(--ds-color-warning)\",\n danger: \"var(--ds-color-danger)\",\n info: \"var(--ds-color-info)\",\n};\n\nconst tooltipContentStyle: React.CSSProperties = {\n borderRadius: \"12px\",\n border: \"1px solid var(--ds-border-2)\",\n background: \"var(--ds-surface-1)\",\n color: \"var(--ds-text-1)\",\n fontSize: \"12px\",\n};\n\nexport const MiniNeonSparkline: React.FC<MiniNeonSparklineProps> = ({\n data,\n height = 46,\n strokeWidth = 2,\n className = \"\",\n showArea = true,\n showTooltip = true,\n tone = \"default\",\n}) => {\n const resolvedTone = React.useMemo(\n () => normalizeChartColorValue(toneColorMap[tone]) ?? toneColorMap.default,\n [tone],\n );\n\n const chartGradientId = React.useId();\n const chartGlowId = React.useId();\n\n return (\n <div className={`ui:relative ui:w-full ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <AreaChart\n data={data}\n margin={{ top: 4, right: 2, left: 2, bottom: 4 }}\n >\n <defs>\n <linearGradient id={chartGradientId} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={resolvedTone} stopOpacity={0.35} />\n <stop offset=\"100%\" stopColor={resolvedTone} stopOpacity={0.02} />\n </linearGradient>\n <filter\n id={chartGlowId}\n x=\"-20%\"\n y=\"-20%\"\n width=\"140%\"\n height=\"140%\"\n >\n <feDropShadow\n dx=\"0\"\n dy=\"2\"\n stdDeviation=\"3\"\n floodColor={resolvedTone}\n floodOpacity=\"0.45\"\n />\n </filter>\n </defs>\n\n {showArea ? (\n <Area\n type=\"monotone\"\n dataKey=\"value\"\n stroke=\"none\"\n fill={`url(#${chartGradientId})`}\n />\n ) : null}\n\n <Line\n type=\"monotone\"\n dataKey=\"value\"\n stroke={resolvedTone}\n strokeWidth={strokeWidth}\n dot={false}\n isAnimationActive={false}\n filter={`url(#${chartGlowId})`}\n />\n\n {showTooltip ? (\n <Tooltip\n contentStyle={tooltipContentStyle}\n labelStyle={{ color: \"var(--ds-text-2)\", marginBottom: \"4px\" }}\n itemStyle={{ color: \"var(--ds-text-1)\", fontWeight: 600 }}\n formatter={(value) => [String(value ?? \"\"), \"Value\"]}\n />\n ) : null}\n </AreaChart>\n </ResponsiveContainer>\n </div>\n );\n};\n","\"use client\";\n\nimport React from \"react\";\nimport {\n BarChart as RechartsBarChart,\n Bar,\n XAxis,\n YAxis,\n CartesianGrid,\n Tooltip,\n Legend,\n ResponsiveContainer,\n} from \"recharts\";\n\nimport { normalizeChartColors } from \"./chartPalette\";\nimport {\n chartBandHoverCursorStyle,\n chartLegendTextStyle,\n chartTooltipContentStyle,\n chartTooltipItemStyle,\n chartTooltipLabelStyle,\n chartTooltipWrapperStyle,\n} from \"./chartStyles\";\n\nexport interface StackedBarData {\n name: string;\n [key: string]: string | number;\n}\n\ninterface StackedBarChartProps {\n data: StackedBarData[];\n categories: { key: string; color: string; label: string }[];\n height?: number | string;\n yAxisDomain?: [number, number];\n className?: string;\n}\n\nexport const StackedBarChart: React.FC<StackedBarChartProps> = ({\n data,\n categories,\n height = 300,\n yAxisDomain,\n className = \"\",\n}) => {\n const normalizedCategories = React.useMemo(() => {\n const normalizedColors = normalizeChartColors(\n categories.map((category) => category.color),\n );\n\n return categories.map((category, index) => ({\n ...category,\n color: normalizedColors[index] ?? category.color,\n }));\n }, [categories]);\n\n return (\n <div className={`w-full ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsBarChart\n data={data}\n margin={{ top: 20, right: 30, left: 20, bottom: 5 }}\n >\n <CartesianGrid\n strokeDasharray=\"3 3\"\n vertical={false}\n stroke=\"var(--ds-color-border)\"\n opacity={0.4}\n />\n <XAxis\n dataKey=\"name\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dy={10}\n />\n <YAxis\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dx={-10}\n domain={yAxisDomain}\n />\n <Tooltip\n contentStyle={chartTooltipContentStyle}\n cursor={chartBandHoverCursorStyle}\n itemStyle={chartTooltipItemStyle}\n labelStyle={chartTooltipLabelStyle}\n wrapperStyle={chartTooltipWrapperStyle}\n />\n <Legend\n iconType=\"circle\"\n wrapperStyle={{\n ...chartLegendTextStyle,\n paddingTop: \"20px\",\n }}\n />\n\n {normalizedCategories.map((cat, index) => {\n // Apply rounded radius only to the top bar in the stack\n const isTop = index === normalizedCategories.length - 1;\n const radius: [number, number, number, number] = isTop\n ? [6, 6, 0, 0]\n : [0, 0, 0, 0];\n\n return (\n <Bar\n key={cat.key}\n dataKey={cat.key}\n name={cat.label}\n stackId=\"a\"\n fill={cat.color}\n radius={radius}\n barSize={32}\n />\n );\n })}\n </RechartsBarChart>\n </ResponsiveContainer>\n </div>\n );\n};\n","\"use client\";\n\nimport React from \"react\";\n\nimport { TruncatedText } from \"../../typography/truncated-text\";\nimport { normalizeChartColors } from \"./chartPalette\";\nimport { chartPillTooltipStyle } from \"./chartStyles\";\n\nexport interface BreakdownSegment {\n id?: string;\n label: string;\n value: number; // The absolute value or percentage\n color: string;\n}\n\ninterface ThinBreakdownBarProps {\n data: BreakdownSegment[];\n className?: string;\n showLabels?: boolean;\n showSummary?: boolean;\n summaryLabel?: string;\n valueFormatter?: (value: number) => string;\n}\n\nconst defaultValueFormatter = (value: number): string =>\n new Intl.NumberFormat().format(value);\n\nexport const ThinBreakdownBar: React.FC<ThinBreakdownBarProps> = ({\n data: segments,\n className = \"\",\n showLabels = true,\n showSummary = false,\n summaryLabel = \"Total\",\n valueFormatter = defaultValueFormatter,\n}) => {\n const [activeSegmentKey, setActiveSegmentKey] = React.useState<string | null>(\n null,\n );\n\n const normalizedSegments = React.useMemo(() => {\n const normalizedColors = normalizeChartColors(\n segments.map((segment) => segment.color),\n );\n\n const totalValue = segments.reduce((sum, item) => sum + item.value, 0);\n\n return segments.map((segment, index) => ({\n ...segment,\n key: segment.id || `segment-${index}`,\n color: normalizedColors[index] ?? segment.color,\n widthPercent:\n totalValue > 0 ? Math.max((segment.value / totalValue) * 100, 0) : 0,\n }));\n }, [segments]);\n\n const segmentsWithMetrics = React.useMemo(() => {\n let runningPercent = 0;\n\n return normalizedSegments.map((segment) => {\n const nextSegment = {\n ...segment,\n centerPercent: runningPercent + segment.widthPercent / 2,\n };\n\n runningPercent += segment.widthPercent;\n return nextSegment;\n });\n }, [normalizedSegments]);\n\n const activeSegment = React.useMemo(\n () =>\n segmentsWithMetrics.find((segment) => segment.key === activeSegmentKey) ??\n null,\n [activeSegmentKey, segmentsWithMetrics],\n );\n const totalValue = React.useMemo(\n () => segments.reduce((sum, item) => sum + item.value, 0),\n [segments],\n );\n const summaryTitle = activeSegment?.label ?? summaryLabel;\n const summaryValue = activeSegment?.value ?? totalValue;\n const summaryMeta = activeSegment\n ? `${Math.round(activeSegment.widthPercent)}% of total`\n : `${segments.length} segments`;\n\n return (\n <div className={`w-full flex flex-col gap-3 ${className}`}>\n {showSummary && (activeSegment || totalValue > 0) ? (\n <div className=\"flex items-start justify-between gap-4 rounded-xl border border-ds-border-2/70 bg-ds-canvas/70 px-4 py-3 backdrop-blur-md\">\n <div className=\"min-w-0\">\n <TruncatedText\n as=\"p\"\n showTitleOnHover\n className=\"truncate text-[11px] font-medium tracking-[0.16em] text-ds-2 uppercase transition-colors duration-200\"\n style={activeSegment ? { color: activeSegment.color } : undefined}\n >\n {summaryTitle}\n </TruncatedText>\n <p className=\"mt-1 text-xs text-ds-2\">{summaryMeta}</p>\n </div>\n <p\n className=\"text-right text-lg font-semibold leading-none text-ds-1 transition-colors duration-200\"\n style={activeSegment ? { color: activeSegment.color } : undefined}\n >\n {valueFormatter(summaryValue)}\n </p>\n </div>\n ) : null}\n\n <div className=\"relative\">\n {activeSegment && !showSummary && (\n <div\n className=\"pointer-events-none absolute -top-10 z-10 -translate-x-1/2 rounded-full px-2.5 py-1 text-[11px] font-medium text-ds-1\"\n style={{\n ...chartPillTooltipStyle,\n left: `${activeSegment.centerPercent}%`,\n }}\n >\n <span>{activeSegment.label}</span>\n <span className=\"mx-1 text-ds-2\">•</span>\n <span style={{ color: activeSegment.color }}>\n {activeSegment.value}\n </span>\n </div>\n )}\n\n <div className=\"rounded-full bg-ds-surface-2/80 p-0.5\">\n <div\n className=\"flex w-full gap-1\"\n onMouseLeave={() => setActiveSegmentKey(null)}\n >\n {segmentsWithMetrics.map((segment) => {\n const isActive = activeSegmentKey === segment.key;\n\n return (\n <div\n key={segment.key}\n className=\"relative flex h-2.5 min-w-0 items-center\"\n style={{ width: `${segment.widthPercent}%` }}\n onMouseEnter={() => setActiveSegmentKey(segment.key)}\n >\n <div\n className=\"h-full w-full rounded-full transition-[transform,filter,box-shadow,opacity] duration-200 ease-out\"\n style={{\n backgroundColor: segment.color,\n opacity: activeSegmentKey && !isActive ? 0.72 : 1,\n transform: isActive ? \"scaleY(1.3)\" : \"scaleY(1)\",\n filter: isActive\n ? \"saturate(1.1) brightness(1.05)\"\n : \"none\",\n boxShadow: isActive\n ? `inset 0 1px 1px rgba(255,255,255,0.28), 0 0 0 1px color-mix(in srgb, ${segment.color} 35%, transparent), 0 0 14px color-mix(in srgb, ${segment.color} 45%, transparent)`\n : `inset 0 1px 1px rgba(255,255,255,0.2), 0 0 8px color-mix(in srgb, ${segment.color} 30%, transparent)`,\n }}\n title={`${segment.label}: ${segment.value}`}\n />\n </div>\n );\n })}\n </div>\n </div>\n </div>\n\n {showLabels && (\n <div className=\"flex w-full items-start gap-1 px-0.5\">\n {segmentsWithMetrics.map((segment) => {\n const isActive = activeSegmentKey === segment.key;\n\n return (\n <div\n key={`label-${segment.key}`}\n className=\"flex min-w-0 justify-center\"\n style={{ width: `${segment.widthPercent}%` }}\n >\n <span\n className=\"whitespace-nowrap px-1 text-center text-[11px] font-medium tracking-wide text-ds-2 transition-colors duration-200\"\n style={isActive ? { color: segment.color } : undefined}\n >\n {segment.label}\n </span>\n </div>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n","\"use client\";\n\nimport React from \"react\";\nimport {\n AreaChart as RechartsAreaChart,\n Area,\n XAxis,\n YAxis,\n CartesianGrid,\n Tooltip,\n ResponsiveContainer,\n} from \"recharts\";\n\nimport { normalizeChartColors } from \"./chartPalette\";\nimport {\n chartLineHoverCursorStyle,\n chartTooltipContentStyle,\n chartTooltipItemStyle,\n chartTooltipLabelStyle,\n chartTooltipWrapperStyle,\n getChartActiveDotStyle,\n} from \"./chartStyles\";\n\nexport interface AreaChartData {\n name: string;\n [key: string]: string | number;\n}\n\ninterface AreaChartProps {\n data: AreaChartData[];\n categories: { key: string; color: string }[];\n height?: number | string;\n className?: string;\n showGrid?: boolean;\n}\n\nexport const AreaChart: React.FC<AreaChartProps> = ({\n data,\n categories,\n height = 300,\n className = \"\",\n showGrid = true,\n}) => {\n const normalizedCategories = React.useMemo(() => {\n const normalizedColors = normalizeChartColors(\n categories.map((category) => category.color),\n );\n\n return categories.map((category, index) => ({\n ...category,\n color: normalizedColors[index] ?? category.color,\n }));\n }, [categories]);\n\n return (\n <div className={`w-full ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsAreaChart\n data={data}\n margin={{ top: 10, right: 30, left: 0, bottom: 0 }}\n >\n <defs>\n {normalizedCategories.map((cat) => (\n <linearGradient\n key={`gradient-${cat.key}`}\n id={`color-${cat.key}`}\n x1=\"0\"\n y1=\"0\"\n x2=\"0\"\n y2=\"1\"\n >\n <stop offset=\"5%\" stopColor={cat.color} stopOpacity={0.3} />\n <stop offset=\"95%\" stopColor={cat.color} stopOpacity={0} />\n </linearGradient>\n ))}\n </defs>\n\n {showGrid && (\n <CartesianGrid\n strokeDasharray=\"3 3\"\n vertical={false}\n stroke=\"var(--ds-color-border)\"\n opacity={0.5}\n />\n )}\n\n <XAxis\n dataKey=\"name\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dy={10}\n />\n\n <YAxis\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dx={-10}\n />\n\n <Tooltip\n contentStyle={chartTooltipContentStyle}\n cursor={chartLineHoverCursorStyle}\n itemStyle={chartTooltipItemStyle}\n labelStyle={chartTooltipLabelStyle}\n wrapperStyle={chartTooltipWrapperStyle}\n />\n\n {normalizedCategories.map((cat) => (\n <Area\n key={cat.key}\n activeDot={getChartActiveDotStyle(cat.color)}\n type=\"monotone\"\n dataKey={cat.key}\n stroke={cat.color}\n strokeWidth={2}\n fillOpacity={1}\n fill={`url(#color-${cat.key})`}\n />\n ))}\n </RechartsAreaChart>\n </ResponsiveContainer>\n </div>\n );\n};\n","\"use client\";\n\nimport React from \"react\";\nimport {\n BarChart as RechartsBarChart,\n Bar,\n XAxis,\n YAxis,\n CartesianGrid,\n Tooltip,\n ResponsiveContainer,\n} from \"recharts\";\n\nimport { normalizeChartColors } from \"./chartPalette\";\nimport {\n chartBandHoverCursorStyle,\n chartTooltipContentStyle,\n chartTooltipItemStyle,\n chartTooltipLabelStyle,\n chartTooltipWrapperStyle,\n} from \"./chartStyles\";\n\nexport interface BarChartData {\n name: string;\n [key: string]: string | number;\n}\n\ninterface BarChartProps {\n data: BarChartData[];\n categories: { key: string; color: string }[];\n height?: number | string;\n className?: string;\n layout?: \"horizontal\" | \"vertical\";\n maxBarSize?: number;\n /**\n * Compact mode — strips axes, grid, tooltip, and margins.\n * Designed for small sparkline-style zones (e.g. StatCard md, ~130×68 px).\n */\n compact?: boolean;\n}\n\nexport const BarChart: React.FC<BarChartProps> = ({\n data,\n categories,\n height = 300,\n className = \"\",\n layout = \"horizontal\",\n maxBarSize,\n compact = false,\n}) => {\n const resolvedMaxBarSize = maxBarSize ?? (compact ? 8 : layout === \"horizontal\" ? 40 : 22);\n\n const normalizedCategories = React.useMemo(() => {\n const normalizedColors = normalizeChartColors(\n categories.map((category) => category.color),\n );\n\n return categories.map((category, index) => ({\n ...category,\n color: normalizedColors[index] ?? category.color,\n }));\n }, [categories]);\n\n if (compact) {\n return (\n <div className={`w-full h-full ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsBarChart\n data={data}\n layout={layout}\n barCategoryGap=\"20%\"\n margin={{ top: 2, right: 2, left: 2, bottom: 2 }}\n >\n <Tooltip\n contentStyle={chartTooltipContentStyle}\n cursor={chartBandHoverCursorStyle}\n itemStyle={chartTooltipItemStyle}\n labelStyle={chartTooltipLabelStyle}\n wrapperStyle={chartTooltipWrapperStyle}\n />\n {normalizedCategories.map((cat) => (\n <Bar\n key={cat.key}\n dataKey={cat.key}\n fill={cat.color}\n maxBarSize={resolvedMaxBarSize}\n radius={[3, 3, 0, 0]}\n />\n ))}\n </RechartsBarChart>\n </ResponsiveContainer>\n </div>\n );\n }\n\n return (\n <div className={`w-full ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsBarChart\n data={data}\n layout={layout}\n barCategoryGap={data.length <= 4 ? \"28%\" : \"18%\"}\n margin={{ top: 20, right: 30, left: 20, bottom: 5 }}\n >\n <CartesianGrid\n strokeDasharray=\"3 3\"\n horizontal={layout === \"horizontal\"}\n vertical={layout === \"vertical\"}\n stroke=\"var(--ds-color-border)\"\n opacity={0.4}\n />\n\n {layout === \"horizontal\" ? (\n <>\n <XAxis\n dataKey=\"name\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dy={10}\n />\n <YAxis\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dx={-10}\n />\n </>\n ) : (\n <>\n <XAxis\n type=\"number\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dy={10}\n />\n <YAxis\n dataKey=\"name\"\n type=\"category\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dx={-10}\n />\n </>\n )}\n\n <Tooltip\n contentStyle={chartTooltipContentStyle}\n cursor={chartBandHoverCursorStyle}\n itemStyle={chartTooltipItemStyle}\n labelStyle={chartTooltipLabelStyle}\n wrapperStyle={chartTooltipWrapperStyle}\n />\n\n {normalizedCategories.map((cat) => (\n <Bar\n key={cat.key}\n dataKey={cat.key}\n fill={cat.color}\n maxBarSize={resolvedMaxBarSize}\n radius={layout === \"horizontal\" ? [4, 4, 0, 0] : [0, 4, 4, 0]}\n />\n ))}\n </RechartsBarChart>\n </ResponsiveContainer>\n </div>\n );\n};\n","\"use client\";\n\nimport React from \"react\";\nimport {\n Bar,\n BarChart as RechartsBarChart,\n CartesianGrid,\n Cell,\n Rectangle,\n ReferenceLine,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from \"recharts\";\n\nimport { getChartColorVar, normalizeChartColorValue } from \"./chartPalette\";\nimport {\n chartBandHoverCursorStyle,\n chartTooltipContentStyle,\n chartTooltipItemStyle,\n chartTooltipLabelStyle,\n chartTooltipWrapperStyle,\n} from \"./chartStyles\";\n\nexport interface PositiveNegativeBarChartData {\n name: string;\n value: number;\n}\n\ninterface PositiveNegativeBarChartProps {\n data: PositiveNegativeBarChartData[];\n height?: number | string;\n className?: string;\n layout?: \"horizontal\" | \"vertical\";\n positiveColor?: string;\n negativeColor?: string;\n neutralColor?: string;\n showGrid?: boolean;\n seriesLabel?: string;\n valueFormatter?: (value: number) => string;\n tickFormatter?: (value: number) => string;\n}\n\nconst defaultValueFormatter = (value: number): string =>\n new Intl.NumberFormat().format(value);\n\nconst getBarRadius = (\n value: number,\n layout: \"horizontal\" | \"vertical\",\n): [number, number, number, number] => {\n if (value === 0) {\n return [6, 6, 6, 6];\n }\n\n if (layout === \"horizontal\") {\n return [6, 6, 0, 0];\n }\n\n return value > 0 ? [0, 6, 6, 0] : [6, 0, 0, 6];\n};\n\nexport const PositiveNegativeBarChart: React.FC<\n PositiveNegativeBarChartProps\n> = ({\n data,\n height = 320,\n className = \"\",\n layout = \"horizontal\",\n positiveColor = getChartColorVar(3),\n negativeColor = getChartColorVar(5),\n neutralColor = getChartColorVar(15),\n showGrid = true,\n seriesLabel = \"Variance\",\n valueFormatter = defaultValueFormatter,\n tickFormatter,\n}) => {\n const resolvedPositiveColor = React.useMemo(\n () => normalizeChartColorValue(positiveColor) ?? getChartColorVar(3),\n [positiveColor],\n );\n const resolvedNegativeColor = React.useMemo(\n () => normalizeChartColorValue(negativeColor) ?? getChartColorVar(5),\n [negativeColor],\n );\n const resolvedNeutralColor = React.useMemo(\n () => normalizeChartColorValue(neutralColor) ?? getChartColorVar(15),\n [neutralColor],\n );\n\n const resolvedTickFormatter = React.useCallback(\n (value: number) => tickFormatter?.(value) ?? valueFormatter(value),\n [tickFormatter, valueFormatter],\n );\n\n const getBarFill = React.useCallback(\n (value: number) => {\n if (value > 0) {\n return resolvedPositiveColor;\n }\n\n if (value < 0) {\n return resolvedNegativeColor;\n }\n\n return resolvedNeutralColor;\n },\n [resolvedNegativeColor, resolvedNeutralColor, resolvedPositiveColor],\n );\n\n return (\n <div className={`w-full ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsBarChart\n data={data}\n layout={layout}\n margin={{ top: 20, right: 30, left: 20, bottom: 5 }}\n >\n {showGrid ? (\n <CartesianGrid\n strokeDasharray=\"3 3\"\n horizontal={layout === \"horizontal\"}\n vertical={layout === \"vertical\"}\n stroke=\"var(--ds-color-border)\"\n opacity={0.35}\n />\n ) : null}\n\n {layout === \"horizontal\" ? (\n <>\n <XAxis\n dataKey=\"name\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dy={10}\n />\n <YAxis\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n tickFormatter={resolvedTickFormatter}\n dx={-10}\n />\n <ReferenceLine\n y={0}\n stroke=\"var(--ds-color-border-strong)\"\n strokeOpacity={0.95}\n />\n </>\n ) : (\n <>\n <XAxis\n type=\"number\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n tickFormatter={resolvedTickFormatter}\n dy={10}\n />\n <YAxis\n dataKey=\"name\"\n type=\"category\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n width={96}\n dx={-6}\n />\n <ReferenceLine\n x={0}\n stroke=\"var(--ds-color-border-strong)\"\n strokeOpacity={0.95}\n />\n </>\n )}\n\n <Tooltip\n contentStyle={chartTooltipContentStyle}\n cursor={chartBandHoverCursorStyle}\n itemStyle={chartTooltipItemStyle}\n labelStyle={chartTooltipLabelStyle}\n wrapperStyle={chartTooltipWrapperStyle}\n formatter={(value) => [\n valueFormatter(Number(value ?? 0)),\n seriesLabel,\n ]}\n />\n\n <Bar\n dataKey=\"value\"\n radius={6}\n barSize={layout === \"horizontal\" ? 30 : 22}\n shape={(props) => {\n const barValue = Array.isArray(props.value)\n ? props.value[1] - props.value[0]\n : props.value;\n\n return (\n <Rectangle {...props} radius={getBarRadius(barValue, layout)} />\n );\n }}\n >\n {data.map((entry) => (\n <Cell\n key={`${entry.name}-${entry.value}`}\n fill={getBarFill(entry.value)}\n />\n ))}\n </Bar>\n </RechartsBarChart>\n </ResponsiveContainer>\n </div>\n );\n};\n","\"use client\";\n\nimport React from \"react\";\nimport {\n PieChart as RechartsPieChart,\n Pie,\n Cell,\n Tooltip,\n Legend,\n ResponsiveContainer,\n} from \"recharts\";\n\nimport { normalizeChartColors } from \"./chartPalette\";\nimport {\n chartLegendTextStyle,\n chartTooltipContentStyle,\n chartTooltipItemStyle,\n chartTooltipLabelStyle,\n chartTooltipWrapperStyle,\n} from \"./chartStyles\";\n\nexport interface PieChartData {\n name: string;\n value: number;\n}\n\nexport interface PieChartCenterContentContext {\n activeColor?: string;\n activeIndex: number | null;\n activeSlice: PieChartData | null;\n data: PieChartData[];\n displayLabel: string;\n displayPercentageLabel: string;\n displayValue: number;\n normalizedColors: string[];\n totalValue: number;\n valueFormatter: (value: number) => string;\n variant: \"pie\" | \"donut\";\n}\n\nexport interface PieChartProps {\n data: PieChartData[];\n colors: string[];\n height?: number | string;\n className?: string;\n variant?: \"pie\" | \"donut\";\n showCenterSummary?: boolean;\n centerLabel?: string;\n valueFormatter?: (value: number) => string;\n renderCenterContent?: (\n context: PieChartCenterContentContext,\n ) => React.ReactNode;\n}\n\nconst defaultValueFormatter = (value: number): string =>\n new Intl.NumberFormat().format(value);\n\nexport const PieChart: React.FC<PieChartProps> = ({\n data,\n colors,\n height = 300,\n className = \"\",\n variant = \"donut\",\n showCenterSummary = variant === \"donut\",\n centerLabel = \"Total\",\n valueFormatter = defaultValueFormatter,\n renderCenterContent,\n}) => {\n const [activeIndex, setActiveIndex] = React.useState<number | null>(null);\n const innerRadius = variant === \"donut\" ? \"60%\" : 0;\n const normalizedColors = React.useMemo(\n () => normalizeChartColors(colors),\n [colors],\n );\n const totalValue = React.useMemo(\n () => data.reduce((sum, item) => sum + item.value, 0),\n [data],\n );\n const activeSlice =\n activeIndex !== null && activeIndex >= 0 && activeIndex < data.length\n ? data[activeIndex]\n : null;\n const activePercentage =\n activeSlice && totalValue > 0\n ? `${Math.round((activeSlice.value / totalValue) * 100)}% of total`\n : `${data.length} categories`;\n const displayLabel = activeSlice?.name ?? centerLabel;\n const displayValue = activeSlice?.value ?? totalValue;\n const activeColor =\n activeIndex !== null\n ? normalizedColors[activeIndex % normalizedColors.length]\n : undefined;\n const centerContentContext: PieChartCenterContentContext = {\n activeColor,\n activeIndex,\n activeSlice,\n data,\n displayLabel,\n displayPercentageLabel: activePercentage,\n displayValue,\n normalizedColors,\n totalValue,\n valueFormatter,\n variant,\n };\n const shouldRenderCenterContent =\n variant === \"donut\" && (showCenterSummary || Boolean(renderCenterContent));\n\n return (\n <div className={`relative w-full ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsPieChart>\n <Pie\n data={data}\n cx=\"50%\"\n cy=\"50%\"\n innerRadius={innerRadius}\n outerRadius=\"80%\"\n paddingAngle={variant === \"donut\" ? 2 : 0}\n dataKey=\"value\"\n stroke=\"none\"\n onMouseEnter={(_data: unknown, index: number) =>\n setActiveIndex(index)\n }\n onMouseLeave={() => setActiveIndex(null)}\n >\n {data.map((entry, index) => (\n <Cell\n key={`cell-${index}`}\n fill={normalizedColors[index % normalizedColors.length]}\n />\n ))}\n </Pie>\n\n <Tooltip\n contentStyle={chartTooltipContentStyle}\n itemStyle={chartTooltipItemStyle}\n labelStyle={chartTooltipLabelStyle}\n wrapperStyle={chartTooltipWrapperStyle}\n />\n\n <Legend iconType=\"circle\" wrapperStyle={chartLegendTextStyle} />\n </RechartsPieChart>\n </ResponsiveContainer>\n\n {shouldRenderCenterContent ? (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n {renderCenterContent ? (\n renderCenterContent(centerContentContext)\n ) : (\n <div className=\"flex max-w-[42%] flex-col items-center text-center\">\n <p className=\"text-[11px] font-medium tracking-[0.16em] text-ds-2 uppercase\">\n {displayLabel}\n </p>\n <p className=\"mt-1 text-2xl font-semibold leading-none text-ds-1 sm:text-3xl\">\n {valueFormatter(displayValue)}\n </p>\n <p className=\"mt-2 text-xs leading-tight text-ds-2\">\n {activePercentage}\n </p>\n </div>\n )}\n </div>\n ) : null}\n </div>\n );\n};\n"],"mappings":";;;;;;;;AAAA,IAAM,kBAAkB;CACtB;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAI;CAAI;CAAI;CAAI;CAAI;CAChD;AAKD,IAAa,mBAAmB,gBAAgB,KAC7C,SAAS,SAAS,OACpB;AAED,IAAM,eAAe,gBAAgB,KAAK,SAAS,kBAAkB,KAAK,GAAG;AAQ7E,IAAM,qCAAqB,IAAI,KAA8B;AAE7D,IAAM,oBAAoB;AAC1B,IAAM,uBAAuB;AAE7B,IAAM,qBAAqB,SACzB,OAAO,SAAS,WAAW,OAAO,OAAO,KAAK,QAAQ,UAAU,GAAG,CAAC;AAEtE,IAAa,oBACX,MACA,YAA4B,SACjB,SAAS,UAAU,SAAS,kBAAkB,KAAK,CAAC;AAEjE,IAAa,4BACX,UACuB;CACvB,MAAM,kBAAkB,OAAO,MAAM;AAErC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G;KACH,IAAG;KACU;KACb,aAAY;KACZ,cAAc,YAAY,UAAU,IAAI;KACxC,SAAQ;KACR,QAAO;KACP,eAAe,OAAgB,UAC7B,eAAe,MAAM;KAEvB,oBAAoB,eAAe,KAAK;eAEvC,KAAK,KAAK,OAAO,UAChB,iBAAA,GAAA,kBAAA,KAAC,SAAA,MAAD,EAEE,MAAM,iBAAiB,QAAQ,iBAAiB,SAChD,EAFK,QAAQ,QAEb,CACF;KACE,CAAA;IAEN,iBAAA,GAAA,kBAAA,KAAC,SAAA,SAAD;KACE,cAAc,oBAAA;KACd,WAAW,oBAAA;KACX,YAAY,oBAAA;KACZ,cAAc,oBAAA;KACd,CAAA;IAEF,iBAAA,GAAA,kBAAA,KAAC,SAAA,QAAD;KAAQ,UAAS;KAAS,cAAc,oBAAA;KAAwB,CAAA;IAC/C,EAAA,CAAA;GACC,CAAA,EAErB,4BACC,iBAAA,GAAA,kBAAA,KAAC,OAAD;GAAK,WAAU;aACZ,sBACC,oBAAoB,qBAAqB,GAEzC,iBAAA,GAAA,kBAAA,MAAC,OAAD;IAAK,WAAU;cAAf;KACE,iBAAA,GAAA,kBAAA,KAAC,KAAD;MAAG,WAAU;gBACV;MACC,CAAA;KACJ,iBAAA,GAAA,kBAAA,KAAC,KAAD;MAAG,WAAU;gBACV,eAAe,aAAa;MAC3B,CAAA;KACJ,iBAAA,GAAA,kBAAA,KAAC,KAAD;MAAG,WAAU;gBACV;MACC,CAAA;KACA;;GAEJ,CAAA,GACJ,KACA"}
|
|
1
|
+
{"version":3,"file":"charts-DMu4zp8j.cjs","names":[],"sources":["../../src/components/data-display/charts/chartPalette.ts","../../src/components/data-display/charts/NeonLineChart.tsx","../../src/components/data-display/charts/MiniNeonSparkline.tsx","../../src/components/data-display/charts/StackedBarChart.tsx","../../src/components/data-display/charts/ThinBreakdownBar.tsx","../../src/components/data-display/charts/AreaChart.tsx","../../src/components/data-display/charts/BarChart.tsx","../../src/components/data-display/charts/PositiveNegativeBarChart.tsx","../../src/components/data-display/charts/PieChart.tsx"],"sourcesContent":["const chartColorSlots = [\n 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n] as const;\n\nexport type ChartColorSlot = (typeof chartColorSlots)[number];\nexport type ChartColorToken = `chart-${ChartColorSlot}`;\n\nexport const chartColorTokens = chartColorSlots.map(\n (slot) => `chart-${slot}` as ChartColorToken,\n);\n\nconst chartPalette = chartColorSlots.map((slot) => `var(--ds-chart-${slot})`);\n\ntype RgbColor = {\n r: number;\n g: number;\n b: number;\n};\n\nconst resolvedColorCache = new Map<string, RgbColor | null>();\n\nconst chartTokenPattern = /^chart-(\\d+)$/i;\nconst chartVariablePattern = /^--((?:ds|color)-chart-(\\d+))$/i;\n\nconst getChartSlotValue = (slot: ChartColorSlot | ChartColorToken): number =>\n typeof slot === \"number\" ? slot : Number(slot.replace(\"chart-\", \"\"));\n\nexport const getChartColorVar = (\n slot: ChartColorSlot | ChartColorToken,\n namespace: \"ds\" | \"color\" = \"ds\",\n): string => `var(--${namespace}-chart-${getChartSlotValue(slot)})`;\n\nexport const normalizeChartColorValue = (\n value?: string,\n): string | undefined => {\n const normalizedValue = value?.trim();\n\n if (!normalizedValue) {\n return undefined;\n }\n\n const tokenMatch = normalizedValue.match(chartTokenPattern);\n if (tokenMatch) {\n return `var(--ds-chart-${tokenMatch[1]})`;\n }\n\n const variableMatch = normalizedValue.match(chartVariablePattern);\n if (variableMatch) {\n return `var(--${variableMatch[1]})`;\n }\n\n return normalizedValue;\n};\n\nconst getThemeSignature = (): string => {\n if (typeof document === \"undefined\") return \"\";\n\n const root = document.documentElement;\n return [\n root.getAttribute(\"data-brand\") ?? \"\",\n root.getAttribute(\"data-mode\") ?? \"\",\n root.getAttribute(\"data-theme\") ?? \"\",\n ].join(\"|\");\n};\n\nconst resolveColor = (value: string): RgbColor | null => {\n if (typeof document === \"undefined\") return null;\n\n const cacheKey = `${getThemeSignature()}::${value}`;\n const cached = resolvedColorCache.get(cacheKey);\n if (cached !== undefined) {\n return cached;\n }\n\n const probe = document.createElement(\"span\");\n probe.style.color = value;\n probe.style.position = \"fixed\";\n probe.style.opacity = \"0\";\n probe.style.pointerEvents = \"none\";\n document.body.appendChild(probe);\n\n const computedColor = getComputedStyle(probe).color;\n document.body.removeChild(probe);\n\n const match = computedColor.match(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)/i);\n\n const resolved = match\n ? {\n r: Number(match[1]),\n g: Number(match[2]),\n b: Number(match[3]),\n }\n : null;\n\n resolvedColorCache.set(cacheKey, resolved);\n return resolved;\n};\n\nconst getColorDistance = (left: RgbColor, right: RgbColor): number => {\n const deltaR = left.r - right.r;\n const deltaG = left.g - right.g;\n const deltaB = left.b - right.b;\n\n return Math.sqrt(deltaR ** 2 + deltaG ** 2 + deltaB ** 2);\n};\n\nconst isTooSimilar = (\n candidate: string,\n usedColors: readonly string[],\n minDistance = 84,\n): boolean => {\n if (usedColors.includes(candidate)) {\n return true;\n }\n\n const candidateRgb = resolveColor(candidate);\n if (!candidateRgb) {\n return false;\n }\n\n return usedColors.some((usedColor) => {\n const usedRgb = resolveColor(usedColor);\n return usedRgb\n ? getColorDistance(candidateRgb, usedRgb) < minDistance\n : false;\n });\n};\n\nexport const getChartPalette = (count = chartPalette.length): string[] =>\n Array.from(\n { length: count },\n (_, index) => chartPalette[index % chartPalette.length],\n );\n\nexport const normalizeChartColors = (\n requestedColors: readonly (string | undefined)[],\n): string[] => {\n const usedColors: string[] = [];\n let paletteIndex = 0;\n\n const getNextDistinctPaletteColor = (): string => {\n for (let attempt = 0; attempt < chartPalette.length; attempt++) {\n const candidate =\n chartPalette[(paletteIndex + attempt) % chartPalette.length];\n\n if (!isTooSimilar(candidate, usedColors)) {\n paletteIndex = (paletteIndex + attempt + 1) % chartPalette.length;\n return candidate;\n }\n }\n\n const fallback = chartPalette[paletteIndex % chartPalette.length];\n paletteIndex = (paletteIndex + 1) % chartPalette.length;\n return fallback;\n };\n\n return requestedColors.map((requestedColor) => {\n const normalizedRequestedColor = normalizeChartColorValue(requestedColor);\n const resolvedColor =\n normalizedRequestedColor &&\n !isTooSimilar(normalizedRequestedColor, usedColors)\n ? normalizedRequestedColor\n : getNextDistinctPaletteColor();\n\n usedColors.push(resolvedColor);\n return resolvedColor;\n });\n};\n","\"use client\";\n\nimport React from \"react\";\nimport {\n LineChart,\n Line,\n XAxis,\n YAxis,\n CartesianGrid,\n Tooltip,\n ResponsiveContainer,\n} from \"recharts\";\n\nimport {\n getChartColorVar,\n normalizeChartColorValue,\n normalizeChartColors,\n} from \"./chartPalette\";\nimport {\n chartLineHoverCursorStyle,\n chartTooltipContentStyle,\n chartTooltipItemStyle,\n chartTooltipLabelStyle,\n chartTooltipWrapperStyle,\n getChartActiveDotStyle,\n} from \"./chartStyles\";\n\ninterface DataPoint {\n name: string;\n value: number;\n}\n\ninterface NeonLineChartProps {\n data: DataPoint[];\n height?: number | string;\n lineColorStop1?: string;\n lineColorStop2?: string;\n className?: string;\n glowColor?: string;\n}\n\nexport const NeonLineChart: React.FC<NeonLineChartProps> = ({\n data,\n height = 300,\n lineColorStop1 = getChartColorVar(2),\n lineColorStop2 = getChartColorVar(1),\n glowColor = getChartColorVar(1),\n className = \"\",\n}) => {\n const [normalizedStop1, normalizedStop2] = React.useMemo(\n () => normalizeChartColors([lineColorStop1, lineColorStop2]),\n [lineColorStop1, lineColorStop2],\n );\n const normalizedGlowColor = React.useMemo(\n () => normalizeChartColorValue(glowColor) ?? getChartColorVar(1),\n [glowColor],\n );\n\n return (\n <div className={`w-full relative ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <LineChart\n data={data}\n margin={{ top: 20, right: 30, left: 10, bottom: 20 }}\n >\n <defs>\n {/* Linear Gradient for the Line */}\n <linearGradient id=\"neonGradient\" x1=\"0\" y1=\"0\" x2=\"1\" y2=\"0\">\n <stop offset=\"0%\" stopColor={normalizedStop1} />\n <stop offset=\"100%\" stopColor={normalizedStop2} />\n </linearGradient>\n\n {/* Glowing Drop Shadow Filter */}\n <filter id=\"neonGlow\" x=\"-20%\" y=\"-20%\" width=\"140%\" height=\"140%\">\n <feDropShadow\n dx=\"0\"\n dy=\"6\"\n stdDeviation=\"8\"\n floodColor={normalizedGlowColor}\n floodOpacity=\"0.8\"\n />\n <feDropShadow\n dx=\"0\"\n dy=\"0\"\n stdDeviation=\"15\"\n floodColor={normalizedStop1}\n floodOpacity=\"0.3\"\n />\n </filter>\n </defs>\n\n {/* Minimal Grid */}\n <CartesianGrid\n strokeDasharray=\"3 3\"\n vertical={false}\n stroke=\"var(--ds-color-border)\"\n opacity={0.5}\n />\n\n <XAxis\n dataKey=\"name\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dy={10}\n />\n\n <YAxis\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dx={-10}\n />\n\n <Tooltip\n contentStyle={chartTooltipContentStyle}\n cursor={chartLineHoverCursorStyle}\n itemStyle={chartTooltipItemStyle}\n labelStyle={chartTooltipLabelStyle}\n wrapperStyle={chartTooltipWrapperStyle}\n />\n\n {/* The Neon Line */}\n <Line\n type=\"monotone\"\n dataKey=\"value\"\n stroke=\"url(#neonGradient)\"\n strokeWidth={3}\n dot={false}\n activeDot={getChartActiveDotStyle(normalizedStop2)}\n filter=\"url(#neonGlow)\"\n />\n </LineChart>\n </ResponsiveContainer>\n </div>\n );\n};\n","\"use client\";\n\nimport React from \"react\";\nimport { Area, AreaChart, Line, ResponsiveContainer, Tooltip } from \"recharts\";\n\nimport { getChartColorVar, normalizeChartColorValue } from \"./chartPalette\";\n\nexport interface MiniNeonSparklinePoint {\n label: string;\n value: number;\n}\n\nexport type MiniNeonSparklineTone =\n | \"default\"\n | \"success\"\n | \"warning\"\n | \"danger\"\n | \"info\";\n\nexport interface MiniNeonSparklineProps {\n data: MiniNeonSparklinePoint[];\n height?: number;\n strokeWidth?: number;\n className?: string;\n showArea?: boolean;\n showTooltip?: boolean;\n tone?: MiniNeonSparklineTone;\n}\n\nconst toneColorMap: Record<MiniNeonSparklineTone, string> = {\n default: getChartColorVar(1),\n success: \"var(--ds-color-success)\",\n warning: \"var(--ds-color-warning)\",\n danger: \"var(--ds-color-danger)\",\n info: \"var(--ds-color-info)\",\n};\n\nconst tooltipContentStyle: React.CSSProperties = {\n borderRadius: \"12px\",\n border: \"1px solid var(--ds-border-2)\",\n background: \"var(--ds-surface-1)\",\n color: \"var(--ds-text-1)\",\n fontSize: \"12px\",\n};\n\nexport const MiniNeonSparkline: React.FC<MiniNeonSparklineProps> = ({\n data,\n height = 46,\n strokeWidth = 2,\n className = \"\",\n showArea = true,\n showTooltip = true,\n tone = \"default\",\n}) => {\n const resolvedTone = React.useMemo(\n () => normalizeChartColorValue(toneColorMap[tone]) ?? toneColorMap.default,\n [tone],\n );\n\n const chartGradientId = React.useId();\n const chartGlowId = React.useId();\n\n return (\n <div className={`ui:relative ui:w-full ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <AreaChart\n data={data}\n margin={{ top: 4, right: 2, left: 2, bottom: 4 }}\n >\n <defs>\n <linearGradient id={chartGradientId} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={resolvedTone} stopOpacity={0.35} />\n <stop offset=\"100%\" stopColor={resolvedTone} stopOpacity={0.02} />\n </linearGradient>\n <filter\n id={chartGlowId}\n x=\"-20%\"\n y=\"-20%\"\n width=\"140%\"\n height=\"140%\"\n >\n <feDropShadow\n dx=\"0\"\n dy=\"2\"\n stdDeviation=\"3\"\n floodColor={resolvedTone}\n floodOpacity=\"0.45\"\n />\n </filter>\n </defs>\n\n {showArea ? (\n <Area\n type=\"monotone\"\n dataKey=\"value\"\n stroke=\"none\"\n fill={`url(#${chartGradientId})`}\n />\n ) : null}\n\n <Line\n type=\"monotone\"\n dataKey=\"value\"\n stroke={resolvedTone}\n strokeWidth={strokeWidth}\n dot={false}\n isAnimationActive={false}\n filter={`url(#${chartGlowId})`}\n />\n\n {showTooltip ? (\n <Tooltip\n contentStyle={tooltipContentStyle}\n labelStyle={{ color: \"var(--ds-text-2)\", marginBottom: \"4px\" }}\n itemStyle={{ color: \"var(--ds-text-1)\", fontWeight: 600 }}\n formatter={(value) => [String(value ?? \"\"), \"Value\"]}\n />\n ) : null}\n </AreaChart>\n </ResponsiveContainer>\n </div>\n );\n};\n","\"use client\";\n\nimport React from \"react\";\nimport {\n BarChart as RechartsBarChart,\n Bar,\n XAxis,\n YAxis,\n CartesianGrid,\n Tooltip,\n Legend,\n ResponsiveContainer,\n} from \"recharts\";\n\nimport { normalizeChartColors } from \"./chartPalette\";\nimport {\n chartBandHoverCursorStyle,\n chartLegendTextStyle,\n chartTooltipContentStyle,\n chartTooltipItemStyle,\n chartTooltipLabelStyle,\n chartTooltipWrapperStyle,\n} from \"./chartStyles\";\n\nexport interface StackedBarData {\n name: string;\n [key: string]: string | number;\n}\n\ninterface StackedBarChartProps {\n data: StackedBarData[];\n categories: { key: string; color: string; label: string }[];\n height?: number | string;\n yAxisDomain?: [number, number];\n className?: string;\n}\n\nexport const StackedBarChart: React.FC<StackedBarChartProps> = ({\n data,\n categories,\n height = 300,\n yAxisDomain,\n className = \"\",\n}) => {\n const normalizedCategories = React.useMemo(() => {\n const normalizedColors = normalizeChartColors(\n categories.map((category) => category.color),\n );\n\n return categories.map((category, index) => ({\n ...category,\n color: normalizedColors[index] ?? category.color,\n }));\n }, [categories]);\n\n return (\n <div className={`w-full ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsBarChart\n data={data}\n margin={{ top: 20, right: 30, left: 20, bottom: 5 }}\n >\n <CartesianGrid\n strokeDasharray=\"3 3\"\n vertical={false}\n stroke=\"var(--ds-color-border)\"\n opacity={0.4}\n />\n <XAxis\n dataKey=\"name\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dy={10}\n />\n <YAxis\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dx={-10}\n domain={yAxisDomain}\n />\n <Tooltip\n contentStyle={chartTooltipContentStyle}\n cursor={chartBandHoverCursorStyle}\n itemStyle={chartTooltipItemStyle}\n labelStyle={chartTooltipLabelStyle}\n wrapperStyle={chartTooltipWrapperStyle}\n />\n <Legend\n iconType=\"circle\"\n wrapperStyle={{\n ...chartLegendTextStyle,\n paddingTop: \"20px\",\n }}\n />\n\n {normalizedCategories.map((cat, index) => {\n // Apply rounded radius only to the top bar in the stack\n const isTop = index === normalizedCategories.length - 1;\n const radius: [number, number, number, number] = isTop\n ? [6, 6, 0, 0]\n : [0, 0, 0, 0];\n\n return (\n <Bar\n key={cat.key}\n dataKey={cat.key}\n name={cat.label}\n stackId=\"a\"\n fill={cat.color}\n radius={radius}\n barSize={32}\n />\n );\n })}\n </RechartsBarChart>\n </ResponsiveContainer>\n </div>\n );\n};\n","\"use client\";\n\nimport React from \"react\";\n\nimport { TruncatedText } from \"../../typography/truncated-text\";\nimport { normalizeChartColors } from \"./chartPalette\";\nimport { chartPillTooltipStyle } from \"./chartStyles\";\n\nexport interface BreakdownSegment {\n id?: string;\n label: string;\n value: number; // The absolute value or percentage\n color: string;\n}\n\ninterface ThinBreakdownBarProps {\n data: BreakdownSegment[];\n className?: string;\n showLabels?: boolean;\n showSummary?: boolean;\n summaryLabel?: string;\n valueFormatter?: (value: number) => string;\n}\n\nconst defaultValueFormatter = (value: number): string =>\n new Intl.NumberFormat().format(value);\n\nexport const ThinBreakdownBar: React.FC<ThinBreakdownBarProps> = ({\n data: segments,\n className = \"\",\n showLabels = true,\n showSummary = false,\n summaryLabel = \"Total\",\n valueFormatter = defaultValueFormatter,\n}) => {\n const [activeSegmentKey, setActiveSegmentKey] = React.useState<string | null>(\n null,\n );\n\n const normalizedSegments = React.useMemo(() => {\n const normalizedColors = normalizeChartColors(\n segments.map((segment) => segment.color),\n );\n\n const totalValue = segments.reduce((sum, item) => sum + item.value, 0);\n\n return segments.map((segment, index) => ({\n ...segment,\n key: segment.id || `segment-${index}`,\n color: normalizedColors[index] ?? segment.color,\n widthPercent:\n totalValue > 0 ? Math.max((segment.value / totalValue) * 100, 0) : 0,\n }));\n }, [segments]);\n\n const segmentsWithMetrics = React.useMemo(() => {\n let runningPercent = 0;\n\n return normalizedSegments.map((segment) => {\n const nextSegment = {\n ...segment,\n centerPercent: runningPercent + segment.widthPercent / 2,\n };\n\n runningPercent += segment.widthPercent;\n return nextSegment;\n });\n }, [normalizedSegments]);\n\n const activeSegment = React.useMemo(\n () =>\n segmentsWithMetrics.find((segment) => segment.key === activeSegmentKey) ??\n null,\n [activeSegmentKey, segmentsWithMetrics],\n );\n const totalValue = React.useMemo(\n () => segments.reduce((sum, item) => sum + item.value, 0),\n [segments],\n );\n const summaryTitle = activeSegment?.label ?? summaryLabel;\n const summaryValue = activeSegment?.value ?? totalValue;\n const summaryMeta = activeSegment\n ? `${Math.round(activeSegment.widthPercent)}% of total`\n : `${segments.length} segments`;\n\n return (\n <div className={`w-full flex flex-col gap-3 ${className}`}>\n {showSummary && (activeSegment || totalValue > 0) ? (\n <div className=\"flex items-start justify-between gap-4 rounded-xl border border-ds-border-2/70 bg-ds-canvas/70 px-4 py-3 backdrop-blur-md\">\n <div className=\"min-w-0\">\n <TruncatedText\n as=\"p\"\n showTitleOnHover\n className=\"truncate text-[11px] font-medium tracking-[0.16em] text-ds-2 uppercase transition-colors duration-200\"\n style={activeSegment ? { color: activeSegment.color } : undefined}\n >\n {summaryTitle}\n </TruncatedText>\n <p className=\"mt-1 text-xs text-ds-2\">{summaryMeta}</p>\n </div>\n <p\n className=\"text-right text-lg font-semibold leading-none text-ds-1 transition-colors duration-200\"\n style={activeSegment ? { color: activeSegment.color } : undefined}\n >\n {valueFormatter(summaryValue)}\n </p>\n </div>\n ) : null}\n\n <div className=\"relative\">\n {activeSegment && !showSummary && (\n <div\n className=\"pointer-events-none absolute -top-10 z-10 -translate-x-1/2 rounded-full px-2.5 py-1 text-[11px] font-medium text-ds-1\"\n style={{\n ...chartPillTooltipStyle,\n left: `${activeSegment.centerPercent}%`,\n }}\n >\n <span>{activeSegment.label}</span>\n <span className=\"mx-1 text-ds-2\">•</span>\n <span style={{ color: activeSegment.color }}>\n {activeSegment.value}\n </span>\n </div>\n )}\n\n <div className=\"rounded-full bg-ds-surface-2/80 p-0.5\">\n <div\n className=\"flex w-full gap-1\"\n onMouseLeave={() => setActiveSegmentKey(null)}\n >\n {segmentsWithMetrics.map((segment) => {\n const isActive = activeSegmentKey === segment.key;\n\n return (\n <div\n key={segment.key}\n className=\"relative flex h-2.5 min-w-0 items-center\"\n style={{ width: `${segment.widthPercent}%` }}\n onMouseEnter={() => setActiveSegmentKey(segment.key)}\n >\n <div\n className=\"h-full w-full rounded-full transition-[transform,filter,box-shadow,opacity] duration-200 ease-out\"\n style={{\n backgroundColor: segment.color,\n opacity: activeSegmentKey && !isActive ? 0.72 : 1,\n transform: isActive ? \"scaleY(1.3)\" : \"scaleY(1)\",\n filter: isActive\n ? \"saturate(1.1) brightness(1.05)\"\n : \"none\",\n boxShadow: isActive\n ? `inset 0 1px 1px rgba(255,255,255,0.28), 0 0 0 1px color-mix(in srgb, ${segment.color} 35%, transparent), 0 0 14px color-mix(in srgb, ${segment.color} 45%, transparent)`\n : `inset 0 1px 1px rgba(255,255,255,0.2), 0 0 8px color-mix(in srgb, ${segment.color} 30%, transparent)`,\n }}\n title={`${segment.label}: ${segment.value}`}\n />\n </div>\n );\n })}\n </div>\n </div>\n </div>\n\n {showLabels && (\n <div className=\"flex w-full items-start gap-1 px-0.5\">\n {segmentsWithMetrics.map((segment) => {\n const isActive = activeSegmentKey === segment.key;\n\n return (\n <div\n key={`label-${segment.key}`}\n className=\"flex min-w-0 justify-center\"\n style={{ width: `${segment.widthPercent}%` }}\n >\n <span\n className=\"whitespace-nowrap px-1 text-center text-[11px] font-medium tracking-wide text-ds-2 transition-colors duration-200\"\n style={isActive ? { color: segment.color } : undefined}\n >\n {segment.label}\n </span>\n </div>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n","\"use client\";\n\nimport React from \"react\";\nimport {\n AreaChart as RechartsAreaChart,\n Area,\n XAxis,\n YAxis,\n CartesianGrid,\n Tooltip,\n ResponsiveContainer,\n} from \"recharts\";\n\nimport { normalizeChartColors } from \"./chartPalette\";\nimport {\n chartLineHoverCursorStyle,\n chartTooltipContentStyle,\n chartTooltipItemStyle,\n chartTooltipLabelStyle,\n chartTooltipWrapperStyle,\n getChartActiveDotStyle,\n} from \"./chartStyles\";\n\nexport interface AreaChartData {\n name: string;\n [key: string]: string | number;\n}\n\ninterface AreaChartProps {\n data: AreaChartData[];\n categories: { key: string; color: string }[];\n height?: number | string;\n className?: string;\n showGrid?: boolean;\n}\n\nexport const AreaChart: React.FC<AreaChartProps> = ({\n data,\n categories,\n height = 300,\n className = \"\",\n showGrid = true,\n}) => {\n const normalizedCategories = React.useMemo(() => {\n const normalizedColors = normalizeChartColors(\n categories.map((category) => category.color),\n );\n\n return categories.map((category, index) => ({\n ...category,\n color: normalizedColors[index] ?? category.color,\n }));\n }, [categories]);\n\n return (\n <div className={`w-full ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsAreaChart\n data={data}\n margin={{ top: 10, right: 30, left: 0, bottom: 0 }}\n >\n <defs>\n {normalizedCategories.map((cat) => (\n <linearGradient\n key={`gradient-${cat.key}`}\n id={`color-${cat.key}`}\n x1=\"0\"\n y1=\"0\"\n x2=\"0\"\n y2=\"1\"\n >\n <stop offset=\"5%\" stopColor={cat.color} stopOpacity={0.3} />\n <stop offset=\"95%\" stopColor={cat.color} stopOpacity={0} />\n </linearGradient>\n ))}\n </defs>\n\n {showGrid && (\n <CartesianGrid\n strokeDasharray=\"3 3\"\n vertical={false}\n stroke=\"var(--ds-color-border)\"\n opacity={0.5}\n />\n )}\n\n <XAxis\n dataKey=\"name\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dy={10}\n />\n\n <YAxis\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dx={-10}\n />\n\n <Tooltip\n contentStyle={chartTooltipContentStyle}\n cursor={chartLineHoverCursorStyle}\n itemStyle={chartTooltipItemStyle}\n labelStyle={chartTooltipLabelStyle}\n wrapperStyle={chartTooltipWrapperStyle}\n />\n\n {normalizedCategories.map((cat) => (\n <Area\n key={cat.key}\n activeDot={getChartActiveDotStyle(cat.color)}\n type=\"monotone\"\n dataKey={cat.key}\n stroke={cat.color}\n strokeWidth={2}\n fillOpacity={1}\n fill={`url(#color-${cat.key})`}\n />\n ))}\n </RechartsAreaChart>\n </ResponsiveContainer>\n </div>\n );\n};\n","\"use client\";\n\nimport React from \"react\";\nimport {\n BarChart as RechartsBarChart,\n Bar,\n XAxis,\n YAxis,\n CartesianGrid,\n Tooltip,\n ResponsiveContainer,\n} from \"recharts\";\n\nimport { normalizeChartColors } from \"./chartPalette\";\nimport {\n chartBandHoverCursorStyle,\n chartTooltipContentStyle,\n chartTooltipItemStyle,\n chartTooltipLabelStyle,\n chartTooltipWrapperStyle,\n} from \"./chartStyles\";\n\nexport interface BarChartData {\n name: string;\n [key: string]: string | number;\n}\n\ninterface BarChartProps {\n data: BarChartData[];\n categories: { key: string; color: string }[];\n height?: number | string;\n className?: string;\n layout?: \"horizontal\" | \"vertical\";\n maxBarSize?: number;\n /**\n * Compact mode — strips axes, grid, tooltip, and margins.\n * Designed for small sparkline-style zones (e.g. StatCard md, ~130×68 px).\n */\n compact?: boolean;\n}\n\nexport const BarChart: React.FC<BarChartProps> = ({\n data,\n categories,\n height = 300,\n className = \"\",\n layout = \"horizontal\",\n maxBarSize,\n compact = false,\n}) => {\n const resolvedMaxBarSize = maxBarSize ?? (compact ? 8 : layout === \"horizontal\" ? 40 : 22);\n\n const normalizedCategories = React.useMemo(() => {\n const normalizedColors = normalizeChartColors(\n categories.map((category) => category.color),\n );\n\n return categories.map((category, index) => ({\n ...category,\n color: normalizedColors[index] ?? category.color,\n }));\n }, [categories]);\n\n if (compact) {\n return (\n <div className={`w-full h-full ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsBarChart\n data={data}\n layout={layout}\n barCategoryGap=\"20%\"\n margin={{ top: 2, right: 2, left: 2, bottom: 2 }}\n >\n <Tooltip\n contentStyle={chartTooltipContentStyle}\n cursor={chartBandHoverCursorStyle}\n itemStyle={chartTooltipItemStyle}\n labelStyle={chartTooltipLabelStyle}\n wrapperStyle={chartTooltipWrapperStyle}\n />\n {normalizedCategories.map((cat) => (\n <Bar\n key={cat.key}\n dataKey={cat.key}\n fill={cat.color}\n maxBarSize={resolvedMaxBarSize}\n radius={[3, 3, 0, 0]}\n />\n ))}\n </RechartsBarChart>\n </ResponsiveContainer>\n </div>\n );\n }\n\n return (\n <div className={`w-full ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsBarChart\n data={data}\n layout={layout}\n barCategoryGap={data.length <= 4 ? \"28%\" : \"18%\"}\n margin={{ top: 20, right: 30, left: 20, bottom: 5 }}\n >\n <CartesianGrid\n strokeDasharray=\"3 3\"\n horizontal={layout === \"horizontal\"}\n vertical={layout === \"vertical\"}\n stroke=\"var(--ds-color-border)\"\n opacity={0.4}\n />\n\n {layout === \"horizontal\" ? (\n <>\n <XAxis\n dataKey=\"name\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dy={10}\n />\n <YAxis\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dx={-10}\n />\n </>\n ) : (\n <>\n <XAxis\n type=\"number\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dy={10}\n />\n <YAxis\n dataKey=\"name\"\n type=\"category\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dx={-10}\n />\n </>\n )}\n\n <Tooltip\n contentStyle={chartTooltipContentStyle}\n cursor={chartBandHoverCursorStyle}\n itemStyle={chartTooltipItemStyle}\n labelStyle={chartTooltipLabelStyle}\n wrapperStyle={chartTooltipWrapperStyle}\n />\n\n {normalizedCategories.map((cat) => (\n <Bar\n key={cat.key}\n dataKey={cat.key}\n fill={cat.color}\n maxBarSize={resolvedMaxBarSize}\n radius={layout === \"horizontal\" ? [4, 4, 0, 0] : [0, 4, 4, 0]}\n />\n ))}\n </RechartsBarChart>\n </ResponsiveContainer>\n </div>\n );\n};\n","\"use client\";\n\nimport React from \"react\";\nimport {\n Bar,\n BarChart as RechartsBarChart,\n CartesianGrid,\n Cell,\n Rectangle,\n ReferenceLine,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from \"recharts\";\n\nimport { getChartColorVar, normalizeChartColorValue } from \"./chartPalette\";\nimport {\n chartBandHoverCursorStyle,\n chartTooltipContentStyle,\n chartTooltipItemStyle,\n chartTooltipLabelStyle,\n chartTooltipWrapperStyle,\n} from \"./chartStyles\";\n\nexport interface PositiveNegativeBarChartData {\n name: string;\n value: number;\n}\n\ninterface PositiveNegativeBarChartProps {\n data: PositiveNegativeBarChartData[];\n height?: number | string;\n className?: string;\n layout?: \"horizontal\" | \"vertical\";\n positiveColor?: string;\n negativeColor?: string;\n neutralColor?: string;\n showGrid?: boolean;\n seriesLabel?: string;\n valueFormatter?: (value: number) => string;\n tickFormatter?: (value: number) => string;\n}\n\nconst defaultValueFormatter = (value: number): string =>\n new Intl.NumberFormat().format(value);\n\nconst getBarRadius = (\n value: number,\n layout: \"horizontal\" | \"vertical\",\n): [number, number, number, number] => {\n if (value === 0) {\n return [6, 6, 6, 6];\n }\n\n if (layout === \"horizontal\") {\n return [6, 6, 0, 0];\n }\n\n return value > 0 ? [0, 6, 6, 0] : [6, 0, 0, 6];\n};\n\nexport const PositiveNegativeBarChart: React.FC<\n PositiveNegativeBarChartProps\n> = ({\n data,\n height = 320,\n className = \"\",\n layout = \"horizontal\",\n positiveColor = getChartColorVar(3),\n negativeColor = getChartColorVar(5),\n neutralColor = getChartColorVar(15),\n showGrid = true,\n seriesLabel = \"Variance\",\n valueFormatter = defaultValueFormatter,\n tickFormatter,\n}) => {\n const resolvedPositiveColor = React.useMemo(\n () => normalizeChartColorValue(positiveColor) ?? getChartColorVar(3),\n [positiveColor],\n );\n const resolvedNegativeColor = React.useMemo(\n () => normalizeChartColorValue(negativeColor) ?? getChartColorVar(5),\n [negativeColor],\n );\n const resolvedNeutralColor = React.useMemo(\n () => normalizeChartColorValue(neutralColor) ?? getChartColorVar(15),\n [neutralColor],\n );\n\n const resolvedTickFormatter = React.useCallback(\n (value: number) => tickFormatter?.(value) ?? valueFormatter(value),\n [tickFormatter, valueFormatter],\n );\n\n const getBarFill = React.useCallback(\n (value: number) => {\n if (value > 0) {\n return resolvedPositiveColor;\n }\n\n if (value < 0) {\n return resolvedNegativeColor;\n }\n\n return resolvedNeutralColor;\n },\n [resolvedNegativeColor, resolvedNeutralColor, resolvedPositiveColor],\n );\n\n return (\n <div className={`w-full ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsBarChart\n data={data}\n layout={layout}\n margin={{ top: 20, right: 30, left: 20, bottom: 5 }}\n >\n {showGrid ? (\n <CartesianGrid\n strokeDasharray=\"3 3\"\n horizontal={layout === \"horizontal\"}\n vertical={layout === \"vertical\"}\n stroke=\"var(--ds-color-border)\"\n opacity={0.35}\n />\n ) : null}\n\n {layout === \"horizontal\" ? (\n <>\n <XAxis\n dataKey=\"name\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n dy={10}\n />\n <YAxis\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n tickFormatter={resolvedTickFormatter}\n dx={-10}\n />\n <ReferenceLine\n y={0}\n stroke=\"var(--ds-color-border-strong)\"\n strokeOpacity={0.95}\n />\n </>\n ) : (\n <>\n <XAxis\n type=\"number\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n tickFormatter={resolvedTickFormatter}\n dy={10}\n />\n <YAxis\n dataKey=\"name\"\n type=\"category\"\n axisLine={false}\n tickLine={false}\n tick={{ fill: \"var(--ds-color-fg-muted)\", fontSize: 12 }}\n width={96}\n dx={-6}\n />\n <ReferenceLine\n x={0}\n stroke=\"var(--ds-color-border-strong)\"\n strokeOpacity={0.95}\n />\n </>\n )}\n\n <Tooltip\n contentStyle={chartTooltipContentStyle}\n cursor={chartBandHoverCursorStyle}\n itemStyle={chartTooltipItemStyle}\n labelStyle={chartTooltipLabelStyle}\n wrapperStyle={chartTooltipWrapperStyle}\n formatter={(value) => [\n valueFormatter(Number(value ?? 0)),\n seriesLabel,\n ]}\n />\n\n <Bar\n dataKey=\"value\"\n radius={6}\n barSize={layout === \"horizontal\" ? 30 : 22}\n shape={(props) => {\n const barValue = Array.isArray(props.value)\n ? props.value[1] - props.value[0]\n : props.value;\n\n return (\n <Rectangle {...props} radius={getBarRadius(barValue, layout)} />\n );\n }}\n >\n {data.map((entry) => (\n <Cell\n key={`${entry.name}-${entry.value}`}\n fill={getBarFill(entry.value)}\n />\n ))}\n </Bar>\n </RechartsBarChart>\n </ResponsiveContainer>\n </div>\n );\n};\n","\"use client\";\n\nimport React from \"react\";\nimport {\n PieChart as RechartsPieChart,\n Pie,\n Cell,\n Tooltip,\n Legend,\n ResponsiveContainer,\n} from \"recharts\";\n\nimport { normalizeChartColors } from \"./chartPalette\";\nimport {\n chartLegendTextStyle,\n chartTooltipContentStyle,\n chartTooltipItemStyle,\n chartTooltipLabelStyle,\n chartTooltipWrapperStyle,\n} from \"./chartStyles\";\n\nexport interface PieChartData {\n name: string;\n value: number;\n}\n\nexport interface PieChartCenterContentContext {\n activeColor?: string;\n activeIndex: number | null;\n activeSlice: PieChartData | null;\n data: PieChartData[];\n displayLabel: string;\n displayPercentageLabel: string;\n displayValue: number;\n normalizedColors: string[];\n totalValue: number;\n valueFormatter: (value: number) => string;\n variant: \"pie\" | \"donut\";\n}\n\nexport interface PieChartProps {\n data: PieChartData[];\n colors: string[];\n height?: number | string;\n className?: string;\n variant?: \"pie\" | \"donut\";\n showCenterSummary?: boolean;\n centerLabel?: string;\n valueFormatter?: (value: number) => string;\n renderCenterContent?: (\n context: PieChartCenterContentContext,\n ) => React.ReactNode;\n}\n\nconst defaultValueFormatter = (value: number): string =>\n new Intl.NumberFormat().format(value);\n\nexport const PieChart: React.FC<PieChartProps> = ({\n data,\n colors,\n height = 300,\n className = \"\",\n variant = \"donut\",\n showCenterSummary = variant === \"donut\",\n centerLabel = \"Total\",\n valueFormatter = defaultValueFormatter,\n renderCenterContent,\n}) => {\n const [activeIndex, setActiveIndex] = React.useState<number | null>(null);\n const innerRadius = variant === \"donut\" ? \"60%\" : 0;\n const normalizedColors = React.useMemo(\n () => normalizeChartColors(colors),\n [colors],\n );\n const totalValue = React.useMemo(\n () => data.reduce((sum, item) => sum + item.value, 0),\n [data],\n );\n const activeSlice =\n activeIndex !== null && activeIndex >= 0 && activeIndex < data.length\n ? data[activeIndex]\n : null;\n const activePercentage =\n activeSlice && totalValue > 0\n ? `${Math.round((activeSlice.value / totalValue) * 100)}% of total`\n : `${data.length} categories`;\n const displayLabel = activeSlice?.name ?? centerLabel;\n const displayValue = activeSlice?.value ?? totalValue;\n const activeColor =\n activeIndex !== null\n ? normalizedColors[activeIndex % normalizedColors.length]\n : undefined;\n const centerContentContext: PieChartCenterContentContext = {\n activeColor,\n activeIndex,\n activeSlice,\n data,\n displayLabel,\n displayPercentageLabel: activePercentage,\n displayValue,\n normalizedColors,\n totalValue,\n valueFormatter,\n variant,\n };\n const shouldRenderCenterContent =\n variant === \"donut\" && (showCenterSummary || Boolean(renderCenterContent));\n\n return (\n <div className={`relative w-full ${className}`} style={{ height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <RechartsPieChart>\n <Pie\n data={data}\n cx=\"50%\"\n cy=\"50%\"\n innerRadius={innerRadius}\n outerRadius=\"80%\"\n paddingAngle={variant === \"donut\" ? 2 : 0}\n dataKey=\"value\"\n stroke=\"none\"\n onMouseEnter={(_data: unknown, index: number) =>\n setActiveIndex(index)\n }\n onMouseLeave={() => setActiveIndex(null)}\n >\n {data.map((entry, index) => (\n <Cell\n key={`cell-${index}`}\n fill={normalizedColors[index % normalizedColors.length]}\n />\n ))}\n </Pie>\n\n <Tooltip\n contentStyle={chartTooltipContentStyle}\n itemStyle={chartTooltipItemStyle}\n labelStyle={chartTooltipLabelStyle}\n wrapperStyle={chartTooltipWrapperStyle}\n />\n\n <Legend iconType=\"circle\" wrapperStyle={chartLegendTextStyle} />\n </RechartsPieChart>\n </ResponsiveContainer>\n\n {shouldRenderCenterContent ? (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n {renderCenterContent ? (\n renderCenterContent(centerContentContext)\n ) : (\n <div className=\"flex max-w-[42%] flex-col items-center text-center\">\n <p className=\"text-[11px] font-medium tracking-[0.16em] text-ds-2 uppercase\">\n {displayLabel}\n </p>\n <p className=\"mt-1 text-2xl font-semibold leading-none text-ds-1 sm:text-3xl\">\n {valueFormatter(displayValue)}\n </p>\n <p className=\"mt-2 text-xs leading-tight text-ds-2\">\n {activePercentage}\n </p>\n </div>\n )}\n </div>\n ) : null}\n </div>\n );\n};\n"],"mappings":";;;;;;;;AAAA,IAAM,kBAAkB;CACtB;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAG;CAAI;CAAI;CAAI;CAAI;CAAI;AACjD;AAKA,IAAa,mBAAmB,gBAAgB,KAC7C,SAAS,SAAS,MACrB;AAE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