@techzyapp/ui-library 1.0.41 → 1.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -8
- package/dist/AdminRoot-BLHvXCvL.js +101 -0
- package/dist/AdminRoot-BLHvXCvL.js.map +1 -0
- package/dist/AdminRoot-D_g_TW30.cjs +2 -0
- package/dist/AdminRoot-D_g_TW30.cjs.map +1 -0
- package/dist/Alert-B4XZDk16.cjs +2 -0
- package/dist/Alert-B4XZDk16.cjs.map +1 -0
- package/dist/Alert-D5E1PLkV.js +70 -0
- package/dist/Alert-D5E1PLkV.js.map +1 -0
- package/dist/AuthLayout-exuNQicH.cjs.map +1 -1
- package/dist/AuthLayout-q8pbCGdt.js.map +1 -1
- package/dist/{Breadcrumbs-B6Pii2Y_.cjs → Breadcrumbs-DSUxcp6u.cjs} +2 -2
- package/dist/Breadcrumbs-DSUxcp6u.cjs.map +1 -0
- package/dist/{Breadcrumbs-DKYJOdHZ.js → Breadcrumbs-M31xyok8.js} +3 -3
- package/dist/Breadcrumbs-M31xyok8.js.map +1 -0
- package/dist/{Button-CjsnB8gX.js → Button-CtADzomU.js} +2 -2
- package/dist/{Button-CjsnB8gX.js.map → Button-CtADzomU.js.map} +1 -1
- package/dist/{Button-ClVfHGBc.cjs → Button-Q_5uA-zc.cjs} +2 -2
- package/dist/{Button-ClVfHGBc.cjs.map → Button-Q_5uA-zc.cjs.map} +1 -1
- package/dist/{Calendar-BzGVX4F4.cjs → Calendar-BbbtMsZs.cjs} +2 -2
- package/dist/{Calendar-BzGVX4F4.cjs.map → Calendar-BbbtMsZs.cjs.map} +1 -1
- package/dist/{Calendar-CQaPEukM.js → Calendar-CHLCv2s9.js} +3 -3
- package/dist/{Calendar-CQaPEukM.js.map → Calendar-CHLCv2s9.js.map} +1 -1
- package/dist/Card-Br9IB0yM.js +129 -0
- package/dist/Card-Br9IB0yM.js.map +1 -0
- package/dist/Card-CntRsQfm.cjs +2 -0
- package/dist/Card-CntRsQfm.cjs.map +1 -0
- package/dist/{Chip-Dp8skUZ2.cjs → Chip-CrBizrvG.cjs} +2 -2
- package/dist/Chip-CrBizrvG.cjs.map +1 -0
- package/dist/{Chip-BjSNgaAf.js → Chip-DYZ5w7VM.js} +2 -2
- package/dist/Chip-DYZ5w7VM.js.map +1 -0
- package/dist/ChoiceCardGroup-C7Eengyd.cjs +2 -0
- package/dist/ChoiceCardGroup-C7Eengyd.cjs.map +1 -0
- package/dist/ChoiceCardGroup-q0yN-TeQ.js +180 -0
- package/dist/{ChoiceCardGroup-143hR0v_.cjs.map → ChoiceCardGroup-q0yN-TeQ.js.map} +1 -1
- package/dist/{CodeBlock-CcJjS0_q.js → CodeBlock-B6Eqc4HR.js} +3 -3
- package/dist/CodeBlock-B6Eqc4HR.js.map +1 -0
- package/dist/{CodeBlock-o_VSkAek.cjs → CodeBlock-DW4uaZXM.cjs} +2 -2
- package/dist/CodeBlock-DW4uaZXM.cjs.map +1 -0
- package/dist/{ColorPicker-C1hZcAbH.js → ColorPicker-GsKIqJu8.js} +51 -51
- package/dist/{ColorPicker-C1hZcAbH.js.map → ColorPicker-GsKIqJu8.js.map} +1 -1
- package/dist/ColorPicker-nhWd_nOW.cjs +2 -0
- package/dist/{ColorPicker-DY6Vk1uS.cjs.map → ColorPicker-nhWd_nOW.cjs.map} +1 -1
- package/dist/{ColorPickerPanel-BuzwmkPN.js → ColorPickerPanel-BEcZePcT.js} +2 -2
- package/dist/{ColorPickerPanel-BuzwmkPN.js.map → ColorPickerPanel-BEcZePcT.js.map} +1 -1
- package/dist/{ColorPickerPanel-CDrHbCfG.cjs → ColorPickerPanel-BeAu83S6.cjs} +2 -2
- package/dist/{ColorPickerPanel-CDrHbCfG.cjs.map → ColorPickerPanel-BeAu83S6.cjs.map} +1 -1
- package/dist/{ColorRamp-CVnOYlu3.cjs → ColorRamp-C-zRPhHj.cjs} +2 -2
- package/dist/{ColorRamp-CVnOYlu3.cjs.map → ColorRamp-C-zRPhHj.cjs.map} +1 -1
- package/dist/{ColorRamp-CePqEkMR.js → ColorRamp-CeNgd8wF.js} +2 -2
- package/dist/{ColorRamp-CePqEkMR.js.map → ColorRamp-CeNgd8wF.js.map} +1 -1
- package/dist/ConfigProvider-Ci9Q2HLF.cjs +2 -0
- package/dist/ConfigProvider-Ci9Q2HLF.cjs.map +1 -0
- package/dist/{ConfigProvider-Bgu85MsI.js → ConfigProvider-Dqfu7UBU.js} +133 -126
- package/dist/ConfigProvider-Dqfu7UBU.js.map +1 -0
- package/dist/{CopyButton-CgDeyJ3A.js → CopyButton-Bidt2Vgp.js} +3 -3
- package/dist/{CopyButton-CgDeyJ3A.js.map → CopyButton-Bidt2Vgp.js.map} +1 -1
- package/dist/{CopyButton-CjPyKpky.cjs → CopyButton-Chr7SP5i.cjs} +2 -2
- package/dist/{CopyButton-CjPyKpky.cjs.map → CopyButton-Chr7SP5i.cjs.map} +1 -1
- package/dist/DatePicker-4rb34nPR.cjs +2 -0
- package/dist/{DatePicker-CwZ_-ElE.cjs.map → DatePicker-4rb34nPR.cjs.map} +1 -1
- package/dist/{DatePicker-tid4OuJ2.js → DatePicker-D7ZMOhWn.js} +42 -42
- package/dist/{DatePicker-tid4OuJ2.js.map → DatePicker-D7ZMOhWn.js.map} +1 -1
- package/dist/DateTimePicker-CVFzKzyA.cjs +2 -0
- package/dist/DateTimePicker-CVFzKzyA.cjs.map +1 -0
- package/dist/{DateTimePicker-C2871cuc.js → DateTimePicker-gDxM2CGy.js} +50 -50
- package/dist/DateTimePicker-gDxM2CGy.js.map +1 -0
- package/dist/{DescriptionList-BWw0Fe6U.cjs → DescriptionList-BBvfABps.cjs} +2 -2
- package/dist/DescriptionList-BBvfABps.cjs.map +1 -0
- package/dist/{DescriptionList-BP4CDME5.js → DescriptionList-Die3lRBW.js} +4 -4
- package/dist/DescriptionList-Die3lRBW.js.map +1 -0
- package/dist/{Dropdown-DYYhzKSo.cjs → Dropdown-CMjURWYd.cjs} +2 -2
- package/dist/{Dropdown-DYYhzKSo.cjs.map → Dropdown-CMjURWYd.cjs.map} +1 -1
- package/dist/{Dropdown-CcC-Hwx4.js → Dropdown-CnDBlB02.js} +2 -2
- package/dist/{Dropdown-CcC-Hwx4.js.map → Dropdown-CnDBlB02.js.map} +1 -1
- package/dist/{EmptyState-DGHOD_jy.cjs → EmptyState-D5EKQjX1.cjs} +2 -2
- package/dist/{EmptyState-DGHOD_jy.cjs.map → EmptyState-D5EKQjX1.cjs.map} +1 -1
- package/dist/{EmptyState-BlmQtbSs.js → EmptyState-DRgER10x.js} +2 -2
- package/dist/{EmptyState-BlmQtbSs.js.map → EmptyState-DRgER10x.js.map} +1 -1
- package/dist/{ErrorBoundary-ukRaS6uS.js → ErrorBoundary-CLfE2NjU.js} +3 -3
- package/dist/{ErrorBoundary-ukRaS6uS.js.map → ErrorBoundary-CLfE2NjU.js.map} +1 -1
- package/dist/{ErrorBoundary-DL194IyB.cjs → ErrorBoundary-DVcGWZd8.cjs} +2 -2
- package/dist/{ErrorBoundary-DL194IyB.cjs.map → ErrorBoundary-DVcGWZd8.cjs.map} +1 -1
- package/dist/{ErrorState-BjEA0VfF.cjs → ErrorState-DJDQbHZY.cjs} +2 -2
- package/dist/{ErrorState-BjEA0VfF.cjs.map → ErrorState-DJDQbHZY.cjs.map} +1 -1
- package/dist/{ErrorState-Hfd_0MeE.js → ErrorState-Dqw0AvmB.js} +7 -7
- package/dist/{ErrorState-Hfd_0MeE.js.map → ErrorState-Dqw0AvmB.js.map} +1 -1
- package/dist/{FileCard-COc4rHe-.cjs → FileCard-BqMproT9.cjs} +2 -2
- package/dist/FileCard-BqMproT9.cjs.map +1 -0
- package/dist/{FileCard-CWwB8CWF.js → FileCard-kVnjcSlk.js} +3 -3
- package/dist/FileCard-kVnjcSlk.js.map +1 -0
- package/dist/{FileUploader-Bqy_fV7l.cjs → FileUploader-BimFH5d8.cjs} +2 -2
- package/dist/FileUploader-BimFH5d8.cjs.map +1 -0
- package/dist/{FileUploader--WOmlhSh.js → FileUploader-LJIMh5_b.js} +5 -5
- package/dist/FileUploader-LJIMh5_b.js.map +1 -0
- package/dist/{Flag-C48Zfhvb.cjs → Flag-B1ZvZVXi.cjs} +2 -2
- package/dist/{Flag-C48Zfhvb.cjs.map → Flag-B1ZvZVXi.cjs.map} +1 -1
- package/dist/{Flag-fgMTTcy8.js → Flag-BEIqYQZg.js} +2 -2
- package/dist/{Flag-fgMTTcy8.js.map → Flag-BEIqYQZg.js.map} +1 -1
- package/dist/FloatingPanel-C5c_eMQ0.js.map +1 -1
- package/dist/FloatingPanel-tGCG2nhA.cjs.map +1 -1
- package/dist/{FullscreenToggle-GjsMn1GO.js → FullscreenToggle-BuQonKW8.js} +3 -3
- package/dist/{FullscreenToggle-GjsMn1GO.js.map → FullscreenToggle-BuQonKW8.js.map} +1 -1
- package/dist/{FullscreenToggle-DuLaUzi_.cjs → FullscreenToggle-CWlOXLss.cjs} +2 -2
- package/dist/{FullscreenToggle-DuLaUzi_.cjs.map → FullscreenToggle-CWlOXLss.cjs.map} +1 -1
- package/dist/{IconButton-t1OhAMNc.js → IconButton-BoURJOUD.js} +2 -2
- package/dist/{IconButton-t1OhAMNc.js.map → IconButton-BoURJOUD.js.map} +1 -1
- package/dist/{IconButton-D3ZpI0XL.cjs → IconButton-CiDPeKM4.cjs} +2 -2
- package/dist/{IconButton-D3ZpI0XL.cjs.map → IconButton-CiDPeKM4.cjs.map} +1 -1
- package/dist/{List-CwuAJDTi.js → List-2Y3ktTcF.js} +2 -2
- package/dist/{List-CwuAJDTi.js.map → List-2Y3ktTcF.js.map} +1 -1
- package/dist/{List-B5Ppe9R1.cjs → List-CKoNx21F.cjs} +2 -2
- package/dist/{List-B5Ppe9R1.cjs.map → List-CKoNx21F.cjs.map} +1 -1
- package/dist/{ListItem-BWNIbyTh.js → ListItem-2Lr5_NRY.js} +15 -15
- package/dist/{ListItem-BWNIbyTh.js.map → ListItem-2Lr5_NRY.js.map} +1 -1
- package/dist/ListItem-DkCYXucd.cjs +2 -0
- package/dist/{ListItem-Qo1Tt6Fi.cjs.map → ListItem-DkCYXucd.cjs.map} +1 -1
- package/dist/{Loader-Cywaf7ju.cjs → Loader-CAmRn8Oj.cjs} +2 -2
- package/dist/{Loader-Cywaf7ju.cjs.map → Loader-CAmRn8Oj.cjs.map} +1 -1
- package/dist/{Loader-De8_GqR1.js → Loader-CnTuddK7.js} +2 -2
- package/dist/{Loader-De8_GqR1.js.map → Loader-CnTuddK7.js.map} +1 -1
- package/dist/{LocationPicker-DBsxCYi9.cjs → LocationPicker-BwQ6ULMF.cjs} +2 -2
- package/dist/{LocationPicker-DBsxCYi9.cjs.map → LocationPicker-BwQ6ULMF.cjs.map} +1 -1
- package/dist/{LocationPicker-UfyDBvhp.js → LocationPicker-Cns3fkYI.js} +7 -7
- package/dist/{LocationPicker-UfyDBvhp.js.map → LocationPicker-Cns3fkYI.js.map} +1 -1
- package/dist/{Modal-Dfwc9eIq.js → Modal-CYcVOzID.js} +3 -3
- package/dist/Modal-CYcVOzID.js.map +1 -0
- package/dist/{Modal--5EbLfMz.cjs → Modal-DwY3jGHE.cjs} +2 -2
- package/dist/Modal-DwY3jGHE.cjs.map +1 -0
- package/dist/{MultiSelect-lBAEcAlR.cjs → MultiSelect-DJ6tRseY.cjs} +2 -2
- package/dist/{MultiSelect-lBAEcAlR.cjs.map → MultiSelect-DJ6tRseY.cjs.map} +1 -1
- package/dist/{MultiSelect-q__o8HyU.js → MultiSelect-svEVZNbp.js} +4 -4
- package/dist/{MultiSelect-q__o8HyU.js.map → MultiSelect-svEVZNbp.js.map} +1 -1
- package/dist/{NumberField-CXH0B1Bt.js → NumberField-9ekoB1wS.js} +3 -3
- package/dist/{NumberField-CXH0B1Bt.js.map → NumberField-9ekoB1wS.js.map} +1 -1
- package/dist/{NumberField-DSicjq5R.cjs → NumberField-sokUuuBR.cjs} +2 -2
- package/dist/{NumberField-DSicjq5R.cjs.map → NumberField-sokUuuBR.cjs.map} +1 -1
- package/dist/OtpField-DA7zJwy9.js +174 -0
- package/dist/OtpField-DA7zJwy9.js.map +1 -0
- package/dist/OtpField-DlkGju72.cjs +2 -0
- package/dist/OtpField-DlkGju72.cjs.map +1 -0
- package/dist/{PageError-MHbSl1oT.cjs → PageError-DUN5PzDF.cjs} +2 -2
- package/dist/{PageError-MHbSl1oT.cjs.map → PageError-DUN5PzDF.cjs.map} +1 -1
- package/dist/{PageError-VYc07Q7W.js → PageError-vD8Dpfns.js} +5 -5
- package/dist/{PageError-VYc07Q7W.js.map → PageError-vD8Dpfns.js.map} +1 -1
- package/dist/{PageLayout-Bt6U_80d.cjs → PageLayout-BesuKuX6.cjs} +2 -2
- package/dist/PageLayout-BesuKuX6.cjs.map +1 -0
- package/dist/{PageLayout-Df1SOlr7.js → PageLayout-CdObvxt7.js} +4 -4
- package/dist/PageLayout-CdObvxt7.js.map +1 -0
- package/dist/{PageNotFound-BWfaomjC.js → PageNotFound-Cc5eZ6w3.js} +5 -5
- package/dist/{PageNotFound-BWfaomjC.js.map → PageNotFound-Cc5eZ6w3.js.map} +1 -1
- package/dist/{PageNotFound-e4ITkqDC.cjs → PageNotFound-CfOAhmJ-.cjs} +2 -2
- package/dist/{PageNotFound-e4ITkqDC.cjs.map → PageNotFound-CfOAhmJ-.cjs.map} +1 -1
- package/dist/Pagination-CAD9_Nr_.cjs +2 -0
- package/dist/Pagination-CAD9_Nr_.cjs.map +1 -0
- package/dist/Pagination-CX0S1RrF.js +139 -0
- package/dist/Pagination-CX0S1RrF.js.map +1 -0
- package/dist/{PaletteField-D4c-Q1PG.js → PaletteField-CVIwl2nV.js} +3 -3
- package/dist/{PaletteField-D4c-Q1PG.js.map → PaletteField-CVIwl2nV.js.map} +1 -1
- package/dist/{PaletteField-DnUpn2zP.cjs → PaletteField-CpiEkXcB.cjs} +2 -2
- package/dist/{PaletteField-DnUpn2zP.cjs.map → PaletteField-CpiEkXcB.cjs.map} +1 -1
- package/dist/{PhoneField-BTB2_Lo1.cjs → PhoneField-Dlnnv4DU.cjs} +2 -2
- package/dist/{PhoneField-BTB2_Lo1.cjs.map → PhoneField-Dlnnv4DU.cjs.map} +1 -1
- package/dist/{PhoneField-BY5hapKk.js → PhoneField-xHLTU-o5.js} +4 -4
- package/dist/{PhoneField-BY5hapKk.js.map → PhoneField-xHLTU-o5.js.map} +1 -1
- package/dist/{Popconfirm-PkVgBrL-.cjs → Popconfirm-Chlm_M5T.cjs} +2 -2
- package/dist/{Popconfirm-PkVgBrL-.cjs.map → Popconfirm-Chlm_M5T.cjs.map} +1 -1
- package/dist/{Popconfirm-BXa5qLHY.js → Popconfirm-DIlygJY8.js} +3 -3
- package/dist/{Popconfirm-BXa5qLHY.js.map → Popconfirm-DIlygJY8.js.map} +1 -1
- package/dist/Popover-DsYUT23r.cjs.map +1 -1
- package/dist/Popover-WaVH3jsN.js.map +1 -1
- package/dist/{Progress-bId4RkgJ.js → Progress-BAEhawtj.js} +2 -2
- package/dist/{Progress-bId4RkgJ.js.map → Progress-BAEhawtj.js.map} +1 -1
- package/dist/{Progress-R_Vt4gJA.cjs → Progress-DqvKmyQW.cjs} +2 -2
- package/dist/{Progress-R_Vt4gJA.cjs.map → Progress-DqvKmyQW.cjs.map} +1 -1
- package/dist/QrCode-D7BTYcW2.js +81 -0
- package/dist/QrCode-D7BTYcW2.js.map +1 -0
- package/dist/QrCode-Dqsk49vX.cjs +2 -0
- package/dist/QrCode-Dqsk49vX.cjs.map +1 -0
- package/dist/{RemoveDialog-Dh_q5jZF.js → RemoveDialog-CQIm9GTH.js} +5 -5
- package/dist/{RemoveDialog-Dh_q5jZF.js.map → RemoveDialog-CQIm9GTH.js.map} +1 -1
- package/dist/{RemoveDialog-Cvj-DaiY.cjs → RemoveDialog-DZ-EqIfS.cjs} +2 -2
- package/dist/{RemoveDialog-Cvj-DaiY.cjs.map → RemoveDialog-DZ-EqIfS.cjs.map} +1 -1
- package/dist/RichTextEditor-Ba1G_qXu.cjs +2 -0
- package/dist/RichTextEditor-Ba1G_qXu.cjs.map +1 -0
- package/dist/{RichTextEditor-Dv-LDsN-.js → RichTextEditor-CJcbxQ6H.js} +148 -148
- package/dist/RichTextEditor-CJcbxQ6H.js.map +1 -0
- package/dist/RootLayout-Cl98ghy1.js +647 -0
- package/dist/RootLayout-Cl98ghy1.js.map +1 -0
- package/dist/RootLayout-s_Q_kSoS.cjs +2 -0
- package/dist/RootLayout-s_Q_kSoS.cjs.map +1 -0
- package/dist/{Select-DdkJXkw-.cjs → Select-BrjXCXtl.cjs} +2 -2
- package/dist/{Select-DdkJXkw-.cjs.map → Select-BrjXCXtl.cjs.map} +1 -1
- package/dist/{Select-Bw8Q86ts.js → Select-CG8UJL9R.js} +3 -3
- package/dist/{Select-Bw8Q86ts.js.map → Select-CG8UJL9R.js.map} +1 -1
- package/dist/{Sidebar-CGL5hvpl.js → Sidebar-CbPr34jd.js} +133 -131
- package/dist/{Sidebar-CGL5hvpl.js.map → Sidebar-CbPr34jd.js.map} +1 -1
- package/dist/Sidebar-DLlqHvQJ.cjs +2 -0
- package/dist/{Sidebar-CfEx7W7i.cjs.map → Sidebar-DLlqHvQJ.cjs.map} +1 -1
- package/dist/Slider-B5iG-HSw.js +185 -0
- package/dist/Slider-B5iG-HSw.js.map +1 -0
- package/dist/Slider-DTnui01g.cjs +2 -0
- package/dist/Slider-DTnui01g.cjs.map +1 -0
- package/dist/{SpeedDial-C-yLmnk7.js → SpeedDial-Be3SHkzw.js} +2 -2
- package/dist/{SpeedDial-C-yLmnk7.js.map → SpeedDial-Be3SHkzw.js.map} +1 -1
- package/dist/{SpeedDial-jOxWEd09.cjs → SpeedDial-i5kxikmt.cjs} +2 -2
- package/dist/{SpeedDial-jOxWEd09.cjs.map → SpeedDial-i5kxikmt.cjs.map} +1 -1
- package/dist/{Stepper-DYpiLhzD.js → Stepper-BDQt-oVG.js} +2 -2
- package/dist/Stepper-BDQt-oVG.js.map +1 -0
- package/dist/{Stepper-D7An-ugU.cjs → Stepper-e8qBsKYW.cjs} +2 -2
- package/dist/Stepper-e8qBsKYW.cjs.map +1 -0
- package/dist/{Table-BhaH8EKZ.cjs → Table-C14fRX1U.cjs} +2 -2
- package/dist/Table-C14fRX1U.cjs.map +1 -0
- package/dist/{Table-DK4GBKS3.js → Table-ChdM_vyi.js} +18 -18
- package/dist/Table-ChdM_vyi.js.map +1 -0
- package/dist/{Tabs-CWiDeqqW.js → Tabs-BxZrgozI.js} +2 -2
- package/dist/{Tabs-CWiDeqqW.js.map → Tabs-BxZrgozI.js.map} +1 -1
- package/dist/{Tabs-6x4vC8je.cjs → Tabs-C4kB1yfG.cjs} +2 -2
- package/dist/{Tabs-6x4vC8je.cjs.map → Tabs-C4kB1yfG.cjs.map} +1 -1
- package/dist/TagsField-Bg5BcQU-.cjs +2 -0
- package/dist/TagsField-Bg5BcQU-.cjs.map +1 -0
- package/dist/{TagsField-Cg9YVl7G.js → TagsField-DWlIt7XO.js} +64 -64
- package/dist/TagsField-DWlIt7XO.js.map +1 -0
- package/dist/{TextField-BRaoadxk.cjs → TextField-B-xqoDZR.cjs} +2 -2
- package/dist/{TextField-BRaoadxk.cjs.map → TextField-B-xqoDZR.cjs.map} +1 -1
- package/dist/{TextField-5nQkU8HP.js → TextField-Dwx5GPxz.js} +3 -3
- package/dist/{TextField-5nQkU8HP.js.map → TextField-Dwx5GPxz.js.map} +1 -1
- package/dist/{ThemeToggle-DXpbooYn.js → ThemeToggle-CK2USfgx.js} +3 -3
- package/dist/{ThemeToggle-DXpbooYn.js.map → ThemeToggle-CK2USfgx.js.map} +1 -1
- package/dist/{ThemeToggle-DhaVEyPL.cjs → ThemeToggle-DFgv1bsh.cjs} +2 -2
- package/dist/{ThemeToggle-DhaVEyPL.cjs.map → ThemeToggle-DFgv1bsh.cjs.map} +1 -1
- package/dist/{TimeColumns-girAEgEN.cjs → TimeColumns-B8KTj-tc.cjs} +2 -2
- package/dist/{TimeColumns-girAEgEN.cjs.map → TimeColumns-B8KTj-tc.cjs.map} +1 -1
- package/dist/{TimeColumns-C_gdJn__.js → TimeColumns-BWcuu3l7.js} +2 -2
- package/dist/{TimeColumns-C_gdJn__.js.map → TimeColumns-BWcuu3l7.js.map} +1 -1
- package/dist/TimePicker-DjL15hz1.cjs +2 -0
- package/dist/{TimePicker-_Ak5yB_5.cjs.map → TimePicker-DjL15hz1.cjs.map} +1 -1
- package/dist/{TimePicker-DHdsY8kQ.js → TimePicker-YMVHevpZ.js} +54 -54
- package/dist/{TimePicker-DHdsY8kQ.js.map → TimePicker-YMVHevpZ.js.map} +1 -1
- package/dist/Toaster-9hZ5MuW7.cjs +2 -0
- package/dist/Toaster-9hZ5MuW7.cjs.map +1 -0
- package/dist/Toaster-pHN2pxrU.js +64 -0
- package/dist/Toaster-pHN2pxrU.js.map +1 -0
- package/dist/TranslatedFields-BpWU5ZcG.js +86 -0
- package/dist/TranslatedFields-BpWU5ZcG.js.map +1 -0
- package/dist/TranslatedFields-SvS37hab.cjs +2 -0
- package/dist/TranslatedFields-SvS37hab.cjs.map +1 -0
- package/dist/{UserCard-B9bzkZph.cjs → UserCard-VPaexedS.cjs} +2 -2
- package/dist/UserCard-VPaexedS.cjs.map +1 -0
- package/dist/{UserCard-DYK6S-nr.js → UserCard-cmZrMvwL.js} +3 -3
- package/dist/UserCard-cmZrMvwL.js.map +1 -0
- package/dist/app/AdminRoot.d.cts +16 -5
- package/dist/app/AdminRoot.d.ts +16 -5
- package/dist/components/Alert/Alert.d.cts +1 -1
- package/dist/components/Alert/Alert.d.ts +1 -1
- package/dist/components/Alert/index.cjs +1 -1
- package/dist/components/Alert/index.js +1 -1
- package/dist/components/AuthLayout/AuthLayout.d.cts +2 -2
- package/dist/components/AuthLayout/AuthLayout.d.ts +2 -2
- package/dist/components/Breadcrumbs/Breadcrumbs.d.cts +2 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +2 -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/Card.d.cts +1 -1
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/index.cjs +1 -1
- package/dist/components/Card/index.js +1 -1
- package/dist/components/Chip/Chip.d.cts +1 -1
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Chip/index.cjs +1 -1
- package/dist/components/Chip/index.js +1 -1
- package/dist/components/ChoiceCard/ChoiceCard.d.cts +1 -1
- package/dist/components/ChoiceCard/ChoiceCard.d.ts +1 -1
- package/dist/components/ChoiceCard/index.cjs +1 -1
- package/dist/components/ChoiceCard/index.js +1 -1
- package/dist/components/CodeBlock/CodeBlock.d.cts +1 -1
- package/dist/components/CodeBlock/CodeBlock.d.ts +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/DateTimePicker.d.cts +2 -2
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +2 -2
- package/dist/components/DateTimePicker/index.cjs +1 -1
- package/dist/components/DateTimePicker/index.js +1 -1
- package/dist/components/DescriptionList/DescriptionList.d.cts +1 -1
- package/dist/components/DescriptionList/DescriptionList.d.ts +1 -1
- package/dist/components/DescriptionList/index.cjs +1 -1
- package/dist/components/DescriptionList/index.js +1 -1
- package/dist/components/Dropdown/index.cjs +1 -1
- package/dist/components/Dropdown/index.js +1 -1
- package/dist/components/EmptyState/index.cjs +1 -1
- package/dist/components/EmptyState/index.js +1 -1
- package/dist/components/ErrorState/ErrorBoundary.d.cts +1 -1
- package/dist/components/ErrorState/ErrorBoundary.d.ts +1 -1
- package/dist/components/ErrorState/index.cjs +1 -1
- package/dist/components/ErrorState/index.js +2 -2
- package/dist/components/FileCard/FileCard.d.cts +5 -2
- package/dist/components/FileCard/FileCard.d.ts +5 -2
- package/dist/components/FileCard/index.cjs +1 -1
- package/dist/components/FileCard/index.js +1 -1
- package/dist/components/FileUploader/FileUploader.d.cts +5 -5
- package/dist/components/FileUploader/FileUploader.d.ts +5 -5
- 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/FloatingPanel/FloatingPanel.d.cts +6 -5
- package/dist/components/FloatingPanel/FloatingPanel.d.ts +6 -5
- 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/List/index.cjs +1 -1
- package/dist/components/List/index.js +2 -2
- package/dist/components/Loader/Loader.d.cts +1 -1
- package/dist/components/Loader/Loader.d.ts +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/Modal.d.cts +1 -1
- package/dist/components/Modal/Modal.d.ts +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 +1 -1
- package/dist/components/OtpField/OtpField.d.ts +1 -1
- package/dist/components/OtpField/index.cjs +1 -1
- package/dist/components/OtpField/index.js +1 -1
- package/dist/components/PageError/index.cjs +1 -1
- package/dist/components/PageError/index.js +1 -1
- package/dist/components/PageLayout/PageLayout.d.cts +2 -2
- package/dist/components/PageLayout/PageLayout.d.ts +2 -2
- package/dist/components/PageLayout/index.cjs +1 -1
- package/dist/components/PageLayout/index.js +1 -1
- package/dist/components/PageNotFound/index.cjs +1 -1
- package/dist/components/PageNotFound/index.js +1 -1
- package/dist/components/Pagination/index.cjs +1 -1
- package/dist/components/Pagination/index.js +1 -1
- package/dist/components/PaletteField/index.cjs +1 -1
- package/dist/components/PaletteField/index.js +1 -1
- package/dist/components/PhoneField/index.cjs +1 -1
- package/dist/components/PhoneField/index.js +1 -1
- package/dist/components/Popconfirm/index.cjs +1 -1
- package/dist/components/Popconfirm/index.js +1 -1
- package/dist/components/Popover/Popover.d.cts +1 -1
- package/dist/components/Popover/Popover.d.ts +1 -1
- package/dist/components/Progress/index.cjs +1 -1
- package/dist/components/Progress/index.js +1 -1
- package/dist/components/QrCode/QrCode.d.cts +5 -2
- package/dist/components/QrCode/QrCode.d.ts +5 -2
- package/dist/components/QrCode/index.cjs +1 -1
- package/dist/components/QrCode/index.js +1 -1
- package/dist/components/RemoveDialog/index.cjs +1 -1
- package/dist/components/RemoveDialog/index.js +1 -1
- package/dist/components/RichTextEditor/RichTextEditor.d.cts +1 -1
- package/dist/components/RichTextEditor/RichTextEditor.d.ts +1 -1
- package/dist/components/RichTextEditor/index.cjs +1 -1
- package/dist/components/RichTextEditor/index.js +1 -1
- package/dist/components/RootLayout/RootLayout.d.cts +15 -7
- package/dist/components/RootLayout/RootLayout.d.ts +15 -7
- package/dist/components/RootLayout/index.cjs +1 -1
- package/dist/components/RootLayout/index.js +1 -1
- package/dist/components/Select/index.cjs +1 -1
- package/dist/components/Select/index.js +1 -1
- package/dist/components/Sidebar/index.cjs +1 -1
- package/dist/components/Sidebar/index.js +1 -1
- package/dist/components/Slider/Slider.d.cts +2 -2
- package/dist/components/Slider/Slider.d.ts +2 -2
- package/dist/components/Slider/index.cjs +1 -1
- package/dist/components/Slider/index.js +1 -1
- package/dist/components/SpeedDial/index.cjs +1 -1
- package/dist/components/SpeedDial/index.js +1 -1
- package/dist/components/Stepper/Stepper.d.cts +2 -2
- package/dist/components/Stepper/Stepper.d.ts +2 -2
- 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/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/Toaster.d.cts +10 -4
- package/dist/components/Toast/Toaster.d.ts +10 -4
- package/dist/components/Toast/index.cjs +1 -1
- package/dist/components/Toast/index.js +1 -1
- package/dist/components/TranslatedFields/TranslatedFields.d.cts +1 -1
- package/dist/components/TranslatedFields/TranslatedFields.d.ts +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 +6 -5
- package/dist/components/UserCard/UserCard.d.ts +6 -5
- 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 +56 -56
- 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 +2 -2
- package/dist/entries/theme.d.ts +2 -2
- package/dist/entries/theme.js +14 -13
- package/dist/form/useForm.d.cts +1 -1
- package/dist/form/useForm.d.ts +1 -1
- package/dist/hooks/useMediaQuery.d.cts +3 -3
- package/dist/hooks/useMediaQuery.d.ts +3 -3
- package/dist/i18n/messages.d.cts +20 -0
- package/dist/i18n/messages.d.ts +20 -0
- package/dist/index.cjs +1 -1
- package/dist/index.css +3 -3
- package/dist/index.js +236 -235
- package/dist/{messages-BasxRpyx.js → messages-BiRLMy1E.js} +177 -37
- package/dist/messages-BiRLMy1E.js.map +1 -0
- package/dist/{messages-CElolVGm.cjs → messages-C_fRRCg6.cjs} +9 -9
- package/dist/messages-C_fRRCg6.cjs.map +1 -0
- package/dist/theme/ConfigProvider.d.cts +39 -10
- package/dist/theme/ConfigProvider.d.ts +39 -10
- package/dist/theme/index.d.cts +2 -2
- package/dist/theme/index.d.ts +2 -2
- package/dist/useForm-CGbJ44Gp.js.map +1 -1
- package/dist/useForm-CSw6r1n1.cjs.map +1 -1
- package/dist/{useHomeTo-Btkk0RSB.js → useHomeTo-DdmOGy09.js} +2 -2
- package/dist/{useHomeTo-Btkk0RSB.js.map → useHomeTo-DdmOGy09.js.map} +1 -1
- package/dist/{useHomeTo-BnjXms11.cjs → useHomeTo-HCkVzGTu.cjs} +2 -2
- package/dist/{useHomeTo-BnjXms11.cjs.map → useHomeTo-HCkVzGTu.cjs.map} +1 -1
- package/dist/useMediaQuery-CHMrI6Dy.cjs.map +1 -1
- package/dist/useMediaQuery-DrDUrkmJ.js.map +1 -1
- package/dist/{useOptionMenu-IebDGoqk.cjs → useOptionMenu-BqCj10_a.cjs} +2 -2
- package/dist/{useOptionMenu-IebDGoqk.cjs.map → useOptionMenu-BqCj10_a.cjs.map} +1 -1
- package/dist/{useOptionMenu-DeW68na-.js → useOptionMenu-EiyIkC3E.js} +5 -5
- package/dist/{useOptionMenu-DeW68na-.js.map → useOptionMenu-EiyIkC3E.js.map} +1 -1
- package/package.json +1 -1
- package/dist/AdminRoot-aOYQtzF0.js +0 -109
- package/dist/AdminRoot-aOYQtzF0.js.map +0 -1
- package/dist/AdminRoot-ajWIf94J.cjs +0 -2
- package/dist/AdminRoot-ajWIf94J.cjs.map +0 -1
- package/dist/Alert-5tpyGb2M.cjs +0 -2
- package/dist/Alert-5tpyGb2M.cjs.map +0 -1
- package/dist/Alert-Dz0sNGpz.js +0 -70
- package/dist/Alert-Dz0sNGpz.js.map +0 -1
- package/dist/Breadcrumbs-B6Pii2Y_.cjs.map +0 -1
- package/dist/Breadcrumbs-DKYJOdHZ.js.map +0 -1
- package/dist/Card-CIRGqg3P.cjs +0 -2
- package/dist/Card-CIRGqg3P.cjs.map +0 -1
- package/dist/Card-Co3A4Qgo.js +0 -128
- package/dist/Card-Co3A4Qgo.js.map +0 -1
- package/dist/Chip-BjSNgaAf.js.map +0 -1
- package/dist/Chip-Dp8skUZ2.cjs.map +0 -1
- package/dist/ChoiceCardGroup-143hR0v_.cjs +0 -2
- package/dist/ChoiceCardGroup-Cx8CtmPl.js +0 -180
- package/dist/ChoiceCardGroup-Cx8CtmPl.js.map +0 -1
- package/dist/CodeBlock-CcJjS0_q.js.map +0 -1
- package/dist/CodeBlock-o_VSkAek.cjs.map +0 -1
- package/dist/ColorPicker-DY6Vk1uS.cjs +0 -2
- package/dist/ConfigProvider-Bgu85MsI.js.map +0 -1
- package/dist/ConfigProvider-DELhJlqo.cjs +0 -2
- package/dist/ConfigProvider-DELhJlqo.cjs.map +0 -1
- package/dist/DatePicker-CwZ_-ElE.cjs +0 -2
- package/dist/DateTimePicker-C2871cuc.js.map +0 -1
- package/dist/DateTimePicker-DdEPtw9U.cjs +0 -2
- package/dist/DateTimePicker-DdEPtw9U.cjs.map +0 -1
- package/dist/DescriptionList-BP4CDME5.js.map +0 -1
- package/dist/DescriptionList-BWw0Fe6U.cjs.map +0 -1
- package/dist/FileCard-COc4rHe-.cjs.map +0 -1
- package/dist/FileCard-CWwB8CWF.js.map +0 -1
- package/dist/FileUploader--WOmlhSh.js.map +0 -1
- package/dist/FileUploader-Bqy_fV7l.cjs.map +0 -1
- package/dist/ListItem-Qo1Tt6Fi.cjs +0 -2
- package/dist/Modal--5EbLfMz.cjs.map +0 -1
- package/dist/Modal-Dfwc9eIq.js.map +0 -1
- package/dist/OtpField-Dy-LKTi9.js +0 -174
- package/dist/OtpField-Dy-LKTi9.js.map +0 -1
- package/dist/OtpField-KHwdaajC.cjs +0 -2
- package/dist/OtpField-KHwdaajC.cjs.map +0 -1
- package/dist/PageLayout-Bt6U_80d.cjs.map +0 -1
- package/dist/PageLayout-Df1SOlr7.js.map +0 -1
- package/dist/Pagination-DDMq_7OZ.js +0 -139
- package/dist/Pagination-DDMq_7OZ.js.map +0 -1
- package/dist/Pagination-UMeckhmY.cjs +0 -2
- package/dist/Pagination-UMeckhmY.cjs.map +0 -1
- package/dist/QrCode-B9YbQNVc.js +0 -80
- package/dist/QrCode-B9YbQNVc.js.map +0 -1
- package/dist/QrCode-CNVYpz9j.cjs +0 -2
- package/dist/QrCode-CNVYpz9j.cjs.map +0 -1
- package/dist/RichTextEditor-Dv-LDsN-.js.map +0 -1
- package/dist/RichTextEditor-lmPGowSR.cjs +0 -2
- package/dist/RichTextEditor-lmPGowSR.cjs.map +0 -1
- package/dist/RootLayout-B_ZtI-L_.cjs +0 -2
- package/dist/RootLayout-B_ZtI-L_.cjs.map +0 -1
- package/dist/RootLayout-DIOquzrU.js +0 -642
- package/dist/RootLayout-DIOquzrU.js.map +0 -1
- package/dist/Sidebar-CfEx7W7i.cjs +0 -2
- package/dist/Slider-0joKXhPo.cjs +0 -2
- package/dist/Slider-0joKXhPo.cjs.map +0 -1
- package/dist/Slider-CwZYxDO0.js +0 -184
- package/dist/Slider-CwZYxDO0.js.map +0 -1
- package/dist/Stepper-D7An-ugU.cjs.map +0 -1
- package/dist/Stepper-DYpiLhzD.js.map +0 -1
- package/dist/Table-BhaH8EKZ.cjs.map +0 -1
- package/dist/Table-DK4GBKS3.js.map +0 -1
- package/dist/TagsField-Cg9YVl7G.js.map +0 -1
- package/dist/TagsField-DwZLCIeb.cjs +0 -2
- package/dist/TagsField-DwZLCIeb.cjs.map +0 -1
- package/dist/TimePicker-_Ak5yB_5.cjs +0 -2
- package/dist/Toaster-Dput5iLU.js +0 -63
- package/dist/Toaster-Dput5iLU.js.map +0 -1
- package/dist/Toaster-fjyF8W3F.cjs +0 -2
- package/dist/Toaster-fjyF8W3F.cjs.map +0 -1
- package/dist/TranslatedFields-B-BU17IV.cjs +0 -2
- package/dist/TranslatedFields-B-BU17IV.cjs.map +0 -1
- package/dist/TranslatedFields-JnqLgUiF.js +0 -86
- package/dist/TranslatedFields-JnqLgUiF.js.map +0 -1
- package/dist/UserCard-B9bzkZph.cjs.map +0 -1
- package/dist/UserCard-DYK6S-nr.js.map +0 -1
- package/dist/messages-BasxRpyx.js.map +0 -1
- package/dist/messages-CElolVGm.cjs.map +0 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as D, useState as J, useRef as b, useEffect as R } from "react";
|
|
3
|
+
import { u as M } from "./formContext-B7ln1Miy.js";
|
|
4
|
+
import { b as j } from "./translations-D15tFHM1.js";
|
|
5
|
+
import { f as P } from "./messages-BiRLMy1E.js";
|
|
6
|
+
import { F as Q } from "./Flag-BEIqYQZg.js";
|
|
7
|
+
import { T as U } from "./Tabs-BxZrgozI.js";
|
|
8
|
+
import { a as X, i as Y, r as Z } from "./ConfigProvider-Dqfu7UBU.js";
|
|
9
|
+
const $ = "_fields_aawaf_4", ee = {
|
|
10
|
+
fields: $
|
|
11
|
+
}, ue = D(
|
|
12
|
+
function({
|
|
13
|
+
children: w,
|
|
14
|
+
locales: A,
|
|
15
|
+
namespace: K,
|
|
16
|
+
value: p,
|
|
17
|
+
defaultValue: N,
|
|
18
|
+
onChange: f,
|
|
19
|
+
showFlags: O = !0,
|
|
20
|
+
icon: W = "Global",
|
|
21
|
+
variant: k,
|
|
22
|
+
size: x,
|
|
23
|
+
"aria-label": L,
|
|
24
|
+
className: _,
|
|
25
|
+
style: q
|
|
26
|
+
}, i) {
|
|
27
|
+
var S;
|
|
28
|
+
const E = X(), I = L ?? E("translatedFields.label"), B = Y(), c = A ?? B, C = Z(), y = K ?? C, t = M(), T = p !== void 0, [G, H] = J(N), a = (T ? p : G) ?? ((S = c[0]) == null ? void 0 : S.code) ?? "", h = (e) => {
|
|
29
|
+
T || H(e), f == null || f(e);
|
|
30
|
+
}, l = (e) => j(e, "", y), V = (e) => !!t && Object.keys(t.errors).some(
|
|
31
|
+
(s) => s.startsWith(l(e)) && (t.isSubmitted || t.touched[s] === !0)
|
|
32
|
+
), v = b(null), g = (e) => {
|
|
33
|
+
v.current = e, typeof i == "function" ? i(e) : i && (i.current = e);
|
|
34
|
+
}, F = b(0), u = b(null);
|
|
35
|
+
if (R(() => {
|
|
36
|
+
const e = (t == null ? void 0 : t.submitCount) ?? 0;
|
|
37
|
+
if (!t || e === F.current) return;
|
|
38
|
+
F.current = e;
|
|
39
|
+
const s = Object.keys(t.errors);
|
|
40
|
+
if (s.length === 0) return;
|
|
41
|
+
const r = (n) => c.some((d) => n.startsWith(l(d.code)));
|
|
42
|
+
if (!s.every(r) || s.some((n) => n.startsWith(l(a)))) return;
|
|
43
|
+
const o = c.find((n) => s.some((d) => d.startsWith(l(n.code))));
|
|
44
|
+
o && o.code !== a && (u.current = o.code, h(o.code));
|
|
45
|
+
}, [t == null ? void 0 : t.submitCount]), R(() => {
|
|
46
|
+
var o;
|
|
47
|
+
if (u.current == null || u.current !== a) return;
|
|
48
|
+
u.current = null;
|
|
49
|
+
const e = v.current;
|
|
50
|
+
if (!e || !t) return;
|
|
51
|
+
const s = new Set(Object.keys(t.errors)), r = Array.from(e.querySelectorAll("[name]")).find(
|
|
52
|
+
(n) => s.has(n.getAttribute("name") ?? "")
|
|
53
|
+
);
|
|
54
|
+
(o = r == null ? void 0 : r.scrollIntoView) == null || o.call(r, { behavior: "smooth", block: "center" }), r == null || r.focus({ preventScroll: !0 });
|
|
55
|
+
}, [a]), c.length === 0) return null;
|
|
56
|
+
const z = c.map((e) => ({
|
|
57
|
+
value: e.code,
|
|
58
|
+
label: e.label ?? e.code,
|
|
59
|
+
// the locale's flag when it has one (and flags are enabled), else the fallback `icon` (Global)
|
|
60
|
+
icon: O && P(e.code) ? /* @__PURE__ */ m(Q, { code: e.code }) : W,
|
|
61
|
+
// an invalid locale shows the Tabs error dot (a small red dot — no full-tab tint)
|
|
62
|
+
error: V(e.code),
|
|
63
|
+
// keyed by locale so switching tabs remounts the fields (no value/state bleed between locales)
|
|
64
|
+
content: /* @__PURE__ */ m("div", { className: ee.fields, children: w((s) => j(e.code, s, y), e.code) }, e.code)
|
|
65
|
+
}));
|
|
66
|
+
return /* @__PURE__ */ m(
|
|
67
|
+
U,
|
|
68
|
+
{
|
|
69
|
+
ref: g,
|
|
70
|
+
className: _,
|
|
71
|
+
style: q,
|
|
72
|
+
items: z,
|
|
73
|
+
value: a,
|
|
74
|
+
onChange: h,
|
|
75
|
+
variant: k,
|
|
76
|
+
size: x,
|
|
77
|
+
queryKey: null,
|
|
78
|
+
"aria-label": I
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
export {
|
|
84
|
+
ue as T
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=TranslatedFields-BpWU5ZcG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TranslatedFields-BpWU5ZcG.js","sources":["../src/components/TranslatedFields/TranslatedFields.tsx"],"sourcesContent":["import { forwardRef, useEffect, useRef, useState, type CSSProperties, type ReactNode } from 'react'\nimport { useFormContext } from '../../form/formContext'\nimport { useLocales, useT, useTranslationsNamespace, type LocaleConfig } from '../../theme'\nimport { buildTranslationName } from '../../helpers/translations'\nimport { flagFor } from '../../i18n/messages'\nimport type { IconName } from '../../icons/names'\nimport { Flag } from '../Flag'\nimport { Tabs, type TabsSize, type TabsVariant } from '../Tabs'\nimport styles from './TranslatedFields.module.css'\n\n/** Builds a field's namespaced form name for the active locale (`(field) => name`). */\nexport type TranslatedFieldName = (field: string) => string\n\nexport interface TranslatedFieldsProps {\n /**\n * Render the fields for one locale. `name(field)` returns the namespaced form name to put on each\n * control (e.g. `translations[en-US].title`); `locale` is the active code. The same render runs per\n * locale, so the fields are identical bar their names.\n */\n children: (name: TranslatedFieldName, locale: string) => ReactNode\n /**\n * Locales (one tab each). Defaults to the app's configured locales\n * (`<ConfigProvider config={{ locales }}>`).\n */\n locales?: LocaleConfig[]\n /**\n * Top-level namespace for the field names (`<namespace>[<locale>].<field>`) and the nested object.\n * Falls back to `<ConfigProvider config={{ keys: { translationsNamespace } }}>`, then `'translations'`.\n * Pass to override per-instance (e.g. `'languages'`).\n */\n namespace?: string\n /** Controlled active locale code. */\n value?: string\n /** Initial active locale code (uncontrolled). Defaults to the first locale. */\n defaultValue?: string\n /** Fires with the next active locale code. */\n onChange?: (locale: string) => void\n /**\n * Show each locale's **flag** on its tab (matched by the language via `flagFor`). A language with no\n * built-in flag falls back to the `icon`. Defaults to `true`; pass `false` to always use `icon`.\n */\n showFlags?: boolean\n /** Fallback icon shown on a locale tab when its language has no flag (or `showFlags={false}`). Defaults to `'Global'`. */\n icon?: IconName\n /** Tab strip variant. Defaults to `Tabs`' default (`underline`). */\n variant?: TabsVariant\n /** Tab + field density. Defaults to `Tabs`' default (`md`). */\n size?: TabsSize\n /** Accessible label for the tablist. Defaults to the localized `translatedFields.label` (\"Translations\"). */\n 'aria-label'?: string\n className?: string\n style?: CSSProperties\n}\n\n/**\n * A tabbed group of **per-locale** form fields — one tab per content locale, each rendering the same\n * fields with locale-namespaced `name`s (`translations[<locale>].<field>` by default), so a `<Form>`\n * submits e.g. `translations[en-US].title` / `translations[ka-GE].title`. You supply the fields once\n * via a render function that receives a `name(field)` builder for the active locale; bring any field\n * component (`TextField`, `MultilineTextField`, a rich-text editor, …). Locales come from\n * `<ConfigProvider config={{ locales }}>` (override with the `locales` prop). The top-level word is the\n * `namespace` (default `'translations'`, e.g. `'languages'`). Each tab shows its language's **flag**\n * (matched via `flagFor`); a language with no built-in flag falls back to the `icon` (a `Global` icon by\n * default), and `showFlags={false}` uses the `icon` for every tab. While inside a `<Form>`, an incomplete\n * locale's tab shows a **dot**, and on submit the strip auto-advances to the first locale with errors\n * and focuses its field. Build the schema / defaults with `buildTranslations`; the form values stay\n * **flat** (`translations[en-US].title` — the `FormData` shape) — convert to/from the **nested** JSON\n * shape (`{ translations: { 'en-US': { title } } }`) with `nestTranslations` / `flattenTranslations`.\n * Requires the `Tabs` component.\n */\nexport const TranslatedFields = forwardRef<HTMLDivElement, TranslatedFieldsProps>(\n function TranslatedFields(\n {\n children,\n locales: localesProp,\n namespace: namespaceProp,\n value,\n defaultValue,\n onChange,\n showFlags = true,\n icon = 'Global',\n variant,\n size,\n 'aria-label': ariaLabelProp,\n className,\n style,\n },\n ref,\n ) {\n const t = useT()\n const ariaLabel = ariaLabelProp ?? t('translatedFields.label')\n const configLocales = useLocales()\n const locales = localesProp ?? configLocales\n // namespace: the `namespace` prop wins, else the ConfigProvider's (which falls back to the default)\n const configNamespace = useTranslationsNamespace()\n const namespace = namespaceProp ?? configNamespace\n const form = useFormContext()\n\n // active locale — controlled (`value`) or internal; falls back to the first locale\n const isControlled = value !== undefined\n const [internal, setInternal] = useState<string | undefined>(defaultValue)\n const active = (isControlled ? value : internal) ?? locales[0]?.code ?? ''\n const setActive = (next: string) => {\n if (!isControlled) setInternal(next)\n onChange?.(next)\n }\n\n // the namespaced-name prefix for a locale (e.g. `translations[en-US].`)\n const prefixOf = (code: string) => buildTranslationName(code, '', namespace)\n // a locale's tab is flagged when any of its fields is invalid AND the error is shown (submitted/touched)\n const localeHasError = (code: string): boolean =>\n !!form &&\n Object.keys(form.errors).some(\n (key) => key.startsWith(prefixOf(code)) && (form.isSubmitted || form.touched[key] === true),\n )\n\n // merge the forwarded ref with an internal one (to query the mounted fields for scroll/focus)\n const rootRef = useRef<HTMLDivElement | null>(null)\n const setRootRef = (node: HTMLDivElement | null) => {\n rootRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as { current: HTMLDivElement | null }).current = node\n }\n\n // on each submit, if the active tab is complete but another locale has the only remaining errors,\n // switch to it and focus its first invalid field (the form's own scroll can't reach an unmounted tab)\n const lastSubmit = useRef(0)\n const pendingFocus = useRef<string | null>(null)\n useEffect(() => {\n const count = form?.submitCount ?? 0\n if (!form || count === lastSubmit.current) return\n lastSubmit.current = count\n const errorKeys = Object.keys(form.errors)\n if (errorKeys.length === 0) return\n const isTranslationKey = (k: string) => locales.some((l) => k.startsWith(prefixOf(l.code)))\n // a non-translation field is still invalid → the form's scroll-to-error handles it (above the tabs)\n if (!errorKeys.every(isTranslationKey)) return\n // active locale already shows its (mounted) errors → nothing to switch to\n if (errorKeys.some((k) => k.startsWith(prefixOf(active)))) return\n const firstBad = locales.find((l) => errorKeys.some((k) => k.startsWith(prefixOf(l.code))))\n if (firstBad && firstBad.code !== active) {\n pendingFocus.current = firstBad.code\n setActive(firstBad.code)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [form?.submitCount])\n\n // once the auto-switched tab has mounted, focus its first invalid field\n useEffect(() => {\n if (pendingFocus.current == null || pendingFocus.current !== active) return\n pendingFocus.current = null\n const root = rootRef.current\n if (!root || !form) return\n const errorKeys = new Set(Object.keys(form.errors))\n const target = Array.from(root.querySelectorAll<HTMLElement>('[name]')).find((el) =>\n errorKeys.has(el.getAttribute('name') ?? ''),\n )\n target?.scrollIntoView?.({ behavior: 'smooth', block: 'center' })\n target?.focus({ preventScroll: true })\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [active])\n\n if (locales.length === 0) return null\n\n const items = locales.map((loc) => ({\n value: loc.code,\n label: loc.label ?? loc.code,\n // the locale's flag when it has one (and flags are enabled), else the fallback `icon` (Global)\n icon: showFlags && flagFor(loc.code) ? <Flag code={loc.code} /> : icon,\n // an invalid locale shows the Tabs error dot (a small red dot — no full-tab tint)\n error: localeHasError(loc.code),\n // keyed by locale so switching tabs remounts the fields (no value/state bleed between locales)\n content: (\n <div key={loc.code} className={styles.fields}>\n {children((field) => buildTranslationName(loc.code, field, namespace), loc.code)}\n </div>\n ),\n }))\n\n return (\n <Tabs\n ref={setRootRef}\n className={className}\n style={style}\n items={items}\n value={active}\n onChange={setActive}\n variant={variant}\n size={size}\n // locale tabs are internal UI — never sync them to the page URL\n queryKey={null}\n aria-label={ariaLabel}\n />\n )\n },\n)\n"],"names":["TranslatedFields","forwardRef","children","localesProp","namespaceProp","value","defaultValue","onChange","showFlags","icon","variant","size","ariaLabelProp","className","style","ref","t","useT","ariaLabel","configLocales","useLocales","locales","configNamespace","useTranslationsNamespace","namespace","form","useFormContext","isControlled","internal","setInternal","useState","active","_a","setActive","next","prefixOf","code","buildTranslationName","localeHasError","key","rootRef","useRef","setRootRef","node","lastSubmit","pendingFocus","useEffect","count","errorKeys","isTranslationKey","k","l","firstBad","root","target","el","items","loc","flagFor","jsx","Flag","styles","field","Tabs"],"mappings":";;;;;;;;;;GAsEaA,KAAmBC;AAAA,EAC9B,SACE;AAAA,IACE,UAAAC;AAAA,IACA,SAASC;AAAA,IACT,WAAWC;AAAA,IACX,OAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,MAAAC,IAAO;AAAA,IACP,SAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAcC;AAAA,IACd,WAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,GAEFC,GACA;;AACA,UAAMC,IAAIC,EAAA,GACJC,IAAYN,KAAiBI,EAAE,wBAAwB,GACvDG,IAAgBC,EAAA,GAChBC,IAAUlB,KAAegB,GAEzBG,IAAkBC,EAAA,GAClBC,IAAYpB,KAAiBkB,GAC7BG,IAAOC,EAAA,GAGPC,IAAetB,MAAU,QACzB,CAACuB,GAAUC,CAAW,IAAIC,EAA6BxB,CAAY,GACnEyB,KAAUJ,IAAetB,IAAQuB,QAAaI,IAAAX,EAAQ,CAAC,MAAT,gBAAAW,EAAY,SAAQ,IAClEC,IAAY,CAACC,MAAiB;AAClC,MAAKP,KAAcE,EAAYK,CAAI,GACnC3B,KAAA,QAAAA,EAAW2B;AAAA,IACb,GAGMC,IAAW,CAACC,MAAiBC,EAAqBD,GAAM,IAAIZ,CAAS,GAErEc,IAAiB,CAACF,MACtB,CAAC,CAACX,KACF,OAAO,KAAKA,EAAK,MAAM,EAAE;AAAA,MACvB,CAACc,MAAQA,EAAI,WAAWJ,EAASC,CAAI,CAAC,MAAMX,EAAK,eAAeA,EAAK,QAAQc,CAAG,MAAM;AAAA,IAAA,GAIpFC,IAAUC,EAA8B,IAAI,GAC5CC,IAAa,CAACC,MAAgC;AAClD,MAAAH,EAAQ,UAAUG,GACd,OAAO5B,KAAQ,aAAYA,EAAI4B,CAAI,IAC9B5B,MAAMA,EAA2C,UAAU4B;AAAA,IACtE,GAIMC,IAAaH,EAAO,CAAC,GACrBI,IAAeJ,EAAsB,IAAI;AAmC/C,QAlCAK,EAAU,MAAM;AACd,YAAMC,KAAQtB,KAAA,gBAAAA,EAAM,gBAAe;AACnC,UAAI,CAACA,KAAQsB,MAAUH,EAAW,QAAS;AAC3C,MAAAA,EAAW,UAAUG;AACrB,YAAMC,IAAY,OAAO,KAAKvB,EAAK,MAAM;AACzC,UAAIuB,EAAU,WAAW,EAAG;AAC5B,YAAMC,IAAmB,CAACC,MAAc7B,EAAQ,KAAK,CAAC8B,MAAMD,EAAE,WAAWf,EAASgB,EAAE,IAAI,CAAC,CAAC;AAI1F,UAFI,CAACH,EAAU,MAAMC,CAAgB,KAEjCD,EAAU,KAAK,CAACE,MAAMA,EAAE,WAAWf,EAASJ,CAAM,CAAC,CAAC,EAAG;AAC3D,YAAMqB,IAAW/B,EAAQ,KAAK,CAAC8B,MAAMH,EAAU,KAAK,CAACE,MAAMA,EAAE,WAAWf,EAASgB,EAAE,IAAI,CAAC,CAAC,CAAC;AAC1F,MAAIC,KAAYA,EAAS,SAASrB,MAChCc,EAAa,UAAUO,EAAS,MAChCnB,EAAUmB,EAAS,IAAI;AAAA,IAG3B,GAAG,CAAC3B,KAAA,gBAAAA,EAAM,WAAW,CAAC,GAGtBqB,EAAU,MAAM;;AACd,UAAID,EAAa,WAAW,QAAQA,EAAa,YAAYd,EAAQ;AACrE,MAAAc,EAAa,UAAU;AACvB,YAAMQ,IAAOb,EAAQ;AACrB,UAAI,CAACa,KAAQ,CAAC5B,EAAM;AACpB,YAAMuB,IAAY,IAAI,IAAI,OAAO,KAAKvB,EAAK,MAAM,CAAC,GAC5C6B,IAAS,MAAM,KAAKD,EAAK,iBAA8B,QAAQ,CAAC,EAAE;AAAA,QAAK,CAACE,MAC5EP,EAAU,IAAIO,EAAG,aAAa,MAAM,KAAK,EAAE;AAAA,MAAA;AAE7C,OAAAvB,IAAAsB,KAAA,gBAAAA,EAAQ,mBAAR,QAAAtB,EAAA,KAAAsB,GAAyB,EAAE,UAAU,UAAU,OAAO,aACtDA,KAAA,QAAAA,EAAQ,MAAM,EAAE,eAAe,GAAA;AAAA,IAEjC,GAAG,CAACvB,CAAM,CAAC,GAEPV,EAAQ,WAAW,EAAG,QAAO;AAEjC,UAAMmC,IAAQnC,EAAQ,IAAI,CAACoC,OAAS;AAAA,MAClC,OAAOA,EAAI;AAAA,MACX,OAAOA,EAAI,SAASA,EAAI;AAAA;AAAA,MAExB,MAAMjD,KAAakD,EAAQD,EAAI,IAAI,IAAI,gBAAAE,EAACC,GAAA,EAAK,MAAMH,EAAI,KAAA,CAAM,IAAKhD;AAAA;AAAA,MAElE,OAAO6B,EAAemB,EAAI,IAAI;AAAA;AAAA,MAE9B,SACE,gBAAAE,EAAC,OAAA,EAAmB,WAAWE,GAAO,QACnC,YAAS,CAACC,MAAUzB,EAAqBoB,EAAI,MAAMK,GAAOtC,CAAS,GAAGiC,EAAI,IAAI,KADvEA,EAAI,IAEd;AAAA,IAAA,EAEF;AAEF,WACE,gBAAAE;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,KAAKrB;AAAA,QACL,WAAA7B;AAAA,QACA,OAAAC;AAAA,QACA,OAAA0C;AAAA,QACA,OAAOzB;AAAA,QACP,UAAUE;AAAA,QACV,SAAAvB;AAAA,QACA,MAAAC;AAAA,QAEA,UAAU;AAAA,QACV,cAAYO;AAAA,MAAA;AAAA,IAAA;AAAA,EAGlB;AACF;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const b=require("react/jsx-runtime"),c=require("react"),z=require("./formContext-bTWrqdEV.cjs"),j=require("./translations-CXEeeUDL.cjs"),D=require("./messages-C_fRRCg6.cjs"),J=require("./Flag-B1ZvZVXi.cjs"),M=require("./Tabs-C4kB1yfG.cjs"),y=require("./ConfigProvider-Ci9Q2HLF.cjs"),Q="_fields_aawaf_4",U={fields:Q},X=c.forwardRef(function({children:x,locales:S,namespace:N,value:q,defaultValue:w,onChange:f,showFlags:A=!0,icon:K="Global",variant:O,size:W,"aria-label":g,className:k,style:C},l){var R;const E=y.useT(),L=g??E("translatedFields.label"),_=y.useLocales(),i=S??_,I=y.useTranslationsNamespace(),T=N??I,s=z.useFormContext(),p=q!==void 0,[B,G]=c.useState(w),a=(p?q:B)??((R=i[0])==null?void 0:R.code)??"",v=e=>{p||G(e),f==null||f(e)},u=e=>j.buildTranslationName(e,"",T),H=e=>!!s&&Object.keys(s.errors).some(t=>t.startsWith(u(e))&&(s.isSubmitted||s.touched[t]===!0)),F=c.useRef(null),P=e=>{F.current=e,typeof l=="function"?l(e):l&&(l.current=e)},h=c.useRef(0),d=c.useRef(null);if(c.useEffect(()=>{const e=(s==null?void 0:s.submitCount)??0;if(!s||e===h.current)return;h.current=e;const t=Object.keys(s.errors);if(t.length===0)return;const r=o=>i.some(m=>o.startsWith(u(m.code)));if(!t.every(r)||t.some(o=>o.startsWith(u(a))))return;const n=i.find(o=>t.some(m=>m.startsWith(u(o.code))));n&&n.code!==a&&(d.current=n.code,v(n.code))},[s==null?void 0:s.submitCount]),c.useEffect(()=>{var n;if(d.current==null||d.current!==a)return;d.current=null;const e=F.current;if(!e||!s)return;const t=new Set(Object.keys(s.errors)),r=Array.from(e.querySelectorAll("[name]")).find(o=>t.has(o.getAttribute("name")??""));(n=r==null?void 0:r.scrollIntoView)==null||n.call(r,{behavior:"smooth",block:"center"}),r==null||r.focus({preventScroll:!0})},[a]),i.length===0)return null;const V=i.map(e=>({value:e.code,label:e.label??e.code,icon:A&&D.flagFor(e.code)?b.jsx(J.Flag,{code:e.code}):K,error:H(e.code),content:b.jsx("div",{className:U.fields,children:x(t=>j.buildTranslationName(e.code,t,T),e.code)},e.code)}));return b.jsx(M.Tabs,{ref:P,className:k,style:C,items:V,value:a,onChange:v,variant:O,size:W,queryKey:null,"aria-label":L})});exports.TranslatedFields=X;
|
|
2
|
+
//# sourceMappingURL=TranslatedFields-SvS37hab.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TranslatedFields-SvS37hab.cjs","sources":["../src/components/TranslatedFields/TranslatedFields.tsx"],"sourcesContent":["import { forwardRef, useEffect, useRef, useState, type CSSProperties, type ReactNode } from 'react'\nimport { useFormContext } from '../../form/formContext'\nimport { useLocales, useT, useTranslationsNamespace, type LocaleConfig } from '../../theme'\nimport { buildTranslationName } from '../../helpers/translations'\nimport { flagFor } from '../../i18n/messages'\nimport type { IconName } from '../../icons/names'\nimport { Flag } from '../Flag'\nimport { Tabs, type TabsSize, type TabsVariant } from '../Tabs'\nimport styles from './TranslatedFields.module.css'\n\n/** Builds a field's namespaced form name for the active locale (`(field) => name`). */\nexport type TranslatedFieldName = (field: string) => string\n\nexport interface TranslatedFieldsProps {\n /**\n * Render the fields for one locale. `name(field)` returns the namespaced form name to put on each\n * control (e.g. `translations[en-US].title`); `locale` is the active code. The same render runs per\n * locale, so the fields are identical bar their names.\n */\n children: (name: TranslatedFieldName, locale: string) => ReactNode\n /**\n * Locales (one tab each). Defaults to the app's configured locales\n * (`<ConfigProvider config={{ locales }}>`).\n */\n locales?: LocaleConfig[]\n /**\n * Top-level namespace for the field names (`<namespace>[<locale>].<field>`) and the nested object.\n * Falls back to `<ConfigProvider config={{ keys: { translationsNamespace } }}>`, then `'translations'`.\n * Pass to override per-instance (e.g. `'languages'`).\n */\n namespace?: string\n /** Controlled active locale code. */\n value?: string\n /** Initial active locale code (uncontrolled). Defaults to the first locale. */\n defaultValue?: string\n /** Fires with the next active locale code. */\n onChange?: (locale: string) => void\n /**\n * Show each locale's **flag** on its tab (matched by the language via `flagFor`). A language with no\n * built-in flag falls back to the `icon`. Defaults to `true`; pass `false` to always use `icon`.\n */\n showFlags?: boolean\n /** Fallback icon shown on a locale tab when its language has no flag (or `showFlags={false}`). Defaults to `'Global'`. */\n icon?: IconName\n /** Tab strip variant. Defaults to `Tabs`' default (`underline`). */\n variant?: TabsVariant\n /** Tab + field density. Defaults to `Tabs`' default (`md`). */\n size?: TabsSize\n /** Accessible label for the tablist. Defaults to the localized `translatedFields.label` (\"Translations\"). */\n 'aria-label'?: string\n className?: string\n style?: CSSProperties\n}\n\n/**\n * A tabbed group of **per-locale** form fields — one tab per content locale, each rendering the same\n * fields with locale-namespaced `name`s (`translations[<locale>].<field>` by default), so a `<Form>`\n * submits e.g. `translations[en-US].title` / `translations[ka-GE].title`. You supply the fields once\n * via a render function that receives a `name(field)` builder for the active locale; bring any field\n * component (`TextField`, `MultilineTextField`, a rich-text editor, …). Locales come from\n * `<ConfigProvider config={{ locales }}>` (override with the `locales` prop). The top-level word is the\n * `namespace` (default `'translations'`, e.g. `'languages'`). Each tab shows its language's **flag**\n * (matched via `flagFor`); a language with no built-in flag falls back to the `icon` (a `Global` icon by\n * default), and `showFlags={false}` uses the `icon` for every tab. While inside a `<Form>`, an incomplete\n * locale's tab shows a **dot**, and on submit the strip auto-advances to the first locale with errors\n * and focuses its field. Build the schema / defaults with `buildTranslations`; the form values stay\n * **flat** (`translations[en-US].title` — the `FormData` shape) — convert to/from the **nested** JSON\n * shape (`{ translations: { 'en-US': { title } } }`) with `nestTranslations` / `flattenTranslations`.\n * Requires the `Tabs` component.\n */\nexport const TranslatedFields = forwardRef<HTMLDivElement, TranslatedFieldsProps>(\n function TranslatedFields(\n {\n children,\n locales: localesProp,\n namespace: namespaceProp,\n value,\n defaultValue,\n onChange,\n showFlags = true,\n icon = 'Global',\n variant,\n size,\n 'aria-label': ariaLabelProp,\n className,\n style,\n },\n ref,\n ) {\n const t = useT()\n const ariaLabel = ariaLabelProp ?? t('translatedFields.label')\n const configLocales = useLocales()\n const locales = localesProp ?? configLocales\n // namespace: the `namespace` prop wins, else the ConfigProvider's (which falls back to the default)\n const configNamespace = useTranslationsNamespace()\n const namespace = namespaceProp ?? configNamespace\n const form = useFormContext()\n\n // active locale — controlled (`value`) or internal; falls back to the first locale\n const isControlled = value !== undefined\n const [internal, setInternal] = useState<string | undefined>(defaultValue)\n const active = (isControlled ? value : internal) ?? locales[0]?.code ?? ''\n const setActive = (next: string) => {\n if (!isControlled) setInternal(next)\n onChange?.(next)\n }\n\n // the namespaced-name prefix for a locale (e.g. `translations[en-US].`)\n const prefixOf = (code: string) => buildTranslationName(code, '', namespace)\n // a locale's tab is flagged when any of its fields is invalid AND the error is shown (submitted/touched)\n const localeHasError = (code: string): boolean =>\n !!form &&\n Object.keys(form.errors).some(\n (key) => key.startsWith(prefixOf(code)) && (form.isSubmitted || form.touched[key] === true),\n )\n\n // merge the forwarded ref with an internal one (to query the mounted fields for scroll/focus)\n const rootRef = useRef<HTMLDivElement | null>(null)\n const setRootRef = (node: HTMLDivElement | null) => {\n rootRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as { current: HTMLDivElement | null }).current = node\n }\n\n // on each submit, if the active tab is complete but another locale has the only remaining errors,\n // switch to it and focus its first invalid field (the form's own scroll can't reach an unmounted tab)\n const lastSubmit = useRef(0)\n const pendingFocus = useRef<string | null>(null)\n useEffect(() => {\n const count = form?.submitCount ?? 0\n if (!form || count === lastSubmit.current) return\n lastSubmit.current = count\n const errorKeys = Object.keys(form.errors)\n if (errorKeys.length === 0) return\n const isTranslationKey = (k: string) => locales.some((l) => k.startsWith(prefixOf(l.code)))\n // a non-translation field is still invalid → the form's scroll-to-error handles it (above the tabs)\n if (!errorKeys.every(isTranslationKey)) return\n // active locale already shows its (mounted) errors → nothing to switch to\n if (errorKeys.some((k) => k.startsWith(prefixOf(active)))) return\n const firstBad = locales.find((l) => errorKeys.some((k) => k.startsWith(prefixOf(l.code))))\n if (firstBad && firstBad.code !== active) {\n pendingFocus.current = firstBad.code\n setActive(firstBad.code)\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [form?.submitCount])\n\n // once the auto-switched tab has mounted, focus its first invalid field\n useEffect(() => {\n if (pendingFocus.current == null || pendingFocus.current !== active) return\n pendingFocus.current = null\n const root = rootRef.current\n if (!root || !form) return\n const errorKeys = new Set(Object.keys(form.errors))\n const target = Array.from(root.querySelectorAll<HTMLElement>('[name]')).find((el) =>\n errorKeys.has(el.getAttribute('name') ?? ''),\n )\n target?.scrollIntoView?.({ behavior: 'smooth', block: 'center' })\n target?.focus({ preventScroll: true })\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [active])\n\n if (locales.length === 0) return null\n\n const items = locales.map((loc) => ({\n value: loc.code,\n label: loc.label ?? loc.code,\n // the locale's flag when it has one (and flags are enabled), else the fallback `icon` (Global)\n icon: showFlags && flagFor(loc.code) ? <Flag code={loc.code} /> : icon,\n // an invalid locale shows the Tabs error dot (a small red dot — no full-tab tint)\n error: localeHasError(loc.code),\n // keyed by locale so switching tabs remounts the fields (no value/state bleed between locales)\n content: (\n <div key={loc.code} className={styles.fields}>\n {children((field) => buildTranslationName(loc.code, field, namespace), loc.code)}\n </div>\n ),\n }))\n\n return (\n <Tabs\n ref={setRootRef}\n className={className}\n style={style}\n items={items}\n value={active}\n onChange={setActive}\n variant={variant}\n size={size}\n // locale tabs are internal UI — never sync them to the page URL\n queryKey={null}\n aria-label={ariaLabel}\n />\n )\n },\n)\n"],"names":["TranslatedFields","forwardRef","children","localesProp","namespaceProp","value","defaultValue","onChange","showFlags","icon","variant","size","ariaLabelProp","className","style","ref","t","useT","ariaLabel","configLocales","useLocales","locales","configNamespace","useTranslationsNamespace","namespace","form","useFormContext","isControlled","internal","setInternal","useState","active","_a","setActive","next","prefixOf","code","buildTranslationName","localeHasError","key","rootRef","useRef","setRootRef","node","lastSubmit","pendingFocus","useEffect","count","errorKeys","isTranslationKey","k","l","firstBad","root","target","el","items","loc","flagFor","jsx","Flag","styles","field","Tabs"],"mappings":"yUAsEaA,EAAmBC,EAAAA,WAC9B,SACE,CACE,SAAAC,EACA,QAASC,EACT,UAAWC,EACX,MAAAC,EACA,aAAAC,EACA,SAAAC,EACA,UAAAC,EAAY,GACZ,KAAAC,EAAO,SACP,QAAAC,EACA,KAAAC,EACA,aAAcC,EACd,UAAAC,EACA,MAAAC,CAAA,EAEFC,EACA,OACA,MAAMC,EAAIC,EAAAA,KAAA,EACJC,EAAYN,GAAiBI,EAAE,wBAAwB,EACvDG,EAAgBC,EAAAA,WAAA,EAChBC,EAAUlB,GAAegB,EAEzBG,EAAkBC,EAAAA,yBAAA,EAClBC,EAAYpB,GAAiBkB,EAC7BG,EAAOC,EAAAA,eAAA,EAGPC,EAAetB,IAAU,OACzB,CAACuB,EAAUC,CAAW,EAAIC,EAAAA,SAA6BxB,CAAY,EACnEyB,GAAUJ,EAAetB,EAAQuB,MAAaI,EAAAX,EAAQ,CAAC,IAAT,YAAAW,EAAY,OAAQ,GAClEC,EAAaC,GAAiB,CAC7BP,GAAcE,EAAYK,CAAI,EACnC3B,GAAA,MAAAA,EAAW2B,EACb,EAGMC,EAAYC,GAAiBC,EAAAA,qBAAqBD,EAAM,GAAIZ,CAAS,EAErEc,EAAkBF,GACtB,CAAC,CAACX,GACF,OAAO,KAAKA,EAAK,MAAM,EAAE,KACtBc,GAAQA,EAAI,WAAWJ,EAASC,CAAI,CAAC,IAAMX,EAAK,aAAeA,EAAK,QAAQc,CAAG,IAAM,GAAA,EAIpFC,EAAUC,EAAAA,OAA8B,IAAI,EAC5CC,EAAcC,GAAgC,CAClDH,EAAQ,QAAUG,EACd,OAAO5B,GAAQ,WAAYA,EAAI4B,CAAI,EAC9B5B,IAAMA,EAA2C,QAAU4B,EACtE,EAIMC,EAAaH,EAAAA,OAAO,CAAC,EACrBI,EAAeJ,EAAAA,OAAsB,IAAI,EAmC/C,GAlCAK,EAAAA,UAAU,IAAM,CACd,MAAMC,GAAQtB,GAAA,YAAAA,EAAM,cAAe,EACnC,GAAI,CAACA,GAAQsB,IAAUH,EAAW,QAAS,OAC3CA,EAAW,QAAUG,EACrB,MAAMC,EAAY,OAAO,KAAKvB,EAAK,MAAM,EACzC,GAAIuB,EAAU,SAAW,EAAG,OAC5B,MAAMC,EAAoBC,GAAc7B,EAAQ,KAAM8B,GAAMD,EAAE,WAAWf,EAASgB,EAAE,IAAI,CAAC,CAAC,EAI1F,GAFI,CAACH,EAAU,MAAMC,CAAgB,GAEjCD,EAAU,KAAME,GAAMA,EAAE,WAAWf,EAASJ,CAAM,CAAC,CAAC,EAAG,OAC3D,MAAMqB,EAAW/B,EAAQ,KAAM8B,GAAMH,EAAU,KAAME,GAAMA,EAAE,WAAWf,EAASgB,EAAE,IAAI,CAAC,CAAC,CAAC,EACtFC,GAAYA,EAAS,OAASrB,IAChCc,EAAa,QAAUO,EAAS,KAChCnB,EAAUmB,EAAS,IAAI,EAG3B,EAAG,CAAC3B,GAAA,YAAAA,EAAM,WAAW,CAAC,EAGtBqB,EAAAA,UAAU,IAAM,OACd,GAAID,EAAa,SAAW,MAAQA,EAAa,UAAYd,EAAQ,OACrEc,EAAa,QAAU,KACvB,MAAMQ,EAAOb,EAAQ,QACrB,GAAI,CAACa,GAAQ,CAAC5B,EAAM,OACpB,MAAMuB,EAAY,IAAI,IAAI,OAAO,KAAKvB,EAAK,MAAM,CAAC,EAC5C6B,EAAS,MAAM,KAAKD,EAAK,iBAA8B,QAAQ,CAAC,EAAE,KAAME,GAC5EP,EAAU,IAAIO,EAAG,aAAa,MAAM,GAAK,EAAE,CAAA,GAE7CvB,EAAAsB,GAAA,YAAAA,EAAQ,iBAAR,MAAAtB,EAAA,KAAAsB,EAAyB,CAAE,SAAU,SAAU,MAAO,WACtDA,GAAA,MAAAA,EAAQ,MAAM,CAAE,cAAe,EAAA,EAEjC,EAAG,CAACvB,CAAM,CAAC,EAEPV,EAAQ,SAAW,EAAG,OAAO,KAEjC,MAAMmC,EAAQnC,EAAQ,IAAKoC,IAAS,CAClC,MAAOA,EAAI,KACX,MAAOA,EAAI,OAASA,EAAI,KAExB,KAAMjD,GAAakD,EAAAA,QAAQD,EAAI,IAAI,EAAIE,EAAAA,IAACC,EAAAA,KAAA,CAAK,KAAMH,EAAI,IAAA,CAAM,EAAKhD,EAElE,MAAO6B,EAAemB,EAAI,IAAI,EAE9B,QACEE,EAAAA,IAAC,MAAA,CAAmB,UAAWE,EAAO,OACnC,WAAUC,GAAUzB,EAAAA,qBAAqBoB,EAAI,KAAMK,EAAOtC,CAAS,EAAGiC,EAAI,IAAI,GADvEA,EAAI,IAEd,CAAA,EAEF,EAEF,OACEE,EAAAA,IAACI,EAAAA,KAAA,CACC,IAAKrB,EACL,UAAA7B,EACA,MAAAC,EACA,MAAA0C,EACA,MAAOzB,EACP,SAAUE,EACV,QAAAvB,EACA,KAAAC,EAEA,SAAU,KACV,aAAYO,CAAA,CAAA,CAGlB,CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),q=require("react"),p=require("clsx"),g=require("./Avatar-l48Ice6t.cjs"),C=require("./Button-
|
|
2
|
-
//# sourceMappingURL=UserCard-
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),q=require("react"),p=require("clsx"),g=require("./Avatar-l48Ice6t.cjs"),C=require("./Button-Q_5uA-zc.cjs"),S=require("./Icon-B6lz-V0A.cjs"),a=require("./Skeleton-DK0lAjS9.cjs"),d=require("./Typography-d97DdbNd.cjs"),w=require("./ConfigProvider-Ci9Q2HLF.cjs"),T="_card_1fykc_3",U="_identity_1fykc_16",b="_text_1fykc_20",I="_sm_1fykc_33",N="_lg_1fykc_37",s={card:T,identity:U,text:b,sm:I,lg:N},A=q.forwardRef(function({name:c,email:n,avatar:l,icon:u="User",color:y="primary",size:e="md",onLogout:i,logoutLabel:x,children:m,loading:r=!1,className:_,style:f,...h},v){const o=w.useT(),j=e==="lg"?"lg":e==="sm"?"sm":"md",k=e==="lg"?"md":"sm";return t.jsxs("div",{ref:v,className:p.clsx(s.card,s[e],_),style:f,"aria-busy":r||void 0,...h,children:[t.jsxs("div",{className:s.identity,children:[t.jsx(g.Avatar,{size:j,name:c,src:l,icon:c?void 0:u,color:y,loading:r}),t.jsxs("div",{className:s.text,children:[t.jsx(d.Typography,{variant:"bodySmall",truncate:!0,children:r?t.jsx(a.Skeleton,{width:"60%"}):c??o("userCard.welcome")}),(r||n!=null)&&t.jsx(d.Typography,{variant:"caption",color:"muted",truncate:!0,children:r?t.jsx(a.Skeleton,{width:"85%"}):n})]})]}),m,i?t.jsx(C.Button,{variant:"filled",color:"error",size:k,fullWidth:!0,startIcon:t.jsx(S.Icon,{name:"Logout2"}),onClick:i,children:x??o("userCard.signOut")}):null]})});exports.UserCard=A;
|
|
2
|
+
//# sourceMappingURL=UserCard-VPaexedS.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserCard-VPaexedS.cjs","sources":["../src/components/UserCard/UserCard.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport type { IconName } from '../../icons/names'\nimport { Avatar } from '../Avatar'\nimport { Button } from '../Button'\nimport { Icon } from '../Icon'\nimport { Skeleton } from '../Skeleton'\nimport { Typography } from '../Typography'\nimport styles from './UserCard.module.css'\n\nexport type UserCardSize = 'sm' | 'md' | 'lg'\n\nexport interface UserCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {\n /**\n * Display name — the primary line, and the source of the avatar initials. When omitted, the primary\n * line falls back to a localized **\"Welcome\"** greeting (and the avatar shows the `icon`).\n */\n name?: string\n /** Secondary line under the name (usually the email). */\n email?: ReactNode\n /** Avatar image URL (falls back to the initials from `name`, else the `icon`). */\n avatar?: string\n /** Fallback avatar icon when there's no image or name. Defaults to `'User'`. */\n icon?: IconName\n /** Theme palette token tinting the avatar. Defaults to `'primary'`. */\n color?: ThemeColor\n /** Preset size (avatar + button + card padding; the text stays fixed). Defaults to `'md'`. */\n size?: UserCardSize\n /** When provided, a **Sign out** button is shown that calls this. */\n onLogout?: () => void\n /** Sign-out button label. Defaults to `'Sign Out'`. */\n logoutLabel?: ReactNode\n /** Extra content between the identity row and the sign-out button (e.g. a link or menu). */\n children?: ReactNode\n /** Show skeletons for the avatar, name and email while the user is being fetched (sign-out stays usable). Defaults to `false`. */\n loading?: boolean\n}\n\n/**\n * A compact account card — an `Avatar` + name/email and an optional **Sign out** button — for a consistent\n * signed-in-user block across apps, instead of hand-rolling the markup each time. The shell's sidebar renders\n * one itself (`config.sidebar.userCard` / the `RootLayout` `showUserCard` prop), so place it by hand only\n * elsewhere. Shows the image (`avatar`) → initials (from `name`) →\n * `icon` (default `User`) in priority order; renders the sign-out `Button` (filled `error`) only when\n * `onLogout` is given. `size` (`sm`/`md`/`lg`) scales the avatar, button and padding; `color` (default `primary`)\n * tints the avatar. `loading` swaps the avatar + name + email for skeletons. Own CSS module (token-only).\n */\nexport const UserCard = forwardRef<HTMLDivElement, UserCardProps>(function UserCard(\n {\n name,\n email,\n avatar,\n icon = 'User',\n color = 'primary',\n size = 'md',\n onLogout,\n logoutLabel,\n children,\n loading = false,\n className,\n style,\n ...props\n },\n ref,\n) {\n const t = useT()\n // the identity row + the sign-out button share the same visual size step\n const avatarSize = size === 'lg' ? 'lg' : size === 'sm' ? 'sm' : 'md'\n const buttonSize = size === 'lg' ? 'md' : 'sm'\n\n return (\n <div\n ref={ref}\n className={clsx(styles.card, styles[size], className)}\n style={style as CSSProperties}\n aria-busy={loading || undefined}\n {...props}\n >\n <div className={styles.identity}>\n {/* Avatar priority is image → icon → initials, so pass `icon` only as the last resort (no\n name), otherwise a name would still show the icon instead of its initials */}\n <Avatar\n size={avatarSize}\n name={name}\n src={avatar}\n icon={name ? undefined : icon}\n color={color}\n loading={loading}\n />\n <div className={styles.text}>\n {/* primary line: the name, or a \"Welcome\" greeting fallback when no name is given */}\n <Typography variant=\"bodySmall\" truncate>\n {loading ? <Skeleton width=\"60%\" /> : (name ?? t('userCard.welcome'))}\n </Typography>\n {(loading || email != null) && (\n <Typography variant=\"caption\" color=\"muted\" truncate>\n {loading ? <Skeleton width=\"85%\" /> : email}\n </Typography>\n )}\n </div>\n </div>\n\n {children}\n\n {onLogout ? (\n <Button\n variant=\"filled\"\n color=\"error\"\n size={buttonSize}\n fullWidth\n startIcon={<Icon name=\"Logout2\" />}\n onClick={onLogout}\n >\n {logoutLabel ?? t('userCard.signOut')}\n </Button>\n ) : null}\n </div>\n )\n})\n"],"names":["UserCard","forwardRef","name","email","avatar","icon","color","size","onLogout","logoutLabel","children","loading","className","style","props","ref","t","useT","avatarSize","buttonSize","jsxs","clsx","styles","jsx","Avatar","Typography","Skeleton","Button","Icon"],"mappings":"0bAgDaA,EAAWC,EAAAA,WAA0C,SAChE,CACE,KAAAC,EACA,MAAAC,EACA,OAAAC,EACA,KAAAC,EAAO,OACP,MAAAC,EAAQ,UACR,KAAAC,EAAO,KACP,SAAAC,EACA,YAAAC,EACA,SAAAC,EACA,QAAAC,EAAU,GACV,UAAAC,EACA,MAAAC,EACA,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAAIC,EAAAA,KAAA,EAEJC,EAAaX,IAAS,KAAO,KAAOA,IAAS,KAAO,KAAO,KAC3DY,EAAaZ,IAAS,KAAO,KAAO,KAE1C,OACEa,EAAAA,KAAC,MAAA,CACC,IAAAL,EACA,UAAWM,EAAAA,KAAKC,EAAO,KAAMA,EAAOf,CAAI,EAAGK,CAAS,EACpD,MAAAC,EACA,YAAWF,GAAW,OACrB,GAAGG,EAEJ,SAAA,CAAAM,EAAAA,KAAC,MAAA,CAAI,UAAWE,EAAO,SAGrB,SAAA,CAAAC,EAAAA,IAACC,EAAAA,OAAA,CACC,KAAMN,EACN,KAAAhB,EACA,IAAKE,EACL,KAAMF,EAAO,OAAYG,EACzB,MAAAC,EACA,QAAAK,CAAA,CAAA,EAEFS,EAAAA,KAAC,MAAA,CAAI,UAAWE,EAAO,KAErB,SAAA,CAAAC,EAAAA,IAACE,EAAAA,WAAA,CAAW,QAAQ,YAAY,SAAQ,GACrC,SAAAd,EAAUY,EAAAA,IAACG,WAAA,CAAS,MAAM,KAAA,CAAM,EAAMxB,GAAQc,EAAE,kBAAkB,EACrE,GACEL,GAAWR,GAAS,OACpBoB,EAAAA,IAACE,EAAAA,WAAA,CAAW,QAAQ,UAAU,MAAM,QAAQ,SAAQ,GACjD,SAAAd,EAAUY,MAACG,EAAAA,UAAS,MAAM,MAAM,EAAKvB,CAAA,CACxC,CAAA,CAAA,CAEJ,CAAA,EACF,EAECO,EAEAF,EACCe,EAAAA,IAACI,EAAAA,OAAA,CACC,QAAQ,SACR,MAAM,QACN,KAAMR,EACN,UAAS,GACT,UAAWI,EAAAA,IAACK,EAAAA,KAAA,CAAK,KAAK,SAAA,CAAU,EAChC,QAASpB,EAER,SAAAC,GAAeO,EAAE,kBAAkB,CAAA,CAAA,EAEpC,IAAA,CAAA,CAAA,CAGV,CAAC"}
|
|
@@ -2,11 +2,11 @@ import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as S } from "react";
|
|
3
3
|
import { clsx as b } from "clsx";
|
|
4
4
|
import { A as g } from "./Avatar-ClcmN0ba.js";
|
|
5
|
-
import { B as w } from "./Button-
|
|
5
|
+
import { B as w } from "./Button-CtADzomU.js";
|
|
6
6
|
import { b as U } from "./Icon-D5TxgfCc.js";
|
|
7
7
|
import { S as m } from "./Skeleton-_-uGax2j.js";
|
|
8
8
|
import { T as d } from "./Typography-ChSuxgkc.js";
|
|
9
|
-
import { a as N } from "./ConfigProvider-
|
|
9
|
+
import { a as N } from "./ConfigProvider-Dqfu7UBU.js";
|
|
10
10
|
const T = "_card_1fykc_3", j = "_identity_1fykc_16", A = "_text_1fykc_20", B = "_sm_1fykc_33", I = "_lg_1fykc_37", o = {
|
|
11
11
|
card: T,
|
|
12
12
|
identity: j,
|
|
@@ -75,4 +75,4 @@ const T = "_card_1fykc_3", j = "_identity_1fykc_16", A = "_text_1fykc_20", B = "
|
|
|
75
75
|
export {
|
|
76
76
|
J as U
|
|
77
77
|
};
|
|
78
|
-
//# sourceMappingURL=UserCard-
|
|
78
|
+
//# sourceMappingURL=UserCard-cmZrMvwL.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UserCard-cmZrMvwL.js","sources":["../src/components/UserCard/UserCard.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes, type ReactNode } from 'react'\nimport { clsx } from 'clsx'\nimport { useT, type ThemeColor } from '../../theme'\nimport type { IconName } from '../../icons/names'\nimport { Avatar } from '../Avatar'\nimport { Button } from '../Button'\nimport { Icon } from '../Icon'\nimport { Skeleton } from '../Skeleton'\nimport { Typography } from '../Typography'\nimport styles from './UserCard.module.css'\n\nexport type UserCardSize = 'sm' | 'md' | 'lg'\n\nexport interface UserCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'> {\n /**\n * Display name — the primary line, and the source of the avatar initials. When omitted, the primary\n * line falls back to a localized **\"Welcome\"** greeting (and the avatar shows the `icon`).\n */\n name?: string\n /** Secondary line under the name (usually the email). */\n email?: ReactNode\n /** Avatar image URL (falls back to the initials from `name`, else the `icon`). */\n avatar?: string\n /** Fallback avatar icon when there's no image or name. Defaults to `'User'`. */\n icon?: IconName\n /** Theme palette token tinting the avatar. Defaults to `'primary'`. */\n color?: ThemeColor\n /** Preset size (avatar + button + card padding; the text stays fixed). Defaults to `'md'`. */\n size?: UserCardSize\n /** When provided, a **Sign out** button is shown that calls this. */\n onLogout?: () => void\n /** Sign-out button label. Defaults to `'Sign Out'`. */\n logoutLabel?: ReactNode\n /** Extra content between the identity row and the sign-out button (e.g. a link or menu). */\n children?: ReactNode\n /** Show skeletons for the avatar, name and email while the user is being fetched (sign-out stays usable). Defaults to `false`. */\n loading?: boolean\n}\n\n/**\n * A compact account card — an `Avatar` + name/email and an optional **Sign out** button — for a consistent\n * signed-in-user block across apps, instead of hand-rolling the markup each time. The shell's sidebar renders\n * one itself (`config.sidebar.userCard` / the `RootLayout` `showUserCard` prop), so place it by hand only\n * elsewhere. Shows the image (`avatar`) → initials (from `name`) →\n * `icon` (default `User`) in priority order; renders the sign-out `Button` (filled `error`) only when\n * `onLogout` is given. `size` (`sm`/`md`/`lg`) scales the avatar, button and padding; `color` (default `primary`)\n * tints the avatar. `loading` swaps the avatar + name + email for skeletons. Own CSS module (token-only).\n */\nexport const UserCard = forwardRef<HTMLDivElement, UserCardProps>(function UserCard(\n {\n name,\n email,\n avatar,\n icon = 'User',\n color = 'primary',\n size = 'md',\n onLogout,\n logoutLabel,\n children,\n loading = false,\n className,\n style,\n ...props\n },\n ref,\n) {\n const t = useT()\n // the identity row + the sign-out button share the same visual size step\n const avatarSize = size === 'lg' ? 'lg' : size === 'sm' ? 'sm' : 'md'\n const buttonSize = size === 'lg' ? 'md' : 'sm'\n\n return (\n <div\n ref={ref}\n className={clsx(styles.card, styles[size], className)}\n style={style as CSSProperties}\n aria-busy={loading || undefined}\n {...props}\n >\n <div className={styles.identity}>\n {/* Avatar priority is image → icon → initials, so pass `icon` only as the last resort (no\n name), otherwise a name would still show the icon instead of its initials */}\n <Avatar\n size={avatarSize}\n name={name}\n src={avatar}\n icon={name ? undefined : icon}\n color={color}\n loading={loading}\n />\n <div className={styles.text}>\n {/* primary line: the name, or a \"Welcome\" greeting fallback when no name is given */}\n <Typography variant=\"bodySmall\" truncate>\n {loading ? <Skeleton width=\"60%\" /> : (name ?? t('userCard.welcome'))}\n </Typography>\n {(loading || email != null) && (\n <Typography variant=\"caption\" color=\"muted\" truncate>\n {loading ? <Skeleton width=\"85%\" /> : email}\n </Typography>\n )}\n </div>\n </div>\n\n {children}\n\n {onLogout ? (\n <Button\n variant=\"filled\"\n color=\"error\"\n size={buttonSize}\n fullWidth\n startIcon={<Icon name=\"Logout2\" />}\n onClick={onLogout}\n >\n {logoutLabel ?? t('userCard.signOut')}\n </Button>\n ) : null}\n </div>\n )\n})\n"],"names":["UserCard","forwardRef","name","email","avatar","icon","color","size","onLogout","logoutLabel","children","loading","className","style","props","ref","t","useT","avatarSize","buttonSize","jsxs","clsx","styles","jsx","Avatar","Typography","Skeleton","Button","Icon"],"mappings":";;;;;;;;;;;;;;;GAgDaA,IAAWC,EAA0C,SAChE;AAAA,EACE,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,MAAAC,IAAO;AAAA,EACP,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAAIC,EAAA,GAEJC,IAAaX,MAAS,OAAO,OAAOA,MAAS,OAAO,OAAO,MAC3DY,IAAaZ,MAAS,OAAO,OAAO;AAE1C,SACE,gBAAAa;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAL;AAAA,MACA,WAAWM,EAAKC,EAAO,MAAMA,EAAOf,CAAI,GAAGK,CAAS;AAAA,MACpD,OAAAC;AAAA,MACA,aAAWF,KAAW;AAAA,MACrB,GAAGG;AAAA,MAEJ,UAAA;AAAA,QAAA,gBAAAM,EAAC,OAAA,EAAI,WAAWE,EAAO,UAGrB,UAAA;AAAA,UAAA,gBAAAC;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,MAAMN;AAAA,cACN,MAAAhB;AAAA,cACA,KAAKE;AAAA,cACL,MAAMF,IAAO,SAAYG;AAAA,cACzB,OAAAC;AAAA,cACA,SAAAK;AAAA,YAAA;AAAA,UAAA;AAAA,UAEF,gBAAAS,EAAC,OAAA,EAAI,WAAWE,EAAO,MAErB,UAAA;AAAA,YAAA,gBAAAC,EAACE,GAAA,EAAW,SAAQ,aAAY,UAAQ,IACrC,UAAAd,IAAU,gBAAAY,EAACG,GAAA,EAAS,OAAM,MAAA,CAAM,IAAMxB,KAAQc,EAAE,kBAAkB,GACrE;AAAA,aACEL,KAAWR,KAAS,SACpB,gBAAAoB,EAACE,GAAA,EAAW,SAAQ,WAAU,OAAM,SAAQ,UAAQ,IACjD,UAAAd,IAAU,gBAAAY,EAACG,KAAS,OAAM,OAAM,IAAKvB,EAAA,CACxC;AAAA,UAAA,EAAA,CAEJ;AAAA,QAAA,GACF;AAAA,QAECO;AAAA,QAEAF,IACC,gBAAAe;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,SAAQ;AAAA,YACR,OAAM;AAAA,YACN,MAAMR;AAAA,YACN,WAAS;AAAA,YACT,WAAW,gBAAAI,EAACK,GAAA,EAAK,MAAK,UAAA,CAAU;AAAA,YAChC,SAASpB;AAAA,YAER,UAAAC,KAAeO,EAAE,kBAAkB;AAAA,UAAA;AAAA,QAAA,IAEpC;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGV,CAAC;"}
|
package/dist/app/AdminRoot.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import { type ErrorBoundaryProps, type IconName, type RootLayoutHeader, type RootLayoutProps } from '../components';
|
|
2
|
+
import { type ErrorBoundaryProps, type ToasterProps, type IconName, type RootLayoutHeader, type RootLayoutProps } from '../components';
|
|
3
3
|
import { type ThemeColor } from '../theme';
|
|
4
4
|
/** Why the session can't be used — see `AdminRootUnavailable.reason`. */
|
|
5
5
|
export type AdminRootUnavailableReason = 'forbidden' | 'unreachable';
|
|
@@ -56,7 +56,10 @@ export interface AdminRootProps<U extends AdminUser = AdminUser> {
|
|
|
56
56
|
authRouteId?: string;
|
|
57
57
|
/** Guard target for signed-out visitors + post-logout redirect. Default `'/login'`. */
|
|
58
58
|
loginPath?: string;
|
|
59
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Show a `UserCard` (the user + Sign Out) at the bottom of the sidebar — passed to `RootLayout`. Unset, the
|
|
61
|
+
* app-wide `config.sidebar.userCard` applies (default `false`, hidden).
|
|
62
|
+
*/
|
|
60
63
|
showUserCard?: boolean;
|
|
61
64
|
/**
|
|
62
65
|
* The sidebar's look, passed to `RootLayout` — `'floating'` or `'docked'` (flush to the edges). **Unset
|
|
@@ -78,6 +81,13 @@ export interface AdminRootProps<U extends AdminUser = AdminUser> {
|
|
|
78
81
|
* per-route boundary, so page crashes need `createRouter({ defaultErrorComponent: PageError })`.
|
|
79
82
|
*/
|
|
80
83
|
errorBoundary?: boolean | Omit<ErrorBoundaryProps, 'children' | 'resetKeys'>;
|
|
84
|
+
/**
|
|
85
|
+
* The one app-wide toast viewport AdminRoot mounts (the inner `RootLayout`'s is always off, so there's never a
|
|
86
|
+
* second one). Unset / `true` → `<Toaster />`, following the app-wide `config.toast`; `ToasterProps`
|
|
87
|
+
* (`{ position, duration }`) → this shell's override, anything unset still falls back to `config.toast`;
|
|
88
|
+
* `false` → no viewport (e.g. the app mounts its own `<Toaster>`). Same shape as `RootLayout`'s `toaster`.
|
|
89
|
+
*/
|
|
90
|
+
toaster?: boolean | ToasterProps;
|
|
81
91
|
/**
|
|
82
92
|
* The app is still finding out who is signed in (e.g. verifying a stored token or refreshing a cookie
|
|
83
93
|
* session). While `true`, AdminRoot renders only `pendingFallback` — no shell, no public page, no
|
|
@@ -102,9 +112,10 @@ export interface AdminRootProps<U extends AdminUser = AdminUser> {
|
|
|
102
112
|
/**
|
|
103
113
|
* Root-route component for admin apps — it wires up the whole shell orchestration so an app only has to
|
|
104
114
|
* supply `logo` + `getUser` + `onLogout`. Public pages (route id under `authRouteId`) render standalone;
|
|
105
|
-
* everything else renders inside the guarded admin shell (`RootLayout
|
|
115
|
+
* everything else renders inside the guarded admin shell (`RootLayout`, with an optional sidebar `UserCard`), gated by
|
|
106
116
|
* `AuthGuard` (signed-out visitors bounce to `loginPath`). Logout clears the session and navigates to
|
|
107
|
-
* `loginPath`. Mounts exactly one app-wide `<Toaster/>` (
|
|
117
|
+
* `loginPath`. Mounts exactly one app-wide `<Toaster/>` (`toaster`; none with `toaster={false}` — the inner
|
|
118
|
+
* `RootLayout` always gets `toaster={false}`),
|
|
108
119
|
* and wraps the page in an `ErrorBoundary` that resets on navigation (`errorBoundary`, default on).
|
|
109
120
|
* While the app is still checking the session, pass `pending` (a full-screen loader instead of a premature
|
|
110
121
|
* sign-in redirect); when the check failed or the server refuses this account, pass `unavailable` (a
|
|
@@ -131,4 +142,4 @@ export interface AdminRootProps<U extends AdminUser = AdminUser> {
|
|
|
131
142
|
* },
|
|
132
143
|
* })
|
|
133
144
|
*/
|
|
134
|
-
export declare const AdminRoot: <U extends AdminUser = AdminUser>({ logo, logoTo, getUser, onLogout, authRouteId, loginPath, showUserCard, sidebarVariant, header, errorBoundary, pending, pendingFallback, unavailable, unavailableFallback, }: AdminRootProps<U>) => import("react/jsx-runtime").JSX.Element;
|
|
145
|
+
export declare const AdminRoot: <U extends AdminUser = AdminUser>({ logo, logoTo, getUser, onLogout, authRouteId, loginPath, showUserCard, sidebarVariant, header, errorBoundary, toaster, pending, pendingFallback, unavailable, unavailableFallback, }: AdminRootProps<U>) => import("react/jsx-runtime").JSX.Element;
|
package/dist/app/AdminRoot.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import { type ErrorBoundaryProps, type IconName, type RootLayoutHeader, type RootLayoutProps } from '../components';
|
|
2
|
+
import { type ErrorBoundaryProps, type ToasterProps, type IconName, type RootLayoutHeader, type RootLayoutProps } from '../components';
|
|
3
3
|
import { type ThemeColor } from '../theme';
|
|
4
4
|
/** Why the session can't be used — see `AdminRootUnavailable.reason`. */
|
|
5
5
|
export type AdminRootUnavailableReason = 'forbidden' | 'unreachable';
|
|
@@ -56,7 +56,10 @@ export interface AdminRootProps<U extends AdminUser = AdminUser> {
|
|
|
56
56
|
authRouteId?: string;
|
|
57
57
|
/** Guard target for signed-out visitors + post-logout redirect. Default `'/login'`. */
|
|
58
58
|
loginPath?: string;
|
|
59
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Show a `UserCard` (the user + Sign Out) at the bottom of the sidebar — passed to `RootLayout`. Unset, the
|
|
61
|
+
* app-wide `config.sidebar.userCard` applies (default `false`, hidden).
|
|
62
|
+
*/
|
|
60
63
|
showUserCard?: boolean;
|
|
61
64
|
/**
|
|
62
65
|
* The sidebar's look, passed to `RootLayout` — `'floating'` or `'docked'` (flush to the edges). **Unset
|
|
@@ -78,6 +81,13 @@ export interface AdminRootProps<U extends AdminUser = AdminUser> {
|
|
|
78
81
|
* per-route boundary, so page crashes need `createRouter({ defaultErrorComponent: PageError })`.
|
|
79
82
|
*/
|
|
80
83
|
errorBoundary?: boolean | Omit<ErrorBoundaryProps, 'children' | 'resetKeys'>;
|
|
84
|
+
/**
|
|
85
|
+
* The one app-wide toast viewport AdminRoot mounts (the inner `RootLayout`'s is always off, so there's never a
|
|
86
|
+
* second one). Unset / `true` → `<Toaster />`, following the app-wide `config.toast`; `ToasterProps`
|
|
87
|
+
* (`{ position, duration }`) → this shell's override, anything unset still falls back to `config.toast`;
|
|
88
|
+
* `false` → no viewport (e.g. the app mounts its own `<Toaster>`). Same shape as `RootLayout`'s `toaster`.
|
|
89
|
+
*/
|
|
90
|
+
toaster?: boolean | ToasterProps;
|
|
81
91
|
/**
|
|
82
92
|
* The app is still finding out who is signed in (e.g. verifying a stored token or refreshing a cookie
|
|
83
93
|
* session). While `true`, AdminRoot renders only `pendingFallback` — no shell, no public page, no
|
|
@@ -102,9 +112,10 @@ export interface AdminRootProps<U extends AdminUser = AdminUser> {
|
|
|
102
112
|
/**
|
|
103
113
|
* Root-route component for admin apps — it wires up the whole shell orchestration so an app only has to
|
|
104
114
|
* supply `logo` + `getUser` + `onLogout`. Public pages (route id under `authRouteId`) render standalone;
|
|
105
|
-
* everything else renders inside the guarded admin shell (`RootLayout
|
|
115
|
+
* everything else renders inside the guarded admin shell (`RootLayout`, with an optional sidebar `UserCard`), gated by
|
|
106
116
|
* `AuthGuard` (signed-out visitors bounce to `loginPath`). Logout clears the session and navigates to
|
|
107
|
-
* `loginPath`. Mounts exactly one app-wide `<Toaster/>` (
|
|
117
|
+
* `loginPath`. Mounts exactly one app-wide `<Toaster/>` (`toaster`; none with `toaster={false}` — the inner
|
|
118
|
+
* `RootLayout` always gets `toaster={false}`),
|
|
108
119
|
* and wraps the page in an `ErrorBoundary` that resets on navigation (`errorBoundary`, default on).
|
|
109
120
|
* While the app is still checking the session, pass `pending` (a full-screen loader instead of a premature
|
|
110
121
|
* sign-in redirect); when the check failed or the server refuses this account, pass `unavailable` (a
|
|
@@ -131,4 +142,4 @@ export interface AdminRootProps<U extends AdminUser = AdminUser> {
|
|
|
131
142
|
* },
|
|
132
143
|
* })
|
|
133
144
|
*/
|
|
134
|
-
export declare const AdminRoot: <U extends AdminUser = AdminUser>({ logo, logoTo, getUser, onLogout, authRouteId, loginPath, showUserCard, sidebarVariant, header, errorBoundary, pending, pendingFallback, unavailable, unavailableFallback, }: AdminRootProps<U>) => import("react/jsx-runtime").JSX.Element;
|
|
145
|
+
export declare const AdminRoot: <U extends AdminUser = AdminUser>({ logo, logoTo, getUser, onLogout, authRouteId, loginPath, showUserCard, sidebarVariant, header, errorBoundary, toaster, pending, pendingFallback, unavailable, unavailableFallback, }: AdminRootProps<U>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -16,7 +16,7 @@ export interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'
|
|
|
16
16
|
action?: ReactNode;
|
|
17
17
|
/** When provided, a trailing × close button appears that calls this. */
|
|
18
18
|
onClose?: () => void;
|
|
19
|
-
/** Accessible label for the close button. Defaults to
|
|
19
|
+
/** Accessible label for the close button. Defaults to the localized "Close" (`common.close`). */
|
|
20
20
|
closeLabel?: string;
|
|
21
21
|
/** Alert message. */
|
|
22
22
|
children?: ReactNode;
|
|
@@ -16,7 +16,7 @@ export interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'
|
|
|
16
16
|
action?: ReactNode;
|
|
17
17
|
/** When provided, a trailing × close button appears that calls this. */
|
|
18
18
|
onClose?: () => void;
|
|
19
|
-
/** Accessible label for the close button. Defaults to
|
|
19
|
+
/** Accessible label for the close button. Defaults to the localized "Close" (`common.close`). */
|
|
20
20
|
closeLabel?: string;
|
|
21
21
|
/** Alert message. */
|
|
22
22
|
children?: ReactNode;
|
|
@@ -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-B4XZDk16.cjs");exports.Alert=e.Alert;exports.default=e.Alert;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -12,7 +12,7 @@ export interface AuthLayoutProps extends Omit<HTMLAttributes<HTMLDivElement>, 't
|
|
|
12
12
|
* kept), so you can pass an unsized logo and it's sized/centered for you.
|
|
13
13
|
*/
|
|
14
14
|
logo?: ReactNode;
|
|
15
|
-
/** Optional glyph in a
|
|
15
|
+
/** Optional glyph in a solid `color`-filled circle above the title — an `IconName` or any node. */
|
|
16
16
|
icon?: IconName | ReactNode;
|
|
17
17
|
/** Bottom slot under the form — e.g. a "Back to login" / "Sign up" link row. */
|
|
18
18
|
footer?: ReactNode;
|
|
@@ -28,7 +28,7 @@ export interface AuthLayoutProps extends Omit<HTMLAttributes<HTMLDivElement>, 't
|
|
|
28
28
|
* reset-password, OTP, …) — so each page just supplies its `title` + form instead of hand-building the
|
|
29
29
|
* layout. Fills the viewport (`100dvh`) with the app `background` canvas and vertically centers a
|
|
30
30
|
* `logo` (on the canvas, above the card) + an elevated `surface` card, as a group. The card stacks: an
|
|
31
|
-
* optional `icon` (in a
|
|
31
|
+
* optional `icon` (in a solid `color`-filled `Avatar` circle), the `title` + `subtitle` (centered), the
|
|
32
32
|
* `children` (your form), and an optional `footer` (link row). Token-only styling; responsive.
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
@@ -12,7 +12,7 @@ export interface AuthLayoutProps extends Omit<HTMLAttributes<HTMLDivElement>, 't
|
|
|
12
12
|
* kept), so you can pass an unsized logo and it's sized/centered for you.
|
|
13
13
|
*/
|
|
14
14
|
logo?: ReactNode;
|
|
15
|
-
/** Optional glyph in a
|
|
15
|
+
/** Optional glyph in a solid `color`-filled circle above the title — an `IconName` or any node. */
|
|
16
16
|
icon?: IconName | ReactNode;
|
|
17
17
|
/** Bottom slot under the form — e.g. a "Back to login" / "Sign up" link row. */
|
|
18
18
|
footer?: ReactNode;
|
|
@@ -28,7 +28,7 @@ export interface AuthLayoutProps extends Omit<HTMLAttributes<HTMLDivElement>, 't
|
|
|
28
28
|
* reset-password, OTP, …) — so each page just supplies its `title` + form instead of hand-building the
|
|
29
29
|
* layout. Fills the viewport (`100dvh`) with the app `background` canvas and vertically centers a
|
|
30
30
|
* `logo` (on the canvas, above the card) + an elevated `surface` card, as a group. The card stacks: an
|
|
31
|
-
* optional `icon` (in a
|
|
31
|
+
* optional `icon` (in a solid `color`-filled `Avatar` circle), the `title` + `subtitle` (centered), the
|
|
32
32
|
* `children` (your form), and an optional `footer` (link row). Token-only styling; responsive.
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
@@ -12,6 +12,7 @@ export interface BreadcrumbsProps {
|
|
|
12
12
|
* content. It always starts with a home icon that links to the first allowed menu page (the same
|
|
13
13
|
* target as `FirstRouteRedirect`), followed by one crumb per matched route that declares a
|
|
14
14
|
* `staticData.name`. Intermediate crumbs link to their page when navigable; the current page is
|
|
15
|
-
* plain text. Renders nothing when
|
|
15
|
+
* plain text. Renders nothing when no path prefix has a name and the leaf route has no
|
|
16
|
+
* `staticData.breadcrumb`. Token-only styling.
|
|
16
17
|
*/
|
|
17
18
|
export declare function Breadcrumbs({ separator }?: BreadcrumbsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -12,6 +12,7 @@ export interface BreadcrumbsProps {
|
|
|
12
12
|
* content. It always starts with a home icon that links to the first allowed menu page (the same
|
|
13
13
|
* target as `FirstRouteRedirect`), followed by one crumb per matched route that declares a
|
|
14
14
|
* `staticData.name`. Intermediate crumbs link to their page when navigable; the current page is
|
|
15
|
-
* plain text. Renders nothing when
|
|
15
|
+
* plain text. Renders nothing when no path prefix has a name and the leaf route has no
|
|
16
|
+
* `staticData.breadcrumb`. Token-only styling.
|
|
16
17
|
*/
|
|
17
18
|
export declare function Breadcrumbs({ separator }?: BreadcrumbsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -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-DSUxcp6u.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-Q_5uA-zc.cjs");exports.Button=t.Button;exports.default=t.Button;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { type ThemeColor } from '../../theme';
|
|
3
3
|
import { type IconName } from '../../icons/names';
|
|
4
4
|
export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'color'> {
|
|
5
5
|
/** Header title (left, next to the icon). */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { type ThemeColor } from '../../theme';
|
|
3
3
|
import { type IconName } from '../../icons/names';
|
|
4
4
|
export interface CardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'color'> {
|
|
5
5
|
/** Header title (left, next to the icon). */
|
|
@@ -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-CntRsQfm.cjs");exports.Card=e.Card;exports.default=e.Card;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -21,7 +21,7 @@ export interface ChipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>
|
|
|
21
21
|
onDelete?: () => void;
|
|
22
22
|
/** Custom delete icon. Defaults to a `CloseCircle`. */
|
|
23
23
|
deleteIcon?: ReactNode;
|
|
24
|
-
/** Accessible label for the delete button. Defaults to
|
|
24
|
+
/** Accessible label for the delete button. Defaults to the localized "Remove" (`common.remove`). */
|
|
25
25
|
deleteLabel?: string;
|
|
26
26
|
/** Tab index for the delete button — pass `-1` when the chip lives inside a composite widget (e.g. a multi-select) that owns keyboard focus. */
|
|
27
27
|
deleteTabIndex?: number;
|
|
@@ -21,7 +21,7 @@ export interface ChipProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>
|
|
|
21
21
|
onDelete?: () => void;
|
|
22
22
|
/** Custom delete icon. Defaults to a `CloseCircle`. */
|
|
23
23
|
deleteIcon?: ReactNode;
|
|
24
|
-
/** Accessible label for the delete button. Defaults to
|
|
24
|
+
/** Accessible label for the delete button. Defaults to the localized "Remove" (`common.remove`). */
|
|
25
25
|
deleteLabel?: string;
|
|
26
26
|
/** Tab index for the delete button — pass `-1` when the chip lives inside a composite widget (e.g. a multi-select) that owns keyboard focus. */
|
|
27
27
|
deleteTabIndex?: number;
|
|
@@ -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-CrBizrvG.cjs");exports.Chip=e.Chip;exports.default=e.Chip;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -32,7 +32,7 @@ export interface ChoiceCardProps extends Omit<InputHTMLAttributes<HTMLInputEleme
|
|
|
32
32
|
/**
|
|
33
33
|
* A selectable card — a rich checkbox/radio with an icon, title and description. The native input is
|
|
34
34
|
* visually hidden but fully accessible (Space toggles; in an `exclusive` group the cards are real
|
|
35
|
-
* radios, so Arrow keys rove between them); the card shows the state with a
|
|
35
|
+
* radios, so Arrow keys rove between them); the card shows the state with a `color` border + soft halo,
|
|
36
36
|
* a top-right tick indicator, and an icon circle that fills with the color while selected. Designed to
|
|
37
37
|
* live inside a `<ChoiceCardGroup>` (which supplies the selection, `exclusive` mode and
|
|
38
38
|
* `size`/`color`/`disabled`/`error` via context), but also works standalone as a single fancy checkbox
|
|
@@ -32,7 +32,7 @@ export interface ChoiceCardProps extends Omit<InputHTMLAttributes<HTMLInputEleme
|
|
|
32
32
|
/**
|
|
33
33
|
* A selectable card — a rich checkbox/radio with an icon, title and description. The native input is
|
|
34
34
|
* visually hidden but fully accessible (Space toggles; in an `exclusive` group the cards are real
|
|
35
|
-
* radios, so Arrow keys rove between them); the card shows the state with a
|
|
35
|
+
* radios, so Arrow keys rove between them); the card shows the state with a `color` border + soft halo,
|
|
36
36
|
* a top-right tick indicator, and an icon circle that fills with the color while selected. Designed to
|
|
37
37
|
* live inside a `<ChoiceCardGroup>` (which supplies the selection, `exclusive` mode and
|
|
38
38
|
* `size`/`color`/`disabled`/`error` via context), but also works standalone as a single fancy checkbox
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../ChoiceCardGroup-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../../ChoiceCardGroup-C7Eengyd.cjs");exports.ChoiceCard=e.ChoiceCard;exports.ChoiceCardGroup=e.ChoiceCardGroup;exports.default=e.ChoiceCard;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -29,6 +29,6 @@ export interface CodeBlockProps extends Omit<HTMLAttributes<HTMLDivElement>, 'ch
|
|
|
29
29
|
* tick on click — with an optional `title` (e.g. a filename) on its left; `showLineNumbers` (default
|
|
30
30
|
* `true`), `maxHeight` (scrolls inside) and `wrap` shape the body. The whole block
|
|
31
31
|
* keeps VS Code's own dark colors (a deliberate literal-color exception, like the Modal scrim); only
|
|
32
|
-
* the outer
|
|
32
|
+
* the outer radius uses a `--tz-*` token (the border is a literal white-alpha hairline).
|
|
33
33
|
*/
|
|
34
34
|
export declare const CodeBlock: import("react").ForwardRefExoticComponent<CodeBlockProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -29,6 +29,6 @@ export interface CodeBlockProps extends Omit<HTMLAttributes<HTMLDivElement>, 'ch
|
|
|
29
29
|
* tick on click — with an optional `title` (e.g. a filename) on its left; `showLineNumbers` (default
|
|
30
30
|
* `true`), `maxHeight` (scrolls inside) and `wrap` shape the body. The whole block
|
|
31
31
|
* keeps VS Code's own dark colors (a deliberate literal-color exception, like the Modal scrim); only
|
|
32
|
-
* the outer
|
|
32
|
+
* the outer radius uses a `--tz-*` token (the border is a literal white-alpha hairline).
|
|
33
33
|
*/
|
|
34
34
|
export declare const CodeBlock: import("react").ForwardRefExoticComponent<CodeBlockProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -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-DW4uaZXM.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-nhWd_nOW.cjs");exports.ColorPicker=e.ColorPicker;exports.default=e.ColorPicker;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|