@techzyapp/ui-library 1.0.32 → 1.0.33
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-CwUHa2us.js +107 -0
- package/dist/AdminRoot-CwUHa2us.js.map +1 -0
- package/dist/AdminRoot-cjP_Ad4r.cjs +2 -0
- package/dist/AdminRoot-cjP_Ad4r.cjs.map +1 -0
- package/dist/{Alert-B9l1VhIr.cjs → Alert-CfjDmLR8.cjs} +2 -2
- package/dist/{Alert-B9l1VhIr.cjs.map → Alert-CfjDmLR8.cjs.map} +1 -1
- package/dist/{Alert-B7w9xD2p.js → Alert-LJDrtkJy.js} +3 -3
- package/dist/{Alert-B7w9xD2p.js.map → Alert-LJDrtkJy.js.map} +1 -1
- package/dist/{Breadcrumbs-B1JMwCjO.cjs → Breadcrumbs-COb2zmDk.cjs} +2 -2
- package/dist/{Breadcrumbs-B1JMwCjO.cjs.map → Breadcrumbs-COb2zmDk.cjs.map} +1 -1
- package/dist/{Breadcrumbs-Cl1CgKkk.js → Breadcrumbs-DYeVrOns.js} +3 -3
- package/dist/{Breadcrumbs-Cl1CgKkk.js.map → Breadcrumbs-DYeVrOns.js.map} +1 -1
- package/dist/{Button-BZq1mIUH.cjs → Button-BD5wpg-t.cjs} +2 -2
- package/dist/{Button-BZq1mIUH.cjs.map → Button-BD5wpg-t.cjs.map} +1 -1
- package/dist/{Button-BJ5Xd10u.js → Button-PBZnkRNn.js} +2 -2
- package/dist/{Button-BJ5Xd10u.js.map → Button-PBZnkRNn.js.map} +1 -1
- package/dist/{Calendar-r-dDXWEp.cjs → Calendar-842vjtdN.cjs} +2 -2
- package/dist/{Calendar-r-dDXWEp.cjs.map → Calendar-842vjtdN.cjs.map} +1 -1
- package/dist/{Calendar-rRPnaU9M.js → Calendar-Bb5Ekbpr.js} +3 -3
- package/dist/{Calendar-rRPnaU9M.js.map → Calendar-Bb5Ekbpr.js.map} +1 -1
- package/dist/{Card-Cr3D2bzJ.js → Card-CV_rHego.js} +2 -2
- package/dist/{Card-Cr3D2bzJ.js.map → Card-CV_rHego.js.map} +1 -1
- package/dist/{Card-KsczbH5c.cjs → Card-DL7XnkOA.cjs} +2 -2
- package/dist/{Card-KsczbH5c.cjs.map → Card-DL7XnkOA.cjs.map} +1 -1
- package/dist/{Chip-BZ3I4Lbe.cjs → Chip-CLPIPC9a.cjs} +2 -2
- package/dist/{Chip-BZ3I4Lbe.cjs.map → Chip-CLPIPC9a.cjs.map} +1 -1
- package/dist/{Chip-DEp1zWh1.js → Chip-DdOUVF0Z.js} +2 -2
- package/dist/{Chip-DEp1zWh1.js.map → Chip-DdOUVF0Z.js.map} +1 -1
- package/dist/{CodeBlock-CMHqvoBJ.js → CodeBlock-B35NXZzd.js} +3 -3
- package/dist/{CodeBlock-CMHqvoBJ.js.map → CodeBlock-B35NXZzd.js.map} +1 -1
- package/dist/{CodeBlock-DIkyeG4S.cjs → CodeBlock-C0dbyxcl.cjs} +2 -2
- package/dist/{CodeBlock-DIkyeG4S.cjs.map → CodeBlock-C0dbyxcl.cjs.map} +1 -1
- package/dist/{ColorPicker-5SMyU5oh.js → ColorPicker-6UraVYFy.js} +3 -3
- package/dist/{ColorPicker-5SMyU5oh.js.map → ColorPicker-6UraVYFy.js.map} +1 -1
- package/dist/{ColorPicker-B1riGs1z.cjs → ColorPicker-DmLGKaYF.cjs} +2 -2
- package/dist/{ColorPicker-B1riGs1z.cjs.map → ColorPicker-DmLGKaYF.cjs.map} +1 -1
- package/dist/{ColorPickerPanel-4Y6oXL7v.js → ColorPickerPanel-DZ-W_wOI.js} +2 -2
- package/dist/{ColorPickerPanel-4Y6oXL7v.js.map → ColorPickerPanel-DZ-W_wOI.js.map} +1 -1
- package/dist/{ColorPickerPanel-CzBlh0zw.cjs → ColorPickerPanel-WuxwwfCI.cjs} +2 -2
- package/dist/{ColorPickerPanel-CzBlh0zw.cjs.map → ColorPickerPanel-WuxwwfCI.cjs.map} +1 -1
- package/dist/{ColorRamp-Qc8ZtPDh.js → ColorRamp-CSqzzHZx.js} +2 -2
- package/dist/{ColorRamp-Qc8ZtPDh.js.map → ColorRamp-CSqzzHZx.js.map} +1 -1
- package/dist/{ColorRamp-D_h-hp7n.cjs → ColorRamp-D_9gsqJl.cjs} +2 -2
- package/dist/{ColorRamp-D_h-hp7n.cjs.map → ColorRamp-D_9gsqJl.cjs.map} +1 -1
- package/dist/{ConfigProvider-CzAQf_d_.cjs → ConfigProvider-CVLHPXQm.cjs} +2 -2
- package/dist/ConfigProvider-CVLHPXQm.cjs.map +1 -0
- package/dist/{ConfigProvider-D2svpXFu.js → ConfigProvider-tvLbKiqu.js} +2 -2
- package/dist/ConfigProvider-tvLbKiqu.js.map +1 -0
- package/dist/{CopyButton-DUtx2-Gi.cjs → CopyButton-0w4OToIy.cjs} +2 -2
- package/dist/{CopyButton-DUtx2-Gi.cjs.map → CopyButton-0w4OToIy.cjs.map} +1 -1
- package/dist/{CopyButton-BNcW9-KU.js → CopyButton-B_mYxcXV.js} +3 -3
- package/dist/{CopyButton-BNcW9-KU.js.map → CopyButton-B_mYxcXV.js.map} +1 -1
- package/dist/{DatePicker-D2PyGdec.js → DatePicker-Bt-M87zX.js} +4 -4
- package/dist/{DatePicker-D2PyGdec.js.map → DatePicker-Bt-M87zX.js.map} +1 -1
- package/dist/{DatePicker-D_PqDvKt.cjs → DatePicker-D1uFIm3M.cjs} +2 -2
- package/dist/{DatePicker-D_PqDvKt.cjs.map → DatePicker-D1uFIm3M.cjs.map} +1 -1
- package/dist/{DateTimePicker-C3Kq5hKE.cjs → DateTimePicker-DPt-LDVJ.cjs} +2 -2
- package/dist/{DateTimePicker-C3Kq5hKE.cjs.map → DateTimePicker-DPt-LDVJ.cjs.map} +1 -1
- package/dist/{DateTimePicker-DdXFzqO_.js → DateTimePicker-zJUc9crs.js} +7 -7
- package/dist/{DateTimePicker-DdXFzqO_.js.map → DateTimePicker-zJUc9crs.js.map} +1 -1
- package/dist/{DescriptionList-DxRgKNEJ.js → DescriptionList-BLx9NfAW.js} +4 -4
- package/dist/{DescriptionList-DxRgKNEJ.js.map → DescriptionList-BLx9NfAW.js.map} +1 -1
- package/dist/{DescriptionList-C7AOcw_2.cjs → DescriptionList-CPCbzU9b.cjs} +2 -2
- package/dist/{DescriptionList-C7AOcw_2.cjs.map → DescriptionList-CPCbzU9b.cjs.map} +1 -1
- package/dist/{EmptyState-CvpKSYY4.js → EmptyState-BEVEGcLx.js} +2 -2
- package/dist/{EmptyState-CvpKSYY4.js.map → EmptyState-BEVEGcLx.js.map} +1 -1
- package/dist/{EmptyState-ECc6e_En.cjs → EmptyState-C54C0Qwc.cjs} +2 -2
- package/dist/{EmptyState-ECc6e_En.cjs.map → EmptyState-C54C0Qwc.cjs.map} +1 -1
- package/dist/ErrorBoundary-8iu-mR5Y.cjs +2 -0
- package/dist/ErrorBoundary-8iu-mR5Y.cjs.map +1 -0
- package/dist/ErrorBoundary-BSJL381Y.js +49 -0
- package/dist/ErrorBoundary-BSJL381Y.js.map +1 -0
- package/dist/ErrorState-BXMjBWav.cjs +4 -0
- package/dist/ErrorState-BXMjBWav.cjs.map +1 -0
- package/dist/ErrorState-DKhZ4aJh.js +142 -0
- package/dist/ErrorState-DKhZ4aJh.js.map +1 -0
- package/dist/{FileCard-Bjqsgi7S.cjs → FileCard-B3dfdTVN.cjs} +2 -2
- package/dist/{FileCard-Bjqsgi7S.cjs.map → FileCard-B3dfdTVN.cjs.map} +1 -1
- package/dist/{FileCard-D4t0-ms2.js → FileCard-R_sB8Qbx.js} +3 -3
- package/dist/{FileCard-D4t0-ms2.js.map → FileCard-R_sB8Qbx.js.map} +1 -1
- package/dist/{FileUploader-DWM8WrY6.cjs → FileUploader-4UMy0urx.cjs} +2 -2
- package/dist/{FileUploader-DWM8WrY6.cjs.map → FileUploader-4UMy0urx.cjs.map} +1 -1
- package/dist/{FileUploader-DdcvZoUb.js → FileUploader-B55atuxq.js} +5 -5
- package/dist/{FileUploader-DdcvZoUb.js.map → FileUploader-B55atuxq.js.map} +1 -1
- package/dist/{Flag-D5rqScYG.cjs → Flag-CFvJHC0u.cjs} +2 -2
- package/dist/{Flag-D5rqScYG.cjs.map → Flag-CFvJHC0u.cjs.map} +1 -1
- package/dist/{Flag-BLEBMdb-.js → Flag-D7fmMqqy.js} +2 -2
- package/dist/{Flag-BLEBMdb-.js.map → Flag-D7fmMqqy.js.map} +1 -1
- package/dist/{FullscreenToggle-DZnKK1Lj.js → FullscreenToggle-CXmPqxJv.js} +3 -3
- package/dist/{FullscreenToggle-DZnKK1Lj.js.map → FullscreenToggle-CXmPqxJv.js.map} +1 -1
- package/dist/{FullscreenToggle-CZoc5pYg.cjs → FullscreenToggle-D7tUPCNI.cjs} +2 -2
- package/dist/{FullscreenToggle-CZoc5pYg.cjs.map → FullscreenToggle-D7tUPCNI.cjs.map} +1 -1
- package/dist/{IconButton-V8tjArlt.cjs → IconButton-BVrO9TBP.cjs} +2 -2
- package/dist/{IconButton-V8tjArlt.cjs.map → IconButton-BVrO9TBP.cjs.map} +1 -1
- package/dist/{IconButton-CqFgam3J.js → IconButton-sC_E_TXd.js} +2 -2
- package/dist/{IconButton-CqFgam3J.js.map → IconButton-sC_E_TXd.js.map} +1 -1
- package/dist/{Loader-Bsz0BkGr.js → Loader-ChrouvaR.js} +2 -2
- package/dist/{Loader-Bsz0BkGr.js.map → Loader-ChrouvaR.js.map} +1 -1
- package/dist/{Loader-CqRaCdzF.cjs → Loader-DNCEHqZb.cjs} +2 -2
- package/dist/{Loader-CqRaCdzF.cjs.map → Loader-DNCEHqZb.cjs.map} +1 -1
- package/dist/{LocationPicker-BRGNcTd_.cjs → LocationPicker-CJ6bCJC4.cjs} +2 -2
- package/dist/{LocationPicker-BRGNcTd_.cjs.map → LocationPicker-CJ6bCJC4.cjs.map} +1 -1
- package/dist/{LocationPicker-DtMDpPFZ.js → LocationPicker-DxiQ27k6.js} +6 -6
- package/dist/{LocationPicker-DtMDpPFZ.js.map → LocationPicker-DxiQ27k6.js.map} +1 -1
- package/dist/{Modal-CcrqM4kn.cjs → Modal-BL_XihC8.cjs} +2 -2
- package/dist/{Modal-CcrqM4kn.cjs.map → Modal-BL_XihC8.cjs.map} +1 -1
- package/dist/{Modal-DCee1a9m.js → Modal-Do8pzyMl.js} +3 -3
- package/dist/{Modal-DCee1a9m.js.map → Modal-Do8pzyMl.js.map} +1 -1
- package/dist/{MultiSelect-JQ6iKHyI.js → MultiSelect-BfsEdXNa.js} +4 -4
- package/dist/{MultiSelect-JQ6iKHyI.js.map → MultiSelect-BfsEdXNa.js.map} +1 -1
- package/dist/{MultiSelect-BJ-qMpA5.cjs → MultiSelect-WS5YNGRD.cjs} +2 -2
- package/dist/{MultiSelect-BJ-qMpA5.cjs.map → MultiSelect-WS5YNGRD.cjs.map} +1 -1
- package/dist/{NumberField-mZjwZB8E.cjs → NumberField-CxiEfRAi.cjs} +2 -2
- package/dist/{NumberField-mZjwZB8E.cjs.map → NumberField-CxiEfRAi.cjs.map} +1 -1
- package/dist/{NumberField-Bf-vDNLy.js → NumberField-P68n6q5m.js} +3 -3
- package/dist/{NumberField-Bf-vDNLy.js.map → NumberField-P68n6q5m.js.map} +1 -1
- package/dist/{OtpField-DaAIBp6C.js → OtpField-DjTJH4Kh.js} +2 -2
- package/dist/{OtpField-DaAIBp6C.js.map → OtpField-DjTJH4Kh.js.map} +1 -1
- package/dist/{OtpField-TdjMkgQi.cjs → OtpField-XieJfl1y.cjs} +2 -2
- package/dist/{OtpField-TdjMkgQi.cjs.map → OtpField-XieJfl1y.cjs.map} +1 -1
- package/dist/PageError-ClR7k0Zb.js +69 -0
- package/dist/PageError-ClR7k0Zb.js.map +1 -0
- package/dist/PageError-D7_Q8wz8.cjs +2 -0
- package/dist/PageError-D7_Q8wz8.cjs.map +1 -0
- package/dist/{PageLayout-BoHvt2cT.cjs → PageLayout-DTG83hLL.cjs} +2 -2
- package/dist/{PageLayout-BoHvt2cT.cjs.map → PageLayout-DTG83hLL.cjs.map} +1 -1
- package/dist/{PageLayout-Bwv8Oohb.js → PageLayout-XQ_aQTf5.js} +2 -2
- package/dist/{PageLayout-Bwv8Oohb.js.map → PageLayout-XQ_aQTf5.js.map} +1 -1
- package/dist/PageNotFound-CpwHMTxG.js +24 -0
- package/dist/PageNotFound-CpwHMTxG.js.map +1 -0
- package/dist/PageNotFound-D3wJ4Job.cjs +2 -0
- package/dist/PageNotFound-D3wJ4Job.cjs.map +1 -0
- package/dist/{Pagination-DzkTjEZL.cjs → Pagination-BF8cmQMi.cjs} +2 -2
- package/dist/{Pagination-DzkTjEZL.cjs.map → Pagination-BF8cmQMi.cjs.map} +1 -1
- package/dist/{Pagination-C0xr3D-g.js → Pagination-Df-F9i2o.js} +2 -2
- package/dist/{Pagination-C0xr3D-g.js.map → Pagination-Df-F9i2o.js.map} +1 -1
- package/dist/{PaletteField-CQV2dll0.cjs → PaletteField-BFRPv7AC.cjs} +2 -2
- package/dist/{PaletteField-CQV2dll0.cjs.map → PaletteField-BFRPv7AC.cjs.map} +1 -1
- package/dist/{PaletteField-CQv6MBKe.js → PaletteField-DUu4jz1c.js} +3 -3
- package/dist/{PaletteField-CQv6MBKe.js.map → PaletteField-DUu4jz1c.js.map} +1 -1
- package/dist/{PhoneField-Bqj5-33G.js → PhoneField-CXIQX_hR.js} +4 -4
- package/dist/{PhoneField-Bqj5-33G.js.map → PhoneField-CXIQX_hR.js.map} +1 -1
- package/dist/{PhoneField-Dzdm5hfY.cjs → PhoneField-O5syyH7u.cjs} +2 -2
- package/dist/{PhoneField-Dzdm5hfY.cjs.map → PhoneField-O5syyH7u.cjs.map} +1 -1
- package/dist/{Popconfirm-CYkwGTh-.js → Popconfirm-D4J7tlk_.js} +3 -3
- package/dist/{Popconfirm-CYkwGTh-.js.map → Popconfirm-D4J7tlk_.js.map} +1 -1
- package/dist/{Popconfirm-DS6tCxV0.cjs → Popconfirm-bEoOPmZY.cjs} +2 -2
- package/dist/{Popconfirm-DS6tCxV0.cjs.map → Popconfirm-bEoOPmZY.cjs.map} +1 -1
- package/dist/{Progress-DZUtn3Sh.js → Progress-BxvqmmGS.js} +2 -2
- package/dist/{Progress-DZUtn3Sh.js.map → Progress-BxvqmmGS.js.map} +1 -1
- package/dist/{Progress-lf9vIKIk.cjs → Progress-CqXX0rRp.cjs} +2 -2
- package/dist/{Progress-lf9vIKIk.cjs.map → Progress-CqXX0rRp.cjs.map} +1 -1
- package/dist/{RemoveDialog-DaWh4xmW.js → RemoveDialog-DH3eNUxC.js} +5 -5
- package/dist/{RemoveDialog-DaWh4xmW.js.map → RemoveDialog-DH3eNUxC.js.map} +1 -1
- package/dist/{RemoveDialog-Csfhv9ve.cjs → RemoveDialog-FrieNcjL.cjs} +2 -2
- package/dist/{RemoveDialog-Csfhv9ve.cjs.map → RemoveDialog-FrieNcjL.cjs.map} +1 -1
- package/dist/{RichTextEditor-BLEDQq2H.js → RichTextEditor-6frB2C5G.js} +7 -7
- package/dist/{RichTextEditor-BLEDQq2H.js.map → RichTextEditor-6frB2C5G.js.map} +1 -1
- package/dist/{RichTextEditor-Eo8uLXlI.cjs → RichTextEditor-B-C4NPDk.cjs} +2 -2
- package/dist/{RichTextEditor-Eo8uLXlI.cjs.map → RichTextEditor-B-C4NPDk.cjs.map} +1 -1
- package/dist/{RootLayout-D-ZlsTXF.js → RootLayout-C7n79JjM.js} +219 -202
- package/dist/RootLayout-C7n79JjM.js.map +1 -0
- package/dist/RootLayout-CtkpgPGV.cjs +2 -0
- package/dist/RootLayout-CtkpgPGV.cjs.map +1 -0
- package/dist/{Select-CH3mF6y1.cjs → Select-Bjq_p8_e.cjs} +2 -2
- package/dist/{Select-CH3mF6y1.cjs.map → Select-Bjq_p8_e.cjs.map} +1 -1
- package/dist/{Select-C0UBQXhg.js → Select-DO3zDQYV.js} +3 -3
- package/dist/{Select-C0UBQXhg.js.map → Select-DO3zDQYV.js.map} +1 -1
- package/dist/{Sidebar-6wu2fuPT.cjs → Sidebar-2oH285Xs.cjs} +2 -2
- package/dist/{Sidebar-6wu2fuPT.cjs.map → Sidebar-2oH285Xs.cjs.map} +1 -1
- package/dist/{Sidebar--rOPtrqa.js → Sidebar-CKbSWc5q.js} +3 -3
- package/dist/{Sidebar--rOPtrqa.js.map → Sidebar-CKbSWc5q.js.map} +1 -1
- package/dist/{SpeedDial-BIodC6td.js → SpeedDial-BZK-z_r9.js} +2 -2
- package/dist/{SpeedDial-BIodC6td.js.map → SpeedDial-BZK-z_r9.js.map} +1 -1
- package/dist/{SpeedDial-BtxXH6Ij.cjs → SpeedDial-KGf8b4Gq.cjs} +2 -2
- package/dist/{SpeedDial-BtxXH6Ij.cjs.map → SpeedDial-KGf8b4Gq.cjs.map} +1 -1
- package/dist/{Stepper-CPBPTxbP.js → Stepper-BI3pjWf_.js} +2 -2
- package/dist/{Stepper-CPBPTxbP.js.map → Stepper-BI3pjWf_.js.map} +1 -1
- package/dist/{Stepper-B38I8PBS.cjs → Stepper-s9Vah5R2.cjs} +2 -2
- package/dist/{Stepper-B38I8PBS.cjs.map → Stepper-s9Vah5R2.cjs.map} +1 -1
- package/dist/Table-CLjLsYYS.cjs +2 -0
- package/dist/Table-CLjLsYYS.cjs.map +1 -0
- package/dist/{Table-BV-dr36o.js → Table-PsNnKn_j.js} +153 -152
- package/dist/Table-PsNnKn_j.js.map +1 -0
- package/dist/{Tabs-RjyUkLTB.js → Tabs-B2WzlRXI.js} +2 -2
- package/dist/{Tabs-RjyUkLTB.js.map → Tabs-B2WzlRXI.js.map} +1 -1
- package/dist/{Tabs-DIs8iFA-.cjs → Tabs-DQoNP0QT.cjs} +2 -2
- package/dist/{Tabs-DIs8iFA-.cjs.map → Tabs-DQoNP0QT.cjs.map} +1 -1
- package/dist/{TagsField-CJ10-kFr.cjs → TagsField-CLfAAz4N.cjs} +2 -2
- package/dist/{TagsField-CJ10-kFr.cjs.map → TagsField-CLfAAz4N.cjs.map} +1 -1
- package/dist/{TagsField-B3MtFiFs.js → TagsField-pdvQU4zh.js} +4 -4
- package/dist/{TagsField-B3MtFiFs.js.map → TagsField-pdvQU4zh.js.map} +1 -1
- package/dist/{TextField-D_hzd5Gf.cjs → TextField-CgPfN-4d.cjs} +2 -2
- package/dist/{TextField-D_hzd5Gf.cjs.map → TextField-CgPfN-4d.cjs.map} +1 -1
- package/dist/{TextField-CInaL0FR.js → TextField-LONfx4jy.js} +3 -3
- package/dist/{TextField-CInaL0FR.js.map → TextField-LONfx4jy.js.map} +1 -1
- package/dist/{ThemeToggle-DkhhlH_r.cjs → ThemeToggle-9RBaRALj.cjs} +2 -2
- package/dist/{ThemeToggle-DkhhlH_r.cjs.map → ThemeToggle-9RBaRALj.cjs.map} +1 -1
- package/dist/{ThemeToggle-CWfuK0tZ.js → ThemeToggle-DTkFppOd.js} +3 -3
- package/dist/{ThemeToggle-CWfuK0tZ.js.map → ThemeToggle-DTkFppOd.js.map} +1 -1
- package/dist/{TimeColumns-fD6dosYP.js → TimeColumns-B7af5Cbj.js} +2 -2
- package/dist/{TimeColumns-fD6dosYP.js.map → TimeColumns-B7af5Cbj.js.map} +1 -1
- package/dist/{TimeColumns-t3Pn01v5.cjs → TimeColumns-CJ13uf3K.cjs} +2 -2
- package/dist/{TimeColumns-t3Pn01v5.cjs.map → TimeColumns-CJ13uf3K.cjs.map} +1 -1
- package/dist/{TimePicker-DypTHDW0.js → TimePicker-BitZ7wv-.js} +5 -5
- package/dist/{TimePicker-DypTHDW0.js.map → TimePicker-BitZ7wv-.js.map} +1 -1
- package/dist/{TimePicker-DOwQF7sX.cjs → TimePicker-Dshko7IJ.cjs} +2 -2
- package/dist/{TimePicker-DOwQF7sX.cjs.map → TimePicker-Dshko7IJ.cjs.map} +1 -1
- package/dist/{Toaster-DdUOwi7L.cjs → Toaster-8ynQTcc0.cjs} +2 -2
- package/dist/{Toaster-DdUOwi7L.cjs.map → Toaster-8ynQTcc0.cjs.map} +1 -1
- package/dist/{Toaster-BwNAKDMc.js → Toaster-CYVETXVZ.js} +2 -2
- package/dist/{Toaster-BwNAKDMc.js.map → Toaster-CYVETXVZ.js.map} +1 -1
- package/dist/{TranslatedFields-D9FQlxiQ.cjs → TranslatedFields-BKI3jrNd.cjs} +2 -2
- package/dist/{TranslatedFields-D9FQlxiQ.cjs.map → TranslatedFields-BKI3jrNd.cjs.map} +1 -1
- package/dist/{TranslatedFields-C_-qPixE.js → TranslatedFields-dmb-0Yn7.js} +5 -5
- package/dist/{TranslatedFields-C_-qPixE.js.map → TranslatedFields-dmb-0Yn7.js.map} +1 -1
- package/dist/{UserCard-C-q2s2Cw.cjs → UserCard-ah6K1y0H.cjs} +2 -2
- package/dist/{UserCard-C-q2s2Cw.cjs.map → UserCard-ah6K1y0H.cjs.map} +1 -1
- package/dist/{UserCard-CwWv0HXD.js → UserCard-pEJZqiDF.js} +3 -3
- package/dist/{UserCard-CwWv0HXD.js.map → UserCard-pEJZqiDF.js.map} +1 -1
- package/dist/app/AdminRoot.d.cts +75 -4
- package/dist/app/AdminRoot.d.ts +75 -4
- package/dist/components/Alert/index.cjs +1 -1
- package/dist/components/Alert/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/ColorRamp/index.cjs +1 -1
- package/dist/components/ColorRamp/index.js +1 -1
- package/dist/components/CopyButton/index.cjs +1 -1
- package/dist/components/CopyButton/index.js +1 -1
- package/dist/components/DatePicker/index.cjs +1 -1
- package/dist/components/DatePicker/index.js +1 -1
- package/dist/components/DateTimePicker/index.cjs +1 -1
- package/dist/components/DateTimePicker/index.js +1 -1
- package/dist/components/DescriptionList/index.cjs +1 -1
- package/dist/components/DescriptionList/index.js +1 -1
- package/dist/components/EmptyState/index.cjs +1 -1
- package/dist/components/EmptyState/index.js +1 -1
- package/dist/components/ErrorState/ErrorBoundary.d.cts +3 -3
- package/dist/components/ErrorState/ErrorBoundary.d.ts +3 -3
- package/dist/components/ErrorState/ErrorState.d.cts +37 -9
- package/dist/components/ErrorState/ErrorState.d.ts +37 -9
- package/dist/components/ErrorState/errorMessage.d.cts +35 -3
- package/dist/components/ErrorState/errorMessage.d.ts +35 -3
- package/dist/components/ErrorState/index.cjs +1 -1
- package/dist/components/ErrorState/index.d.cts +2 -2
- package/dist/components/ErrorState/index.d.ts +2 -2
- package/dist/components/ErrorState/index.js +15 -10
- package/dist/components/ErrorState/index.js.map +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/LocationPicker/index.cjs +1 -1
- package/dist/components/LocationPicker/index.js +1 -1
- package/dist/components/Modal/index.cjs +1 -1
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.cts +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts +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/OptionMenu/OptionMenu.d.cts +1 -1
- package/dist/components/OptionMenu/OptionMenu.d.ts +1 -1
- package/dist/components/OtpField/index.cjs +1 -1
- package/dist/components/OtpField/index.js +1 -1
- package/dist/components/PageError/PageError.d.cts +53 -0
- package/dist/components/PageError/PageError.d.ts +53 -0
- package/dist/components/PageError/index.cjs +2 -0
- package/dist/components/PageError/index.cjs.map +1 -0
- package/dist/components/PageError/index.d.cts +2 -0
- package/dist/components/PageError/index.d.ts +2 -0
- package/dist/components/PageError/index.js +6 -0
- package/dist/components/PageError/index.js.map +1 -0
- 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/PageNotFound/useHomeTo.d.cts +10 -0
- package/dist/components/PageNotFound/useHomeTo.d.ts +10 -0
- package/dist/components/Pagination/index.cjs +1 -1
- package/dist/components/Pagination/index.js +1 -1
- package/dist/components/PaletteField/index.cjs +1 -1
- package/dist/components/PaletteField/index.js +1 -1
- package/dist/components/PhoneField/index.cjs +1 -1
- package/dist/components/PhoneField/index.js +1 -1
- package/dist/components/Popconfirm/index.cjs +1 -1
- package/dist/components/Popconfirm/index.js +1 -1
- package/dist/components/Progress/index.cjs +1 -1
- package/dist/components/Progress/index.js +1 -1
- package/dist/components/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/index.cjs +1 -1
- package/dist/components/RootLayout/index.js +1 -1
- package/dist/components/Select/Select.d.cts +1 -1
- package/dist/components/Select/Select.d.ts +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/Table.d.cts +1 -1
- package/dist/components/Table/Table.d.ts +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/TagsField.d.cts +1 -1
- package/dist/components/TagsField/TagsField.d.ts +1 -1
- package/dist/components/TagsField/index.cjs +1 -1
- package/dist/components/TagsField/index.js +1 -1
- package/dist/components/TextField/TextField.d.cts +1 -1
- package/dist/components/TextField/TextField.d.ts +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/UserCard.d.cts +1 -1
- package/dist/components/UserCard/UserCard.d.ts +1 -1
- package/dist/components/UserCard/index.cjs +1 -1
- package/dist/components/UserCard/index.js +1 -1
- package/dist/components/index.d.cts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/entries/app.cjs +1 -1
- package/dist/entries/app.d.cts +1 -1
- package/dist/entries/app.d.ts +1 -1
- package/dist/entries/app.js +1 -1
- package/dist/entries/components.cjs +1 -1
- package/dist/entries/components.js +166 -159
- package/dist/entries/components.js.map +1 -1
- package/dist/entries/i18n.cjs +1 -1
- package/dist/entries/i18n.js +2 -2
- package/dist/entries/theme.cjs +1 -1
- package/dist/entries/theme.js +1 -1
- package/dist/errorMessage-C7N4KvUS.cjs +2 -0
- package/dist/errorMessage-C7N4KvUS.cjs.map +1 -0
- package/dist/errorMessage-C83fB2h5.js +98 -0
- package/dist/errorMessage-C83fB2h5.js.map +1 -0
- package/dist/i18n/messages.d.cts +15 -1
- package/dist/i18n/messages.d.ts +15 -1
- package/dist/index.cjs +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +212 -205
- package/dist/index.js.map +1 -1
- package/dist/{messages-BOJsnD0O.js → messages-C1eTrGJy.js} +128 -79
- package/dist/messages-C1eTrGJy.js.map +1 -0
- package/dist/messages-DCr7iFmv.cjs +36 -0
- package/dist/messages-DCr7iFmv.cjs.map +1 -0
- package/dist/theme/ConfigProvider.d.cts +17 -3
- package/dist/theme/ConfigProvider.d.ts +17 -3
- package/dist/useHomeTo-Cr6Usr_D.cjs +2 -0
- package/dist/useHomeTo-Cr6Usr_D.cjs.map +1 -0
- package/dist/useHomeTo-yTXajO22.js +25 -0
- package/dist/useHomeTo-yTXajO22.js.map +1 -0
- package/dist/{useOptionMenu-8hjCTNL4.cjs → useOptionMenu-DHGSbQmS.cjs} +2 -2
- package/dist/{useOptionMenu-8hjCTNL4.cjs.map → useOptionMenu-DHGSbQmS.cjs.map} +1 -1
- package/dist/{useOptionMenu-C1wOZ9NT.js → useOptionMenu-DK0ixg-p.js} +3 -3
- package/dist/{useOptionMenu-C1wOZ9NT.js.map → useOptionMenu-DK0ixg-p.js.map} +1 -1
- package/package.json +1 -1
- package/dist/AdminRoot-B9A4Hoz0.js +0 -57
- package/dist/AdminRoot-B9A4Hoz0.js.map +0 -1
- package/dist/AdminRoot-BVUEWczU.cjs +0 -2
- package/dist/AdminRoot-BVUEWczU.cjs.map +0 -1
- package/dist/ConfigProvider-CzAQf_d_.cjs.map +0 -1
- package/dist/ConfigProvider-D2svpXFu.js.map +0 -1
- package/dist/ErrorBoundary-CJx5E9wJ.js +0 -163
- package/dist/ErrorBoundary-CJx5E9wJ.js.map +0 -1
- package/dist/ErrorBoundary-DbKRtdgS.cjs +0 -2
- package/dist/ErrorBoundary-DbKRtdgS.cjs.map +0 -1
- package/dist/PageNotFound-CMt8vnky.js +0 -39
- package/dist/PageNotFound-CMt8vnky.js.map +0 -1
- package/dist/PageNotFound-DDm6nwQh.cjs +0 -2
- package/dist/PageNotFound-DDm6nwQh.cjs.map +0 -1
- package/dist/QueryError-Dl8yzdxw.js +0 -19
- package/dist/QueryError-Dl8yzdxw.js.map +0 -1
- package/dist/QueryError-RF7Mh5zg.cjs +0 -2
- package/dist/QueryError-RF7Mh5zg.cjs.map +0 -1
- package/dist/RootLayout-BvyeNM9_.cjs +0 -2
- package/dist/RootLayout-BvyeNM9_.cjs.map +0 -1
- package/dist/RootLayout-D-ZlsTXF.js.map +0 -1
- package/dist/Table-1RVWzyS6.cjs +0 -2
- package/dist/Table-1RVWzyS6.cjs.map +0 -1
- package/dist/Table-BV-dr36o.js.map +0 -1
- package/dist/messages-BOJsnD0O.js.map +0 -1
- package/dist/messages-ejfYfHwL.cjs +0 -36
- package/dist/messages-ejfYfHwL.cjs.map +0 -1
package/dist/app/AdminRoot.d.cts
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import { type ErrorBoundaryProps, type RootLayoutHeader, type RootLayoutProps } from '../components';
|
|
2
|
+
import { type ErrorBoundaryProps, type IconName, type RootLayoutHeader, type RootLayoutProps } from '../components';
|
|
3
|
+
import { type ThemeColor } from '../theme';
|
|
4
|
+
/** Why the session can't be used — see `AdminRootUnavailable.reason`. */
|
|
5
|
+
export type AdminRootUnavailableReason = 'forbidden' | 'unreachable';
|
|
6
|
+
/** The `unavailable` state of `AdminRoot` — the session could not be checked, or may not be used here. */
|
|
7
|
+
export interface AdminRootUnavailable {
|
|
8
|
+
/** What failed — passed to `QueryError` (message, trace id). */
|
|
9
|
+
error: unknown;
|
|
10
|
+
/**
|
|
11
|
+
* Why. `'forbidden'` = a valid session this panel may not use (no retry, only Sign Out).
|
|
12
|
+
* `'unreachable'` = the check itself failed (Try Again + Sign Out). Defaults to `'forbidden'` when the
|
|
13
|
+
* error carries HTTP status 403 (`error.status` or `error.response.status`), else `'unreachable'`.
|
|
14
|
+
*/
|
|
15
|
+
reason?: AdminRootUnavailableReason;
|
|
16
|
+
/** Re-runs the session check. Shown as "Try Again" for `'unreachable'` only. */
|
|
17
|
+
onRetry?: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* The `AuthLayout` icon. Default: none — apps differ here (one shows a tinted `CloudCross`, another keeps
|
|
20
|
+
* every auth page icon-free), so it's the app's choice.
|
|
21
|
+
*/
|
|
22
|
+
icon?: IconName | false;
|
|
23
|
+
/** Tint for `icon` (`AuthLayout`'s `color`). Default `'error'`. */
|
|
24
|
+
color?: ThemeColor;
|
|
25
|
+
}
|
|
26
|
+
/** What an `unavailableFallback` receives. */
|
|
27
|
+
export interface AdminRootUnavailableFallbackProps {
|
|
28
|
+
/** The `unavailable.error`. */
|
|
29
|
+
error: unknown;
|
|
30
|
+
/** The resolved reason (explicit, or inferred from a 403). */
|
|
31
|
+
reason: AdminRootUnavailableReason;
|
|
32
|
+
/** `unavailable.onRetry`, when given — whatever the reason (the fallback decides whether to offer it). */
|
|
33
|
+
retry?: () => void;
|
|
34
|
+
/** The shell's Sign Out: `onLogout()`, then navigate to `loginPath`. */
|
|
35
|
+
signOut: () => void;
|
|
36
|
+
}
|
|
3
37
|
/** The minimal user shape `AdminRoot` reads — apps pass their own richer type via the generic. */
|
|
4
38
|
export interface AdminUser {
|
|
5
39
|
name?: string;
|
|
@@ -32,9 +66,31 @@ export interface AdminRootProps<U extends AdminUser = AdminUser> {
|
|
|
32
66
|
/**
|
|
33
67
|
* Wrap the page content in an `ErrorBoundary` (reset on navigation), so a crashing page shows an
|
|
34
68
|
* `ErrorState` inside the shell instead of a white screen. Default `true`; `false` opts out; an object
|
|
35
|
-
* configures it (e.g. `{ onError: Sentry.captureException }` or a custom `fallback`).
|
|
69
|
+
* configures it (e.g. `{ onError: Sentry.captureException }` or a custom `fallback`). It only catches what
|
|
70
|
+
* the router doesn't: TanStack Router catches a route's component / `loader` / `beforeLoad` errors in its own
|
|
71
|
+
* per-route boundary, so page crashes need `createRouter({ defaultErrorComponent: PageError })`.
|
|
36
72
|
*/
|
|
37
73
|
errorBoundary?: boolean | Omit<ErrorBoundaryProps, 'children' | 'resetKeys'>;
|
|
74
|
+
/**
|
|
75
|
+
* The app is still finding out who is signed in (e.g. verifying a stored token or refreshing a cookie
|
|
76
|
+
* session). While `true`, AdminRoot renders only `pendingFallback` — no shell, no public page, no
|
|
77
|
+
* `AuthGuard`, and `getUser()` isn't read — so a signed-in admin is never redirected to sign-in before the
|
|
78
|
+
* check resolves. Route `beforeLoad` guards (e.g. `authLayoutRoute`) still run in the router, independent
|
|
79
|
+
* of this — they must tolerate the unknown state themselves. No minimum display time. Default `false`.
|
|
80
|
+
*/
|
|
81
|
+
pending?: boolean;
|
|
82
|
+
/** What to show while `pending`. Default: a `Loader size="lg"` centred in the full viewport. */
|
|
83
|
+
pendingFallback?: ReactNode;
|
|
84
|
+
/**
|
|
85
|
+
* The session could not be checked, or the server will not serve this account here. While set, AdminRoot
|
|
86
|
+
* renders a standalone `AuthLayout` screen (the app's `logo`, a `QueryError`, Try Again / Sign Out) instead
|
|
87
|
+
* of the shell or a public page — and never redirects. Sign Out calls `onLogout` then navigates to
|
|
88
|
+
* `loginPath`, so **`onLogout` must clear whatever set `unavailable`** (or this screen shows again).
|
|
89
|
+
* `pending` wins when both are set. `null` / `undefined` = not unavailable (the default).
|
|
90
|
+
*/
|
|
91
|
+
unavailable?: AdminRootUnavailable | null;
|
|
92
|
+
/** Replaces the whole `unavailable` screen — for an app that needs its own wording or extra actions. */
|
|
93
|
+
unavailableFallback?: (props: AdminRootUnavailableFallbackProps) => ReactNode;
|
|
38
94
|
}
|
|
39
95
|
/**
|
|
40
96
|
* Root-route component for admin apps — it wires up the whole shell orchestration so an app only has to
|
|
@@ -43,6 +99,10 @@ export interface AdminRootProps<U extends AdminUser = AdminUser> {
|
|
|
43
99
|
* `AuthGuard` (signed-out visitors bounce to `loginPath`). Logout clears the session and navigates to
|
|
44
100
|
* `loginPath`. Mounts exactly one app-wide `<Toaster/>` (the inner `RootLayout` gets `toaster={false}`),
|
|
45
101
|
* and wraps the page in an `ErrorBoundary` that resets on navigation (`errorBoundary`, default on).
|
|
102
|
+
* While the app is still checking the session, pass `pending` (a full-screen loader instead of a premature
|
|
103
|
+
* sign-in redirect); when the check failed or the server refuses this account, pass `unavailable` (a
|
|
104
|
+
* standalone "Cannot Reach the Server" / "No Access" screen with Try Again / Sign Out). The `Toaster` stays
|
|
105
|
+
* mounted in both.
|
|
46
106
|
*
|
|
47
107
|
* `loginPath` is a plain string, cast loosely to the router's `to` type (the library can't know the
|
|
48
108
|
* app's typed route tree). The generic `<U>` preserves the app's own user type through `getUser`.
|
|
@@ -50,7 +110,18 @@ export interface AdminRootProps<U extends AdminUser = AdminUser> {
|
|
|
50
110
|
* @example
|
|
51
111
|
* // routes/__root.tsx
|
|
52
112
|
* export const Route = createRootRoute({
|
|
53
|
-
* component: () =>
|
|
113
|
+
* component: () => {
|
|
114
|
+
* const { status, error, retry } = useSession()
|
|
115
|
+
* return (
|
|
116
|
+
* <AdminRoot<AuthUser>
|
|
117
|
+
* pending={status === 'loading'}
|
|
118
|
+
* unavailable={status === 'unavailable' ? { error, onRetry: retry } : null}
|
|
119
|
+
* logo={<Logo />}
|
|
120
|
+
* getUser={getUser}
|
|
121
|
+
* onLogout={logout}
|
|
122
|
+
* />
|
|
123
|
+
* )
|
|
124
|
+
* },
|
|
54
125
|
* })
|
|
55
126
|
*/
|
|
56
|
-
export declare const AdminRoot: <U extends AdminUser = AdminUser>({ logo, logoTo, getUser, onLogout, authRouteId, loginPath, showUserCard, header, errorBoundary, }: AdminRootProps<U>) => import("react/jsx-runtime").JSX.Element;
|
|
127
|
+
export declare const AdminRoot: <U extends AdminUser = AdminUser>({ logo, logoTo, getUser, onLogout, authRouteId, loginPath, showUserCard, header, errorBoundary, pending, pendingFallback, unavailable, unavailableFallback, }: AdminRootProps<U>) => import("react/jsx-runtime").JSX.Element;
|
package/dist/app/AdminRoot.d.ts
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import { type ErrorBoundaryProps, type RootLayoutHeader, type RootLayoutProps } from '../components';
|
|
2
|
+
import { type ErrorBoundaryProps, type IconName, type RootLayoutHeader, type RootLayoutProps } from '../components';
|
|
3
|
+
import { type ThemeColor } from '../theme';
|
|
4
|
+
/** Why the session can't be used — see `AdminRootUnavailable.reason`. */
|
|
5
|
+
export type AdminRootUnavailableReason = 'forbidden' | 'unreachable';
|
|
6
|
+
/** The `unavailable` state of `AdminRoot` — the session could not be checked, or may not be used here. */
|
|
7
|
+
export interface AdminRootUnavailable {
|
|
8
|
+
/** What failed — passed to `QueryError` (message, trace id). */
|
|
9
|
+
error: unknown;
|
|
10
|
+
/**
|
|
11
|
+
* Why. `'forbidden'` = a valid session this panel may not use (no retry, only Sign Out).
|
|
12
|
+
* `'unreachable'` = the check itself failed (Try Again + Sign Out). Defaults to `'forbidden'` when the
|
|
13
|
+
* error carries HTTP status 403 (`error.status` or `error.response.status`), else `'unreachable'`.
|
|
14
|
+
*/
|
|
15
|
+
reason?: AdminRootUnavailableReason;
|
|
16
|
+
/** Re-runs the session check. Shown as "Try Again" for `'unreachable'` only. */
|
|
17
|
+
onRetry?: () => void;
|
|
18
|
+
/**
|
|
19
|
+
* The `AuthLayout` icon. Default: none — apps differ here (one shows a tinted `CloudCross`, another keeps
|
|
20
|
+
* every auth page icon-free), so it's the app's choice.
|
|
21
|
+
*/
|
|
22
|
+
icon?: IconName | false;
|
|
23
|
+
/** Tint for `icon` (`AuthLayout`'s `color`). Default `'error'`. */
|
|
24
|
+
color?: ThemeColor;
|
|
25
|
+
}
|
|
26
|
+
/** What an `unavailableFallback` receives. */
|
|
27
|
+
export interface AdminRootUnavailableFallbackProps {
|
|
28
|
+
/** The `unavailable.error`. */
|
|
29
|
+
error: unknown;
|
|
30
|
+
/** The resolved reason (explicit, or inferred from a 403). */
|
|
31
|
+
reason: AdminRootUnavailableReason;
|
|
32
|
+
/** `unavailable.onRetry`, when given — whatever the reason (the fallback decides whether to offer it). */
|
|
33
|
+
retry?: () => void;
|
|
34
|
+
/** The shell's Sign Out: `onLogout()`, then navigate to `loginPath`. */
|
|
35
|
+
signOut: () => void;
|
|
36
|
+
}
|
|
3
37
|
/** The minimal user shape `AdminRoot` reads — apps pass their own richer type via the generic. */
|
|
4
38
|
export interface AdminUser {
|
|
5
39
|
name?: string;
|
|
@@ -32,9 +66,31 @@ export interface AdminRootProps<U extends AdminUser = AdminUser> {
|
|
|
32
66
|
/**
|
|
33
67
|
* Wrap the page content in an `ErrorBoundary` (reset on navigation), so a crashing page shows an
|
|
34
68
|
* `ErrorState` inside the shell instead of a white screen. Default `true`; `false` opts out; an object
|
|
35
|
-
* configures it (e.g. `{ onError: Sentry.captureException }` or a custom `fallback`).
|
|
69
|
+
* configures it (e.g. `{ onError: Sentry.captureException }` or a custom `fallback`). It only catches what
|
|
70
|
+
* the router doesn't: TanStack Router catches a route's component / `loader` / `beforeLoad` errors in its own
|
|
71
|
+
* per-route boundary, so page crashes need `createRouter({ defaultErrorComponent: PageError })`.
|
|
36
72
|
*/
|
|
37
73
|
errorBoundary?: boolean | Omit<ErrorBoundaryProps, 'children' | 'resetKeys'>;
|
|
74
|
+
/**
|
|
75
|
+
* The app is still finding out who is signed in (e.g. verifying a stored token or refreshing a cookie
|
|
76
|
+
* session). While `true`, AdminRoot renders only `pendingFallback` — no shell, no public page, no
|
|
77
|
+
* `AuthGuard`, and `getUser()` isn't read — so a signed-in admin is never redirected to sign-in before the
|
|
78
|
+
* check resolves. Route `beforeLoad` guards (e.g. `authLayoutRoute`) still run in the router, independent
|
|
79
|
+
* of this — they must tolerate the unknown state themselves. No minimum display time. Default `false`.
|
|
80
|
+
*/
|
|
81
|
+
pending?: boolean;
|
|
82
|
+
/** What to show while `pending`. Default: a `Loader size="lg"` centred in the full viewport. */
|
|
83
|
+
pendingFallback?: ReactNode;
|
|
84
|
+
/**
|
|
85
|
+
* The session could not be checked, or the server will not serve this account here. While set, AdminRoot
|
|
86
|
+
* renders a standalone `AuthLayout` screen (the app's `logo`, a `QueryError`, Try Again / Sign Out) instead
|
|
87
|
+
* of the shell or a public page — and never redirects. Sign Out calls `onLogout` then navigates to
|
|
88
|
+
* `loginPath`, so **`onLogout` must clear whatever set `unavailable`** (or this screen shows again).
|
|
89
|
+
* `pending` wins when both are set. `null` / `undefined` = not unavailable (the default).
|
|
90
|
+
*/
|
|
91
|
+
unavailable?: AdminRootUnavailable | null;
|
|
92
|
+
/** Replaces the whole `unavailable` screen — for an app that needs its own wording or extra actions. */
|
|
93
|
+
unavailableFallback?: (props: AdminRootUnavailableFallbackProps) => ReactNode;
|
|
38
94
|
}
|
|
39
95
|
/**
|
|
40
96
|
* Root-route component for admin apps — it wires up the whole shell orchestration so an app only has to
|
|
@@ -43,6 +99,10 @@ export interface AdminRootProps<U extends AdminUser = AdminUser> {
|
|
|
43
99
|
* `AuthGuard` (signed-out visitors bounce to `loginPath`). Logout clears the session and navigates to
|
|
44
100
|
* `loginPath`. Mounts exactly one app-wide `<Toaster/>` (the inner `RootLayout` gets `toaster={false}`),
|
|
45
101
|
* and wraps the page in an `ErrorBoundary` that resets on navigation (`errorBoundary`, default on).
|
|
102
|
+
* While the app is still checking the session, pass `pending` (a full-screen loader instead of a premature
|
|
103
|
+
* sign-in redirect); when the check failed or the server refuses this account, pass `unavailable` (a
|
|
104
|
+
* standalone "Cannot Reach the Server" / "No Access" screen with Try Again / Sign Out). The `Toaster` stays
|
|
105
|
+
* mounted in both.
|
|
46
106
|
*
|
|
47
107
|
* `loginPath` is a plain string, cast loosely to the router's `to` type (the library can't know the
|
|
48
108
|
* app's typed route tree). The generic `<U>` preserves the app's own user type through `getUser`.
|
|
@@ -50,7 +110,18 @@ export interface AdminRootProps<U extends AdminUser = AdminUser> {
|
|
|
50
110
|
* @example
|
|
51
111
|
* // routes/__root.tsx
|
|
52
112
|
* export const Route = createRootRoute({
|
|
53
|
-
* component: () =>
|
|
113
|
+
* component: () => {
|
|
114
|
+
* const { status, error, retry } = useSession()
|
|
115
|
+
* return (
|
|
116
|
+
* <AdminRoot<AuthUser>
|
|
117
|
+
* pending={status === 'loading'}
|
|
118
|
+
* unavailable={status === 'unavailable' ? { error, onRetry: retry } : null}
|
|
119
|
+
* logo={<Logo />}
|
|
120
|
+
* getUser={getUser}
|
|
121
|
+
* onLogout={logout}
|
|
122
|
+
* />
|
|
123
|
+
* )
|
|
124
|
+
* },
|
|
54
125
|
* })
|
|
55
126
|
*/
|
|
56
|
-
export declare const AdminRoot: <U extends AdminUser = AdminUser>({ logo, logoTo, getUser, onLogout, authRouteId, loginPath, showUserCard, header, errorBoundary, }: AdminRootProps<U>) => import("react/jsx-runtime").JSX.Element;
|
|
127
|
+
export declare const AdminRoot: <U extends AdminUser = AdminUser>({ logo, logoTo, getUser, onLogout, authRouteId, loginPath, showUserCard, header, errorBoundary, pending, pendingFallback, unavailable, unavailableFallback, }: AdminRootProps<U>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../Alert-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../Alert-CfjDmLR8.cjs");exports.Alert=e.Alert;exports.default=e.Alert;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../Breadcrumbs-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../Breadcrumbs-COb2zmDk.cjs");exports.Breadcrumbs=e.Breadcrumbs;exports.default=e.Breadcrumbs;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../Button-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../Button-BD5wpg-t.cjs");exports.Button=t.Button;exports.default=t.Button;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../Card-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../Card-DL7XnkOA.cjs");exports.Card=e.Card;exports.default=e.Card;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../Chip-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../Chip-CLPIPC9a.cjs");exports.Chip=e.Chip;exports.default=e.Chip;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../CodeBlock-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../CodeBlock-C0dbyxcl.cjs");exports.CodeBlock=e.CodeBlock;exports.default=e.CodeBlock;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../ColorPicker-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../ColorPicker-DmLGKaYF.cjs");exports.ColorPicker=e.ColorPicker;exports.default=e.ColorPicker;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../ColorRamp-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../ColorRamp-D_9gsqJl.cjs");exports.ColorRamp=e.ColorRamp;exports.default=e.ColorRamp;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../CopyButton-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../CopyButton-0w4OToIy.cjs");exports.CopyButton=t.CopyButton;exports.default=t.CopyButton;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../DatePicker-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../DatePicker-D1uFIm3M.cjs");exports.DatePicker=e.DatePicker;exports.default=e.DatePicker;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../DateTimePicker-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../DateTimePicker-DPt-LDVJ.cjs");exports.DateTimePicker=e.DateTimePicker;exports.default=e.DateTimePicker;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../DescriptionList-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../DescriptionList-CPCbzU9b.cjs");exports.DescriptionList=e.DescriptionList;exports.default=e.DescriptionList;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../EmptyState-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("../../EmptyState-C54C0Qwc.cjs");exports.EmptyState=t.EmptyState;exports.default=t.EmptyState;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -2,12 +2,12 @@ import { Component, type ErrorInfo, type ReactNode } from 'react';
|
|
|
2
2
|
export interface ErrorBoundaryProps {
|
|
3
3
|
/**
|
|
4
4
|
* What to render after a crash — a node, or `(error, reset) => node`. Defaults to an `ErrorState` with
|
|
5
|
-
* a friendly description, a **Try
|
|
5
|
+
* a friendly description, a **Try Again** button (`reset`) and the stack in dev.
|
|
6
6
|
*/
|
|
7
7
|
fallback?: ReactNode | ((error: Error, reset: () => void) => ReactNode);
|
|
8
8
|
/** Report the crash (e.g. `Sentry.captureException`). */
|
|
9
9
|
onError?: (error: Error, info: ErrorInfo) => void;
|
|
10
|
-
/** Called after the boundary resets (Try
|
|
10
|
+
/** Called after the boundary resets (Try Again, or a `resetKeys` change). */
|
|
11
11
|
onReset?: () => void;
|
|
12
12
|
/** Reset automatically when any of these change (shallow) — e.g. `[location.pathname]` clears on navigation. */
|
|
13
13
|
resetKeys?: unknown[];
|
|
@@ -19,7 +19,7 @@ interface ErrorBoundaryState {
|
|
|
19
19
|
/**
|
|
20
20
|
* Catches render errors in its subtree and shows a fallback instead of unmounting the whole app (a
|
|
21
21
|
* white screen). The one class component in the library — React only offers error boundaries as
|
|
22
|
-
* classes. `fallback` is a node or `(error, reset) => node` (default: an `ErrorState` with Try
|
|
22
|
+
* classes. `fallback` is a node or `(error, reset) => node` (default: an `ErrorState` with Try Again);
|
|
23
23
|
* `onError` reports the crash (Sentry); `resetKeys` resets it when they change (e.g. the route path, so
|
|
24
24
|
* navigating away recovers); `onReset` runs after any reset. `AdminRoot` mounts one around the page
|
|
25
25
|
* content automatically, so a crashing page keeps the sidebar + header.
|
|
@@ -2,12 +2,12 @@ import { Component, type ErrorInfo, type ReactNode } from 'react';
|
|
|
2
2
|
export interface ErrorBoundaryProps {
|
|
3
3
|
/**
|
|
4
4
|
* What to render after a crash — a node, or `(error, reset) => node`. Defaults to an `ErrorState` with
|
|
5
|
-
* a friendly description, a **Try
|
|
5
|
+
* a friendly description, a **Try Again** button (`reset`) and the stack in dev.
|
|
6
6
|
*/
|
|
7
7
|
fallback?: ReactNode | ((error: Error, reset: () => void) => ReactNode);
|
|
8
8
|
/** Report the crash (e.g. `Sentry.captureException`). */
|
|
9
9
|
onError?: (error: Error, info: ErrorInfo) => void;
|
|
10
|
-
/** Called after the boundary resets (Try
|
|
10
|
+
/** Called after the boundary resets (Try Again, or a `resetKeys` change). */
|
|
11
11
|
onReset?: () => void;
|
|
12
12
|
/** Reset automatically when any of these change (shallow) — e.g. `[location.pathname]` clears on navigation. */
|
|
13
13
|
resetKeys?: unknown[];
|
|
@@ -19,7 +19,7 @@ interface ErrorBoundaryState {
|
|
|
19
19
|
/**
|
|
20
20
|
* Catches render errors in its subtree and shows a fallback instead of unmounting the whole app (a
|
|
21
21
|
* white screen). The one class component in the library — React only offers error boundaries as
|
|
22
|
-
* classes. `fallback` is a node or `(error, reset) => node` (default: an `ErrorState` with Try
|
|
22
|
+
* classes. `fallback` is a node or `(error, reset) => node` (default: an `ErrorState` with Try Again);
|
|
23
23
|
* `onError` reports the crash (Sentry); `resetKeys` resets it when they change (e.g. the route path, so
|
|
24
24
|
* navigating away recovers); `onReset` runs after any reset. `AdminRoot` mounts one around the page
|
|
25
25
|
* content automatically, so a crashing page keeps the sidebar + header.
|
|
@@ -1,20 +1,41 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type EmptyStateProps } from '../EmptyState';
|
|
3
3
|
import type { IconName } from '../../icons/names';
|
|
4
|
+
export type ErrorStateVariant = 'block' | 'alert';
|
|
4
5
|
export interface ErrorStateProps extends Omit<EmptyStateProps, 'icon' | 'title' | 'color'> {
|
|
6
|
+
/**
|
|
7
|
+
* The shape. `'block'` (default) — the `EmptyState`-style block (puck, title, centred message), for a read
|
|
8
|
+
* that failed where its data would be. `'alert'` — a one-line red `Alert` banner for a **failed save**
|
|
9
|
+
* above a form or in a modal, where the form stays on screen: the message (no default title), a muted
|
|
10
|
+
* trace id line, and the copy / retry / `action` buttons in the alert's action slot. `showDetails`,
|
|
11
|
+
* `compact` and `pattern` don't apply to `'alert'`.
|
|
12
|
+
*/
|
|
13
|
+
variant?: ErrorStateVariant;
|
|
5
14
|
/**
|
|
6
15
|
* What failed — an `Error`, a string, an axios-style error, a `{ message }` or a raw `{ status }`
|
|
7
16
|
* response. Its message becomes the description (unless `description` is given) and its stack feeds
|
|
8
17
|
* the details panel.
|
|
9
18
|
*/
|
|
10
19
|
error?: unknown;
|
|
11
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Heading. Block: defaults to the localized "Something Went Wrong". Alert: none unless given — the message
|
|
22
|
+
* is the point.
|
|
23
|
+
*/
|
|
12
24
|
title?: ReactNode;
|
|
13
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Leading icon — a known `IconName`, any node, or `false`. Block: defaults to `Danger` (or `CloudCross` when
|
|
27
|
+
* the request never got a response — an explicit `status: 0` / network error code), tinted `error`. Alert:
|
|
28
|
+
* the alert's own error icon unless overridden.
|
|
29
|
+
*/
|
|
14
30
|
icon?: IconName | ReactNode | false;
|
|
15
|
-
/** Adds a "Try
|
|
31
|
+
/** Adds a "Try Again" button that calls this (e.g. a query's `refetch`). */
|
|
16
32
|
onRetry?: () => void;
|
|
17
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* The retry is running (e.g. `query.isFetching`) — the "Try Again" button shows its loader and is disabled,
|
|
35
|
+
* so a slow refetch doesn't look like a dead click. Defaults to `false`.
|
|
36
|
+
*/
|
|
37
|
+
retrying?: boolean;
|
|
38
|
+
/** Retry button label. Defaults to the localized "Try Again". */
|
|
18
39
|
retryLabel?: ReactNode;
|
|
19
40
|
/**
|
|
20
41
|
* Show a collapsible technical details panel (stack / raw error). `'dev'` (default) shows it only in
|
|
@@ -30,19 +51,26 @@ export interface ErrorStateProps extends Omit<EmptyStateProps, 'icon' | 'title'
|
|
|
30
51
|
traceId?: string | false;
|
|
31
52
|
/**
|
|
32
53
|
* Per-field validation messages (`{ field: message }`), listed as the description when there's no explicit
|
|
33
|
-
* `description`. Defaults to the ones on `error` (`error.fieldErrors`
|
|
34
|
-
* `false` hides them. In a form, put them on the inputs instead.
|
|
54
|
+
* `description`. Defaults to the ones on `error` (`getErrorFieldErrors`: `error.fieldErrors` — an object, a
|
|
55
|
+
* method or a `{ field, message }[]` —, `error.details`, `error.response.data.errors`); `false` hides them. In a form, put them on the inputs instead.
|
|
35
56
|
*/
|
|
36
57
|
fieldErrors?: Record<string, string> | false;
|
|
58
|
+
/**
|
|
59
|
+
* Labels for the field-error keys (`{ newPassword: 'New Password' }`). A key without one is shown humanized
|
|
60
|
+
* and Title Cased (`newPassword` / `new_password` → "New Password"; a dotted path keeps its last segment).
|
|
61
|
+
*/
|
|
62
|
+
fieldLabels?: Record<string, ReactNode>;
|
|
37
63
|
}
|
|
38
64
|
/**
|
|
39
65
|
* The "loading failed" counterpart of `EmptyState` — a semantic preset over it: an `error`-tinted
|
|
40
|
-
* `Danger` puck, a localized "Something
|
|
66
|
+
* `Danger` puck, a localized "Something Went Wrong" title, the failure's own message as the description
|
|
41
67
|
* (extracted from an `Error`, a string, an axios-style `response.data.message`, a `{ message }`, or a raw
|
|
42
|
-
* `{ status }` response → "Request failed (404)"), an optional **Try
|
|
68
|
+
* `{ status }` response → "Request failed (404)"), an optional **Try Again** button (`onRetry`), and a
|
|
43
69
|
* developer-only details panel with the stack (`showDetails`, default `'dev'`). `compact` is the inline
|
|
44
70
|
* variant for a table / card. The server's `traceId` (copyable) and a 400's per-field `fieldErrors` are shown
|
|
45
|
-
* when the error carries them.
|
|
71
|
+
* when the error carries them. `variant="alert"` renders the same data as a one-line `Alert` banner — for a
|
|
72
|
+
* failed save above a form or in a modal. `retrying` puts the retry button in its loading state. Announced to
|
|
73
|
+
* assistive tech once (`role="alert"`).
|
|
46
74
|
* `forwardRef` to the root; any other `EmptyState` prop (`size`, `pattern`, `action`, …) passes through.
|
|
47
75
|
*/
|
|
48
76
|
export declare const ErrorState: import("react").ForwardRefExoticComponent<ErrorStateProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,20 +1,41 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type EmptyStateProps } from '../EmptyState';
|
|
3
3
|
import type { IconName } from '../../icons/names';
|
|
4
|
+
export type ErrorStateVariant = 'block' | 'alert';
|
|
4
5
|
export interface ErrorStateProps extends Omit<EmptyStateProps, 'icon' | 'title' | 'color'> {
|
|
6
|
+
/**
|
|
7
|
+
* The shape. `'block'` (default) — the `EmptyState`-style block (puck, title, centred message), for a read
|
|
8
|
+
* that failed where its data would be. `'alert'` — a one-line red `Alert` banner for a **failed save**
|
|
9
|
+
* above a form or in a modal, where the form stays on screen: the message (no default title), a muted
|
|
10
|
+
* trace id line, and the copy / retry / `action` buttons in the alert's action slot. `showDetails`,
|
|
11
|
+
* `compact` and `pattern` don't apply to `'alert'`.
|
|
12
|
+
*/
|
|
13
|
+
variant?: ErrorStateVariant;
|
|
5
14
|
/**
|
|
6
15
|
* What failed — an `Error`, a string, an axios-style error, a `{ message }` or a raw `{ status }`
|
|
7
16
|
* response. Its message becomes the description (unless `description` is given) and its stack feeds
|
|
8
17
|
* the details panel.
|
|
9
18
|
*/
|
|
10
19
|
error?: unknown;
|
|
11
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Heading. Block: defaults to the localized "Something Went Wrong". Alert: none unless given — the message
|
|
22
|
+
* is the point.
|
|
23
|
+
*/
|
|
12
24
|
title?: ReactNode;
|
|
13
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Leading icon — a known `IconName`, any node, or `false`. Block: defaults to `Danger` (or `CloudCross` when
|
|
27
|
+
* the request never got a response — an explicit `status: 0` / network error code), tinted `error`. Alert:
|
|
28
|
+
* the alert's own error icon unless overridden.
|
|
29
|
+
*/
|
|
14
30
|
icon?: IconName | ReactNode | false;
|
|
15
|
-
/** Adds a "Try
|
|
31
|
+
/** Adds a "Try Again" button that calls this (e.g. a query's `refetch`). */
|
|
16
32
|
onRetry?: () => void;
|
|
17
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* The retry is running (e.g. `query.isFetching`) — the "Try Again" button shows its loader and is disabled,
|
|
35
|
+
* so a slow refetch doesn't look like a dead click. Defaults to `false`.
|
|
36
|
+
*/
|
|
37
|
+
retrying?: boolean;
|
|
38
|
+
/** Retry button label. Defaults to the localized "Try Again". */
|
|
18
39
|
retryLabel?: ReactNode;
|
|
19
40
|
/**
|
|
20
41
|
* Show a collapsible technical details panel (stack / raw error). `'dev'` (default) shows it only in
|
|
@@ -30,19 +51,26 @@ export interface ErrorStateProps extends Omit<EmptyStateProps, 'icon' | 'title'
|
|
|
30
51
|
traceId?: string | false;
|
|
31
52
|
/**
|
|
32
53
|
* Per-field validation messages (`{ field: message }`), listed as the description when there's no explicit
|
|
33
|
-
* `description`. Defaults to the ones on `error` (`error.fieldErrors`
|
|
34
|
-
* `false` hides them. In a form, put them on the inputs instead.
|
|
54
|
+
* `description`. Defaults to the ones on `error` (`getErrorFieldErrors`: `error.fieldErrors` — an object, a
|
|
55
|
+
* method or a `{ field, message }[]` —, `error.details`, `error.response.data.errors`); `false` hides them. In a form, put them on the inputs instead.
|
|
35
56
|
*/
|
|
36
57
|
fieldErrors?: Record<string, string> | false;
|
|
58
|
+
/**
|
|
59
|
+
* Labels for the field-error keys (`{ newPassword: 'New Password' }`). A key without one is shown humanized
|
|
60
|
+
* and Title Cased (`newPassword` / `new_password` → "New Password"; a dotted path keeps its last segment).
|
|
61
|
+
*/
|
|
62
|
+
fieldLabels?: Record<string, ReactNode>;
|
|
37
63
|
}
|
|
38
64
|
/**
|
|
39
65
|
* The "loading failed" counterpart of `EmptyState` — a semantic preset over it: an `error`-tinted
|
|
40
|
-
* `Danger` puck, a localized "Something
|
|
66
|
+
* `Danger` puck, a localized "Something Went Wrong" title, the failure's own message as the description
|
|
41
67
|
* (extracted from an `Error`, a string, an axios-style `response.data.message`, a `{ message }`, or a raw
|
|
42
|
-
* `{ status }` response → "Request failed (404)"), an optional **Try
|
|
68
|
+
* `{ status }` response → "Request failed (404)"), an optional **Try Again** button (`onRetry`), and a
|
|
43
69
|
* developer-only details panel with the stack (`showDetails`, default `'dev'`). `compact` is the inline
|
|
44
70
|
* variant for a table / card. The server's `traceId` (copyable) and a 400's per-field `fieldErrors` are shown
|
|
45
|
-
* when the error carries them.
|
|
71
|
+
* when the error carries them. `variant="alert"` renders the same data as a one-line `Alert` banner — for a
|
|
72
|
+
* failed save above a form or in a modal. `retrying` puts the retry button in its loading state. Announced to
|
|
73
|
+
* assistive tech once (`role="alert"`).
|
|
46
74
|
* `forwardRef` to the root; any other `EmptyState` prop (`size`, `pattern`, `action`, …) passes through.
|
|
47
75
|
*/
|
|
48
76
|
export declare const ErrorState: import("react").ForwardRefExoticComponent<ErrorStateProps & import("react").RefAttributes<HTMLDivElement>>;
|