@techzyapp/ui-library 1.0.43 → 1.0.45
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/README.md +15 -14
- package/dist/{Accordion-B4vdZXIu.cjs → Accordion-CFyeLfPT.cjs} +2 -2
- package/dist/{Accordion-B4vdZXIu.cjs.map → Accordion-CFyeLfPT.cjs.map} +1 -1
- package/dist/{Accordion-DhFZ25KV.js → Accordion-DOrTQJB9.js} +2 -2
- package/dist/{Accordion-DhFZ25KV.js.map → Accordion-DOrTQJB9.js.map} +1 -1
- package/dist/{AdminRoot-BLHvXCvL.js → AdminRoot-BZ1v5vN9.js} +8 -8
- package/dist/{AdminRoot-BLHvXCvL.js.map → AdminRoot-BZ1v5vN9.js.map} +1 -1
- package/dist/{AdminRoot-D_g_TW30.cjs → AdminRoot-DJ4-UMAB.cjs} +2 -2
- package/dist/{AdminRoot-D_g_TW30.cjs.map → AdminRoot-DJ4-UMAB.cjs.map} +1 -1
- package/dist/Alert-BU7GlQna.js +70 -0
- package/dist/{Alert-D5E1PLkV.js.map → Alert-BU7GlQna.js.map} +1 -1
- package/dist/Alert-CVQOjuEq.cjs +2 -0
- package/dist/{Alert-B4XZDk16.cjs.map → Alert-CVQOjuEq.cjs.map} +1 -1
- package/dist/{AuthLayout-q8pbCGdt.js → AuthLayout-BI1wLuDl.js} +2 -2
- package/dist/{AuthLayout-q8pbCGdt.js.map → AuthLayout-BI1wLuDl.js.map} +1 -1
- package/dist/{AuthLayout-exuNQicH.cjs → AuthLayout-Bzlsvicf.cjs} +2 -2
- package/dist/{AuthLayout-exuNQicH.cjs.map → AuthLayout-Bzlsvicf.cjs.map} +1 -1
- package/dist/{Avatar-l48Ice6t.cjs → Avatar-BBqX1732.cjs} +2 -2
- package/dist/{Avatar-l48Ice6t.cjs.map → Avatar-BBqX1732.cjs.map} +1 -1
- package/dist/{Avatar-ClcmN0ba.js → Avatar-CaYyv5wk.js} +2 -2
- package/dist/{Avatar-ClcmN0ba.js.map → Avatar-CaYyv5wk.js.map} +1 -1
- package/dist/{AvatarGroup-l-KV3wdl.js → AvatarGroup-6fhm-van.js} +2 -2
- package/dist/{AvatarGroup-l-KV3wdl.js.map → AvatarGroup-6fhm-van.js.map} +1 -1
- package/dist/{AvatarGroup-CuvFX4di.cjs → AvatarGroup-DrkzAt1-.cjs} +2 -2
- package/dist/{AvatarGroup-CuvFX4di.cjs.map → AvatarGroup-DrkzAt1-.cjs.map} +1 -1
- package/dist/Breadcrumbs-BMz_YVPa.js +34 -0
- package/dist/{Breadcrumbs-M31xyok8.js.map → Breadcrumbs-BMz_YVPa.js.map} +1 -1
- package/dist/Breadcrumbs-BbC0o4JE.cjs +2 -0
- package/dist/{Breadcrumbs-DSUxcp6u.cjs.map → Breadcrumbs-BbC0o4JE.cjs.map} +1 -1
- package/dist/Button-C415LPw_.js +72 -0
- package/dist/{Button-CtADzomU.js.map → Button-C415LPw_.js.map} +1 -1
- package/dist/Button-mBZOvgyZ.cjs +2 -0
- package/dist/{Button-Q_5uA-zc.cjs.map → Button-mBZOvgyZ.cjs.map} +1 -1
- package/dist/{Calendar-CHLCv2s9.js → Calendar-B0f6h9-A.js} +5 -5
- package/dist/{Calendar-CHLCv2s9.js.map → Calendar-B0f6h9-A.js.map} +1 -1
- package/dist/{Calendar-BbbtMsZs.cjs → Calendar-hO051hfk.cjs} +2 -2
- package/dist/{Calendar-BbbtMsZs.cjs.map → Calendar-hO051hfk.cjs.map} +1 -1
- package/dist/{Card-CntRsQfm.cjs → Card-BdNr5row.cjs} +2 -2
- package/dist/{Card-CntRsQfm.cjs.map → Card-BdNr5row.cjs.map} +1 -1
- package/dist/{Card-Br9IB0yM.js → Card-ssUNaOF_.js} +4 -4
- package/dist/{Card-Br9IB0yM.js.map → Card-ssUNaOF_.js.map} +1 -1
- package/dist/Chip-BpJN4rzY.cjs +2 -0
- package/dist/{Chip-CrBizrvG.cjs.map → Chip-BpJN4rzY.cjs.map} +1 -1
- package/dist/Chip-C0x-6g2h.js +92 -0
- package/dist/{Chip-DYZ5w7VM.js.map → Chip-C0x-6g2h.js.map} +1 -1
- package/dist/ChoiceCardGroup-Cj_YFj6C.cjs +2 -0
- package/dist/{ChoiceCardGroup-C7Eengyd.cjs.map → ChoiceCardGroup-Cj_YFj6C.cjs.map} +1 -1
- package/dist/ChoiceCardGroup-D37XREKV.js +180 -0
- package/dist/{ChoiceCardGroup-q0yN-TeQ.js.map → ChoiceCardGroup-D37XREKV.js.map} +1 -1
- package/dist/CodeBlock-DKnWINdV.js +96 -0
- package/dist/{CodeBlock-B6Eqc4HR.js.map → CodeBlock-DKnWINdV.js.map} +1 -1
- package/dist/CodeBlock-DTrzN95i.cjs +2 -0
- package/dist/{CodeBlock-DW4uaZXM.cjs.map → CodeBlock-DTrzN95i.cjs.map} +1 -1
- package/dist/{ColorPicker-GsKIqJu8.js → ColorPicker-Bidev2DJ.js} +3 -3
- package/dist/{ColorPicker-GsKIqJu8.js.map → ColorPicker-Bidev2DJ.js.map} +1 -1
- package/dist/{ColorPicker-nhWd_nOW.cjs → ColorPicker-Doaegll4.cjs} +2 -2
- package/dist/{ColorPicker-nhWd_nOW.cjs.map → ColorPicker-Doaegll4.cjs.map} +1 -1
- package/dist/{ColorPickerPanel-BeAu83S6.cjs → ColorPickerPanel-048Fj7wv.cjs} +2 -2
- package/dist/{ColorPickerPanel-BeAu83S6.cjs.map → ColorPickerPanel-048Fj7wv.cjs.map} +1 -1
- package/dist/{ColorPickerPanel-BEcZePcT.js → ColorPickerPanel-DThSuUoz.js} +3 -3
- package/dist/{ColorPickerPanel-BEcZePcT.js.map → ColorPickerPanel-DThSuUoz.js.map} +1 -1
- package/dist/{ColorRamp-C-zRPhHj.cjs → ColorRamp-CGw4D9bf.cjs} +2 -2
- package/dist/{ColorRamp-C-zRPhHj.cjs.map → ColorRamp-CGw4D9bf.cjs.map} +1 -1
- package/dist/{ColorRamp-CeNgd8wF.js → ColorRamp-Reb0q69d.js} +2 -2
- package/dist/{ColorRamp-CeNgd8wF.js.map → ColorRamp-Reb0q69d.js.map} +1 -1
- package/dist/{ConfigProvider-Ci9Q2HLF.cjs → ConfigProvider-DBU6rOIA.cjs} +2 -2
- package/dist/{ConfigProvider-Ci9Q2HLF.cjs.map → ConfigProvider-DBU6rOIA.cjs.map} +1 -1
- package/dist/{ConfigProvider-Dqfu7UBU.js → ConfigProvider-DVDGtCUc.js} +2 -2
- package/dist/{ConfigProvider-Dqfu7UBU.js.map → ConfigProvider-DVDGtCUc.js.map} +1 -1
- package/dist/{CopyButton-Chr7SP5i.cjs → CopyButton-Cnab62vt.cjs} +2 -2
- package/dist/{CopyButton-Chr7SP5i.cjs.map → CopyButton-Cnab62vt.cjs.map} +1 -1
- package/dist/{CopyButton-Bidt2Vgp.js → CopyButton-Dm8-V4ku.js} +4 -4
- package/dist/{CopyButton-Bidt2Vgp.js.map → CopyButton-Dm8-V4ku.js.map} +1 -1
- package/dist/DashedButton-BX8hfY1x.cjs +2 -0
- package/dist/{DashedButton-Dw7xHgIp.cjs.map → DashedButton-BX8hfY1x.cjs.map} +1 -1
- package/dist/DashedButton-wcmXTYBw.js +58 -0
- package/dist/{DashedButton-csz6Jt_K.js.map → DashedButton-wcmXTYBw.js.map} +1 -1
- package/dist/{DatePicker-D7ZMOhWn.js → DatePicker-C4MTCmDn.js} +6 -6
- package/dist/{DatePicker-D7ZMOhWn.js.map → DatePicker-C4MTCmDn.js.map} +1 -1
- package/dist/{DatePicker-4rb34nPR.cjs → DatePicker-CaGeW_-j.cjs} +2 -2
- package/dist/{DatePicker-4rb34nPR.cjs.map → DatePicker-CaGeW_-j.cjs.map} +1 -1
- package/dist/DatePicker.module-BaQyKOUM.cjs +2 -0
- package/dist/{DatePicker.module-BDtTsg8M.cjs.map → DatePicker.module-BaQyKOUM.cjs.map} +1 -1
- package/dist/DatePicker.module-DoywSvLu.js +138 -0
- package/dist/{DatePicker.module-CMMQyEhG.js.map → DatePicker.module-DoywSvLu.js.map} +1 -1
- package/dist/{DateTimePicker-gDxM2CGy.js → DateTimePicker-B0CjHKPV.js} +9 -9
- package/dist/{DateTimePicker-gDxM2CGy.js.map → DateTimePicker-B0CjHKPV.js.map} +1 -1
- package/dist/{DateTimePicker-CVFzKzyA.cjs → DateTimePicker-DXKaAYey.cjs} +2 -2
- package/dist/{DateTimePicker-CVFzKzyA.cjs.map → DateTimePicker-DXKaAYey.cjs.map} +1 -1
- package/dist/DescriptionList-BSDwobDc.cjs +2 -0
- package/dist/{DescriptionList-BBvfABps.cjs.map → DescriptionList-BSDwobDc.cjs.map} +1 -1
- package/dist/{DescriptionList-Die3lRBW.js → DescriptionList-BkUS5egS.js} +69 -69
- package/dist/{DescriptionList-Die3lRBW.js.map → DescriptionList-BkUS5egS.js.map} +1 -1
- package/dist/Dropdown-C_y9_dVn.cjs +2 -0
- package/dist/Dropdown-C_y9_dVn.cjs.map +1 -0
- package/dist/Dropdown-D-D_Z1Jo.js +154 -0
- package/dist/Dropdown-D-D_Z1Jo.js.map +1 -0
- package/dist/{EmptyState-D5EKQjX1.cjs → EmptyState-CkkFHKrh.cjs} +2 -2
- package/dist/{EmptyState-D5EKQjX1.cjs.map → EmptyState-CkkFHKrh.cjs.map} +1 -1
- package/dist/{EmptyState-DRgER10x.js → EmptyState-DXoaPC7o.js} +3 -3
- package/dist/{EmptyState-DRgER10x.js.map → EmptyState-DXoaPC7o.js.map} +1 -1
- package/dist/{ErrorBoundary-CLfE2NjU.js → ErrorBoundary-CSP_Ctg6.js} +3 -3
- package/dist/{ErrorBoundary-CLfE2NjU.js.map → ErrorBoundary-CSP_Ctg6.js.map} +1 -1
- package/dist/{ErrorBoundary-DVcGWZd8.cjs → ErrorBoundary-tZjKtO28.cjs} +2 -2
- package/dist/{ErrorBoundary-DVcGWZd8.cjs.map → ErrorBoundary-tZjKtO28.cjs.map} +1 -1
- package/dist/{ErrorState-DJDQbHZY.cjs → ErrorState-JH4JdrTI.cjs} +2 -2
- package/dist/{ErrorState-DJDQbHZY.cjs.map → ErrorState-JH4JdrTI.cjs.map} +1 -1
- package/dist/{ErrorState-Dqw0AvmB.js → ErrorState-WYsly5-i.js} +8 -8
- package/dist/{ErrorState-Dqw0AvmB.js.map → ErrorState-WYsly5-i.js.map} +1 -1
- package/dist/FileCard-BIfPqeek.cjs +2 -0
- package/dist/{FileCard-BqMproT9.cjs.map → FileCard-BIfPqeek.cjs.map} +1 -1
- package/dist/{FileCard-kVnjcSlk.js → FileCard-D4TB3qGG.js} +33 -33
- package/dist/{FileCard-kVnjcSlk.js.map → FileCard-D4TB3qGG.js.map} +1 -1
- package/dist/FileUploader-DPVF76Ha.js +701 -0
- package/dist/FileUploader-DPVF76Ha.js.map +1 -0
- package/dist/FileUploader-YE_DfTNC.cjs +2 -0
- package/dist/FileUploader-YE_DfTNC.cjs.map +1 -0
- package/dist/{Flag-B1ZvZVXi.cjs → Flag-B6OhgwZr.cjs} +2 -2
- package/dist/{Flag-B1ZvZVXi.cjs.map → Flag-B6OhgwZr.cjs.map} +1 -1
- package/dist/{Flag-BEIqYQZg.js → Flag-Q3vI7cgt.js} +2 -2
- package/dist/{Flag-BEIqYQZg.js.map → Flag-Q3vI7cgt.js.map} +1 -1
- package/dist/{FullscreenToggle-BuQonKW8.js → FullscreenToggle-CxwGPLdd.js} +4 -4
- package/dist/{FullscreenToggle-BuQonKW8.js.map → FullscreenToggle-CxwGPLdd.js.map} +1 -1
- package/dist/{FullscreenToggle-CWlOXLss.cjs → FullscreenToggle-ipX55Nj4.cjs} +2 -2
- package/dist/{FullscreenToggle-CWlOXLss.cjs.map → FullscreenToggle-ipX55Nj4.cjs.map} +1 -1
- package/dist/Icon-B7DJn8Tw.js +5418 -0
- package/dist/Icon-B7DJn8Tw.js.map +1 -0
- package/dist/Icon-CBg21lKA.cjs +2 -0
- package/dist/Icon-CBg21lKA.cjs.map +1 -0
- package/dist/IconButton-U_sr2Ahy.cjs +2 -0
- package/dist/{IconButton-CiDPeKM4.cjs.map → IconButton-U_sr2Ahy.cjs.map} +1 -1
- package/dist/IconButton-re6xITGO.js +68 -0
- package/dist/{IconButton-BoURJOUD.js.map → IconButton-re6xITGO.js.map} +1 -1
- package/dist/ImageEditor-1n50vo_v.cjs +64 -0
- package/dist/ImageEditor-1n50vo_v.cjs.map +1 -0
- package/dist/ImageEditor-BwrG1fk7.js +2729 -0
- package/dist/ImageEditor-BwrG1fk7.js.map +1 -0
- package/dist/Link-BZjolIAF.js +48 -0
- package/dist/{Link-BQlvsu9V.js.map → Link-BZjolIAF.js.map} +1 -1
- package/dist/Link-CtttVM6w.cjs +2 -0
- package/dist/{Link-GZT51mKx.cjs.map → Link-CtttVM6w.cjs.map} +1 -1
- package/dist/{List-CKoNx21F.cjs → List-CLUXeaXS.cjs} +2 -2
- package/dist/{List-CKoNx21F.cjs.map → List-CLUXeaXS.cjs.map} +1 -1
- package/dist/{List-2Y3ktTcF.js → List-DS91CZUt.js} +2 -2
- package/dist/{List-2Y3ktTcF.js.map → List-DS91CZUt.js.map} +1 -1
- package/dist/ListItem-CguNjf-u.cjs +2 -0
- package/dist/{ListItem-DkCYXucd.cjs.map → ListItem-CguNjf-u.cjs.map} +1 -1
- package/dist/ListItem-Ezmdk7q-.js +76 -0
- package/dist/{ListItem-2Lr5_NRY.js.map → ListItem-Ezmdk7q-.js.map} +1 -1
- package/dist/{Loader-CnTuddK7.js → Loader-7v1QBvHY.js} +2 -2
- package/dist/{Loader-CnTuddK7.js.map → Loader-7v1QBvHY.js.map} +1 -1
- package/dist/{Loader-CAmRn8Oj.cjs → Loader-BE3SQr7W.cjs} +2 -2
- package/dist/{Loader-CAmRn8Oj.cjs.map → Loader-BE3SQr7W.cjs.map} +1 -1
- package/dist/{LocationPicker-Cns3fkYI.js → LocationPicker-BvKtZFq0.js} +8 -8
- package/dist/{LocationPicker-Cns3fkYI.js.map → LocationPicker-BvKtZFq0.js.map} +1 -1
- package/dist/{LocationPicker-BwQ6ULMF.cjs → LocationPicker-CVJ4jVn2.cjs} +2 -2
- package/dist/{LocationPicker-BwQ6ULMF.cjs.map → LocationPicker-CVJ4jVn2.cjs.map} +1 -1
- package/dist/Modal-CxODxl81.cjs +2 -0
- package/dist/Modal-CxODxl81.cjs.map +1 -0
- package/dist/Modal-DpoiMMM3.js +154 -0
- package/dist/Modal-DpoiMMM3.js.map +1 -0
- package/dist/MultiSelect-2GouMRTl.cjs +2 -0
- package/dist/{MultiSelect-DJ6tRseY.cjs.map → MultiSelect-2GouMRTl.cjs.map} +1 -1
- package/dist/MultiSelect-B7KwEhL5.js +219 -0
- package/dist/{MultiSelect-svEVZNbp.js.map → MultiSelect-B7KwEhL5.js.map} +1 -1
- package/dist/{NumberField-9ekoB1wS.js → NumberField-ThojS4K3.js} +4 -4
- package/dist/{NumberField-9ekoB1wS.js.map → NumberField-ThojS4K3.js.map} +1 -1
- package/dist/{NumberField-sokUuuBR.cjs → NumberField-o2z2QNK1.cjs} +2 -2
- package/dist/{NumberField-sokUuuBR.cjs.map → NumberField-o2z2QNK1.cjs.map} +1 -1
- package/dist/OtpField-BhZq44vV.cjs +2 -0
- package/dist/{OtpField-DlkGju72.cjs.map → OtpField-BhZq44vV.cjs.map} +1 -1
- package/dist/{OtpField-DA7zJwy9.js → OtpField-C3MlMZ2F.js} +61 -61
- package/dist/{OtpField-DA7zJwy9.js.map → OtpField-C3MlMZ2F.js.map} +1 -1
- package/dist/Overlay-CywFQfjm.cjs +2 -0
- package/dist/Overlay-CywFQfjm.cjs.map +1 -0
- package/dist/Overlay-DiL0ZARH.js +60 -0
- package/dist/Overlay-DiL0ZARH.js.map +1 -0
- package/dist/{PageError-vD8Dpfns.js → PageError-63Gk6fVC.js} +5 -5
- package/dist/{PageError-vD8Dpfns.js.map → PageError-63Gk6fVC.js.map} +1 -1
- package/dist/{PageError-DUN5PzDF.cjs → PageError-CCKWbrc5.cjs} +2 -2
- package/dist/{PageError-DUN5PzDF.cjs.map → PageError-CCKWbrc5.cjs.map} +1 -1
- package/dist/{PageLayout-CdObvxt7.js → PageLayout-BekkDBtT.js} +5 -5
- package/dist/{PageLayout-CdObvxt7.js.map → PageLayout-BekkDBtT.js.map} +1 -1
- package/dist/{PageLayout-BesuKuX6.cjs → PageLayout-CDPUYu6A.cjs} +2 -2
- package/dist/{PageLayout-BesuKuX6.cjs.map → PageLayout-CDPUYu6A.cjs.map} +1 -1
- package/dist/{PageNotFound-Cc5eZ6w3.js → PageNotFound-BD3zX3cd.js} +5 -5
- package/dist/{PageNotFound-Cc5eZ6w3.js.map → PageNotFound-BD3zX3cd.js.map} +1 -1
- package/dist/{PageNotFound-CfOAhmJ-.cjs → PageNotFound-CTR6htwa.cjs} +2 -2
- package/dist/{PageNotFound-CfOAhmJ-.cjs.map → PageNotFound-CTR6htwa.cjs.map} +1 -1
- package/dist/Pagination-BJvLUjQ0.cjs +2 -0
- package/dist/{Pagination-CAD9_Nr_.cjs.map → Pagination-BJvLUjQ0.cjs.map} +1 -1
- package/dist/Pagination-qKjISBJ9.js +139 -0
- package/dist/{Pagination-CX0S1RrF.js.map → Pagination-qKjISBJ9.js.map} +1 -1
- package/dist/{PaletteField-CpiEkXcB.cjs → PaletteField-CDS9CJW9.cjs} +2 -2
- package/dist/{PaletteField-CpiEkXcB.cjs.map → PaletteField-CDS9CJW9.cjs.map} +1 -1
- package/dist/{PaletteField-CVIwl2nV.js → PaletteField-y8KpR4Ap.js} +3 -3
- package/dist/{PaletteField-CVIwl2nV.js.map → PaletteField-y8KpR4Ap.js.map} +1 -1
- package/dist/PhoneField-Df3J6Hhg.cjs +2 -0
- package/dist/{PhoneField-Dlnnv4DU.cjs.map → PhoneField-Df3J6Hhg.cjs.map} +1 -1
- package/dist/{PhoneField-xHLTU-o5.js → PhoneField-OjsuevPx.js} +106 -106
- package/dist/{PhoneField-xHLTU-o5.js.map → PhoneField-OjsuevPx.js.map} +1 -1
- package/dist/{Popconfirm-Chlm_M5T.cjs → Popconfirm-BKzJ_EZy.cjs} +2 -2
- package/dist/{Popconfirm-Chlm_M5T.cjs.map → Popconfirm-BKzJ_EZy.cjs.map} +1 -1
- package/dist/{Popconfirm-DIlygJY8.js → Popconfirm-aCyniPnH.js} +4 -4
- package/dist/{Popconfirm-DIlygJY8.js.map → Popconfirm-aCyniPnH.js.map} +1 -1
- package/dist/{Progress-DqvKmyQW.cjs → Progress-DWOoLd8u.cjs} +2 -2
- package/dist/{Progress-DqvKmyQW.cjs.map → Progress-DWOoLd8u.cjs.map} +1 -1
- package/dist/{Progress-BAEhawtj.js → Progress-DzxbkcaD.js} +2 -2
- package/dist/{Progress-BAEhawtj.js.map → Progress-DzxbkcaD.js.map} +1 -1
- package/dist/{QrCode-Dqsk49vX.cjs → QrCode-C8uAPiHq.cjs} +2 -2
- package/dist/{QrCode-Dqsk49vX.cjs.map → QrCode-C8uAPiHq.cjs.map} +1 -1
- package/dist/{QrCode-D7BTYcW2.js → QrCode-DaJYqBc1.js} +2 -2
- package/dist/{QrCode-D7BTYcW2.js.map → QrCode-DaJYqBc1.js.map} +1 -1
- package/dist/{RemoveDialog-DZ-EqIfS.cjs → RemoveDialog-BnOtR6-q.cjs} +2 -2
- package/dist/{RemoveDialog-DZ-EqIfS.cjs.map → RemoveDialog-BnOtR6-q.cjs.map} +1 -1
- package/dist/{RemoveDialog-CQIm9GTH.js → RemoveDialog-MhEU5Zl3.js} +6 -6
- package/dist/{RemoveDialog-CQIm9GTH.js.map → RemoveDialog-MhEU5Zl3.js.map} +1 -1
- package/dist/RichTextEditor-Cnrnvv1f.cjs +2 -0
- package/dist/RichTextEditor-Cnrnvv1f.cjs.map +1 -0
- package/dist/RichTextEditor-zkoxujnO.js +1148 -0
- package/dist/RichTextEditor-zkoxujnO.js.map +1 -0
- package/dist/{RootLayout-Cl98ghy1.js → RootLayout-C4r9i5Go.js} +21 -21
- package/dist/{RootLayout-Cl98ghy1.js.map → RootLayout-C4r9i5Go.js.map} +1 -1
- package/dist/{RootLayout-s_Q_kSoS.cjs → RootLayout-Z9PuRfsa.cjs} +2 -2
- package/dist/{RootLayout-s_Q_kSoS.cjs.map → RootLayout-Z9PuRfsa.cjs.map} +1 -1
- package/dist/Select-CylqFHce.cjs +2 -0
- package/dist/{Select-BrjXCXtl.cjs.map → Select-CylqFHce.cjs.map} +1 -1
- package/dist/{Select-CG8UJL9R.js → Select-jT94L1vq.js} +47 -47
- package/dist/{Select-CG8UJL9R.js.map → Select-jT94L1vq.js.map} +1 -1
- package/dist/{Sidebar-CbPr34jd.js → Sidebar-B1O2RsbR.js} +59 -59
- package/dist/{Sidebar-CbPr34jd.js.map → Sidebar-B1O2RsbR.js.map} +1 -1
- package/dist/Sidebar-Bcm0fgVm.cjs +2 -0
- package/dist/{Sidebar-DLlqHvQJ.cjs.map → Sidebar-Bcm0fgVm.cjs.map} +1 -1
- package/dist/{Slider-DTnui01g.cjs → Slider-CV7ug0WF.cjs} +2 -2
- package/dist/{Slider-DTnui01g.cjs.map → Slider-CV7ug0WF.cjs.map} +1 -1
- package/dist/{Slider-B5iG-HSw.js → Slider-DC-ugZwT.js} +2 -2
- package/dist/{Slider-B5iG-HSw.js.map → Slider-DC-ugZwT.js.map} +1 -1
- package/dist/{SpeedDial-Be3SHkzw.js → SpeedDial-C6yiMUe8.js} +3 -3
- package/dist/{SpeedDial-Be3SHkzw.js.map → SpeedDial-C6yiMUe8.js.map} +1 -1
- package/dist/{SpeedDial-i5kxikmt.cjs → SpeedDial-DOgm2DDX.cjs} +2 -2
- package/dist/{SpeedDial-i5kxikmt.cjs.map → SpeedDial-DOgm2DDX.cjs.map} +1 -1
- package/dist/Stepper-BZdYGpBN.js +168 -0
- package/dist/{Stepper-BDQt-oVG.js.map → Stepper-BZdYGpBN.js.map} +1 -1
- package/dist/Stepper-DqM86TGV.cjs +2 -0
- package/dist/{Stepper-e8qBsKYW.cjs.map → Stepper-DqM86TGV.cjs.map} +1 -1
- package/dist/{SwatchPicker-0gnOvv7U.cjs → SwatchPicker-DCjE0T80.cjs} +2 -2
- package/dist/{SwatchPicker-0gnOvv7U.cjs.map → SwatchPicker-DCjE0T80.cjs.map} +1 -1
- package/dist/{SwatchPicker-BZHRELA-.js → SwatchPicker-DS4WY2eM.js} +2 -2
- package/dist/{SwatchPicker-BZHRELA-.js.map → SwatchPicker-DS4WY2eM.js.map} +1 -1
- package/dist/Table-BgaCwRDQ.cjs +2 -0
- package/dist/Table-BgaCwRDQ.cjs.map +1 -0
- package/dist/{Table-ChdM_vyi.js → Table-FZlVWoYi.js} +346 -346
- package/dist/Table-FZlVWoYi.js.map +1 -0
- package/dist/Tabs-BqQPkorY.js +193 -0
- package/dist/{Tabs-BxZrgozI.js.map → Tabs-BqQPkorY.js.map} +1 -1
- package/dist/Tabs-kGeyFhJ6.cjs +2 -0
- package/dist/{Tabs-C4kB1yfG.cjs.map → Tabs-kGeyFhJ6.cjs.map} +1 -1
- package/dist/{TagsField-Bg5BcQU-.cjs → TagsField-B_sjp48X.cjs} +2 -2
- package/dist/{TagsField-Bg5BcQU-.cjs.map → TagsField-B_sjp48X.cjs.map} +1 -1
- package/dist/{TagsField-DWlIt7XO.js → TagsField-ByTx9JXK.js} +5 -5
- package/dist/{TagsField-DWlIt7XO.js.map → TagsField-ByTx9JXK.js.map} +1 -1
- package/dist/{TextField-B-xqoDZR.cjs → TextField-CBYJIfau.cjs} +2 -2
- package/dist/{TextField-B-xqoDZR.cjs.map → TextField-CBYJIfau.cjs.map} +1 -1
- package/dist/{TextField-Dwx5GPxz.js → TextField-CyKIx-d-.js} +4 -4
- package/dist/{TextField-Dwx5GPxz.js.map → TextField-CyKIx-d-.js.map} +1 -1
- package/dist/{ThemeToggle-DFgv1bsh.cjs → ThemeToggle-D2dIqiBa.cjs} +2 -2
- package/dist/{ThemeToggle-DFgv1bsh.cjs.map → ThemeToggle-D2dIqiBa.cjs.map} +1 -1
- package/dist/{ThemeToggle-CK2USfgx.js → ThemeToggle-Dg6IishB.js} +4 -4
- package/dist/{ThemeToggle-CK2USfgx.js.map → ThemeToggle-Dg6IishB.js.map} +1 -1
- package/dist/TimeColumns-Cx8J5qzW.js +147 -0
- package/dist/{TimeColumns-BWcuu3l7.js.map → TimeColumns-Cx8J5qzW.js.map} +1 -1
- package/dist/TimeColumns-DVmK_T_P.cjs +2 -0
- package/dist/{TimeColumns-B8KTj-tc.cjs.map → TimeColumns-DVmK_T_P.cjs.map} +1 -1
- package/dist/{TimePicker-DjL15hz1.cjs → TimePicker-0nZOPRKp.cjs} +2 -2
- package/dist/{TimePicker-DjL15hz1.cjs.map → TimePicker-0nZOPRKp.cjs.map} +1 -1
- package/dist/{TimePicker-YMVHevpZ.js → TimePicker-sAhtvqQ4.js} +7 -7
- package/dist/{TimePicker-YMVHevpZ.js.map → TimePicker-sAhtvqQ4.js.map} +1 -1
- package/dist/Timeline-DOojNvLG.cjs +2 -0
- package/dist/Timeline-DOojNvLG.cjs.map +1 -0
- package/dist/Timeline-Dg03dwTN.js +87 -0
- package/dist/Timeline-Dg03dwTN.js.map +1 -0
- package/dist/{Toaster-pHN2pxrU.js → Toaster-BOW9rzLq.js} +3 -3
- package/dist/{Toaster-pHN2pxrU.js.map → Toaster-BOW9rzLq.js.map} +1 -1
- package/dist/{Toaster-9hZ5MuW7.cjs → Toaster-DYGo92ke.cjs} +2 -2
- package/dist/{Toaster-9hZ5MuW7.cjs.map → Toaster-DYGo92ke.cjs.map} +1 -1
- package/dist/ToggleButtonGroup-CGNRLxjg.cjs +2 -0
- package/dist/{ToggleButtonGroup-Ci_DFvdt.cjs.map → ToggleButtonGroup-CGNRLxjg.cjs.map} +1 -1
- package/dist/{ToggleButtonGroup-Mdskkjdh.js → ToggleButtonGroup-K6ZcrTZT.js} +37 -37
- package/dist/{ToggleButtonGroup-Mdskkjdh.js.map → ToggleButtonGroup-K6ZcrTZT.js.map} +1 -1
- package/dist/{TranslatedFields-SvS37hab.cjs → TranslatedFields-C_DuLotV.cjs} +2 -2
- package/dist/{TranslatedFields-SvS37hab.cjs.map → TranslatedFields-C_DuLotV.cjs.map} +1 -1
- package/dist/{TranslatedFields-BpWU5ZcG.js → TranslatedFields-CcE0td9p.js} +5 -5
- package/dist/{TranslatedFields-BpWU5ZcG.js.map → TranslatedFields-CcE0td9p.js.map} +1 -1
- package/dist/{UserCard-VPaexedS.cjs → UserCard-DLVptkLr.cjs} +2 -2
- package/dist/{UserCard-VPaexedS.cjs.map → UserCard-DLVptkLr.cjs.map} +1 -1
- package/dist/{UserCard-cmZrMvwL.js → UserCard-DeONbaKj.js} +5 -5
- package/dist/{UserCard-cmZrMvwL.js.map → UserCard-DeONbaKj.js.map} +1 -1
- package/dist/chunks/icons/{25-knEB8mSp.js → 25-BMMPtr_E.js} +4 -5
- package/dist/chunks/icons/{25-Dho_3EHD.cjs → 25-uATZNfXE.cjs} +1 -1
- package/dist/chunks/icons/{2b-CQJdcF1h.js → 2b-Brkug4c-.js} +10 -11
- package/dist/chunks/icons/{2b-C2_97u16.cjs → 2b-CIVRGp1R.cjs} +1 -1
- package/dist/chunks/icons/57-BLoIUlhF.js +27 -0
- package/dist/chunks/icons/57-D4zLdDZ1.cjs +1 -0
- package/dist/chunks/icons/{75-DqLkMUyj.cjs → 75-C2eJ2Tvr.cjs} +1 -1
- package/dist/chunks/icons/{75-D5RQw6IJ.js → 75-D16WojvG.js} +6 -7
- package/dist/chunks/icons/{7c-DpnA_JOJ.js → 7c-0j5Sno5_.js} +6 -7
- package/dist/chunks/icons/{7c-DEaFwltT.cjs → 7c-LUfAyp72.cjs} +1 -1
- package/dist/chunks/icons/8a-BJ_LOjmW.js +26 -0
- package/dist/chunks/icons/8a-CYkhOibI.cjs +1 -0
- package/dist/chunks/icons/97-Bx7FkkGJ.js +12 -0
- package/dist/chunks/icons/97-D7pUHrOX.cjs +1 -0
- package/dist/chunks/icons/{b7-BtHkI92Y.js → b7-DmmkevXf.js} +17 -18
- package/dist/chunks/icons/{b7-B-dB5jrV.cjs → b7-rI1GpsxW.cjs} +1 -1
- package/dist/chunks/icons/b8-De0yKEKv.js +28 -0
- package/dist/chunks/icons/b8-eR814BVJ.cjs +1 -0
- package/dist/chunks/icons/{b9-Bw942fE3.js → b9-CJO6ZdSw.js} +10 -11
- package/dist/chunks/icons/{b9-Be-J4RIp.cjs → b9-DZdWz9qg.cjs} +1 -1
- package/dist/chunks/icons/d5-BAPeb6B0.cjs +1 -0
- package/dist/chunks/icons/d5-BJJanOLe.js +21 -0
- package/dist/chunks/icons/d8--vRkIVal.js +19 -0
- package/dist/chunks/icons/d8-BfMys92X.cjs +1 -0
- package/dist/chunks/icons/dd-CARhkHmU.js +21 -0
- package/dist/chunks/icons/dd-D61yllMP.cjs +1 -0
- package/dist/components/Accordion/index.cjs +1 -1
- package/dist/components/Accordion/index.js +1 -1
- package/dist/components/Alert/index.cjs +1 -1
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/AuthLayout/index.cjs +1 -1
- package/dist/components/AuthLayout/index.js +1 -1
- package/dist/components/Avatar/index.cjs +1 -1
- package/dist/components/Avatar/index.js +2 -2
- package/dist/components/Breadcrumbs/index.cjs +1 -1
- package/dist/components/Breadcrumbs/index.js +1 -1
- package/dist/components/Button/index.cjs +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/Card/index.cjs +1 -1
- package/dist/components/Card/index.js +1 -1
- package/dist/components/Chip/index.cjs +1 -1
- package/dist/components/Chip/index.js +1 -1
- package/dist/components/ChoiceCard/index.cjs +1 -1
- package/dist/components/ChoiceCard/index.js +1 -1
- package/dist/components/CodeBlock/index.cjs +1 -1
- package/dist/components/CodeBlock/index.js +1 -1
- package/dist/components/ColorPicker/index.cjs +1 -1
- package/dist/components/ColorPicker/index.js +1 -1
- package/dist/components/ColorRamp/index.cjs +1 -1
- package/dist/components/ColorRamp/index.js +1 -1
- package/dist/components/CopyButton/index.cjs +1 -1
- package/dist/components/CopyButton/index.js +1 -1
- package/dist/components/DashedButton/index.cjs +1 -1
- package/dist/components/DashedButton/index.js +1 -1
- package/dist/components/DatePicker/index.cjs +1 -1
- package/dist/components/DatePicker/index.js +1 -1
- package/dist/components/DateTimePicker/index.cjs +1 -1
- package/dist/components/DateTimePicker/index.js +1 -1
- package/dist/components/DescriptionList/index.cjs +1 -1
- package/dist/components/DescriptionList/index.js +1 -1
- package/dist/components/Dropdown/index.cjs +1 -1
- package/dist/components/Dropdown/index.js +1 -1
- package/dist/components/EmptyState/index.cjs +1 -1
- package/dist/components/EmptyState/index.js +1 -1
- package/dist/components/ErrorState/index.cjs +1 -1
- package/dist/components/ErrorState/index.js +2 -2
- package/dist/components/FileCard/index.cjs +1 -1
- package/dist/components/FileCard/index.js +1 -1
- package/dist/components/FileUploader/FileUploader.d.cts +33 -5
- package/dist/components/FileUploader/FileUploader.d.ts +33 -5
- package/dist/components/FileUploader/FileUploaderEditDialog.d.cts +8 -18
- package/dist/components/FileUploader/FileUploaderEditDialog.d.ts +8 -18
- package/dist/components/FileUploader/index.cjs +1 -1
- package/dist/components/FileUploader/index.js +1 -1
- package/dist/components/Flag/index.cjs +1 -1
- package/dist/components/Flag/index.js +1 -1
- package/dist/components/FullscreenToggle/index.cjs +1 -1
- package/dist/components/FullscreenToggle/index.js +1 -1
- package/dist/components/Icon/index.cjs +1 -1
- package/dist/components/Icon/index.js +1 -1
- package/dist/components/IconButton/index.cjs +1 -1
- package/dist/components/IconButton/index.js +1 -1
- package/dist/components/ImageEditor/CropShapeMenu.d.cts +17 -0
- package/dist/components/ImageEditor/CropShapeMenu.d.ts +17 -0
- package/dist/components/ImageEditor/EditorStage.d.cts +27 -0
- package/dist/components/ImageEditor/EditorStage.d.ts +27 -0
- package/dist/components/ImageEditor/FilterStrip.d.cts +14 -0
- package/dist/components/ImageEditor/FilterStrip.d.ts +14 -0
- package/dist/components/ImageEditor/ImageEditor.d.cts +30 -0
- package/dist/components/ImageEditor/ImageEditor.d.ts +30 -0
- package/dist/components/ImageEditor/ResizePanel.d.cts +19 -0
- package/dist/components/ImageEditor/ResizePanel.d.ts +19 -0
- package/dist/components/ImageEditor/RulerSlider.d.cts +37 -0
- package/dist/components/ImageEditor/RulerSlider.d.ts +37 -0
- package/dist/components/ImageEditor/core/affine.d.cts +11 -0
- package/dist/components/ImageEditor/core/affine.d.ts +11 -0
- package/dist/components/ImageEditor/core/editor.d.cts +69 -0
- package/dist/components/ImageEditor/core/editor.d.ts +69 -0
- package/dist/components/ImageEditor/core/geometry.d.cts +112 -0
- package/dist/components/ImageEditor/core/geometry.d.ts +112 -0
- package/dist/components/ImageEditor/core/load.d.cts +26 -0
- package/dist/components/ImageEditor/core/load.d.ts +26 -0
- package/dist/components/ImageEditor/core/matrix.d.cts +55 -0
- package/dist/components/ImageEditor/core/matrix.d.ts +55 -0
- package/dist/components/ImageEditor/core/pixels.d.cts +24 -0
- package/dist/components/ImageEditor/core/pixels.d.ts +24 -0
- package/dist/components/ImageEditor/core/redact.d.cts +37 -0
- package/dist/components/ImageEditor/core/redact.d.ts +37 -0
- package/dist/components/ImageEditor/core/render.d.cts +19 -0
- package/dist/components/ImageEditor/core/render.d.ts +19 -0
- package/dist/components/ImageEditor/core/scene.d.cts +47 -0
- package/dist/components/ImageEditor/core/scene.d.ts +47 -0
- package/dist/components/ImageEditor/core/spring.d.cts +17 -0
- package/dist/components/ImageEditor/core/spring.d.ts +17 -0
- package/dist/components/ImageEditor/core/types.d.cts +104 -0
- package/dist/components/ImageEditor/core/types.d.ts +104 -0
- package/dist/components/ImageEditor/core/webgl.d.cts +55 -0
- package/dist/components/ImageEditor/core/webgl.d.ts +55 -0
- package/dist/components/ImageEditor/index.cjs +2 -0
- package/dist/components/ImageEditor/index.cjs.map +1 -0
- package/dist/components/ImageEditor/index.d.cts +6 -0
- package/dist/components/ImageEditor/index.d.ts +6 -0
- package/dist/components/ImageEditor/index.js +9 -0
- package/dist/components/ImageEditor/index.js.map +1 -0
- package/dist/components/Link/index.cjs +1 -1
- package/dist/components/Link/index.js +1 -1
- package/dist/components/List/index.cjs +1 -1
- package/dist/components/List/index.js +2 -2
- package/dist/components/Loader/index.cjs +1 -1
- package/dist/components/Loader/index.js +1 -1
- package/dist/components/LocationPicker/index.cjs +1 -1
- package/dist/components/LocationPicker/index.js +1 -1
- package/dist/components/Modal/index.cjs +1 -1
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/MultiSelect/index.cjs +1 -1
- package/dist/components/MultiSelect/index.js +1 -1
- package/dist/components/NumberField/index.cjs +1 -1
- package/dist/components/NumberField/index.js +1 -1
- package/dist/components/OtpField/index.cjs +1 -1
- package/dist/components/OtpField/index.js +1 -1
- package/dist/components/PageError/index.cjs +1 -1
- package/dist/components/PageError/index.js +1 -1
- package/dist/components/PageLayout/index.cjs +1 -1
- package/dist/components/PageLayout/index.js +1 -1
- package/dist/components/PageNotFound/index.cjs +1 -1
- package/dist/components/PageNotFound/index.js +1 -1
- package/dist/components/Pagination/index.cjs +1 -1
- package/dist/components/Pagination/index.js +1 -1
- package/dist/components/PaletteField/index.cjs +1 -1
- package/dist/components/PaletteField/index.js +1 -1
- package/dist/components/PhoneField/index.cjs +1 -1
- package/dist/components/PhoneField/index.js +1 -1
- package/dist/components/Popconfirm/index.cjs +1 -1
- package/dist/components/Popconfirm/index.js +1 -1
- package/dist/components/Progress/index.cjs +1 -1
- package/dist/components/Progress/index.js +1 -1
- package/dist/components/QrCode/index.cjs +1 -1
- package/dist/components/QrCode/index.js +1 -1
- package/dist/components/RemoveDialog/index.cjs +1 -1
- package/dist/components/RemoveDialog/index.js +1 -1
- package/dist/components/RichTextEditor/RichTextEditor.d.cts +3 -2
- package/dist/components/RichTextEditor/RichTextEditor.d.ts +3 -2
- package/dist/components/RichTextEditor/index.cjs +1 -1
- package/dist/components/RichTextEditor/index.js +1 -1
- package/dist/components/RichTextEditor/nodes/ImageNode.d.cts +22 -7
- package/dist/components/RichTextEditor/nodes/ImageNode.d.ts +22 -7
- package/dist/components/RichTextEditor/nodes/VideoNode.d.cts +4 -4
- package/dist/components/RichTextEditor/nodes/VideoNode.d.ts +4 -4
- package/dist/components/RootLayout/index.cjs +1 -1
- package/dist/components/RootLayout/index.js +1 -1
- package/dist/components/Select/index.cjs +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Sidebar/index.cjs +1 -1
- package/dist/components/Sidebar/index.js +1 -1
- package/dist/components/Slider/index.cjs +1 -1
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/SpeedDial/index.cjs +1 -1
- package/dist/components/SpeedDial/index.js +1 -1
- package/dist/components/Stepper/index.cjs +1 -1
- package/dist/components/Stepper/index.js +1 -1
- package/dist/components/SwatchPicker/index.cjs +1 -1
- package/dist/components/SwatchPicker/index.js +1 -1
- package/dist/components/Table/index.cjs +1 -1
- package/dist/components/Table/index.js +1 -1
- package/dist/components/Tabs/index.cjs +1 -1
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/TagsField/index.cjs +1 -1
- package/dist/components/TagsField/index.js +1 -1
- package/dist/components/TextField/index.cjs +1 -1
- package/dist/components/TextField/index.js +1 -1
- package/dist/components/ThemeToggle/index.cjs +1 -1
- package/dist/components/ThemeToggle/index.js +1 -1
- package/dist/components/TimePicker/index.cjs +1 -1
- package/dist/components/TimePicker/index.js +1 -1
- package/dist/components/Timeline/Timeline.d.cts +16 -4
- package/dist/components/Timeline/Timeline.d.ts +16 -4
- package/dist/components/Timeline/TimelineItem.d.cts +12 -6
- package/dist/components/Timeline/TimelineItem.d.ts +12 -6
- package/dist/components/Timeline/index.cjs +1 -1
- package/dist/components/Timeline/index.d.cts +1 -1
- package/dist/components/Timeline/index.d.ts +1 -1
- package/dist/components/Timeline/index.js +1 -1
- package/dist/components/Timeline/timelineContext.d.cts +3 -2
- package/dist/components/Timeline/timelineContext.d.ts +3 -2
- package/dist/components/Toast/index.cjs +1 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/ToggleButton/index.cjs +1 -1
- package/dist/components/ToggleButton/index.js +1 -1
- package/dist/components/TranslatedFields/index.cjs +1 -1
- package/dist/components/TranslatedFields/index.js +1 -1
- package/dist/components/UserCard/index.cjs +1 -1
- package/dist/components/UserCard/index.js +1 -1
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/entries/app.cjs +1 -1
- package/dist/entries/app.js +1 -1
- package/dist/entries/components.cjs +1 -1
- package/dist/entries/components.js +164 -159
- package/dist/entries/components.js.map +1 -1
- package/dist/entries/i18n.cjs +1 -1
- package/dist/entries/i18n.js +2 -2
- package/dist/entries/icons.cjs +1 -1
- package/dist/entries/icons.js +1 -1
- package/dist/entries/theme.cjs +1 -1
- package/dist/entries/theme.js +1 -1
- package/dist/i18n/messages.d.cts +66 -4
- package/dist/i18n/messages.d.ts +66 -4
- package/dist/icons/names.d.cts +3 -3
- package/dist/icons/names.d.ts +3 -3
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +161 -156
- package/dist/index.js.map +1 -1
- package/dist/{messages-BiRLMy1E.js → messages-DeQuvGln.js} +139 -47
- package/dist/messages-DeQuvGln.js.map +1 -0
- package/dist/{messages-C_fRRCg6.cjs → messages-dL9MkVze.cjs} +9 -9
- package/dist/messages-dL9MkVze.cjs.map +1 -0
- package/dist/{useHomeTo-DdmOGy09.js → useHomeTo-BL3e8Sc6.js} +2 -2
- package/dist/{useHomeTo-DdmOGy09.js.map → useHomeTo-BL3e8Sc6.js.map} +1 -1
- package/dist/{useHomeTo-HCkVzGTu.cjs → useHomeTo-W1PDW5CU.cjs} +2 -2
- package/dist/{useHomeTo-HCkVzGTu.cjs.map → useHomeTo-W1PDW5CU.cjs.map} +1 -1
- package/dist/{useOptionMenu-EiyIkC3E.js → useOptionMenu-BkKiZ6Ax.js} +6 -6
- package/dist/{useOptionMenu-EiyIkC3E.js.map → useOptionMenu-BkKiZ6Ax.js.map} +1 -1
- package/dist/{useOptionMenu-BqCj10_a.cjs → useOptionMenu-CVl7VHXl.cjs} +2 -2
- package/dist/{useOptionMenu-BqCj10_a.cjs.map → useOptionMenu-CVl7VHXl.cjs.map} +1 -1
- package/package.json +1 -6
- package/dist/Alert-B4XZDk16.cjs +0 -2
- package/dist/Alert-D5E1PLkV.js +0 -70
- package/dist/Breadcrumbs-DSUxcp6u.cjs +0 -2
- package/dist/Breadcrumbs-M31xyok8.js +0 -34
- package/dist/Button-CtADzomU.js +0 -72
- package/dist/Button-Q_5uA-zc.cjs +0 -2
- package/dist/Chip-CrBizrvG.cjs +0 -2
- package/dist/Chip-DYZ5w7VM.js +0 -92
- package/dist/ChoiceCardGroup-C7Eengyd.cjs +0 -2
- package/dist/ChoiceCardGroup-q0yN-TeQ.js +0 -180
- package/dist/CodeBlock-B6Eqc4HR.js +0 -96
- package/dist/CodeBlock-DW4uaZXM.cjs +0 -2
- package/dist/DashedButton-Dw7xHgIp.cjs +0 -2
- package/dist/DashedButton-csz6Jt_K.js +0 -58
- package/dist/DatePicker.module-BDtTsg8M.cjs +0 -2
- package/dist/DatePicker.module-CMMQyEhG.js +0 -138
- package/dist/DescriptionList-BBvfABps.cjs +0 -2
- package/dist/Dropdown-CMjURWYd.cjs +0 -2
- package/dist/Dropdown-CMjURWYd.cjs.map +0 -1
- package/dist/Dropdown-CnDBlB02.js +0 -146
- package/dist/Dropdown-CnDBlB02.js.map +0 -1
- package/dist/FileCard-BqMproT9.cjs +0 -2
- package/dist/FileUploader-BimFH5d8.cjs +0 -2
- package/dist/FileUploader-BimFH5d8.cjs.map +0 -1
- package/dist/FileUploader-LJIMh5_b.js +0 -707
- package/dist/FileUploader-LJIMh5_b.js.map +0 -1
- package/dist/Icon-B6lz-V0A.cjs +0 -2
- package/dist/Icon-B6lz-V0A.cjs.map +0 -1
- package/dist/Icon-D5TxgfCc.js +0 -5404
- package/dist/Icon-D5TxgfCc.js.map +0 -1
- package/dist/IconButton-BoURJOUD.js +0 -68
- package/dist/IconButton-CiDPeKM4.cjs +0 -2
- package/dist/Link-BQlvsu9V.js +0 -48
- package/dist/Link-GZT51mKx.cjs +0 -2
- package/dist/ListItem-2Lr5_NRY.js +0 -76
- package/dist/ListItem-DkCYXucd.cjs +0 -2
- package/dist/Modal-CYcVOzID.js +0 -206
- package/dist/Modal-CYcVOzID.js.map +0 -1
- package/dist/Modal-DwY3jGHE.cjs +0 -2
- package/dist/Modal-DwY3jGHE.cjs.map +0 -1
- package/dist/MultiSelect-DJ6tRseY.cjs +0 -2
- package/dist/MultiSelect-svEVZNbp.js +0 -219
- package/dist/OtpField-DlkGju72.cjs +0 -2
- package/dist/Pagination-CAD9_Nr_.cjs +0 -2
- package/dist/Pagination-CX0S1RrF.js +0 -139
- package/dist/PhoneField-Dlnnv4DU.cjs +0 -2
- package/dist/RichTextEditor-Ba1G_qXu.cjs +0 -2
- package/dist/RichTextEditor-Ba1G_qXu.cjs.map +0 -1
- package/dist/RichTextEditor-CJcbxQ6H.js +0 -916
- package/dist/RichTextEditor-CJcbxQ6H.js.map +0 -1
- package/dist/Select-BrjXCXtl.cjs +0 -2
- package/dist/Sidebar-DLlqHvQJ.cjs +0 -2
- package/dist/Stepper-BDQt-oVG.js +0 -168
- package/dist/Stepper-e8qBsKYW.cjs +0 -2
- package/dist/Table-C14fRX1U.cjs +0 -2
- package/dist/Table-C14fRX1U.cjs.map +0 -1
- package/dist/Table-ChdM_vyi.js.map +0 -1
- package/dist/Tabs-BxZrgozI.js +0 -193
- package/dist/Tabs-C4kB1yfG.cjs +0 -2
- package/dist/TimeColumns-B8KTj-tc.cjs +0 -2
- package/dist/TimeColumns-BWcuu3l7.js +0 -147
- package/dist/Timeline-Cb1krSlo.js +0 -70
- package/dist/Timeline-Cb1krSlo.js.map +0 -1
- package/dist/Timeline-CmluHBIT.cjs +0 -2
- package/dist/Timeline-CmluHBIT.cjs.map +0 -1
- package/dist/ToggleButtonGroup-Ci_DFvdt.cjs +0 -2
- package/dist/chunks/icons/57-Bxh2lSz-.cjs +0 -1
- package/dist/chunks/icons/57-CkmrDM9A.js +0 -28
- package/dist/chunks/icons/8a-CThAqelS.js +0 -27
- package/dist/chunks/icons/8a-DRBAtpxY.cjs +0 -1
- package/dist/chunks/icons/97-J9NBhX2o.js +0 -14
- package/dist/chunks/icons/97-r2YXIQ_T.cjs +0 -1
- package/dist/chunks/icons/b8-CyIivk3C.cjs +0 -1
- package/dist/chunks/icons/b8-DcK0w8WM.js +0 -29
- package/dist/chunks/icons/d5-3fWtNlXW.js +0 -20
- package/dist/chunks/icons/d5-CoG_Hfw9.cjs +0 -1
- package/dist/chunks/icons/d8-DsebfeMy.cjs +0 -1
- package/dist/chunks/icons/d8-DtOvDDrr.js +0 -20
- package/dist/chunks/icons/dd-BXVES9Ib.js +0 -22
- package/dist/chunks/icons/dd-beaqCKss.cjs +0 -1
- package/dist/messages-BiRLMy1E.js.map +0 -1
- package/dist/messages-C_fRRCg6.cjs.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),n=require("react"),H=require("clsx"),E=require("./Icon-
|
|
2
|
-
//# sourceMappingURL=Popconfirm-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),n=require("react"),H=require("clsx"),E=require("./Icon-CBg21lKA.cjs"),R=require("./Button-mBZOvgyZ.cjs"),J=require("./FloatingPanel-tGCG2nhA.cjs"),K=require("./ConfigProvider-DBU6rOIA.cjs"),Q="_popconfirm_ztpne_5",U="_body_ztpne_12",V="_icon_ztpne_21",W="_text_ztpne_33",X="_title_ztpne_43",Y="_description_ztpne_50",Z="_footer_ztpne_58",r={popconfirm:Q,body:U,icon:V,text:W,title:X,description:Y,footer:Z},ee=new Set(E.ICON_NAMES);function te({title:S,description:u,onConfirm:k,onCancel:f,confirmLabel:A,cancelLabel:P,color:j="error",icon:c="Danger",align:$="start",open:v,onOpenChange:d,disabled:w=!1,width:D=300,className:M,style:O,children:b}){const z=K.useT(),p=n.useId(),N=`${p}-panel`,g=`${p}-title`,h=`${p}-desc`,m=n.useRef(null),I=n.useRef(null),[i,_]=n.useState(!1),q=v!==void 0,[T,C]=n.useState(!1),o=q?v:T,B=e=>{q||C(e),d==null||d(e)};n.useEffect(()=>{if(!o)return;const e=requestAnimationFrame(()=>{var s;return(s=I.current)==null?void 0:s.focus()});return()=>cancelAnimationFrame(e)},[o]);const x=e=>{var s;B(!1),e&&((s=m.current)==null||s.focus())},y=(e=!0)=>{i||(f==null||f(),x(e))},L=async()=>{const e=k();if(!e||typeof e.then!="function"){x(!0);return}_(!0);try{await e,_(!1),x(!0)}catch{_(!1)}},l=b.props,a=l.ref,G=n.cloneElement(b,{ref:e=>{m.current=e,typeof a=="function"?a(e):a&&(a.current=e)},onClick:e=>{var s;(s=l.onClick)==null||s.call(l,e),!(w||i)&&(o?y(!1):B(!0))},"aria-haspopup":"dialog","aria-expanded":o,"aria-controls":o?N:void 0}),F=c===!1?null:typeof c=="string"&&ee.has(c)?t.jsx(E.Icon,{name:c}):c;return t.jsxs(t.Fragment,{children:[G,t.jsxs(J.FloatingPanel,{open:o,triggerRef:m,align:$,onClose:e=>y(e),id:N,role:"alertdialog",ariaLabelledBy:g,ariaDescribedBy:u!=null?h:void 0,trapFocus:!0,width:D,className:H.clsx(r.popconfirm,M),style:{"--tz-btn-rgb":`var(--tz-color-${j}-rgb)`,...O},children:[t.jsxs("div",{className:r.body,children:[F!=null&&t.jsx("span",{className:r.icon,"aria-hidden":"true",children:F}),t.jsxs("div",{className:r.text,children:[t.jsx("div",{id:g,className:r.title,children:S}),u!=null&&t.jsx("div",{id:h,className:r.description,children:u})]})]}),t.jsxs("div",{className:r.footer,children:[t.jsx(R.Button,{ref:I,variant:"text",size:"sm",onClick:()=>y(),disabled:i,children:P??z("common.cancel")}),t.jsx(R.Button,{variant:"contained",color:j,size:"sm",loading:i,onClick:L,children:A??z("common.confirm")})]})]})]})}exports.Popconfirm=te;
|
|
2
|
+
//# sourceMappingURL=Popconfirm-BKzJ_EZy.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popconfirm-Chlm_M5T.cjs","sources":["../src/components/Popconfirm/Popconfirm.tsx"],"sourcesContent":["import {\n cloneElement,\n useEffect,\n useId,\n useRef,\n useState,\n type CSSProperties,\n type MouseEvent as ReactMouseEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { Button } from '../Button'\nimport { FloatingPanel } from '../FloatingPanel/FloatingPanel'\nimport { Icon } from '../Icon'\nimport type { PopoverAlign } from '../Popover'\nimport styles from './Popconfirm.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface PopconfirmProps {\n /** The question — \"Delete this item?\". Labels the dialog. */\n title: ReactNode\n /** Optional muted line under the title (the consequence). Describes the dialog. */\n description?: ReactNode\n /**\n * Runs on confirm. Return a Promise to keep the popover open with the confirm button **loading** until\n * it settles — it closes on success and **stays open on rejection** (show your own toast).\n */\n // `unknown` (not `void | Promise`) so `() => toast.success(…)` — which returns an id — still fits\n onConfirm: () => unknown\n /** Runs on Cancel, `Escape` or an outside click. */\n onCancel?: () => void\n /** Confirm button label. Defaults to the localized \"Confirm\". */\n confirmLabel?: ReactNode\n /** Cancel button label. Defaults to the localized \"Cancel\". */\n cancelLabel?: ReactNode\n /** Tints the confirm button and the icon. Defaults to `error` (a destructive action). */\n color?: ThemeColor\n /** Leading icon — a known `IconName`, any node, or `false`. Defaults to `Danger` in the `color`. */\n icon?: IconName | ReactNode | false\n /** Horizontal alignment to the trigger (`start` default, `end` for a trigger near the right edge). */\n align?: PopoverAlign\n /** Controlled open state. */\n open?: boolean\n /** Fires with the next open state. */\n onOpenChange?: (open: boolean) => void\n /** Clicking the trigger does nothing (no popover). */\n disabled?: boolean\n /** Panel width (px number or CSS width). Defaults to `300px`. */\n width?: number | string\n /** Class on the floating panel. */\n className?: string\n /** Style on the floating panel. */\n style?: CSSProperties\n /** The trigger — usually a `Button` / `IconButton`. Cloned to wire the click + ARIA. */\n children: ReactElement\n}\n\n/**\n * An **inline confirm** for quick, low-risk actions (a row's delete / archive) — a small anchored popover\n * with a question, an optional description and **Cancel** / **Confirm**, where a `RemoveDialog` modal\n * would be too heavy and a bare `onClick` too dangerous. Wraps its trigger (`children`), which it clones\n * to toggle the panel. Built on the shared `FloatingPanel` (portaled, flips, clamps to the viewport,\n * dismisses on outside click / `Escape` = cancel). A11y: `role=\"alertdialog\"` labelled by the title and\n * described by the description, focus trapped and **placed on Cancel** (never the destructive button —\n * the `RemoveDialog` rule), focus returns to the trigger. An async `onConfirm` shows a loading confirm\n * button (Cancel + dismiss locked meanwhile), closes on success, stays open on failure. The icon sits in a\n * tinted box, the buttons (`sm`; confirm `contained` in `color`, default `error`) in a Card-style footer. Use `RemoveDialog` for high-risk, context-heavy deletes.\n */\nexport function Popconfirm({\n title,\n description,\n onConfirm,\n onCancel,\n confirmLabel,\n cancelLabel,\n color = 'error',\n icon = 'Danger',\n align = 'start',\n open,\n onOpenChange,\n disabled = false,\n width = 300,\n className,\n style,\n children,\n}: PopconfirmProps) {\n const t = useT()\n const id = useId()\n const panelId = `${id}-panel`\n const titleId = `${id}-title`\n const descId = `${id}-desc`\n const triggerRef = useRef<HTMLElement | null>(null)\n const cancelRef = useRef<HTMLButtonElement | null>(null)\n const [busy, setBusy] = useState(false)\n\n const isControlled = open !== undefined\n const [internalOpen, setInternalOpen] = useState(false)\n const isOpen = isControlled ? open : internalOpen\n const setOpen = (next: boolean) => {\n if (!isControlled) setInternalOpen(next)\n onOpenChange?.(next)\n }\n\n // focus Cancel once the panel is positioned + visible (a hidden element can't take focus)\n useEffect(() => {\n if (!isOpen) return\n const raf = requestAnimationFrame(() => cancelRef.current?.focus())\n return () => cancelAnimationFrame(raf)\n }, [isOpen])\n\n const close = (refocus: boolean) => {\n setOpen(false)\n if (refocus) triggerRef.current?.focus()\n }\n\n const cancel = (refocus = true) => {\n if (busy) return\n onCancel?.()\n close(refocus)\n }\n\n const confirm = async () => {\n const result = onConfirm()\n // any thenable counts as async (not just native Promises)\n if (!result || typeof (result as PromiseLike<unknown>).then !== 'function') {\n close(true)\n return\n }\n setBusy(true)\n try {\n await result\n setBusy(false)\n close(true)\n } catch {\n // stays open so the user can retry or cancel; surfacing the error (a toast) is the consumer's job\n setBusy(false)\n }\n }\n\n const triggerProps = children.props as {\n onClick?: (event: ReactMouseEvent) => void\n ref?: Ref<HTMLElement>\n }\n const originalRef = triggerProps.ref\n const trigger = cloneElement(children as ReactElement<Record<string, unknown>>, {\n ref: (node: HTMLElement | null) => {\n triggerRef.current = node\n if (typeof originalRef === 'function') originalRef(node)\n else if (originalRef) (originalRef as { current: HTMLElement | null }).current = node\n },\n onClick: (event: ReactMouseEvent) => {\n triggerProps.onClick?.(event)\n if (disabled || busy) return\n if (isOpen) cancel(false)\n else setOpen(true)\n },\n 'aria-haspopup': 'dialog',\n 'aria-expanded': isOpen,\n 'aria-controls': isOpen ? panelId : undefined,\n })\n\n const renderedIcon =\n icon === false ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} />\n ) : (\n icon\n )\n\n return (\n <>\n {trigger}\n <FloatingPanel\n open={isOpen}\n triggerRef={triggerRef}\n align={align}\n onClose={(refocus) => cancel(refocus)}\n id={panelId}\n role=\"alertdialog\"\n ariaLabelledBy={titleId}\n ariaDescribedBy={description != null ? descId : undefined}\n trapFocus\n width={width}\n className={clsx(styles.popconfirm, className)}\n style={{ '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`, ...style } as CSSProperties}\n >\n <div className={styles.body}>\n {renderedIcon != null && (\n <span className={styles.icon} aria-hidden=\"true\">\n {renderedIcon}\n </span>\n )}\n <div className={styles.text}>\n <div id={titleId} className={styles.title}>\n {title}\n </div>\n {description != null && (\n <div id={descId} className={styles.description}>\n {description}\n </div>\n )}\n </div>\n </div>\n <div className={styles.footer}>\n <Button ref={cancelRef} variant=\"text\" size=\"sm\" onClick={() => cancel()} disabled={busy}>\n {cancelLabel ?? t('common.cancel')}\n </Button>\n <Button variant=\"contained\" color={color} size=\"sm\" loading={busy} onClick={confirm}>\n {confirmLabel ?? t('common.confirm')}\n </Button>\n </div>\n </FloatingPanel>\n </>\n )\n}\n"],"names":["ICON_NAME_SET","ICON_NAMES","Popconfirm","title","description","onConfirm","onCancel","confirmLabel","cancelLabel","color","icon","align","open","onOpenChange","disabled","width","className","style","children","t","useT","id","useId","panelId","titleId","descId","triggerRef","useRef","cancelRef","busy","setBusy","useState","isControlled","internalOpen","setInternalOpen","isOpen","setOpen","next","useEffect","raf","_a","close","refocus","cancel","confirm","result","triggerProps","originalRef","trigger","cloneElement","node","event","renderedIcon","jsx","Icon","jsxs","Fragment","FloatingPanel","clsx","styles","Button"],"mappings":"ycAqBMA,GAAgB,IAAI,IAAYC,YAAU,EAoDzC,SAASC,GAAW,CACzB,MAAAC,EACA,YAAAC,EACA,UAAAC,EACA,SAAAC,EACA,aAAAC,EACA,YAAAC,EACA,MAAAC,EAAQ,QACR,KAAAC,EAAO,SACP,MAAAC,EAAQ,QACR,KAAAC,EACA,aAAAC,EACA,SAAAC,EAAW,GACX,MAAAC,EAAQ,IACR,UAAAC,EACA,MAAAC,EACA,SAAAC,CACF,EAAoB,CAClB,MAAMC,EAAIC,EAAAA,KAAA,EACJC,EAAKC,EAAAA,MAAA,EACLC,EAAU,GAAGF,CAAE,SACfG,EAAU,GAAGH,CAAE,SACfI,EAAS,GAAGJ,CAAE,QACdK,EAAaC,EAAAA,OAA2B,IAAI,EAC5CC,EAAYD,EAAAA,OAAiC,IAAI,EACjD,CAACE,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAK,EAEhCC,EAAepB,IAAS,OACxB,CAACqB,EAAcC,CAAe,EAAIH,EAAAA,SAAS,EAAK,EAChDI,EAASH,EAAepB,EAAOqB,EAC/BG,EAAWC,GAAkB,CAC5BL,GAAcE,EAAgBG,CAAI,EACvCxB,GAAA,MAAAA,EAAewB,EACjB,EAGAC,EAAAA,UAAU,IAAM,CACd,GAAI,CAACH,EAAQ,OACb,MAAMI,EAAM,sBAAsB,IAAA,OAAM,OAAAC,EAAAZ,EAAU,UAAV,YAAAY,EAAmB,QA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K,cACL,eAAgBC,EAChB,gBAAiBpB,GAAe,KAAOqB,EAAS,OAChD,UAAS,GACT,MAAAV,EACA,UAAW2C,EAAAA,KAAKC,EAAO,WAAY3C,CAAS,EAC5C,MAAO,CAAE,eAAgB,kBAAkBP,CAAK,QAAS,GAAGQ,CAAA,EAE5D,SAAA,CAAAsC,EAAAA,KAAC,MAAA,CAAI,UAAWI,EAAO,KACpB,SAAA,CAAAP,GAAgB,YACd,OAAA,CAAK,UAAWO,EAAO,KAAM,cAAY,OACvC,SAAAP,CAAA,CACH,EAEFG,EAAAA,KAAC,MAAA,CAAI,UAAWI,EAAO,KACrB,SAAA,CAAAN,MAAC,OAAI,GAAI7B,EAAS,UAAWmC,EAAO,MACjC,SAAAxD,EACH,EACCC,GAAe,MACdiD,MAAC,MAAA,CAAI,GAAI5B,EAAQ,UAAWkC,EAAO,YAChC,SAAAvD,CAAA,CACH,CAAA,CAAA,CAEJ,CAAA,EACF,EACAmD,EAAAA,KAAC,MAAA,CAAI,UAAWI,EAAO,OACrB,SAAA,CAAAN,MAACO,EAAAA,QAAO,IAAKhC,EAAW,QAAQ,OAAO,KAAK,KAAK,QAAS,IAAMe,EAAA,EAAU,SAAUd,EACjF,SAAArB,GAAeW,EAAE,eAAe,EACnC,EACAkC,EAAAA,IAACO,EAAAA,OAAA,CAAO,QAAQ,YAAY,MAAAnD,EAAc,KAAK,KAAK,QAASoB,EAAM,QAASe,EACzE,SAAArC,GAAgBY,EAAE,gBAAgB,CAAA,CACrC,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,CACF,EACF,CAEJ"}
|
|
1
|
+
{"version":3,"file":"Popconfirm-BKzJ_EZy.cjs","sources":["../src/components/Popconfirm/Popconfirm.tsx"],"sourcesContent":["import {\n cloneElement,\n useEffect,\n useId,\n useRef,\n useState,\n type CSSProperties,\n type MouseEvent as ReactMouseEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { Button } from '../Button'\nimport { FloatingPanel } from '../FloatingPanel/FloatingPanel'\nimport { Icon } from '../Icon'\nimport type { PopoverAlign } from '../Popover'\nimport styles from './Popconfirm.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface PopconfirmProps {\n /** The question — \"Delete this item?\". Labels the dialog. */\n title: ReactNode\n /** Optional muted line under the title (the consequence). Describes the dialog. */\n description?: ReactNode\n /**\n * Runs on confirm. Return a Promise to keep the popover open with the confirm button **loading** until\n * it settles — it closes on success and **stays open on rejection** (show your own toast).\n */\n // `unknown` (not `void | Promise`) so `() => toast.success(…)` — which returns an id — still fits\n onConfirm: () => unknown\n /** Runs on Cancel, `Escape` or an outside click. */\n onCancel?: () => void\n /** Confirm button label. Defaults to the localized \"Confirm\". */\n confirmLabel?: ReactNode\n /** Cancel button label. Defaults to the localized \"Cancel\". */\n cancelLabel?: ReactNode\n /** Tints the confirm button and the icon. Defaults to `error` (a destructive action). */\n color?: ThemeColor\n /** Leading icon — a known `IconName`, any node, or `false`. Defaults to `Danger` in the `color`. */\n icon?: IconName | ReactNode | false\n /** Horizontal alignment to the trigger (`start` default, `end` for a trigger near the right edge). */\n align?: PopoverAlign\n /** Controlled open state. */\n open?: boolean\n /** Fires with the next open state. */\n onOpenChange?: (open: boolean) => void\n /** Clicking the trigger does nothing (no popover). */\n disabled?: boolean\n /** Panel width (px number or CSS width). Defaults to `300px`. */\n width?: number | string\n /** Class on the floating panel. */\n className?: string\n /** Style on the floating panel. */\n style?: CSSProperties\n /** The trigger — usually a `Button` / `IconButton`. Cloned to wire the click + ARIA. */\n children: ReactElement\n}\n\n/**\n * An **inline confirm** for quick, low-risk actions (a row's delete / archive) — a small anchored popover\n * with a question, an optional description and **Cancel** / **Confirm**, where a `RemoveDialog` modal\n * would be too heavy and a bare `onClick` too dangerous. Wraps its trigger (`children`), which it clones\n * to toggle the panel. Built on the shared `FloatingPanel` (portaled, flips, clamps to the viewport,\n * dismisses on outside click / `Escape` = cancel). A11y: `role=\"alertdialog\"` labelled by the title and\n * described by the description, focus trapped and **placed on Cancel** (never the destructive button —\n * the `RemoveDialog` rule), focus returns to the trigger. An async `onConfirm` shows a loading confirm\n * button (Cancel + dismiss locked meanwhile), closes on success, stays open on failure. The icon sits in a\n * tinted box, the buttons (`sm`; confirm `contained` in `color`, default `error`) in a Card-style footer. Use `RemoveDialog` for high-risk, context-heavy deletes.\n */\nexport function Popconfirm({\n title,\n description,\n onConfirm,\n onCancel,\n confirmLabel,\n cancelLabel,\n color = 'error',\n icon = 'Danger',\n align = 'start',\n open,\n onOpenChange,\n disabled = false,\n width = 300,\n className,\n style,\n children,\n}: PopconfirmProps) {\n const t = useT()\n const id = useId()\n const panelId = `${id}-panel`\n const titleId = `${id}-title`\n const descId = `${id}-desc`\n const triggerRef = useRef<HTMLElement | null>(null)\n const cancelRef = useRef<HTMLButtonElement | null>(null)\n const [busy, setBusy] = useState(false)\n\n const isControlled = open !== undefined\n const [internalOpen, setInternalOpen] = useState(false)\n const isOpen = isControlled ? open : internalOpen\n const setOpen = (next: boolean) => {\n if (!isControlled) setInternalOpen(next)\n onOpenChange?.(next)\n }\n\n // focus Cancel once the panel is positioned + visible (a hidden element can't take focus)\n useEffect(() => {\n if (!isOpen) return\n const raf = requestAnimationFrame(() => cancelRef.current?.focus())\n return () => cancelAnimationFrame(raf)\n }, [isOpen])\n\n const close = (refocus: boolean) => {\n setOpen(false)\n if (refocus) triggerRef.current?.focus()\n }\n\n const cancel = (refocus = true) => {\n if (busy) return\n onCancel?.()\n close(refocus)\n }\n\n const confirm = async () => {\n const result = onConfirm()\n // any thenable counts as async (not just native Promises)\n if (!result || typeof (result as PromiseLike<unknown>).then !== 'function') {\n close(true)\n return\n }\n setBusy(true)\n try {\n await result\n setBusy(false)\n close(true)\n } catch {\n // stays open so the user can retry or cancel; surfacing the error (a toast) is the consumer's job\n setBusy(false)\n }\n }\n\n const triggerProps = children.props as {\n onClick?: (event: ReactMouseEvent) => void\n ref?: Ref<HTMLElement>\n }\n const originalRef = triggerProps.ref\n const trigger = cloneElement(children as ReactElement<Record<string, unknown>>, {\n ref: (node: HTMLElement | null) => {\n triggerRef.current = node\n if (typeof originalRef === 'function') originalRef(node)\n else if (originalRef) (originalRef as { current: HTMLElement | null }).current = node\n },\n onClick: (event: ReactMouseEvent) => {\n triggerProps.onClick?.(event)\n if (disabled || busy) return\n if (isOpen) cancel(false)\n else setOpen(true)\n },\n 'aria-haspopup': 'dialog',\n 'aria-expanded': isOpen,\n 'aria-controls': isOpen ? panelId : undefined,\n })\n\n const renderedIcon =\n icon === false ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} />\n ) : (\n icon\n )\n\n return (\n <>\n {trigger}\n <FloatingPanel\n open={isOpen}\n triggerRef={triggerRef}\n align={align}\n onClose={(refocus) => cancel(refocus)}\n id={panelId}\n role=\"alertdialog\"\n ariaLabelledBy={titleId}\n ariaDescribedBy={description != null ? descId : undefined}\n trapFocus\n width={width}\n className={clsx(styles.popconfirm, className)}\n style={{ '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`, ...style } as CSSProperties}\n >\n <div className={styles.body}>\n {renderedIcon != null && (\n <span className={styles.icon} aria-hidden=\"true\">\n {renderedIcon}\n </span>\n )}\n <div className={styles.text}>\n <div id={titleId} className={styles.title}>\n {title}\n </div>\n {description != null && (\n <div id={descId} className={styles.description}>\n {description}\n </div>\n )}\n </div>\n </div>\n <div className={styles.footer}>\n <Button ref={cancelRef} variant=\"text\" size=\"sm\" onClick={() => cancel()} disabled={busy}>\n {cancelLabel ?? t('common.cancel')}\n </Button>\n <Button variant=\"contained\" color={color} size=\"sm\" loading={busy} onClick={confirm}>\n {confirmLabel ?? t('common.confirm')}\n </Button>\n </div>\n </FloatingPanel>\n </>\n )\n}\n"],"names":["ICON_NAME_SET","ICON_NAMES","Popconfirm","title","description","onConfirm","onCancel","confirmLabel","cancelLabel","color","icon","align","open","onOpenChange","disabled","width","className","style","children","t","useT","id","useId","panelId","titleId","descId","triggerRef","useRef","cancelRef","busy","setBusy","useState","isControlled","internalOpen","setInternalOpen","isOpen","setOpen","next","useEffect","raf","_a","close","refocus","cancel","confirm","result","triggerProps","originalRef","trigger","cloneElement","node","event","renderedIcon","jsx","Icon","jsxs","Fragment","FloatingPanel","clsx","styles","Button"],"mappings":"ycAqBMA,GAAgB,IAAI,IAAYC,YAAU,EAoDzC,SAASC,GAAW,CACzB,MAAAC,EACA,YAAAC,EACA,UAAAC,EACA,SAAAC,EACA,aAAAC,EACA,YAAAC,EACA,MAAAC,EAAQ,QACR,KAAAC,EAAO,SACP,MAAAC,EAAQ,QACR,KAAAC,EACA,aAAAC,EACA,SAAAC,EAAW,GACX,MAAAC,EAAQ,IACR,UAAAC,EACA,MAAAC,EACA,SAAAC,CACF,EAAoB,CAClB,MAAMC,EAAIC,EAAAA,KAAA,EACJC,EAAKC,EAAAA,MAAA,EACLC,EAAU,GAAGF,CAAE,SACfG,EAAU,GAAGH,CAAE,SACfI,EAAS,GAAGJ,CAAE,QACdK,EAAaC,EAAAA,OAA2B,IAAI,EAC5CC,EAAYD,EAAAA,OAAiC,IAAI,EACjD,CAACE,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAK,EAEhCC,EAAepB,IAAS,OACxB,CAACqB,EAAcC,CAAe,EAAIH,EAAAA,SAAS,EAAK,EAChDI,EAASH,EAAepB,EAAOqB,EAC/BG,EAAWC,GAAkB,CAC5BL,GAAcE,EAAgBG,CAAI,EACvCxB,GAAA,MAAAA,EAAewB,EACjB,EAGAC,EAAAA,UAAU,IAAM,CACd,GAAI,CAACH,EAAQ,OACb,MAAMI,EAAM,sBAAsB,IAAA,OAAM,OAAAC,EAAAZ,EAAU,UAAV,YAAAY,EAAmB,QAAO,EAClE,MAAO,IAAM,qBAAqBD,CAAG,CACvC,EAAG,CAACJ,CAAM,CAAC,EAEX,MAAMM,EAAS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W2C,EAAAA,KAAKC,EAAO,WAAY3C,CAAS,EAC5C,MAAO,CAAE,eAAgB,kBAAkBP,CAAK,QAAS,GAAGQ,CAAA,EAE5D,SAAA,CAAAsC,EAAAA,KAAC,MAAA,CAAI,UAAWI,EAAO,KACpB,SAAA,CAAAP,GAAgB,YACd,OAAA,CAAK,UAAWO,EAAO,KAAM,cAAY,OACvC,SAAAP,CAAA,CACH,EAEFG,EAAAA,KAAC,MAAA,CAAI,UAAWI,EAAO,KACrB,SAAA,CAAAN,MAAC,OAAI,GAAI7B,EAAS,UAAWmC,EAAO,MACjC,SAAAxD,EACH,EACCC,GAAe,MACdiD,MAAC,MAAA,CAAI,GAAI5B,EAAQ,UAAWkC,EAAO,YAChC,SAAAvD,CAAA,CACH,CAAA,CAAA,CAEJ,CAAA,EACF,EACAmD,EAAAA,KAAC,MAAA,CAAI,UAAWI,EAAO,OACrB,SAAA,CAAAN,MAACO,EAAAA,QAAO,IAAKhC,EAAW,QAAQ,OAAO,KAAK,KAAK,QAAS,IAAMe,EAAA,EAAU,SAAUd,EACjF,SAAArB,GAAeW,EAAE,eAAe,EACnC,EACAkC,EAAAA,IAACO,EAAAA,OAAA,CAAO,QAAQ,YAAY,MAAAnD,EAAc,KAAK,KAAK,QAASoB,EAAM,QAASe,EACzE,SAAArC,GAAgBY,EAAE,gBAAgB,CAAA,CACrC,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,CACF,EACF,CAEJ"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as o, jsxs as i, Fragment as J } from "react/jsx-runtime";
|
|
2
2
|
import { useId as K, useRef as A, useState as R, useEffect as Q, cloneElement as U } from "react";
|
|
3
3
|
import { clsx as V } from "clsx";
|
|
4
|
-
import { b as W, a as X } from "./Icon-
|
|
5
|
-
import { B as S } from "./Button-
|
|
4
|
+
import { b as W, a as X } from "./Icon-B7DJn8Tw.js";
|
|
5
|
+
import { B as S } from "./Button-C415LPw_.js";
|
|
6
6
|
import { F as Y } from "./FloatingPanel-C5c_eMQ0.js";
|
|
7
|
-
import { a as Z } from "./ConfigProvider-
|
|
7
|
+
import { a as Z } from "./ConfigProvider-DVDGtCUc.js";
|
|
8
8
|
const tt = "_popconfirm_ztpne_5", et = "_body_ztpne_12", nt = "_icon_ztpne_21", rt = "_text_ztpne_33", ot = "_title_ztpne_43", st = "_description_ztpne_50", it = "_footer_ztpne_58", n = {
|
|
9
9
|
popconfirm: tt,
|
|
10
10
|
body: et,
|
|
@@ -109,4 +109,4 @@ function _t({
|
|
|
109
109
|
export {
|
|
110
110
|
_t as P
|
|
111
111
|
};
|
|
112
|
-
//# sourceMappingURL=Popconfirm-
|
|
112
|
+
//# sourceMappingURL=Popconfirm-aCyniPnH.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popconfirm-DIlygJY8.js","sources":["../src/components/Popconfirm/Popconfirm.tsx"],"sourcesContent":["import {\n cloneElement,\n useEffect,\n useId,\n useRef,\n useState,\n type CSSProperties,\n type MouseEvent as ReactMouseEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { Button } from '../Button'\nimport { FloatingPanel } from '../FloatingPanel/FloatingPanel'\nimport { Icon } from '../Icon'\nimport type { PopoverAlign } from '../Popover'\nimport styles from './Popconfirm.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface PopconfirmProps {\n /** The question — \"Delete this item?\". Labels the dialog. */\n title: ReactNode\n /** Optional muted line under the title (the consequence). Describes the dialog. */\n description?: ReactNode\n /**\n * Runs on confirm. Return a Promise to keep the popover open with the confirm button **loading** until\n * it settles — it closes on success and **stays open on rejection** (show your own toast).\n */\n // `unknown` (not `void | Promise`) so `() => toast.success(…)` — which returns an id — still fits\n onConfirm: () => unknown\n /** Runs on Cancel, `Escape` or an outside click. */\n onCancel?: () => void\n /** Confirm button label. Defaults to the localized \"Confirm\". */\n confirmLabel?: ReactNode\n /** Cancel button label. Defaults to the localized \"Cancel\". */\n cancelLabel?: ReactNode\n /** Tints the confirm button and the icon. Defaults to `error` (a destructive action). */\n color?: ThemeColor\n /** Leading icon — a known `IconName`, any node, or `false`. Defaults to `Danger` in the `color`. */\n icon?: IconName | ReactNode | false\n /** Horizontal alignment to the trigger (`start` default, `end` for a trigger near the right edge). */\n align?: PopoverAlign\n /** Controlled open state. */\n open?: boolean\n /** Fires with the next open state. */\n onOpenChange?: (open: boolean) => void\n /** Clicking the trigger does nothing (no popover). */\n disabled?: boolean\n /** Panel width (px number or CSS width). Defaults to `300px`. */\n width?: number | string\n /** Class on the floating panel. */\n className?: string\n /** Style on the floating panel. */\n style?: CSSProperties\n /** The trigger — usually a `Button` / `IconButton`. Cloned to wire the click + ARIA. */\n children: ReactElement\n}\n\n/**\n * An **inline confirm** for quick, low-risk actions (a row's delete / archive) — a small anchored popover\n * with a question, an optional description and **Cancel** / **Confirm**, where a `RemoveDialog` modal\n * would be too heavy and a bare `onClick` too dangerous. Wraps its trigger (`children`), which it clones\n * to toggle the panel. Built on the shared `FloatingPanel` (portaled, flips, clamps to the viewport,\n * dismisses on outside click / `Escape` = cancel). A11y: `role=\"alertdialog\"` labelled by the title and\n * described by the description, focus trapped and **placed on Cancel** (never the destructive button —\n * the `RemoveDialog` rule), focus returns to the trigger. An async `onConfirm` shows a loading confirm\n * button (Cancel + dismiss locked meanwhile), closes on success, stays open on failure. The icon sits in a\n * tinted box, the buttons (`sm`; confirm `contained` in `color`, default `error`) in a Card-style footer. Use `RemoveDialog` for high-risk, context-heavy deletes.\n */\nexport function Popconfirm({\n title,\n description,\n onConfirm,\n onCancel,\n confirmLabel,\n cancelLabel,\n color = 'error',\n icon = 'Danger',\n align = 'start',\n open,\n onOpenChange,\n disabled = false,\n width = 300,\n className,\n style,\n children,\n}: PopconfirmProps) {\n const t = useT()\n const id = useId()\n const panelId = `${id}-panel`\n const titleId = `${id}-title`\n const descId = `${id}-desc`\n const triggerRef = useRef<HTMLElement | null>(null)\n const cancelRef = useRef<HTMLButtonElement | null>(null)\n const [busy, setBusy] = useState(false)\n\n const isControlled = open !== undefined\n const [internalOpen, setInternalOpen] = useState(false)\n const isOpen = isControlled ? open : internalOpen\n const setOpen = (next: boolean) => {\n if (!isControlled) setInternalOpen(next)\n onOpenChange?.(next)\n }\n\n // focus Cancel once the panel is positioned + visible (a hidden element can't take focus)\n useEffect(() => {\n if (!isOpen) return\n const raf = requestAnimationFrame(() => cancelRef.current?.focus())\n return () => cancelAnimationFrame(raf)\n }, [isOpen])\n\n const close = (refocus: boolean) => {\n setOpen(false)\n if (refocus) triggerRef.current?.focus()\n }\n\n const cancel = (refocus = true) => {\n if (busy) return\n onCancel?.()\n close(refocus)\n }\n\n const confirm = async () => {\n const result = onConfirm()\n // any thenable counts as async (not just native Promises)\n if (!result || typeof (result as PromiseLike<unknown>).then !== 'function') {\n close(true)\n return\n }\n setBusy(true)\n try {\n await result\n setBusy(false)\n close(true)\n } catch {\n // stays open so the user can retry or cancel; surfacing the error (a toast) is the consumer's job\n setBusy(false)\n }\n }\n\n const triggerProps = children.props as {\n onClick?: (event: ReactMouseEvent) => void\n ref?: Ref<HTMLElement>\n }\n const originalRef = triggerProps.ref\n const trigger = cloneElement(children as ReactElement<Record<string, unknown>>, {\n ref: (node: HTMLElement | null) => {\n triggerRef.current = node\n if (typeof originalRef === 'function') originalRef(node)\n else if (originalRef) (originalRef as { current: HTMLElement | null }).current = node\n },\n onClick: (event: ReactMouseEvent) => {\n triggerProps.onClick?.(event)\n if (disabled || busy) return\n if (isOpen) cancel(false)\n else setOpen(true)\n },\n 'aria-haspopup': 'dialog',\n 'aria-expanded': isOpen,\n 'aria-controls': isOpen ? panelId : undefined,\n })\n\n const renderedIcon =\n icon === false ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} />\n ) : (\n icon\n )\n\n return (\n <>\n {trigger}\n <FloatingPanel\n open={isOpen}\n triggerRef={triggerRef}\n align={align}\n onClose={(refocus) => cancel(refocus)}\n id={panelId}\n role=\"alertdialog\"\n ariaLabelledBy={titleId}\n ariaDescribedBy={description != null ? descId : undefined}\n trapFocus\n width={width}\n className={clsx(styles.popconfirm, className)}\n style={{ '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`, ...style } as CSSProperties}\n >\n <div className={styles.body}>\n {renderedIcon != null && (\n <span className={styles.icon} aria-hidden=\"true\">\n {renderedIcon}\n </span>\n )}\n <div className={styles.text}>\n <div id={titleId} className={styles.title}>\n {title}\n </div>\n {description != null && (\n <div id={descId} className={styles.description}>\n {description}\n </div>\n )}\n </div>\n </div>\n <div className={styles.footer}>\n <Button ref={cancelRef} variant=\"text\" size=\"sm\" onClick={() => cancel()} disabled={busy}>\n {cancelLabel ?? t('common.cancel')}\n </Button>\n <Button variant=\"contained\" color={color} size=\"sm\" loading={busy} onClick={confirm}>\n {confirmLabel ?? t('common.confirm')}\n </Button>\n </div>\n </FloatingPanel>\n </>\n )\n}\n"],"names":["ICON_NAME_SET","ICON_NAMES","Popconfirm","title","description","onConfirm","onCancel","confirmLabel","cancelLabel","color","icon","align","open","onOpenChange","disabled","width","className","style","children","t","useT","id","useId","panelId","titleId","descId","triggerRef","useRef","cancelRef","busy","setBusy","useState","isControlled","internalOpen","setInternalOpen","isOpen","setOpen","next","useEffect","raf","_a","close","refocus","cancel","confirm","result","triggerProps","originalRef","trigger","cloneElement","node","event","renderedIcon","jsx","Icon","jsxs","Fragment","FloatingPanel","clsx","styles","Button"],"mappings":";;;;;;;;;;;;;;;GAqBMA,KAAgB,IAAI,IAAYC,CAAU;AAoDzC,SAASC,GAAW;AAAA,EACzB,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,MAAAC,IAAO;AAAA,E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AAA,YAAAP,KAAgB,0BACd,QAAA,EAAK,WAAWO,EAAO,MAAM,eAAY,QACvC,UAAAP,EAAA,CACH;AAAA,YAEF,gBAAAG,EAAC,OAAA,EAAI,WAAWI,EAAO,MACrB,UAAA;AAAA,cAAA,gBAAAN,EAAC,SAAI,IAAI7B,GAAS,WAAWmC,EAAO,OACjC,UAAAxD,GACH;AAAA,cACCC,KAAe,QACd,gBAAAiD,EAAC,OAAA,EAAI,IAAI5B,GAAQ,WAAWkC,EAAO,aAChC,UAAAvD,EAAA,CACH;AAAA,YAAA,EAAA,CAEJ;AAAA,UAAA,GACF;AAAA,UACA,gBAAAmD,EAAC,OAAA,EAAI,WAAWI,EAAO,QACrB,UAAA;AAAA,YAAA,gBAAAN,EAACO,KAAO,KAAKhC,GAAW,SAAQ,QAAO,MAAK,MAAK,SAAS,MAAMe,EAAA,GAAU,UAAUd,GACjF,UAAArB,KAAeW,EAAE,eAAe,GACnC;AAAA,YACA,gBAAAkC,EAACO,GAAA,EAAO,SAAQ,aAAY,OAAAnD,GAAc,MAAK,MAAK,SAASoB,GAAM,SAASe,GACzE,UAAArC,KAAgBY,EAAE,gBAAgB,EAAA,CACrC;AAAA,UAAA,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"Popconfirm-aCyniPnH.js","sources":["../src/components/Popconfirm/Popconfirm.tsx"],"sourcesContent":["import {\n cloneElement,\n useEffect,\n useId,\n useRef,\n useState,\n type CSSProperties,\n type MouseEvent as ReactMouseEvent,\n type ReactElement,\n type ReactNode,\n type Ref,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { Button } from '../Button'\nimport { FloatingPanel } from '../FloatingPanel/FloatingPanel'\nimport { Icon } from '../Icon'\nimport type { PopoverAlign } from '../Popover'\nimport styles from './Popconfirm.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface PopconfirmProps {\n /** The question — \"Delete this item?\". Labels the dialog. */\n title: ReactNode\n /** Optional muted line under the title (the consequence). Describes the dialog. */\n description?: ReactNode\n /**\n * Runs on confirm. Return a Promise to keep the popover open with the confirm button **loading** until\n * it settles — it closes on success and **stays open on rejection** (show your own toast).\n */\n // `unknown` (not `void | Promise`) so `() => toast.success(…)` — which returns an id — still fits\n onConfirm: () => unknown\n /** Runs on Cancel, `Escape` or an outside click. */\n onCancel?: () => void\n /** Confirm button label. Defaults to the localized \"Confirm\". */\n confirmLabel?: ReactNode\n /** Cancel button label. Defaults to the localized \"Cancel\". */\n cancelLabel?: ReactNode\n /** Tints the confirm button and the icon. Defaults to `error` (a destructive action). */\n color?: ThemeColor\n /** Leading icon — a known `IconName`, any node, or `false`. Defaults to `Danger` in the `color`. */\n icon?: IconName | ReactNode | false\n /** Horizontal alignment to the trigger (`start` default, `end` for a trigger near the right edge). */\n align?: PopoverAlign\n /** Controlled open state. */\n open?: boolean\n /** Fires with the next open state. */\n onOpenChange?: (open: boolean) => void\n /** Clicking the trigger does nothing (no popover). */\n disabled?: boolean\n /** Panel width (px number or CSS width). Defaults to `300px`. */\n width?: number | string\n /** Class on the floating panel. */\n className?: string\n /** Style on the floating panel. */\n style?: CSSProperties\n /** The trigger — usually a `Button` / `IconButton`. Cloned to wire the click + ARIA. */\n children: ReactElement\n}\n\n/**\n * An **inline confirm** for quick, low-risk actions (a row's delete / archive) — a small anchored popover\n * with a question, an optional description and **Cancel** / **Confirm**, where a `RemoveDialog` modal\n * would be too heavy and a bare `onClick` too dangerous. Wraps its trigger (`children`), which it clones\n * to toggle the panel. Built on the shared `FloatingPanel` (portaled, flips, clamps to the viewport,\n * dismisses on outside click / `Escape` = cancel). A11y: `role=\"alertdialog\"` labelled by the title and\n * described by the description, focus trapped and **placed on Cancel** (never the destructive button —\n * the `RemoveDialog` rule), focus returns to the trigger. An async `onConfirm` shows a loading confirm\n * button (Cancel + dismiss locked meanwhile), closes on success, stays open on failure. The icon sits in a\n * tinted box, the buttons (`sm`; confirm `contained` in `color`, default `error`) in a Card-style footer. Use `RemoveDialog` for high-risk, context-heavy deletes.\n */\nexport function Popconfirm({\n title,\n description,\n onConfirm,\n onCancel,\n confirmLabel,\n cancelLabel,\n color = 'error',\n icon = 'Danger',\n align = 'start',\n open,\n onOpenChange,\n disabled = false,\n width = 300,\n className,\n style,\n children,\n}: PopconfirmProps) {\n const t = useT()\n const id = useId()\n const panelId = `${id}-panel`\n const titleId = `${id}-title`\n const descId = `${id}-desc`\n const triggerRef = useRef<HTMLElement | null>(null)\n const cancelRef = useRef<HTMLButtonElement | null>(null)\n const [busy, setBusy] = useState(false)\n\n const isControlled = open !== undefined\n const [internalOpen, setInternalOpen] = useState(false)\n const isOpen = isControlled ? open : internalOpen\n const setOpen = (next: boolean) => {\n if (!isControlled) setInternalOpen(next)\n onOpenChange?.(next)\n }\n\n // focus Cancel once the panel is positioned + visible (a hidden element can't take focus)\n useEffect(() => {\n if (!isOpen) return\n const raf = requestAnimationFrame(() => cancelRef.current?.focus())\n return () => cancelAnimationFrame(raf)\n }, [isOpen])\n\n const close = (refocus: boolean) => {\n setOpen(false)\n if (refocus) triggerRef.current?.focus()\n }\n\n const cancel = (refocus = true) => {\n if (busy) return\n onCancel?.()\n close(refocus)\n }\n\n const confirm = async () => {\n const result = onConfirm()\n // any thenable counts as async (not just native Promises)\n if (!result || typeof (result as PromiseLike<unknown>).then !== 'function') {\n close(true)\n return\n }\n setBusy(true)\n try {\n await result\n setBusy(false)\n close(true)\n } catch {\n // stays open so the user can retry or cancel; surfacing the error (a toast) is the consumer's job\n setBusy(false)\n }\n }\n\n const triggerProps = children.props as {\n onClick?: (event: ReactMouseEvent) => void\n ref?: Ref<HTMLElement>\n }\n const originalRef = triggerProps.ref\n const trigger = cloneElement(children as ReactElement<Record<string, unknown>>, {\n ref: (node: HTMLElement | null) => {\n triggerRef.current = node\n if (typeof originalRef === 'function') originalRef(node)\n else if (originalRef) (originalRef as { current: HTMLElement | null }).current = node\n },\n onClick: (event: ReactMouseEvent) => {\n triggerProps.onClick?.(event)\n if (disabled || busy) return\n if (isOpen) cancel(false)\n else setOpen(true)\n },\n 'aria-haspopup': 'dialog',\n 'aria-expanded': isOpen,\n 'aria-controls': isOpen ? panelId : undefined,\n })\n\n const renderedIcon =\n icon === false ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} />\n ) : (\n icon\n )\n\n return (\n <>\n {trigger}\n <FloatingPanel\n open={isOpen}\n triggerRef={triggerRef}\n align={align}\n onClose={(refocus) => cancel(refocus)}\n id={panelId}\n role=\"alertdialog\"\n ariaLabelledBy={titleId}\n ariaDescribedBy={description != null ? descId : undefined}\n trapFocus\n width={width}\n className={clsx(styles.popconfirm, className)}\n style={{ '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`, ...style } as CSSProperties}\n >\n <div className={styles.body}>\n {renderedIcon != null && (\n <span className={styles.icon} aria-hidden=\"true\">\n {renderedIcon}\n </span>\n )}\n <div className={styles.text}>\n <div id={titleId} className={styles.title}>\n {title}\n </div>\n {description != null && (\n <div id={descId} className={styles.description}>\n {description}\n </div>\n )}\n </div>\n </div>\n <div className={styles.footer}>\n <Button ref={cancelRef} variant=\"text\" size=\"sm\" onClick={() => cancel()} disabled={busy}>\n {cancelLabel ?? t('common.cancel')}\n </Button>\n <Button variant=\"contained\" color={color} size=\"sm\" loading={busy} onClick={confirm}>\n {confirmLabel ?? t('common.confirm')}\n </Button>\n </div>\n </FloatingPanel>\n </>\n )\n}\n"],"names":["ICON_NAME_SET","ICON_NAMES","Popconfirm","title","description","onConfirm","onCancel","confirmLabel","cancelLabel","color","icon","align","open","onOpenChange","disabled","width","className","style","children","t","useT","id","useId","panelId","titleId","descId","triggerRef","useRef","cancelRef","busy","setBusy","useState","isControlled","internalOpen","setInternalOpen","isOpen","setOpen","next","useEffect","raf","_a","close","refocus","cancel","confirm","result","triggerProps","originalRef","trigger","cloneElement","node","event","renderedIcon","jsx","Icon","jsxs","Fragment","FloatingPanel","clsx","styles","Button"],"mappings":";;;;;;;;;;;;;;;GAqBMA,KAAgB,IAAI,IAAYC,CAAU;AAoDzC,SAASC,GAAW;AAAA,EACzB,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,OAAAC,IAAQ;AAAA,EACR,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AACF,GAAoB;AAClB,QAAMC,IAAIC,EAAA,GACJC,IAAKC,EAAA,GACLC,IAAU,GAAGF,CAAE,UACfG,IAAU,GAAGH,CAAE,UACfI,IAAS,GAAGJ,CAAE,SACdK,IAAaC,EAA2B,IAAI,GAC5CC,IAAYD,EAAiC,IAAI,GACjD,CAACE,GAAMC,CAAO,IAAIC,EAAS,EAAK,GAEhCC,IAAepB,MAAS,QACxB,CAACqB,GAAcC,CAAe,IAAIH,EAAS,EAAK,GAChDI,IAASH,IAAepB,IAAOqB,GAC/BG,IAAU,CAACC,MAAkB;AACjC,IAAKL,KAAcE,EAAgBG,CAAI,GACvCxB,KAAA,QAAAA,EAAewB;AAAA,EACjB;AAGA,EAAAC,EAAU,MAAM;AACd,QAAI,CAACH,EAAQ;AACb,UAAMI,IAAM,sBAAsB,MAAA;;AAAM,cAAAC,IAAAZ,EAAU,YAAV,gBAAAY,EAAmB;AAAA,KAAO;AAClE,WAAO,MAAM,qBAAqBD,CAAG;AAAA,EACvC,GAAG,CAACJ,CAAM,CAAC;AAEX,QAAMM,IAAQ,CAACC,MAAqB;;AAClC,IAAAN,EAAQ,EAAK,GACTM,OAASF,IAAAd,EAAW,YAAX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),h=require("./ConfigProvider-
|
|
2
|
-
//# sourceMappingURL=Progress-
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime"),w=require("react"),o=require("clsx"),h=require("./ConfigProvider-DBU6rOIA.cjs"),C="_root_1uzzo_4",I="_caption_1uzzo_11",L="_value_1uzzo_16",R="_linear_1uzzo_23",B="_sm_1uzzo_28",D="_md_1uzzo_31",S="_lg_1uzzo_34",A="_header_1uzzo_38",E="_track_1uzzo_45",G="_buffer_1uzzo_52",H="_fill_1uzzo_53",J="_striped_1uzzo_69",K="_animated_1uzzo_82",O="_indeterminate_1uzzo_95",Q="_circular_1uzzo_109",U="_ring_1uzzo_128",W="_svg_1uzzo_136",X="_ringTrack_1uzzo_144",Y="_ringFill_1uzzo_145",Z="_ringValue_1uzzo_159",nn="_spinning_1uzzo_165",n={root:C,caption:I,value:L,linear:R,sm:B,md:D,lg:S,header:A,track:E,buffer:G,fill:H,striped:J,animated:K,"pg-stripes":"_pg-stripes_1uzzo_1",indeterminate:O,"pg-sweep":"_pg-sweep_1uzzo_1",circular:Q,ring:U,svg:W,ringTrack:X,ringFill:Y,ringValue:Z,spinning:nn,"pg-spin":"_pg-spin_1uzzo_1"},T=(d,l,u)=>Math.min(u,Math.max(l,d)),rn=w.forwardRef(function({value:l,max:u=100,variant:$="linear",size:p="md",color:M="accent",label:c,showValue:_=!1,buffer:m,striped:P=!1,animated:v=!1,thresholds:i,className:x,style:q,...f},j){const y=h.useT(),g=w.useId(),s=l==null,t=u>0?u:100,z=s?0:T(l,0,t),a=z/t*100,N=m==null?void 0:T(m,0,t)/t*100,F=!s&&(i==null?void 0:i.error)!=null&&a>=i.error?"error":!s&&(i==null?void 0:i.warning)!=null&&a>=i.warning?"warning":M,e=s?void 0:typeof _=="function"?_(z,t):_?`${Math.round(a)}%`:void 0,V=s?y("common.loading"):typeof e=="string"?e:`${Math.round(a)}%`,b={role:"progressbar","aria-valuemin":0,"aria-valuemax":t,"aria-valuenow":s?void 0:z,"aria-valuetext":V,"aria-busy":s||void 0,...c!=null?{"aria-labelledby":g}:{"aria-label":y("progress.label")}},k={"--tz-btn-rgb":`var(--tz-color-${F}-rgb)`,...q};return $==="circular"?r.jsxs("div",{ref:j,className:o.clsx(n.root,n.circular,n[p],x),style:k,...f,children:[r.jsxs("div",{className:o.clsx(n.ring,s&&n.spinning),...b,children:[r.jsxs("svg",{viewBox:"0 0 36 36",className:n.svg,"aria-hidden":"true",children:[r.jsx("circle",{className:n.ringTrack,cx:"18",cy:"18",r:"15.5",pathLength:100}),r.jsx("circle",{className:n.ringFill,cx:"18",cy:"18",r:"15.5",pathLength:100,strokeDasharray:s?"28 72":`${a} ${100-a}`})]}),e!=null&&r.jsx("span",{className:n.ringValue,children:e})]}),c!=null&&r.jsx("span",{id:g,className:n.caption,children:c})]}):r.jsxs("div",{ref:j,className:o.clsx(n.root,n.linear,n[p],x),style:k,...f,children:[(c!=null||e!=null)&&r.jsxs("div",{className:n.header,children:[c!=null?r.jsx("span",{id:g,className:n.caption,children:c}):r.jsx("span",{}),e!=null&&r.jsx("span",{className:n.value,children:e})]}),r.jsxs("div",{className:o.clsx(n.track,s&&n.indeterminate),...b,children:[N!=null&&!s&&r.jsx("div",{className:n.buffer,style:{width:`${N}%`}}),r.jsx("div",{className:o.clsx(n.fill,(P||v)&&n.striped,v&&n.animated),style:s?void 0:{width:`${a}%`}})]})]})});exports.Progress=rn;
|
|
2
|
+
//# sourceMappingURL=Progress-DWOoLd8u.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress-DqvKmyQW.cjs","sources":["../src/components/Progress/Progress.tsx"],"sourcesContent":["import { forwardRef, useId, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport styles from './Progress.module.css'\n\nexport type ProgressVariant = 'linear' | 'circular'\nexport type ProgressSize = 'sm' | 'md' | 'lg'\n\n/** Percentages (0–100) at which the color switches automatically — quota UX. */\nexport interface ProgressThresholds {\n /** From this percentage on, the bar turns `warning`. */\n warning?: number\n /** From this percentage on, the bar turns `error`. */\n error?: number\n}\n\nexport interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {\n /** Current value, `0`–`max`. Omit it for an **indeterminate** progress (a moving bar / spinning arc). */\n value?: number\n /** The value that means \"done\". Defaults to `100`. */\n max?: number\n /** `linear` (default) — a bar; `circular` — a ring. */\n variant?: ProgressVariant\n /** Linear: bar thickness 4 / 6 / 8 px. Circular: ring 32 / 48 / 64 px. Defaults to `md`. */\n size?: ProgressSize\n /** Theme color of the fill. Defaults to `accent`. */\n color?: ThemeColor\n /** A caption — above the bar (left) for linear, under the ring for circular. Labels the progressbar. */\n label?: ReactNode\n /**\n * Show the value: `true` → the percentage (\"42%\"); a function → your own text, e.g.\n * `(v, max) => `${v} GB of ${max} GB``. Linear: right of the caption; circular: inside the ring.\n */\n showValue?: boolean | ((value: number, max: number) => ReactNode)\n /** A second, lighter bar behind the fill (buffered / pending amount), `0`–`max`. Linear only. */\n buffer?: number\n /** Diagonal stripes on the fill. Linear only. */\n striped?: boolean\n /** Animate the stripes (implies `striped`). Linear only. Off under `prefers-reduced-motion`. */\n animated?: boolean\n /** Switch the color automatically by percentage (e.g. `{ warning: 80, error: 95 }` for a quota). */\n thresholds?: ProgressThresholds\n}\n\nconst clamp = (n: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, n))\n\n/**\n * A progress indicator — **linear** (a bar) or **circular** (a ring) — for uploads, wizard steps, quotas and\n * background jobs. Determinate with `value` / `max`, or **indeterminate** without `value` (a moving bar / a\n * spinning arc). An optional caption (`label`) and value readout (`showValue` — the percentage or your own\n * formatter), a lighter `buffer` bar, `striped` / `animated` fills, and `thresholds` that turn the fill\n * `warning` / `error` as it fills up. Tinted by `color` through the shared `--tz-btn-rgb` pattern; the track is\n * `primary-shade200`, the bar is pill-rounded (so the global `square` shape flattens it). A11y:\n * `role=\"progressbar\"` with `aria-valuemin/max/now` + `aria-valuetext`, labelled by the caption (or a\n * localized \"Progress\"); indeterminate drops `aria-valuenow` and sets `aria-busy`. Motion stops under\n * `prefers-reduced-motion`. Token-only. `forwardRef` to the root `<div>`.\n */\nexport const Progress = forwardRef<HTMLDivElement, ProgressProps>(function Progress(\n {\n value,\n max = 100,\n variant = 'linear',\n size = 'md',\n color = 'accent',\n label,\n showValue = false,\n buffer,\n striped = false,\n animated = false,\n thresholds,\n className,\n style,\n ...props\n },\n ref,\n) {\n const t = useT()\n const labelId = useId()\n const indeterminate = value == null\n const safeMax = max > 0 ? max : 100\n const current = indeterminate ? 0 : clamp(value, 0, safeMax)\n const pct = (current / safeMax) * 100\n const bufferPct = buffer == null ? undefined : (clamp(buffer, 0, safeMax) / safeMax) * 100\n\n // quota UX: the fill turns warning / error as it crosses the thresholds (error wins)\n const resolvedColor: ThemeColor =\n !indeterminate && thresholds?.error != null && pct >= thresholds.error\n ? 'error'\n : !indeterminate && thresholds?.warning != null && pct >= thresholds.warning\n ? 'warning'\n : color\n\n const valueText = indeterminate\n ? undefined\n : typeof showValue === 'function'\n ? showValue(current, safeMax)\n : showValue\n ? `${Math.round(pct)}%`\n : undefined\n const ariaValueText = indeterminate\n ? t('common.loading')\n : typeof valueText === 'string'\n ? valueText\n : `${Math.round(pct)}%`\n\n const a11y = {\n role: 'progressbar',\n 'aria-valuemin': 0,\n 'aria-valuemax': safeMax,\n 'aria-valuenow': indeterminate ? undefined : current,\n 'aria-valuetext': ariaValueText,\n 'aria-busy': indeterminate || undefined,\n ...(label != null ? { 'aria-labelledby': labelId } : { 'aria-label': t('progress.label') }),\n } as const\n\n const rootStyle = {\n '--tz-btn-rgb': `var(--tz-color-${resolvedColor}-rgb)`,\n ...style,\n } as CSSProperties\n\n if (variant === 'circular') {\n // pathLength=100 makes the dash math a plain percentage\n return (\n <div\n ref={ref}\n className={clsx(styles.root, styles.circular, styles[size], className)}\n style={rootStyle}\n {...props}\n >\n <div className={clsx(styles.ring, indeterminate && styles.spinning)} {...a11y}>\n <svg viewBox=\"0 0 36 36\" className={styles.svg} aria-hidden=\"true\">\n <circle className={styles.ringTrack} cx=\"18\" cy=\"18\" r=\"15.5\" pathLength={100} />\n <circle\n className={styles.ringFill}\n cx=\"18\"\n cy=\"18\"\n r=\"15.5\"\n pathLength={100}\n strokeDasharray={indeterminate ? '28 72' : `${pct} ${100 - pct}`}\n />\n </svg>\n {valueText != null && <span className={styles.ringValue}>{valueText}</span>}\n </div>\n {label != null && (\n <span id={labelId} className={styles.caption}>\n {label}\n </span>\n )}\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n className={clsx(styles.root, styles.linear, styles[size], className)}\n style={rootStyle}\n {...props}\n >\n {(label != null || valueText != null) && (\n <div className={styles.header}>\n {label != null ? (\n <span id={labelId} className={styles.caption}>\n {label}\n </span>\n ) : (\n <span />\n )}\n {valueText != null && <span className={styles.value}>{valueText}</span>}\n </div>\n )}\n <div className={clsx(styles.track, indeterminate && styles.indeterminate)} {...a11y}>\n {bufferPct != null && !indeterminate && (\n <div className={styles.buffer} style={{ width: `${bufferPct}%` }} />\n )}\n <div\n className={clsx(\n styles.fill,\n (striped || animated) && styles.striped,\n animated && styles.animated,\n )}\n style={indeterminate ? undefined : { width: `${pct}%` }}\n />\n </div>\n </div>\n )\n})\n"],"names":["clamp","n","lo","hi","Progress","forwardRef","value","max","variant","size","color","label","showValue","buffer","striped","animated","thresholds","className","style","props","ref","t","useT","labelId","useId","indeterminate","safeMax","current","pct","bufferPct","resolvedColor","valueText","ariaValueText","a11y","rootStyle","jsxs","clsx","styles","jsx"],"mappings":"m2BA4CMA,EAAQ,CAACC,EAAWC,EAAYC,IAAe,KAAK,IAAIA,EAAI,KAAK,IAAID,EAAID,CAAC,CAAC,EAapEG,GAAWC,EAAAA,WAA0C,SAChE,CACE,MAAAC,EACA,IAAAC,EAAM,IACN,QAAAC,EAAU,SACV,KAAAC,EAAO,KACP,MAAAC,EAAQ,SACR,MAAAC,EACA,UAAAC,EAAY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AGJ,EAC5E,SAAA,CAAAJ,GAAa,MAAQ,CAACJ,GACrBa,EAAAA,IAAC,OAAI,UAAWD,EAAO,OAAQ,MAAO,CAAE,MAAO,GAAGR,CAAS,KAAO,EAEpES,EAAAA,IAAC,MAAA,CACC,UAAWF,EAAAA,KACTC,EAAO,MACNvB,GAAWC,IAAasB,EAAO,QAChCtB,GAAYsB,EAAO,QAAA,EAErB,MAAOZ,EAAgB,OAAY,CAAE,MAAO,GAAGG,CAAG,GAAA,CAAI,CAAA,CACxD,CAAA,CACF,CAAA,CAAA,CAAA,CAGN,CAAC"}
|
|
1
|
+
{"version":3,"file":"Progress-DWOoLd8u.cjs","sources":["../src/components/Progress/Progress.tsx"],"sourcesContent":["import { forwardRef, useId, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport styles from './Progress.module.css'\n\nexport type ProgressVariant = 'linear' | 'circular'\nexport type ProgressSize = 'sm' | 'md' | 'lg'\n\n/** Percentages (0–100) at which the color switches automatically — quota UX. */\nexport interface ProgressThresholds {\n /** From this percentage on, the bar turns `warning`. */\n warning?: number\n /** From this percentage on, the bar turns `error`. */\n error?: number\n}\n\nexport interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {\n /** Current value, `0`–`max`. Omit it for an **indeterminate** progress (a moving bar / spinning arc). */\n value?: number\n /** The value that means \"done\". Defaults to `100`. */\n max?: number\n /** `linear` (default) — a bar; `circular` — a ring. */\n variant?: ProgressVariant\n /** Linear: bar thickness 4 / 6 / 8 px. Circular: ring 32 / 48 / 64 px. Defaults to `md`. */\n size?: ProgressSize\n /** Theme color of the fill. Defaults to `accent`. */\n color?: ThemeColor\n /** A caption — above the bar (left) for linear, under the ring for circular. Labels the progressbar. */\n label?: ReactNode\n /**\n * Show the value: `true` → the percentage (\"42%\"); a function → your own text, e.g.\n * `(v, max) => `${v} GB of ${max} GB``. Linear: right of the caption; circular: inside the ring.\n */\n showValue?: boolean | ((value: number, max: number) => ReactNode)\n /** A second, lighter bar behind the fill (buffered / pending amount), `0`–`max`. Linear only. */\n buffer?: number\n /** Diagonal stripes on the fill. Linear only. */\n striped?: boolean\n /** Animate the stripes (implies `striped`). Linear only. Off under `prefers-reduced-motion`. */\n animated?: boolean\n /** Switch the color automatically by percentage (e.g. `{ warning: 80, error: 95 }` for a quota). */\n thresholds?: ProgressThresholds\n}\n\nconst clamp = (n: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, n))\n\n/**\n * A progress indicator — **linear** (a bar) or **circular** (a ring) — for uploads, wizard steps, quotas and\n * background jobs. Determinate with `value` / `max`, or **indeterminate** without `value` (a moving bar / a\n * spinning arc). An optional caption (`label`) and value readout (`showValue` — the percentage or your own\n * formatter), a lighter `buffer` bar, `striped` / `animated` fills, and `thresholds` that turn the fill\n * `warning` / `error` as it fills up. Tinted by `color` through the shared `--tz-btn-rgb` pattern; the track is\n * `primary-shade200`, the bar is pill-rounded (so the global `square` shape flattens it). A11y:\n * `role=\"progressbar\"` with `aria-valuemin/max/now` + `aria-valuetext`, labelled by the caption (or a\n * localized \"Progress\"); indeterminate drops `aria-valuenow` and sets `aria-busy`. Motion stops under\n * `prefers-reduced-motion`. Token-only. `forwardRef` to the root `<div>`.\n */\nexport const Progress = forwardRef<HTMLDivElement, ProgressProps>(function Progress(\n {\n value,\n max = 100,\n variant = 'linear',\n size = 'md',\n color = 'accent',\n label,\n showValue = false,\n buffer,\n striped = false,\n animated = false,\n thresholds,\n className,\n style,\n ...props\n },\n ref,\n) {\n const t = useT()\n const labelId = useId()\n const indeterminate = value == null\n const safeMax = max > 0 ? max : 100\n const current = indeterminate ? 0 : clamp(value, 0, safeMax)\n const pct = (current / safeMax) * 100\n const bufferPct = buffer == null ? undefined : (clamp(buffer, 0, safeMax) / safeMax) * 100\n\n // quota UX: the fill turns warning / error as it crosses the thresholds (error wins)\n const resolvedColor: ThemeColor =\n !indeterminate && thresholds?.error != null && pct >= thresholds.error\n ? 'error'\n : !indeterminate && thresholds?.warning != null && pct >= thresholds.warning\n ? 'warning'\n : color\n\n const valueText = indeterminate\n ? undefined\n : typeof showValue === 'function'\n ? showValue(current, safeMax)\n : showValue\n ? `${Math.round(pct)}%`\n : undefined\n const ariaValueText = indeterminate\n ? t('common.loading')\n : typeof valueText === 'string'\n ? valueText\n : `${Math.round(pct)}%`\n\n const a11y = {\n role: 'progressbar',\n 'aria-valuemin': 0,\n 'aria-valuemax': safeMax,\n 'aria-valuenow': indeterminate ? undefined : current,\n 'aria-valuetext': ariaValueText,\n 'aria-busy': indeterminate || undefined,\n ...(label != null ? { 'aria-labelledby': labelId } : { 'aria-label': t('progress.label') }),\n } as const\n\n const rootStyle = {\n '--tz-btn-rgb': `var(--tz-color-${resolvedColor}-rgb)`,\n ...style,\n } as CSSProperties\n\n if (variant === 'circular') {\n // pathLength=100 makes the dash math a plain percentage\n return (\n <div\n ref={ref}\n className={clsx(styles.root, styles.circular, styles[size], className)}\n style={rootStyle}\n {...props}\n >\n <div className={clsx(styles.ring, indeterminate && styles.spinning)} {...a11y}>\n <svg viewBox=\"0 0 36 36\" className={styles.svg} aria-hidden=\"true\">\n <circle className={styles.ringTrack} cx=\"18\" cy=\"18\" r=\"15.5\" pathLength={100} />\n <circle\n className={styles.ringFill}\n cx=\"18\"\n cy=\"18\"\n r=\"15.5\"\n pathLength={100}\n strokeDasharray={indeterminate ? '28 72' : `${pct} ${100 - pct}`}\n />\n </svg>\n {valueText != null && <span className={styles.ringValue}>{valueText}</span>}\n </div>\n {label != null && (\n <span id={labelId} className={styles.caption}>\n {label}\n </span>\n )}\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n className={clsx(styles.root, styles.linear, styles[size], className)}\n style={rootStyle}\n {...props}\n >\n {(label != null || valueText != null) && (\n <div className={styles.header}>\n {label != null ? (\n <span id={labelId} className={styles.caption}>\n {label}\n </span>\n ) : (\n <span />\n )}\n {valueText != null && <span className={styles.value}>{valueText}</span>}\n </div>\n )}\n <div className={clsx(styles.track, indeterminate && styles.indeterminate)} {...a11y}>\n {bufferPct != null && !indeterminate && (\n <div className={styles.buffer} style={{ width: `${bufferPct}%` }} />\n )}\n <div\n className={clsx(\n styles.fill,\n (striped || animated) && styles.striped,\n animated && styles.animated,\n )}\n style={indeterminate ? undefined : { width: `${pct}%` }}\n />\n </div>\n </div>\n )\n})\n"],"names":["clamp","n","lo","hi","Progress","forwardRef","value","max","variant","size","color","label","showValue","buffer","striped","animated","thresholds","className","style","props","ref","t","useT","labelId","useId","indeterminate","safeMax","current","pct","bufferPct","resolvedColor","valueText","ariaValueText","a11y","rootStyle","jsxs","clsx","styles","jsx"],"mappings":"m2BA4CMA,EAAQ,CAACC,EAAWC,EAAYC,IAAe,KAAK,IAAIA,EAAI,KAAK,IAAID,EAAID,CAAC,CAAC,EAapEG,GAAWC,EAAAA,WAA0C,SAChE,CACE,MAAAC,EACA,IAAAC,EAAM,IACN,QAAAC,EAAU,SACV,KAAAC,EAAO,KACP,MAAAC,EAAQ,SACR,MAAAC,EACA,UAAAC,EAAY,GACZ,OAAAC,EACA,QAAAC,EAAU,GACV,SAAAC,EAAW,GACX,WAAAC,EACA,UAAAC,EACA,MAAAC,EACA,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAIC,EAAAA,KAAA,EACJC,EAAUC,EAAAA,MAAA,EACVC,EAAgBnB,GAAS,KACzBoB,EAAUnB,EAAM,EAAIA,EAAM,IAC1BoB,EAAUF,EAAgB,EAAIzB,EAAMM,EAAO,EAAGoB,CAAO,EACrDE,EAAOD,EAAUD,EAAW,IAC5BG,EAAYhB,GAAU,KAAO,OAAab,EAAMa,EAAQ,EAAGa,CAAO,EAAIA,EAAW,IAGjFI,EACJ,CAACL,IAAiBT,GAAA,YAAAA,EAAY,QAAS,MAAQY,GAAOZ,EAAW,MAC7D,QACA,CAACS,IAAiBT,GAAA,YAAAA,EAAY,UAAW,MAAQY,GAAOZ,EAAW,QACjE,UACAN,EAEFqB,E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ACtE,EACCpB,GAAS,MACR2B,MAAC,OAAA,CAAK,GAAIf,EAAS,UAAWc,EAAO,QAClC,SAAA1B,CAAA,CACH,CAAA,CAAA,CAAA,EAONwB,EAAAA,KAAC,MAAA,CACC,IAAAf,EACA,UAAWgB,EAAAA,KAAKC,EAAO,KAAMA,EAAO,OAAQA,EAAO5B,CAAI,EAAGQ,CAAS,EACnE,MAAOiB,EACN,GAAGf,EAEF,SAAA,EAAAR,GAAS,MAAQoB,GAAa,cAC7B,MAAA,CAAI,UAAWM,EAAO,OACpB,SAAA,CAAA1B,GAAS,KACR2B,EAAAA,IAAC,OAAA,CAAK,GAAIf,EAAS,UAAWc,EAAO,QAClC,SAAA1B,CAAA,CACH,EAEA2B,EAAAA,IAAC,OAAA,EAAK,EAEPP,GAAa,MAAQO,EAAAA,IAAC,QAAK,UAAWD,EAAO,MAAQ,SAAAN,CAAA,CAAU,CAAA,EAClE,EAEFI,EAAAA,KAAC,MAAA,CAAI,UAAWC,EAAAA,KAAKC,EAAO,MAAOZ,GAAiBY,EAAO,aAAa,EAAI,GAAGJ,EAC5E,SAAA,CAAAJ,GAAa,MAAQ,CAACJ,GACrBa,EAAAA,IAAC,OAAI,UAAWD,EAAO,OAAQ,MAAO,CAAE,MAAO,GAAGR,CAAS,KAAO,EAEpES,EAAAA,IAAC,MAAA,CACC,UAAWF,EAAAA,KACTC,EAAO,MACNvB,GAAWC,IAAasB,EAAO,QAChCtB,GAAYsB,EAAO,QAAA,EAErB,MAAOZ,EAAgB,OAAY,CAAE,MAAO,GAAGG,CAAG,GAAA,CAAI,CAAA,CACxD,CAAA,CACF,CAAA,CAAA,CAAA,CAGN,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as s, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as I, useId as L } from "react";
|
|
3
3
|
import { clsx as l } from "clsx";
|
|
4
|
-
import { a as B } from "./ConfigProvider-
|
|
4
|
+
import { a as B } from "./ConfigProvider-DVDGtCUc.js";
|
|
5
5
|
const C = "_root_1uzzo_4", D = "_caption_1uzzo_11", R = "_value_1uzzo_16", S = "_linear_1uzzo_23", q = "_sm_1uzzo_28", A = "_md_1uzzo_31", E = "_lg_1uzzo_34", G = "_header_1uzzo_38", H = "_track_1uzzo_45", J = "_buffer_1uzzo_52", K = "_fill_1uzzo_53", O = "_striped_1uzzo_69", Q = "_animated_1uzzo_82", U = "_indeterminate_1uzzo_95", W = "_circular_1uzzo_109", X = "_ring_1uzzo_128", Y = "_svg_1uzzo_136", Z = "_ringTrack_1uzzo_144", nn = "_ringFill_1uzzo_145", rn = "_ringValue_1uzzo_159", an = "_spinning_1uzzo_165", n = {
|
|
6
6
|
root: C,
|
|
7
7
|
caption: D,
|
|
@@ -116,4 +116,4 @@ const C = "_root_1uzzo_4", D = "_caption_1uzzo_11", R = "_value_1uzzo_16", S = "
|
|
|
116
116
|
export {
|
|
117
117
|
sn as P
|
|
118
118
|
};
|
|
119
|
-
//# sourceMappingURL=Progress-
|
|
119
|
+
//# sourceMappingURL=Progress-DzxbkcaD.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress-BAEhawtj.js","sources":["../src/components/Progress/Progress.tsx"],"sourcesContent":["import { forwardRef, useId, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport styles from './Progress.module.css'\n\nexport type ProgressVariant = 'linear' | 'circular'\nexport type ProgressSize = 'sm' | 'md' | 'lg'\n\n/** Percentages (0–100) at which the color switches automatically — quota UX. */\nexport interface ProgressThresholds {\n /** From this percentage on, the bar turns `warning`. */\n warning?: number\n /** From this percentage on, the bar turns `error`. */\n error?: number\n}\n\nexport interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {\n /** Current value, `0`–`max`. Omit it for an **indeterminate** progress (a moving bar / spinning arc). */\n value?: number\n /** The value that means \"done\". Defaults to `100`. */\n max?: number\n /** `linear` (default) — a bar; `circular` — a ring. */\n variant?: ProgressVariant\n /** Linear: bar thickness 4 / 6 / 8 px. Circular: ring 32 / 48 / 64 px. Defaults to `md`. */\n size?: ProgressSize\n /** Theme color of the fill. Defaults to `accent`. */\n color?: ThemeColor\n /** A caption — above the bar (left) for linear, under the ring for circular. Labels the progressbar. */\n label?: ReactNode\n /**\n * Show the value: `true` → the percentage (\"42%\"); a function → your own text, e.g.\n * `(v, max) => `${v} GB of ${max} GB``. Linear: right of the caption; circular: inside the ring.\n */\n showValue?: boolean | ((value: number, max: number) => ReactNode)\n /** A second, lighter bar behind the fill (buffered / pending amount), `0`–`max`. Linear only. */\n buffer?: number\n /** Diagonal stripes on the fill. Linear only. */\n striped?: boolean\n /** Animate the stripes (implies `striped`). Linear only. Off under `prefers-reduced-motion`. */\n animated?: boolean\n /** Switch the color automatically by percentage (e.g. `{ warning: 80, error: 95 }` for a quota). */\n thresholds?: ProgressThresholds\n}\n\nconst clamp = (n: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, n))\n\n/**\n * A progress indicator — **linear** (a bar) or **circular** (a ring) — for uploads, wizard steps, quotas and\n * background jobs. Determinate with `value` / `max`, or **indeterminate** without `value` (a moving bar / a\n * spinning arc). An optional caption (`label`) and value readout (`showValue` — the percentage or your own\n * formatter), a lighter `buffer` bar, `striped` / `animated` fills, and `thresholds` that turn the fill\n * `warning` / `error` as it fills up. Tinted by `color` through the shared `--tz-btn-rgb` pattern; the track is\n * `primary-shade200`, the bar is pill-rounded (so the global `square` shape flattens it). A11y:\n * `role=\"progressbar\"` with `aria-valuemin/max/now` + `aria-valuetext`, labelled by the caption (or a\n * localized \"Progress\"); indeterminate drops `aria-valuenow` and sets `aria-busy`. Motion stops under\n * `prefers-reduced-motion`. Token-only. `forwardRef` to the root `<div>`.\n */\nexport const Progress = forwardRef<HTMLDivElement, ProgressProps>(function Progress(\n {\n value,\n max = 100,\n variant = 'linear',\n size = 'md',\n color = 'accent',\n label,\n showValue = false,\n buffer,\n striped = false,\n animated = false,\n thresholds,\n className,\n style,\n ...props\n },\n ref,\n) {\n const t = useT()\n const labelId = useId()\n const indeterminate = value == null\n const safeMax = max > 0 ? max : 100\n const current = indeterminate ? 0 : clamp(value, 0, safeMax)\n const pct = (current / safeMax) * 100\n const bufferPct = buffer == null ? undefined : (clamp(buffer, 0, safeMax) / safeMax) * 100\n\n // quota UX: the fill turns warning / error as it crosses the thresholds (error wins)\n const resolvedColor: ThemeColor =\n !indeterminate && thresholds?.error != null && pct >= thresholds.error\n ? 'error'\n : !indeterminate && thresholds?.warning != null && pct >= thresholds.warning\n ? 'warning'\n : color\n\n const valueText = indeterminate\n ? undefined\n : typeof showValue === 'function'\n ? showValue(current, safeMax)\n : showValue\n ? `${Math.round(pct)}%`\n : undefined\n const ariaValueText = indeterminate\n ? t('common.loading')\n : typeof valueText === 'string'\n ? valueText\n : `${Math.round(pct)}%`\n\n const a11y = {\n role: 'progressbar',\n 'aria-valuemin': 0,\n 'aria-valuemax': safeMax,\n 'aria-valuenow': indeterminate ? undefined : current,\n 'aria-valuetext': ariaValueText,\n 'aria-busy': indeterminate || undefined,\n ...(label != null ? { 'aria-labelledby': labelId } : { 'aria-label': t('progress.label') }),\n } as const\n\n const rootStyle = {\n '--tz-btn-rgb': `var(--tz-color-${resolvedColor}-rgb)`,\n ...style,\n } as CSSProperties\n\n if (variant === 'circular') {\n // pathLength=100 makes the dash math a plain percentage\n return (\n <div\n ref={ref}\n className={clsx(styles.root, styles.circular, styles[size], className)}\n style={rootStyle}\n {...props}\n >\n <div className={clsx(styles.ring, indeterminate && styles.spinning)} {...a11y}>\n <svg viewBox=\"0 0 36 36\" className={styles.svg} aria-hidden=\"true\">\n <circle className={styles.ringTrack} cx=\"18\" cy=\"18\" r=\"15.5\" pathLength={100} />\n <circle\n className={styles.ringFill}\n cx=\"18\"\n cy=\"18\"\n r=\"15.5\"\n pathLength={100}\n strokeDasharray={indeterminate ? '28 72' : `${pct} ${100 - pct}`}\n />\n </svg>\n {valueText != null && <span className={styles.ringValue}>{valueText}</span>}\n </div>\n {label != null && (\n <span id={labelId} className={styles.caption}>\n {label}\n </span>\n )}\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n className={clsx(styles.root, styles.linear, styles[size], className)}\n style={rootStyle}\n {...props}\n >\n {(label != null || valueText != null) && (\n <div className={styles.header}>\n {label != null ? (\n <span id={labelId} className={styles.caption}>\n {label}\n </span>\n ) : (\n <span />\n )}\n {valueText != null && <span className={styles.value}>{valueText}</span>}\n </div>\n )}\n <div className={clsx(styles.track, indeterminate && styles.indeterminate)} {...a11y}>\n {bufferPct != null && !indeterminate && (\n <div className={styles.buffer} style={{ width: `${bufferPct}%` }} />\n )}\n <div\n className={clsx(\n styles.fill,\n (striped || animated) && styles.striped,\n animated && styles.animated,\n )}\n style={indeterminate ? undefined : { width: `${pct}%` }}\n />\n </div>\n </div>\n )\n})\n"],"names":["clamp","n","lo","hi","Progress","forwardRef","value","max","variant","size","color","label","showValue","buffer","striped","animated","thresholds","className","style","props","ref","t","useT","labelId","useId","indeterminate","safeMax","current","pct","bufferPct","resolvedColor","valueText","ariaValueText","a11y","rootStyle","jsxs","clsx","styles","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CMA,IAAQ,CAACC,GAAWC,GAAYC,MAAe,KAAK,IAAIA,GAAI,KAAK,IAAID,GAAID,CAAC,CAAC,GAapEG,KAAWC,EAA0C,SAChE;AAAA,EACE,OAAAC;AAAA,EACA,KAAAC,IAAM;AAAA,EACN,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,QAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,UAAAC,IAAW;AAAA,EACX,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,I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AK,WAAWD,EAAO,OAAQ,UAAAN,EAAA,CAAU;AAAA,QAAA,GAClE;AAAA,QAEF,gBAAAI,EAAC,OAAA,EAAI,WAAWC,EAAKC,EAAO,OAAOZ,KAAiBY,EAAO,aAAa,GAAI,GAAGJ,GAC5E,UAAA;AAAA,UAAAJ,KAAa,QAAQ,CAACJ,KACrB,gBAAAa,EAAC,SAAI,WAAWD,EAAO,QAAQ,OAAO,EAAE,OAAO,GAAGR,CAAS,OAAO;AAAA,UAEpE,gBAAAS;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWF;AAAA,gBACTC,EAAO;AAAA,iBACNvB,KAAWC,MAAasB,EAAO;AAAA,gBAChCtB,KAAYsB,EAAO;AAAA,cAAA;AAAA,cAErB,OAAOZ,IAAgB,SAAY,EAAE,OAAO,GAAGG,CAAG,IAAA;AAAA,YAAI;AAAA,UAAA;AAAA,QACxD,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
|
1
|
+
{"version":3,"file":"Progress-DzxbkcaD.js","sources":["../src/components/Progress/Progress.tsx"],"sourcesContent":["import { forwardRef, useId, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport styles from './Progress.module.css'\n\nexport type ProgressVariant = 'linear' | 'circular'\nexport type ProgressSize = 'sm' | 'md' | 'lg'\n\n/** Percentages (0–100) at which the color switches automatically — quota UX. */\nexport interface ProgressThresholds {\n /** From this percentage on, the bar turns `warning`. */\n warning?: number\n /** From this percentage on, the bar turns `error`. */\n error?: number\n}\n\nexport interface ProgressProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {\n /** Current value, `0`–`max`. Omit it for an **indeterminate** progress (a moving bar / spinning arc). */\n value?: number\n /** The value that means \"done\". Defaults to `100`. */\n max?: number\n /** `linear` (default) — a bar; `circular` — a ring. */\n variant?: ProgressVariant\n /** Linear: bar thickness 4 / 6 / 8 px. Circular: ring 32 / 48 / 64 px. Defaults to `md`. */\n size?: ProgressSize\n /** Theme color of the fill. Defaults to `accent`. */\n color?: ThemeColor\n /** A caption — above the bar (left) for linear, under the ring for circular. Labels the progressbar. */\n label?: ReactNode\n /**\n * Show the value: `true` → the percentage (\"42%\"); a function → your own text, e.g.\n * `(v, max) => `${v} GB of ${max} GB``. Linear: right of the caption; circular: inside the ring.\n */\n showValue?: boolean | ((value: number, max: number) => ReactNode)\n /** A second, lighter bar behind the fill (buffered / pending amount), `0`–`max`. Linear only. */\n buffer?: number\n /** Diagonal stripes on the fill. Linear only. */\n striped?: boolean\n /** Animate the stripes (implies `striped`). Linear only. Off under `prefers-reduced-motion`. */\n animated?: boolean\n /** Switch the color automatically by percentage (e.g. `{ warning: 80, error: 95 }` for a quota). */\n thresholds?: ProgressThresholds\n}\n\nconst clamp = (n: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, n))\n\n/**\n * A progress indicator — **linear** (a bar) or **circular** (a ring) — for uploads, wizard steps, quotas and\n * background jobs. Determinate with `value` / `max`, or **indeterminate** without `value` (a moving bar / a\n * spinning arc). An optional caption (`label`) and value readout (`showValue` — the percentage or your own\n * formatter), a lighter `buffer` bar, `striped` / `animated` fills, and `thresholds` that turn the fill\n * `warning` / `error` as it fills up. Tinted by `color` through the shared `--tz-btn-rgb` pattern; the track is\n * `primary-shade200`, the bar is pill-rounded (so the global `square` shape flattens it). A11y:\n * `role=\"progressbar\"` with `aria-valuemin/max/now` + `aria-valuetext`, labelled by the caption (or a\n * localized \"Progress\"); indeterminate drops `aria-valuenow` and sets `aria-busy`. Motion stops under\n * `prefers-reduced-motion`. Token-only. `forwardRef` to the root `<div>`.\n */\nexport const Progress = forwardRef<HTMLDivElement, ProgressProps>(function Progress(\n {\n value,\n max = 100,\n variant = 'linear',\n size = 'md',\n color = 'accent',\n label,\n showValue = false,\n buffer,\n striped = false,\n animated = false,\n thresholds,\n className,\n style,\n ...props\n },\n ref,\n) {\n const t = useT()\n const labelId = useId()\n const indeterminate = value == null\n const safeMax = max > 0 ? max : 100\n const current = indeterminate ? 0 : clamp(value, 0, safeMax)\n const pct = (current / safeMax) * 100\n const bufferPct = buffer == null ? undefined : (clamp(buffer, 0, safeMax) / safeMax) * 100\n\n // quota UX: the fill turns warning / error as it crosses the thresholds (error wins)\n const resolvedColor: ThemeColor =\n !indeterminate && thresholds?.error != null && pct >= thresholds.error\n ? 'error'\n : !indeterminate && thresholds?.warning != null && pct >= thresholds.warning\n ? 'warning'\n : color\n\n const valueText = indeterminate\n ? undefined\n : typeof showValue === 'function'\n ? showValue(current, safeMax)\n : showValue\n ? `${Math.round(pct)}%`\n : undefined\n const ariaValueText = indeterminate\n ? t('common.loading')\n : typeof valueText === 'string'\n ? valueText\n : `${Math.round(pct)}%`\n\n const a11y = {\n role: 'progressbar',\n 'aria-valuemin': 0,\n 'aria-valuemax': safeMax,\n 'aria-valuenow': indeterminate ? undefined : current,\n 'aria-valuetext': ariaValueText,\n 'aria-busy': indeterminate || undefined,\n ...(label != null ? { 'aria-labelledby': labelId } : { 'aria-label': t('progress.label') }),\n } as const\n\n const rootStyle = {\n '--tz-btn-rgb': `var(--tz-color-${resolvedColor}-rgb)`,\n ...style,\n } as CSSProperties\n\n if (variant === 'circular') {\n // pathLength=100 makes the dash math a plain percentage\n return (\n <div\n ref={ref}\n className={clsx(styles.root, styles.circular, styles[size], className)}\n style={rootStyle}\n {...props}\n >\n <div className={clsx(styles.ring, indeterminate && styles.spinning)} {...a11y}>\n <svg viewBox=\"0 0 36 36\" className={styles.svg} aria-hidden=\"true\">\n <circle className={styles.ringTrack} cx=\"18\" cy=\"18\" r=\"15.5\" pathLength={100} />\n <circle\n className={styles.ringFill}\n cx=\"18\"\n cy=\"18\"\n r=\"15.5\"\n pathLength={100}\n strokeDasharray={indeterminate ? '28 72' : `${pct} ${100 - pct}`}\n />\n </svg>\n {valueText != null && <span className={styles.ringValue}>{valueText}</span>}\n </div>\n {label != null && (\n <span id={labelId} className={styles.caption}>\n {label}\n </span>\n )}\n </div>\n )\n }\n\n return (\n <div\n ref={ref}\n className={clsx(styles.root, styles.linear, styles[size], className)}\n style={rootStyle}\n {...props}\n >\n {(label != null || valueText != null) && (\n <div className={styles.header}>\n {label != null ? (\n <span id={labelId} className={styles.caption}>\n {label}\n </span>\n ) : (\n <span />\n )}\n {valueText != null && <span className={styles.value}>{valueText}</span>}\n </div>\n )}\n <div className={clsx(styles.track, indeterminate && styles.indeterminate)} {...a11y}>\n {bufferPct != null && !indeterminate && (\n <div className={styles.buffer} style={{ width: `${bufferPct}%` }} />\n )}\n <div\n className={clsx(\n styles.fill,\n (striped || animated) && styles.striped,\n animated && styles.animated,\n )}\n style={indeterminate ? undefined : { width: `${pct}%` }}\n />\n </div>\n </div>\n )\n})\n"],"names":["clamp","n","lo","hi","Progress","forwardRef","value","max","variant","size","color","label","showValue","buffer","striped","animated","thresholds","className","style","props","ref","t","useT","labelId","useId","indeterminate","safeMax","current","pct","bufferPct","resolvedColor","valueText","ariaValueText","a11y","rootStyle","jsxs","clsx","styles","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CMA,IAAQ,CAACC,GAAWC,GAAYC,MAAe,KAAK,IAAIA,GAAI,KAAK,IAAID,GAAID,CAAC,CAAC,GAapEG,KAAWC,EAA0C,SAChE;AAAA,EACE,OAAAC;AAAA,EACA,KAAAC,IAAM;AAAA,EACN,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,QAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,UAAAC,IAAW;AAAA,EACX,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAIC,EAAA,GACJC,IAAUC,EAAA,GACVC,IAAgBnB,KAAS,MACzBoB,IAAUnB,IAAM,IAA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I,EAAC,OAAA,EAAI,WAAWC,EAAKC,EAAO,OAAOZ,KAAiBY,EAAO,aAAa,GAAI,GAAGJ,GAC5E,UAAA;AAAA,UAAAJ,KAAa,QAAQ,CAACJ,KACrB,gBAAAa,EAAC,SAAI,WAAWD,EAAO,QAAQ,OAAO,EAAE,OAAO,GAAGR,CAAS,OAAO;AAAA,UAEpE,gBAAAS;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWF;AAAA,gBACTC,EAAO;AAAA,iBACNvB,KAAWC,MAAasB,EAAO;AAAA,gBAChCtB,KAAYsB,EAAO;AAAA,cAAA;AAAA,cAErB,OAAOZ,IAAgB,SAAY,EAAE,OAAO,GAAGG,CAAG,IAAA;AAAA,YAAI;AAAA,UAAA;AAAA,QACxD,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var w=Object.create;var m=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var k=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of R(t))!V.call(e,o)&&o!==r&&m(e,o,{get:()=>t[o],enumerable:!(a=N(t,o))||a.enumerable});return e};var z=(e,t,r)=>(r=e!=null?w(T(e)):{},k(t||!e||!e.__esModule?m(r,"default",{value:e,enumerable:!0}):r,e));const i=require("react/jsx-runtime"),G=require("react"),M=require("clsx"),f=require("./useOptionalPeer-9Fkx5Leb.cjs"),O=require("./Skeleton-DK0lAjS9.cjs"),H=require("./Typography-d97DdbNd.cjs"),L=require("./ConfigProvider-
|
|
2
|
-
//# sourceMappingURL=QrCode-
|
|
1
|
+
"use strict";var w=Object.create;var m=Object.defineProperty;var N=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var T=Object.getPrototypeOf,V=Object.prototype.hasOwnProperty;var k=(e,t,r,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of R(t))!V.call(e,o)&&o!==r&&m(e,o,{get:()=>t[o],enumerable:!(a=N(t,o))||a.enumerable});return e};var z=(e,t,r)=>(r=e!=null?w(T(e)):{},k(t||!e||!e.__esModule?m(r,"default",{value:e,enumerable:!0}):r,e));const i=require("react/jsx-runtime"),G=require("react"),M=require("clsx"),f=require("./useOptionalPeer-9Fkx5Leb.cjs"),O=require("./Skeleton-DK0lAjS9.cjs"),H=require("./Typography-d97DdbNd.cjs"),L=require("./ConfigProvider-DBU6rOIA.cjs"),$="_root_15ibt_1",A="_framed_15ibt_12",B="_code_15ibt_30",D="_caption_15ibt_35",s={root:$,framed:A,code:B,caption:D},E=f.optionalPeer("qrcode.react","QrCode",()=>import("qrcode.react")),F=G.forwardRef(function({value:t,size:r=180,level:a,color:o="text",margin:g=2,image:c,caption:d,framed:v=!0,className:p,style:q,"aria-label":_,...x},C){const b=L.useT(),y=_??b("qrCode.label"),{module:l,failed:Q}=f.useOptionalPeer(E),u=l==null?void 0:l.QRCodeSVG,S=a??(c?"H":"M"),j=c!=null?(()=>{const n=typeof c=="string"?{src:c}:c,h=Math.round(r*.22);return{src:n.src,width:n.width??h,height:n.height??h,excavate:n.excavate??!0}})():void 0,P=o==="text"?void 0:{"--tz-qr-fg":`var(--tz-color-${o})`};return i.jsxs("div",{ref:C,role:"img","aria-label":y,className:M.clsx(s.root,v&&s.framed,p),style:{...P,...q},...x,children:[u?i.jsx(u,{className:s.code,value:t,size:r,level:S,marginSize:g,fgColor:"var(--tz-qr-fg)",bgColor:"var(--tz-qr-bg)",imageSettings:j,"aria-hidden":!0}):i.jsx(O.Skeleton,{variant:"rect",width:r,height:r,animation:Q?!1:"shimmer",className:s.code}),d!=null&&i.jsx(H.Typography,{variant:"caption",color:"muted",className:s.caption,children:d})]})});exports.QrCode=F;
|
|
2
|
+
//# sourceMappingURL=QrCode-C8uAPiHq.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QrCode-
|
|
1
|
+
{"version":3,"file":"QrCode-C8uAPiHq.cjs","sources":["../src/components/QrCode/QrCode.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport type * as QrLibModule from 'qrcode.react'\nimport { optionalPeer, useOptionalPeer } from '../../hooks/useOptionalPeer'\nimport { Skeleton } from '../Skeleton'\nimport { useT, type ThemeColor } from '../../theme'\nimport { Typography } from '../Typography'\nimport styles from './QrCode.module.css'\n\nexport type QrCodeLevel = 'L' | 'M' | 'Q' | 'H'\n\nexport interface QrCodeProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {\n /** The encoded text (URL, `otpauth://…` URI, plain string). Required. */\n value: string\n /** Rendered edge length in px. Default `180`. */\n size?: number\n /** Error-correction level. Default `'M'` (`'H'` when `image` is set, so the logo can cover the middle). */\n level?: QrCodeLevel\n /** Module (foreground) tint — a theme token. Default `'text'` (so it follows light/dark). */\n color?: ThemeColor | 'text'\n /** Quiet zone in modules. Default `2`. */\n margin?: number\n /**\n * Optional centre image (a brand mark), as a URL or `{ src, width?, height?, excavate? }`.\n * `excavate` clears the modules under it (default `true`). Sizes default to ~22% of `size`.\n */\n image?: string | { src: string; width?: number; height?: number; excavate?: boolean }\n /** Caption rendered under the code (muted, centred) — e.g. \"Scan with your authenticator app\". */\n caption?: ReactNode\n /**\n * Wrap the code in a soft `surface` frame with padding and radius, so it sits cleanly on the\n * page `background`. Default `true`. Pass `false` for a bare SVG.\n */\n framed?: boolean\n /**\n * Accessible name. Defaults to the localized `qrCode.label` (\"QR code\"). The `value` is never exposed\n * as text by this component.\n */\n 'aria-label'?: string\n}\n\n/**\n * A QR code, rendered as a crisp **SVG** — wraps the optional peer **`qrcode.react`** (`npm i\n * qrcode.react`) so apps don't pull in their own encoder. The modules take a theme `color` token\n * (default `text`) via the `--tz-qr-fg` var; `framed` (default) wraps the code in a soft, elevated card.\n *\n * **Scannability:** a framed code always sits on a **white** card in both light and dark mode, and its\n * default modules stay **dark** in both — a QR must be dark-on-light to read reliably, so the frame is\n * kept white even in dark mode (a deliberate literal-color exception, like `CodeBlock`'s dark surface).\n * A custom `color` is honored as-is (pick one dark enough to scan). The wrapper is `role=\"img\"` with an\n * `aria-label`; the SVG itself is `aria-hidden`, so the encoded `value` is never read out as text.\n */\n/** @internal — exported for tests */\nexport const qrPeer = optionalPeer<typeof QrLibModule>(\n 'qrcode.react',\n 'QrCode',\n () => import('qrcode.react'),\n)\n\nexport const QrCode = forwardRef<HTMLDivElement, QrCodeProps>(function QrCode(\n {\n value,\n size = 180,\n level,\n color = 'text',\n margin = 2,\n image,\n caption,\n framed = true,\n className,\n style,\n 'aria-label': ariaLabelProp,\n ...props\n },\n ref,\n) {\n const t = useT()\n const ariaLabel = ariaLabelProp ?? t('qrCode.label')\n // `qrcode.react` is an optional peer, loaded lazily (never imported statically — apps without it must\n // still build + run from the barrel). Until it's ready a same-size skeleton holds the spot; if it isn't\n // installed the spot stays empty and an install hint is logged.\n const { module: qrLib, failed } = useOptionalPeer(qrPeer)\n const QRCodeSVG = qrLib?.QRCodeSVG\n\n // 'H' error correction by default when a centre image is present, so the logo can cover the middle\n // without breaking the code; otherwise 'M'. An explicit `level` always wins.\n const resolvedLevel: QrCodeLevel = level ?? (image ? 'H' : 'M')\n\n const imageSettings =\n image != null\n ? (() => {\n const img = typeof image === 'string' ? { src: image } : image\n const dim = Math.round(size * 0.22)\n return {\n src: img.src,\n width: img.width ?? dim,\n height: img.height ?? dim,\n excavate: img.excavate ?? true,\n }\n })()\n : undefined\n\n // The foreground (modules) follows the `color` token via `--tz-qr-fg`. The default `text` is left to\n // CSS (so `.framed` can force dark modules on the white card in dark mode); a custom token is pinned\n // inline, so it wins over that CSS fallback and is rendered exactly as asked.\n const fgVar = color === 'text' ? undefined : { '--tz-qr-fg': `var(--tz-color-${color})` }\n\n return (\n <div\n ref={ref}\n role=\"img\"\n aria-label={ariaLabel}\n className={clsx(styles.root, framed && styles.framed, className)}\n style={{ ...fgVar, ...style } as CSSProperties}\n {...props}\n >\n {QRCodeSVG ? (\n <QRCodeSVG\n className={styles.code}\n value={value}\n size={size}\n level={resolvedLevel}\n marginSize={margin}\n // colors flow through CSS vars so `.framed` can guarantee contrast per theme (see the module)\n fgColor=\"var(--tz-qr-fg)\"\n bgColor=\"var(--tz-qr-bg)\"\n imageSettings={imageSettings}\n aria-hidden\n />\n ) : (\n <Skeleton\n variant=\"rect\"\n width={size}\n height={size}\n animation={failed ? false : 'shimmer'}\n className={styles.code}\n />\n )}\n {caption != null && (\n <Typography variant=\"caption\" color=\"muted\" className={styles.caption}>\n {caption}\n </Typography>\n )}\n </div>\n )\n})\n"],"names":["qrPeer","optionalPeer","QrCode","forwardRef","value","size","level","color","margin","image","caption","framed","className","style","ariaLabelProp","props","ref","t","useT","ariaLabel","qrLib","failed","useOptionalPeer","QRCodeSVG","resolvedLevel","imageSettings","img","dim","fgVar","jsxs","clsx","styles","jsx","Skeleton","Typography"],"mappings":"0zBAqDaA,EAASC,EAAAA,aACpB,eACA,SACA,IAAM,OAAO,cAAc,CAC7B,EAEaC,EAASC,EAAAA,WAAwC,SAC5D,CACE,MAAAC,EACA,KAAAC,EAAO,IACP,MAAAC,EACA,MAAAC,EAAQ,OACR,OAAAC,EAAS,EACT,MAAAC,EACA,QAAAC,EACA,OAAAC,EAAS,GACT,UAAAC,EACA,MAAAC,EACA,aAAcC,EACd,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAIC,EAAAA,KAAA,EACJC,EAAYL,GAAiBG,EAAE,cAAc,EAI7C,CAAE,OAAQG,EAAO,OAAAC,CAAA,EAAWC,EAAAA,gBAAgBtB,CAAM,EAClDuB,EAAYH,GAAA,YAAAA,EAAO,UAInBI,EAA6BlB,IAAUG,EAAQ,IAAM,KAErDgB,EACJhB,GAAS,MACJ,IAAM,CACL,MAAMiB,EAAM,OAAOjB,GAAU,SAAW,CAAE,IAAKA,GAAUA,EACnDkB,EAAM,KAAK,MAAMtB,EAAO,GAAI,EAClC,MAAO,CACL,IAAKqB,EAAI,IACT,MAAOA,EAAI,OAASC,EACpB,OAAQD,EAAI,QAAUC,EACtB,SAAUD,EAAI,UAAY,EAAA,CAE9B,KACA,OAKAE,EAAQrB,IAAU,OAAS,OAAY,CAAE,aAAc,kBAAkBA,CAAK,GAAA,EAEpF,OACEsB,EAAAA,KAAC,MAAA,CACC,IAAAb,EACA,KAAK,MACL,aAAYG,EACZ,UAAWW,EAAAA,KAAKC,EAAO,KAAMpB,GAAUoB,EAAO,OAAQnB,CAAS,EAC/D,MAAO,CAAE,GAAGgB,EAAO,GAAGf,CAAA,EACrB,GAAGE,EAEH,SAAA,CAAAQ,EACCS,EAAAA,IAACT,EAAA,CACC,UAAWQ,EAAO,KAClB,MAAA3B,EACA,KAAAC,EACA,MAAOmB,EACP,WAAYhB,EAEZ,QAAQ,kBACR,QAAQ,kBACR,cAAAiB,EACA,cAAW,EAAA,CAAA,EAGbO,EAAAA,IAACC,EAAAA,SAAA,CACC,QAAQ,OACR,MAAO5B,EACP,OAAQA,EACR,UAAWgB,EAAS,GAAQ,UAC5B,UAAWU,EAAO,IAAA,CAAA,EAGrBrB,GAAW,MACVsB,EAAAA,IAACE,EAAAA,WAAA,CAAW,QAAQ,UAAU,MAAM,QAAQ,UAAWH,EAAO,QAC3D,SAAArB,CAAA,CACH,CAAA,CAAA,CAAA,CAIR,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { clsx as N } from "clsx";
|
|
|
4
4
|
import { u as P, o as R } from "./useOptionalPeer-49f3XcO5.js";
|
|
5
5
|
import { S as T } from "./Skeleton-_-uGax2j.js";
|
|
6
6
|
import { T as V } from "./Typography-ChSuxgkc.js";
|
|
7
|
-
import { a as j } from "./ConfigProvider-
|
|
7
|
+
import { a as j } from "./ConfigProvider-DVDGtCUc.js";
|
|
8
8
|
const z = "_root_15ibt_1", G = "_framed_15ibt_12", M = "_code_15ibt_30", k = "_caption_15ibt_35", t = {
|
|
9
9
|
root: z,
|
|
10
10
|
framed: G,
|
|
@@ -78,4 +78,4 @@ const z = "_root_15ibt_1", G = "_framed_15ibt_12", M = "_code_15ibt_30", k = "_c
|
|
|
78
78
|
export {
|
|
79
79
|
I as Q
|
|
80
80
|
};
|
|
81
|
-
//# sourceMappingURL=QrCode-
|
|
81
|
+
//# sourceMappingURL=QrCode-DaJYqBc1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QrCode-
|
|
1
|
+
{"version":3,"file":"QrCode-DaJYqBc1.js","sources":["../src/components/QrCode/QrCode.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport type * as QrLibModule from 'qrcode.react'\nimport { optionalPeer, useOptionalPeer } from '../../hooks/useOptionalPeer'\nimport { Skeleton } from '../Skeleton'\nimport { useT, type ThemeColor } from '../../theme'\nimport { Typography } from '../Typography'\nimport styles from './QrCode.module.css'\n\nexport type QrCodeLevel = 'L' | 'M' | 'Q' | 'H'\n\nexport interface QrCodeProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {\n /** The encoded text (URL, `otpauth://…` URI, plain string). Required. */\n value: string\n /** Rendered edge length in px. Default `180`. */\n size?: number\n /** Error-correction level. Default `'M'` (`'H'` when `image` is set, so the logo can cover the middle). */\n level?: QrCodeLevel\n /** Module (foreground) tint — a theme token. Default `'text'` (so it follows light/dark). */\n color?: ThemeColor | 'text'\n /** Quiet zone in modules. Default `2`. */\n margin?: number\n /**\n * Optional centre image (a brand mark), as a URL or `{ src, width?, height?, excavate? }`.\n * `excavate` clears the modules under it (default `true`). Sizes default to ~22% of `size`.\n */\n image?: string | { src: string; width?: number; height?: number; excavate?: boolean }\n /** Caption rendered under the code (muted, centred) — e.g. \"Scan with your authenticator app\". */\n caption?: ReactNode\n /**\n * Wrap the code in a soft `surface` frame with padding and radius, so it sits cleanly on the\n * page `background`. Default `true`. Pass `false` for a bare SVG.\n */\n framed?: boolean\n /**\n * Accessible name. Defaults to the localized `qrCode.label` (\"QR code\"). The `value` is never exposed\n * as text by this component.\n */\n 'aria-label'?: string\n}\n\n/**\n * A QR code, rendered as a crisp **SVG** — wraps the optional peer **`qrcode.react`** (`npm i\n * qrcode.react`) so apps don't pull in their own encoder. The modules take a theme `color` token\n * (default `text`) via the `--tz-qr-fg` var; `framed` (default) wraps the code in a soft, elevated card.\n *\n * **Scannability:** a framed code always sits on a **white** card in both light and dark mode, and its\n * default modules stay **dark** in both — a QR must be dark-on-light to read reliably, so the frame is\n * kept white even in dark mode (a deliberate literal-color exception, like `CodeBlock`'s dark surface).\n * A custom `color` is honored as-is (pick one dark enough to scan). The wrapper is `role=\"img\"` with an\n * `aria-label`; the SVG itself is `aria-hidden`, so the encoded `value` is never read out as text.\n */\n/** @internal — exported for tests */\nexport const qrPeer = optionalPeer<typeof QrLibModule>(\n 'qrcode.react',\n 'QrCode',\n () => import('qrcode.react'),\n)\n\nexport const QrCode = forwardRef<HTMLDivElement, QrCodeProps>(function QrCode(\n {\n value,\n size = 180,\n level,\n color = 'text',\n margin = 2,\n image,\n caption,\n framed = true,\n className,\n style,\n 'aria-label': ariaLabelProp,\n ...props\n },\n ref,\n) {\n const t = useT()\n const ariaLabel = ariaLabelProp ?? t('qrCode.label')\n // `qrcode.react` is an optional peer, loaded lazily (never imported statically — apps without it must\n // still build + run from the barrel). Until it's ready a same-size skeleton holds the spot; if it isn't\n // installed the spot stays empty and an install hint is logged.\n const { module: qrLib, failed } = useOptionalPeer(qrPeer)\n const QRCodeSVG = qrLib?.QRCodeSVG\n\n // 'H' error correction by default when a centre image is present, so the logo can cover the middle\n // without breaking the code; otherwise 'M'. An explicit `level` always wins.\n const resolvedLevel: QrCodeLevel = level ?? (image ? 'H' : 'M')\n\n const imageSettings =\n image != null\n ? (() => {\n const img = typeof image === 'string' ? { src: image } : image\n const dim = Math.round(size * 0.22)\n return {\n src: img.src,\n width: img.width ?? dim,\n height: img.height ?? dim,\n excavate: img.excavate ?? true,\n }\n })()\n : undefined\n\n // The foreground (modules) follows the `color` token via `--tz-qr-fg`. The default `text` is left to\n // CSS (so `.framed` can force dark modules on the white card in dark mode); a custom token is pinned\n // inline, so it wins over that CSS fallback and is rendered exactly as asked.\n const fgVar = color === 'text' ? undefined : { '--tz-qr-fg': `var(--tz-color-${color})` }\n\n return (\n <div\n ref={ref}\n role=\"img\"\n aria-label={ariaLabel}\n className={clsx(styles.root, framed && styles.framed, className)}\n style={{ ...fgVar, ...style } as CSSProperties}\n {...props}\n >\n {QRCodeSVG ? (\n <QRCodeSVG\n className={styles.code}\n value={value}\n size={size}\n level={resolvedLevel}\n marginSize={margin}\n // colors flow through CSS vars so `.framed` can guarantee contrast per theme (see the module)\n fgColor=\"var(--tz-qr-fg)\"\n bgColor=\"var(--tz-qr-bg)\"\n imageSettings={imageSettings}\n aria-hidden\n />\n ) : (\n <Skeleton\n variant=\"rect\"\n width={size}\n height={size}\n animation={failed ? false : 'shimmer'}\n className={styles.code}\n />\n )}\n {caption != null && (\n <Typography variant=\"caption\" color=\"muted\" className={styles.caption}>\n {caption}\n </Typography>\n )}\n </div>\n )\n})\n"],"names":["qrPeer","optionalPeer","QrCode","forwardRef","value","size","level","color","margin","image","caption","framed","className","style","ariaLabelProp","props","ref","t","useT","ariaLabel","qrLib","failed","useOptionalPeer","QRCodeSVG","resolvedLevel","imageSettings","img","dim","fgVar","jsxs","clsx","styles","jsx","Skeleton","Typography"],"mappings":";;;;;;;;;;;;GAqDaA,IAASC;AAAA,EACpB;AAAA,EACA;AAAA,EACA,MAAM,OAAO,cAAc;AAC7B,GAEaC,IAASC,EAAwC,SAC5D;AAAA,EACE,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,QAAAC,IAAS;AAAA,EACT,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,WAAAC;AAA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AA,YACR,WAAWgB,IAAS,KAAQ;AAAA,YAC5B,WAAWU,EAAO;AAAA,UAAA;AAAA,QAAA;AAAA,QAGrBrB,KAAW,QACV,gBAAAsB,EAACE,GAAA,EAAW,SAAQ,WAAU,OAAM,SAAQ,WAAWH,EAAO,SAC3D,UAAArB,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),r=require("react"),z=require("./Blockquote-BWGxIL_V.cjs"),C=require("./Button-
|
|
2
|
-
//# sourceMappingURL=RemoveDialog-
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),r=require("react"),z=require("./Blockquote-BWGxIL_V.cjs"),C=require("./Button-mBZOvgyZ.cjs"),N=require("./Code-CUdpWlY5.cjs"),j=require("./Icon-CBg21lKA.cjs"),I=require("./Modal-CxODxl81.cjs"),R=require("./TextField-CBYJIfau.cjs"),w=require("./Typography-d97DdbNd.cjs"),v=require("./ConfigProvider-DBU6rOIA.cjs"),E="_modalBody_1nqut_5",F="_body_1nqut_4",S="_iconBox_1nqut_20",O="_confirm_1nqut_37",L="_phrase_1nqut_45",i={modalBody:E,body:F,iconBox:S,confirm:O,phrase:L},M=r.forwardRef(function({open:s,onClose:t,onConfirm:l,title:d,message:b,confirmLabel:B,cancelLabel:_,loading:T=!1,confirmText:n},k){const c=v.useT(),[D,h]=r.useState(!1),o=T||D,[u,y]=r.useState(""),x=r.useRef(s);x.current!==s&&(x.current=s,s&&y(""));const m=n==null||u.trim()===n.trim(),g=r.useId(),p=()=>{o||t()},q=async()=>{if(!(!m||o))try{h(!0),await l(),t()}catch{}finally{h(!1)}};return e.jsx(I.Modal,{ref:k,open:s,onClose:p,size:"sm",bodyClassName:i.modalBody,title:d??c("removeDialog.title"),showCloseButton:!o,closeOnBackdrop:!o,closeOnEscape:!o,footer:e.jsxs(e.Fragment,{children:[e.jsx(C.Button,{variant:"text",size:"sm",onClick:p,disabled:o,children:_??c("common.cancel")}),e.jsx(C.Button,{color:"error",variant:"filled",size:"sm",onClick:q,loading:o,disabled:!m,children:B??c("common.delete")})]}),children:e.jsxs("div",{className:i.body,children:[e.jsx("div",{className:i.iconBox,"aria-hidden":!0,children:e.jsx(j.Icon,{name:"Trash"})}),e.jsx(w.Typography,{align:"center",children:b??c("removeDialog.message")}),n!=null&&e.jsxs("div",{className:i.confirm,children:[e.jsx(z.Blockquote,{id:g,size:"sm",color:"error",children:e.jsx(P,{text:n})}),e.jsx(R.TextField,{"aria-labelledby":g,placeholder:n,value:u,onChange:a=>y(a.target.value),onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),q())},adornment:u&&m?e.jsx(j.Icon,{name:"TickCircle",color:"success"}):void 0,adornmentPosition:"right",disabled:o,size:"sm",autoComplete:"off",autoCapitalize:"off",autoCorrect:"off",spellCheck:!1})]})]})})});function P({text:f}){const s=v.useT(),t="\0",[l,d=""]=s("removeDialog.typeToConfirm",{text:t}).split(t);return e.jsxs(e.Fragment,{children:[l,e.jsx(N.Code,{size:"sm",color:"error",className:i.phrase,children:f}),d]})}exports.RemoveDialog=M;
|
|
2
|
+
//# sourceMappingURL=RemoveDialog-BnOtR6-q.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoveDialog-
|
|
1
|
+
{"version":3,"file":"RemoveDialog-BnOtR6-q.cjs","sources":["../src/components/RemoveDialog/RemoveDialog.tsx"],"sourcesContent":["import { forwardRef, useId, useRef, useState, type KeyboardEvent, type ReactNode } from 'react'\nimport { useT } from '../../theme'\nimport { Blockquote } from '../Blockquote'\nimport { Button } from '../Button'\nimport { Code } from '../Code'\nimport { Icon } from '../Icon'\nimport { Modal } from '../Modal'\nimport { TextField } from '../TextField'\nimport { Typography } from '../Typography'\nimport styles from './RemoveDialog.module.css'\n\nexport interface RemoveDialogProps {\n /** Whether the dialog is open. */\n open: boolean\n /** Called on Cancel, the × button, backdrop, or Escape (ignored while a confirm is in flight). */\n onClose: () => void\n /**\n * The destructive action. May be async — while its promise is pending the Delete button shows a\n * loader and the dialog locks (no dismiss); on success the dialog **auto-closes**, on rejection it\n * stays open so the user can retry (surface the error yourself, e.g. a toast).\n */\n onConfirm: () => void | Promise<void>\n /** Header title. Defaults to `\"Remove\"`. */\n title?: ReactNode\n /** Body prompt shown under the icon. Defaults to `\"Are you sure you want to delete?\"`. */\n message?: ReactNode\n /** Confirm (destructive) button label. Defaults to `\"Delete\"`. */\n confirmLabel?: string\n /** Cancel button label. Defaults to `\"Cancel\"`. */\n cancelLabel?: string\n /** External loading override — combined with the internal async-confirm state. */\n loading?: boolean\n /**\n * **Type-to-confirm** for high-risk deletes: the user must type this exact text (e.g. `\"remove user\"`)\n * into a field before Delete enables. Case-sensitive; surrounding whitespace is ignored. The field is\n * focused on open, cleared on every open, and Enter confirms once it matches.\n */\n confirmText?: string\n}\n\n/**\n * A ready-made delete confirmation — a thin convenience wrapper over `Modal` for the ubiquitous\n * \"Are you sure you want to delete?\" prompt. Hardcodes the destructive flavor (a `Trash` glyph in a\n * soft error circle + an `error` Delete button); just wire `open` / `onClose` / `onConfirm`. An async\n * `onConfirm` drives the button loader and locks dismissal, then auto-closes on success. `confirmText`\n * adds **type-to-confirm**: Delete stays disabled until the user types that exact text. Built on\n * `Modal`, so it inherits the portal, scroll-lock, focus-trap, and backdrop/Escape dismissal.\n *\n * @example\n * const { isOpen, open, close } = useDisclosure()\n * <RemoveDialog open={isOpen} onClose={close} onConfirm={() => deleteItem(id)} />\n */\nexport const RemoveDialog = forwardRef<HTMLDivElement, RemoveDialogProps>(function RemoveDialog(\n {\n open,\n onClose,\n onConfirm,\n title,\n message,\n confirmLabel,\n cancelLabel,\n loading = false,\n confirmText,\n },\n ref,\n) {\n const t = useT()\n const [submitting, setSubmitting] = useState(false)\n const busy = loading || submitting\n\n // type-to-confirm — cleared every time the dialog opens (\"adjust state on prop change\", no effect)\n const [typed, setTyped] = useState('')\n const wasOpen = useRef(open)\n if (wasOpen.current !== open) {\n wasOpen.current = open\n if (open) setTyped('')\n }\n const matches = confirmText == null || typed.trim() === confirmText.trim()\n const promptId = useId()\n\n // dismissal is blocked while the confirm is running (so the delete can't be abandoned mid-flight)\n const handleClose = () => {\n if (!busy) onClose()\n }\n\n const handleConfirm = async () => {\n if (!matches || busy) return\n try {\n setSubmitting(true)\n await onConfirm()\n onClose() // auto-close on success\n } catch {\n // keep the dialog open on failure so the user can retry; the consumer surfaces the error\n } finally {\n setSubmitting(false)\n }\n }\n\n return (\n <Modal\n ref={ref}\n open={open}\n onClose={handleClose}\n size=\"sm\"\n bodyClassName={styles.modalBody}\n title={title ?? t('removeDialog.title')}\n showCloseButton={!busy}\n closeOnBackdrop={!busy}\n closeOnEscape={!busy}\n footer={\n <>\n <Button variant=\"text\" size=\"sm\" onClick={handleClose} disabled={busy}>\n {cancelLabel ?? t('common.cancel')}\n </Button>\n <Button\n color=\"error\"\n variant=\"filled\"\n size=\"sm\"\n onClick={handleConfirm}\n loading={busy}\n disabled={!matches}\n >\n {confirmLabel ?? t('common.delete')}\n </Button>\n </>\n }\n >\n <div className={styles.body}>\n <div className={styles.iconBox} aria-hidden>\n <Icon name=\"Trash\" />\n </div>\n <Typography align=\"center\">{message ?? t('removeDialog.message')}</Typography>\n {confirmText != null && (\n <div className={styles.confirm}>\n {/* the instruction, as an error-tinted quote — it also names the field (aria-labelledby) */}\n <Blockquote id={promptId} size=\"sm\" color=\"error\">\n <TypeToConfirmLabel text={confirmText} />\n </Blockquote>\n <TextField\n aria-labelledby={promptId}\n placeholder={confirmText}\n value={typed}\n onChange={(event) => setTyped(event.target.value)}\n onKeyDown={(event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n event.preventDefault()\n void handleConfirm()\n }\n }}\n // a green tick once the phrase matches — the field confirms itself before Delete does\n adornment={typed && matches ? <Icon name=\"TickCircle\" color=\"success\" /> : undefined}\n adornmentPosition=\"right\"\n disabled={busy}\n size=\"sm\"\n autoComplete=\"off\"\n autoCapitalize=\"off\"\n autoCorrect=\"off\"\n spellCheck={false}\n />\n </div>\n )}\n </div>\n </Modal>\n )\n})\n\n/** \"Type {text} to confirm\" with the text set as inline `Code`, so the exact phrase stands out. */\nfunction TypeToConfirmLabel({ text }: { text: string }) {\n const t = useT()\n // translate with a sentinel in place of {text}, then split around it to slot the Code element in\n const SENTINEL = '\\u0000'\n const [before, after = ''] = t('removeDialog.typeToConfirm', { text: SENTINEL }).split(SENTINEL)\n return (\n <>\n {before}\n <Code size=\"sm\" color=\"error\" className={styles.phrase}>\n {text}\n </Code>\n {after}\n </>\n )\n}\n"],"names":["RemoveDialog","forwardRef","open","onClose","onConfirm","title","message","confirmLabel","cancelLabel","loading","confirmText","ref","t","useT","submitting","setSubmitting","useState","busy","typed","setTyped","wasOpen","useRef","matches","promptId","useId","handleClose","handleConfirm","jsx","Modal","styles","jsxs","Fragment","Button","Icon","Typography","Blockquote","TypeToConfirmLabel","TextField","event","text","SENTINEL","before","after","Code"],"mappings":"ygBAoDaA,EAAeC,EAAAA,WAA8C,SACxE,CACE,KAAAC,EACA,QAAAC,EACA,UAAAC,EACA,MAAAC,EACA,QAAAC,EACA,aAAAC,EACA,YAAAC,EACA,QAAAC,EAAU,GACV,YAAAC,CACF,EACAC,EACA,CACA,MAAMC,EAAIC,EAAAA,KAAA,EACJ,CAACC,EAAYC,CAAa,EAAIC,EAAAA,SAAS,EAAK,EAC5CC,EAAOR,GAAWK,EAGlB,CAACI,EAAOC,CAAQ,EAAIH,EAAAA,SAAS,EAAE,EAC/BI,EAAUC,EAAAA,OAAOnB,CAAI,EACvBkB,EAAQ,UAAYlB,IACtBkB,EAAQ,QAAUlB,EACdA,KAAe,EAAE,GAEvB,MAAMoB,EAAUZ,GAAe,MAAQQ,EAAM,KAAA,IAAWR,EAAY,KAAA,EAC9Da,EAAWC,EAAAA,MAAA,EAGXC,EAAc,IAAM,CACnBR,GAAMd,EAAA,CACb,EAEMuB,EA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,EACP,SAAWoB,GAAUnB,EAASmB,EAAM,OAAO,KAAK,EAChD,UAAYA,GAA2C,CACjDA,EAAM,MAAQ,UAChBA,EAAM,eAAA,EACDZ,EAAA,EAET,EAEA,UAAWR,GAASI,EAAUK,EAAAA,IAACM,EAAAA,MAAK,KAAK,aAAa,MAAM,SAAA,CAAU,EAAK,OAC3E,kBAAkB,QAClB,SAAUhB,EACV,KAAK,KACL,aAAa,MACb,eAAe,MACf,YAAY,MACZ,WAAY,EAAA,CAAA,CACd,CAAA,CACF,CAAA,CAAA,CAEJ,CAAA,CAAA,CAGN,CAAC,EAGD,SAASmB,EAAmB,CAAE,KAAAG,GAA0B,CACtD,MAAM3B,EAAIC,EAAAA,KAAA,EAEJ2B,EAAW,KACX,CAACC,EAAQC,EAAQ,EAAE,EAAI9B,EAAE,6BAA8B,CAAE,KAAM4B,CAAA,CAAU,EAAE,MAAMA,CAAQ,EAC/F,OACEV,EAAAA,KAAAC,WAAA,CACG,SAAA,CAAAU,EACDd,EAAAA,IAACgB,EAAAA,MAAK,KAAK,KAAK,MAAM,QAAQ,UAAWd,EAAO,OAC7C,SAAAU,CAAA,CACH,EACCG,CAAA,EACH,CAEJ"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as o, jsxs as l, Fragment as T } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as R, useState as _, useRef as E, useId as I } from "react";
|
|
3
3
|
import { B as O } from "./Blockquote-Ma-2naET.js";
|
|
4
|
-
import { B as v } from "./Button-
|
|
4
|
+
import { B as v } from "./Button-C415LPw_.js";
|
|
5
5
|
import { C as S } from "./Code-DaEpXHfF.js";
|
|
6
|
-
import { b as B } from "./Icon-
|
|
7
|
-
import { M as j } from "./Modal-
|
|
8
|
-
import { T as F } from "./TextField-
|
|
6
|
+
import { b as B } from "./Icon-B7DJn8Tw.js";
|
|
7
|
+
import { M as j } from "./Modal-DpoiMMM3.js";
|
|
8
|
+
import { T as F } from "./TextField-CyKIx-d-.js";
|
|
9
9
|
import { T as L } from "./Typography-ChSuxgkc.js";
|
|
10
|
-
import { a as k } from "./ConfigProvider-
|
|
10
|
+
import { a as k } from "./ConfigProvider-DVDGtCUc.js";
|
|
11
11
|
const M = "_modalBody_1nqut_5", K = "_body_1nqut_4", P = "_iconBox_1nqut_20", A = "_confirm_1nqut_37", G = "_phrase_1nqut_45", a = {
|
|
12
12
|
modalBody: M,
|
|
13
13
|
body: K,
|
|
@@ -106,4 +106,4 @@ function H({ text: u }) {
|
|
|
106
106
|
export {
|
|
107
107
|
eo as R
|
|
108
108
|
};
|
|
109
|
-
//# sourceMappingURL=RemoveDialog-
|
|
109
|
+
//# sourceMappingURL=RemoveDialog-MhEU5Zl3.js.map
|