@techzyapp/ui-library 1.0.42 → 1.0.44
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-9KE3ll-D.js +101 -0
- package/dist/AdminRoot-9KE3ll-D.js.map +1 -0
- package/dist/AdminRoot-BMzHo0n7.cjs +2 -0
- package/dist/AdminRoot-BMzHo0n7.cjs.map +1 -0
- package/dist/Alert-BFfzpPNd.js +70 -0
- package/dist/{Alert-D6oBxBdP.js.map → Alert-BFfzpPNd.js.map} +1 -1
- package/dist/Alert-DS8TzpIS.cjs +2 -0
- package/dist/{Alert-C8BBxL_7.cjs.map → Alert-DS8TzpIS.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-CloqFpp1.js +34 -0
- package/dist/{Breadcrumbs-cXET6OM5.js.map → Breadcrumbs-CloqFpp1.js.map} +1 -1
- package/dist/Breadcrumbs-N2-sZWW5.cjs +2 -0
- package/dist/{Breadcrumbs-B-olYVdw.cjs.map → Breadcrumbs-N2-sZWW5.cjs.map} +1 -1
- package/dist/Button-5LQtDA9d.js +72 -0
- package/dist/{Button-0ZgdNjX-.js.map → Button-5LQtDA9d.js.map} +1 -1
- package/dist/Button-Bxztlybi.cjs +2 -0
- package/dist/{Button-CwrDiZek.cjs.map → Button-Bxztlybi.cjs.map} +1 -1
- package/dist/{Calendar-CxzdnzdK.js → Calendar-BIKo_aus.js} +5 -5
- package/dist/{Calendar-CxzdnzdK.js.map → Calendar-BIKo_aus.js.map} +1 -1
- package/dist/{Calendar-d3CX5UJp.cjs → Calendar-CsBgaKZ-.cjs} +2 -2
- package/dist/{Calendar-d3CX5UJp.cjs.map → Calendar-CsBgaKZ-.cjs.map} +1 -1
- package/dist/{Card-CxnUoWsi.cjs → Card-Csn3FaMl.cjs} +2 -2
- package/dist/{Card-CxnUoWsi.cjs.map → Card-Csn3FaMl.cjs.map} +1 -1
- package/dist/{Card-CjqStov5.js → Card-DMwQ7rMk.js} +4 -4
- package/dist/{Card-CjqStov5.js.map → Card-DMwQ7rMk.js.map} +1 -1
- package/dist/Chip-BdCZ44I8.cjs +2 -0
- package/dist/{Chip-BkU3yx6G.cjs.map → Chip-BdCZ44I8.cjs.map} +1 -1
- package/dist/Chip-C7IkFuM1.js +92 -0
- package/dist/{Chip-CzJjbaKx.js.map → Chip-C7IkFuM1.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-BnXxxqAW.cjs +2 -0
- package/dist/{CodeBlock-DRBQ_S5t.cjs.map → CodeBlock-BnXxxqAW.cjs.map} +1 -1
- package/dist/CodeBlock-C10JN6DR.js +96 -0
- package/dist/{CodeBlock-BHcvQrs9.js.map → CodeBlock-C10JN6DR.js.map} +1 -1
- package/dist/{ColorPicker-BzCEMN7B.cjs → ColorPicker-CVddGc-n.cjs} +2 -2
- package/dist/{ColorPicker-BzCEMN7B.cjs.map → ColorPicker-CVddGc-n.cjs.map} +1 -1
- package/dist/{ColorPicker-BQKFdTNr.js → ColorPicker-z8_-77LO.js} +3 -3
- package/dist/{ColorPicker-BQKFdTNr.js.map → ColorPicker-z8_-77LO.js.map} +1 -1
- package/dist/{ColorPickerPanel-kl2jUix-.cjs → ColorPickerPanel-DJY6-EqO.cjs} +2 -2
- package/dist/{ColorPickerPanel-kl2jUix-.cjs.map → ColorPickerPanel-DJY6-EqO.cjs.map} +1 -1
- package/dist/{ColorPickerPanel-DKTKC9KH.js → ColorPickerPanel-y4A2LLLf.js} +3 -3
- package/dist/{ColorPickerPanel-DKTKC9KH.js.map → ColorPickerPanel-y4A2LLLf.js.map} +1 -1
- package/dist/{ColorRamp-n7muILK3.cjs → ColorRamp-DvRsdOWy.cjs} +2 -2
- package/dist/{ColorRamp-n7muILK3.cjs.map → ColorRamp-DvRsdOWy.cjs.map} +1 -1
- package/dist/{ColorRamp-yfMyJCyx.js → ColorRamp-Dvit8yoP.js} +2 -2
- package/dist/{ColorRamp-yfMyJCyx.js.map → ColorRamp-Dvit8yoP.js.map} +1 -1
- package/dist/{ConfigProvider-D61cpCz-.js → ConfigProvider-CYgmMH4j.js} +133 -126
- package/dist/ConfigProvider-CYgmMH4j.js.map +1 -0
- package/dist/ConfigProvider-Cf-awvZs.cjs +2 -0
- package/dist/ConfigProvider-Cf-awvZs.cjs.map +1 -0
- package/dist/{CopyButton-DlSi82gv.cjs → CopyButton-BOp7waEt.cjs} +2 -2
- package/dist/{CopyButton-DlSi82gv.cjs.map → CopyButton-BOp7waEt.cjs.map} +1 -1
- package/dist/{CopyButton-ecxn-ghi.js → CopyButton-_iMBE4q_.js} +4 -4
- package/dist/{CopyButton-ecxn-ghi.js.map → CopyButton-_iMBE4q_.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-BjZ_P21i.cjs → DatePicker-UQwpH-rw.cjs} +2 -2
- package/dist/{DatePicker-BjZ_P21i.cjs.map → DatePicker-UQwpH-rw.cjs.map} +1 -1
- package/dist/{DatePicker-CAGpJbDi.js → DatePicker-X5hZVSW6.js} +6 -6
- package/dist/{DatePicker-CAGpJbDi.js.map → DatePicker-X5hZVSW6.js.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-BJmF0Su6.js → DateTimePicker-Ch1kUHEb.js} +9 -9
- package/dist/{DateTimePicker-BJmF0Su6.js.map → DateTimePicker-Ch1kUHEb.js.map} +1 -1
- package/dist/{DateTimePicker-DZqWQeUL.cjs → DateTimePicker-ClTZGMON.cjs} +2 -2
- package/dist/{DateTimePicker-DZqWQeUL.cjs.map → DateTimePicker-ClTZGMON.cjs.map} +1 -1
- package/dist/{DescriptionList-Knq5eCiY.js → DescriptionList-Cque-iYk.js} +69 -69
- package/dist/{DescriptionList-Knq5eCiY.js.map → DescriptionList-Cque-iYk.js.map} +1 -1
- package/dist/DescriptionList-IVAvgpEL.cjs +2 -0
- package/dist/{DescriptionList-CvPDn-kh.cjs.map → DescriptionList-IVAvgpEL.cjs.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-CX1g47y_.cjs → EmptyState-C84B-E8a.cjs} +2 -2
- package/dist/{EmptyState-CX1g47y_.cjs.map → EmptyState-C84B-E8a.cjs.map} +1 -1
- package/dist/{EmptyState-Dqtpmtje.js → EmptyState-Yts_p-jZ.js} +3 -3
- package/dist/{EmptyState-Dqtpmtje.js.map → EmptyState-Yts_p-jZ.js.map} +1 -1
- package/dist/{ErrorBoundary-Dos7VLb-.js → ErrorBoundary-BgMOPle0.js} +3 -3
- package/dist/{ErrorBoundary-Dos7VLb-.js.map → ErrorBoundary-BgMOPle0.js.map} +1 -1
- package/dist/{ErrorBoundary-B8KwWXXp.cjs → ErrorBoundary-DtYswKp3.cjs} +2 -2
- package/dist/{ErrorBoundary-B8KwWXXp.cjs.map → ErrorBoundary-DtYswKp3.cjs.map} +1 -1
- package/dist/{ErrorState-CwCqd2PU.cjs → ErrorState-Aa8LVjkl.cjs} +2 -2
- package/dist/{ErrorState-CwCqd2PU.cjs.map → ErrorState-Aa8LVjkl.cjs.map} +1 -1
- package/dist/{ErrorState-KhzrGIJ-.js → ErrorState-BE9Rcmht.js} +8 -8
- package/dist/{ErrorState-KhzrGIJ-.js.map → ErrorState-BE9Rcmht.js.map} +1 -1
- package/dist/FileCard-Chfx0QdF.cjs +2 -0
- package/dist/{FileCard-DEc10T2G.cjs.map → FileCard-Chfx0QdF.cjs.map} +1 -1
- package/dist/{FileCard-SSuFS13E.js → FileCard-m3i_8yKR.js} +33 -33
- package/dist/{FileCard-SSuFS13E.js.map → FileCard-m3i_8yKR.js.map} +1 -1
- package/dist/FileUploader-B27Y4rak.js +706 -0
- package/dist/FileUploader-B27Y4rak.js.map +1 -0
- package/dist/FileUploader-DkvFO0N_.cjs +2 -0
- package/dist/FileUploader-DkvFO0N_.cjs.map +1 -0
- package/dist/{Flag-B1ZvZVXi.cjs → Flag-BvZB3295.cjs} +2 -2
- package/dist/{Flag-B1ZvZVXi.cjs.map → Flag-BvZB3295.cjs.map} +1 -1
- package/dist/{Flag-BEIqYQZg.js → Flag-C1HwnZXJ.js} +2 -2
- package/dist/{Flag-BEIqYQZg.js.map → Flag-C1HwnZXJ.js.map} +1 -1
- package/dist/{FullscreenToggle-I_In47BB.js → FullscreenToggle-B4ynXdCP.js} +4 -4
- package/dist/{FullscreenToggle-I_In47BB.js.map → FullscreenToggle-B4ynXdCP.js.map} +1 -1
- package/dist/{FullscreenToggle-Po769CoC.cjs → FullscreenToggle-CEFZQ5OC.cjs} +2 -2
- package/dist/{FullscreenToggle-Po769CoC.cjs.map → FullscreenToggle-CEFZQ5OC.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-EaExCXRq.js +68 -0
- package/dist/{IconButton-D9MCwRK_.js.map → IconButton-EaExCXRq.js.map} +1 -1
- package/dist/IconButton-wW1o4HHw.cjs +2 -0
- package/dist/{IconButton-CxSXEYce.cjs.map → IconButton-wW1o4HHw.cjs.map} +1 -1
- package/dist/ImageEditor-DTFQZ6ON.js +2709 -0
- package/dist/ImageEditor-DTFQZ6ON.js.map +1 -0
- package/dist/ImageEditor-D_HKfDbx.cjs +60 -0
- package/dist/ImageEditor-D_HKfDbx.cjs.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-5zp2MPm5.cjs → Loader-DNR2_YHm.cjs} +2 -2
- package/dist/{Loader-5zp2MPm5.cjs.map → Loader-DNR2_YHm.cjs.map} +1 -1
- package/dist/{Loader-Bluu6z0-.js → Loader-D_Foo6Hj.js} +2 -2
- package/dist/{Loader-Bluu6z0-.js.map → Loader-D_Foo6Hj.js.map} +1 -1
- package/dist/{LocationPicker-CGHXTIml.cjs → LocationPicker-CdO37PKg.cjs} +2 -2
- package/dist/{LocationPicker-CGHXTIml.cjs.map → LocationPicker-CdO37PKg.cjs.map} +1 -1
- package/dist/{LocationPicker-hULpHBVG.js → LocationPicker-DGbnbTW9.js} +8 -8
- package/dist/{LocationPicker-hULpHBVG.js.map → LocationPicker-DGbnbTW9.js.map} +1 -1
- package/dist/Modal-1rIBMvKH.js +154 -0
- package/dist/Modal-1rIBMvKH.js.map +1 -0
- package/dist/Modal-Du-uVpYw.cjs +2 -0
- package/dist/Modal-Du-uVpYw.cjs.map +1 -0
- package/dist/MultiSelect-BoqunsM9.js +219 -0
- package/dist/{MultiSelect-CHLMpim4.js.map → MultiSelect-BoqunsM9.js.map} +1 -1
- package/dist/MultiSelect-lAAaD0uL.cjs +2 -0
- package/dist/{MultiSelect-BdPvjiTj.cjs.map → MultiSelect-lAAaD0uL.cjs.map} +1 -1
- package/dist/{NumberField-C-FZ-uRI.cjs → NumberField-CyUA6eob.cjs} +2 -2
- package/dist/{NumberField-C-FZ-uRI.cjs.map → NumberField-CyUA6eob.cjs.map} +1 -1
- package/dist/{NumberField-BlpFmetF.js → NumberField-DHFGNQjZ.js} +4 -4
- package/dist/{NumberField-BlpFmetF.js.map → NumberField-DHFGNQjZ.js.map} +1 -1
- package/dist/OtpField-CIy5OtXI.cjs +2 -0
- package/dist/{OtpField-Drjy2wwq.cjs.map → OtpField-CIy5OtXI.cjs.map} +1 -1
- package/dist/{OtpField-D4-r7I0A.js → OtpField-pL9nj4AW.js} +61 -61
- package/dist/{OtpField-D4-r7I0A.js.map → OtpField-pL9nj4AW.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-DyDj1wQZ.js → PageError-C5SO0mVJ.js} +5 -5
- package/dist/{PageError-DyDj1wQZ.js.map → PageError-C5SO0mVJ.js.map} +1 -1
- package/dist/{PageError-DXUOkE14.cjs → PageError-DbokLmOY.cjs} +2 -2
- package/dist/{PageError-DXUOkE14.cjs.map → PageError-DbokLmOY.cjs.map} +1 -1
- package/dist/{PageLayout-CoG0AaUs.cjs → PageLayout-B7ZDiNq8.cjs} +2 -2
- package/dist/{PageLayout-CoG0AaUs.cjs.map → PageLayout-B7ZDiNq8.cjs.map} +1 -1
- package/dist/{PageLayout-nsJa8CbT.js → PageLayout-Du-D6Pd4.js} +5 -5
- package/dist/{PageLayout-nsJa8CbT.js.map → PageLayout-Du-D6Pd4.js.map} +1 -1
- package/dist/{PageNotFound-BNNwMkwE.js → PageNotFound-DSkoMfed.js} +5 -5
- package/dist/{PageNotFound-BNNwMkwE.js.map → PageNotFound-DSkoMfed.js.map} +1 -1
- package/dist/{PageNotFound-CGSxT_n9.cjs → PageNotFound-DfNwdtgJ.cjs} +2 -2
- package/dist/{PageNotFound-CGSxT_n9.cjs.map → PageNotFound-DfNwdtgJ.cjs.map} +1 -1
- package/dist/Pagination-BH8ACaAC.js +139 -0
- package/dist/{Pagination-tuWRnGwR.js.map → Pagination-BH8ACaAC.js.map} +1 -1
- package/dist/Pagination-DO2Os4an.cjs +2 -0
- package/dist/{Pagination-CZtewveA.cjs.map → Pagination-DO2Os4an.cjs.map} +1 -1
- package/dist/{PaletteField-CTPl3D43.js → PaletteField-BFb0PQ-S.js} +3 -3
- package/dist/{PaletteField-CTPl3D43.js.map → PaletteField-BFb0PQ-S.js.map} +1 -1
- package/dist/{PaletteField-PDcu2vUp.cjs → PaletteField-BfvcJvGM.cjs} +2 -2
- package/dist/{PaletteField-PDcu2vUp.cjs.map → PaletteField-BfvcJvGM.cjs.map} +1 -1
- package/dist/PhoneField-C-wOm7g5.cjs +2 -0
- package/dist/{PhoneField-BPYg5ZHW.cjs.map → PhoneField-C-wOm7g5.cjs.map} +1 -1
- package/dist/{PhoneField-pdWDCszb.js → PhoneField-DFhGWgbK.js} +106 -106
- package/dist/{PhoneField-pdWDCszb.js.map → PhoneField-DFhGWgbK.js.map} +1 -1
- package/dist/{Popconfirm-cNpJmkuR.cjs → Popconfirm-_53vtMI0.cjs} +2 -2
- package/dist/{Popconfirm-cNpJmkuR.cjs.map → Popconfirm-_53vtMI0.cjs.map} +1 -1
- package/dist/{Popconfirm-CMVzLaC_.js → Popconfirm-o5da44ra.js} +4 -4
- package/dist/{Popconfirm-CMVzLaC_.js.map → Popconfirm-o5da44ra.js.map} +1 -1
- package/dist/{Progress-x12Rkh06.cjs → Progress-BSinoQ8t.cjs} +2 -2
- package/dist/{Progress-x12Rkh06.cjs.map → Progress-BSinoQ8t.cjs.map} +1 -1
- package/dist/{Progress-BNEFGn-O.js → Progress-CHzNwegP.js} +2 -2
- package/dist/{Progress-BNEFGn-O.js.map → Progress-CHzNwegP.js.map} +1 -1
- package/dist/{QrCode-CrNJZV_8.js → QrCode-C3hAfNP6.js} +2 -2
- package/dist/{QrCode-CrNJZV_8.js.map → QrCode-C3hAfNP6.js.map} +1 -1
- package/dist/{QrCode-TcQQE0h7.cjs → QrCode-tNNnsbHM.cjs} +2 -2
- package/dist/{QrCode-TcQQE0h7.cjs.map → QrCode-tNNnsbHM.cjs.map} +1 -1
- package/dist/{RemoveDialog-ARFp1UJM.js → RemoveDialog-CXy-PY-G.js} +6 -6
- package/dist/{RemoveDialog-ARFp1UJM.js.map → RemoveDialog-CXy-PY-G.js.map} +1 -1
- package/dist/{RemoveDialog-IWOAQFNK.cjs → RemoveDialog-Hi_gV-8A.cjs} +2 -2
- package/dist/{RemoveDialog-IWOAQFNK.cjs.map → RemoveDialog-Hi_gV-8A.cjs.map} +1 -1
- package/dist/RichTextEditor-BhVE1q4U.cjs +2 -0
- package/dist/RichTextEditor-BhVE1q4U.cjs.map +1 -0
- package/dist/RichTextEditor-DQz9jGD3.js +1011 -0
- package/dist/RichTextEditor-DQz9jGD3.js.map +1 -0
- package/dist/{RootLayout-CZ2GQ8XA.js → RootLayout-CjT5uHlt.js} +21 -21
- package/dist/RootLayout-CjT5uHlt.js.map +1 -0
- package/dist/{RootLayout-DStUP263.cjs → RootLayout-iSGY4MsS.cjs} +2 -2
- package/dist/RootLayout-iSGY4MsS.cjs.map +1 -0
- package/dist/Select-DVoL547R.cjs +2 -0
- package/dist/{Select-C2DIfuoB.cjs.map → Select-DVoL547R.cjs.map} +1 -1
- package/dist/{Select-KGsA8PbI.js → Select-DuLDLnnb.js} +47 -47
- package/dist/{Select-KGsA8PbI.js.map → Select-DuLDLnnb.js.map} +1 -1
- package/dist/Sidebar-DRQo4zAF.cjs +2 -0
- package/dist/{Sidebar-wK1_xaY_.cjs.map → Sidebar-DRQo4zAF.cjs.map} +1 -1
- package/dist/{Sidebar-_pcwxdd8.js → Sidebar-DvQmuBNK.js} +59 -59
- package/dist/{Sidebar-_pcwxdd8.js.map → Sidebar-DvQmuBNK.js.map} +1 -1
- package/dist/{Slider-Cpc5_dPl.js → Slider-D-QjclQJ.js} +2 -2
- package/dist/{Slider-Cpc5_dPl.js.map → Slider-D-QjclQJ.js.map} +1 -1
- package/dist/{Slider-CXAz9SUY.cjs → Slider-DxnCQRSH.cjs} +2 -2
- package/dist/{Slider-CXAz9SUY.cjs.map → Slider-DxnCQRSH.cjs.map} +1 -1
- package/dist/{SpeedDial-BT_boD06.cjs → SpeedDial-37OMwj9C.cjs} +2 -2
- package/dist/{SpeedDial-BT_boD06.cjs.map → SpeedDial-37OMwj9C.cjs.map} +1 -1
- package/dist/{SpeedDial-SMMfes9f.js → SpeedDial-BBQ9y6lm.js} +3 -3
- package/dist/{SpeedDial-SMMfes9f.js.map → SpeedDial-BBQ9y6lm.js.map} +1 -1
- package/dist/Stepper-CU5Y0kfj.js +168 -0
- package/dist/{Stepper-CR0Mlkq7.js.map → Stepper-CU5Y0kfj.js.map} +1 -1
- package/dist/Stepper-WqkfGPnQ.cjs +2 -0
- package/dist/{Stepper-BmA_DjTS.cjs.map → Stepper-WqkfGPnQ.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-D-F68lcm.js → Table-BECUUZtf.js} +346 -346
- package/dist/Table-BECUUZtf.js.map +1 -0
- package/dist/Table-BnlvrRMr.cjs +2 -0
- package/dist/Table-BnlvrRMr.cjs.map +1 -0
- package/dist/Tabs-BXAHddi7.js +193 -0
- package/dist/{Tabs-DP0aZ5TB.js.map → Tabs-BXAHddi7.js.map} +1 -1
- package/dist/Tabs-DiL1vNW3.cjs +2 -0
- package/dist/{Tabs-Cgp6D1WP.cjs.map → Tabs-DiL1vNW3.cjs.map} +1 -1
- package/dist/{TagsField-9nKu6ZW4.cjs → TagsField-BsV_6dff.cjs} +2 -2
- package/dist/{TagsField-9nKu6ZW4.cjs.map → TagsField-BsV_6dff.cjs.map} +1 -1
- package/dist/{TagsField-CcY9MTMw.js → TagsField-C1SgykAj.js} +5 -5
- package/dist/{TagsField-CcY9MTMw.js.map → TagsField-C1SgykAj.js.map} +1 -1
- package/dist/{TextField-C5MgCQIV.cjs → TextField-DUv689u2.cjs} +2 -2
- package/dist/{TextField-C5MgCQIV.cjs.map → TextField-DUv689u2.cjs.map} +1 -1
- package/dist/{TextField-0WvJsHhA.js → TextField-oZI7thoU.js} +4 -4
- package/dist/{TextField-0WvJsHhA.js.map → TextField-oZI7thoU.js.map} +1 -1
- package/dist/{ThemeToggle-DmCePuTy.js → ThemeToggle-5uHCUsX7.js} +4 -4
- package/dist/{ThemeToggle-DmCePuTy.js.map → ThemeToggle-5uHCUsX7.js.map} +1 -1
- package/dist/{ThemeToggle-BvcCxRpF.cjs → ThemeToggle-xn3roH0u.cjs} +2 -2
- package/dist/{ThemeToggle-BvcCxRpF.cjs.map → ThemeToggle-xn3roH0u.cjs.map} +1 -1
- package/dist/TimeColumns-By23LHZw.cjs +2 -0
- package/dist/{TimeColumns-Q-vsHFZU.cjs.map → TimeColumns-By23LHZw.cjs.map} +1 -1
- package/dist/TimeColumns-lO33mhX7.js +147 -0
- package/dist/{TimeColumns-WJRHQuFv.js.map → TimeColumns-lO33mhX7.js.map} +1 -1
- package/dist/{TimePicker-CvbQFzBf.cjs → TimePicker-BHFNH8LR.cjs} +2 -2
- package/dist/{TimePicker-CvbQFzBf.cjs.map → TimePicker-BHFNH8LR.cjs.map} +1 -1
- package/dist/{TimePicker-DJDuSxAg.js → TimePicker-Dl5p833O.js} +7 -7
- package/dist/{TimePicker-DJDuSxAg.js.map → TimePicker-Dl5p833O.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-BPBFZiTr.js +64 -0
- package/dist/Toaster-BPBFZiTr.js.map +1 -0
- package/dist/Toaster-D4T89N1S.cjs +2 -0
- package/dist/Toaster-D4T89N1S.cjs.map +1 -0
- 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-DKXznBtD.js → TranslatedFields-Clsr84XC.js} +13 -13
- package/dist/{TranslatedFields-DKXznBtD.js.map → TranslatedFields-Clsr84XC.js.map} +1 -1
- package/dist/{TranslatedFields-CuK5KKzE.cjs → TranslatedFields-LdeJeHEp.cjs} +2 -2
- package/dist/{TranslatedFields-CuK5KKzE.cjs.map → TranslatedFields-LdeJeHEp.cjs.map} +1 -1
- package/dist/{UserCard-DbudGMvG.cjs → UserCard-CQOiWppq.cjs} +2 -2
- package/dist/{UserCard-DbudGMvG.cjs.map → UserCard-CQOiWppq.cjs.map} +1 -1
- package/dist/{UserCard-UG_Cwe-Y.js → UserCard-Cr75RwZb.js} +5 -5
- package/dist/{UserCard-UG_Cwe-Y.js.map → UserCard-Cr75RwZb.js.map} +1 -1
- package/dist/app/AdminRoot.d.cts +11 -3
- package/dist/app/AdminRoot.d.ts +11 -3
- 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/ErrorBoundary.d.cts +1 -1
- package/dist/components/ErrorState/ErrorBoundary.d.ts +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 +8 -5
- package/dist/components/RichTextEditor/nodes/ImageNode.d.ts +8 -5
- package/dist/components/RichTextEditor/nodes/VideoNode.d.cts +4 -4
- package/dist/components/RichTextEditor/nodes/VideoNode.d.ts +4 -4
- package/dist/components/RootLayout/RootLayout.d.cts +3 -2
- package/dist/components/RootLayout/RootLayout.d.ts +3 -2
- 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/Toaster.d.cts +10 -4
- package/dist/components/Toast/Toaster.d.ts +10 -4
- 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.d.cts +2 -2
- package/dist/entries/theme.d.ts +2 -2
- package/dist/entries/theme.js +14 -13
- package/dist/i18n/messages.d.cts +61 -4
- package/dist/i18n/messages.d.ts +61 -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 +246 -240
- package/dist/index.js.map +1 -1
- package/dist/{messages-BiRLMy1E.js → messages-BZYBZ3GR.js} +101 -44
- package/dist/messages-BZYBZ3GR.js.map +1 -0
- package/dist/{messages-C_fRRCg6.cjs → messages-CTHjpVJq.cjs} +9 -9
- package/dist/messages-CTHjpVJq.cjs.map +1 -0
- package/dist/theme/ConfigProvider.d.cts +20 -0
- package/dist/theme/ConfigProvider.d.ts +20 -0
- package/dist/theme/index.d.cts +2 -2
- package/dist/theme/index.d.ts +2 -2
- package/dist/{useHomeTo-DQj9tVZI.js → useHomeTo-Biyc-Un8.js} +2 -2
- package/dist/{useHomeTo-DQj9tVZI.js.map → useHomeTo-Biyc-Un8.js.map} +1 -1
- package/dist/{useHomeTo-BaM7kBDh.cjs → useHomeTo-D7wcH6aw.cjs} +2 -2
- package/dist/{useHomeTo-BaM7kBDh.cjs.map → useHomeTo-D7wcH6aw.cjs.map} +1 -1
- package/dist/{useOptionMenu-BKC1y6oj.cjs → useOptionMenu-B40OOVsO.cjs} +2 -2
- package/dist/{useOptionMenu-BKC1y6oj.cjs.map → useOptionMenu-B40OOVsO.cjs.map} +1 -1
- package/dist/{useOptionMenu-Dom1-bqm.js → useOptionMenu-BTt8t9SM.js} +6 -6
- package/dist/{useOptionMenu-Dom1-bqm.js.map → useOptionMenu-BTt8t9SM.js.map} +1 -1
- package/package.json +1 -6
- package/dist/AdminRoot-DufZpgdm.js +0 -100
- package/dist/AdminRoot-DufZpgdm.js.map +0 -1
- package/dist/AdminRoot-DwJ5jdXr.cjs +0 -2
- package/dist/AdminRoot-DwJ5jdXr.cjs.map +0 -1
- package/dist/Alert-C8BBxL_7.cjs +0 -2
- package/dist/Alert-D6oBxBdP.js +0 -70
- package/dist/Breadcrumbs-B-olYVdw.cjs +0 -2
- package/dist/Breadcrumbs-cXET6OM5.js +0 -34
- package/dist/Button-0ZgdNjX-.js +0 -72
- package/dist/Button-CwrDiZek.cjs +0 -2
- package/dist/Chip-BkU3yx6G.cjs +0 -2
- package/dist/Chip-CzJjbaKx.js +0 -92
- package/dist/ChoiceCardGroup-C7Eengyd.cjs +0 -2
- package/dist/ChoiceCardGroup-q0yN-TeQ.js +0 -180
- package/dist/CodeBlock-BHcvQrs9.js +0 -96
- package/dist/CodeBlock-DRBQ_S5t.cjs +0 -2
- package/dist/ConfigProvider-BaiTKZKC.cjs +0 -2
- package/dist/ConfigProvider-BaiTKZKC.cjs.map +0 -1
- package/dist/ConfigProvider-D61cpCz-.js.map +0 -1
- 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-CvPDn-kh.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-DEc10T2G.cjs +0 -2
- package/dist/FileUploader-D58_6kDA.cjs +0 -2
- package/dist/FileUploader-D58_6kDA.cjs.map +0 -1
- package/dist/FileUploader-DfYOBFa4.js +0 -707
- package/dist/FileUploader-DfYOBFa4.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-CxSXEYce.cjs +0 -2
- package/dist/IconButton-D9MCwRK_.js +0 -68
- 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-C6Zgwz_6.js +0 -206
- package/dist/Modal-C6Zgwz_6.js.map +0 -1
- package/dist/Modal-D9_OG53G.cjs +0 -2
- package/dist/Modal-D9_OG53G.cjs.map +0 -1
- package/dist/MultiSelect-BdPvjiTj.cjs +0 -2
- package/dist/MultiSelect-CHLMpim4.js +0 -219
- package/dist/OtpField-Drjy2wwq.cjs +0 -2
- package/dist/Pagination-CZtewveA.cjs +0 -2
- package/dist/Pagination-tuWRnGwR.js +0 -139
- package/dist/PhoneField-BPYg5ZHW.cjs +0 -2
- package/dist/RichTextEditor-C9jT2cLl.cjs +0 -2
- package/dist/RichTextEditor-C9jT2cLl.cjs.map +0 -1
- package/dist/RichTextEditor-DrwJUEYz.js +0 -916
- package/dist/RichTextEditor-DrwJUEYz.js.map +0 -1
- package/dist/RootLayout-CZ2GQ8XA.js.map +0 -1
- package/dist/RootLayout-DStUP263.cjs.map +0 -1
- package/dist/Select-C2DIfuoB.cjs +0 -2
- package/dist/Sidebar-wK1_xaY_.cjs +0 -2
- package/dist/Stepper-BmA_DjTS.cjs +0 -2
- package/dist/Stepper-CR0Mlkq7.js +0 -168
- package/dist/Table-BkjY1Lwt.cjs +0 -2
- package/dist/Table-BkjY1Lwt.cjs.map +0 -1
- package/dist/Table-D-F68lcm.js.map +0 -1
- package/dist/Tabs-Cgp6D1WP.cjs +0 -2
- package/dist/Tabs-DP0aZ5TB.js +0 -193
- package/dist/TimeColumns-Q-vsHFZU.cjs +0 -2
- package/dist/TimeColumns-WJRHQuFv.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/Toaster-Bb5YEN5j.js +0 -63
- package/dist/Toaster-Bb5YEN5j.js.map +0 -1
- package/dist/Toaster-Dy1AonLa.cjs +0 -2
- package/dist/Toaster-Dy1AonLa.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
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ routing), theming, and built-in UI localization.
|
|
|
8
8
|
- **Theming** via `ConfigProvider` — 9 palette colors, light/dark, per-mode accent, custom fonts.
|
|
9
9
|
- **i18n out of the box** — the panel ships translated in **7 languages** (en · ka · es · de · it · fr · ru);
|
|
10
10
|
just list the ones you want.
|
|
11
|
-
- **Batteries included** — `Table`, `RichTextEditor`, `FileUploader
|
|
11
|
+
- **Batteries included** — `Table`, `RichTextEditor`, `FileUploader` (with a built-in `ImageEditor`), date/time pickers, the admin shell, and more.
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -25,19 +25,20 @@ build even if no page uses that component — install them all. Only `shiki`, `l
|
|
|
25
25
|
type-only in the library (skip it if you have no forms). [`CONSUMER.md`](./CONSUMER.md) §1 has the install
|
|
26
26
|
commands and known-good versions.
|
|
27
27
|
|
|
28
|
-
| Feature | Peer dependency
|
|
29
|
-
| -------------------------------------- |
|
|
30
|
-
| Forms (`useForm`) | `zod`
|
|
31
|
-
| Admin shell (`RootLayout` / `Sidebar`) | `@tanstack/react-router`
|
|
32
|
-
| `Table` | `@tanstack/react-table`
|
|
33
|
-
| Date/time pickers | `dayjs`
|
|
34
|
-
| `RichTextEditor` | `lexical` + `@lexical/*`
|
|
35
|
-
| `FileUploader` | `react-dropzone`, `@dnd-kit/*`, `@formkit/auto-animate
|
|
36
|
-
| `Table` row reorder | `@dnd-kit/*`
|
|
37
|
-
| `CodeBlock` | `shiki`
|
|
38
|
-
| `PhoneField` | `libphonenumber-js`
|
|
39
|
-
| `QrCode` | `qrcode.react`
|
|
40
|
-
| `LocationPicker` | none — loads Google Maps itself (key from `config.maps.apiKey`)
|
|
28
|
+
| Feature | Peer dependency |
|
|
29
|
+
| -------------------------------------- | --------------------------------------------------------------- |
|
|
30
|
+
| Forms (`useForm`) | `zod` |
|
|
31
|
+
| Admin shell (`RootLayout` / `Sidebar`) | `@tanstack/react-router` |
|
|
32
|
+
| `Table` | `@tanstack/react-table` |
|
|
33
|
+
| Date/time pickers | `dayjs` |
|
|
34
|
+
| `RichTextEditor` | `lexical` + `@lexical/*` |
|
|
35
|
+
| `FileUploader` | `react-dropzone`, `@dnd-kit/*`, `@formkit/auto-animate` |
|
|
36
|
+
| `Table` row reorder | `@dnd-kit/*` |
|
|
37
|
+
| `CodeBlock` | `shiki` |
|
|
38
|
+
| `PhoneField` | `libphonenumber-js` |
|
|
39
|
+
| `QrCode` | `qrcode.react` |
|
|
40
|
+
| `LocationPicker` | none — loads Google Maps itself (key from `config.maps.apiKey`) |
|
|
41
|
+
| `ImageEditor` | none |
|
|
41
42
|
|
|
42
43
|
---
|
|
43
44
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),a=require("react"),w=require("clsx"),g=require("./Icon-
|
|
2
|
-
//# sourceMappingURL=Accordion-
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),a=require("react"),w=require("clsx"),g=require("./Icon-CBg21lKA.cjs"),v=a.createContext(null);function E(){const i=a.useContext(v);if(!i)throw new Error("AccordionItem must be used within an <Accordion>");return i}const S="_accordion_1fia4_3",R="_sm_1fia4_12",D="_md_1fia4_16",M="_lg_1fia4_20",k="_item_1fia4_26",P="_header_1fia4_39",T="_icon_1fia4_65",z="_label_1fia4_70",B="_chevron_1fia4_75",F="_collapsible_1fia4_88",G="_collapsibleInner_1fia4_96",H="_body_1fia4_100",s={accordion:S,sm:R,md:D,lg:M,item:k,header:P,icon:T,label:z,chevron:B,collapsible:F,collapsibleInner:G,body:H},J=new Set(g.ICON_NAMES),O=a.forwardRef(function({value:r,label:d,icon:c,disabled:t=!1,className:_,children:u,...x},p){const{isOpen:I,toggle:h,size:b,disabled:A}=E(),l=I(r),j=A||t,f=a.useId(),o=a.useId(),y=c==null?null:typeof c=="string"&&J.has(c)?n.jsx(g.Icon,{name:c,size:b}):c;return n.jsxs("div",{ref:p,className:w.clsx(s.item,_),"data-open":l?"true":"false",...x,children:[n.jsxs("button",{type:"button",id:f,className:s.header,"aria-expanded":l,"aria-controls":o,disabled:j,onClick:()=>h(r),children:[y!=null&&n.jsx("span",{className:s.icon,"aria-hidden":!0,children:y}),n.jsx("span",{className:s.label,children:d}),n.jsx(g.Icon,{name:"ArrowDown4",size:b,className:s.chevron,"data-open":l?"true":"false"})]}),n.jsx("div",{className:s.collapsible,"data-open":l?"true":"false",children:n.jsx("div",{className:s.collapsibleInner,children:n.jsx("div",{id:o,role:"region","aria-labelledby":f,className:s.body,children:u})})})]})}),K=a.forwardRef(function({exclusive:r=!1,value:d,defaultValue:c,onChange:t,items:_,size:u="md",disabled:x=!1,children:p,className:I,style:h,...b},A){const l=d!==void 0,[j,f]=a.useState(c),o=l?d:j,q={isOpen:e=>r?o===e:Array.isArray(o)&&o.includes(e),toggle:e=>{let m;if(r)m=o===e?null:e;else{const N=Array.isArray(o)?o:[];m=N.includes(e)?N.filter(C=>C!==e):[...N,e]}l||f(m),t==null||t(m)},size:u,disabled:x};return n.jsx("div",{ref:A,className:w.clsx(s.accordion,s[u],I),style:h,...b,children:n.jsx(v.Provider,{value:q,children:_?_.map(e=>n.jsx(O,{value:e.value,label:e.label,icon:e.icon,disabled:e.disabled,children:e.content},e.value)):p})})});exports.Accordion=K;exports.AccordionItem=O;
|
|
2
|
+
//# sourceMappingURL=Accordion-CFyeLfPT.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion-B4vdZXIu.cjs","sources":["../src/components/Accordion/accordionContext.ts","../src/components/Accordion/AccordionItem.tsx","../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { AccordionSize } from './Accordion'\n\n/** Shared state an `<Accordion>` hands down to its `<AccordionItem>`s via context. */\nexport interface AccordionContextValue {\n /** Whether a given item value is currently open. */\n isOpen: (value: string) => boolean\n /** Toggle an item open/closed — called by a header on click. */\n toggle: (value: string) => void\n size: AccordionSize\n disabled: boolean\n}\n\nexport const AccordionContext = createContext<AccordionContextValue | null>(null)\n\n/** Read the surrounding `<Accordion>`. Throws if an `<AccordionItem>` is used outside one. */\nexport function useAccordionContext(): AccordionContextValue {\n const ctx = useContext(AccordionContext)\n if (!ctx) throw new Error('AccordionItem must be used within an <Accordion>')\n return ctx\n}\n","import { forwardRef, useId, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { Icon } from '../Icon'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { useAccordionContext } from './accordionContext'\nimport styles from './Accordion.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface AccordionItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** This item's identity within the `Accordion` (matched against the open value/values). */\n value: string\n /** Header label. */\n label: ReactNode\n /** Leading header icon — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Disable this item (the group's `disabled` also applies). */\n disabled?: boolean\n /** Collapsible body content. */\n children?: ReactNode\n}\n\n/**\n * One collapsible panel inside an `<Accordion>` — a header (`label` + optional `icon` + a chevron that\n * rotates) that toggles a smoothly-folding body (`grid-template-rows` animation). Reads the open state,\n * size, and disabled flag from the surrounding `Accordion` via context.\n */\nexport const AccordionItem = forwardRef<HTMLDivElement, AccordionItemProps>(function AccordionItem(\n { value, label, icon, disabled: itemDisabled = false, className, children, ...props },\n ref,\n) {\n const { isOpen, toggle, size, disabled: groupDisabled } = useAccordionContext()\n const open = isOpen(value)\n const disabled = groupDisabled || itemDisabled\n const headerId = useId()\n const bodyId = useId()\n\n const renderedIcon =\n icon == null ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} size={size} />\n ) : (\n icon\n )\n\n return (\n <div\n ref={ref}\n className={clsx(styles.item, className)}\n data-open={open ? 'true' : 'false'}\n {...props}\n >\n <button\n type=\"button\"\n id={headerId}\n className={styles.header}\n aria-expanded={open}\n aria-controls={bodyId}\n disabled={disabled}\n onClick={() => toggle(value)}\n >\n {renderedIcon != null && (\n <span className={styles.icon} aria-hidden>\n {renderedIcon}\n </span>\n )}\n <span className={styles.label}>{label}</span>\n <Icon\n name=\"ArrowDown4\"\n size={size}\n className={styles.chevron}\n data-open={open ? 'true' : 'false'}\n />\n </button>\n <div className={styles.collapsible} data-open={open ? 'true' : 'false'}>\n <div className={styles.collapsibleInner}>\n <div id={bodyId} role=\"region\" aria-labelledby={headerId} className={styles.body}>\n {children}\n </div>\n </div>\n </div>\n </div>\n )\n})\n","import {\n forwardRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { AccordionItem } from './AccordionItem'\nimport { AccordionContext, type AccordionContextValue } from './accordionContext'\nimport type { IconName } from '../../icons/names'\nimport styles from './Accordion.module.css'\n\nexport type AccordionSize = 'sm' | 'md' | 'lg'\n\n/** A data-driven panel for the `items` prop. */\nexport interface AccordionItemData {\n value: string\n label: ReactNode\n /** Leading header icon — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Collapsible body content. */\n content: ReactNode\n disabled?: boolean\n}\n\nexport interface AccordionProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'onChange' | 'defaultValue'\n> {\n /**\n * Single-open (`value` is a `string | null` — opening one closes the others) vs multi-open (`value`\n * is a `string[]`). Defaults to `false` (multiple).\n */\n exclusive?: boolean\n /** Controlled open value — a `string | null` when `exclusive`, else a `string[]`. */\n value?: string | string[] | null\n /** Initial open value for uncontrolled use (same shape as `value`). */\n defaultValue?: string | string[] | null\n /** Fires with the next open value (matches the `exclusive` shape). */\n onChange?: (value: string | string[] | null) => void\n /** Data-driven panels — an alternative to passing `<AccordionItem>` children. */\n items?: AccordionItemData[]\n /** Preset size for every panel header. Defaults to `md`. */\n size?: AccordionSize\n /** Disables every panel in the accordion. */\n disabled?: boolean\n /** `<AccordionItem>` children (used when `items` is not given). */\n children?: ReactNode\n}\n\n/**\n * A set of collapsible panels (settings sections, FAQs, grouped forms). **`exclusive`** picks\n * single-open (`value` is a `string | null`) vs multi-open (`value` is a `string[]`); both are\n * controlled (`value` + `onChange`) or uncontrolled (`defaultValue`). Supply panels via the\n * data-driven `items` prop or as `<AccordionItem>` children — the group shares the open state, `size`,\n * and `disabled` via context, and each body folds with the shared `grid-template-rows` animation\n * (like `Card`'s `collapsible`). Token-only styling.\n */\nexport const Accordion = forwardRef<HTMLDivElement, AccordionProps>(function Accordion(\n {\n exclusive = false,\n value,\n defaultValue,\n onChange,\n items,\n size = 'md',\n disabled = false,\n children,\n className,\n style,\n ...props\n },\n ref,\n) {\n const isControlled = value !== undefined\n const [internal, setInternal] = useState<string | string[] | null | undefined>(defaultValue)\n const current = isControlled ? value : internal\n\n const isOpen = (v: string) =>\n exclusive ? current === v : Array.isArray(current) && current.includes(v)\n\n const toggle = (v: string) => {\n let next: string | string[] | null\n if (exclusive) {\n next = current === v ? null : v\n } else {\n const arr = Array.isArray(current) ? current : []\n next = arr.includes(v) ? arr.filter((x) => x !== v) : [...arr, v]\n }\n if (!isControlled) setInternal(next)\n onChange?.(next)\n }\n\n const ctx: AccordionContextValue = { isOpen, toggle, size, disabled }\n\n return (\n <div\n ref={ref}\n className={clsx(styles.accordion, styles[size], className)}\n style={style as CSSProperties}\n {...props}\n >\n <AccordionContext.Provider value={ctx}>\n {items\n ? items.map((item) => (\n <AccordionItem\n key={item.value}\n value={item.value}\n label={item.label}\n icon={item.icon}\n disabled={item.disabled}\n >\n {item.content}\n </AccordionItem>\n ))\n : children}\n </AccordionContext.Provider>\n </div>\n )\n})\n"],"names":["AccordionContext","createContext","useAccordionContext","ctx","useContext","ICON_NAME_SET","ICON_NAMES","AccordionItem","forwardRef","value","label","icon","itemDisabled","className","children","props","ref","isOpen","toggle","size","groupDisabled","open","disabled","headerId","useId","bodyId","renderedIcon","jsx","Icon","jsxs","clsx","styles","Accordion","exclusive","defaultValue","onChange","items","style","isControlled","internal","setInternal","useState","current","v","next","arr","x","item"],"mappings":"wHAaaA,EAAmBC,EAAAA,cAA4C,IAAI,EAGzE,SAASC,GAA6C,CAC3D,MAAMC,EAAMC,EAAAA,WAAWJ,CAAgB,EACvC,GAAI,CAACG,EAAK,MAAM,IAAI,MAAM,kDAAkD,EAC5E,OAAOA,CACT,mXCbME,EAAgB,IAAI,IAAYC,YAAU,EAoBnCC,EAAgBC,EAAAA,WAA+C,SAC1E,CA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AEd,SAAAA,EAAK,OAAA,EANDA,EAAK,KAAA,CAQb,EACDjC,CAAA,CACN,CAAA,CAAA,CAGN,CAAC"}
|
|
1
|
+
{"version":3,"file":"Accordion-CFyeLfPT.cjs","sources":["../src/components/Accordion/accordionContext.ts","../src/components/Accordion/AccordionItem.tsx","../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { AccordionSize } from './Accordion'\n\n/** Shared state an `<Accordion>` hands down to its `<AccordionItem>`s via context. */\nexport interface AccordionContextValue {\n /** Whether a given item value is currently open. */\n isOpen: (value: string) => boolean\n /** Toggle an item open/closed — called by a header on click. */\n toggle: (value: string) => void\n size: AccordionSize\n disabled: boolean\n}\n\nexport const AccordionContext = createContext<AccordionContextValue | null>(null)\n\n/** Read the surrounding `<Accordion>`. Throws if an `<AccordionItem>` is used outside one. */\nexport function useAccordionContext(): AccordionContextValue {\n const ctx = useContext(AccordionContext)\n if (!ctx) throw new Error('AccordionItem must be used within an <Accordion>')\n return ctx\n}\n","import { forwardRef, useId, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { Icon } from '../Icon'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { useAccordionContext } from './accordionContext'\nimport styles from './Accordion.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface AccordionItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** This item's identity within the `Accordion` (matched against the open value/values). */\n value: string\n /** Header label. */\n label: ReactNode\n /** Leading header icon — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Disable this item (the group's `disabled` also applies). */\n disabled?: boolean\n /** Collapsible body content. */\n children?: ReactNode\n}\n\n/**\n * One collapsible panel inside an `<Accordion>` — a header (`label` + optional `icon` + a chevron that\n * rotates) that toggles a smoothly-folding body (`grid-template-rows` animation). Reads the open state,\n * size, and disabled flag from the surrounding `Accordion` via context.\n */\nexport const AccordionItem = forwardRef<HTMLDivElement, AccordionItemProps>(function AccordionItem(\n { value, label, icon, disabled: itemDisabled = false, className, children, ...props },\n ref,\n) {\n const { isOpen, toggle, size, disabled: groupDisabled } = useAccordionContext()\n const open = isOpen(value)\n const disabled = groupDisabled || itemDisabled\n const headerId = useId()\n const bodyId = useId()\n\n const renderedIcon =\n icon == null ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} size={size} />\n ) : (\n icon\n )\n\n return (\n <div\n ref={ref}\n className={clsx(styles.item, className)}\n data-open={open ? 'true' : 'false'}\n {...props}\n >\n <button\n type=\"button\"\n id={headerId}\n className={styles.header}\n aria-expanded={open}\n aria-controls={bodyId}\n disabled={disabled}\n onClick={() => toggle(value)}\n >\n {renderedIcon != null && (\n <span className={styles.icon} aria-hidden>\n {renderedIcon}\n </span>\n )}\n <span className={styles.label}>{label}</span>\n <Icon\n name=\"ArrowDown4\"\n size={size}\n className={styles.chevron}\n data-open={open ? 'true' : 'false'}\n />\n </button>\n <div className={styles.collapsible} data-open={open ? 'true' : 'false'}>\n <div className={styles.collapsibleInner}>\n <div id={bodyId} role=\"region\" aria-labelledby={headerId} className={styles.body}>\n {children}\n </div>\n </div>\n </div>\n </div>\n )\n})\n","import {\n forwardRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { AccordionItem } from './AccordionItem'\nimport { AccordionContext, type AccordionContextValue } from './accordionContext'\nimport type { IconName } from '../../icons/names'\nimport styles from './Accordion.module.css'\n\nexport type AccordionSize = 'sm' | 'md' | 'lg'\n\n/** A data-driven panel for the `items` prop. */\nexport interface AccordionItemData {\n value: string\n label: ReactNode\n /** Leading header icon — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Collapsible body content. */\n content: ReactNode\n disabled?: boolean\n}\n\nexport interface AccordionProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'onChange' | 'defaultValue'\n> {\n /**\n * Single-open (`value` is a `string | null` — opening one closes the others) vs multi-open (`value`\n * is a `string[]`). Defaults to `false` (multiple).\n */\n exclusive?: boolean\n /** Controlled open value — a `string | null` when `exclusive`, else a `string[]`. */\n value?: string | string[] | null\n /** Initial open value for uncontrolled use (same shape as `value`). */\n defaultValue?: string | string[] | null\n /** Fires with the next open value (matches the `exclusive` shape). */\n onChange?: (value: string | string[] | null) => void\n /** Data-driven panels — an alternative to passing `<AccordionItem>` children. */\n items?: AccordionItemData[]\n /** Preset size for every panel header. Defaults to `md`. */\n size?: AccordionSize\n /** Disables every panel in the accordion. */\n disabled?: boolean\n /** `<AccordionItem>` children (used when `items` is not given). */\n children?: ReactNode\n}\n\n/**\n * A set of collapsible panels (settings sections, FAQs, grouped forms). **`exclusive`** picks\n * single-open (`value` is a `string | null`) vs multi-open (`value` is a `string[]`); both are\n * controlled (`value` + `onChange`) or uncontrolled (`defaultValue`). Supply panels via the\n * data-driven `items` prop or as `<AccordionItem>` children — the group shares the open state, `size`,\n * and `disabled` via context, and each body folds with the shared `grid-template-rows` animation\n * (like `Card`'s `collapsible`). Token-only styling.\n */\nexport const Accordion = forwardRef<HTMLDivElement, AccordionProps>(function Accordion(\n {\n exclusive = false,\n value,\n defaultValue,\n onChange,\n items,\n size = 'md',\n disabled = false,\n children,\n className,\n style,\n ...props\n },\n ref,\n) {\n const isControlled = value !== undefined\n const [internal, setInternal] = useState<string | string[] | null | undefined>(defaultValue)\n const current = isControlled ? value : internal\n\n const isOpen = (v: string) =>\n exclusive ? current === v : Array.isArray(current) && current.includes(v)\n\n const toggle = (v: string) => {\n let next: string | string[] | null\n if (exclusive) {\n next = current === v ? null : v\n } else {\n const arr = Array.isArray(current) ? current : []\n next = arr.includes(v) ? arr.filter((x) => x !== v) : [...arr, v]\n }\n if (!isControlled) setInternal(next)\n onChange?.(next)\n }\n\n const ctx: AccordionContextValue = { isOpen, toggle, size, disabled }\n\n return (\n <div\n ref={ref}\n className={clsx(styles.accordion, styles[size], className)}\n style={style as CSSProperties}\n {...props}\n >\n <AccordionContext.Provider value={ctx}>\n {items\n ? items.map((item) => (\n <AccordionItem\n key={item.value}\n value={item.value}\n label={item.label}\n icon={item.icon}\n disabled={item.disabled}\n >\n {item.content}\n </AccordionItem>\n ))\n : children}\n </AccordionContext.Provider>\n </div>\n )\n})\n"],"names":["AccordionContext","createContext","useAccordionContext","ctx","useContext","ICON_NAME_SET","ICON_NAMES","AccordionItem","forwardRef","value","label","icon","itemDisabled","className","children","props","ref","isOpen","toggle","size","groupDisabled","open","disabled","headerId","useId","bodyId","renderedIcon","jsx","Icon","jsxs","clsx","styles","Accordion","exclusive","defaultValue","onChange","items","style","isControlled","internal","setInternal","useState","current","v","next","arr","x","item"],"mappings":"wHAaaA,EAAmBC,EAAAA,cAA4C,IAAI,EAGzE,SAASC,GAA6C,CAC3D,MAAMC,EAAMC,EAAAA,WAAWJ,CAAgB,EACvC,GAAI,CAACG,EAAK,MAAM,IAAI,MAAM,kDAAkD,EAC5E,OAAOA,CACT,mXCbME,EAAgB,IAAI,IAAYC,YAAU,EAoBnCC,EAAgBC,EAAAA,WAA+C,SAC1E,CAAE,MAAAC,EAAO,MAAAC,EAAO,KAAAC,EAAM,SAAUC,EAAe,GAAO,UAAAC,EAAW,SAAAC,EAAU,GAAGC,CAAA,EAC9EC,EACA,CACA,KAAM,CAAE,OAAAC,EAAQ,OAAAC,EAAQ,KAAAC,EAAM,SAAUC,CAAA,EAAkBlB,EAAA,EACpDmB,EAAOJ,EAAOR,CAAK,EACnBa,EAAWF,GAAiBR,EAC5BW,EAAWC,EAAAA,MAAA,EACXC,EAASD,EAAAA,MAAA,EAETE,EACJf,GAAQ,KAAO,KAAO,OAAOA,GAAS,UAAYN,EAAc,IAAIM,CAAI,EACtEgB,EAAAA,IAACC,OAAA,CAAK,KAAMjB,EAAkB,KAAAQ,EAAY,EAE1CR,EAGJ,OACEkB,EAAAA,KAAC,MAAA,CACC,IAAAb,EACA,UAAWc,EAAAA,KAAKC,EAAO,KAA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AAC,EAc7B,OAZ7BA,GAAc,CAC5B,IAAIC,EACJ,GAAIX,EACFW,EAAOF,IAAYC,EAAI,KAAOA,MACzB,CACL,MAAME,EAAM,MAAM,QAAQH,CAAO,EAAIA,EAAU,CAAA,EAC/CE,EAAOC,EAAI,SAASF,CAAC,EAAIE,EAAI,OAAQC,GAAMA,IAAMH,CAAC,EAAI,CAAC,GAAGE,EAAKF,CAAC,CAClE,CACKL,GAAcE,EAAYI,CAAI,EACnCT,GAAA,MAAAA,EAAWS,EACb,EAEqD,KAAAzB,EAAM,SAAAG,CAAA,EAE3D,OACEK,EAAAA,IAAC,MAAA,CACC,IAAAX,EACA,UAAWc,EAAAA,KAAKC,EAAO,UAAWA,EAAOZ,CAAI,EAAGN,CAAS,EACzD,MAAAwB,EACC,GAAGtB,EAEJ,SAAAY,EAAAA,IAAC3B,EAAiB,SAAjB,CAA0B,MAAOG,EAC/B,SAAAiC,EACGA,EAAM,IAAKW,GACTpB,EAAAA,IAACpB,EAAA,CAEC,MAAOwC,EAAK,MACZ,MAAOA,EAAK,MACZ,KAAMA,EAAK,KACX,SAAUA,EAAK,SAEd,SAAAA,EAAK,OAAA,EANDA,EAAK,KAAA,CAQb,EACDjC,CAAA,CACN,CAAA,CAAA,CAGN,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o, jsxs as g } from "react/jsx-runtime";
|
|
2
2
|
import { createContext as D, useContext as M, forwardRef as O, useId as v, useState as k } from "react";
|
|
3
3
|
import { clsx as C } from "clsx";
|
|
4
|
-
import { b as w, a as P } from "./Icon-
|
|
4
|
+
import { b as w, a as P } from "./Icon-B7DJn8Tw.js";
|
|
5
5
|
const E = D(null);
|
|
6
6
|
function R() {
|
|
7
7
|
const t = M(E);
|
|
@@ -108,4 +108,4 @@ export {
|
|
|
108
108
|
ne as A,
|
|
109
109
|
W as a
|
|
110
110
|
};
|
|
111
|
-
//# sourceMappingURL=Accordion-
|
|
111
|
+
//# sourceMappingURL=Accordion-DOrTQJB9.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion-DhFZ25KV.js","sources":["../src/components/Accordion/accordionContext.ts","../src/components/Accordion/AccordionItem.tsx","../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { AccordionSize } from './Accordion'\n\n/** Shared state an `<Accordion>` hands down to its `<AccordionItem>`s via context. */\nexport interface AccordionContextValue {\n /** Whether a given item value is currently open. */\n isOpen: (value: string) => boolean\n /** Toggle an item open/closed — called by a header on click. */\n toggle: (value: string) => void\n size: AccordionSize\n disabled: boolean\n}\n\nexport const AccordionContext = createContext<AccordionContextValue | null>(null)\n\n/** Read the surrounding `<Accordion>`. Throws if an `<AccordionItem>` is used outside one. */\nexport function useAccordionContext(): AccordionContextValue {\n const ctx = useContext(AccordionContext)\n if (!ctx) throw new Error('AccordionItem must be used within an <Accordion>')\n return ctx\n}\n","import { forwardRef, useId, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { Icon } from '../Icon'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { useAccordionContext } from './accordionContext'\nimport styles from './Accordion.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface AccordionItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** This item's identity within the `Accordion` (matched against the open value/values). */\n value: string\n /** Header label. */\n label: ReactNode\n /** Leading header icon — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Disable this item (the group's `disabled` also applies). */\n disabled?: boolean\n /** Collapsible body content. */\n children?: ReactNode\n}\n\n/**\n * One collapsible panel inside an `<Accordion>` — a header (`label` + optional `icon` + a chevron that\n * rotates) that toggles a smoothly-folding body (`grid-template-rows` animation). Reads the open state,\n * size, and disabled flag from the surrounding `Accordion` via context.\n */\nexport const AccordionItem = forwardRef<HTMLDivElement, AccordionItemProps>(function AccordionItem(\n { value, label, icon, disabled: itemDisabled = false, className, children, ...props },\n ref,\n) {\n const { isOpen, toggle, size, disabled: groupDisabled } = useAccordionContext()\n const open = isOpen(value)\n const disabled = groupDisabled || itemDisabled\n const headerId = useId()\n const bodyId = useId()\n\n const renderedIcon =\n icon == null ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} size={size} />\n ) : (\n icon\n )\n\n return (\n <div\n ref={ref}\n className={clsx(styles.item, className)}\n data-open={open ? 'true' : 'false'}\n {...props}\n >\n <button\n type=\"button\"\n id={headerId}\n className={styles.header}\n aria-expanded={open}\n aria-controls={bodyId}\n disabled={disabled}\n onClick={() => toggle(value)}\n >\n {renderedIcon != null && (\n <span className={styles.icon} aria-hidden>\n {renderedIcon}\n </span>\n )}\n <span className={styles.label}>{label}</span>\n <Icon\n name=\"ArrowDown4\"\n size={size}\n className={styles.chevron}\n data-open={open ? 'true' : 'false'}\n />\n </button>\n <div className={styles.collapsible} data-open={open ? 'true' : 'false'}>\n <div className={styles.collapsibleInner}>\n <div id={bodyId} role=\"region\" aria-labelledby={headerId} className={styles.body}>\n {children}\n </div>\n </div>\n </div>\n </div>\n )\n})\n","import {\n forwardRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { AccordionItem } from './AccordionItem'\nimport { AccordionContext, type AccordionContextValue } from './accordionContext'\nimport type { IconName } from '../../icons/names'\nimport styles from './Accordion.module.css'\n\nexport type AccordionSize = 'sm' | 'md' | 'lg'\n\n/** A data-driven panel for the `items` prop. */\nexport interface AccordionItemData {\n value: string\n label: ReactNode\n /** Leading header icon — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Collapsible body content. */\n content: ReactNode\n disabled?: boolean\n}\n\nexport interface AccordionProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'onChange' | 'defaultValue'\n> {\n /**\n * Single-open (`value` is a `string | null` — opening one closes the others) vs multi-open (`value`\n * is a `string[]`). Defaults to `false` (multiple).\n */\n exclusive?: boolean\n /** Controlled open value — a `string | null` when `exclusive`, else a `string[]`. */\n value?: string | string[] | null\n /** Initial open value for uncontrolled use (same shape as `value`). */\n defaultValue?: string | string[] | null\n /** Fires with the next open value (matches the `exclusive` shape). */\n onChange?: (value: string | string[] | null) => void\n /** Data-driven panels — an alternative to passing `<AccordionItem>` children. */\n items?: AccordionItemData[]\n /** Preset size for every panel header. Defaults to `md`. */\n size?: AccordionSize\n /** Disables every panel in the accordion. */\n disabled?: boolean\n /** `<AccordionItem>` children (used when `items` is not given). */\n children?: ReactNode\n}\n\n/**\n * A set of collapsible panels (settings sections, FAQs, grouped forms). **`exclusive`** picks\n * single-open (`value` is a `string | null`) vs multi-open (`value` is a `string[]`); both are\n * controlled (`value` + `onChange`) or uncontrolled (`defaultValue`). Supply panels via the\n * data-driven `items` prop or as `<AccordionItem>` children — the group shares the open state, `size`,\n * and `disabled` via context, and each body folds with the shared `grid-template-rows` animation\n * (like `Card`'s `collapsible`). Token-only styling.\n */\nexport const Accordion = forwardRef<HTMLDivElement, AccordionProps>(function Accordion(\n {\n exclusive = false,\n value,\n defaultValue,\n onChange,\n items,\n size = 'md',\n disabled = false,\n children,\n className,\n style,\n ...props\n },\n ref,\n) {\n const isControlled = value !== undefined\n const [internal, setInternal] = useState<string | string[] | null | undefined>(defaultValue)\n const current = isControlled ? value : internal\n\n const isOpen = (v: string) =>\n exclusive ? current === v : Array.isArray(current) && current.includes(v)\n\n const toggle = (v: string) => {\n let next: string | string[] | null\n if (exclusive) {\n next = current === v ? null : v\n } else {\n const arr = Array.isArray(current) ? current : []\n next = arr.includes(v) ? arr.filter((x) => x !== v) : [...arr, v]\n }\n if (!isControlled) setInternal(next)\n onChange?.(next)\n }\n\n const ctx: AccordionContextValue = { isOpen, toggle, size, disabled }\n\n return (\n <div\n ref={ref}\n className={clsx(styles.accordion, styles[size], className)}\n style={style as CSSProperties}\n {...props}\n >\n <AccordionContext.Provider value={ctx}>\n {items\n ? items.map((item) => (\n <AccordionItem\n key={item.value}\n value={item.value}\n label={item.label}\n icon={item.icon}\n disabled={item.disabled}\n >\n {item.content}\n </AccordionItem>\n ))\n : children}\n </AccordionContext.Provider>\n </div>\n )\n})\n"],"names":["AccordionContext","createContext","useAccordionContext","ctx","useContext","ICON_NAME_SET","ICON_NAMES","AccordionItem","forwardRef","value","label","icon","itemDisabled","className","children","props","ref","isOpen","toggle","size","groupDisabled","open","disabled","headerId","useId","bodyId","renderedIcon","jsx","Icon","jsxs","clsx","styles","Accordion","exclusive","defaultValue","onChange","items","style","isControlled","internal","setInternal","useState","current","v","next","arr","x","item"],"mappings":";;;;AAaO,MAAMA,IAAmBC,EAA4C,IAAI;AAGzE,SAASC,IAA6C;AAC3D,QAAMC,IAAMC,EAAWJ,CAAgB;AACvC,MAAI,CAACG,EAAK,OAAM,IAAI,MAAM,kDAAkD;AAC5E,SAAOA;AACT;;;;;;;;;;;;;;GCbME,IAAgB,IAAI,IAAYC,CAAU,GAoBnCC,IAAgBC,EAA+C,SAC1E,EAAE,OAAAC,GAAO,OAAAC,GAAO,MAAAC,GAAM,UAAUC,IAAe,IAAO,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAC9EC,GACA;AACA,QAAM,EAAE,QAAAC,GAAQ,QAAAC,GAAQ,MAAAC,GAAM,UAAUC,EAAA,IAAkBlB,EAAA,GACpDmB,IAAOJ,EAAOR,CAAK,GACnBa,IAAWF,KAAiBR,GAC5BW,IAAWC,EAAA,GACXC,IAASD,EAAA,GAETE,IACJf,KAAQ,OAAO,OAAO,OAAOA,KAAS,YAAYN,EAAc,IAAIM,CAAI,IACtE,gBAAAgB,EAACC,GAAA,EAAK,MAAMjB,GAAkB,MAAAQ,GAAY,IAE1CR;AAGJ,SACE,gBAAAkB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAb;AAAA,MACA,WAAWc,EAAKC,EAAO,MAAMlB,CAAS;AAAA,MACtC,aAAWQ,IAAO,SAAS;AAAA,M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ordionItem.tsx","../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { AccordionSize } from './Accordion'\n\n/** Shared state an `<Accordion>` hands down to its `<AccordionItem>`s via context. */\nexport interface AccordionContextValue {\n /** Whether a given item value is currently open. */\n isOpen: (value: string) => boolean\n /** Toggle an item open/closed — called by a header on click. */\n toggle: (value: string) => void\n size: AccordionSize\n disabled: boolean\n}\n\nexport const AccordionContext = createContext<AccordionContextValue | null>(null)\n\n/** Read the surrounding `<Accordion>`. Throws if an `<AccordionItem>` is used outside one. */\nexport function useAccordionContext(): AccordionContextValue {\n const ctx = useContext(AccordionContext)\n if (!ctx) throw new Error('AccordionItem must be used within an <Accordion>')\n return ctx\n}\n","import { forwardRef, useId, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { Icon } from '../Icon'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { useAccordionContext } from './accordionContext'\nimport styles from './Accordion.module.css'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\nexport interface AccordionItemProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** This item's identity within the `Accordion` (matched against the open value/values). */\n value: string\n /** Header label. */\n label: ReactNode\n /** Leading header icon — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Disable this item (the group's `disabled` also applies). */\n disabled?: boolean\n /** Collapsible body content. */\n children?: ReactNode\n}\n\n/**\n * One collapsible panel inside an `<Accordion>` — a header (`label` + optional `icon` + a chevron that\n * rotates) that toggles a smoothly-folding body (`grid-template-rows` animation). Reads the open state,\n * size, and disabled flag from the surrounding `Accordion` via context.\n */\nexport const AccordionItem = forwardRef<HTMLDivElement, AccordionItemProps>(function AccordionItem(\n { value, label, icon, disabled: itemDisabled = false, className, children, ...props },\n ref,\n) {\n const { isOpen, toggle, size, disabled: groupDisabled } = useAccordionContext()\n const open = isOpen(value)\n const disabled = groupDisabled || itemDisabled\n const headerId = useId()\n const bodyId = useId()\n\n const renderedIcon =\n icon == null ? null : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} size={size} />\n ) : (\n icon\n )\n\n return (\n <div\n ref={ref}\n className={clsx(styles.item, className)}\n data-open={open ? 'true' : 'false'}\n {...props}\n >\n <button\n type=\"button\"\n id={headerId}\n className={styles.header}\n aria-expanded={open}\n aria-controls={bodyId}\n disabled={disabled}\n onClick={() => toggle(value)}\n >\n {renderedIcon != null && (\n <span className={styles.icon} aria-hidden>\n {renderedIcon}\n </span>\n )}\n <span className={styles.label}>{label}</span>\n <Icon\n name=\"ArrowDown4\"\n size={size}\n className={styles.chevron}\n data-open={open ? 'true' : 'false'}\n />\n </button>\n <div className={styles.collapsible} data-open={open ? 'true' : 'false'}>\n <div className={styles.collapsibleInner}>\n <div id={bodyId} role=\"region\" aria-labelledby={headerId} className={styles.body}>\n {children}\n </div>\n </div>\n </div>\n </div>\n )\n})\n","import {\n forwardRef,\n useState,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { AccordionItem } from './AccordionItem'\nimport { AccordionContext, type AccordionContextValue } from './accordionContext'\nimport type { IconName } from '../../icons/names'\nimport styles from './Accordion.module.css'\n\nexport type AccordionSize = 'sm' | 'md' | 'lg'\n\n/** A data-driven panel for the `items` prop. */\nexport interface AccordionItemData {\n value: string\n label: ReactNode\n /** Leading header icon — a known `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Collapsible body content. */\n content: ReactNode\n disabled?: boolean\n}\n\nexport interface AccordionProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'onChange' | 'defaultValue'\n> {\n /**\n * Single-open (`value` is a `string | null` — opening one closes the others) vs multi-open (`value`\n * is a `string[]`). Defaults to `false` (multiple).\n */\n exclusive?: boolean\n /** Controlled open value — a `string | null` when `exclusive`, else a `string[]`. */\n value?: string | string[] | null\n /** Initial open value for uncontrolled use (same shape as `value`). */\n defaultValue?: string | string[] | null\n /** Fires with the next open value (matches the `exclusive` shape). */\n onChange?: (value: string | string[] | null) => void\n /** Data-driven panels — an alternative to passing `<AccordionItem>` children. */\n items?: AccordionItemData[]\n /** Preset size for every panel header. Defaults to `md`. */\n size?: AccordionSize\n /** Disables every panel in the accordion. */\n disabled?: boolean\n /** `<AccordionItem>` children (used when `items` is not given). */\n children?: ReactNode\n}\n\n/**\n * A set of collapsible panels (settings sections, FAQs, grouped forms). **`exclusive`** picks\n * single-open (`value` is a `string | null`) vs multi-open (`value` is a `string[]`); both are\n * controlled (`value` + `onChange`) or uncontrolled (`defaultValue`). Supply panels via the\n * data-driven `items` prop or as `<AccordionItem>` children — the group shares the open state, `size`,\n * and `disabled` via context, and each body folds with the shared `grid-template-rows` animation\n * (like `Card`'s `collapsible`). Token-only styling.\n */\nexport const Accordion = forwardRef<HTMLDivElement, AccordionProps>(function Accordion(\n {\n exclusive = false,\n value,\n defaultValue,\n onChange,\n items,\n size = 'md',\n disabled = false,\n children,\n className,\n style,\n ...props\n },\n ref,\n) {\n const isControlled = value !== undefined\n const [internal, setInternal] = useState<string | string[] | null | undefined>(defaultValue)\n const current = isControlled ? value : internal\n\n const isOpen = (v: string) =>\n exclusive ? current === v : Array.isArray(current) && current.includes(v)\n\n const toggle = (v: string) => {\n let next: string | string[] | null\n if (exclusive) {\n next = current === v ? null : v\n } else {\n const arr = Array.isArray(current) ? current : []\n next = arr.includes(v) ? arr.filter((x) => x !== v) : [...arr, v]\n }\n if (!isControlled) setInternal(next)\n onChange?.(next)\n }\n\n const ctx: AccordionContextValue = { isOpen, toggle, size, disabled }\n\n return (\n <div\n ref={ref}\n className={clsx(styles.accordion, styles[size], className)}\n style={style as CSSProperties}\n {...props}\n >\n <AccordionContext.Provider value={ctx}>\n {items\n ? items.map((item) => (\n <AccordionItem\n key={item.value}\n value={item.value}\n label={item.label}\n icon={item.icon}\n disabled={item.disabled}\n >\n {item.content}\n </AccordionItem>\n ))\n : children}\n </AccordionContext.Provider>\n </div>\n )\n})\n"],"names":["AccordionContext","createContext","useAccordionContext","ctx","useContext","ICON_NAME_SET","ICON_NAMES","AccordionItem","forwardRef","value","label","icon","itemDisabled","className","children","props","ref","isOpen","toggle","size","groupDisabled","open","disabled","headerId","useId","bodyId","renderedIcon","jsx","Icon","jsxs","clsx","styles","Accordion","exclusive","defaultValue","onChange","items","style","isControlled","internal","setInternal","useState","current","v","next","arr","x","item"],"mappings":";;;;AAaO,MAAMA,IAAmBC,EAA4C,IAAI;AAGzE,SAASC,IAA6C;AAC3D,QAAMC,IAAMC,EAAWJ,CAAgB;AACvC,MAAI,CAACG,EAAK,OAAM,IAAI,MAAM,kDAAkD;AAC5E,SAAOA;AACT;;;;;;;;;;;;;;GCbME,IAAgB,IAAI,IAAYC,CAAU,GAoBnCC,IAAgBC,EAA+C,SAC1E,EAAE,OAAAC,GAAO,OAAAC,GAAO,MAAAC,GAAM,UAAUC,IAAe,IAAO,WAAAC,GAAW,UAAAC,GAAU,GAAGC,EAAA,GAC9EC,GACA;AACA,QAAM,EAAE,QAAAC,GAAQ,QAAAC,GAAQ,MAAAC,GAAM,UAAUC,EAAA,IAAkBlB,EAAA,GACpDmB,IAAOJ,EAAOR,CAAK,GACnBa,IAAWF,KAAiBR,GAC5BW,IAAWC,EAAA,GACXC,IAASD,EAAA,GAETE,IACJf,KAAQ,OAAO,OAAO,OAAOA,KAAS,YAAYN,EAAc,IAAIM,CAAI,IACtE,gBAAAgB,EAACC,GAAA,EAAK,MAAMjB,GAAkB,MAAAQ,GAAY,IAE1CR;AAGJ,SACE,gBAAAkB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAb;AAAA,MACA,WAAWc,EAAKC,EAAO,MAAMlB,CAAS;AAAA,MACtC,aAAWQ,IAAO,SAAS;AAAA,MAC1B,GAAGN;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAc;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,IAAIN;AAAA,YACJ,WA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AACwC,MACdV,IAAYS,MAAYC,IAAI,MAAM,QAAQD,CAAO,KAAKA,EAAQ,SAASC,CAAC,GAc7B,QAZ9B,CAACA,MAAc;AAC5B,QAAIC;AACJ,QAAIX;AACF,MAAAW,IAAOF,MAAYC,IAAI,OAAOA;AAAA,SACzB;AACL,YAAME,IAAM,MAAM,QAAQH,CAAO,IAAIA,IAAU,CAAA;AAC/C,MAAAE,IAAOC,EAAI,SAASF,CAAC,IAAIE,EAAI,OAAO,CAACC,MAAMA,MAAMH,CAAC,IAAI,CAAC,GAAGE,GAAKF,CAAC;AAAA,IAClE;AACA,IAAKL,KAAcE,EAAYI,CAAI,GACnCT,KAAA,QAAAA,EAAWS;AAAA,EACb,GAEqD,MAAAzB,GAAM,UAAAG,EAAA;AAE3D,SACE,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAX;AAAA,MACA,WAAWc,EAAKC,EAAO,WAAWA,EAAOZ,CAAI,GAAGN,CAAS;AAAA,MACzD,OAAAwB;AAAA,MACC,GAAGtB;AAAA,MAEJ,UAAA,gBAAAY,EAAC3B,EAAiB,UAAjB,EAA0B,OAAOG,GAC/B,UAAAiC,IACGA,EAAM,IAAI,CAACW,MACT,gBAAApB;AAAA,QAACpB;AAAA,QAAA;AAAA,UAEC,OAAOwC,EAAK;AAAA,UACZ,OAAOA,EAAK;AAAA,UACZ,MAAMA,EAAK;AAAA,UACX,UAAUA,EAAK;AAAA,UAEd,UAAAA,EAAK;AAAA,QAAA;AAAA,QANDA,EAAK;AAAA,MAAA,CAQb,IACDjC,EAAA,CACN;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { jsx as t, jsxs as m, Fragment as R } from "react/jsx-runtime";
|
|
2
|
+
import { useNavigate as k, useRouterState as A, Outlet as L } from "@tanstack/react-router";
|
|
3
|
+
import { c as v } from "./errorMessage-C83fB2h5.js";
|
|
4
|
+
import { A as B } from "./AuthGuard-CVklwDbj.js";
|
|
5
|
+
import { a as G } from "./ConfigProvider-CYgmMH4j.js";
|
|
6
|
+
import { T as I } from "./Toaster-BPBFZiTr.js";
|
|
7
|
+
import { A as K } from "./AuthLayout-BI1wLuDl.js";
|
|
8
|
+
import { C as q } from "./Col-B51RlwWP.js";
|
|
9
|
+
import { Q as w, E as D } from "./ErrorBoundary-BgMOPle0.js";
|
|
10
|
+
import { B as T } from "./Button-5LQtDA9d.js";
|
|
11
|
+
import { R as F } from "./RootLayout-CjT5uHlt.js";
|
|
12
|
+
import { L as H } from "./Loader-D_Foo6Hj.js";
|
|
13
|
+
const J = "_pending_1jy0z_2", M = {
|
|
14
|
+
pending: J
|
|
15
|
+
}, nt = ({
|
|
16
|
+
logo: u,
|
|
17
|
+
logoTo: C,
|
|
18
|
+
getUser: S,
|
|
19
|
+
onLogout: j,
|
|
20
|
+
authRouteId: E = "/_auth",
|
|
21
|
+
loginPath: l = "/login",
|
|
22
|
+
showUserCard: _,
|
|
23
|
+
sidebarVariant: x,
|
|
24
|
+
header: N,
|
|
25
|
+
errorBoundary: i = !0,
|
|
26
|
+
toaster: c = !0,
|
|
27
|
+
pending: f = !1,
|
|
28
|
+
pendingFallback: O,
|
|
29
|
+
unavailable: r,
|
|
30
|
+
unavailableFallback: h
|
|
31
|
+
}) => {
|
|
32
|
+
const n = G(), W = k(), p = c === !1 ? null : /* @__PURE__ */ t(I, { ...typeof c == "object" ? c : void 0 }), z = A({
|
|
33
|
+
select: (e) => e.matches.some((o) => o.routeId.startsWith(E))
|
|
34
|
+
}), Q = A({ select: (e) => {
|
|
35
|
+
var o;
|
|
36
|
+
return (o = e.location) == null ? void 0 : o.pathname;
|
|
37
|
+
} }), a = () => {
|
|
38
|
+
j(), W({ to: l });
|
|
39
|
+
};
|
|
40
|
+
if (f || r) {
|
|
41
|
+
let e;
|
|
42
|
+
if (f)
|
|
43
|
+
e = O ?? /* @__PURE__ */ t("div", { className: M.pending, "aria-busy": "true", children: /* @__PURE__ */ t(H, { size: "lg" }) });
|
|
44
|
+
else if (r) {
|
|
45
|
+
const o = r.reason ?? (v(r.error) === 403 ? "forbidden" : "unreachable");
|
|
46
|
+
if (h)
|
|
47
|
+
e = h({
|
|
48
|
+
error: r.error,
|
|
49
|
+
reason: o,
|
|
50
|
+
retry: r.onRetry,
|
|
51
|
+
signOut: a
|
|
52
|
+
});
|
|
53
|
+
else {
|
|
54
|
+
const d = o === "unreachable" ? r.onRetry : void 0, y = o === "forbidden";
|
|
55
|
+
e = /* @__PURE__ */ t(
|
|
56
|
+
K,
|
|
57
|
+
{
|
|
58
|
+
logo: u,
|
|
59
|
+
icon: r.icon || void 0,
|
|
60
|
+
color: r.color ?? "error",
|
|
61
|
+
title: n(y ? "adminRoot.noAccessTitle" : "adminRoot.unreachableTitle"),
|
|
62
|
+
subtitle: n(y ? "adminRoot.noAccessSubtitle" : "adminRoot.unreachableSubtitle"),
|
|
63
|
+
children: /* @__PURE__ */ m(q, { gap: 16, children: [
|
|
64
|
+
/* @__PURE__ */ t(w, { variant: "alert", error: r.error }),
|
|
65
|
+
d ? /* @__PURE__ */ t(T, { fullWidth: !0, onClick: d, children: n("errorState.retry") }) : null,
|
|
66
|
+
/* @__PURE__ */ t(T, { fullWidth: !0, variant: d ? "filled" : "contained", onClick: a, children: n("userCard.signOut") })
|
|
67
|
+
] })
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return /* @__PURE__ */ m(R, { children: [
|
|
73
|
+
e,
|
|
74
|
+
p
|
|
75
|
+
] });
|
|
76
|
+
}
|
|
77
|
+
const s = S(), g = i === !1 ? /* @__PURE__ */ t(L, {}) : /* @__PURE__ */ t(D, { ...i === !0 ? {} : i, resetKeys: [Q], children: /* @__PURE__ */ t(L, {}) }), b = z ? g : /* @__PURE__ */ t(B, { isAuthenticated: s != null, redirectTo: l, children: /* @__PURE__ */ t(
|
|
78
|
+
F,
|
|
79
|
+
{
|
|
80
|
+
logo: u,
|
|
81
|
+
logoTo: C,
|
|
82
|
+
sidebarVariant: x,
|
|
83
|
+
toaster: !1,
|
|
84
|
+
header: {
|
|
85
|
+
user: s ? { name: s.name, email: s.email, avatar: s.avatar } : void 0,
|
|
86
|
+
onLogout: a,
|
|
87
|
+
...N
|
|
88
|
+
},
|
|
89
|
+
showUserCard: _,
|
|
90
|
+
children: g
|
|
91
|
+
}
|
|
92
|
+
) });
|
|
93
|
+
return /* @__PURE__ */ m(R, { children: [
|
|
94
|
+
b,
|
|
95
|
+
p
|
|
96
|
+
] });
|
|
97
|
+
};
|
|
98
|
+
export {
|
|
99
|
+
nt as A
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=AdminRoot-9KE3ll-D.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdminRoot-9KE3ll-D.js","sources":["../src/app/AdminRoot.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { Outlet, useNavigate, useRouterState, type LinkProps } from '@tanstack/react-router'\nimport {\n AuthLayout,\n Button,\n Col,\n ErrorBoundary,\n Loader,\n QueryError,\n RootLayout,\n Toaster,\n type ErrorBoundaryProps,\n type ToasterProps,\n type IconName,\n type RootLayoutHeader,\n type RootLayoutProps,\n} from '../components'\nimport { getErrorStatus } from '../components/ErrorState/errorMessage'\nimport { useT, type ThemeColor } from '../theme'\nimport { AuthGuard } from '../auth/AuthGuard'\nimport styles from './AdminRoot.module.css'\n\n/** Why the session can't be used — see `AdminRootUnavailable.reason`. */\nexport type AdminRootUnavailableReason = 'forbidden' | 'unreachable'\n\n/** The `unavailable` state of `AdminRoot` — the session could not be checked, or may not be used here. */\nexport interface AdminRootUnavailable {\n /** What failed — passed to `QueryError` (message, trace id). */\n error: unknown\n /**\n * Why. `'forbidden'` = a valid session this panel may not use (no retry, only Sign Out).\n * `'unreachable'` = the check itself failed (Try Again + Sign Out). Defaults to `'forbidden'` when the\n * error carries HTTP status 403 (`error.status` or `error.response.status`), else `'unreachable'`.\n */\n reason?: AdminRootUnavailableReason\n /** Re-runs the session check. Shown as \"Try Again\" for `'unreachable'` only. */\n onRetry?: () => void\n /**\n * The `AuthLayout` icon. Default: none — apps differ here (one shows a tinted `CloudCross`, another keeps\n * every auth page icon-free), so it's the app's choice.\n */\n icon?: IconName | false\n /** Tint for `icon` (`AuthLayout`'s `color`). Default `'error'`. */\n color?: ThemeColor\n}\n\n/** What an `unavailableFallback` receives. */\nexport interface AdminRootUnavailableFallbackProps {\n /** The `unavailable.error`. */\n error: unknown\n /** The resolved reason (explicit, or inferred from a 403). */\n reason: AdminRootUnavailableReason\n /** `unavailable.onRetry`, when given — whatever the reason (the fallback decides whether to offer it). */\n retry?: () => void\n /** The shell's Sign Out: `onLogout()`, then navigate to `loginPath`. */\n signOut: () => void\n}\n\n/** The minimal user shape `AdminRoot` reads — apps pass their own richer type via the generic. */\nexport interface AdminUser {\n name?: string\n email?: string\n avatar?: string\n}\n\nexport interface AdminRootProps<U extends AdminUser = AdminUser> {\n /** Brand mark for the sidebar top. */\n logo?: ReactNode\n /**\n * Where clicking the logo goes — the first menu page by default (see `RootLayout`'s `logoTo`); a path to\n * send it elsewhere, or `false` for a non-clickable logo.\n */\n logoTo?: RootLayoutProps['logoTo']\n /** Current user, or `null` when signed out. */\n getUser: () => U | null\n /** Clears the session; `AdminRoot` navigates to `loginPath` afterwards. */\n onLogout: () => void\n /** Route-id prefix for standalone public pages (rendered outside the shell). Default `'/_auth'`. */\n authRouteId?: string\n /** Guard target for signed-out visitors + post-logout redirect. Default `'/login'`. */\n loginPath?: string\n /**\n * Show a `UserCard` (the user + Sign Out) at the bottom of the sidebar — passed to `RootLayout`. Unset, the\n * app-wide `config.sidebar.userCard` applies (default `false`, hidden).\n */\n showUserCard?: boolean\n /**\n * The sidebar's look, passed to `RootLayout` — `'floating'` or `'docked'` (flush to the edges). **Unset\n * (recommended)**, each user picks it in the header Settings drawer (saved), defaulting to the app-wide\n * `config.sidebar.variant` (`'floating'` when unset). **Set**, it pins the look and the drawer's Sidebar\n * section is hidden.\n */\n sidebarVariant?: RootLayoutProps['sidebarVariant']\n /**\n * Extra `RootLayout` header config, merged **over** the defaults (the app's fields win). Flows through\n * unchanged — e.g. **`header.menu`** (`HeaderMenuItem[]`) adds items to the account menu above Sign out.\n */\n header?: RootLayoutHeader\n /**\n * Wrap the page content in an `ErrorBoundary` (reset on navigation), so a crashing page shows an\n * `ErrorState` inside the shell instead of a white screen. Default `true`; `false` opts out; an object\n * configures it (e.g. `{ onError: Sentry.captureException }` or a custom `fallback`). It only catches what\n * the router doesn't: TanStack Router catches a route's component / `loader` / `beforeLoad` errors in its own\n * per-route boundary, so page crashes need `createRouter({ defaultErrorComponent: PageError })`.\n */\n errorBoundary?: boolean | Omit<ErrorBoundaryProps, 'children' | 'resetKeys'>\n /**\n * The one app-wide toast viewport AdminRoot mounts (the inner `RootLayout`'s is always off, so there's never a\n * second one). Unset / `true` → `<Toaster />`, following the app-wide `config.toast`; `ToasterProps`\n * (`{ position, duration }`) → this shell's override, anything unset still falls back to `config.toast`;\n * `false` → no viewport (e.g. the app mounts its own `<Toaster>`). Same shape as `RootLayout`'s `toaster`.\n */\n toaster?: boolean | ToasterProps\n /**\n * The app is still finding out who is signed in (e.g. verifying a stored token or refreshing a cookie\n * session). While `true`, AdminRoot renders only `pendingFallback` — no shell, no public page, no\n * `AuthGuard`, and `getUser()` isn't read — so a signed-in admin is never redirected to sign-in before the\n * check resolves. Route `beforeLoad` guards (e.g. `authLayoutRoute`) still run in the router, independent\n * of this — they must tolerate the unknown state themselves. No minimum display time. Default `false`.\n */\n pending?: boolean\n /** What to show while `pending`. Default: a `Loader size=\"lg\"` centred in the full viewport. */\n pendingFallback?: ReactNode\n /**\n * The session could not be checked, or the server will not serve this account here. While set, AdminRoot\n * renders a standalone `AuthLayout` screen (the app's `logo`, a `QueryError`, Try Again / Sign Out) instead\n * of the shell or a public page — and never redirects. Sign Out calls `onLogout` then navigates to\n * `loginPath`, so **`onLogout` must clear whatever set `unavailable`** (or this screen shows again).\n * `pending` wins when both are set. `null` / `undefined` = not unavailable (the default).\n */\n unavailable?: AdminRootUnavailable | null\n /** Replaces the whole `unavailable` screen — for an app that needs its own wording or extra actions. */\n unavailableFallback?: (props: AdminRootUnavailableFallbackProps) => ReactNode\n}\n\n/**\n * Root-route component for admin apps — it wires up the whole shell orchestration so an app only has to\n * supply `logo` + `getUser` + `onLogout`. Public pages (route id under `authRouteId`) render standalone;\n * everything else renders inside the guarded admin shell (`RootLayout`, with an optional sidebar `UserCard`), gated by\n * `AuthGuard` (signed-out visitors bounce to `loginPath`). Logout clears the session and navigates to\n * `loginPath`. Mounts exactly one app-wide `<Toaster/>` (`toaster`; none with `toaster={false}` — the inner\n * `RootLayout` always gets `toaster={false}`),\n * and wraps the page in an `ErrorBoundary` that resets on navigation (`errorBoundary`, default on).\n * While the app is still checking the session, pass `pending` (a full-screen loader instead of a premature\n * sign-in redirect); when the check failed or the server refuses this account, pass `unavailable` (a\n * standalone \"Cannot Reach the Server\" / \"No Access\" screen with Try Again / Sign Out). The `Toaster` stays\n * mounted in both.\n *\n * `loginPath` is a plain string, cast loosely to the router's `to` type (the library can't know the\n * app's typed route tree). The generic `<U>` preserves the app's own user type through `getUser`.\n *\n * @example\n * // routes/__root.tsx\n * export const Route = createRootRoute({\n * component: () => {\n * const { status, error, retry } = useSession()\n * return (\n * <AdminRoot<AuthUser>\n * pending={status === 'loading'}\n * unavailable={status === 'unavailable' ? { error, onRetry: retry } : null}\n * logo={<Logo />}\n * getUser={getUser}\n * onLogout={logout}\n * />\n * )\n * },\n * })\n */\nexport const AdminRoot = <U extends AdminUser = AdminUser>({\n logo,\n logoTo,\n getUser,\n onLogout,\n authRouteId = '/_auth',\n loginPath = '/login',\n showUserCard,\n sidebarVariant,\n header,\n errorBoundary = true,\n toaster = true,\n pending = false,\n pendingFallback,\n unavailable,\n unavailableFallback,\n}: AdminRootProps<U>) => {\n const t = useT()\n const navigate = useNavigate()\n // the single app-wide toast viewport (props → config.toast → built-in defaults, resolved inside Toaster)\n const toasterNode =\n toaster === false ? null : <Toaster {...(typeof toaster === 'object' ? toaster : undefined)} />\n const isAuthRoute = useRouterState({\n select: (s) => s.matches.some((m) => m.routeId.startsWith(authRouteId)),\n })\n const pathname = useRouterState({ select: (s) => s.location?.pathname })\n const handleLogout = () => {\n onLogout()\n navigate({ to: loginPath as LinkProps['to'] })\n }\n\n // the session isn't known yet / can't be used — a standalone screen instead of the shell or a public\n // page (so no AuthGuard redirect, no sign-in flash). The Toaster stays, so a bootstrap toast isn't lost.\n if (pending || unavailable) {\n let gate: ReactNode\n if (pending) {\n gate = pendingFallback ?? (\n <div className={styles.pending} aria-busy=\"true\">\n <Loader size=\"lg\" />\n </div>\n )\n } else if (unavailable) {\n const reason: AdminRootUnavailableReason =\n unavailable.reason ??\n (getErrorStatus(unavailable.error) === 403 ? 'forbidden' : 'unreachable')\n if (unavailableFallback) {\n gate = unavailableFallback({\n error: unavailable.error,\n reason,\n retry: unavailable.onRetry,\n signOut: handleLogout,\n })\n } else {\n const retry = reason === 'unreachable' ? unavailable.onRetry : undefined\n const forbidden = reason === 'forbidden'\n gate = (\n <AuthLayout\n logo={logo}\n icon={unavailable.icon || undefined}\n color={unavailable.color ?? 'error'}\n title={t(forbidden ? 'adminRoot.noAccessTitle' : 'adminRoot.unreachableTitle')}\n subtitle={t(forbidden ? 'adminRoot.noAccessSubtitle' : 'adminRoot.unreachableSubtitle')}\n >\n <Col gap={16}>\n <QueryError variant=\"alert\" error={unavailable.error} />\n {retry ? (\n <Button fullWidth onClick={retry}>\n {t('errorState.retry')}\n </Button>\n ) : null}\n <Button fullWidth variant={retry ? 'filled' : 'contained'} onClick={handleLogout}>\n {t('userCard.signOut')}\n </Button>\n </Col>\n </AuthLayout>\n )\n }\n }\n return (\n <>\n {gate}\n {toasterNode}\n </>\n )\n }\n\n const user = getUser()\n // the routed page, inside an ErrorBoundary that resets whenever the path changes\n const page =\n errorBoundary === false ? (\n <Outlet />\n ) : (\n <ErrorBoundary {...(errorBoundary === true ? {} : errorBoundary)} resetKeys={[pathname]}>\n <Outlet />\n </ErrorBoundary>\n )\n const content = isAuthRoute ? (\n page\n ) : (\n <AuthGuard isAuthenticated={user != null} redirectTo={loginPath}>\n <RootLayout\n logo={logo}\n logoTo={logoTo}\n sidebarVariant={sidebarVariant}\n toaster={false}\n header={{\n user: user ? { name: user.name, email: user.email, avatar: user.avatar } : undefined,\n onLogout: handleLogout,\n ...header,\n }}\n showUserCard={showUserCard}\n >\n {page}\n </RootLayout>\n </AuthGuard>\n )\n return (\n <>\n {content}\n {toasterNode}\n </>\n )\n}\n"],"names":["AdminRoot","logo","logoTo","getUser","onLogout","authRouteId","loginPath","showUserCard","sidebarVariant","header","errorBoundary","toaster","pending","pendingFallback","unavailable","unavailableFallback","t","useT","navigate","useNavigate","toasterNode","jsx","Toaster","isAuthRoute","useRouterState","s","m","pathname","_a","handleLogout","gate","styles","Loader","reason","getErrorStatus","retry","forbidden","AuthLayout","jsxs","Col","QueryError","Button","Fragment","user","page","Outlet","ErrorBoundary","content","AuthGuard","RootLayout"],"mappings":";;;;;;;;;;;;;;GAwKaA,KAAY,CAAkC;AAAA,EACzD,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,WAAAC,IAAY;AAAA,EACZ,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,SAAAC,IAAU;AAAA,EACV,SAAAC,IAAU;AAAA,EACV,iBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,qBAAAC;AACF,MAAyB;AACvB,QAAMC,IAAIC,EAAA,GACJC,IAAWC,EAAA,GAEXC,IACJT,MAAY,KAAQ,OAAO,gBAAAU,EAACC,GAAA,EAAS,GAAI,OAAOX,KAAY,WAAWA,IAAU,OAAA,CAAY,GACzFY,IAAcC,EAAe;AAA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AAA,EAAO,WAAS,IAAC,SAASN,GACxB,UAAAnB,EAAE,kBAAkB,EAAA,CACvB,IACE;AAAA,cACJ,gBAAAK,EAACoB,GAAA,EAAO,WAAS,IAAC,SAASN,IAAQ,WAAW,aAAa,SAASN,GACjE,UAAAb,EAAE,kBAAkB,EAAA,CACvB;AAAA,YAAA,EAAA,CACF;AAAA,UAAA;AAAA,QAAA;AAAA,MAGN;AAAA,IACF;AACA,WACE,gBAAAsB,EAAAI,GAAA,EACG,UAAA;AAAA,MAAAZ;AAAA,MACAV;AAAA,IAAA,GACH;AAAA,EAEJ;AAEA,QAAMuB,IAAOxC,EAAA,GAEPyC,IACJlC,MAAkB,KAChB,gBAAAW,EAACwB,KAAO,IAER,gBAAAxB,EAACyB,KAAe,GAAIpC,MAAkB,KAAO,KAAKA,GAAgB,WAAW,CAACiB,CAAQ,GACpF,UAAA,gBAAAN,EAACwB,KAAO,GACV,GAEEE,IAAUxB,IACdqB,IAEA,gBAAAvB,EAAC2B,KAAU,iBAAiBL,KAAQ,MAAM,YAAYrC,GACpD,UAAA,gBAAAe;AAAA,IAAC4B;AAAA,IAAA;AAAA,MACC,MAAAhD;AAAA,MACA,QAAAC;AAAA,MACA,gBAAAM;AAAA,MACA,SAAS;AAAA,MACT,QAAQ;AAAA,QACN,MAAMmC,IAAO,EAAE,MAAMA,EAAK,MAAM,OAAOA,EAAK,OAAO,QAAQA,EAAK,OAAA,IAAW;AAAA,QAC3E,UAAUd;AAAA,QACV,GAAGpB;AAAA,MAAA;AAAA,MAEL,cAAAF;AAAA,MAEC,UAAAqC;AAAA,IAAA;AAAA,EAAA,GAEL;AAEF,SACE,gBAAAN,EAAAI,GAAA,EACG,UAAA;AAAA,IAAAK;AAAA,IACA3B;AAAA,EAAA,GACH;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),n=require("@tanstack/react-router"),W=require("./errorMessage-C7N4KvUS.cjs"),v=require("./AuthGuard-kfOZviar.cjs"),z=require("./ConfigProvider-Cf-awvZs.cjs"),G=require("./Toaster-D4T89N1S.cjs"),b=require("./AuthLayout-Bzlsvicf.cjs"),k=require("./Col-BdQeyKEX.cjs"),y=require("./ErrorBoundary-DtYswKp3.cjs"),R=require("./Button-Bxztlybi.cjs"),F=require("./RootLayout-iSGY4MsS.cjs"),I=require("./Loader-DNR2_YHm.cjs"),K="_pending_1jy0z_2",M={pending:K},Q=({logo:l,logoTo:q,getUser:A,onLogout:p,authRouteId:L="/_auth",loginPath:h="/login",showUserCard:C,sidebarVariant:S,header:T,errorBoundary:c=!0,toaster:u=!0,pending:j=!1,pendingFallback:E,unavailable:t,unavailableFallback:m})=>{const i=z.useT(),O=n.useNavigate(),g=u===!1?null:e.jsx(G.Toaster,{...typeof u=="object"?u:void 0}),_=n.useRouterState({select:r=>r.matches.some(o=>o.routeId.startsWith(L))}),B=n.useRouterState({select:r=>{var o;return(o=r.location)==null?void 0:o.pathname}}),d=()=>{p(),O({to:h})};if(j||t){let r;if(j)r=E??e.jsx("div",{className:M.pending,"aria-busy":"true",children:e.jsx(I.Loader,{size:"lg"})});else if(t){const o=t.reason??(W.getErrorStatus(t.error)===403?"forbidden":"unreachable");if(m)r=m({error:t.error,reason:o,retry:t.onRetry,signOut:d});else{const a=o==="unreachable"?t.onRetry:void 0,x=o==="forbidden";r=e.jsx(b.AuthLayout,{logo:l,icon:t.icon||void 0,color:t.color??"error",title:i(x?"adminRoot.noAccessTitle":"adminRoot.unreachableTitle"),subtitle:i(x?"adminRoot.noAccessSubtitle":"adminRoot.unreachableSubtitle"),children:e.jsxs(k.Col,{gap:16,children:[e.jsx(y.QueryError,{variant:"alert",error:t.error}),a?e.jsx(R.Button,{fullWidth:!0,onClick:a,children:i("errorState.retry")}):null,e.jsx(R.Button,{fullWidth:!0,variant:a?"filled":"contained",onClick:d,children:i("userCard.signOut")})]})})}}return e.jsxs(e.Fragment,{children:[r,g]})}const s=A(),f=c===!1?e.jsx(n.Outlet,{}):e.jsx(y.ErrorBoundary,{...c===!0?{}:c,resetKeys:[B],children:e.jsx(n.Outlet,{})}),N=_?f:e.jsx(v.AuthGuard,{isAuthenticated:s!=null,redirectTo:h,children:e.jsx(F.RootLayout,{logo:l,logoTo:q,sidebarVariant:S,toaster:!1,header:{user:s?{name:s.name,email:s.email,avatar:s.avatar}:void 0,onLogout:d,...T},showUserCard:C,children:f})});return e.jsxs(e.Fragment,{children:[N,g]})};exports.AdminRoot=Q;
|
|
2
|
+
//# sourceMappingURL=AdminRoot-BMzHo0n7.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdminRoot-BMzHo0n7.cjs","sources":["../src/app/AdminRoot.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport { Outlet, useNavigate, useRouterState, type LinkProps } from '@tanstack/react-router'\nimport {\n AuthLayout,\n Button,\n Col,\n ErrorBoundary,\n Loader,\n QueryError,\n RootLayout,\n Toaster,\n type ErrorBoundaryProps,\n type ToasterProps,\n type IconName,\n type RootLayoutHeader,\n type RootLayoutProps,\n} from '../components'\nimport { getErrorStatus } from '../components/ErrorState/errorMessage'\nimport { useT, type ThemeColor } from '../theme'\nimport { AuthGuard } from '../auth/AuthGuard'\nimport styles from './AdminRoot.module.css'\n\n/** Why the session can't be used — see `AdminRootUnavailable.reason`. */\nexport type AdminRootUnavailableReason = 'forbidden' | 'unreachable'\n\n/** The `unavailable` state of `AdminRoot` — the session could not be checked, or may not be used here. */\nexport interface AdminRootUnavailable {\n /** What failed — passed to `QueryError` (message, trace id). */\n error: unknown\n /**\n * Why. `'forbidden'` = a valid session this panel may not use (no retry, only Sign Out).\n * `'unreachable'` = the check itself failed (Try Again + Sign Out). Defaults to `'forbidden'` when the\n * error carries HTTP status 403 (`error.status` or `error.response.status`), else `'unreachable'`.\n */\n reason?: AdminRootUnavailableReason\n /** Re-runs the session check. Shown as \"Try Again\" for `'unreachable'` only. */\n onRetry?: () => void\n /**\n * The `AuthLayout` icon. Default: none — apps differ here (one shows a tinted `CloudCross`, another keeps\n * every auth page icon-free), so it's the app's choice.\n */\n icon?: IconName | false\n /** Tint for `icon` (`AuthLayout`'s `color`). Default `'error'`. */\n color?: ThemeColor\n}\n\n/** What an `unavailableFallback` receives. */\nexport interface AdminRootUnavailableFallbackProps {\n /** The `unavailable.error`. */\n error: unknown\n /** The resolved reason (explicit, or inferred from a 403). */\n reason: AdminRootUnavailableReason\n /** `unavailable.onRetry`, when given — whatever the reason (the fallback decides whether to offer it). */\n retry?: () => void\n /** The shell's Sign Out: `onLogout()`, then navigate to `loginPath`. */\n signOut: () => void\n}\n\n/** The minimal user shape `AdminRoot` reads — apps pass their own richer type via the generic. */\nexport interface AdminUser {\n name?: string\n email?: string\n avatar?: string\n}\n\nexport interface AdminRootProps<U extends AdminUser = AdminUser> {\n /** Brand mark for the sidebar top. */\n logo?: ReactNode\n /**\n * Where clicking the logo goes — the first menu page by default (see `RootLayout`'s `logoTo`); a path to\n * send it elsewhere, or `false` for a non-clickable logo.\n */\n logoTo?: RootLayoutProps['logoTo']\n /** Current user, or `null` when signed out. */\n getUser: () => U | null\n /** Clears the session; `AdminRoot` navigates to `loginPath` afterwards. */\n onLogout: () => void\n /** Route-id prefix for standalone public pages (rendered outside the shell). Default `'/_auth'`. */\n authRouteId?: string\n /** Guard target for signed-out visitors + post-logout redirect. Default `'/login'`. */\n loginPath?: string\n /**\n * Show a `UserCard` (the user + Sign Out) at the bottom of the sidebar — passed to `RootLayout`. Unset, the\n * app-wide `config.sidebar.userCard` applies (default `false`, hidden).\n */\n showUserCard?: boolean\n /**\n * The sidebar's look, passed to `RootLayout` — `'floating'` or `'docked'` (flush to the edges). **Unset\n * (recommended)**, each user picks it in the header Settings drawer (saved), defaulting to the app-wide\n * `config.sidebar.variant` (`'floating'` when unset). **Set**, it pins the look and the drawer's Sidebar\n * section is hidden.\n */\n sidebarVariant?: RootLayoutProps['sidebarVariant']\n /**\n * Extra `RootLayout` header config, merged **over** the defaults (the app's fields win). Flows through\n * unchanged — e.g. **`header.menu`** (`HeaderMenuItem[]`) adds items to the account menu above Sign out.\n */\n header?: RootLayoutHeader\n /**\n * Wrap the page content in an `ErrorBoundary` (reset on navigation), so a crashing page shows an\n * `ErrorState` inside the shell instead of a white screen. Default `true`; `false` opts out; an object\n * configures it (e.g. `{ onError: Sentry.captureException }` or a custom `fallback`). It only catches what\n * the router doesn't: TanStack Router catches a route's component / `loader` / `beforeLoad` errors in its own\n * per-route boundary, so page crashes need `createRouter({ defaultErrorComponent: PageError })`.\n */\n errorBoundary?: boolean | Omit<ErrorBoundaryProps, 'children' | 'resetKeys'>\n /**\n * The one app-wide toast viewport AdminRoot mounts (the inner `RootLayout`'s is always off, so there's never a\n * second one). Unset / `true` → `<Toaster />`, following the app-wide `config.toast`; `ToasterProps`\n * (`{ position, duration }`) → this shell's override, anything unset still falls back to `config.toast`;\n * `false` → no viewport (e.g. the app mounts its own `<Toaster>`). Same shape as `RootLayout`'s `toaster`.\n */\n toaster?: boolean | ToasterProps\n /**\n * The app is still finding out who is signed in (e.g. verifying a stored token or refreshing a cookie\n * session). While `true`, AdminRoot renders only `pendingFallback` — no shell, no public page, no\n * `AuthGuard`, and `getUser()` isn't read — so a signed-in admin is never redirected to sign-in before the\n * check resolves. Route `beforeLoad` guards (e.g. `authLayoutRoute`) still run in the router, independent\n * of this — they must tolerate the unknown state themselves. No minimum display time. Default `false`.\n */\n pending?: boolean\n /** What to show while `pending`. Default: a `Loader size=\"lg\"` centred in the full viewport. */\n pendingFallback?: ReactNode\n /**\n * The session could not be checked, or the server will not serve this account here. While set, AdminRoot\n * renders a standalone `AuthLayout` screen (the app's `logo`, a `QueryError`, Try Again / Sign Out) instead\n * of the shell or a public page — and never redirects. Sign Out calls `onLogout` then navigates to\n * `loginPath`, so **`onLogout` must clear whatever set `unavailable`** (or this screen shows again).\n * `pending` wins when both are set. `null` / `undefined` = not unavailable (the default).\n */\n unavailable?: AdminRootUnavailable | null\n /** Replaces the whole `unavailable` screen — for an app that needs its own wording or extra actions. */\n unavailableFallback?: (props: AdminRootUnavailableFallbackProps) => ReactNode\n}\n\n/**\n * Root-route component for admin apps — it wires up the whole shell orchestration so an app only has to\n * supply `logo` + `getUser` + `onLogout`. Public pages (route id under `authRouteId`) render standalone;\n * everything else renders inside the guarded admin shell (`RootLayout`, with an optional sidebar `UserCard`), gated by\n * `AuthGuard` (signed-out visitors bounce to `loginPath`). Logout clears the session and navigates to\n * `loginPath`. Mounts exactly one app-wide `<Toaster/>` (`toaster`; none with `toaster={false}` — the inner\n * `RootLayout` always gets `toaster={false}`),\n * and wraps the page in an `ErrorBoundary` that resets on navigation (`errorBoundary`, default on).\n * While the app is still checking the session, pass `pending` (a full-screen loader instead of a premature\n * sign-in redirect); when the check failed or the server refuses this account, pass `unavailable` (a\n * standalone \"Cannot Reach the Server\" / \"No Access\" screen with Try Again / Sign Out). The `Toaster` stays\n * mounted in both.\n *\n * `loginPath` is a plain string, cast loosely to the router's `to` type (the library can't know the\n * app's typed route tree). The generic `<U>` preserves the app's own user type through `getUser`.\n *\n * @example\n * // routes/__root.tsx\n * export const Route = createRootRoute({\n * component: () => {\n * const { status, error, retry } = useSession()\n * return (\n * <AdminRoot<AuthUser>\n * pending={status === 'loading'}\n * unavailable={status === 'unavailable' ? { error, onRetry: retry } : null}\n * logo={<Logo />}\n * getUser={getUser}\n * onLogout={logout}\n * />\n * )\n * },\n * })\n */\nexport const AdminRoot = <U extends AdminUser = AdminUser>({\n logo,\n logoTo,\n getUser,\n onLogout,\n authRouteId = '/_auth',\n loginPath = '/login',\n showUserCard,\n sidebarVariant,\n header,\n errorBoundary = true,\n toaster = true,\n pending = false,\n pendingFallback,\n unavailable,\n unavailableFallback,\n}: AdminRootProps<U>) => {\n const t = useT()\n const navigate = useNavigate()\n // the single app-wide toast viewport (props → config.toast → built-in defaults, resolved inside Toaster)\n const toasterNode =\n toaster === false ? null : <Toaster {...(typeof toaster === 'object' ? toaster : undefined)} />\n const isAuthRoute = useRouterState({\n select: (s) => s.matches.some((m) => m.routeId.startsWith(authRouteId)),\n })\n const pathname = useRouterState({ select: (s) => s.location?.pathname })\n const handleLogout = () => {\n onLogout()\n navigate({ to: loginPath as LinkProps['to'] })\n }\n\n // the session isn't known yet / can't be used — a standalone screen instead of the shell or a public\n // page (so no AuthGuard redirect, no sign-in flash). The Toaster stays, so a bootstrap toast isn't lost.\n if (pending || unavailable) {\n let gate: ReactNode\n if (pending) {\n gate = pendingFallback ?? (\n <div className={styles.pending} aria-busy=\"true\">\n <Loader size=\"lg\" />\n </div>\n )\n } else if (unavailable) {\n const reason: AdminRootUnavailableReason =\n unavailable.reason ??\n (getErrorStatus(unavailable.error) === 403 ? 'forbidden' : 'unreachable')\n if (unavailableFallback) {\n gate = unavailableFallback({\n error: unavailable.error,\n reason,\n retry: unavailable.onRetry,\n signOut: handleLogout,\n })\n } else {\n const retry = reason === 'unreachable' ? unavailable.onRetry : undefined\n const forbidden = reason === 'forbidden'\n gate = (\n <AuthLayout\n logo={logo}\n icon={unavailable.icon || undefined}\n color={unavailable.color ?? 'error'}\n title={t(forbidden ? 'adminRoot.noAccessTitle' : 'adminRoot.unreachableTitle')}\n subtitle={t(forbidden ? 'adminRoot.noAccessSubtitle' : 'adminRoot.unreachableSubtitle')}\n >\n <Col gap={16}>\n <QueryError variant=\"alert\" error={unavailable.error} />\n {retry ? (\n <Button fullWidth onClick={retry}>\n {t('errorState.retry')}\n </Button>\n ) : null}\n <Button fullWidth variant={retry ? 'filled' : 'contained'} onClick={handleLogout}>\n {t('userCard.signOut')}\n </Button>\n </Col>\n </AuthLayout>\n )\n }\n }\n return (\n <>\n {gate}\n {toasterNode}\n </>\n )\n }\n\n const user = getUser()\n // the routed page, inside an ErrorBoundary that resets whenever the path changes\n const page =\n errorBoundary === false ? (\n <Outlet />\n ) : (\n <ErrorBoundary {...(errorBoundary === true ? {} : errorBoundary)} resetKeys={[pathname]}>\n <Outlet />\n </ErrorBoundary>\n )\n const content = isAuthRoute ? (\n page\n ) : (\n <AuthGuard isAuthenticated={user != null} redirectTo={loginPath}>\n <RootLayout\n logo={logo}\n logoTo={logoTo}\n sidebarVariant={sidebarVariant}\n toaster={false}\n header={{\n user: user ? { name: user.name, email: user.email, avatar: user.avatar } : undefined,\n onLogout: handleLogout,\n ...header,\n }}\n showUserCard={showUserCard}\n >\n {page}\n </RootLayout>\n </AuthGuard>\n )\n return (\n <>\n {content}\n {toasterNode}\n </>\n )\n}\n"],"names":["AdminRoot","logo","logoTo","getUser","onLogout","authRouteId","loginPath","showUserCard","sidebarVariant","header","errorBoundary","toaster","pending","pendingFallback","unavailable","unavailableFallback","t","useT","navigate","useNavigate","toasterNode","jsx","Toaster","isAuthRoute","useRouterState","s","m","pathname","_a","handleLogout","gate","styles","Loader","reason","getErrorStatus","retry","forbidden","AuthLayout","jsxs","Col","QueryError","Button","Fragment","user","page","Outlet","ErrorBoundary","content","AuthGuard","RootLayout"],"mappings":"qfAwKaA,EAAY,CAAkC,CACzD,KAAAC,EACA,OAAAC,EACA,QAAAC,EACA,SAAAC,EACA,YAAAC,EAAc,SACd,UAAAC,EAAY,SACZ,aAAAC,EACA,eAAAC,EACA,OAAAC,EACA,cAAAC,EAAgB,GAChB,QAAAC,EAAU,GACV,QAAAC,EAAU,GACV,gBAAAC,EACA,YAAAC,EACA,oBAAAC,CACF,IAAyB,CACvB,MAAMC,EAAIC,EAAAA,KAAA,EACJC,EAAWC,EAAAA,YAAA,EAEXC,EACJT,IAAY,GAAQ,KAAOU,EAAAA,IAACC,EAAAA,QAAA,CAAS,GAAI,OAAOX,GAAY,SAAWA,EAAU,MAAA,CAAY,EACzFY,EAAcC,EAAAA,eAAe,CACjC,OAASC,GAAMA,EAAE,QAAQ,KAAMC,GAAMA,EAAE,QAAQ,WAAWrB,CAAW,CAAC,CAAA,CACvE,EACKsB,EAAWH,EAAAA,eAAe,CAAE,OAASC,UAAM,OAAAG,EAAAH,EAAE,WAAF,YAAAG,EAAY,UAAU,EACjE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A,MAAMuB,EAAOxC,EAAA,EAEPyC,EACJlC,IAAkB,GAChBW,EAAAA,IAACwB,WAAO,EAERxB,EAAAA,IAACyB,EAAAA,eAAe,GAAIpC,IAAkB,GAAO,GAAKA,EAAgB,UAAW,CAACiB,CAAQ,EACpF,SAAAN,MAACwB,EAAAA,SAAO,EACV,EAEEE,EAAUxB,EACdqB,EAEAvB,EAAAA,IAAC2B,EAAAA,WAAU,gBAAiBL,GAAQ,KAAM,WAAYrC,EACpD,SAAAe,EAAAA,IAAC4B,EAAAA,WAAA,CACC,KAAAhD,EACA,OAAAC,EACA,eAAAM,EACA,QAAS,GACT,OAAQ,CACN,KAAMmC,EAAO,CAAE,KAAMA,EAAK,KAAM,MAAOA,EAAK,MAAO,OAAQA,EAAK,MAAA,EAAW,OAC3E,SAAUd,EACV,GAAGpB,CAAA,EAEL,aAAAF,EAEC,SAAAqC,CAAA,CAAA,EAEL,EAEF,OACEN,EAAAA,KAAAI,WAAA,CACG,SAAA,CAAAK,EACA3B,CAAA,EACH,CAEJ"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx as n, jsxs as N } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as g } from "react";
|
|
3
|
+
import { clsx as p } from "clsx";
|
|
4
|
+
import { b as a, a as C } from "./Icon-B7DJn8Tw.js";
|
|
5
|
+
import { I } from "./IconButton-EaExCXRq.js";
|
|
6
|
+
import { a as x } from "./ConfigProvider-CYgmMH4j.js";
|
|
7
|
+
const b = "_alert_ujn1a_3", h = "_filled_ujn1a_19", v = "_contained_ujn1a_22", A = "_outlined_ujn1a_26", z = "_text_ujn1a_30", E = "_icon_ujn1a_35", T = "_message_ujn1a_44", w = "_action_ujn1a_50", y = "_close_ujn1a_57", t = {
|
|
8
|
+
alert: b,
|
|
9
|
+
filled: h,
|
|
10
|
+
contained: v,
|
|
11
|
+
outlined: A,
|
|
12
|
+
text: z,
|
|
13
|
+
icon: E,
|
|
14
|
+
message: T,
|
|
15
|
+
action: w,
|
|
16
|
+
close: y
|
|
17
|
+
}, O = new Set(C), S = {
|
|
18
|
+
success: "TickCircle",
|
|
19
|
+
error: "CloseCircle",
|
|
20
|
+
warning: "Warning",
|
|
21
|
+
info: "InfoCircle"
|
|
22
|
+
}, R = g(function({
|
|
23
|
+
variant: c = "filled",
|
|
24
|
+
color: s = "info",
|
|
25
|
+
icon: e,
|
|
26
|
+
action: o,
|
|
27
|
+
onClose: l,
|
|
28
|
+
closeLabel: i,
|
|
29
|
+
className: _,
|
|
30
|
+
style: m,
|
|
31
|
+
children: d,
|
|
32
|
+
...f
|
|
33
|
+
}, u) {
|
|
34
|
+
const j = x(), r = e === !1 ? null : e == null ? /* @__PURE__ */ n(a, { name: S[s] ?? "InfoCircle" }) : typeof e == "string" && O.has(e) ? /* @__PURE__ */ n(a, { name: e }) : e;
|
|
35
|
+
return /* @__PURE__ */ N(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
ref: u,
|
|
39
|
+
role: "alert",
|
|
40
|
+
className: p(t.alert, t[c], _),
|
|
41
|
+
style: {
|
|
42
|
+
"--tz-btn-rgb": `var(--tz-color-${s}-rgb)`,
|
|
43
|
+
"--tz-btn-on": `var(--tz-color-${s}-contrast, #fff)`,
|
|
44
|
+
...m
|
|
45
|
+
},
|
|
46
|
+
...f,
|
|
47
|
+
children: [
|
|
48
|
+
r != null && /* @__PURE__ */ n("span", { className: t.icon, "aria-hidden": !0, children: r }),
|
|
49
|
+
/* @__PURE__ */ n("div", { className: t.message, children: d }),
|
|
50
|
+
o != null && /* @__PURE__ */ n("div", { className: t.action, children: o }),
|
|
51
|
+
l && /* @__PURE__ */ n(
|
|
52
|
+
I,
|
|
53
|
+
{
|
|
54
|
+
variant: "text",
|
|
55
|
+
color: s,
|
|
56
|
+
size: "sm",
|
|
57
|
+
className: t.close,
|
|
58
|
+
"aria-label": i ?? j("common.close"),
|
|
59
|
+
onClick: l,
|
|
60
|
+
children: /* @__PURE__ */ n(a, { name: "Close" })
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
});
|
|
67
|
+
export {
|
|
68
|
+
R as A
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=Alert-BFfzpPNd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert-
|
|
1
|
+
{"version":3,"file":"Alert-BFfzpPNd.js","sources":["../src/components/Alert/Alert.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { useT, type ThemeColor } from '../../theme'\nimport styles from './Alert.module.css'\n\nexport type AlertVariant = 'contained' | 'filled' | 'outlined' | 'text'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\n/** Default leading icon per semantic color (other colors fall back to `InfoCircle`). */\nconst DEFAULT_ICON: Partial<Record<ThemeColor, IconName>> = {\n success: 'TickCircle',\n error: 'CloseCircle',\n warning: 'Warning',\n info: 'InfoCircle',\n}\n\nexport interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'title'> {\n /** Tint style. Defaults to `filled` (the soft tint). */\n variant?: AlertVariant\n /** Brand / semantic palette token that tints the alert. Defaults to `info`. */\n color?: ThemeColor\n /**\n * Leading icon — a known `IconName`, any node, or `false` to hide it. Defaults to the semantic icon\n * for `color` (success → `TickCircle`, error → `CloseCircle`, warning → `Warning`, info → `InfoCircle`).\n */\n icon?: IconName | ReactNode | false\n /** Trailing action (e.g. an `UNDO` button), placed before the close button. */\n action?: ReactNode\n /** When provided, a trailing × close button appears that calls this. */\n onClose?: () => void\n /** Accessible label for the close button. Defaults to the localized \"Close\" (`common.close`). */\n closeLabel?: string\n /** Alert message. */\n children?: ReactNode\n}\n\n/**\n * A message banner — the library's inline feedback surface (info, success, warning, error). Tinted by\n * `color` via the shared `--tz-btn-rgb` pattern across the 4 standard `variant`s; a semantic leading\n * `icon` is auto-picked per color (override with `icon`, or `icon={false}` to drop it). An optional\n * `action` slot (e.g. an `UNDO` button) and an `onClose` × button trail the message. `role=\"alert\"`.\n */\nexport const Alert = forwardRef<HTMLDivElement, AlertProps>(function Alert(\n {\n variant = 'filled',\n color = 'info',\n icon,\n action,\n onClose,\n closeLabel,\n className,\n style,\n children,\n ...props\n },\n ref,\n) {\n const t = useT()\n const renderedIcon =\n icon === false ? null : icon == null ? (\n <Icon name={DEFAULT_ICON[color] ?? 'InfoCircle'} />\n ) : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} />\n ) : (\n icon\n )\n\n return (\n <div\n ref={ref}\n role=\"alert\"\n className={clsx(styles.alert, styles[variant], className)}\n style={\n {\n '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`,\n '--tz-btn-on': `var(--tz-color-${color}-contrast, #fff)`,\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n {renderedIcon != null && (\n <span className={styles.icon} aria-hidden>\n {renderedIcon}\n </span>\n )}\n <div className={styles.message}>{children}</div>\n {action != null && <div className={styles.action}>{action}</div>}\n {onClose && (\n <IconButton\n variant=\"text\"\n color={color}\n size=\"sm\"\n className={styles.close}\n aria-label={closeLabel ?? t('common.close')}\n onClick={onClose}\n >\n <Icon name=\"Close\" />\n </IconButton>\n )}\n </div>\n )\n})\n"],"names":["ICON_NAME_SET","ICON_NAMES","DEFAULT_ICON","Alert","forwardRef","variant","color","icon","action","onClose","closeLabel","className","style","children","props","ref","t","useT","renderedIcon","jsx","Icon","jsxs","clsx","styles","IconButton"],"mappings":";;;;;;;;;;;;;;;;GAUMA,IAAgB,IAAI,IAAYC,CAAU,GAG1CC,IAAsD;AAAA,EAC1D,SAAS;AAAA,EACT,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AACR,GA4BaC,IAAQC,EAAuC,SAC1D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CAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,MACrB;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),x=require("react"),I=require("clsx"),c=require("./Icon-CBg21lKA.cjs"),g=require("./IconButton-wW1o4HHw.cjs"),C=require("./ConfigProvider-Cf-awvZs.cjs"),N="_alert_ujn1a_3",v="_filled_ujn1a_19",h="_contained_ujn1a_22",q="_outlined_ujn1a_26",A="_text_ujn1a_30",b="_icon_ujn1a_35",z="_message_ujn1a_44",E="_action_ujn1a_50",T="_close_ujn1a_57",s={alert:N,filled:v,contained:h,outlined:q,text:A,icon:b,message:z,action:E,close:T},w=new Set(c.ICON_NAMES),y={success:"TickCircle",error:"CloseCircle",warning:"Warning",info:"InfoCircle"},O=x.forwardRef(function({variant:r="filled",color:t="info",icon:n,action:o,onClose:a,closeLabel:i,className:u,style:_,children:d,...j},f){const m=C.useT(),l=n===!1?null:n==null?e.jsx(c.Icon,{name:y[t]??"InfoCircle"}):typeof n=="string"&&w.has(n)?e.jsx(c.Icon,{name:n}):n;return e.jsxs("div",{ref:f,role:"alert",className:I.clsx(s.alert,s[r],u),style:{"--tz-btn-rgb":`var(--tz-color-${t}-rgb)`,"--tz-btn-on":`var(--tz-color-${t}-contrast, #fff)`,..._},...j,children:[l!=null&&e.jsx("span",{className:s.icon,"aria-hidden":!0,children:l}),e.jsx("div",{className:s.message,children:d}),o!=null&&e.jsx("div",{className:s.action,children:o}),a&&e.jsx(g.IconButton,{variant:"text",color:t,size:"sm",className:s.close,"aria-label":i??m("common.close"),onClick:a,children:e.jsx(c.Icon,{name:"Close"})})]})});exports.Alert=O;
|
|
2
|
+
//# sourceMappingURL=Alert-DS8TzpIS.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert-
|
|
1
|
+
{"version":3,"file":"Alert-DS8TzpIS.cjs","sources":["../src/components/Alert/Alert.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { ICON_NAMES, type IconName } from '../../icons/names'\nimport { useT, type ThemeColor } from '../../theme'\nimport styles from './Alert.module.css'\n\nexport type AlertVariant = 'contained' | 'filled' | 'outlined' | 'text'\n\nconst ICON_NAME_SET = new Set<string>(ICON_NAMES)\n\n/** Default leading icon per semantic color (other colors fall back to `InfoCircle`). */\nconst DEFAULT_ICON: Partial<Record<ThemeColor, IconName>> = {\n success: 'TickCircle',\n error: 'CloseCircle',\n warning: 'Warning',\n info: 'InfoCircle',\n}\n\nexport interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'title'> {\n /** Tint style. Defaults to `filled` (the soft tint). */\n variant?: AlertVariant\n /** Brand / semantic palette token that tints the alert. Defaults to `info`. */\n color?: ThemeColor\n /**\n * Leading icon — a known `IconName`, any node, or `false` to hide it. Defaults to the semantic icon\n * for `color` (success → `TickCircle`, error → `CloseCircle`, warning → `Warning`, info → `InfoCircle`).\n */\n icon?: IconName | ReactNode | false\n /** Trailing action (e.g. an `UNDO` button), placed before the close button. */\n action?: ReactNode\n /** When provided, a trailing × close button appears that calls this. */\n onClose?: () => void\n /** Accessible label for the close button. Defaults to the localized \"Close\" (`common.close`). */\n closeLabel?: string\n /** Alert message. */\n children?: ReactNode\n}\n\n/**\n * A message banner — the library's inline feedback surface (info, success, warning, error). Tinted by\n * `color` via the shared `--tz-btn-rgb` pattern across the 4 standard `variant`s; a semantic leading\n * `icon` is auto-picked per color (override with `icon`, or `icon={false}` to drop it). An optional\n * `action` slot (e.g. an `UNDO` button) and an `onClose` × button trail the message. `role=\"alert\"`.\n */\nexport const Alert = forwardRef<HTMLDivElement, AlertProps>(function Alert(\n {\n variant = 'filled',\n color = 'info',\n icon,\n action,\n onClose,\n closeLabel,\n className,\n style,\n children,\n ...props\n },\n ref,\n) {\n const t = useT()\n const renderedIcon =\n icon === false ? null : icon == null ? (\n <Icon name={DEFAULT_ICON[color] ?? 'InfoCircle'} />\n ) : typeof icon === 'string' && ICON_NAME_SET.has(icon) ? (\n <Icon name={icon as IconName} />\n ) : (\n icon\n )\n\n return (\n <div\n ref={ref}\n role=\"alert\"\n className={clsx(styles.alert, styles[variant], className)}\n style={\n {\n '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`,\n '--tz-btn-on': `var(--tz-color-${color}-contrast, #fff)`,\n ...style,\n } as CSSProperties\n }\n {...props}\n >\n {renderedIcon != null && (\n <span className={styles.icon} aria-hidden>\n {renderedIcon}\n </span>\n )}\n <div className={styles.message}>{children}</div>\n {action != null && <div className={styles.action}>{action}</div>}\n {onClose && (\n <IconButton\n variant=\"text\"\n color={color}\n size=\"sm\"\n className={styles.close}\n aria-label={closeLabel ?? t('common.close')}\n onClick={onClose}\n >\n <Icon name=\"Close\" />\n </IconButton>\n )}\n </div>\n )\n})\n"],"names":["ICON_NAME_SET","ICON_NAMES","DEFAULT_ICON","Alert","forwardRef","variant","color","icon","action","onClose","closeLabel","className","style","children","props","ref","t","useT","renderedIcon","jsx","Icon","jsxs","clsx","styles","IconButton"],"mappings":"2dAUMA,EAAgB,IAAI,IAAYC,YAAU,EAG1CC,EAAsD,CAC1D,QAAS,aACT,MAAO,cACP,QAAS,UACT,KAAM,YACR,EA4BaC,EAAQC,EAAAA,WAAuC,SAC1D,CACE,QAAAC,EAAU,SACV,MAAAC,EAAQ,OACR,KAAAC,EACA,OAAAC,EACA,QAAAC,EACA,WAAAC,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAIC,EAAAA,KAAA,EACJC,EACJX,IAAS,GAAQ,KAAOA,GAAQ,KAC9BY,EAAAA,IAACC,EAAAA,KAAA,CAAK,KAAMlB,EAAaI,CAAK,GAAK,aAAc,EAC/C,OAAOC,GAAS,UAAYP,EAAc,IAAIO,CAAI,EACpDY,EAAAA,IAACC,EAAAA,KAAA,CAAK,KAAMb,CAAA,CAAkB,EAE9BA,EAGJ,OACEc,EAAAA,KAAC,MAAA,CACC,IAAAN,EACA,KAAK,QACL,UAAWO,EAAAA,KAAKC,EAAO,MAAOA,EAAOlB,CAAO,EAAGM,CAAS,EACxD,MACE,CACE,eAAgB,kBAAkBL,CAAK,QACvC,cAAe,kBAAkBA,CAAK,mBACtC,GAAGM,CAAA,EAGN,GAAGE,EAEH,SAAA,CAAAI,GAAgB,YACd,OAAA,CAAK,UAAWK,EAAO,KAAM,cAAW,GACtC,SAAAL,CAAA,CACH,EAEFC,EAAAA,IAAC,MAAA,CAAI,UAAWI,EAAO,QAAU,SAAAV,EAAS,EACzCL,GAAU,MAAQW,EAAAA,IAAC,OAAI,UAAWI,EAAO,OAAS,SAAAf,EAAO,EACzDC,GACCU,EAAAA,IAACK,EAAAA,WAAA,CACC,QAAQ,OACR,MAAAlB,EACA,KAAK,KACL,UAAWiB,EAAO,MAClB,aAAYb,GAAcM,EAAE,cAAc,EAC1C,QAASP,EAET,SAAAU,EAAAA,IAACC,EAAAA,KAAA,CAAK,KAAK,OAAA,CAAQ,CAAA,CAAA,CACrB,CAAA,CAAA,CAIR,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as g } from "react";
|
|
3
3
|
import { clsx as y } from "clsx";
|
|
4
|
-
import { A as f } from "./Avatar-
|
|
4
|
+
import { A as f } from "./Avatar-CaYyv5wk.js";
|
|
5
5
|
import { T as u } from "./Typography-ChSuxgkc.js";
|
|
6
6
|
const p = "_authLayout_1vumg_3", N = "_logo_1vumg_20", L = "_card_1vumg_36", A = "_icon_1vumg_50", x = "_header_1vumg_55", b = "_body_1vumg_62", j = "_footer_1vumg_68", o = {
|
|
7
7
|
authLayout: p,
|
|
@@ -40,4 +40,4 @@ const p = "_authLayout_1vumg_3", N = "_logo_1vumg_20", L = "_card_1vumg_36", A =
|
|
|
40
40
|
export {
|
|
41
41
|
B as A
|
|
42
42
|
};
|
|
43
|
-
//# sourceMappingURL=AuthLayout-
|
|
43
|
+
//# sourceMappingURL=AuthLayout-BI1wLuDl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthLayout-
|
|
1
|
+
{"version":3,"file":"AuthLayout-BI1wLuDl.js","sources":["../src/components/AuthLayout/AuthLayout.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport type { ThemeColor } from '../../theme'\nimport { Avatar } from '../Avatar'\nimport { Typography } from '../Typography'\nimport type { IconName } from '../../icons/names'\nimport styles from './AuthLayout.module.css'\n\nexport interface AuthLayoutProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /** Heading — the page name (e.g. `\"Login\"`, `\"Forgot Password\"`, `\"Verify Code\"`). */\n title?: ReactNode\n /** Muted line under the title (e.g. `\"Enter your email to receive a reset link\"`). */\n subtitle?: ReactNode\n /**\n * Brand slot centered on the canvas, above the card (a logo `<img>` / `<svg>` / any node). The slot\n * is the constraint box (capped width + height) — an `<img>`/`<svg>` inside fills it 100% (aspect\n * kept), so you can pass an unsized logo and it's sized/centered for you.\n */\n logo?: ReactNode\n /** Optional glyph in a solid `color`-filled circle above the title — an `IconName` or any node. */\n icon?: IconName | ReactNode\n /** Bottom slot under the form — e.g. a \"Back to login\" / \"Sign up\" link row. */\n footer?: ReactNode\n /** Theme token that tints the `icon` circle. Defaults to `accent`. */\n color?: ThemeColor\n /** Max width of the centered card in px. Defaults to `400`. */\n maxWidth?: number\n /** The auth form (fields + submit) — usually a `<Form>`. */\n children?: ReactNode\n}\n\n/**\n * A ready-made, centered page frame for **authentication pages** (login, forgot-password,\n * reset-password, OTP, …) — so each page just supplies its `title` + form instead of hand-building the\n * layout. Fills the viewport (`100dvh`) with the app `background` canvas and vertically centers a\n * `logo` (on the canvas, above the card) + an elevated `surface` card, as a group. The card stacks: an\n * optional `icon` (in a solid `color`-filled `Avatar` circle), the `title` + `subtitle` (centered), the\n * `children` (your form), and an optional `footer` (link row). Token-only styling; responsive.\n *\n * @example\n * <AuthLayout title=\"Login\" subtitle=\"Welcome back\" logo={<Logo />}>\n * <Form form={form}>…</Form>\n * </AuthLayout>\n */\nexport const AuthLayout = forwardRef<HTMLDivElement, AuthLayoutProps>(function AuthLayout(\n {\n title,\n subtitle,\n logo,\n icon,\n footer,\n color = 'accent',\n maxWidth = 400,\n className,\n style,\n children,\n ...props\n },\n ref,\n) {\n return (\n <div ref={ref} className={clsx(styles.authLayout, className)} style={style} {...props}>\n {logo != null && <div className={styles.logo}>{logo}</div>}\n <div className={styles.card} style={{ maxWidth } as CSSProperties}>\n {icon != null && (\n <Avatar className={styles.icon} icon={icon} color={color} size=\"lg\" aria-hidden />\n )}\n {(title != null || subtitle != null) && (\n <div className={styles.header}>\n {title != null && (\n <Typography variant=\"h2\" align=\"center\">\n {title}\n </Typography>\n )}\n {subtitle != null && (\n <Typography color=\"muted\" align=\"center\">\n {subtitle}\n </Typography>\n )}\n </div>\n )}\n {children != null && <div className={styles.body}>{children}</div>}\n {footer != null && <div className={styles.footer}>{footer}</div>}\n </div>\n </div>\n )\n})\n"],"names":["AuthLayout","forwardRef","title","subtitle","logo","icon","footer","color","maxWidth","className","style","children","props","ref","jsxs","clsx","styles","jsx","Avatar","Typography"],"mappings":";;;;;;;;;;;;;GA4CaA,IAAaC,EAA4C,SACpE;AAAA,EACE,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,UAAAC,IAAW;AAAA,EACX,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,SACE,gBAAAC,EAAC,OAAA,EAAI,KAAAD,GAAU,WAAWE,EAAKC,EAAO,YAAYP,CAAS,GAAG,OAAAC,GAAe,GAAGE,GAC7E,UAAA;AAAA,IAAAR,KAAQ,QAAQ,gBAAAa,EAAC,OAAA,EAAI,WAAWD,EAAO,MAAO,UAAAZ,GAAK;AAAA,IACpD,gBAAAU,EAAC,SAAI,WAAWE,EAAO,MAAM,OAAO,EAAE,UAAAR,KACnC,UAAA;AAAA,MAAAH,KAAQ,QACP,gBAAAY,EAACC,GAAA,EAAO,WAAWF,EAAO,MAAM,MAAAX,GAAY,OAAAE,GAAc,MAAK,MAAK,eAAW,GAAA,CAAC;AAAA,OAEhFL,KAAS,QAAQC,KAAY,2BAC5B,OAAA,EAAI,WAAWa,EAAO,QACpB,UAAA;AAAA,QAAAd,KAAS,QACR,gBAAAe,EAACE,GAAA,EAAW,SAAQ,MAAK,OAAM,UAC5B,UAAAjB,EAAA,CACH;AAAA,QAEDC,KAAY,QACX,gBAAAc,EAACE,GAAA,EAAW,OAAM,SAAQ,OAAM,UAC7B,UAAAhB,EAAA,CACH;AAAA,MAAA,GAEJ;AAAA,MAEDQ,KAAY,QAAQ,gBAAAM,EAAC,SAAI,WAAWD,EAAO,MAAO,UAAAL,GAAS;AAAA,MAC3DL,KAAU,QAAQ,gBAAAW,EAAC,SAAI,WAAWD,EAAO,QAAS,UAAAV,EAAA,CAAO;AAAA,IAAA,EAAA,CAC5D;AAAA,EAAA,GACF;AAEJ,CAAC;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const a=require("react/jsx-runtime"),g=require("react"),m=require("clsx"),v=require("./Avatar-
|
|
2
|
-
//# sourceMappingURL=AuthLayout-
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),g=require("react"),m=require("clsx"),v=require("./Avatar-BBqX1732.cjs"),u=require("./Typography-d97DdbNd.cjs"),x="_authLayout_1vumg_3",j="_logo_1vumg_20",L="_card_1vumg_36",N="_icon_1vumg_50",f="_header_1vumg_55",p="_body_1vumg_62",q="_footer_1vumg_68",o={authLayout:x,logo:j,card:L,icon:N,header:f,body:p,footer:q},A=g.forwardRef(function({title:s,subtitle:e,logo:c,icon:r,footer:n,color:l="accent",maxWidth:d=400,className:i,style:h,children:t,..._},y){return a.jsxs("div",{ref:y,className:m.clsx(o.authLayout,i),style:h,..._,children:[c!=null&&a.jsx("div",{className:o.logo,children:c}),a.jsxs("div",{className:o.card,style:{maxWidth:d},children:[r!=null&&a.jsx(v.Avatar,{className:o.icon,icon:r,color:l,size:"lg","aria-hidden":!0}),(s!=null||e!=null)&&a.jsxs("div",{className:o.header,children:[s!=null&&a.jsx(u.Typography,{variant:"h2",align:"center",children:s}),e!=null&&a.jsx(u.Typography,{color:"muted",align:"center",children:e})]}),t!=null&&a.jsx("div",{className:o.body,children:t}),n!=null&&a.jsx("div",{className:o.footer,children:n})]})]})});exports.AuthLayout=A;
|
|
2
|
+
//# sourceMappingURL=AuthLayout-Bzlsvicf.cjs.map
|