@techzyapp/ui-library 1.0.23 → 1.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AdminRoot-C7Idu7FQ.cjs → AdminRoot-BkPPRkyQ.cjs} +2 -2
- package/dist/{AdminRoot-C7Idu7FQ.cjs.map → AdminRoot-BkPPRkyQ.cjs.map} +1 -1
- package/dist/{AdminRoot-aDy6rNqI.js → AdminRoot-CgvtgUpW.js} +4 -4
- package/dist/{AdminRoot-aDy6rNqI.js.map → AdminRoot-CgvtgUpW.js.map} +1 -1
- package/dist/Alert-DXmzM_rh.js +71 -0
- package/dist/{Alert-D6VL2C-E.js.map → Alert-DXmzM_rh.js.map} +1 -1
- package/dist/Alert-udX1ybuC.cjs +2 -0
- package/dist/{Alert-Cl1zxmX9.cjs.map → Alert-udX1ybuC.cjs.map} +1 -1
- package/dist/Blockquote-BWGxIL_V.cjs +2 -0
- package/dist/{Blockquote-CxHwOecc.cjs.map → Blockquote-BWGxIL_V.cjs.map} +1 -1
- package/dist/Blockquote-Ma-2naET.js +46 -0
- package/dist/{Blockquote-CNIuJFHq.js.map → Blockquote-Ma-2naET.js.map} +1 -1
- package/dist/{Breadcrumbs-BnFW4LgK.cjs → Breadcrumbs-CsYTiX2h.cjs} +2 -2
- package/dist/{Breadcrumbs-BnFW4LgK.cjs.map → Breadcrumbs-CsYTiX2h.cjs.map} +1 -1
- package/dist/{Breadcrumbs-CicfjfIu.js → Breadcrumbs-DQHHeLId.js} +3 -3
- package/dist/{Breadcrumbs-CicfjfIu.js.map → Breadcrumbs-DQHHeLId.js.map} +1 -1
- package/dist/{Button-ZplrHYKw.cjs → Button-CXmDOzPk.cjs} +2 -2
- package/dist/{Button-ZplrHYKw.cjs.map → Button-CXmDOzPk.cjs.map} +1 -1
- package/dist/{Button-Cfxd7qhd.js → Button-DBs8xnA5.js} +2 -2
- package/dist/{Button-Cfxd7qhd.js.map → Button-DBs8xnA5.js.map} +1 -1
- package/dist/{Calendar-S9vyp-qv.cjs → Calendar-B2nMXk4C.cjs} +2 -2
- package/dist/{Calendar-S9vyp-qv.cjs.map → Calendar-B2nMXk4C.cjs.map} +1 -1
- package/dist/{Calendar-DTxCT-ki.js → Calendar-CtteUt82.js} +3 -3
- package/dist/{Calendar-DTxCT-ki.js.map → Calendar-CtteUt82.js.map} +1 -1
- package/dist/{Card-BeE2ohcn.cjs → Card-DGF22HbS.cjs} +2 -2
- package/dist/{Card-BeE2ohcn.cjs.map → Card-DGF22HbS.cjs.map} +1 -1
- package/dist/{Card-eXJfA4rU.js → Card-DYKnWt-L.js} +2 -2
- package/dist/{Card-eXJfA4rU.js.map → Card-DYKnWt-L.js.map} +1 -1
- package/dist/{Chip-BOXXdzap.js → Chip-DdKhcstm.js} +2 -2
- package/dist/{Chip-BOXXdzap.js.map → Chip-DdKhcstm.js.map} +1 -1
- package/dist/{Chip-B4XERWb_.cjs → Chip-gUH_7nQc.cjs} +2 -2
- package/dist/{Chip-B4XERWb_.cjs.map → Chip-gUH_7nQc.cjs.map} +1 -1
- package/dist/{CodeBlock-C7_A6CTT.cjs → CodeBlock-C6tQtbHU.cjs} +2 -2
- package/dist/{CodeBlock-C7_A6CTT.cjs.map → CodeBlock-C6tQtbHU.cjs.map} +1 -1
- package/dist/{CodeBlock-D_PRiWMq.js → CodeBlock-DD_d3-sM.js} +3 -3
- package/dist/{CodeBlock-D_PRiWMq.js.map → CodeBlock-DD_d3-sM.js.map} +1 -1
- package/dist/{ColorPicker-ClVpWf77.cjs → ColorPicker-DtzFwNWk.cjs} +2 -2
- package/dist/{ColorPicker-ClVpWf77.cjs.map → ColorPicker-DtzFwNWk.cjs.map} +1 -1
- package/dist/{ColorPicker-DAjs7PmR.js → ColorPicker-Dw6Qk0iy.js} +3 -3
- package/dist/{ColorPicker-DAjs7PmR.js.map → ColorPicker-Dw6Qk0iy.js.map} +1 -1
- package/dist/{ColorPickerPanel-Dk6bI0Xy.cjs → ColorPickerPanel--wBX-m7J.cjs} +2 -2
- package/dist/{ColorPickerPanel-Dk6bI0Xy.cjs.map → ColorPickerPanel--wBX-m7J.cjs.map} +1 -1
- package/dist/{ColorPickerPanel-BGzm2had.js → ColorPickerPanel-Dp7bnnVf.js} +2 -2
- package/dist/{ColorPickerPanel-BGzm2had.js.map → ColorPickerPanel-Dp7bnnVf.js.map} +1 -1
- package/dist/ConfigProvider-Bszl3Wr3.cjs +2 -0
- package/dist/ConfigProvider-Bszl3Wr3.cjs.map +1 -0
- package/dist/ConfigProvider-DR9YMy9U.js +320 -0
- package/dist/ConfigProvider-DR9YMy9U.js.map +1 -0
- package/dist/{CopyButton-COF3hIV-.cjs → CopyButton-Ct-8AmmX.cjs} +2 -2
- package/dist/{CopyButton-COF3hIV-.cjs.map → CopyButton-Ct-8AmmX.cjs.map} +1 -1
- package/dist/{CopyButton-Bv7L4xJf.js → CopyButton-DJ1PSJZU.js} +3 -3
- package/dist/{CopyButton-Bv7L4xJf.js.map → CopyButton-DJ1PSJZU.js.map} +1 -1
- package/dist/{DatePicker-kA-xn5ET.cjs → DatePicker-BxEydgfu.cjs} +2 -2
- package/dist/{DatePicker-kA-xn5ET.cjs.map → DatePicker-BxEydgfu.cjs.map} +1 -1
- package/dist/{DatePicker-DZfOvxUR.js → DatePicker-CJioG5M7.js} +4 -4
- package/dist/{DatePicker-DZfOvxUR.js.map → DatePicker-CJioG5M7.js.map} +1 -1
- package/dist/{DateTimePicker-DEGmn5UX.cjs → DateTimePicker-COEj2Z0F.cjs} +2 -2
- package/dist/{DateTimePicker-DEGmn5UX.cjs.map → DateTimePicker-COEj2Z0F.cjs.map} +1 -1
- package/dist/{DateTimePicker-BxBXhSN_.js → DateTimePicker-e2zj2bhS.js} +7 -7
- package/dist/{DateTimePicker-BxBXhSN_.js.map → DateTimePicker-e2zj2bhS.js.map} +1 -1
- package/dist/{EmptyState-Du4vA3bC.js → EmptyState-BTd7aVgu.js} +12 -12
- package/dist/{EmptyState-Du4vA3bC.js.map → EmptyState-BTd7aVgu.js.map} +1 -1
- package/dist/EmptyState-Bv4XXnD1.cjs +2 -0
- package/dist/{EmptyState-DlX-BLLI.cjs.map → EmptyState-Bv4XXnD1.cjs.map} +1 -1
- package/dist/{FileCard-zyCpTrJ-.cjs → FileCard-DW5Ur8Aj.cjs} +2 -2
- package/dist/{FileCard-zyCpTrJ-.cjs.map → FileCard-DW5Ur8Aj.cjs.map} +1 -1
- package/dist/{FileCard-juQ1fWbG.js → FileCard-DY8N9Lzz.js} +3 -3
- package/dist/{FileCard-juQ1fWbG.js.map → FileCard-DY8N9Lzz.js.map} +1 -1
- package/dist/{FileUploader-DOe3CyJB.cjs → FileUploader-B7VfhcR7.cjs} +2 -2
- package/dist/{FileUploader-DOe3CyJB.cjs.map → FileUploader-B7VfhcR7.cjs.map} +1 -1
- package/dist/{FileUploader-DL9atihI.js → FileUploader-BYF5FvUc.js} +5 -5
- package/dist/{FileUploader-DL9atihI.js.map → FileUploader-BYF5FvUc.js.map} +1 -1
- package/dist/{Flag-DFKHYnqk.cjs → Flag-CB4YyPj3.cjs} +2 -2
- package/dist/{Flag-DFKHYnqk.cjs.map → Flag-CB4YyPj3.cjs.map} +1 -1
- package/dist/{Flag-BxRrjCTB.js → Flag-yA1y5XzR.js} +2 -2
- package/dist/{Flag-BxRrjCTB.js.map → Flag-yA1y5XzR.js.map} +1 -1
- package/dist/{FullscreenToggle-BNK7RcRq.cjs → FullscreenToggle-0lskYnpx.cjs} +2 -2
- package/dist/{FullscreenToggle-BNK7RcRq.cjs.map → FullscreenToggle-0lskYnpx.cjs.map} +1 -1
- package/dist/{FullscreenToggle-BMCNsyzb.js → FullscreenToggle-jSLruiKt.js} +3 -3
- package/dist/{FullscreenToggle-BMCNsyzb.js.map → FullscreenToggle-jSLruiKt.js.map} +1 -1
- package/dist/{IconButton-CfvsE_p3.js → IconButton-BEGWfcVc.js} +2 -2
- package/dist/{IconButton-CfvsE_p3.js.map → IconButton-BEGWfcVc.js.map} +1 -1
- package/dist/{IconButton-B9eVM18U.cjs → IconButton-BN-bZxEi.cjs} +2 -2
- package/dist/{IconButton-B9eVM18U.cjs.map → IconButton-BN-bZxEi.cjs.map} +1 -1
- package/dist/{Loader-CxLrhAz9.cjs → Loader-B5YqzEYy.cjs} +2 -2
- package/dist/{Loader-CxLrhAz9.cjs.map → Loader-B5YqzEYy.cjs.map} +1 -1
- package/dist/Loader-BZIa8hwv.js +29 -0
- package/dist/{Loader-DwmyJFwG.js.map → Loader-BZIa8hwv.js.map} +1 -1
- package/dist/Modal-0V-REVV-.cjs +2 -0
- package/dist/{Modal-DXZdMmJh.cjs.map → Modal-0V-REVV-.cjs.map} +1 -1
- package/dist/Modal-B7yoFC3o.js +195 -0
- package/dist/{Modal-Cx0JEQ-j.js.map → Modal-B7yoFC3o.js.map} +1 -1
- package/dist/{MultiSelect-yGlvweEq.js → MultiSelect-C8xuXaoR.js} +4 -4
- package/dist/{MultiSelect-yGlvweEq.js.map → MultiSelect-C8xuXaoR.js.map} +1 -1
- package/dist/{MultiSelect-DfhyGxDU.cjs → MultiSelect-gj9Ymeh2.cjs} +2 -2
- package/dist/{MultiSelect-DfhyGxDU.cjs.map → MultiSelect-gj9Ymeh2.cjs.map} +1 -1
- package/dist/{NumberField-cAjPU1P5.js → NumberField-2yM0mmyj.js} +3 -3
- package/dist/{NumberField-cAjPU1P5.js.map → NumberField-2yM0mmyj.js.map} +1 -1
- package/dist/{NumberField-B7yPXIw_.cjs → NumberField-CEt95jcC.cjs} +2 -2
- package/dist/{NumberField-B7yPXIw_.cjs.map → NumberField-CEt95jcC.cjs.map} +1 -1
- package/dist/OtpField-CkliY82J.js +174 -0
- package/dist/OtpField-CkliY82J.js.map +1 -0
- package/dist/OtpField-on-K0_fM.cjs +2 -0
- package/dist/OtpField-on-K0_fM.cjs.map +1 -0
- package/dist/{PageLayout-BSHyKoQ4.cjs → PageLayout-DGHu7Vm3.cjs} +2 -2
- package/dist/{PageLayout-BSHyKoQ4.cjs.map → PageLayout-DGHu7Vm3.cjs.map} +1 -1
- package/dist/{PageLayout-C9Je7kfF.js → PageLayout-DzPh_G6H.js} +2 -2
- package/dist/{PageLayout-C9Je7kfF.js.map → PageLayout-DzPh_G6H.js.map} +1 -1
- package/dist/{PageNotFound-voB9ylPF.cjs → PageNotFound-B8_eIT8p.cjs} +2 -2
- package/dist/{PageNotFound-voB9ylPF.cjs.map → PageNotFound-B8_eIT8p.cjs.map} +1 -1
- package/dist/{PageNotFound-CUN2OntP.js → PageNotFound-CCFfPHgA.js} +5 -5
- package/dist/{PageNotFound-CUN2OntP.js.map → PageNotFound-CCFfPHgA.js.map} +1 -1
- package/dist/{Pagination-BUGaylZa.cjs → Pagination-BdVebW2L.cjs} +2 -2
- package/dist/{Pagination-BUGaylZa.cjs.map → Pagination-BdVebW2L.cjs.map} +1 -1
- package/dist/{Pagination-BaVHgIWT.js → Pagination-CmskZjcz.js} +2 -2
- package/dist/{Pagination-BaVHgIWT.js.map → Pagination-CmskZjcz.js.map} +1 -1
- package/dist/{RemoveDialog-BpL2-gnz.js → RemoveDialog-CV75B0aN.js} +4 -4
- package/dist/{RemoveDialog-BpL2-gnz.js.map → RemoveDialog-CV75B0aN.js.map} +1 -1
- package/dist/{RemoveDialog-DGt_72we.cjs → RemoveDialog-DmOk0ezc.cjs} +2 -2
- package/dist/{RemoveDialog-DGt_72we.cjs.map → RemoveDialog-DmOk0ezc.cjs.map} +1 -1
- package/dist/{RichTextEditor-C_6pzqYY.js → RichTextEditor-Bm8FFbcR.js} +7 -7
- package/dist/{RichTextEditor-C_6pzqYY.js.map → RichTextEditor-Bm8FFbcR.js.map} +1 -1
- package/dist/{RichTextEditor-BuoywqBu.cjs → RichTextEditor-uXddgtlk.cjs} +2 -2
- package/dist/{RichTextEditor-BuoywqBu.cjs.map → RichTextEditor-uXddgtlk.cjs.map} +1 -1
- package/dist/RootLayout-Cf7Rr9Iz.js +515 -0
- package/dist/RootLayout-Cf7Rr9Iz.js.map +1 -0
- package/dist/RootLayout-kssj9exn.cjs +2 -0
- package/dist/RootLayout-kssj9exn.cjs.map +1 -0
- package/dist/{Select-CVy5BnKe.cjs → Select-7vEGJCvA.cjs} +2 -2
- package/dist/{Select-CVy5BnKe.cjs.map → Select-7vEGJCvA.cjs.map} +1 -1
- package/dist/{Select-ChT-6_bM.js → Select-CdX3Ks7y.js} +3 -3
- package/dist/{Select-ChT-6_bM.js.map → Select-CdX3Ks7y.js.map} +1 -1
- package/dist/{Sidebar-D2MsR33k.cjs → Sidebar-DcKIEfhy.cjs} +2 -2
- package/dist/{Sidebar-D2MsR33k.cjs.map → Sidebar-DcKIEfhy.cjs.map} +1 -1
- package/dist/{Sidebar-ZA1wxCez.js → Sidebar-YH-DoNG9.js} +3 -3
- package/dist/{Sidebar-ZA1wxCez.js.map → Sidebar-YH-DoNG9.js.map} +1 -1
- package/dist/{SpeedDial-B9JTNNUU.cjs → SpeedDial-9_Yk8AGx.cjs} +2 -2
- package/dist/{SpeedDial-B9JTNNUU.cjs.map → SpeedDial-9_Yk8AGx.cjs.map} +1 -1
- package/dist/{SpeedDial-DUYQMDCY.js → SpeedDial-DWNuC6f8.js} +2 -2
- package/dist/{SpeedDial-DUYQMDCY.js.map → SpeedDial-DWNuC6f8.js.map} +1 -1
- package/dist/{Stepper-BaC934rb.cjs → Stepper-B1z_u650.cjs} +2 -2
- package/dist/{Stepper-BaC934rb.cjs.map → Stepper-B1z_u650.cjs.map} +1 -1
- package/dist/{Stepper-D89I17pC.js → Stepper-CuqFpamY.js} +2 -2
- package/dist/{Stepper-D89I17pC.js.map → Stepper-CuqFpamY.js.map} +1 -1
- package/dist/{Table-DvgBWTLx.cjs → Table-BPit83Pn.cjs} +2 -2
- package/dist/{Table-DvgBWTLx.cjs.map → Table-BPit83Pn.cjs.map} +1 -1
- package/dist/{Table-CdIQ5Wfh.js → Table-Drdhfm99.js} +15 -15
- package/dist/{Table-CdIQ5Wfh.js.map → Table-Drdhfm99.js.map} +1 -1
- package/dist/{Tabs-CejCwV3O.cjs → Tabs-BiKDy_fv.cjs} +2 -2
- package/dist/{Tabs-CejCwV3O.cjs.map → Tabs-BiKDy_fv.cjs.map} +1 -1
- package/dist/{Tabs-8-klG-y-.js → Tabs-ytbBzAxG.js} +2 -2
- package/dist/{Tabs-8-klG-y-.js.map → Tabs-ytbBzAxG.js.map} +1 -1
- package/dist/{TagsField-BQLqUckB.js → TagsField-CEt_PC5y.js} +4 -4
- package/dist/{TagsField-BQLqUckB.js.map → TagsField-CEt_PC5y.js.map} +1 -1
- package/dist/{TagsField-BSAd4eUr.cjs → TagsField-DpDbf0ru.cjs} +2 -2
- package/dist/{TagsField-BSAd4eUr.cjs.map → TagsField-DpDbf0ru.cjs.map} +1 -1
- package/dist/{TextField-B4YtjNUs.js → TextField-BWdmF-HE.js} +3 -3
- package/dist/{TextField-B4YtjNUs.js.map → TextField-BWdmF-HE.js.map} +1 -1
- package/dist/{TextField-DzYGA_St.cjs → TextField-Df_kGy2l.cjs} +2 -2
- package/dist/{TextField-DzYGA_St.cjs.map → TextField-Df_kGy2l.cjs.map} +1 -1
- package/dist/{ThemeToggle-BKk0eFiB.cjs → ThemeToggle-BJdXhmfc.cjs} +2 -2
- package/dist/{ThemeToggle-BKk0eFiB.cjs.map → ThemeToggle-BJdXhmfc.cjs.map} +1 -1
- package/dist/{ThemeToggle-B4_zRHJY.js → ThemeToggle-CgxF6oUu.js} +3 -3
- package/dist/{ThemeToggle-B4_zRHJY.js.map → ThemeToggle-CgxF6oUu.js.map} +1 -1
- package/dist/{TimeColumns-BAzRrkqY.cjs → TimeColumns-DxVN0V8l.cjs} +2 -2
- package/dist/{TimeColumns-BAzRrkqY.cjs.map → TimeColumns-DxVN0V8l.cjs.map} +1 -1
- package/dist/{TimeColumns-CAPyli9V.js → TimeColumns-n-fz50mr.js} +2 -2
- package/dist/{TimeColumns-CAPyli9V.js.map → TimeColumns-n-fz50mr.js.map} +1 -1
- package/dist/{TimePicker-BebBSlQF.js → TimePicker-Bopxx3zU.js} +5 -5
- package/dist/{TimePicker-BebBSlQF.js.map → TimePicker-Bopxx3zU.js.map} +1 -1
- package/dist/{TimePicker-BUnXYR5g.cjs → TimePicker-DvoemiGz.cjs} +2 -2
- package/dist/{TimePicker-BUnXYR5g.cjs.map → TimePicker-DvoemiGz.cjs.map} +1 -1
- package/dist/{Toaster-ywqAKP8s.js → Toaster-BxIY2H4V.js} +2 -2
- package/dist/{Toaster-ywqAKP8s.js.map → Toaster-BxIY2H4V.js.map} +1 -1
- package/dist/{Toaster-B2rO4BkG.cjs → Toaster-DZSzFse_.cjs} +2 -2
- package/dist/{Toaster-B2rO4BkG.cjs.map → Toaster-DZSzFse_.cjs.map} +1 -1
- package/dist/{TranslatedFields-DQQUb0RD.cjs → TranslatedFields-BtDLkQy7.cjs} +2 -2
- package/dist/{TranslatedFields-DQQUb0RD.cjs.map → TranslatedFields-BtDLkQy7.cjs.map} +1 -1
- package/dist/{TranslatedFields-C-wlh51E.js → TranslatedFields-DmR8LKSG.js} +5 -5
- package/dist/{TranslatedFields-C-wlh51E.js.map → TranslatedFields-DmR8LKSG.js.map} +1 -1
- package/dist/{UserCard-Be1kl0TZ.cjs → UserCard-C1yFvVIc.cjs} +2 -2
- package/dist/{UserCard-Be1kl0TZ.cjs.map → UserCard-C1yFvVIc.cjs.map} +1 -1
- package/dist/{UserCard-BqWt0S-c.js → UserCard-J8Bpbh3x.js} +3 -3
- package/dist/{UserCard-BqWt0S-c.js.map → UserCard-J8Bpbh3x.js.map} +1 -1
- package/dist/components/Alert/index.cjs +1 -1
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/Blockquote/Blockquote.d.cts +1 -1
- package/dist/components/Blockquote/Blockquote.d.ts +1 -1
- package/dist/components/Blockquote/index.cjs +1 -1
- package/dist/components/Blockquote/index.js +1 -1
- 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/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/CopyButton/index.cjs +1 -1
- package/dist/components/CopyButton/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/EmptyState/index.cjs +1 -1
- package/dist/components/EmptyState/index.js +1 -1
- package/dist/components/FileCard/index.cjs +1 -1
- package/dist/components/FileCard/index.js +1 -1
- 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/IconButton/index.cjs +1 -1
- package/dist/components/IconButton/index.js +1 -1
- package/dist/components/Loader/index.cjs +1 -1
- package/dist/components/Loader/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/OtpField.d.cts +3 -0
- package/dist/components/OtpField/OtpField.d.ts +3 -0
- package/dist/components/OtpField/index.cjs +1 -1
- package/dist/components/OtpField/index.d.cts +1 -1
- package/dist/components/OtpField/index.d.ts +1 -1
- package/dist/components/OtpField/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/RemoveDialog/index.cjs +1 -1
- package/dist/components/RemoveDialog/index.js +1 -1
- package/dist/components/RichTextEditor/index.cjs +1 -1
- package/dist/components/RichTextEditor/index.js +1 -1
- package/dist/components/RootLayout/SettingsDrawer.d.cts +3 -1
- package/dist/components/RootLayout/SettingsDrawer.d.ts +3 -1
- 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/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/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/Toast/index.cjs +1 -1
- package/dist/components/Toast/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/entries/app.cjs +1 -1
- package/dist/entries/app.js +1 -1
- package/dist/entries/components.cjs +1 -1
- package/dist/entries/components.js +41 -41
- package/dist/entries/i18n.cjs +1 -1
- package/dist/entries/i18n.js +2 -2
- package/dist/entries/theme.cjs +1 -1
- package/dist/entries/theme.d.cts +1 -1
- package/dist/entries/theme.d.ts +1 -1
- package/dist/entries/theme.js +1 -1
- package/dist/i18n/messages.d.cts +6 -0
- package/dist/i18n/messages.d.ts +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +25 -2
- package/dist/index.js +44 -44
- package/dist/{messages-Dvn_tEp0.cjs → messages-DKT0SRM0.cjs} +9 -9
- package/dist/messages-DKT0SRM0.cjs.map +1 -0
- package/dist/{messages-CL8uoIRj.js → messages-ogohLC5P.js} +67 -25
- package/dist/messages-ogohLC5P.js.map +1 -0
- package/dist/theme/ConfigProvider.d.cts +19 -0
- package/dist/theme/ConfigProvider.d.ts +19 -0
- package/dist/theme/index.d.cts +1 -1
- package/dist/theme/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/Alert-Cl1zxmX9.cjs +0 -2
- package/dist/Alert-D6VL2C-E.js +0 -71
- package/dist/Blockquote-CNIuJFHq.js +0 -46
- package/dist/Blockquote-CxHwOecc.cjs +0 -2
- package/dist/ConfigProvider-Blhvj6UQ.js +0 -296
- package/dist/ConfigProvider-Blhvj6UQ.js.map +0 -1
- package/dist/ConfigProvider-CUG8Mfy2.cjs +0 -2
- package/dist/ConfigProvider-CUG8Mfy2.cjs.map +0 -1
- package/dist/EmptyState-DlX-BLLI.cjs +0 -2
- package/dist/Loader-DwmyJFwG.js +0 -28
- package/dist/Modal-Cx0JEQ-j.js +0 -195
- package/dist/Modal-DXZdMmJh.cjs +0 -2
- package/dist/OtpField-BujZAy2A.cjs +0 -2
- package/dist/OtpField-BujZAy2A.cjs.map +0 -1
- package/dist/OtpField-D0eTOLtg.js +0 -171
- package/dist/OtpField-D0eTOLtg.js.map +0 -1
- package/dist/RootLayout-1am1CwPQ.cjs +0 -2
- package/dist/RootLayout-1am1CwPQ.cjs.map +0 -1
- package/dist/RootLayout-x7qWzXPc.js +0 -479
- package/dist/RootLayout-x7qWzXPc.js.map +0 -1
- package/dist/messages-CL8uoIRj.js.map +0 -1
- package/dist/messages-Dvn_tEp0.cjs.map +0 -1
package/dist/Modal-Cx0JEQ-j.js
DELETED
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
import { jsx as r, jsxs as S } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as U, useRef as p, useState as Y, useEffect as V, useId as $ } from "react";
|
|
3
|
-
import { clsx as P } from "clsx";
|
|
4
|
-
import { a as Z } from "./names-r21QPjcU.js";
|
|
5
|
-
import { I as H } from "./Icon-DaTvzLBu.js";
|
|
6
|
-
import { I as K } from "./IconButton-CfvsE_p3.js";
|
|
7
|
-
import { createPortal as w } from "react-dom";
|
|
8
|
-
import { u as C } from "./useLockBodyScroll-DwBILLPK.js";
|
|
9
|
-
import { a as ee } from "./ConfigProvider-Blhvj6UQ.js";
|
|
10
|
-
const te = "_overlay_gwv2a_6", ae = {
|
|
11
|
-
overlay: te
|
|
12
|
-
}, re = U(function({
|
|
13
|
-
open: l,
|
|
14
|
-
onClose: n,
|
|
15
|
-
closeOnBackdrop: k = !0,
|
|
16
|
-
closeOnEscape: T = !0,
|
|
17
|
-
lockScroll: x = !0,
|
|
18
|
-
dim: s,
|
|
19
|
-
className: o,
|
|
20
|
-
style: c,
|
|
21
|
-
children: I,
|
|
22
|
-
onKeyDown: i,
|
|
23
|
-
onMouseDown: f,
|
|
24
|
-
onClick: b,
|
|
25
|
-
...E
|
|
26
|
-
}, D) {
|
|
27
|
-
const N = p(null), [M, m] = Y(!1);
|
|
28
|
-
C(l && x), V(() => {
|
|
29
|
-
if (!l) {
|
|
30
|
-
m(!1);
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
const e = requestAnimationFrame(() => m(!0));
|
|
34
|
-
return () => cancelAnimationFrame(e);
|
|
35
|
-
}, [l]);
|
|
36
|
-
const A = (e) => {
|
|
37
|
-
e.key === "Escape" && (e.stopPropagation(), T && (n == null || n())), i == null || i(e);
|
|
38
|
-
}, _ = (e) => {
|
|
39
|
-
N.current = e.target, f == null || f(e);
|
|
40
|
-
}, O = (e) => {
|
|
41
|
-
k && e.target === e.currentTarget && N.current === e.currentTarget && (n == null || n()), b == null || b(e);
|
|
42
|
-
};
|
|
43
|
-
return !l || typeof document > "u" ? null : w(
|
|
44
|
-
/* @__PURE__ */ r(
|
|
45
|
-
"div",
|
|
46
|
-
{
|
|
47
|
-
ref: D,
|
|
48
|
-
className: P(ae.overlay, o),
|
|
49
|
-
"data-open": M ? "true" : "false",
|
|
50
|
-
style: s != null ? { "--tz-overlay-dim": s, ...c } : c,
|
|
51
|
-
onKeyDown: A,
|
|
52
|
-
onMouseDown: _,
|
|
53
|
-
onClick: O,
|
|
54
|
-
...E,
|
|
55
|
-
children: I
|
|
56
|
-
}
|
|
57
|
-
),
|
|
58
|
-
document.body
|
|
59
|
-
);
|
|
60
|
-
}), le = "_overlay_1d22k_3", ne = "_modal_1d22k_14", se = "_sm_1d22k_37", ce = "_md_1d22k_40", de = "_lg_1d22k_43", oe = "_fullScreen_1d22k_46", ie = "_header_1d22k_58", ue = "_headerDivided_1d22k_67", fe = "_headerMain_1d22k_70", me = "_icon_1d22k_77", _e = "_headerText_1d22k_80", he = "_title_1d22k_87", be = "_subtitle_1d22k_99", ye = "_close_1d22k_111", ve = "_body_1d22k_116", ke = "_footer_1d22k_124", a = {
|
|
61
|
-
overlay: le,
|
|
62
|
-
modal: ne,
|
|
63
|
-
sm: se,
|
|
64
|
-
md: ce,
|
|
65
|
-
lg: de,
|
|
66
|
-
fullScreen: oe,
|
|
67
|
-
header: ie,
|
|
68
|
-
headerDivided: ue,
|
|
69
|
-
headerMain: fe,
|
|
70
|
-
icon: me,
|
|
71
|
-
headerText: _e,
|
|
72
|
-
title: he,
|
|
73
|
-
subtitle: be,
|
|
74
|
-
close: ye,
|
|
75
|
-
body: ve,
|
|
76
|
-
footer: ke
|
|
77
|
-
}, xe = new Set(Z), g = 'a[href]:not([tabindex="-1"]), button:not(:disabled):not([tabindex="-1"]), textarea:not(:disabled):not([tabindex="-1"]), input:not(:disabled):not([tabindex="-1"]), select:not(:disabled):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])', Ae = U(function({
|
|
78
|
-
open: l,
|
|
79
|
-
onClose: n,
|
|
80
|
-
size: k = "md",
|
|
81
|
-
scrollBehavior: T = "outside",
|
|
82
|
-
placement: x = "center",
|
|
83
|
-
title: s,
|
|
84
|
-
description: o,
|
|
85
|
-
icon: c,
|
|
86
|
-
color: I = "accent",
|
|
87
|
-
footer: i,
|
|
88
|
-
showCloseButton: f = !0,
|
|
89
|
-
closeOnBackdrop: b = !0,
|
|
90
|
-
closeOnEscape: E = !0,
|
|
91
|
-
ariaLabel: D,
|
|
92
|
-
className: N,
|
|
93
|
-
style: M,
|
|
94
|
-
children: m,
|
|
95
|
-
...A
|
|
96
|
-
}, _) {
|
|
97
|
-
const O = ee(), e = p(null), z = p(null), R = p(null), j = $(), B = $();
|
|
98
|
-
V(() => {
|
|
99
|
-
var u, y, v;
|
|
100
|
-
if (!l) return;
|
|
101
|
-
const t = document.activeElement, d = ((u = z.current) == null ? void 0 : u.querySelector(g)) ?? ((y = R.current) == null ? void 0 : y.querySelector(g)) ?? ((v = e.current) == null ? void 0 : v.querySelector(g)) ?? e.current;
|
|
102
|
-
return d == null || d.focus({ preventScroll: !0 }), () => {
|
|
103
|
-
var h;
|
|
104
|
-
t != null && t.isConnected && ((h = t.focus) == null || h.call(t));
|
|
105
|
-
};
|
|
106
|
-
}, [l]);
|
|
107
|
-
const G = (t) => {
|
|
108
|
-
e.current = t, typeof _ == "function" ? _(t) : _ && (_.current = t);
|
|
109
|
-
}, J = (t) => {
|
|
110
|
-
if (t.key !== "Tab") return;
|
|
111
|
-
const d = e.current;
|
|
112
|
-
if (!d) return;
|
|
113
|
-
const u = [...d.querySelectorAll(g)].filter(
|
|
114
|
-
(L) => L.offsetParent !== null || L === document.activeElement
|
|
115
|
-
);
|
|
116
|
-
if (u.length === 0) {
|
|
117
|
-
t.preventDefault(), d.focus();
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
const y = u[0], v = u[u.length - 1], h = document.activeElement;
|
|
121
|
-
t.shiftKey && (h === y || h === d) ? (t.preventDefault(), v.focus()) : !t.shiftKey && h === v && (t.preventDefault(), y.focus());
|
|
122
|
-
};
|
|
123
|
-
if (!l) return null;
|
|
124
|
-
const Q = x !== "center", q = c == null ? null : typeof c == "string" && xe.has(c) ? /* @__PURE__ */ r(H, { name: c }) : c, W = s != null || o != null || q != null || f, X = m != null || i != null;
|
|
125
|
-
return /* @__PURE__ */ r(
|
|
126
|
-
re,
|
|
127
|
-
{
|
|
128
|
-
open: l,
|
|
129
|
-
onClose: n,
|
|
130
|
-
closeOnBackdrop: b,
|
|
131
|
-
closeOnEscape: E,
|
|
132
|
-
onKeyDown: J,
|
|
133
|
-
className: a.overlay,
|
|
134
|
-
"data-size": k,
|
|
135
|
-
"data-placement": x,
|
|
136
|
-
"data-scroll": Q ? "inside" : T,
|
|
137
|
-
children: /* @__PURE__ */ S(
|
|
138
|
-
"div",
|
|
139
|
-
{
|
|
140
|
-
ref: G,
|
|
141
|
-
className: P(a.modal, a[k], N),
|
|
142
|
-
role: "dialog",
|
|
143
|
-
"aria-modal": "true",
|
|
144
|
-
"aria-labelledby": s != null ? j : void 0,
|
|
145
|
-
"aria-label": s == null ? D : void 0,
|
|
146
|
-
"aria-describedby": o != null ? B : void 0,
|
|
147
|
-
tabIndex: -1,
|
|
148
|
-
style: M,
|
|
149
|
-
...A,
|
|
150
|
-
children: [
|
|
151
|
-
W && /* @__PURE__ */ S("div", { className: P(a.header, X && a.headerDivided), children: [
|
|
152
|
-
/* @__PURE__ */ S("div", { className: a.headerMain, children: [
|
|
153
|
-
q != null && /* @__PURE__ */ r(
|
|
154
|
-
K,
|
|
155
|
-
{
|
|
156
|
-
variant: "filled",
|
|
157
|
-
size: "sm",
|
|
158
|
-
color: I,
|
|
159
|
-
nonClickable: !0,
|
|
160
|
-
"aria-hidden": !0,
|
|
161
|
-
className: a.icon,
|
|
162
|
-
children: q
|
|
163
|
-
}
|
|
164
|
-
),
|
|
165
|
-
(s != null || o != null) && /* @__PURE__ */ S("div", { className: a.headerText, children: [
|
|
166
|
-
s != null && /* @__PURE__ */ r("div", { id: j, className: a.title, children: s }),
|
|
167
|
-
o != null && /* @__PURE__ */ r("div", { id: B, className: a.subtitle, children: o })
|
|
168
|
-
] })
|
|
169
|
-
] }),
|
|
170
|
-
f && /* @__PURE__ */ r(
|
|
171
|
-
K,
|
|
172
|
-
{
|
|
173
|
-
variant: "filled",
|
|
174
|
-
color: "primary",
|
|
175
|
-
size: "sm",
|
|
176
|
-
className: a.close,
|
|
177
|
-
"aria-label": O("common.close"),
|
|
178
|
-
onClick: n,
|
|
179
|
-
children: /* @__PURE__ */ r(H, { name: "Close" })
|
|
180
|
-
}
|
|
181
|
-
)
|
|
182
|
-
] }),
|
|
183
|
-
m != null && /* @__PURE__ */ r("div", { ref: z, className: a.body, children: m }),
|
|
184
|
-
i != null && /* @__PURE__ */ r("div", { ref: R, className: a.footer, children: i })
|
|
185
|
-
]
|
|
186
|
-
}
|
|
187
|
-
)
|
|
188
|
-
}
|
|
189
|
-
);
|
|
190
|
-
});
|
|
191
|
-
export {
|
|
192
|
-
Ae as M,
|
|
193
|
-
re as O
|
|
194
|
-
};
|
|
195
|
-
//# sourceMappingURL=Modal-Cx0JEQ-j.js.map
|
package/dist/Modal-DXZdMmJh.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime"),l=require("react"),A=require("clsx"),Q=require("./names-BJnFU_5m.cjs"),L=require("./Icon-BVULqOJD.cjs"),$=require("./IconButton-B9eVM18U.cjs"),W=require("react-dom"),X=require("./useLockBodyScroll-CIXHZo-Q.cjs"),Y=require("./ConfigProvider-CUG8Mfy2.cjs"),Z="_overlay_gwv2a_6",w={overlay:Z},H=l.forwardRef(function({open:a,onClose:s,closeOnBackdrop:k=!0,closeOnEscape:g=!0,lockScroll:N=!0,dim:c,className:i,style:d,children:q,onKeyDown:u,onMouseDown:_,onClick:x,...I},T){const j=l.useRef(null),[E,m]=l.useState(!1);X.useLockBodyScroll(a&&N),l.useEffect(()=>{if(!a){m(!1);return}const e=requestAnimationFrame(()=>m(!0));return()=>cancelAnimationFrame(e)},[a]);const D=e=>{e.key==="Escape"&&(e.stopPropagation(),g&&(s==null||s())),u==null||u(e)},h=e=>{j.current=e.target,_==null||_(e)},R=e=>{k&&e.target===e.currentTarget&&j.current===e.currentTarget&&(s==null||s()),x==null||x(e)};return!a||typeof document>"u"?null:W.createPortal(r.jsx("div",{ref:T,className:A.clsx(w.overlay,i),"data-open":E?"true":"false",style:c!=null?{"--tz-overlay-dim":c,...d}:d,onKeyDown:D,onMouseDown:h,onClick:R,...I,children:q}),document.body)}),C="_overlay_1d22k_3",ee="_modal_1d22k_14",te="_sm_1d22k_37",re="_md_1d22k_40",ne="_lg_1d22k_43",le="_fullScreen_1d22k_46",ae="_header_1d22k_58",se="_headerDivided_1d22k_67",ce="_headerMain_1d22k_70",de="_icon_1d22k_77",oe="_headerText_1d22k_80",ie="_title_1d22k_87",ue="_subtitle_1d22k_99",fe="_close_1d22k_111",_e="_body_1d22k_116",me="_footer_1d22k_124",n={overlay:C,modal:ee,sm:te,md:re,lg:ne,fullScreen:le,header:ae,headerDivided:se,headerMain:ce,icon:de,headerText:oe,title:ie,subtitle:ue,close:fe,body:_e,footer:me},he=new Set(Q.ICON_NAMES),S='a[href]:not([tabindex="-1"]), button:not(:disabled):not([tabindex="-1"]), textarea:not(:disabled):not([tabindex="-1"]), input:not(:disabled):not([tabindex="-1"]), select:not(:disabled):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])',be=l.forwardRef(function({open:a,onClose:s,size:k="md",scrollBehavior:g="outside",placement:N="center",title:c,description:i,icon:d,color:q="accent",footer:u,showCloseButton:_=!0,closeOnBackdrop:x=!0,closeOnEscape:I=!0,ariaLabel:T,className:j,style:E,children:m,...D},h){const R=Y.useT(),e=l.useRef(null),O=l.useRef(null),B=l.useRef(null),P=l.useId(),p=l.useId();l.useEffect(()=>{var f,y,v;if(!a)return;const t=document.activeElement,o=((f=O.current)==null?void 0:f.querySelector(S))??((y=B.current)==null?void 0:y.querySelector(S))??((v=e.current)==null?void 0:v.querySelector(S))??e.current;return o==null||o.focus({preventScroll:!0}),()=>{var b;t!=null&&t.isConnected&&((b=t.focus)==null||b.call(t))}},[a]);const U=t=>{e.current=t,typeof h=="function"?h(t):h&&(h.current=t)},V=t=>{if(t.key!=="Tab")return;const o=e.current;if(!o)return;const f=[...o.querySelectorAll(S)].filter(z=>z.offsetParent!==null||z===document.activeElement);if(f.length===0){t.preventDefault(),o.focus();return}const y=f[0],v=f[f.length-1],b=document.activeElement;t.shiftKey&&(b===y||b===o)?(t.preventDefault(),v.focus()):!t.shiftKey&&b===v&&(t.preventDefault(),y.focus())};if(!a)return null;const F=N!=="center",M=d==null?null:typeof d=="string"&&he.has(d)?r.jsx(L.Icon,{name:d}):d,G=c!=null||i!=null||M!=null||_,J=m!=null||u!=null;return r.jsx(H,{open:a,onClose:s,closeOnBackdrop:x,closeOnEscape:I,onKeyDown:V,className:n.overlay,"data-size":k,"data-placement":N,"data-scroll":F?"inside":g,children:r.jsxs("div",{ref:U,className:A.clsx(n.modal,n[k],j),role:"dialog","aria-modal":"true","aria-labelledby":c!=null?P:void 0,"aria-label":c==null?T:void 0,"aria-describedby":i!=null?p:void 0,tabIndex:-1,style:E,...D,children:[G&&r.jsxs("div",{className:A.clsx(n.header,J&&n.headerDivided),children:[r.jsxs("div",{className:n.headerMain,children:[M!=null&&r.jsx($.IconButton,{variant:"filled",size:"sm",color:q,nonClickable:!0,"aria-hidden":!0,className:n.icon,children:M}),(c!=null||i!=null)&&r.jsxs("div",{className:n.headerText,children:[c!=null&&r.jsx("div",{id:P,className:n.title,children:c}),i!=null&&r.jsx("div",{id:p,className:n.subtitle,children:i})]})]}),_&&r.jsx($.IconButton,{variant:"filled",color:"primary",size:"sm",className:n.close,"aria-label":R("common.close"),onClick:s,children:r.jsx(L.Icon,{name:"Close"})})]}),m!=null&&r.jsx("div",{ref:O,className:n.body,children:m}),u!=null&&r.jsx("div",{ref:B,className:n.footer,children:u})]})})});exports.Modal=be;exports.Overlay=H;
|
|
2
|
-
//# sourceMappingURL=Modal-DXZdMmJh.cjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),y=require("react"),j=require("clsx"),Y=require("./formContext-bTWrqdEV.cjs"),R=require("./Typography-BFatE1_A.cjs"),u=require("./TextField.module-m-UllwzG.cjs"),ee=require("./ConfigProvider-CUG8Mfy2.cjs"),te="_row_1tqpn_2",re="_sm_1tqpn_8",se="_md_1tqpn_12",oe="_lg_1tqpn_16",le="_box_1tqpn_22",ce="_filled_1tqpn_46",ne="_invalid_1tqpn_63",x={row:te,sm:re,md:se,lg:oe,box:le,filled:ce,invalid:ne},ie={numeric:/[0-9]/,alphabetic:/[A-Za-z]/,alphanumeric:/[A-Za-z0-9]/};function ae(k,l){const i=[...k].slice(0,l);for(;i.length<l;)i.push("");return i}const fe=y.forwardRef(function({length:l=4,type:i="numeric",value:g,defaultValue:A,onChange:q,onComplete:T,name:a,label:_,helperText:I,error:z,required:O=!1,disabled:S=!1,autoFocus:P=!1,placeholder:C,size:E="md",color:M="primary",className:V,style:K},Z){const $=ee.useT(),F=`${y.useId()}-helper`,B=ie[i],p=Y.useFormContext(),b=!!(p&&a),o=p&&a?p.field(a):void 0,H=g!==void 0?g:b?p.values[a]:void 0,N=g!==void 0||b,[L,G]=y.useState(A??""),J=N?H??"":L,v=z??(o==null?void 0:o.error)??!1,w=I??(o==null?void 0:o.helperText),f=ae(J,l),D=y.useRef([]);y.useEffect(()=>{var t;P&&((t=D.current[0])==null||t.focus())},[]);const d=t=>{const e=D.current[Math.max(0,Math.min(t,l-1))];e==null||e.focus(),e==null||e.select()},m=t=>{const e=t.join("");N||G(e),b&&p.setValue(a,e),q==null||q(e),t.every(r=>r!=="")&&(T==null||T(e))},Q=(t,e)=>{const r=[...e].filter(s=>B.test(s));if(e!==""&&r.length===0)return;const c=[...f];if(r.length<=1)c[t]=r[0]??"",m(c),r[0]&&d(t+1);else{let s=t;for(const h of r){if(s>=l)break;c[s]=h,s++}m(c),d(s)}},U=(t,e)=>{if(e.key==="Backspace"){if(f[t]===""&&t>0){e.preventDefault();const r=[...f];r[t-1]="",m(r),d(t-1)}}else if(e.key==="ArrowLeft")e.preventDefault(),d(t-1);else if(e.key==="ArrowRight")e.preventDefault(),d(t+1);else if(e.key==="Delete"){e.preventDefault();const r=[...f];r[t]="",m(r)}},W=(t,e)=>{e.preventDefault();const r=[...e.clipboardData.getData("text")].filter(h=>B.test(h));if(r.length===0)return;const c=[...f];let s=t;for(const h of r){if(s>=l)break;c[s]=h,s++}m(c),d(s)},X=t=>{t.currentTarget.contains(t.relatedTarget)||o==null||o.onBlur(t)};return n.jsxs("div",{ref:Z,className:j.clsx(u.fieldStyles.field,v&&u.fieldStyles.error,S&&u.fieldStyles.disabled,V),style:{"--tz-btn-rgb":`var(--tz-color-${M}-rgb)`,...K},children:[_!=null&&n.jsxs("span",{className:u.fieldStyles.label,children:[n.jsx(R.Typography,{as:"span",variant:"bodySmall",color:"muted",children:_}),O&&n.jsx("span",{className:u.fieldStyles.required,"aria-hidden":"true",children:"*"})]}),n.jsx("div",{role:"group","aria-label":typeof _=="string"?_:"One-time code","aria-invalid":v||void 0,"aria-describedby":w!=null?F:void 0,className:j.clsx(x.row,x[E],v&&x.invalid),onBlur:X,children:f.map((t,e)=>n.jsx("input",{ref:r=>{D.current[e]=r},name:e===0?a:void 0,type:"text",inputMode:i==="numeric"?"numeric":"text",autoComplete:e===0?"one-time-code":"off","aria-label":$("otpField.digit",{index:e+1,total:l}),className:j.clsx(x.box,t!==""&&x.filled),value:t,placeholder:C,disabled:S,onChange:r=>Q(e,r.target.value),onKeyDown:r=>U(e,r),onPaste:r=>W(e,r),onFocus:r=>r.target.select()},e))}),w!=null&&n.jsx(R.Typography,{as:"span",id:F,variant:"bodySmall",color:v?"error":"muted",className:u.fieldStyles.helper,children:w})]})});exports.OtpField=fe;
|
|
2
|
-
//# sourceMappingURL=OtpField-BujZAy2A.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OtpField-BujZAy2A.cjs","sources":["../src/components/OtpField/OtpField.tsx"],"sourcesContent":["import {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type ClipboardEvent,\n type CSSProperties,\n type FocusEvent,\n type KeyboardEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { useFormContext } from '../../form/formContext'\nimport { useT, type ThemeColor } from '../../theme'\nimport { Typography } from '../Typography'\nimport fieldStyles from '../TextField/TextField.module.css'\nimport styles from './OtpField.module.css'\n\nexport type OtpFieldSize = 'sm' | 'md' | 'lg'\n/** Which characters the code accepts. */\nexport type OtpFieldType = 'numeric' | 'alphabetic' | 'alphanumeric'\n\n/** Allowed-character matcher per `type`. */\nconst PATTERN: Record<OtpFieldType, RegExp> = {\n numeric: /[0-9]/,\n alphabetic: /[A-Za-z]/,\n alphanumeric: /[A-Za-z0-9]/,\n}\n\n/** Split a code string into exactly `length` single-char slots, padded with empties. */\nfunction toChars(value: string, length: number): string[] {\n const out = [...value].slice(0, length)\n while (out.length < length) out.push('')\n return out\n}\n\nexport interface OtpFieldProps {\n /** Number of input boxes (the code length). Defaults to `4`. */\n length?: number\n /** Which characters are accepted (also drives the mobile keyboard). Defaults to `'numeric'`. */\n type?: OtpFieldType\n /** Controlled value — the concatenated code string. */\n value?: string\n /** Initial value for uncontrolled use. */\n defaultValue?: string\n /** Fires with the full code string on every change. */\n onChange?: (value: string) => void\n /** Fires with the code once every box is filled. */\n onComplete?: (value: string) => void\n /** Field name — the `<Form>` binding key (form value is the code `string`). */\n name?: string\n /** Label rendered above the boxes. */\n label?: ReactNode\n /** Helper / error text under the boxes (shown in the error color while `error`). */\n helperText?: ReactNode\n /** Marks the field invalid — reddens the boxes + helper. */\n error?: boolean\n /** Adds a red asterisk after the label. */\n required?: boolean\n /** Disables every box. */\n disabled?: boolean\n /** Focus the first box on mount. */\n autoFocus?: boolean\n /** Placeholder character shown in empty boxes (e.g. `'•'`). */\n placeholder?: string\n /** Preset size. Defaults to `'md'`. */\n size?: OtpFieldSize\n /** Theme palette token for the focus ring / active box. Defaults to `'primary'`. */\n color?: ThemeColor\n className?: string\n style?: CSSProperties\n}\n\n/**\n * A one-time-passcode input — a row of single-character boxes for verification codes. **`length`**\n * (default `4`) sets the box count; **`type`** (`'numeric'` default · `'alphabetic'` · `'alphanumeric'`)\n * restricts the accepted characters and the mobile keyboard. Typing advances to the next box, Backspace\n * clears + steps back, Arrows navigate, and **paste / SMS autofill** (`autocomplete=\"one-time-code\"`)\n * distributes the whole code across the boxes. The value is the concatenated string — controlled\n * (`value` + `onChange`) or uncontrolled (`defaultValue`); **`onComplete`** fires when all boxes are\n * filled. Shares the field-family chrome (`label` · `error` + `helperText` · `required` · `disabled` ·\n * `size`) and binds to a surrounding `<Form>` by **`name`** (form value = the code string; validate with\n * e.g. `z.string().length(4)` or a `type`-matching regex). Tinted by `color` via the shared\n * `--tz-btn-rgb` pattern; `role=\"group\"` with per-box `aria-label`s. Own CSS module (+ TextField's for\n * the label/helper chrome).\n */\nexport const OtpField = forwardRef<HTMLDivElement, OtpFieldProps>(function OtpField(\n {\n length = 4,\n type = 'numeric',\n value,\n defaultValue,\n onChange,\n onComplete,\n name,\n label,\n helperText,\n error,\n required = false,\n disabled = false,\n autoFocus = false,\n placeholder,\n size = 'md',\n color = 'primary',\n className,\n style,\n },\n ref,\n) {\n const t = useT()\n const reactId = useId()\n const helperId = `${reactId}-helper`\n const allowed = PATTERN[type]\n\n // bind to a surrounding <Form> by `name` — form value is the code string; error/touched via field()\n const form = useFormContext()\n const isFormBound = Boolean(form && name)\n const bound = form && name ? form.field(name) : undefined\n\n const externalValue =\n value !== undefined ? value : isFormBound ? (form!.values[name!] as string) : undefined\n const isControlled = value !== undefined || isFormBound\n const [internal, setInternal] = useState<string>(defaultValue ?? '')\n const currentValue = isControlled ? (externalValue ?? '') : internal\n\n const resolvedError = error ?? bound?.error ?? false\n const resolvedHelperText = helperText ?? bound?.helperText\n\n // the code split into exactly `length` single-char slots (padded with empties)\n const chars = toChars(currentValue, length)\n\n const inputsRef = useRef<(HTMLInputElement | null)[]>([])\n\n useEffect(() => {\n if (autoFocus) inputsRef.current[0]?.focus()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n const focusBox = (i: number) => {\n const el = inputsRef.current[Math.max(0, Math.min(i, length - 1))]\n el?.focus()\n el?.select()\n }\n\n const commit = (nextChars: string[]) => {\n const next = nextChars.join('')\n if (!isControlled) setInternal(next)\n if (isFormBound) form!.setValue(name!, next)\n onChange?.(next)\n if (nextChars.every((c) => c !== '')) onComplete?.(next)\n }\n\n const handleChange = (index: number, raw: string) => {\n const filtered = [...raw].filter((c) => allowed.test(c))\n // a disallowed keystroke (raw non-empty but nothing survives the filter) is ignored\n if (raw !== '' && filtered.length === 0) return\n const nextChars = [...chars]\n if (filtered.length <= 1) {\n // a single typed char (boxes select-on-focus, so this replaces) — or a clear ('')\n nextChars[index] = filtered[0] ?? ''\n commit(nextChars)\n if (filtered[0]) focusBox(index + 1)\n } else {\n // multiple chars (SMS autofill dumps the whole code into one box) → distribute from here\n let k = index\n for (const ch of filtered) {\n if (k >= length) break\n nextChars[k] = ch\n k++\n }\n commit(nextChars)\n focusBox(k)\n }\n }\n\n const handleKeyDown = (index: number, event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Backspace') {\n if (chars[index] === '' && index > 0) {\n // empty box → step back and clear the previous one\n event.preventDefault()\n const nextChars = [...chars]\n nextChars[index - 1] = ''\n commit(nextChars)\n focusBox(index - 1)\n }\n // a non-empty box lets the native delete run → onChange fires with '' (stays put)\n } else if (event.key === 'ArrowLeft') {\n event.preventDefault()\n focusBox(index - 1)\n } else if (event.key === 'ArrowRight') {\n event.preventDefault()\n focusBox(index + 1)\n } else if (event.key === 'Delete') {\n event.preventDefault()\n const nextChars = [...chars]\n nextChars[index] = ''\n commit(nextChars)\n }\n }\n\n const handlePaste = (index: number, event: ClipboardEvent<HTMLInputElement>) => {\n event.preventDefault()\n const filtered = [...event.clipboardData.getData('text')].filter((c) => allowed.test(c))\n if (filtered.length === 0) return\n const nextChars = [...chars]\n let k = index\n for (const ch of filtered) {\n if (k >= length) break\n nextChars[k] = ch\n k++\n }\n commit(nextChars)\n focusBox(k)\n }\n\n // mark the field touched when focus leaves the whole widget (not when it hops between boxes)\n const handleBlur = (event: FocusEvent<HTMLDivElement>) => {\n if (!event.currentTarget.contains(event.relatedTarget as Node | null)) {\n bound?.onBlur(event as unknown as FocusEvent<HTMLInputElement>)\n }\n }\n\n return (\n <div\n ref={ref}\n className={clsx(\n fieldStyles.field,\n resolvedError && fieldStyles.error,\n disabled && fieldStyles.disabled,\n className,\n )}\n style={\n {\n '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`,\n ...style,\n } as CSSProperties\n }\n >\n {label != null && (\n <span className={fieldStyles.label}>\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {label}\n </Typography>\n {required && (\n <span className={fieldStyles.required} aria-hidden=\"true\">\n *\n </span>\n )}\n </span>\n )}\n\n <div\n role=\"group\"\n aria-label={typeof label === 'string' ? label : 'One-time code'}\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n className={clsx(styles.row, styles[size], resolvedError && styles.invalid)}\n onBlur={handleBlur}\n >\n {chars.map((char, i) => (\n <input\n key={i}\n ref={(el) => {\n inputsRef.current[i] = el\n }}\n // the name goes on the first box only, so the form's scroll-to-error can target it\n name={i === 0 ? name : undefined}\n type=\"text\"\n inputMode={type === 'numeric' ? 'numeric' : 'text'}\n autoComplete={i === 0 ? 'one-time-code' : 'off'}\n aria-label={t('otpField.digit', { index: i + 1, total: length })}\n className={clsx(styles.box, char !== '' && styles.filled)}\n value={char}\n placeholder={placeholder}\n disabled={disabled}\n onChange={(e) => handleChange(i, e.target.value)}\n onKeyDown={(e) => handleKeyDown(i, e)}\n onPaste={(e) => handlePaste(i, e)}\n onFocus={(e) => e.target.select()}\n />\n ))}\n </div>\n\n {resolvedHelperText != null && (\n <Typography\n as=\"span\"\n id={helperId}\n variant=\"bodySmall\"\n color={resolvedError ? 'error' : 'muted'}\n className={fieldStyles.helper}\n >\n {resolvedHelperText}\n </Typography>\n )}\n </div>\n )\n})\n"],"names":["PATTERN","toChars","value","length","out","OtpField","forwardRef","type","defaultValue","onChange","onComplete","name","label","helperText","error","required","disabled","autoFocus","placeholder","size","color","className","style","ref","t","useT","helperId","useId","allowed","form","useFormContext","isFormBound","bound","externalValue","isControlled","internal","setInternal","useState","currentValue","resolvedError","resolvedHelperText","chars","inputsRef","useRef","useEffect","_a","focusBox","i","el","commit","nextChars","next","c","handleChange","index","raw","filtered","k","ch","handleKeyDown","event","handlePaste","handleBlur","jsxs","clsx","fieldStyles","jsx","Typography","styles","char","e"],"mappings":"+bAwBMA,GAAwC,CAC5C,QAAS,QACT,WAAY,WACZ,aAAc,aAChB,EAGA,SAASC,GAAQC,EAAeC,EAA0B,CACxD,MAAMC,EAAM,CAAC,GAAGF,CAAK,EAAE,MAAM,EAAGC,CAAM,EACtC,KAAOC,EAAI,OAASD,GAAQC,EAAI,KAAK,EAAE,EACvC,OAAOA,CACT,CAoDO,MAAMC,GAAWC,EAAAA,WAA0C,SAChE,CACE,OAAAH,EAAS,EACT,KAAAI,EAAO,UACP,MAAAL,EACA,aAAAM,EACA,SAAAC,EACA,WAAAC,EACA,KAAAC,EACA,MAAAC,EACA,WAAAC,EACA,MAAAC,EACA,SAAAC,EAAW,GACX,SAAAC,EAAW,GACX,UAAAC,EAAY,GACZ,YAAAC,EACA,KAAAC,EAAO,KACP,MAAAC,EAAQ,UACR,UAAAC,EACA,MAAAC,CACF,EACAC,EAC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AAG,MAAO5C,EAAQ,EAC/D,UAAW6D,EAAAA,KAAKI,EAAO,IAAKC,IAAS,IAAMD,EAAO,MAAM,EACxD,MAAOC,EACP,YAAAnD,EACA,SAAAF,EACA,SAAWsD,GAAMjB,EAAaN,EAAGuB,EAAE,OAAO,KAAK,EAC/C,UAAYA,GAAMX,EAAcZ,EAAGuB,CAAC,EACpC,QAAUA,GAAMT,EAAYd,EAAGuB,CAAC,EAChC,QAAUA,GAAMA,EAAE,OAAO,OAAA,CAAO,EAjB3BvB,CAAA,CAmBR,CAAA,CAAA,EAGFP,GAAsB,MACrB0B,EAAAA,IAACC,EAAAA,WAAA,CACC,GAAG,OACH,GAAIzC,EACJ,QAAQ,YACR,MAAOa,EAAgB,QAAU,QACjC,UAAW0B,EAAAA,YAAY,OAEtB,SAAAzB,CAAA,CAAA,CACH,CAAA,CAAA,CAIR,CAAC"}
|
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
import { jsxs as I, jsx as h } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as Y, useId as tt, useState as et, useRef as rt, useEffect as ot } from "react";
|
|
3
|
-
import { clsx as T } from "clsx";
|
|
4
|
-
import { u as st } from "./formContext-B7ln1Miy.js";
|
|
5
|
-
import { T as R } from "./Typography-Cta6Rg4L.js";
|
|
6
|
-
import { f as d } from "./TextField.module-QePvGeJ3.js";
|
|
7
|
-
import { a as at } from "./ConfigProvider-Blhvj6UQ.js";
|
|
8
|
-
const lt = "_row_1tqpn_2", nt = "_sm_1tqpn_8", ct = "_md_1tqpn_12", it = "_lg_1tqpn_16", ft = "_box_1tqpn_22", dt = "_filled_1tqpn_46", ut = "_invalid_1tqpn_63", _ = {
|
|
9
|
-
row: lt,
|
|
10
|
-
sm: nt,
|
|
11
|
-
md: ct,
|
|
12
|
-
lg: it,
|
|
13
|
-
box: ft,
|
|
14
|
-
filled: dt,
|
|
15
|
-
invalid: ut
|
|
16
|
-
}, pt = {
|
|
17
|
-
numeric: /[0-9]/,
|
|
18
|
-
alphabetic: /[A-Za-z]/,
|
|
19
|
-
alphanumeric: /[A-Za-z0-9]/
|
|
20
|
-
};
|
|
21
|
-
function mt(q, a) {
|
|
22
|
-
const n = [...q].slice(0, a);
|
|
23
|
-
for (; n.length < a; ) n.push("");
|
|
24
|
-
return n;
|
|
25
|
-
}
|
|
26
|
-
const Dt = Y(function({
|
|
27
|
-
length: a = 4,
|
|
28
|
-
type: n = "numeric",
|
|
29
|
-
value: x,
|
|
30
|
-
defaultValue: z,
|
|
31
|
-
onChange: g,
|
|
32
|
-
onComplete: b,
|
|
33
|
-
name: c,
|
|
34
|
-
label: y,
|
|
35
|
-
helperText: O,
|
|
36
|
-
error: S,
|
|
37
|
-
required: j = !1,
|
|
38
|
-
disabled: B = !1,
|
|
39
|
-
autoFocus: E = !1,
|
|
40
|
-
placeholder: M,
|
|
41
|
-
size: P = "md",
|
|
42
|
-
color: V = "primary",
|
|
43
|
-
className: K,
|
|
44
|
-
style: Z
|
|
45
|
-
}, $) {
|
|
46
|
-
const C = at(), N = `${tt()}-helper`, F = pt[n], u = st(), w = !!(u && c), s = u && c ? u.field(c) : void 0, H = x !== void 0 ? x : w ? u.values[c] : void 0, A = x !== void 0 || w, [L, G] = et(z ?? ""), J = A ? H ?? "" : L, v = S ?? (s == null ? void 0 : s.error) ?? !1, D = O ?? (s == null ? void 0 : s.helperText), i = mt(J, a), k = rt([]);
|
|
47
|
-
ot(() => {
|
|
48
|
-
var e;
|
|
49
|
-
E && ((e = k.current[0]) == null || e.focus());
|
|
50
|
-
}, []);
|
|
51
|
-
const f = (e) => {
|
|
52
|
-
const t = k.current[Math.max(0, Math.min(e, a - 1))];
|
|
53
|
-
t == null || t.focus(), t == null || t.select();
|
|
54
|
-
}, p = (e) => {
|
|
55
|
-
const t = e.join("");
|
|
56
|
-
A || G(t), w && u.setValue(c, t), g == null || g(t), e.every((r) => r !== "") && (b == null || b(t));
|
|
57
|
-
}, Q = (e, t) => {
|
|
58
|
-
const r = [...t].filter((o) => F.test(o));
|
|
59
|
-
if (t !== "" && r.length === 0) return;
|
|
60
|
-
const l = [...i];
|
|
61
|
-
if (r.length <= 1)
|
|
62
|
-
l[e] = r[0] ?? "", p(l), r[0] && f(e + 1);
|
|
63
|
-
else {
|
|
64
|
-
let o = e;
|
|
65
|
-
for (const m of r) {
|
|
66
|
-
if (o >= a) break;
|
|
67
|
-
l[o] = m, o++;
|
|
68
|
-
}
|
|
69
|
-
p(l), f(o);
|
|
70
|
-
}
|
|
71
|
-
}, U = (e, t) => {
|
|
72
|
-
if (t.key === "Backspace") {
|
|
73
|
-
if (i[e] === "" && e > 0) {
|
|
74
|
-
t.preventDefault();
|
|
75
|
-
const r = [...i];
|
|
76
|
-
r[e - 1] = "", p(r), f(e - 1);
|
|
77
|
-
}
|
|
78
|
-
} else if (t.key === "ArrowLeft")
|
|
79
|
-
t.preventDefault(), f(e - 1);
|
|
80
|
-
else if (t.key === "ArrowRight")
|
|
81
|
-
t.preventDefault(), f(e + 1);
|
|
82
|
-
else if (t.key === "Delete") {
|
|
83
|
-
t.preventDefault();
|
|
84
|
-
const r = [...i];
|
|
85
|
-
r[e] = "", p(r);
|
|
86
|
-
}
|
|
87
|
-
}, W = (e, t) => {
|
|
88
|
-
t.preventDefault();
|
|
89
|
-
const r = [...t.clipboardData.getData("text")].filter((m) => F.test(m));
|
|
90
|
-
if (r.length === 0) return;
|
|
91
|
-
const l = [...i];
|
|
92
|
-
let o = e;
|
|
93
|
-
for (const m of r) {
|
|
94
|
-
if (o >= a) break;
|
|
95
|
-
l[o] = m, o++;
|
|
96
|
-
}
|
|
97
|
-
p(l), f(o);
|
|
98
|
-
}, X = (e) => {
|
|
99
|
-
e.currentTarget.contains(e.relatedTarget) || s == null || s.onBlur(e);
|
|
100
|
-
};
|
|
101
|
-
return /* @__PURE__ */ I(
|
|
102
|
-
"div",
|
|
103
|
-
{
|
|
104
|
-
ref: $,
|
|
105
|
-
className: T(
|
|
106
|
-
d.field,
|
|
107
|
-
v && d.error,
|
|
108
|
-
B && d.disabled,
|
|
109
|
-
K
|
|
110
|
-
),
|
|
111
|
-
style: {
|
|
112
|
-
"--tz-btn-rgb": `var(--tz-color-${V}-rgb)`,
|
|
113
|
-
...Z
|
|
114
|
-
},
|
|
115
|
-
children: [
|
|
116
|
-
y != null && /* @__PURE__ */ I("span", { className: d.label, children: [
|
|
117
|
-
/* @__PURE__ */ h(R, { as: "span", variant: "bodySmall", color: "muted", children: y }),
|
|
118
|
-
j && /* @__PURE__ */ h("span", { className: d.required, "aria-hidden": "true", children: "*" })
|
|
119
|
-
] }),
|
|
120
|
-
/* @__PURE__ */ h(
|
|
121
|
-
"div",
|
|
122
|
-
{
|
|
123
|
-
role: "group",
|
|
124
|
-
"aria-label": typeof y == "string" ? y : "One-time code",
|
|
125
|
-
"aria-invalid": v || void 0,
|
|
126
|
-
"aria-describedby": D != null ? N : void 0,
|
|
127
|
-
className: T(_.row, _[P], v && _.invalid),
|
|
128
|
-
onBlur: X,
|
|
129
|
-
children: i.map((e, t) => /* @__PURE__ */ h(
|
|
130
|
-
"input",
|
|
131
|
-
{
|
|
132
|
-
ref: (r) => {
|
|
133
|
-
k.current[t] = r;
|
|
134
|
-
},
|
|
135
|
-
name: t === 0 ? c : void 0,
|
|
136
|
-
type: "text",
|
|
137
|
-
inputMode: n === "numeric" ? "numeric" : "text",
|
|
138
|
-
autoComplete: t === 0 ? "one-time-code" : "off",
|
|
139
|
-
"aria-label": C("otpField.digit", { index: t + 1, total: a }),
|
|
140
|
-
className: T(_.box, e !== "" && _.filled),
|
|
141
|
-
value: e,
|
|
142
|
-
placeholder: M,
|
|
143
|
-
disabled: B,
|
|
144
|
-
onChange: (r) => Q(t, r.target.value),
|
|
145
|
-
onKeyDown: (r) => U(t, r),
|
|
146
|
-
onPaste: (r) => W(t, r),
|
|
147
|
-
onFocus: (r) => r.target.select()
|
|
148
|
-
},
|
|
149
|
-
t
|
|
150
|
-
))
|
|
151
|
-
}
|
|
152
|
-
),
|
|
153
|
-
D != null && /* @__PURE__ */ h(
|
|
154
|
-
R,
|
|
155
|
-
{
|
|
156
|
-
as: "span",
|
|
157
|
-
id: N,
|
|
158
|
-
variant: "bodySmall",
|
|
159
|
-
color: v ? "error" : "muted",
|
|
160
|
-
className: d.helper,
|
|
161
|
-
children: D
|
|
162
|
-
}
|
|
163
|
-
)
|
|
164
|
-
]
|
|
165
|
-
}
|
|
166
|
-
);
|
|
167
|
-
});
|
|
168
|
-
export {
|
|
169
|
-
Dt as O
|
|
170
|
-
};
|
|
171
|
-
//# sourceMappingURL=OtpField-D0eTOLtg.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OtpField-D0eTOLtg.js","sources":["../src/components/OtpField/OtpField.tsx"],"sourcesContent":["import {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type ClipboardEvent,\n type CSSProperties,\n type FocusEvent,\n type KeyboardEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { useFormContext } from '../../form/formContext'\nimport { useT, type ThemeColor } from '../../theme'\nimport { Typography } from '../Typography'\nimport fieldStyles from '../TextField/TextField.module.css'\nimport styles from './OtpField.module.css'\n\nexport type OtpFieldSize = 'sm' | 'md' | 'lg'\n/** Which characters the code accepts. */\nexport type OtpFieldType = 'numeric' | 'alphabetic' | 'alphanumeric'\n\n/** Allowed-character matcher per `type`. */\nconst PATTERN: Record<OtpFieldType, RegExp> = {\n numeric: /[0-9]/,\n alphabetic: /[A-Za-z]/,\n alphanumeric: /[A-Za-z0-9]/,\n}\n\n/** Split a code string into exactly `length` single-char slots, padded with empties. */\nfunction toChars(value: string, length: number): string[] {\n const out = [...value].slice(0, length)\n while (out.length < length) out.push('')\n return out\n}\n\nexport interface OtpFieldProps {\n /** Number of input boxes (the code length). Defaults to `4`. */\n length?: number\n /** Which characters are accepted (also drives the mobile keyboard). Defaults to `'numeric'`. */\n type?: OtpFieldType\n /** Controlled value — the concatenated code string. */\n value?: string\n /** Initial value for uncontrolled use. */\n defaultValue?: string\n /** Fires with the full code string on every change. */\n onChange?: (value: string) => void\n /** Fires with the code once every box is filled. */\n onComplete?: (value: string) => void\n /** Field name — the `<Form>` binding key (form value is the code `string`). */\n name?: string\n /** Label rendered above the boxes. */\n label?: ReactNode\n /** Helper / error text under the boxes (shown in the error color while `error`). */\n helperText?: ReactNode\n /** Marks the field invalid — reddens the boxes + helper. */\n error?: boolean\n /** Adds a red asterisk after the label. */\n required?: boolean\n /** Disables every box. */\n disabled?: boolean\n /** Focus the first box on mount. */\n autoFocus?: boolean\n /** Placeholder character shown in empty boxes (e.g. `'•'`). */\n placeholder?: string\n /** Preset size. Defaults to `'md'`. */\n size?: OtpFieldSize\n /** Theme palette token for the focus ring / active box. Defaults to `'primary'`. */\n color?: ThemeColor\n className?: string\n style?: CSSProperties\n}\n\n/**\n * A one-time-passcode input — a row of single-character boxes for verification codes. **`length`**\n * (default `4`) sets the box count; **`type`** (`'numeric'` default · `'alphabetic'` · `'alphanumeric'`)\n * restricts the accepted characters and the mobile keyboard. Typing advances to the next box, Backspace\n * clears + steps back, Arrows navigate, and **paste / SMS autofill** (`autocomplete=\"one-time-code\"`)\n * distributes the whole code across the boxes. The value is the concatenated string — controlled\n * (`value` + `onChange`) or uncontrolled (`defaultValue`); **`onComplete`** fires when all boxes are\n * filled. Shares the field-family chrome (`label` · `error` + `helperText` · `required` · `disabled` ·\n * `size`) and binds to a surrounding `<Form>` by **`name`** (form value = the code string; validate with\n * e.g. `z.string().length(4)` or a `type`-matching regex). Tinted by `color` via the shared\n * `--tz-btn-rgb` pattern; `role=\"group\"` with per-box `aria-label`s. Own CSS module (+ TextField's for\n * the label/helper chrome).\n */\nexport const OtpField = forwardRef<HTMLDivElement, OtpFieldProps>(function OtpField(\n {\n length = 4,\n type = 'numeric',\n value,\n defaultValue,\n onChange,\n onComplete,\n name,\n label,\n helperText,\n error,\n required = false,\n disabled = false,\n autoFocus = false,\n placeholder,\n size = 'md',\n color = 'primary',\n className,\n style,\n },\n ref,\n) {\n const t = useT()\n const reactId = useId()\n const helperId = `${reactId}-helper`\n const allowed = PATTERN[type]\n\n // bind to a surrounding <Form> by `name` — form value is the code string; error/touched via field()\n const form = useFormContext()\n const isFormBound = Boolean(form && name)\n const bound = form && name ? form.field(name) : undefined\n\n const externalValue =\n value !== undefined ? value : isFormBound ? (form!.values[name!] as string) : undefined\n const isControlled = value !== undefined || isFormBound\n const [internal, setInternal] = useState<string>(defaultValue ?? '')\n const currentValue = isControlled ? (externalValue ?? '') : internal\n\n const resolvedError = error ?? bound?.error ?? false\n const resolvedHelperText = helperText ?? bound?.helperText\n\n // the code split into exactly `length` single-char slots (padded with empties)\n const chars = toChars(currentValue, length)\n\n const inputsRef = useRef<(HTMLInputElement | null)[]>([])\n\n useEffect(() => {\n if (autoFocus) inputsRef.current[0]?.focus()\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [])\n\n const focusBox = (i: number) => {\n const el = inputsRef.current[Math.max(0, Math.min(i, length - 1))]\n el?.focus()\n el?.select()\n }\n\n const commit = (nextChars: string[]) => {\n const next = nextChars.join('')\n if (!isControlled) setInternal(next)\n if (isFormBound) form!.setValue(name!, next)\n onChange?.(next)\n if (nextChars.every((c) => c !== '')) onComplete?.(next)\n }\n\n const handleChange = (index: number, raw: string) => {\n const filtered = [...raw].filter((c) => allowed.test(c))\n // a disallowed keystroke (raw non-empty but nothing survives the filter) is ignored\n if (raw !== '' && filtered.length === 0) return\n const nextChars = [...chars]\n if (filtered.length <= 1) {\n // a single typed char (boxes select-on-focus, so this replaces) — or a clear ('')\n nextChars[index] = filtered[0] ?? ''\n commit(nextChars)\n if (filtered[0]) focusBox(index + 1)\n } else {\n // multiple chars (SMS autofill dumps the whole code into one box) → distribute from here\n let k = index\n for (const ch of filtered) {\n if (k >= length) break\n nextChars[k] = ch\n k++\n }\n commit(nextChars)\n focusBox(k)\n }\n }\n\n const handleKeyDown = (index: number, event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Backspace') {\n if (chars[index] === '' && index > 0) {\n // empty box → step back and clear the previous one\n event.preventDefault()\n const nextChars = [...chars]\n nextChars[index - 1] = ''\n commit(nextChars)\n focusBox(index - 1)\n }\n // a non-empty box lets the native delete run → onChange fires with '' (stays put)\n } else if (event.key === 'ArrowLeft') {\n event.preventDefault()\n focusBox(index - 1)\n } else if (event.key === 'ArrowRight') {\n event.preventDefault()\n focusBox(index + 1)\n } else if (event.key === 'Delete') {\n event.preventDefault()\n const nextChars = [...chars]\n nextChars[index] = ''\n commit(nextChars)\n }\n }\n\n const handlePaste = (index: number, event: ClipboardEvent<HTMLInputElement>) => {\n event.preventDefault()\n const filtered = [...event.clipboardData.getData('text')].filter((c) => allowed.test(c))\n if (filtered.length === 0) return\n const nextChars = [...chars]\n let k = index\n for (const ch of filtered) {\n if (k >= length) break\n nextChars[k] = ch\n k++\n }\n commit(nextChars)\n focusBox(k)\n }\n\n // mark the field touched when focus leaves the whole widget (not when it hops between boxes)\n const handleBlur = (event: FocusEvent<HTMLDivElement>) => {\n if (!event.currentTarget.contains(event.relatedTarget as Node | null)) {\n bound?.onBlur(event as unknown as FocusEvent<HTMLInputElement>)\n }\n }\n\n return (\n <div\n ref={ref}\n className={clsx(\n fieldStyles.field,\n resolvedError && fieldStyles.error,\n disabled && fieldStyles.disabled,\n className,\n )}\n style={\n {\n '--tz-btn-rgb': `var(--tz-color-${color}-rgb)`,\n ...style,\n } as CSSProperties\n }\n >\n {label != null && (\n <span className={fieldStyles.label}>\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {label}\n </Typography>\n {required && (\n <span className={fieldStyles.required} aria-hidden=\"true\">\n *\n </span>\n )}\n </span>\n )}\n\n <div\n role=\"group\"\n aria-label={typeof label === 'string' ? label : 'One-time code'}\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n className={clsx(styles.row, styles[size], resolvedError && styles.invalid)}\n onBlur={handleBlur}\n >\n {chars.map((char, i) => (\n <input\n key={i}\n ref={(el) => {\n inputsRef.current[i] = el\n }}\n // the name goes on the first box only, so the form's scroll-to-error can target it\n name={i === 0 ? name : undefined}\n type=\"text\"\n inputMode={type === 'numeric' ? 'numeric' : 'text'}\n autoComplete={i === 0 ? 'one-time-code' : 'off'}\n aria-label={t('otpField.digit', { index: i + 1, total: length })}\n className={clsx(styles.box, char !== '' && styles.filled)}\n value={char}\n placeholder={placeholder}\n disabled={disabled}\n onChange={(e) => handleChange(i, e.target.value)}\n onKeyDown={(e) => handleKeyDown(i, e)}\n onPaste={(e) => handlePaste(i, e)}\n onFocus={(e) => e.target.select()}\n />\n ))}\n </div>\n\n {resolvedHelperText != null && (\n <Typography\n as=\"span\"\n id={helperId}\n variant=\"bodySmall\"\n color={resolvedError ? 'error' : 'muted'}\n className={fieldStyles.helper}\n >\n {resolvedHelperText}\n </Typography>\n )}\n </div>\n )\n})\n"],"names":["PATTERN","toChars","value","length","out","OtpField","forwardRef","type","defaultValue","onChange","onComplete","name","label","helperText","error","required","disabled","autoFocus","placeholder","size","color","className","style","ref","t","useT","helperId","useId","allowed","form","useFormContext","isFormBound","bound","externalValue","isControlled","internal","setInternal","useState","currentValue","resolvedError","resolvedHelperText","chars","inputsRef","useRef","useEffect","_a","focusBox","i","el","commit","nextChars","next","c","handleChange","index","raw","filtered","k","ch","handleKeyDown","event","handlePaste","handleBlur","jsxs","clsx","fieldStyles","jsx","Typography","styles","char","e"],"mappings":";;;;;;;;;;;;;;;GAwBMA,KAAwC;AAAA,EAC5C,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,cAAc;AAChB;AAGA,SAASC,GAAQC,GAAeC,GAA0B;AACxD,QAAMC,IAAM,CAAC,GAAGF,CAAK,EAAE,MAAM,GAAGC,CAAM;AACtC,SAAOC,EAAI,SAASD,IAAQ,CAAAC,EAAI,KAAK,EAAE;AACvC,SAAOA;AACT;AAoDO,MAAMC,KAAWC,EAA0C,SAChE;AAAA,EACE,QAAAH,IAAS;AAA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AAAA,UAAA;AAAA,YACC,IAAG;AAAA,YACH,IAAIzC;AAAA,YACJ,SAAQ;AAAA,YACR,OAAOa,IAAgB,UAAU;AAAA,YACjC,WAAW0B,EAAY;AAAA,YAEtB,UAAAzB;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),A=require("react"),R=require("@tanstack/react-router"),G=require("clsx"),J=require("./useMediaQuery-CHMrI6Dy.cjs"),$=require("./useLockBodyScroll-CIXHZo-Q.cjs"),W=require("./Avatar-Dgf04PBC.cjs"),P=require("./Col-BdQeyKEX.cjs"),N=require("./Divider-CzbhdCiD.cjs"),Y=require("./Dropdown-Ui7h2TGd.cjs"),g=require("./Icon-BVULqOJD.cjs"),L=require("./IconButton-B9eVM18U.cjs"),O=require("./ListItem-yXXjtepZ.cjs"),ee=require("./FullscreenToggle-BNK7RcRq.cjs"),se=require("./ThemeToggle-BKk0eFiB.cjs"),i=require("./Typography-BFatE1_A.cjs"),te=require("./Breadcrumbs-BnFW4LgK.cjs"),ae=require("./Toaster-B2rO4BkG.cjs"),_=require("./Sidebar-D2MsR33k.cjs"),ne=require("./Flag-DFKHYnqk.cjs"),oe=require("./Modal-DXZdMmJh.cjs"),X=require("./ChoiceCardGroup-d0VVTUi5.cjs"),re=require("./Select-CVy5BnKe.cjs"),ce=require("./SwatchPicker-CCJltwHI.cjs"),d=require("./ConfigProvider-CUG8Mfy2.cjs"),le=require("./Button-ZplrHYKw.cjs"),ie=require("./SpeedDial-B9JTNNUU.cjs"),de={light:["#dc2626","#ea580c","#d97706","#ca8a04","#65a30d","#16a34a","#059669","#0891b2","#0284c7","#2563eb","#4f46e5","#7c3aed","#c026d3","#db2777","#475569"],dark:["#f87171","#fb923c","#fbbf24","#facc15","#a3e635","#4ade80","#34d399","#22d3ee","#38bdf8","#60a5fa","#818cf8","#a78bfa","#e879f9","#f472b6","#94a3b8"]};function ue({open:r,onClose:m,showTheme:b=!0}){const{mode:o,setMode:j,accentColors:y,defaultAccentColors:k,setAccentColor:q,headerSticky:D,setHeaderSticky:z,fontFamily:v,setFontFamily:u}=d.useTheme(),t=d.useT(),[l,T]=A.useState(""),f=l.trim(),x=v!==d.DEFAULT_FONT_FAMILY?[d.DEFAULT_FONT_FAMILY,v]:[d.DEFAULT_FONT_FAMILY],M=(f.length>0&&!x.some(n=>n.toLowerCase()===f.toLowerCase())?[f,...x]:x).map(n=>({value:n,label:n===d.DEFAULT_FONT_FAMILY?t("settings.fontDefault",{font:n}):n})),S=(n,w)=>{const h=k[n],c=[h,...de[n].filter(p=>p.toLowerCase()!==h.toLowerCase())];return e.jsx(ce.SwatchPicker,{label:w,colors:c,value:y[n]??h,onChange:p=>q(p.toLowerCase()===h.toLowerCase()?null:p,n),labels:{[h]:t("settings.accentDefault",{color:h})},"aria-label":String(w)})};return e.jsxs(oe.Modal,{open:r,onClose:m,placement:"right",size:"sm",title:t("settings.label"),icon:"Setting5",children:[b&&e.jsxs(e.Fragment,{children:[e.jsx(i.Typography,{variant:"subtitle",as:"h3",children:t("settings.themeTitle")}),e.jsx(i.Typography,{variant:"bodySmall",color:"muted",as:"p",style:{marginTop:"var(--tz-space-xxs)"},children:t("settings.themeDesc")}),e.jsx(X.ChoiceCardGroup,{exclusive:!0,color:"accent",minCardWidth:130,value:o,onChange:n=>{typeof n=="string"&&j(n)},options:[{value:"light",label:t("settings.light"),description:t("settings.lightDesc"),icon:"Sun"},{value:"dark",label:t("settings.dark"),description:t("settings.darkDesc"),icon:"Moon"}],"aria-label":t("settings.themeTitle"),style:{marginTop:"var(--tz-space-sm)"}}),e.jsx(N.Divider,{style:{margin:"var(--tz-space-md) 0"}})]}),e.jsx(i.Typography,{variant:"subtitle",as:"h3",children:t("settings.accentTitle")}),e.jsx(i.Typography,{variant:"bodySmall",color:"muted",as:"p",style:{marginTop:"var(--tz-space-xxs)"},children:t("settings.accentDesc")}),e.jsx(P.Col,{gap:"md",style:{marginTop:"var(--tz-space-sm)"},children:b?e.jsxs(e.Fragment,{children:[S("light",t("settings.lightTheme")),S("dark",t("settings.darkTheme"))]}):S(o,t(o==="light"?"settings.lightTheme":"settings.darkTheme"))}),e.jsx(N.Divider,{style:{margin:"var(--tz-space-md) 0"}}),e.jsx(i.Typography,{variant:"subtitle",as:"h3",children:t("settings.fontTitle")}),e.jsx(i.Typography,{variant:"bodySmall",color:"muted",as:"p",style:{marginTop:"var(--tz-space-xxs)"},children:t("settings.fontDesc")}),e.jsx(re.Select,{label:t("settings.fontFamily"),searchable:!0,searchPlaceholder:t("settings.fontSearch"),value:v,options:M,onSearchChange:T,onChange:n=>{u(n),T("")},"aria-label":t("settings.fontFamily"),style:{marginTop:"var(--tz-space-sm)"}}),e.jsx(N.Divider,{style:{margin:"var(--tz-space-md) 0"}}),e.jsx(i.Typography,{variant:"subtitle",as:"h3",children:t("settings.headerTitle")}),e.jsx(i.Typography,{variant:"bodySmall",color:"muted",as:"p",style:{marginTop:"var(--tz-space-xxs)"},children:t("settings.headerDesc")}),e.jsx(X.ChoiceCardGroup,{exclusive:!0,color:"accent",minCardWidth:130,value:D?"fixed":"static",onChange:n=>{typeof n=="string"&&z(n==="fixed")},options:[{value:"static",label:t("settings.scrollable"),description:t("settings.scrollableDesc")},{value:"fixed",label:t("settings.fixed"),description:t("settings.fixedDesc")}],"aria-label":t("settings.headerTitle"),style:{marginTop:"var(--tz-space-sm)"}})]})}const he="_shell_o4ktv_5",ge="_shellCollapsed_o4ktv_21",pe="_sidebar_o4ktv_21",me="_sidebarInner_o4ktv_49",be="_sidebarClose_o4ktv_58",ve="_backdrop_o4ktv_65",xe="_brand_o4ktv_70",_e="_sidebarSearch_o4ktv_86",je="_navScroll_o4ktv_99",ye="_sidebarFooter_o4ktv_108",ke="_headerSearch_o4ktv_115",Te="_main_o4ktv_119",fe="_topbar_o4ktv_126",Se="_topbarSticky_o4ktv_139",Ce="_headerStart_o4ktv_150",Fe="_headerEnd_o4ktv_159",Le="_account_o4ktv_166",Ae="_content_o4ktv_182",Ne="_pageTitleRow_o4ktv_189",we="_pageTitle_o4ktv_189",Ie="_pageActions_o4ktv_207",qe="_pageActionsFab_o4ktv_221",De="_pageActionsLetter_o4ktv_236",ze="_settings_o4ktv_248",a={shell:he,shellCollapsed:ge,sidebar:pe,sidebarInner:me,sidebarClose:be,backdrop:ve,brand:xe,sidebarSearch:_e,navScroll:je,sidebarFooter:ye,headerSearch:ke,main:Te,topbar:fe,topbarSticky:Se,headerStart:Ce,headerEnd:Fe,account:Le,content:Ae,pageTitleRow:Ne,pageTitle:we,pageActions:Ie,pageActionsFab:qe,pageActionsLetter:De,settings:ze},Be=r=>typeof r=="string"?e.jsx(g.Icon,{name:r}):r,Me=r=>r.icon!=null?r.icon:typeof r.label=="string"&&r.label.trim()?e.jsx("span",{className:a.pageActionsLetter,children:r.label.trim()[0].toUpperCase()}):"More";function Ee({actions:r}){const m=d.useT(),b=J.useMediaQuery("xs");return r.length?b&&r.length>=2?e.jsx(ie.SpeedDial,{ariaLabel:m("pageActions.label"),icon:"Add",direction:"up",className:a.pageActionsFab,actions:r.map(o=>({icon:Me(o),label:o.label,onClick:o.onClick,disabled:o.disabled}))}):e.jsx(e.Fragment,{children:r.map((o,j)=>e.jsx(le.Button,{size:"sm",color:o.color,variant:o.variant,disabled:o.disabled,startIcon:o.icon!=null?Be(o.icon):void 0,onClick:o.onClick,children:o.label},j))}):null}function Re({logo:r,sidebarFooter:m,header:b,toaster:o=!0,children:j}){const y=_.usePageTitle(),k=_.usePageBack(),{headerSticky:q}=d.useTheme(),{language:D,setLanguage:z,languages:v}=d.useLanguage(),u=d.useT(),l={...d.useHeaderConfig(),...b},T=l.theme??!0,f=l.fullscreen??!1,x=l.settings??!0,B=l.search??!0,M=l.languages??!0,S=l.breadcrumbs??!0,n=typeof o=="object"?o:void 0,w=l.pageTitle??!0,h=l.onLogout,c=l.user,p=l.menu??[],C=J.useMediaQuery("md"),[I,F]=A.useState(C);A.useEffect(()=>{F(C)},[C]),$.useLockBodyScroll(C&&!I);const K=R.useRouterState({select:s=>s.location.pathname});A.useEffect(()=>{C&&F(!0)},[K]);const H=R.useRouterState({select:s=>s.statusCode===404||s.matches.some(E=>E.status==="notFound")}),[V,Q]=A.useState(!1),Z=R.useNavigate(),U=(_.useLeafActions()??[]).map(s=>({label:s.label,icon:s.icon,color:s.color,variant:s.variant,disabled:s.disabled,onClick:s.onClick??(s.to?()=>Z({to:s.to,params:s.params,search:s.search}):void 0)}));return e.jsxs("div",{className:G.clsx(a.shell,I&&a.shellCollapsed),children:[e.jsx("aside",{className:a.sidebar,children:e.jsxs("div",{className:a.sidebarInner,children:[r?e.jsxs("div",{className:a.brand,children:[r,e.jsx(L.IconButton,{variant:"filled",size:"sm",className:a.sidebarClose,"aria-label":u("common.close"),onClick:()=>F(!0),children:e.jsx(g.Icon,{name:"Close"})})]}):null,B?e.jsx("div",{className:a.sidebarSearch,children:e.jsx(_.NavSearch,{})}):null,e.jsx("div",{className:a.navScroll,children:e.jsx(_.Sidebar,{})}),m?e.jsx("div",{className:a.sidebarFooter,children:m}):null]})}),e.jsx("div",{className:a.backdrop,onClick:()=>F(!0),"aria-hidden":"true"}),e.jsxs("div",{className:a.main,children:[e.jsxs("header",{className:G.clsx(a.topbar,q&&a.topbarSticky),children:[e.jsxs("div",{className:a.headerStart,children:[e.jsx(L.IconButton,{"aria-label":I?"Show sidebar":"Hide sidebar","aria-expanded":!I,variant:"filled",size:"sm",onClick:()=>F(s=>!s),children:e.jsx(g.Icon,{name:"Menu"})}),B?e.jsx("div",{className:a.headerSearch,children:e.jsx(_.NavSearch,{})}):null]}),e.jsxs("div",{className:a.headerEnd,children:[f?e.jsx(ee.FullscreenToggle,{variant:"filled",size:"sm"}):null,T?e.jsx(se.ThemeToggle,{variant:"filled",size:"sm"}):null,M&&v.length>1?e.jsx(Y.Dropdown,{placement:"bottom-end",trigger:e.jsx(L.IconButton,{variant:"filled",size:"sm","aria-label":u("language.label"),children:e.jsx(g.Icon,{name:"Global"})}),children:v.map(s=>e.jsx(O.ListItem,{clickable:!0,selected:s.code===D,onClick:()=>z(s.code),icon:e.jsx(ne.Flag,{code:s.code}),children:s.label??s.code},s.code))}):null,x?e.jsx(L.IconButton,{"aria-label":u("settings.label"),variant:"text",size:"sm",className:a.settings,onClick:()=>Q(!0),children:e.jsx(g.Icon,{name:"Setting5"})}):null,h?e.jsxs(Y.Dropdown,{placement:"bottom-end",style:{minWidth:230},trigger:e.jsx("button",{type:"button",className:a.account,"aria-label":u("account.label"),children:e.jsx(W.Avatar,{size:"md",name:c==null?void 0:c.name,src:c==null?void 0:c.avatar,color:"primary"})}),children:[c?e.jsxs(e.Fragment,{children:[e.jsxs(P.Row,{gap:8,align:"center",padding:"var(--tz-space-xxs) var(--tz-space-xs)",children:[e.jsx(W.Avatar,{size:"md",name:c.name,src:c.avatar,color:"primary"}),e.jsxs(P.Col,{gap:2,children:[e.jsx(i.Typography,{variant:"body",children:c.name??u("userCard.welcome")}),c.email?e.jsx(i.Typography,{variant:"bodySmall",color:"muted",children:c.email}):null]})]}),e.jsx(N.Divider,{})]}):null,p.map((s,E)=>e.jsx(O.ListItem,{icon:s.icon?e.jsx(g.Icon,{name:s.icon,color:s.color}):void 0,color:s.color,clickable:!0,disabled:s.disabled,onClick:s.onClick,children:s.label},E)),p.length>0?e.jsx(N.Divider,{}):null,e.jsx(O.ListItem,{icon:e.jsx(g.Icon,{name:"Logout2",color:"error"}),clickable:!0,onClick:h,children:u("userCard.signOut")})]}):null]})]}),e.jsxs("main",{className:a.content,children:[S&&!H?e.jsx(te.Breadcrumbs,{}):null,w&&!H&&(y||k)?e.jsxs("div",{className:a.pageTitleRow,children:[k?e.jsx(L.IconButton,{"aria-label":u("pageTitle.back"),variant:"filled",color:"accent",className:a.backButton,onClick:k,size:"sm",children:e.jsx(g.Icon,{name:"ArrowLeft"})}):null,y?e.jsx(i.Typography,{variant:"h2",className:a.pageTitle,children:y}):null,U.length>0?e.jsx("div",{className:a.pageActions,children:e.jsx(Ee,{actions:U})}):null]}):null,j]})]}),o!==!1&&e.jsx(ae.Toaster,{...n}),x?e.jsx(ue,{open:V,onClose:()=>Q(!1),showTheme:T}):null]})}exports.RootLayout=Re;
|
|
2
|
-
//# sourceMappingURL=RootLayout-1am1CwPQ.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RootLayout-1am1CwPQ.cjs","sources":["../src/components/RootLayout/SettingsDrawer.tsx","../src/components/RootLayout/ActionSet.tsx","../src/components/RootLayout/RootLayout.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { DEFAULT_FONT_FAMILY, useT, useTheme } from '../../theme'\nimport { Col } from '../Flex'\nimport { Divider } from '../Divider'\nimport { Modal } from '../Modal'\nimport { ChoiceCardGroup } from '../ChoiceCard'\nimport { Select } from '../Select'\nimport { SwatchPicker } from '../SwatchPicker'\nimport { Typography } from '../Typography'\n\n// Accent choices offered alongside the provider's default (which leads each list) — 15 per mode, so\n// each theme shows 16 total. Tuned PER MODE (deeper tones for light, brighter for dark) and paired by\n// hue (red → violet + a neutral) so a color keeps its identity across themes.\nconst ALT_SWATCHES: Record<'light' | 'dark', string[]> = {\n light: [\n '#dc2626', // red\n '#ea580c', // orange\n '#d97706', // amber\n '#ca8a04', // yellow\n '#65a30d', // lime\n '#16a34a', // green\n '#059669', // emerald\n '#0891b2', // cyan\n '#0284c7', // sky\n '#2563eb', // blue\n '#4f46e5', // indigo\n '#7c3aed', // violet\n '#c026d3', // fuchsia\n '#db2777', // pink\n '#475569', // slate\n ],\n dark: [\n '#f87171', // red\n '#fb923c', // orange\n '#fbbf24', // amber\n '#facc15', // yellow\n '#a3e635', // lime\n '#4ade80', // green\n '#34d399', // emerald\n '#22d3ee', // cyan\n '#38bdf8', // sky\n '#60a5fa', // blue\n '#818cf8', // indigo\n '#a78bfa', // violet\n '#e879f9', // fuchsia\n '#f472b6', // pink\n '#94a3b8', // slate\n ],\n}\n\nexport interface SettingsDrawerProps {\n /** Whether the drawer is open. */\n open: boolean\n /** Close handler. */\n onClose: () => void\n /** Show the light/dark **Theme** section (gated by the shell's `header.theme`, the same flag as the header toggle). */\n showTheme?: boolean\n}\n\n/**\n * The header user-menu **Settings** drawer (a right-side `Modal`), top to bottom: a **Theme** section — an\n * exclusive `ChoiceCardGroup` (**Light** / **Dark** cards) driving `useTheme().setMode`, shown only when\n * **`showTheme`** (the shell's `header.theme`, so the header toggle + this section appear/disappear\n * together); **Accent Color** — **two `SwatchPicker`s** (Light + Dark) so both accents are chosen\n * independently, each with a per-mode set (deeper tones for light, brighter for dark), calling\n * `setAccentColor(color, mode)` and persisting it — each list leads with the provider's default for that\n * mode (`defaultAccentColors[mode]`), selected when there's no override (picking it clears the override).\n * When `showTheme` is off the panel is locked to one mode, so **only the active mode's accent picker**\n * shows (the other is pointless without a theme switch);\n * a **Font** section (a searchable `Select` — Inter preset + type any Google Font — driving\n * `setFontFamily`); and a **Header** section (an exclusive `ChoiceCardGroup` **Scrollable** / **Fixed**\n * driving `setHeaderSticky`). Internal to the admin shell — not a public export.\n */\nexport function SettingsDrawer({ open, onClose, showTheme = true }: SettingsDrawerProps) {\n const {\n mode,\n setMode,\n accentColors,\n defaultAccentColors,\n setAccentColor,\n headerSticky,\n setHeaderSticky,\n fontFamily,\n setFontFamily,\n } = useTheme()\n const t = useT()\n\n // One searchable Select doubles as a \"type any Google Font\" field. Base = Inter (the only preset) +\n // the active font (so a custom pick stays visible/selectable). While searching, the typed query is\n // offered as its own option — picking it applies + loads that family. Base is always kept in the\n // list (never filtered out) so `value` always resolves in the trigger, even mid-search.\n const [fontQuery, setFontQuery] = useState('')\n const q = fontQuery.trim()\n const base =\n fontFamily !== DEFAULT_FONT_FAMILY ? [DEFAULT_FONT_FAMILY, fontFamily] : [DEFAULT_FONT_FAMILY]\n const showTyped = q.length > 0 && !base.some((f) => f.toLowerCase() === q.toLowerCase())\n const fontOptions = (showTyped ? [q, ...base] : base).map((f) => ({\n value: f,\n label: f === DEFAULT_FONT_FAMILY ? t('settings.fontDefault', { font: f }) : f,\n }))\n\n const picker = (mode: 'light' | 'dark', label: string) => {\n const def = defaultAccentColors[mode]\n // the provider's default (per mode) leads the list; then the mode's alts (minus any collision)\n const colors = [def, ...ALT_SWATCHES[mode].filter((c) => c.toLowerCase() !== def.toLowerCase())]\n return (\n <SwatchPicker\n label={label}\n colors={colors}\n // with no override, this mode's default swatch reads as selected\n value={accentColors[mode] ?? def}\n // the default swatch clears this mode's override; the rest set it\n onChange={(color) =>\n setAccentColor(color.toLowerCase() === def.toLowerCase() ? null : color, mode)\n }\n labels={{ [def]: t('settings.accentDefault', { color: def }) }}\n aria-label={String(label)}\n />\n )\n }\n\n return (\n <Modal\n open={open}\n onClose={onClose}\n placement=\"right\"\n size=\"sm\"\n title={t('settings.label')}\n icon=\"Setting5\"\n >\n {showTheme && (\n <>\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.themeTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.themeDesc')}\n </Typography>\n <ChoiceCardGroup\n exclusive\n color=\"accent\"\n minCardWidth={130}\n value={mode}\n onChange={(v) => {\n if (typeof v === 'string') setMode(v as 'light' | 'dark')\n }}\n options={[\n {\n value: 'light',\n label: t('settings.light'),\n description: t('settings.lightDesc'),\n icon: 'Sun',\n },\n {\n value: 'dark',\n label: t('settings.dark'),\n description: t('settings.darkDesc'),\n icon: 'Moon',\n },\n ]}\n aria-label={t('settings.themeTitle')}\n style={{ marginTop: 'var(--tz-space-sm)' }}\n />\n\n <Divider style={{ margin: 'var(--tz-space-md) 0' }} />\n </>\n )}\n\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.accentTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.accentDesc')}\n </Typography>\n <Col gap=\"md\" style={{ marginTop: 'var(--tz-space-sm)' }}>\n {showTheme ? (\n <>\n {picker('light', t('settings.lightTheme'))}\n {picker('dark', t('settings.darkTheme'))}\n </>\n ) : (\n // theme switching is off → the panel stays in one mode, so only that mode's accent matters\n picker(mode, mode === 'light' ? t('settings.lightTheme') : t('settings.darkTheme'))\n )}\n </Col>\n\n <Divider style={{ margin: 'var(--tz-space-md) 0' }} />\n\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.fontTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.fontDesc')}\n </Typography>\n <Select\n label={t('settings.fontFamily')}\n searchable\n searchPlaceholder={t('settings.fontSearch')}\n value={fontFamily}\n options={fontOptions}\n onSearchChange={setFontQuery}\n onChange={(v) => {\n setFontFamily(v)\n setFontQuery('')\n }}\n aria-label={t('settings.fontFamily')}\n style={{ marginTop: 'var(--tz-space-sm)' }}\n />\n\n <Divider style={{ margin: 'var(--tz-space-md) 0' }} />\n\n <Typography variant=\"subtitle\" as=\"h3\">\n {t('settings.headerTitle')}\n </Typography>\n <Typography\n variant=\"bodySmall\"\n color=\"muted\"\n as=\"p\"\n style={{ marginTop: 'var(--tz-space-xxs)' }}\n >\n {t('settings.headerDesc')}\n </Typography>\n <ChoiceCardGroup\n exclusive\n color=\"accent\"\n minCardWidth={130}\n value={headerSticky ? 'fixed' : 'static'}\n // exclusive (radio) → always a string; set sticky from the picked card\n onChange={(v) => {\n if (typeof v === 'string') setHeaderSticky(v === 'fixed')\n }}\n options={[\n {\n value: 'static',\n label: t('settings.scrollable'),\n description: t('settings.scrollableDesc'),\n },\n { value: 'fixed', label: t('settings.fixed'), description: t('settings.fixedDesc') },\n ]}\n aria-label={t('settings.headerTitle')}\n style={{ marginTop: 'var(--tz-space-sm)' }}\n />\n </Modal>\n )\n}\n","import { type MouseEvent, type ReactNode } from 'react'\nimport { useMediaQuery } from '../../hooks/useMediaQuery'\nimport { useT, type ThemeColor } from '../../theme'\nimport type { IconName } from '../../icons/names'\nimport { Button, type ButtonVariant } from '../Button'\nimport { Icon } from '../Icon'\nimport { SpeedDial } from '../SpeedDial'\nimport styles from './RootLayout.module.css'\n\n/** A resolved page action — rendered as a `Button` (inline) or a `SpeedDial` action (collapsed). */\nexport interface PageAction {\n /** Visible label (button text; the SpeedDial action's tooltip when collapsed). */\n label: ReactNode\n /** Leading icon — an `IconName` or any node. When omitted, the collapsed dial shows the label's first letter. */\n icon?: IconName | ReactNode\n /** Click handler. */\n onClick?: (event: MouseEvent<HTMLButtonElement>) => void\n /** Button color / tint. */\n color?: ThemeColor\n /** Inline-button variant (ignored when collapsed). Defaults to `contained`. */\n variant?: ButtonVariant\n /** Renders the action disabled. */\n disabled?: boolean\n}\n\nconst iconNode = (icon: IconName | ReactNode) =>\n typeof icon === 'string' ? <Icon name={icon as IconName} /> : icon\n\n/** The collapsed SpeedDial action's icon: the action's `icon`, else the label's first letter (uppercased),\n * else a fallback `More` glyph when the label isn't a plain string. */\nconst speedDialIcon = (a: PageAction): IconName | ReactNode => {\n if (a.icon != null) return a.icon\n if (typeof a.label === 'string' && a.label.trim())\n return <span className={styles.pageActionsLetter}>{a.label.trim()[0].toUpperCase()}</span>\n return 'More'\n}\n\n/**\n * Renders a set of page actions in the shell's page-title row: inline `Button`s on wider screens,\n * **collapsed into a `SpeedDial`** (a fixed bottom-right FAB) on the `xs` breakpoint (≤767.98px) when\n * there are **2 or more**. Fed by a route's `staticData.actions` (resolved by `RootLayout`). Internal.\n */\nexport function ActionSet({ actions }: { actions: PageAction[] }) {\n const t = useT()\n // ≤ 767.98px — collapse 2+ actions into a SpeedDial so a row of buttons doesn't crowd a phone header\n const isXs = useMediaQuery('xs')\n if (!actions.length) return null\n\n return isXs && actions.length >= 2 ? (\n <SpeedDial\n ariaLabel={t('pageActions.label')}\n icon=\"Add\"\n direction=\"up\"\n // float it as a fixed bottom-right FAB (out of the title-row flow); inset tightens on xxs\n className={styles.pageActionsFab}\n actions={actions.map((a) => ({\n icon: speedDialIcon(a),\n label: a.label,\n onClick: a.onClick,\n disabled: a.disabled,\n }))}\n />\n ) : (\n <>\n {actions.map((a, i) => (\n <Button\n key={i}\n size=\"sm\"\n color={a.color}\n variant={a.variant}\n disabled={a.disabled}\n startIcon={a.icon != null ? iconNode(a.icon) : undefined}\n onClick={a.onClick}\n >\n {a.label}\n </Button>\n ))}\n </>\n )\n}\n","import { useEffect, useState, type ReactNode } from 'react'\nimport { useNavigate, useRouterState, type LinkProps } from '@tanstack/react-router'\nimport { clsx } from 'clsx'\nimport { useMediaQuery } from '../../hooks/useMediaQuery'\nimport { useLockBodyScroll } from '../../hooks/useLockBodyScroll'\nimport {\n useHeaderConfig,\n useLanguage,\n useT,\n useTheme,\n type HeaderConfig,\n type HeaderUser,\n} from '../../theme'\nimport { Avatar } from '../Avatar'\nimport { Col, Row } from '../Flex'\nimport { Divider } from '../Divider'\nimport { Dropdown } from '../Dropdown'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { ListItem } from '../List'\nimport { FullscreenToggle } from '../FullscreenToggle'\nimport { ThemeToggle } from '../ThemeToggle'\nimport { Typography } from '../Typography'\nimport { Breadcrumbs } from '../Breadcrumbs'\nimport { Toaster, type ToasterProps } from '../Toast'\nimport { NavSearch, Sidebar, useLeafActions, usePageBack, usePageTitle } from '../Sidebar/Sidebar'\nimport { Flag } from '../Flag'\nimport { SettingsDrawer } from './SettingsDrawer'\nimport { ActionSet, type PageAction } from './ActionSet'\nimport styles from './RootLayout.module.css'\n\n/**\n * The shell header config + its user shape now live in the theme layer (so `config.header` can carry\n * them app-wide). These aliases keep the historical `RootLayout*` names importable.\n */\nexport type RootLayoutUser = HeaderUser\nexport type RootLayoutHeader = HeaderConfig\n\nexport interface RootLayoutProps {\n /** Brand logo at the top of the sidebar card — pass an `<img>`, an `<Icon>`, or any node. */\n logo?: ReactNode\n /** Optional content pinned to the **bottom of the sidebar** (e.g. a promo / \"Need help?\" card). */\n sidebarFooter?: ReactNode\n /**\n * Header config for **this** shell — merged **over** the app-wide `config.header` (the prop wins).\n * Fields: the built-in `theme` / `search` / `settings` / `languages` toggles (default `true`),\n * `fullscreen` (default `false`), `breadcrumbs` (default `true`), `pageTitle` (default `true`), and the\n * account (`onLogout` / `user`).\n */\n header?: RootLayoutHeader\n /**\n * The built-in toast viewport, mounted for you so `toast.*()` works app-wide with no extra setup.\n * Defaults to `true` (a `<Toaster>` with its defaults). Pass `ToasterProps` to configure it\n * (`{ position, duration }`), or `false` to opt out — e.g. when you mount your own `<Toaster>`.\n */\n toaster?: boolean | ToasterProps\n /** Routed content — the consumer passes `<Outlet />`. */\n children: ReactNode\n}\n\n/**\n * The admin-panel shell — a **floating** layout: the whole app sits on a soft `--tz-color-background`\n * canvas, with a rounded, elevated `--tz-color-surface` **sidebar card** (`logo` + auto-generated `Sidebar` + an optional\n * `sidebarFooter`) beside the header + content. Set it as the root route's component and pass\n * `<Outlet />` as `children`; the `Sidebar` builds itself from the routes' `staticData`. The header\n * holds an optional `ThemeToggle` (on by default), a **Settings** button (opens a right-side drawer to\n * pick + persist the `accent` color), plus an account `Avatar` whose menu has a **Sign out** item when\n * `header.onLogout` is given. The content area stacks\n * **`Breadcrumbs` → the page title (the active route's `staticData.name`) → `children`**; pages wrap\n * their own body in `PageLayout`. Set `header.pageTitle = false` to drop the auto `h2` when pages\n * carry their own heading inside their `PageLayout` header. On a 404 the auto title + breadcrumbs are\n * suppressed automatically (a partial route match would otherwise show a stale section), regardless of\n * the `header.pageTitle` / `header.breadcrumbs` props. A `<Toaster>` is **mounted by default** so\n * `toast.*()` works app-wide with no extra setup (configure via `toaster`, or `toaster={false}` to opt\n * out). Styling is token-based, so it follows the active `ConfigProvider` mode. Requires\n * `@tanstack/react-router` (peer).\n */\nexport function RootLayout({\n logo,\n sidebarFooter,\n header,\n toaster = true,\n children,\n}: RootLayoutProps) {\n const title = usePageTitle()\n const onBack = usePageBack() // set by the current route's `staticData.back` (opt-in) — else undefined\n // header sticky/static — the user's persisted choice (seeded from config.header.sticky)\n const { headerSticky } = useTheme()\n const { language, setLanguage, languages } = useLanguage()\n const t = useT()\n // app-wide header config (config.header) as the base; this shell's `header` prop wins over it\n const configHeader = useHeaderConfig()\n const h: HeaderConfig = { ...configHeader, ...header }\n const showTheme = h.theme ?? true\n const showFullscreen = h.fullscreen ?? false\n const showSettings = h.settings ?? true\n const showSearch = h.search ?? true\n const showLanguages = h.languages ?? true\n const showBreadcrumbs = h.breadcrumbs ?? true\n const toasterProps = typeof toaster === 'object' ? toaster : undefined\n const showPageTitle = h.pageTitle ?? true\n const onLogout = h.onLogout\n const user = h.user\n const accountMenu = h.menu ?? [] // custom account-menu items (between the user block and Sign out)\n // below 1280px the sidebar auto-collapses (and auto-expands again above it); a manual toggle holds\n // until the next breakpoint cross. `useMediaQuery` is correct on the first client render, so no flash.\n const isNarrow = useMediaQuery('md') // ≤ 1279.98px — the shared `md` breakpoint\n const [collapsed, setCollapsed] = useState(isNarrow)\n useEffect(() => {\n setCollapsed(isNarrow)\n }, [isNarrow])\n // while the sidebar overlays the content (narrow + open), lock page scroll so scrolling inside the\n // drawer doesn't scroll the content behind it\n useLockBodyScroll(isNarrow && !collapsed)\n // navigating from the overlay drawer (a nav link or a search suggestion — both change the route) auto-\n // closes it, so you land on the page instead of the still-open sidebar; desktop navigation is untouched\n const pathname = useRouterState({ select: (s) => s.location.pathname })\n useEffect(() => {\n if (isNarrow) setCollapsed(true)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [pathname])\n // on a 404 the URL often partially matches a named layout route (e.g. `/core/xxx` still resolves\n // \"Core\" as the active section), so the auto page title + breadcrumbs would show a stale, wrong trail.\n // suppress both when the router is in a notFound state — automatic, no opt-out needed. `statusCode ===\n // 404` is the primary signal; a `notFound` match status is the fallback.\n const isNotFound = useRouterState({\n select: (s) => s.statusCode === 404 || s.matches.some((m) => m.status === 'notFound'),\n })\n const [settingsOpen, setSettingsOpen] = useState(false)\n // declarative page-title-row actions from the current route's `staticData.actions` — `to` navigates\n // via the router; `onClick` is a plain handler. Resolved to the `ActionSet` shape here.\n const navigate = useNavigate()\n const routeActions = useLeafActions()\n const pageActions: PageAction[] = (routeActions ?? []).map((a) => ({\n label: a.label,\n icon: a.icon,\n color: a.color,\n variant: a.variant,\n disabled: a.disabled,\n onClick:\n a.onClick ??\n (a.to\n ? () =>\n navigate({ to: a.to as LinkProps['to'], params: a.params, search: a.search } as never)\n : undefined),\n }))\n\n return (\n <div className={clsx(styles.shell, collapsed && styles.shellCollapsed)}>\n <aside className={styles.sidebar}>\n {/* fixed-width inner: the outer <aside> animates its width to 0 (and clips via overflow),\n while this keeps the sidebar's real width so the content never reflows mid-collapse */}\n <div className={styles.sidebarInner}>\n {logo ? (\n <div className={styles.brand}>\n {logo}\n {/* in-drawer close — only shown when the sidebar overlays (narrow), where the header\n toggle is behind the backdrop; closes the drawer */}\n <IconButton\n variant=\"filled\"\n size=\"sm\"\n className={styles.sidebarClose}\n aria-label={t('common.close')}\n onClick={() => setCollapsed(true)}\n >\n <Icon name=\"Close\" />\n </IconButton>\n </div>\n ) : null}\n {/* the search lives in the header on desktop; below 576px (full-width drawer) it moves here,\n between the logo and the menu (CSS toggles which instance shows) */}\n {showSearch ? (\n <div className={styles.sidebarSearch}>\n <NavSearch />\n </div>\n ) : null}\n <div className={styles.navScroll}>\n <Sidebar />\n </div>\n {sidebarFooter ? <div className={styles.sidebarFooter}>{sidebarFooter}</div> : null}\n </div>\n </aside>\n {/* dim backdrop behind the overlay sidebar — a sibling of the sidebar (same stacking context, so the\n sidebar reliably sits above it, unlike a body-portaled Overlay). Only shown/interactive below\n 1280px while open (CSS); clicking it closes the drawer. On desktop the sidebar is a grid column. */}\n <div className={styles.backdrop} onClick={() => setCollapsed(true)} aria-hidden=\"true\" />\n <div className={styles.main}>\n <header className={clsx(styles.topbar, headerSticky && styles.topbarSticky)}>\n <div className={styles.headerStart}>\n <IconButton\n aria-label={collapsed ? 'Show sidebar' : 'Hide sidebar'}\n aria-expanded={!collapsed}\n variant=\"filled\"\n size=\"sm\"\n onClick={() => setCollapsed((c) => !c)}\n >\n <Icon name=\"Menu\" />\n </IconButton>\n {showSearch ? (\n <div className={styles.headerSearch}>\n <NavSearch />\n </div>\n ) : null}\n </div>\n <div className={styles.headerEnd}>\n {showFullscreen ? <FullscreenToggle variant=\"filled\" size=\"sm\" /> : null}\n {showTheme ? <ThemeToggle variant=\"filled\" size=\"sm\" /> : null}\n {showLanguages && languages.length > 1 ? (\n <Dropdown\n placement=\"bottom-end\"\n trigger={\n <IconButton variant=\"filled\" size=\"sm\" aria-label={t('language.label')}>\n <Icon name=\"Global\" />\n </IconButton>\n }\n >\n {languages.map((l) => (\n <ListItem\n key={l.code}\n clickable\n selected={l.code === language}\n onClick={() => setLanguage(l.code)}\n icon={<Flag code={l.code} />}\n >\n {l.label ?? l.code}\n </ListItem>\n ))}\n </Dropdown>\n ) : null}\n {showSettings ? (\n <IconButton\n aria-label={t('settings.label')}\n variant=\"text\"\n size=\"sm\"\n className={styles.settings}\n onClick={() => setSettingsOpen(true)}\n >\n <Icon name=\"Setting5\" />\n </IconButton>\n ) : null}\n {onLogout ? (\n <Dropdown\n placement=\"bottom-end\"\n style={{ minWidth: 230 }}\n trigger={\n <button type=\"button\" className={styles.account} aria-label={t('account.label')}>\n <Avatar size=\"md\" name={user?.name} src={user?.avatar} color=\"primary\" />\n </button>\n }\n >\n {user ? (\n <>\n <Row gap={8} align=\"center\" padding=\"var(--tz-space-xxs) var(--tz-space-xs)\">\n <Avatar size=\"md\" name={user.name} src={user.avatar} color=\"primary\" />\n <Col gap={2}>\n {/* name, or a \"Welcome\" greeting fallback when no name is given */}\n <Typography variant=\"body\">{user.name ?? t('userCard.welcome')}</Typography>\n {user.email ? (\n <Typography variant=\"bodySmall\" color=\"muted\">\n {user.email}\n </Typography>\n ) : null}\n </Col>\n </Row>\n <Divider />\n </>\n ) : null}\n {/* app-supplied items (e.g. \"Account\"), between the user block and Sign out */}\n {accountMenu.map((item, i) => (\n <ListItem\n key={i}\n icon={item.icon ? <Icon name={item.icon} color={item.color} /> : undefined}\n color={item.color}\n clickable\n disabled={item.disabled}\n onClick={item.onClick}\n >\n {item.label}\n </ListItem>\n ))}\n {/* keep the destructive Sign out visually separated from the custom items */}\n {accountMenu.length > 0 ? <Divider /> : null}\n <ListItem icon={<Icon name=\"Logout2\" color=\"error\" />} clickable onClick={onLogout}>\n {t('userCard.signOut')}\n </ListItem>\n </Dropdown>\n ) : null}\n </div>\n </header>\n <main className={styles.content}>\n {showBreadcrumbs && !isNotFound ? <Breadcrumbs /> : null}\n {showPageTitle && !isNotFound && (title || onBack) ? (\n <div className={styles.pageTitleRow}>\n {onBack ? (\n <IconButton\n aria-label={t('pageTitle.back')}\n variant=\"filled\"\n color=\"accent\"\n className={styles.backButton}\n onClick={onBack}\n size=\"sm\"\n >\n <Icon name=\"ArrowLeft\" />\n </IconButton>\n ) : null}\n {title ? (\n <Typography variant=\"h2\" className={styles.pageTitle}>\n {title}\n </Typography>\n ) : null}\n {/* right-aligned page actions from the route's `staticData.actions` */}\n {pageActions.length > 0 ? (\n <div className={styles.pageActions}>\n <ActionSet actions={pageActions} />\n </div>\n ) : null}\n </div>\n ) : null}\n {children}\n </main>\n </div>\n {toaster !== false && <Toaster {...toasterProps} />}\n {showSettings ? (\n <SettingsDrawer\n open={settingsOpen}\n onClose={() => setSettingsOpen(false)}\n showTheme={showTheme}\n />\n ) : null}\n </div>\n )\n}\n"],"names":["ALT_SWATCHES","SettingsDrawer","open","onClose","showTheme","mode","setMode","accentColors","defaultAccentColors","setAccentColor","headerSticky","setHeaderSticky","fontFamily","setFontFamily","useTheme","useT","fontQuery","setFontQuery","useState","q","base","DEFAULT_FONT_FAMILY","fontOptions","f","picker","label","def","colors","c","jsx","SwatchPicker","color","jsxs","Modal","Fragment","Typography","ChoiceCardGroup","v","Divider","Col","Select","iconNode","icon","Icon","speedDialIcon","a","styles","ActionSet","actions","t","isXs","useMediaQuery","SpeedDial","i","Button","RootLayout","logo","sidebarFooter","header","toaster","children","title","usePageTitle","onBack","usePageBack","language","setLanguage","languages","useLanguage","h","useHeaderConfig","showFullscreen","showSettings","showSearch","showLanguages","showBreadcrumbs","toasterProps","showPageTitle","onLogout","user","accountMenu","isNarrow","collapsed","setCollapsed","useEffect","useLockBodyScroll","pathname","useRouterState","isNotFound","m","settingsOpen","setSettingsOpen","navigate","useNavigate","pageActions","useLeafActions","clsx","IconButton","NavSearch","Sidebar","FullscreenToggle","ThemeToggle","Dropdown","l","ListItem","Flag","Avatar","Row","item","Breadcrumbs","Toaster"],"mappings":"i/BAaMA,GAAmD,CACvD,MAAO,CACL,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,SAAA,EAEF,KAAM,CACJ,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,SAAA,CAEJ,EAyBO,SAASC,GAAe,CAAE,KAAAC,EAAM,QAAAC,EAAS,UAAAC,EAAY,IAA6B,CACvF,KAAM,CACJ,KAAAC,EACA,QAAAC,EACA,aAAAC,EACA,oBAAAC,EACA,eAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,WAAAC,EACA,cAAAC,CAAA,EACEC,WAAA,EACE,EAAIC,EAAAA,KAAA,EAMJ,CAACC,EAAWC,CAAY,EAAIC,EAAAA,SAAS,EAAE,EACvCC,EAAIH,EAAU,KAAA,EACdI,EACJR,IAAeS,EAAAA,oBAAsB,CAACA,EAAAA,oBAAqBT,CAAU,EAAI,CAACS,qBAAmB,EAEzFC,GADYH,EAAE,OAAS,GAAK,CAACC,EAAK,KAAMG,GAAMA,EAAE,YAAA,IAAkBJ,EAAE,aAAa,EACtD,CAACA,EAAG,GAAGC,CAAI,EAAIA,GAAM,I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