@techzyapp/ui-library 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion-CAxa1I-m.js +112 -0
- package/dist/Accordion-CAxa1I-m.js.map +1 -0
- package/dist/Accordion-Dy_dM79Y.cjs +2 -0
- package/dist/Accordion-Dy_dM79Y.cjs.map +1 -0
- package/dist/Alert-BQpA48PY.js +71 -0
- package/dist/Alert-BQpA48PY.js.map +1 -0
- package/dist/Alert-DKIjM-9x.cjs +2 -0
- package/dist/Alert-DKIjM-9x.cjs.map +1 -0
- package/dist/Avatar-BJVCdo-K.js +60 -0
- package/dist/Avatar-BJVCdo-K.js.map +1 -0
- package/dist/Avatar-_ufXh3AY.cjs +2 -0
- package/dist/Avatar-_ufXh3AY.cjs.map +1 -0
- package/dist/AvatarGroup-DdJf4aT7.js +33 -0
- package/dist/AvatarGroup-DdJf4aT7.js.map +1 -0
- package/dist/AvatarGroup-TW1pt4tj.cjs +2 -0
- package/dist/AvatarGroup-TW1pt4tj.cjs.map +1 -0
- package/dist/Badge-BQpr2Jee.cjs +2 -0
- package/dist/Badge-BQpr2Jee.cjs.map +1 -0
- package/dist/Badge-DSWigoGC.js +50 -0
- package/dist/Badge-DSWigoGC.js.map +1 -0
- package/dist/Breadcrumbs-Bx5UgwDy.js +35 -0
- package/dist/Breadcrumbs-Bx5UgwDy.js.map +1 -0
- package/dist/Breadcrumbs-CHONper7.cjs +2 -0
- package/dist/Breadcrumbs-CHONper7.cjs.map +1 -0
- package/dist/Button-D4bfVNNa.cjs +2 -0
- package/dist/Button-D4bfVNNa.cjs.map +1 -0
- package/dist/Button-DhEv0YFk.js +72 -0
- package/dist/Button-DhEv0YFk.js.map +1 -0
- package/dist/Calendar-Bh317SaV.js +267 -0
- package/dist/Calendar-Bh317SaV.js.map +1 -0
- package/dist/Calendar-C8uNezI-.cjs +2 -0
- package/dist/Calendar-C8uNezI-.cjs.map +1 -0
- package/dist/Card-CfyaerZZ.cjs +2 -0
- package/dist/Card-CfyaerZZ.cjs.map +1 -0
- package/dist/Card-DzClqJuu.js +118 -0
- package/dist/Card-DzClqJuu.js.map +1 -0
- package/dist/Checkbox-DXOzYIAz.cjs +2 -0
- package/dist/Checkbox-DXOzYIAz.cjs.map +1 -0
- package/dist/Checkbox-XKL_Q5qj.js +84 -0
- package/dist/Checkbox-XKL_Q5qj.js.map +1 -0
- package/dist/Chip-Cfo0v3Z8.js +92 -0
- package/dist/Chip-Cfo0v3Z8.js.map +1 -0
- package/dist/Chip-DSrdXLBU.cjs +2 -0
- package/dist/Chip-DSrdXLBU.cjs.map +1 -0
- package/dist/ChoiceCardGroup-6eFM1eL0.cjs +2 -0
- package/dist/ChoiceCardGroup-6eFM1eL0.cjs.map +1 -0
- package/dist/ChoiceCardGroup-CvFzZlgI.js +181 -0
- package/dist/ChoiceCardGroup-CvFzZlgI.js.map +1 -0
- package/dist/CodeBlock-DOk5wekc.cjs +2 -0
- package/dist/CodeBlock-DOk5wekc.cjs.map +1 -0
- package/dist/CodeBlock-n3KExtTO.js +104 -0
- package/dist/CodeBlock-n3KExtTO.js.map +1 -0
- package/dist/Col-D2TfZKiM.js +13 -0
- package/dist/Col-D2TfZKiM.js.map +1 -0
- package/dist/Col-R5mAy8T9.cjs +2 -0
- package/dist/Col-R5mAy8T9.cjs.map +1 -0
- package/dist/ColorPicker-2udt1ORM.js +119 -0
- package/dist/ColorPicker-2udt1ORM.js.map +1 -0
- package/dist/ColorPicker-BwmaXCOy.cjs +2 -0
- package/dist/ColorPicker-BwmaXCOy.cjs.map +1 -0
- package/dist/ColorPickerPanel-BM9OwDDE.js +336 -0
- package/dist/ColorPickerPanel-BM9OwDDE.js.map +1 -0
- package/dist/ColorPickerPanel-ByB1mLSi.cjs +2 -0
- package/dist/ColorPickerPanel-ByB1mLSi.cjs.map +1 -0
- package/dist/ConfigProvider-2c94kUOk.js +291 -0
- package/dist/ConfigProvider-2c94kUOk.js.map +1 -0
- package/dist/ConfigProvider-ByOFXVyP.cjs +2 -0
- package/dist/ConfigProvider-ByOFXVyP.cjs.map +1 -0
- package/dist/DatePicker-DF4Epkn8.cjs +2 -0
- package/dist/DatePicker-DF4Epkn8.cjs.map +1 -0
- package/dist/DatePicker-WM9TC6L_.js +191 -0
- package/dist/DatePicker-WM9TC6L_.js.map +1 -0
- package/dist/DatePicker.module-BZDftL4g.js +138 -0
- package/dist/DatePicker.module-BZDftL4g.js.map +1 -0
- package/dist/DatePicker.module-tE-tGNBd.cjs +2 -0
- package/dist/DatePicker.module-tE-tGNBd.cjs.map +1 -0
- package/dist/DateTimePicker-C557OjBU.cjs +2 -0
- package/dist/DateTimePicker-C557OjBU.cjs.map +1 -0
- package/dist/DateTimePicker-DBtcWK0F.js +245 -0
- package/dist/DateTimePicker-DBtcWK0F.js.map +1 -0
- package/dist/Divider-CzbhdCiD.cjs +2 -0
- package/dist/Divider-CzbhdCiD.cjs.map +1 -0
- package/dist/Divider-LtH3dLgw.js +36 -0
- package/dist/Divider-LtH3dLgw.js.map +1 -0
- package/dist/Dropdown-DKAXue5_.js +146 -0
- package/dist/Dropdown-DKAXue5_.js.map +1 -0
- package/dist/Dropdown-DygP50OB.cjs +2 -0
- package/dist/Dropdown-DygP50OB.cjs.map +1 -0
- package/dist/EmptyState-CCCpZ-ZA.cjs +2 -0
- package/dist/EmptyState-CCCpZ-ZA.cjs.map +1 -0
- package/dist/EmptyState-CetM49vk.js +38 -0
- package/dist/EmptyState-CetM49vk.js.map +1 -0
- package/dist/FileUploader-B4TJHyoi.cjs +2 -0
- package/dist/FileUploader-B4TJHyoi.cjs.map +1 -0
- package/dist/FileUploader-VtmmwUFE.js +684 -0
- package/dist/FileUploader-VtmmwUFE.js.map +1 -0
- package/dist/Flag-BWCX6oSR.js +24 -0
- package/dist/Flag-BWCX6oSR.js.map +1 -0
- package/dist/Flag-EPZOrH-U.cjs +2 -0
- package/dist/Flag-EPZOrH-U.cjs.map +1 -0
- package/dist/Flex-Bj3mMF5A.js +50 -0
- package/dist/Flex-Bj3mMF5A.js.map +1 -0
- package/dist/Flex-CqL3Ghda.cjs +2 -0
- package/dist/Flex-CqL3Ghda.cjs.map +1 -0
- package/dist/FloatingPanel-BG9Uag__.js +131 -0
- package/dist/FloatingPanel-BG9Uag__.js.map +1 -0
- package/dist/FloatingPanel-U6sGYiSK.cjs +2 -0
- package/dist/FloatingPanel-U6sGYiSK.cjs.map +1 -0
- package/dist/Form-Bz2xgkEm.cjs +2 -0
- package/dist/Form-Bz2xgkEm.cjs.map +1 -0
- package/dist/Form-kglaJYr5.js +9 -0
- package/dist/Form-kglaJYr5.js.map +1 -0
- package/dist/FullscreenToggle-DDKN5n8B.cjs +2 -0
- package/dist/FullscreenToggle-DDKN5n8B.cjs.map +1 -0
- package/dist/FullscreenToggle-oWzYqUPH.js +42 -0
- package/dist/FullscreenToggle-oWzYqUPH.js.map +1 -0
- package/dist/Grid-Bw95bKkJ.cjs +2 -0
- package/dist/Grid-Bw95bKkJ.cjs.map +1 -0
- package/dist/Grid-CY-syhTX.js +24 -0
- package/dist/Grid-CY-syhTX.js.map +1 -0
- package/dist/Icon-CXTl_QAP.cjs +2 -0
- package/dist/Icon-CXTl_QAP.cjs.map +1 -0
- package/dist/Icon-CophpkHo.js +1228 -0
- package/dist/Icon-CophpkHo.js.map +1 -0
- package/dist/IconButton-CBusrDa9.js +68 -0
- package/dist/IconButton-CBusrDa9.js.map +1 -0
- package/dist/IconButton-D6TenQZ_.cjs +2 -0
- package/dist/IconButton-D6TenQZ_.cjs.map +1 -0
- package/dist/List-BHgFI9Ll.js +26 -0
- package/dist/List-BHgFI9Ll.js.map +1 -0
- package/dist/List-CNz2M3-q.cjs +2 -0
- package/dist/List-CNz2M3-q.cjs.map +1 -0
- package/dist/ListItem-B4yqZR-Z.js +74 -0
- package/dist/ListItem-B4yqZR-Z.js.map +1 -0
- package/dist/ListItem-RH-D-Wey.cjs +2 -0
- package/dist/ListItem-RH-D-Wey.cjs.map +1 -0
- package/dist/Loader-C4JoXOyA.js +28 -0
- package/dist/Loader-C4JoXOyA.js.map +1 -0
- package/dist/Loader-D1MtlQOH.cjs +2 -0
- package/dist/Loader-D1MtlQOH.cjs.map +1 -0
- package/dist/Modal-B2YSCVVt.cjs +2 -0
- package/dist/Modal-B2YSCVVt.cjs.map +1 -0
- package/dist/Modal-BuaPDlKV.js +195 -0
- package/dist/Modal-BuaPDlKV.js.map +1 -0
- package/dist/MultiSelect-BGRT_B60.js +350 -0
- package/dist/MultiSelect-BGRT_B60.js.map +1 -0
- package/dist/MultiSelect-CSJKSWpA.cjs +2 -0
- package/dist/MultiSelect-CSJKSWpA.cjs.map +1 -0
- package/dist/MultilineTextField-CwNCJ9lZ.js +123 -0
- package/dist/MultilineTextField-CwNCJ9lZ.js.map +1 -0
- package/dist/MultilineTextField-Dz6Fg8RJ.cjs +2 -0
- package/dist/MultilineTextField-Dz6Fg8RJ.cjs.map +1 -0
- package/dist/NumberField-DBpO-Z_7.cjs +2 -0
- package/dist/NumberField-DBpO-Z_7.cjs.map +1 -0
- package/dist/NumberField-DBvhSQCw.js +183 -0
- package/dist/NumberField-DBvhSQCw.js.map +1 -0
- package/dist/OtpField-BUBYyorC.cjs +2 -0
- package/dist/OtpField-BUBYyorC.cjs.map +1 -0
- package/dist/OtpField-CTq-CUbF.js +171 -0
- package/dist/OtpField-CTq-CUbF.js.map +1 -0
- package/dist/PageLayout-DddzYw2B.js +12 -0
- package/dist/PageLayout-DddzYw2B.js.map +1 -0
- package/dist/PageLayout-Dfbjw6jD.cjs +2 -0
- package/dist/PageLayout-Dfbjw6jD.cjs.map +1 -0
- package/dist/Pagination-CN9V8M5C.js +139 -0
- package/dist/Pagination-CN9V8M5C.js.map +1 -0
- package/dist/Pagination-DRwTLPh8.cjs +2 -0
- package/dist/Pagination-DRwTLPh8.cjs.map +1 -0
- package/dist/Popover-CBI1icIM.cjs +2 -0
- package/dist/Popover-CBI1icIM.cjs.map +1 -0
- package/dist/Popover-CgIU4Rhg.js +65 -0
- package/dist/Popover-CgIU4Rhg.js.map +1 -0
- package/dist/RadioGroup-C8u7eNBS.cjs +2 -0
- package/dist/RadioGroup-C8u7eNBS.cjs.map +1 -0
- package/dist/RadioGroup-DbodUJW8.js +141 -0
- package/dist/RadioGroup-DbodUJW8.js.map +1 -0
- package/dist/RemoveDialog-Bvt6sH79.js +47 -0
- package/dist/RemoveDialog-Bvt6sH79.js.map +1 -0
- package/dist/RemoveDialog-ClyZKyUG.cjs +2 -0
- package/dist/RemoveDialog-ClyZKyUG.cjs.map +1 -0
- package/dist/RichTextEditor-BTx8Py3I.js +806 -0
- package/dist/RichTextEditor-BTx8Py3I.js.map +1 -0
- package/dist/RichTextEditor-CAYt1Zm1.cjs +2 -0
- package/dist/RichTextEditor-CAYt1Zm1.cjs.map +1 -0
- package/dist/RootLayout-Cp-9CVjP.cjs +2 -0
- package/dist/RootLayout-Cp-9CVjP.cjs.map +1 -0
- package/dist/RootLayout-DCpfuFWF.js +405 -0
- package/dist/RootLayout-DCpfuFWF.js.map +1 -0
- package/dist/Select-PbTyxB1Q.js +338 -0
- package/dist/Select-PbTyxB1Q.js.map +1 -0
- package/dist/Select-_6WogC0u.cjs +2 -0
- package/dist/Select-_6WogC0u.cjs.map +1 -0
- package/dist/Sidebar-AaIlRzgk.cjs +2 -0
- package/dist/Sidebar-AaIlRzgk.cjs.map +1 -0
- package/dist/Sidebar-DRCs2ygZ.js +422 -0
- package/dist/Sidebar-DRCs2ygZ.js.map +1 -0
- package/dist/Slider-dxYVXRev.cjs +2 -0
- package/dist/Slider-dxYVXRev.cjs.map +1 -0
- package/dist/Slider-oGXd5e9X.js +184 -0
- package/dist/Slider-oGXd5e9X.js.map +1 -0
- package/dist/SpeedDial-C4jxIXTr.cjs +2 -0
- package/dist/SpeedDial-C4jxIXTr.cjs.map +1 -0
- package/dist/SpeedDial-DgFj16BQ.js +165 -0
- package/dist/SpeedDial-DgFj16BQ.js.map +1 -0
- package/dist/Stepper-7pPEBRLI.cjs +2 -0
- package/dist/Stepper-7pPEBRLI.cjs.map +1 -0
- package/dist/Stepper-COKAyN1L.js +165 -0
- package/dist/Stepper-COKAyN1L.js.map +1 -0
- package/dist/SwatchPicker-D30aSrbY.js +129 -0
- package/dist/SwatchPicker-D30aSrbY.js.map +1 -0
- package/dist/SwatchPicker-DbAU9-ux.cjs +2 -0
- package/dist/SwatchPicker-DbAU9-ux.cjs.map +1 -0
- package/dist/Switch-DMPJ0fhB.js +85 -0
- package/dist/Switch-DMPJ0fhB.js.map +1 -0
- package/dist/Switch-DRkZ6kHJ.cjs +2 -0
- package/dist/Switch-DRkZ6kHJ.cjs.map +1 -0
- package/dist/Table-BeOumGng.cjs +2 -0
- package/dist/Table-BeOumGng.cjs.map +1 -0
- package/dist/Table-BjPLvMbf.js +1090 -0
- package/dist/Table-BjPLvMbf.js.map +1 -0
- package/dist/Tabs--DDM-zKe.js +190 -0
- package/dist/Tabs--DDM-zKe.js.map +1 -0
- package/dist/Tabs-BZcMnjdC.cjs +2 -0
- package/dist/Tabs-BZcMnjdC.cjs.map +1 -0
- package/dist/TagsField-BTJcZS9P.js +186 -0
- package/dist/TagsField-BTJcZS9P.js.map +1 -0
- package/dist/TagsField-kknWiJZZ.cjs +2 -0
- package/dist/TagsField-kknWiJZZ.cjs.map +1 -0
- package/dist/TextField-BPefnD5M.cjs +2 -0
- package/dist/TextField-BPefnD5M.cjs.map +1 -0
- package/dist/TextField-DMI1X09n.js +266 -0
- package/dist/TextField-DMI1X09n.js.map +1 -0
- package/dist/TextField.module-QePvGeJ3.js +27 -0
- package/dist/TextField.module-QePvGeJ3.js.map +1 -0
- package/dist/TextField.module-m-UllwzG.cjs +2 -0
- package/dist/TextField.module-m-UllwzG.cjs.map +1 -0
- package/dist/ThemeToggle-DTal3RX5.cjs +2 -0
- package/dist/ThemeToggle-DTal3RX5.cjs.map +1 -0
- package/dist/ThemeToggle-Deh9j8pm.js +28 -0
- package/dist/ThemeToggle-Deh9j8pm.js.map +1 -0
- package/dist/TimeColumns-BCNmu4b_.js +147 -0
- package/dist/TimeColumns-BCNmu4b_.js.map +1 -0
- package/dist/TimeColumns-Duh4DcYJ.cjs +2 -0
- package/dist/TimeColumns-Duh4DcYJ.cjs.map +1 -0
- package/dist/TimePicker-3JgvK2on.js +194 -0
- package/dist/TimePicker-3JgvK2on.js.map +1 -0
- package/dist/TimePicker-CfGrCH9T.cjs +2 -0
- package/dist/TimePicker-CfGrCH9T.cjs.map +1 -0
- package/dist/Timeline-CoxW0Ia_.cjs +2 -0
- package/dist/Timeline-CoxW0Ia_.cjs.map +1 -0
- package/dist/Timeline-WkV4k_we.js +71 -0
- package/dist/Timeline-WkV4k_we.js.map +1 -0
- package/dist/Toaster-Bk5GtPjX.cjs +2 -0
- package/dist/Toaster-Bk5GtPjX.cjs.map +1 -0
- package/dist/Toaster-D-eG1xv7.js +63 -0
- package/dist/Toaster-D-eG1xv7.js.map +1 -0
- package/dist/ToggleButtonGroup-BWd7MOcc.js +123 -0
- package/dist/ToggleButtonGroup-BWd7MOcc.js.map +1 -0
- package/dist/ToggleButtonGroup-DYRLwKKh.cjs +2 -0
- package/dist/ToggleButtonGroup-DYRLwKKh.cjs.map +1 -0
- package/dist/Tooltip-Ao7az09p.cjs +2 -0
- package/dist/Tooltip-Ao7az09p.cjs.map +1 -0
- package/dist/Tooltip-Cb_FKxT9.js +65 -0
- package/dist/Tooltip-Cb_FKxT9.js.map +1 -0
- package/dist/TranslatedFields-CI0F9bHw.js +82 -0
- package/dist/TranslatedFields-CI0F9bHw.js.map +1 -0
- package/dist/TranslatedFields-DT3bYse6.cjs +2 -0
- package/dist/TranslatedFields-DT3bYse6.cjs.map +1 -0
- package/dist/Typography-BFatE1_A.cjs +2 -0
- package/dist/Typography-BFatE1_A.cjs.map +1 -0
- package/dist/Typography-Cta6Rg4L.js +51 -0
- package/dist/Typography-Cta6Rg4L.js.map +1 -0
- package/dist/UserCard-BhqtX1vU.js +74 -0
- package/dist/UserCard-BhqtX1vU.js.map +1 -0
- package/dist/UserCard-OlLeyyS0.cjs +2 -0
- package/dist/UserCard-OlLeyyS0.cjs.map +1 -0
- package/dist/access-DPUHbE-S.cjs +2 -0
- package/dist/access-DPUHbE-S.cjs.map +1 -0
- package/dist/access-Db4knwyR.js +25 -0
- package/dist/access-Db4knwyR.js.map +1 -0
- package/dist/components/Accordion/Accordion.d.cts +43 -0
- package/dist/components/Accordion/Accordion.d.ts +43 -0
- package/dist/components/Accordion/AccordionItem.d.cts +20 -0
- package/dist/components/Accordion/AccordionItem.d.ts +20 -0
- package/dist/components/Accordion/accordionContext.d.cts +13 -0
- package/dist/components/Accordion/accordionContext.d.ts +13 -0
- package/dist/components/Accordion/index.cjs +2 -0
- package/dist/components/Accordion/index.cjs.map +1 -0
- package/dist/components/Accordion/index.d.cts +4 -0
- package/dist/components/Accordion/index.d.ts +4 -0
- package/dist/components/Accordion/index.js +7 -0
- package/dist/components/Accordion/index.js.map +1 -0
- package/dist/components/Alert/Alert.d.cts +30 -0
- package/dist/components/Alert/Alert.d.ts +30 -0
- package/dist/components/Alert/index.cjs +2 -0
- package/dist/components/Alert/index.cjs.map +1 -0
- package/dist/components/Alert/index.d.cts +2 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/Alert/index.js +6 -0
- package/dist/components/Alert/index.js.map +1 -0
- package/dist/components/Avatar/Avatar.d.cts +28 -0
- package/dist/components/Avatar/Avatar.d.ts +28 -0
- package/dist/components/Avatar/AvatarGroup.d.cts +19 -0
- package/dist/components/Avatar/AvatarGroup.d.ts +19 -0
- package/dist/components/Avatar/index.cjs +2 -0
- package/dist/components/Avatar/index.cjs.map +1 -0
- package/dist/components/Avatar/index.d.cts +4 -0
- package/dist/components/Avatar/index.d.ts +4 -0
- package/dist/components/Avatar/index.js +8 -0
- package/dist/components/Avatar/index.js.map +1 -0
- package/dist/components/Badge/Badge.d.cts +26 -0
- package/dist/components/Badge/Badge.d.ts +26 -0
- package/dist/components/Badge/index.cjs +2 -0
- package/dist/components/Badge/index.cjs.map +1 -0
- package/dist/components/Badge/index.d.cts +2 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Badge/index.js +6 -0
- package/dist/components/Badge/index.js.map +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.cts +17 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +17 -0
- package/dist/components/Breadcrumbs/index.cjs +2 -0
- package/dist/components/Breadcrumbs/index.cjs.map +1 -0
- package/dist/components/Breadcrumbs/index.d.cts +2 -0
- package/dist/components/Breadcrumbs/index.d.ts +2 -0
- package/dist/components/Breadcrumbs/index.js +6 -0
- package/dist/components/Breadcrumbs/index.js.map +1 -0
- package/dist/components/Button/Button.d.cts +23 -0
- package/dist/components/Button/Button.d.ts +23 -0
- package/dist/components/Button/index.cjs +2 -0
- package/dist/components/Button/index.cjs.map +1 -0
- package/dist/components/Button/index.d.cts +2 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Button/index.js +6 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Card/Card.d.cts +37 -0
- package/dist/components/Card/Card.d.ts +37 -0
- package/dist/components/Card/index.cjs +2 -0
- package/dist/components/Card/index.cjs.map +1 -0
- package/dist/components/Card/index.d.cts +2 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Card/index.js +6 -0
- package/dist/components/Card/index.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.cts +29 -0
- package/dist/components/Checkbox/Checkbox.d.ts +29 -0
- package/dist/components/Checkbox/index.cjs +2 -0
- package/dist/components/Checkbox/index.cjs.map +1 -0
- package/dist/components/Checkbox/index.d.cts +2 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/index.js +6 -0
- package/dist/components/Checkbox/index.js.map +1 -0
- package/dist/components/Chip/Chip.d.cts +37 -0
- package/dist/components/Chip/Chip.d.ts +37 -0
- package/dist/components/Chip/index.cjs +2 -0
- package/dist/components/Chip/index.cjs.map +1 -0
- package/dist/components/Chip/index.d.cts +2 -0
- package/dist/components/Chip/index.d.ts +2 -0
- package/dist/components/Chip/index.js +6 -0
- package/dist/components/Chip/index.js.map +1 -0
- package/dist/components/ChoiceCard/ChoiceCard.d.cts +41 -0
- package/dist/components/ChoiceCard/ChoiceCard.d.ts +41 -0
- package/dist/components/ChoiceCard/ChoiceCardGroup.d.cts +72 -0
- package/dist/components/ChoiceCard/ChoiceCardGroup.d.ts +72 -0
- package/dist/components/ChoiceCard/choiceCardContext.d.cts +21 -0
- package/dist/components/ChoiceCard/choiceCardContext.d.ts +21 -0
- package/dist/components/ChoiceCard/index.cjs +2 -0
- package/dist/components/ChoiceCard/index.cjs.map +1 -0
- package/dist/components/ChoiceCard/index.d.cts +4 -0
- package/dist/components/ChoiceCard/index.d.ts +4 -0
- package/dist/components/ChoiceCard/index.js +7 -0
- package/dist/components/ChoiceCard/index.js.map +1 -0
- package/dist/components/CodeBlock/CodeBlock.d.cts +30 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +30 -0
- package/dist/components/CodeBlock/index.cjs +2 -0
- package/dist/components/CodeBlock/index.cjs.map +1 -0
- package/dist/components/CodeBlock/index.d.cts +2 -0
- package/dist/components/CodeBlock/index.d.ts +2 -0
- package/dist/components/CodeBlock/index.js +6 -0
- package/dist/components/CodeBlock/index.js.map +1 -0
- package/dist/components/ColorPicker/ColorPicker.d.cts +47 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +47 -0
- package/dist/components/ColorPicker/ColorPickerPanel.d.cts +20 -0
- package/dist/components/ColorPicker/ColorPickerPanel.d.ts +20 -0
- package/dist/components/ColorPicker/colorUtils.d.cts +44 -0
- package/dist/components/ColorPicker/colorUtils.d.ts +44 -0
- package/dist/components/ColorPicker/index.cjs +2 -0
- package/dist/components/ColorPicker/index.cjs.map +1 -0
- package/dist/components/ColorPicker/index.d.cts +2 -0
- package/dist/components/ColorPicker/index.d.ts +2 -0
- package/dist/components/ColorPicker/index.js +6 -0
- package/dist/components/ColorPicker/index.js.map +1 -0
- package/dist/components/DatePicker/Calendar.d.cts +29 -0
- package/dist/components/DatePicker/Calendar.d.ts +29 -0
- package/dist/components/DatePicker/DatePicker.d.cts +66 -0
- package/dist/components/DatePicker/DatePicker.d.ts +66 -0
- package/dist/components/DatePicker/dateUtils.d.cts +86 -0
- package/dist/components/DatePicker/dateUtils.d.ts +86 -0
- package/dist/components/DatePicker/index.cjs +2 -0
- package/dist/components/DatePicker/index.cjs.map +1 -0
- package/dist/components/DatePicker/index.d.cts +2 -0
- package/dist/components/DatePicker/index.d.ts +2 -0
- package/dist/components/DatePicker/index.js +6 -0
- package/dist/components/DatePicker/index.js.map +1 -0
- package/dist/components/DateTimePicker/DateTimePicker.d.cts +79 -0
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +79 -0
- package/dist/components/DateTimePicker/TimeColumns.d.cts +22 -0
- package/dist/components/DateTimePicker/TimeColumns.d.ts +22 -0
- package/dist/components/DateTimePicker/index.cjs +2 -0
- package/dist/components/DateTimePicker/index.cjs.map +1 -0
- package/dist/components/DateTimePicker/index.d.cts +2 -0
- package/dist/components/DateTimePicker/index.d.ts +2 -0
- package/dist/components/DateTimePicker/index.js +6 -0
- package/dist/components/DateTimePicker/index.js.map +1 -0
- package/dist/components/Divider/Divider.d.cts +17 -0
- package/dist/components/Divider/Divider.d.ts +17 -0
- package/dist/components/Divider/index.cjs +2 -0
- package/dist/components/Divider/index.cjs.map +1 -0
- package/dist/components/Divider/index.d.cts +2 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Divider/index.js +6 -0
- package/dist/components/Divider/index.js.map +1 -0
- package/dist/components/Dropdown/Dropdown.d.cts +44 -0
- package/dist/components/Dropdown/Dropdown.d.ts +44 -0
- package/dist/components/Dropdown/index.cjs +2 -0
- package/dist/components/Dropdown/index.cjs.map +1 -0
- package/dist/components/Dropdown/index.d.cts +2 -0
- package/dist/components/Dropdown/index.d.ts +2 -0
- package/dist/components/Dropdown/index.js +6 -0
- package/dist/components/Dropdown/index.js.map +1 -0
- package/dist/components/EmptyState/EmptyState.d.cts +29 -0
- package/dist/components/EmptyState/EmptyState.d.ts +29 -0
- package/dist/components/EmptyState/index.cjs +2 -0
- package/dist/components/EmptyState/index.cjs.map +1 -0
- package/dist/components/EmptyState/index.d.cts +2 -0
- package/dist/components/EmptyState/index.d.ts +2 -0
- package/dist/components/EmptyState/index.js +6 -0
- package/dist/components/EmptyState/index.js.map +1 -0
- package/dist/components/FileUploader/FileUploader.d.cts +144 -0
- package/dist/components/FileUploader/FileUploader.d.ts +144 -0
- package/dist/components/FileUploader/FileUploaderEditDialog.d.cts +34 -0
- package/dist/components/FileUploader/FileUploaderEditDialog.d.ts +34 -0
- package/dist/components/FileUploader/FileUploaderPreview.d.cts +23 -0
- package/dist/components/FileUploader/FileUploaderPreview.d.ts +23 -0
- package/dist/components/FileUploader/index.cjs +2 -0
- package/dist/components/FileUploader/index.cjs.map +1 -0
- package/dist/components/FileUploader/index.d.cts +2 -0
- package/dist/components/FileUploader/index.d.ts +2 -0
- package/dist/components/FileUploader/index.js +6 -0
- package/dist/components/FileUploader/index.js.map +1 -0
- package/dist/components/Flag/Flag.d.cts +14 -0
- package/dist/components/Flag/Flag.d.ts +14 -0
- package/dist/components/Flag/index.cjs +2 -0
- package/dist/components/Flag/index.cjs.map +1 -0
- package/dist/components/Flag/index.d.cts +2 -0
- package/dist/components/Flag/index.d.ts +2 -0
- package/dist/components/Flag/index.js +6 -0
- package/dist/components/Flag/index.js.map +1 -0
- package/dist/components/Flex/Col.d.cts +8 -0
- package/dist/components/Flex/Col.d.ts +8 -0
- package/dist/components/Flex/Flex.d.cts +32 -0
- package/dist/components/Flex/Flex.d.ts +32 -0
- package/dist/components/Flex/Grid.d.cts +28 -0
- package/dist/components/Flex/Grid.d.ts +28 -0
- package/dist/components/Flex/Row.d.cts +8 -0
- package/dist/components/Flex/Row.d.ts +8 -0
- package/dist/components/Flex/index.cjs +2 -0
- package/dist/components/Flex/index.cjs.map +1 -0
- package/dist/components/Flex/index.d.cts +8 -0
- package/dist/components/Flex/index.d.ts +8 -0
- package/dist/components/Flex/index.js +11 -0
- package/dist/components/Flex/index.js.map +1 -0
- package/dist/components/FloatingPanel/FloatingPanel.d.cts +39 -0
- package/dist/components/FloatingPanel/FloatingPanel.d.ts +39 -0
- package/dist/components/FullscreenToggle/FullscreenToggle.d.cts +12 -0
- package/dist/components/FullscreenToggle/FullscreenToggle.d.ts +12 -0
- package/dist/components/FullscreenToggle/index.cjs +2 -0
- package/dist/components/FullscreenToggle/index.cjs.map +1 -0
- package/dist/components/FullscreenToggle/index.d.cts +2 -0
- package/dist/components/FullscreenToggle/index.d.ts +2 -0
- package/dist/components/FullscreenToggle/index.js +6 -0
- package/dist/components/FullscreenToggle/index.js.map +1 -0
- package/dist/components/Icon/Icon.d.cts +19 -0
- package/dist/components/Icon/Icon.d.ts +19 -0
- package/dist/components/Icon/index.cjs +2 -0
- package/dist/components/Icon/index.cjs.map +1 -0
- package/dist/components/Icon/index.d.cts +4 -0
- package/dist/components/Icon/index.d.ts +4 -0
- package/dist/components/Icon/index.js +9 -0
- package/dist/components/Icon/index.js.map +1 -0
- package/dist/components/IconButton/IconButton.d.cts +28 -0
- package/dist/components/IconButton/IconButton.d.ts +28 -0
- package/dist/components/IconButton/index.cjs +2 -0
- package/dist/components/IconButton/index.cjs.map +1 -0
- package/dist/components/IconButton/index.d.cts +2 -0
- package/dist/components/IconButton/index.d.ts +2 -0
- package/dist/components/IconButton/index.js +6 -0
- package/dist/components/IconButton/index.js.map +1 -0
- package/dist/components/List/List.d.cts +20 -0
- package/dist/components/List/List.d.ts +20 -0
- package/dist/components/List/ListItem.d.cts +33 -0
- package/dist/components/List/ListItem.d.ts +33 -0
- package/dist/components/List/index.cjs +2 -0
- package/dist/components/List/index.cjs.map +1 -0
- package/dist/components/List/index.d.cts +4 -0
- package/dist/components/List/index.d.ts +4 -0
- package/dist/components/List/index.js +8 -0
- package/dist/components/List/index.js.map +1 -0
- package/dist/components/List/listContext.d.cts +5 -0
- package/dist/components/List/listContext.d.ts +5 -0
- package/dist/components/Loader/Loader.d.cts +15 -0
- package/dist/components/Loader/Loader.d.ts +15 -0
- package/dist/components/Loader/index.cjs +2 -0
- package/dist/components/Loader/index.cjs.map +1 -0
- package/dist/components/Loader/index.d.cts +2 -0
- package/dist/components/Loader/index.d.ts +2 -0
- package/dist/components/Loader/index.js +6 -0
- package/dist/components/Loader/index.js.map +1 -0
- package/dist/components/Modal/Modal.d.cts +63 -0
- package/dist/components/Modal/Modal.d.ts +63 -0
- package/dist/components/Modal/index.cjs +2 -0
- package/dist/components/Modal/index.cjs.map +1 -0
- package/dist/components/Modal/index.d.cts +2 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Modal/index.js +6 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/MultiSelect/MultiSelect.d.cts +72 -0
- package/dist/components/MultiSelect/MultiSelect.d.ts +72 -0
- package/dist/components/MultiSelect/index.cjs +2 -0
- package/dist/components/MultiSelect/index.cjs.map +1 -0
- package/dist/components/MultiSelect/index.d.cts +2 -0
- package/dist/components/MultiSelect/index.d.ts +2 -0
- package/dist/components/MultiSelect/index.js +6 -0
- package/dist/components/MultiSelect/index.js.map +1 -0
- package/dist/components/MultilineTextField/MultilineTextField.d.cts +28 -0
- package/dist/components/MultilineTextField/MultilineTextField.d.ts +28 -0
- package/dist/components/MultilineTextField/index.cjs +2 -0
- package/dist/components/MultilineTextField/index.cjs.map +1 -0
- package/dist/components/MultilineTextField/index.d.cts +2 -0
- package/dist/components/MultilineTextField/index.d.ts +2 -0
- package/dist/components/MultilineTextField/index.js +6 -0
- package/dist/components/MultilineTextField/index.js.map +1 -0
- package/dist/components/NumberField/NumberField.d.cts +45 -0
- package/dist/components/NumberField/NumberField.d.ts +45 -0
- package/dist/components/NumberField/index.cjs +2 -0
- package/dist/components/NumberField/index.cjs.map +1 -0
- package/dist/components/NumberField/index.d.cts +2 -0
- package/dist/components/NumberField/index.d.ts +2 -0
- package/dist/components/NumberField/index.js +6 -0
- package/dist/components/NumberField/index.js.map +1 -0
- package/dist/components/OtpField/OtpField.d.cts +55 -0
- package/dist/components/OtpField/OtpField.d.ts +55 -0
- package/dist/components/OtpField/index.cjs +2 -0
- package/dist/components/OtpField/index.cjs.map +1 -0
- package/dist/components/OtpField/index.d.cts +2 -0
- package/dist/components/OtpField/index.d.ts +2 -0
- package/dist/components/OtpField/index.js +6 -0
- package/dist/components/OtpField/index.js.map +1 -0
- package/dist/components/Overlay/Overlay.d.cts +29 -0
- package/dist/components/Overlay/Overlay.d.ts +29 -0
- package/dist/components/PageLayout/PageLayout.d.cts +13 -0
- package/dist/components/PageLayout/PageLayout.d.ts +13 -0
- package/dist/components/PageLayout/index.cjs +2 -0
- package/dist/components/PageLayout/index.cjs.map +1 -0
- package/dist/components/PageLayout/index.d.cts +2 -0
- package/dist/components/PageLayout/index.d.ts +2 -0
- package/dist/components/PageLayout/index.js +6 -0
- package/dist/components/PageLayout/index.js.map +1 -0
- package/dist/components/Pagination/Pagination.d.cts +44 -0
- package/dist/components/Pagination/Pagination.d.ts +44 -0
- package/dist/components/Pagination/index.cjs +2 -0
- package/dist/components/Pagination/index.cjs.map +1 -0
- package/dist/components/Pagination/index.d.cts +2 -0
- package/dist/components/Pagination/index.d.ts +2 -0
- package/dist/components/Pagination/index.js +6 -0
- package/dist/components/Pagination/index.js.map +1 -0
- package/dist/components/Pagination/paginationRange.d.cts +21 -0
- package/dist/components/Pagination/paginationRange.d.ts +21 -0
- package/dist/components/Popover/Popover.d.cts +43 -0
- package/dist/components/Popover/Popover.d.ts +43 -0
- package/dist/components/Popover/index.cjs +2 -0
- package/dist/components/Popover/index.cjs.map +1 -0
- package/dist/components/Popover/index.d.cts +2 -0
- package/dist/components/Popover/index.d.ts +2 -0
- package/dist/components/Popover/index.js +6 -0
- package/dist/components/Popover/index.js.map +1 -0
- package/dist/components/Radio/Radio.d.cts +27 -0
- package/dist/components/Radio/Radio.d.ts +27 -0
- package/dist/components/Radio/RadioGroup.d.cts +47 -0
- package/dist/components/Radio/RadioGroup.d.ts +47 -0
- package/dist/components/Radio/index.cjs +2 -0
- package/dist/components/Radio/index.cjs.map +1 -0
- package/dist/components/Radio/index.d.cts +4 -0
- package/dist/components/Radio/index.d.ts +4 -0
- package/dist/components/Radio/index.js +7 -0
- package/dist/components/Radio/index.js.map +1 -0
- package/dist/components/Radio/radioContext.d.cts +18 -0
- package/dist/components/Radio/radioContext.d.ts +18 -0
- package/dist/components/RemoveDialog/RemoveDialog.d.cts +35 -0
- package/dist/components/RemoveDialog/RemoveDialog.d.ts +35 -0
- package/dist/components/RemoveDialog/index.cjs +2 -0
- package/dist/components/RemoveDialog/index.cjs.map +1 -0
- package/dist/components/RemoveDialog/index.d.cts +2 -0
- package/dist/components/RemoveDialog/index.d.ts +2 -0
- package/dist/components/RemoveDialog/index.js +6 -0
- package/dist/components/RemoveDialog/index.js.map +1 -0
- package/dist/components/RichTextEditor/RichTextEditor.d.cts +48 -0
- package/dist/components/RichTextEditor/RichTextEditor.d.ts +48 -0
- package/dist/components/RichTextEditor/Toolbar.d.cts +10 -0
- package/dist/components/RichTextEditor/Toolbar.d.ts +10 -0
- package/dist/components/RichTextEditor/index.cjs +2 -0
- package/dist/components/RichTextEditor/index.cjs.map +1 -0
- package/dist/components/RichTextEditor/index.d.cts +2 -0
- package/dist/components/RichTextEditor/index.d.ts +2 -0
- package/dist/components/RichTextEditor/index.js +6 -0
- package/dist/components/RichTextEditor/index.js.map +1 -0
- package/dist/components/RichTextEditor/nodes/ImageNode.d.cts +33 -0
- package/dist/components/RichTextEditor/nodes/ImageNode.d.ts +33 -0
- package/dist/components/RichTextEditor/nodes/VideoNode.d.cts +36 -0
- package/dist/components/RichTextEditor/nodes/VideoNode.d.ts +36 -0
- package/dist/components/RichTextEditor/urlSafety.d.cts +16 -0
- package/dist/components/RichTextEditor/urlSafety.d.ts +16 -0
- package/dist/components/RootLayout/RootLayout.d.cts +46 -0
- package/dist/components/RootLayout/RootLayout.d.ts +46 -0
- package/dist/components/RootLayout/SettingsDrawer.d.cts +23 -0
- package/dist/components/RootLayout/SettingsDrawer.d.ts +23 -0
- package/dist/components/RootLayout/index.cjs +2 -0
- package/dist/components/RootLayout/index.cjs.map +1 -0
- package/dist/components/RootLayout/index.d.cts +2 -0
- package/dist/components/RootLayout/index.d.ts +2 -0
- package/dist/components/RootLayout/index.js +6 -0
- package/dist/components/RootLayout/index.js.map +1 -0
- package/dist/components/Select/Select.d.cts +85 -0
- package/dist/components/Select/Select.d.ts +85 -0
- package/dist/components/Select/index.cjs +2 -0
- package/dist/components/Select/index.cjs.map +1 -0
- package/dist/components/Select/index.d.cts +2 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Select/index.js +6 -0
- package/dist/components/Select/index.js.map +1 -0
- package/dist/components/Sidebar/Sidebar.d.cts +90 -0
- package/dist/components/Sidebar/Sidebar.d.ts +90 -0
- package/dist/components/Sidebar/index.cjs +2 -0
- package/dist/components/Sidebar/index.cjs.map +1 -0
- package/dist/components/Sidebar/index.d.cts +1 -0
- package/dist/components/Sidebar/index.d.ts +1 -0
- package/dist/components/Sidebar/index.js +7 -0
- package/dist/components/Sidebar/index.js.map +1 -0
- package/dist/components/Slider/Slider.d.cts +58 -0
- package/dist/components/Slider/Slider.d.ts +58 -0
- package/dist/components/Slider/index.cjs +2 -0
- package/dist/components/Slider/index.cjs.map +1 -0
- package/dist/components/Slider/index.d.cts +2 -0
- package/dist/components/Slider/index.d.ts +2 -0
- package/dist/components/Slider/index.js +6 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/SpeedDial/SpeedDial.d.cts +56 -0
- package/dist/components/SpeedDial/SpeedDial.d.ts +56 -0
- package/dist/components/SpeedDial/SpeedDialAction.d.cts +18 -0
- package/dist/components/SpeedDial/SpeedDialAction.d.ts +18 -0
- package/dist/components/SpeedDial/index.cjs +2 -0
- package/dist/components/SpeedDial/index.cjs.map +1 -0
- package/dist/components/SpeedDial/index.d.cts +4 -0
- package/dist/components/SpeedDial/index.d.ts +4 -0
- package/dist/components/SpeedDial/index.js +7 -0
- package/dist/components/SpeedDial/index.js.map +1 -0
- package/dist/components/SpeedDial/speedDialContext.d.cts +19 -0
- package/dist/components/SpeedDial/speedDialContext.d.ts +19 -0
- package/dist/components/Stepper/Stepper.d.cts +94 -0
- package/dist/components/Stepper/Stepper.d.ts +94 -0
- package/dist/components/Stepper/index.cjs +2 -0
- package/dist/components/Stepper/index.cjs.map +1 -0
- package/dist/components/Stepper/index.d.cts +2 -0
- package/dist/components/Stepper/index.d.ts +2 -0
- package/dist/components/Stepper/index.js +6 -0
- package/dist/components/Stepper/index.js.map +1 -0
- package/dist/components/SwatchPicker/SwatchPicker.d.cts +43 -0
- package/dist/components/SwatchPicker/SwatchPicker.d.ts +43 -0
- package/dist/components/SwatchPicker/index.cjs +2 -0
- package/dist/components/SwatchPicker/index.cjs.map +1 -0
- package/dist/components/SwatchPicker/index.d.cts +2 -0
- package/dist/components/SwatchPicker/index.d.ts +2 -0
- package/dist/components/SwatchPicker/index.js +6 -0
- package/dist/components/SwatchPicker/index.js.map +1 -0
- package/dist/components/Switch/Switch.d.cts +29 -0
- package/dist/components/Switch/Switch.d.ts +29 -0
- package/dist/components/Switch/index.cjs +2 -0
- package/dist/components/Switch/index.cjs.map +1 -0
- package/dist/components/Switch/index.d.cts +2 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Switch/index.js +6 -0
- package/dist/components/Switch/index.js.map +1 -0
- package/dist/components/Table/Table.d.cts +248 -0
- package/dist/components/Table/Table.d.ts +248 -0
- package/dist/components/Table/TableFilters.d.cts +16 -0
- package/dist/components/Table/TableFilters.d.ts +16 -0
- package/dist/components/Table/index.cjs +2 -0
- package/dist/components/Table/index.cjs.map +1 -0
- package/dist/components/Table/index.d.cts +3 -0
- package/dist/components/Table/index.d.ts +3 -0
- package/dist/components/Table/index.js +6 -0
- package/dist/components/Table/index.js.map +1 -0
- package/dist/components/Table/tableFilter.d.cts +65 -0
- package/dist/components/Table/tableFilter.d.ts +65 -0
- package/dist/components/Tabs/Tabs.d.cts +80 -0
- package/dist/components/Tabs/Tabs.d.ts +80 -0
- package/dist/components/Tabs/index.cjs +2 -0
- package/dist/components/Tabs/index.cjs.map +1 -0
- package/dist/components/Tabs/index.d.cts +2 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tabs/index.js +6 -0
- package/dist/components/Tabs/index.js.map +1 -0
- package/dist/components/TagsField/TagsField.d.cts +47 -0
- package/dist/components/TagsField/TagsField.d.ts +47 -0
- package/dist/components/TagsField/index.cjs +2 -0
- package/dist/components/TagsField/index.cjs.map +1 -0
- package/dist/components/TagsField/index.d.cts +2 -0
- package/dist/components/TagsField/index.d.ts +2 -0
- package/dist/components/TagsField/index.js +6 -0
- package/dist/components/TagsField/index.js.map +1 -0
- package/dist/components/TextField/TextField.d.cts +62 -0
- package/dist/components/TextField/TextField.d.ts +62 -0
- package/dist/components/TextField/index.cjs +2 -0
- package/dist/components/TextField/index.cjs.map +1 -0
- package/dist/components/TextField/index.d.cts +2 -0
- package/dist/components/TextField/index.d.ts +2 -0
- package/dist/components/TextField/index.js +6 -0
- package/dist/components/TextField/index.js.map +1 -0
- package/dist/components/ThemeToggle/ThemeToggle.d.cts +9 -0
- package/dist/components/ThemeToggle/ThemeToggle.d.ts +9 -0
- package/dist/components/ThemeToggle/index.cjs +2 -0
- package/dist/components/ThemeToggle/index.cjs.map +1 -0
- package/dist/components/ThemeToggle/index.d.cts +2 -0
- package/dist/components/ThemeToggle/index.d.ts +2 -0
- package/dist/components/ThemeToggle/index.js +6 -0
- package/dist/components/ThemeToggle/index.js.map +1 -0
- package/dist/components/TimePicker/TimePicker.d.cts +68 -0
- package/dist/components/TimePicker/TimePicker.d.ts +68 -0
- package/dist/components/TimePicker/index.cjs +2 -0
- package/dist/components/TimePicker/index.cjs.map +1 -0
- package/dist/components/TimePicker/index.d.cts +2 -0
- package/dist/components/TimePicker/index.d.ts +2 -0
- package/dist/components/TimePicker/index.js +6 -0
- package/dist/components/TimePicker/index.js.map +1 -0
- package/dist/components/Timeline/Timeline.d.cts +37 -0
- package/dist/components/Timeline/Timeline.d.ts +37 -0
- package/dist/components/Timeline/TimelineItem.d.cts +26 -0
- package/dist/components/Timeline/TimelineItem.d.ts +26 -0
- package/dist/components/Timeline/index.cjs +2 -0
- package/dist/components/Timeline/index.cjs.map +1 -0
- package/dist/components/Timeline/index.d.cts +4 -0
- package/dist/components/Timeline/index.d.ts +4 -0
- package/dist/components/Timeline/index.js +7 -0
- package/dist/components/Timeline/index.js.map +1 -0
- package/dist/components/Timeline/timelineContext.d.cts +10 -0
- package/dist/components/Timeline/timelineContext.d.ts +10 -0
- package/dist/components/Toast/ToastItem.d.cts +12 -0
- package/dist/components/Toast/ToastItem.d.ts +12 -0
- package/dist/components/Toast/Toaster.d.cts +18 -0
- package/dist/components/Toast/Toaster.d.ts +18 -0
- package/dist/components/Toast/index.cjs +2 -0
- package/dist/components/Toast/index.cjs.map +1 -0
- package/dist/components/Toast/index.d.cts +4 -0
- package/dist/components/Toast/index.d.ts +4 -0
- package/dist/components/Toast/index.js +8 -0
- package/dist/components/Toast/index.js.map +1 -0
- package/dist/components/Toast/toastStore.d.cts +45 -0
- package/dist/components/Toast/toastStore.d.ts +45 -0
- package/dist/components/ToggleButton/ToggleButton.d.cts +26 -0
- package/dist/components/ToggleButton/ToggleButton.d.ts +26 -0
- package/dist/components/ToggleButton/ToggleButtonGroup.d.cts +52 -0
- package/dist/components/ToggleButton/ToggleButtonGroup.d.ts +52 -0
- package/dist/components/ToggleButton/index.cjs +2 -0
- package/dist/components/ToggleButton/index.cjs.map +1 -0
- package/dist/components/ToggleButton/index.d.cts +4 -0
- package/dist/components/ToggleButton/index.d.ts +4 -0
- package/dist/components/ToggleButton/index.js +7 -0
- package/dist/components/ToggleButton/index.js.map +1 -0
- package/dist/components/ToggleButton/toggleButtonGroupContext.d.cts +15 -0
- package/dist/components/ToggleButton/toggleButtonGroupContext.d.ts +15 -0
- package/dist/components/Tooltip/Tooltip.d.cts +21 -0
- package/dist/components/Tooltip/Tooltip.d.ts +21 -0
- package/dist/components/Tooltip/index.cjs +2 -0
- package/dist/components/Tooltip/index.cjs.map +1 -0
- package/dist/components/Tooltip/index.d.cts +2 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Tooltip/index.js +6 -0
- package/dist/components/Tooltip/index.js.map +1 -0
- package/dist/components/TranslatedFields/TranslatedFields.d.cts +56 -0
- package/dist/components/TranslatedFields/TranslatedFields.d.ts +56 -0
- package/dist/components/TranslatedFields/index.cjs +2 -0
- package/dist/components/TranslatedFields/index.cjs.map +1 -0
- package/dist/components/TranslatedFields/index.d.cts +2 -0
- package/dist/components/TranslatedFields/index.d.ts +2 -0
- package/dist/components/TranslatedFields/index.js +6 -0
- package/dist/components/TranslatedFields/index.js.map +1 -0
- package/dist/components/Typography/Typography.d.cts +30 -0
- package/dist/components/Typography/Typography.d.ts +30 -0
- package/dist/components/Typography/index.cjs +2 -0
- package/dist/components/Typography/index.cjs.map +1 -0
- package/dist/components/Typography/index.d.cts +2 -0
- package/dist/components/Typography/index.d.ts +2 -0
- package/dist/components/Typography/index.js +6 -0
- package/dist/components/Typography/index.js.map +1 -0
- package/dist/components/UserCard/UserCard.d.cts +33 -0
- package/dist/components/UserCard/UserCard.d.ts +33 -0
- package/dist/components/UserCard/index.cjs +2 -0
- package/dist/components/UserCard/index.cjs.map +1 -0
- package/dist/components/UserCard/index.d.cts +2 -0
- package/dist/components/UserCard/index.d.ts +2 -0
- package/dist/components/UserCard/index.js +6 -0
- package/dist/components/UserCard/index.js.map +1 -0
- package/dist/components/index.d.cts +57 -0
- package/dist/components/index.d.ts +57 -0
- package/dist/entries/components.cjs +2 -0
- package/dist/entries/components.cjs.map +1 -0
- package/dist/entries/components.d.cts +3 -0
- package/dist/entries/components.d.ts +3 -0
- package/dist/entries/components.js +140 -0
- package/dist/entries/components.js.map +1 -0
- package/dist/entries/helpers.cjs +2 -0
- package/dist/entries/helpers.cjs.map +1 -0
- package/dist/entries/helpers.d.cts +4 -0
- package/dist/entries/helpers.d.ts +4 -0
- package/dist/entries/helpers.js +17 -0
- package/dist/entries/helpers.js.map +1 -0
- package/dist/entries/hooks.cjs +2 -0
- package/dist/entries/hooks.cjs.map +1 -0
- package/dist/entries/hooks.d.cts +7 -0
- package/dist/entries/hooks.d.ts +7 -0
- package/dist/entries/hooks.js +12 -0
- package/dist/entries/hooks.js.map +1 -0
- package/dist/entries/i18n.cjs +2 -0
- package/dist/entries/i18n.cjs.map +1 -0
- package/dist/entries/i18n.d.cts +3 -0
- package/dist/entries/i18n.d.ts +3 -0
- package/dist/entries/i18n.js +11 -0
- package/dist/entries/i18n.js.map +1 -0
- package/dist/entries/icons.cjs +2 -0
- package/dist/entries/icons.cjs.map +1 -0
- package/dist/entries/icons.d.cts +2 -0
- package/dist/entries/icons.d.ts +2 -0
- package/dist/entries/icons.js +9 -0
- package/dist/entries/icons.js.map +1 -0
- package/dist/entries/theme.cjs +2 -0
- package/dist/entries/theme.cjs.map +1 -0
- package/dist/entries/theme.d.cts +2 -0
- package/dist/entries/theme.d.ts +2 -0
- package/dist/entries/theme.js +18 -0
- package/dist/entries/theme.js.map +1 -0
- package/dist/form/Form.d.cts +14 -0
- package/dist/form/Form.d.ts +14 -0
- package/dist/form/formContext.d.cts +8 -0
- package/dist/form/formContext.d.ts +8 -0
- package/dist/form/index.d.cts +5 -0
- package/dist/form/index.d.ts +5 -0
- package/dist/form/useForm.d.cts +81 -0
- package/dist/form/useForm.d.ts +81 -0
- package/dist/formContext-B7ln1Miy.js +10 -0
- package/dist/formContext-B7ln1Miy.js.map +1 -0
- package/dist/formContext-bTWrqdEV.cjs +2 -0
- package/dist/formContext-bTWrqdEV.cjs.map +1 -0
- package/dist/helpers/access.d.cts +11 -0
- package/dist/helpers/access.d.ts +11 -0
- package/dist/helpers/table.d.cts +41 -0
- package/dist/helpers/table.d.ts +41 -0
- package/dist/helpers/translations.d.cts +63 -0
- package/dist/helpers/translations.d.ts +63 -0
- package/dist/hooks/index.d.cts +4 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/useDisclosure.d.cts +7 -0
- package/dist/hooks/useDisclosure.d.ts +7 -0
- package/dist/hooks/useFloatingPanel.d.cts +45 -0
- package/dist/hooks/useFloatingPanel.d.ts +45 -0
- package/dist/hooks/useLockBodyScroll.d.cts +7 -0
- package/dist/hooks/useLockBodyScroll.d.ts +7 -0
- package/dist/hooks/useMediaQuery.d.cts +13 -0
- package/dist/hooks/useMediaQuery.d.ts +13 -0
- package/dist/i18n/locales/de.d.cts +5 -0
- package/dist/i18n/locales/de.d.ts +5 -0
- package/dist/i18n/locales/en.d.cts +9 -0
- package/dist/i18n/locales/en.d.ts +9 -0
- package/dist/i18n/locales/es.d.cts +5 -0
- package/dist/i18n/locales/es.d.ts +5 -0
- package/dist/i18n/locales/fr.d.cts +5 -0
- package/dist/i18n/locales/fr.d.ts +5 -0
- package/dist/i18n/locales/it.d.cts +5 -0
- package/dist/i18n/locales/it.d.ts +5 -0
- package/dist/i18n/locales/ka.d.cts +8 -0
- package/dist/i18n/locales/ka.d.ts +8 -0
- package/dist/i18n/locales/ru.d.cts +5 -0
- package/dist/i18n/locales/ru.d.ts +5 -0
- package/dist/i18n/messages.d.cts +241 -0
- package/dist/i18n/messages.d.ts +241 -0
- package/dist/icons/icons.d.cts +2 -0
- package/dist/icons/icons.d.ts +2 -0
- package/dist/icons/names.d.cts +3 -0
- package/dist/icons/names.d.ts +3 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +203 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +185 -0
- package/dist/index.js.map +1 -0
- package/dist/messages-C-zecFBE.js +1363 -0
- package/dist/messages-C-zecFBE.js.map +1 -0
- package/dist/messages-Cy-qK5xU.cjs +36 -0
- package/dist/messages-Cy-qK5xU.cjs.map +1 -0
- package/dist/names-C2Yj1p3u.cjs +2 -0
- package/dist/names-C2Yj1p3u.cjs.map +1 -0
- package/dist/names-D8ABK2Wk.js +1205 -0
- package/dist/names-D8ABK2Wk.js.map +1 -0
- package/dist/reset.css +78 -0
- package/dist/table-CZRQGNdk.cjs +2 -0
- package/dist/table-CZRQGNdk.cjs.map +1 -0
- package/dist/table-DF3zTrC3.js +49 -0
- package/dist/table-DF3zTrC3.js.map +1 -0
- package/dist/theme/ConfigProvider.d.cts +362 -0
- package/dist/theme/ConfigProvider.d.ts +362 -0
- package/dist/theme/applyTheme.d.cts +28 -0
- package/dist/theme/applyTheme.d.ts +28 -0
- package/dist/theme/index.d.cts +5 -0
- package/dist/theme/index.d.ts +5 -0
- package/dist/toastStore-B4Tk2Xk7.cjs +2 -0
- package/dist/toastStore-B4Tk2Xk7.cjs.map +1 -0
- package/dist/toastStore-Cx_JOKwS.js +32 -0
- package/dist/toastStore-Cx_JOKwS.js.map +1 -0
- package/dist/translations-CXEeeUDL.cjs +2 -0
- package/dist/translations-CXEeeUDL.cjs.map +1 -0
- package/dist/translations-D15tFHM1.js +74 -0
- package/dist/translations-D15tFHM1.js.map +1 -0
- package/dist/useForm-B_5wDIER.js +126 -0
- package/dist/useForm-B_5wDIER.js.map +1 -0
- package/dist/useForm-C7erBHt0.cjs +2 -0
- package/dist/useForm-C7erBHt0.cjs.map +1 -0
- package/dist/useLockBodyScroll-CIXHZo-Q.cjs +2 -0
- package/dist/useLockBodyScroll-CIXHZo-Q.cjs.map +1 -0
- package/dist/useLockBodyScroll-DwBILLPK.js +35 -0
- package/dist/useLockBodyScroll-DwBILLPK.js.map +1 -0
- package/dist/useMediaQuery-BCsNfMA1.cjs +2 -0
- package/dist/useMediaQuery-BCsNfMA1.cjs.map +1 -0
- package/dist/useMediaQuery-_1EcFoC5.js +17 -0
- package/dist/useMediaQuery-_1EcFoC5.js.map +1 -0
- package/package.json +244 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import { jsx as he } from "react/jsx-runtime";
|
|
2
|
+
import { useContext as o, useState as E, useMemo as T, useCallback as c, useLayoutEffect as Z, createContext as Se } from "react";
|
|
3
|
+
import { D as x } from "./translations-D15tFHM1.js";
|
|
4
|
+
import { a as ee, c as te } from "./messages-C-zecFBE.js";
|
|
5
|
+
function Ae(e) {
|
|
6
|
+
let s = e.trim().replace(/^#/, "");
|
|
7
|
+
s.length === 3 && (s = s[0] + s[0] + s[1] + s[1] + s[2] + s[2]);
|
|
8
|
+
const a = parseInt(s, 16);
|
|
9
|
+
return `${a >> 16 & 255}, ${a >> 8 & 255}, ${a & 255}`;
|
|
10
|
+
}
|
|
11
|
+
function be(e) {
|
|
12
|
+
const [s, a, l] = e.split(",").map((_) => Number(_.trim()));
|
|
13
|
+
return (s * 299 + a * 587 + l * 114) / 1e3 >= 150 ? "#04202b" : "#ffffff";
|
|
14
|
+
}
|
|
15
|
+
const fe = {
|
|
16
|
+
secondary: "rgb(var(--tz-color-primary-rgb))",
|
|
17
|
+
warning: "#ffffff"
|
|
18
|
+
};
|
|
19
|
+
function _e(e, s = document.documentElement) {
|
|
20
|
+
for (const [a, l] of Object.entries(e)) {
|
|
21
|
+
if (!l) continue;
|
|
22
|
+
const n = Ae(l);
|
|
23
|
+
s.style.setProperty(`--tz-color-${a}-rgb`, n), s.style.setProperty(
|
|
24
|
+
`--tz-color-${a}-contrast`,
|
|
25
|
+
fe[a] ?? be(n)
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const r = Se(null), se = "tz-theme-mode", f = (e) => `tz-accent-color-${e}`, ae = "tz-header-sticky", ne = "tz-font-family", re = "tz-locale", oe = [{ code: "en-US", label: "English" }], I = "Inter", Le = [I], Ie = (e) => `'${e}', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif`;
|
|
30
|
+
function ke() {
|
|
31
|
+
if (typeof document > "u" || document.getElementById("tz-font-preconnect")) return;
|
|
32
|
+
const e = document.createElement("link");
|
|
33
|
+
e.id = "tz-font-preconnect", e.rel = "preconnect", e.href = "https://fonts.googleapis.com", document.head.appendChild(e);
|
|
34
|
+
const s = document.createElement("link");
|
|
35
|
+
s.rel = "preconnect", s.href = "https://fonts.gstatic.com", s.crossOrigin = "anonymous", document.head.appendChild(s);
|
|
36
|
+
}
|
|
37
|
+
function Ce(e) {
|
|
38
|
+
if (typeof document > "u" || Le.includes(e)) return;
|
|
39
|
+
const s = `tz-font-${e.trim().replace(/\s+/g, "-").toLowerCase()}`;
|
|
40
|
+
if (document.getElementById(s)) return;
|
|
41
|
+
ke();
|
|
42
|
+
const a = document.createElement("link");
|
|
43
|
+
a.id = s, a.rel = "stylesheet", a.href = `https://fonts.googleapis.com/css2?family=${encodeURIComponent(e.trim()).replace(/%20/g, "+")}&display=swap`, document.head.appendChild(a);
|
|
44
|
+
}
|
|
45
|
+
const le = "tab", ue = "nestedTab", ce = "step", me = [], de = {}, ye = {}, Fe = {
|
|
46
|
+
primary: "#13404e",
|
|
47
|
+
secondary: "#ffffff",
|
|
48
|
+
background: "#f9f9f9",
|
|
49
|
+
// the rear + shell canvas — a soft off-white behind the white panels
|
|
50
|
+
surface: "#ffffff",
|
|
51
|
+
// the elevated panels (cards, sidebar, inputs, dropdowns, modals)
|
|
52
|
+
accent: "#056472",
|
|
53
|
+
success: "#00a854",
|
|
54
|
+
error: "#f04134",
|
|
55
|
+
info: "#039aa1",
|
|
56
|
+
warning: "#ffbf00"
|
|
57
|
+
}, Ke = {
|
|
58
|
+
primary: "#e6e8eb",
|
|
59
|
+
secondary: "#191919",
|
|
60
|
+
background: "#0f0f0f",
|
|
61
|
+
// the near-black rear + canvas
|
|
62
|
+
surface: "#191919",
|
|
63
|
+
// a touch lighter than the canvas, for the elevated panels
|
|
64
|
+
accent: "#16a6b4",
|
|
65
|
+
// a brighter teal — the light-mode accent is too dark on the dark canvas
|
|
66
|
+
success: "#00a854",
|
|
67
|
+
error: "#f04134",
|
|
68
|
+
info: "#039aa1",
|
|
69
|
+
warning: "#ffbf00"
|
|
70
|
+
};
|
|
71
|
+
function Re(e) {
|
|
72
|
+
const s = localStorage.getItem(se);
|
|
73
|
+
return s === "light" || s === "dark" ? s : e;
|
|
74
|
+
}
|
|
75
|
+
function Ue() {
|
|
76
|
+
return {
|
|
77
|
+
light: localStorage.getItem(f("light")) || null,
|
|
78
|
+
dark: localStorage.getItem(f("dark")) || null
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
function De(e) {
|
|
82
|
+
const s = localStorage.getItem(ae);
|
|
83
|
+
return s === "1" ? !0 : s === "0" ? !1 : e;
|
|
84
|
+
}
|
|
85
|
+
function Qe(e) {
|
|
86
|
+
return localStorage.getItem(ne) || e;
|
|
87
|
+
}
|
|
88
|
+
function Ne(e, s) {
|
|
89
|
+
const a = e.map((n) => n.code), l = localStorage.getItem(re);
|
|
90
|
+
return l && a.includes(l) ? l : s && a.includes(s) ? s : a.find((n) => n.toLowerCase().startsWith("en")) ?? a[0] ?? "en-US";
|
|
91
|
+
}
|
|
92
|
+
function Be({ config: e, children: s }) {
|
|
93
|
+
var $, H, G, j, q, V, W, J, X;
|
|
94
|
+
const [a, l] = E(
|
|
95
|
+
() => {
|
|
96
|
+
var t;
|
|
97
|
+
return Re(((t = e == null ? void 0 : e.theme) == null ? void 0 : t.mode) ?? "light");
|
|
98
|
+
}
|
|
99
|
+
), [n, _] = E(Ue), [k, pe] = E(
|
|
100
|
+
() => {
|
|
101
|
+
var t;
|
|
102
|
+
return De(((t = e == null ? void 0 : e.header) == null ? void 0 : t.sticky) ?? !1);
|
|
103
|
+
}
|
|
104
|
+
), [h, ie] = E(
|
|
105
|
+
() => {
|
|
106
|
+
var t;
|
|
107
|
+
return Qe(((t = e == null ? void 0 : e.theme) == null ? void 0 : t.fontFamily) ?? I);
|
|
108
|
+
}
|
|
109
|
+
), L = (($ = e == null ? void 0 : e.i18n) == null ? void 0 : $.languages) ?? oe, C = (H = e == null ? void 0 : e.i18n) == null ? void 0 : H.messages, F = (G = e == null ? void 0 : e.i18n) == null ? void 0 : G.appMessages, [y, Ee] = E(
|
|
110
|
+
() => {
|
|
111
|
+
var t;
|
|
112
|
+
return Ne(L, (t = e == null ? void 0 : e.i18n) == null ? void 0 : t.language);
|
|
113
|
+
}
|
|
114
|
+
), m = (j = e == null ? void 0 : e.theme) == null ? void 0 : j.colors, i = T(() => {
|
|
115
|
+
const t = { ...Fe, ...m == null ? void 0 : m.light }, u = { ...t, ...Ke, ...m == null ? void 0 : m.dark };
|
|
116
|
+
return { light: t, dark: u };
|
|
117
|
+
}, [m]), K = T(
|
|
118
|
+
() => ({ light: i.light.accent, dark: i.dark.accent }),
|
|
119
|
+
[i]
|
|
120
|
+
), p = c(
|
|
121
|
+
(t, u = n[t]) => {
|
|
122
|
+
const d = i[t];
|
|
123
|
+
_e(u ? { ...d, accent: u } : d);
|
|
124
|
+
const b = document.documentElement;
|
|
125
|
+
b.setAttribute("data-tz-theme", t), b.style.setProperty("color-scheme", t), localStorage.setItem(se, t);
|
|
126
|
+
},
|
|
127
|
+
[i, n]
|
|
128
|
+
);
|
|
129
|
+
Z(() => {
|
|
130
|
+
p(a);
|
|
131
|
+
}, [p, a]);
|
|
132
|
+
const S = c(
|
|
133
|
+
(t) => {
|
|
134
|
+
p(t), l(t);
|
|
135
|
+
},
|
|
136
|
+
[p]
|
|
137
|
+
), R = c(
|
|
138
|
+
() => S(a === "light" ? "dark" : "light"),
|
|
139
|
+
[a, S]
|
|
140
|
+
), U = c(
|
|
141
|
+
(t, u) => {
|
|
142
|
+
const d = u ?? a;
|
|
143
|
+
_((b) => ({ ...b, [d]: t })), t ? localStorage.setItem(f(d), t) : localStorage.removeItem(f(d)), d === a && p(a, t);
|
|
144
|
+
},
|
|
145
|
+
[a, p]
|
|
146
|
+
), D = c((t) => {
|
|
147
|
+
pe(t), localStorage.setItem(ae, t ? "1" : "0");
|
|
148
|
+
}, []), A = c((t) => {
|
|
149
|
+
Ce(t), document.documentElement.style.setProperty("--tz-font-family", Ie(t));
|
|
150
|
+
}, []);
|
|
151
|
+
Z(() => {
|
|
152
|
+
A(h);
|
|
153
|
+
}, [A, h]);
|
|
154
|
+
const Q = c(
|
|
155
|
+
(t) => {
|
|
156
|
+
const u = t.trim() || I;
|
|
157
|
+
A(u), ie(u), localStorage.setItem(ne, u);
|
|
158
|
+
},
|
|
159
|
+
[A]
|
|
160
|
+
), N = c((t) => {
|
|
161
|
+
Ee(t), localStorage.setItem(re, t);
|
|
162
|
+
}, []), O = T(
|
|
163
|
+
() => ee(y, C),
|
|
164
|
+
[y, C]
|
|
165
|
+
), g = T(
|
|
166
|
+
() => te(y, F),
|
|
167
|
+
[y, F]
|
|
168
|
+
), P = (e == null ? void 0 : e.locales) ?? me, Y = ((q = e == null ? void 0 : e.keys) == null ? void 0 : q.translationsNamespace) ?? x, M = ((V = e == null ? void 0 : e.keys) == null ? void 0 : V.tabQueryKey) ?? le, z = ((W = e == null ? void 0 : e.keys) == null ? void 0 : W.nestedTabQueryKey) ?? ue, B = ((J = e == null ? void 0 : e.keys) == null ? void 0 : J.stepQueryKey) ?? ce, v = ((X = e == null ? void 0 : e.table) == null ? void 0 : X.query) ?? de, w = (e == null ? void 0 : e.header) ?? ye, Te = T(
|
|
169
|
+
() => ({
|
|
170
|
+
mode: a,
|
|
171
|
+
setMode: S,
|
|
172
|
+
toggleMode: R,
|
|
173
|
+
accentColors: n,
|
|
174
|
+
defaultAccentColors: K,
|
|
175
|
+
setAccentColor: U,
|
|
176
|
+
locales: P,
|
|
177
|
+
translationsNamespace: Y,
|
|
178
|
+
tabQueryKey: M,
|
|
179
|
+
nestedTabQueryKey: z,
|
|
180
|
+
stepQueryKey: B,
|
|
181
|
+
tableQuery: v,
|
|
182
|
+
header: w,
|
|
183
|
+
headerSticky: k,
|
|
184
|
+
setHeaderSticky: D,
|
|
185
|
+
fontFamily: h,
|
|
186
|
+
setFontFamily: Q,
|
|
187
|
+
language: y,
|
|
188
|
+
setLanguage: N,
|
|
189
|
+
languages: L,
|
|
190
|
+
t: O,
|
|
191
|
+
appT: g
|
|
192
|
+
}),
|
|
193
|
+
[
|
|
194
|
+
a,
|
|
195
|
+
S,
|
|
196
|
+
R,
|
|
197
|
+
n,
|
|
198
|
+
K,
|
|
199
|
+
U,
|
|
200
|
+
P,
|
|
201
|
+
Y,
|
|
202
|
+
M,
|
|
203
|
+
z,
|
|
204
|
+
B,
|
|
205
|
+
v,
|
|
206
|
+
w,
|
|
207
|
+
k,
|
|
208
|
+
D,
|
|
209
|
+
h,
|
|
210
|
+
Q,
|
|
211
|
+
y,
|
|
212
|
+
N,
|
|
213
|
+
L,
|
|
214
|
+
O,
|
|
215
|
+
g
|
|
216
|
+
]
|
|
217
|
+
);
|
|
218
|
+
return /* @__PURE__ */ he(r.Provider, { value: Te, children: s });
|
|
219
|
+
}
|
|
220
|
+
function ve() {
|
|
221
|
+
const e = o(r);
|
|
222
|
+
if (!e)
|
|
223
|
+
throw new Error("useTheme must be used within a <ConfigProvider>");
|
|
224
|
+
return e;
|
|
225
|
+
}
|
|
226
|
+
function we() {
|
|
227
|
+
var e;
|
|
228
|
+
return ((e = o(r)) == null ? void 0 : e.locales) ?? me;
|
|
229
|
+
}
|
|
230
|
+
const Oe = ee("en"), ge = te("en");
|
|
231
|
+
function $e() {
|
|
232
|
+
var e;
|
|
233
|
+
return ((e = o(r)) == null ? void 0 : e.t) ?? Oe;
|
|
234
|
+
}
|
|
235
|
+
function He() {
|
|
236
|
+
var e;
|
|
237
|
+
return ((e = o(r)) == null ? void 0 : e.appT) ?? ge;
|
|
238
|
+
}
|
|
239
|
+
function Ge() {
|
|
240
|
+
const e = o(r);
|
|
241
|
+
return {
|
|
242
|
+
language: (e == null ? void 0 : e.language) ?? "en-US",
|
|
243
|
+
setLanguage: (e == null ? void 0 : e.setLanguage) ?? (() => {
|
|
244
|
+
}),
|
|
245
|
+
languages: (e == null ? void 0 : e.languages) ?? oe
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
function je() {
|
|
249
|
+
var e;
|
|
250
|
+
return ((e = o(r)) == null ? void 0 : e.translationsNamespace) ?? x;
|
|
251
|
+
}
|
|
252
|
+
function qe() {
|
|
253
|
+
var e;
|
|
254
|
+
return ((e = o(r)) == null ? void 0 : e.tabQueryKey) ?? le;
|
|
255
|
+
}
|
|
256
|
+
function Ve() {
|
|
257
|
+
var e;
|
|
258
|
+
return ((e = o(r)) == null ? void 0 : e.nestedTabQueryKey) ?? ue;
|
|
259
|
+
}
|
|
260
|
+
function We() {
|
|
261
|
+
var e;
|
|
262
|
+
return ((e = o(r)) == null ? void 0 : e.stepQueryKey) ?? ce;
|
|
263
|
+
}
|
|
264
|
+
function Je() {
|
|
265
|
+
var e;
|
|
266
|
+
return ((e = o(r)) == null ? void 0 : e.tableQuery) ?? de;
|
|
267
|
+
}
|
|
268
|
+
function Xe() {
|
|
269
|
+
var e;
|
|
270
|
+
return ((e = o(r)) == null ? void 0 : e.header) ?? ye;
|
|
271
|
+
}
|
|
272
|
+
export {
|
|
273
|
+
Be as C,
|
|
274
|
+
I as D,
|
|
275
|
+
$e as a,
|
|
276
|
+
He as b,
|
|
277
|
+
ue as c,
|
|
278
|
+
ce as d,
|
|
279
|
+
le as e,
|
|
280
|
+
_e as f,
|
|
281
|
+
Xe as g,
|
|
282
|
+
we as h,
|
|
283
|
+
Ve as i,
|
|
284
|
+
We as j,
|
|
285
|
+
Je as k,
|
|
286
|
+
qe as l,
|
|
287
|
+
ve as m,
|
|
288
|
+
je as n,
|
|
289
|
+
Ge as u
|
|
290
|
+
};
|
|
291
|
+
//# sourceMappingURL=ConfigProvider-2c94kUOk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigProvider-2c94kUOk.js","sources":["../src/theme/applyTheme.ts","../src/theme/ConfigProvider.tsx"],"sourcesContent":["export interface ThemePalette {\n primary: string\n /**\n * A free theme color (near-white by default) selectable via the `color` prop — it is **no longer**\n * the component surface (elevated panels use `--tz-color-surface`).\n */\n secondary: string\n /**\n * The rear-most page background — the `<body>` fill + the shell canvas that the floating panels sit\n * on; nothing else uses it. Built-in defaults: a soft off-white in light mode, a near-black in dark mode.\n */\n background: string\n /**\n * The elevated **panel surface** — cards, sidebar, inputs/forms, dropdowns, modals (the panels that\n * float over `--tz-color-background`). Built-in defaults: white in light mode, a touch lighter than\n * the canvas in dark mode. Configurable per mode like any theme color.\n */\n surface: string\n /** The single accent color — the default tint for controls (`Button`, `IconButton`, …). */\n accent: string\n success: string\n error: string\n info: string\n warning: string\n}\n\n/** Names of the theme palette tokens (maps to `--tz-color-<name>`). */\nexport type ThemeColor = keyof ThemePalette\n\nfunction hexToRgbTriplet(hex: string): string {\n let h = hex.trim().replace(/^#/, '')\n if (h.length === 3) {\n h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2]\n }\n const int = parseInt(h, 16)\n return `${(int >> 16) & 255}, ${(int >> 8) & 255}, ${int & 255}`\n}\n\n/**\n * Picks a readable text color (near-black or white) to sit on top of a solid\n * fill — used by `contained` controls so the label stays legible on light\n * colors (e.g. a light `primary` in dark mode).\n */\nfunction contrastColor(rgbTriplet: string): string {\n const [r, g, b] = rgbTriplet.split(',').map((n) => Number(n.trim()))\n const yiq = (r * 299 + g * 587 + b * 114) / 1000\n return yiq >= 150 ? '#04202b' : '#ffffff'\n}\n\n/**\n * Per-color overrides for the `contained` label color, where the automatic\n * luminance pick isn't the desired look:\n * - `secondary`: near-white fill that blends with the page, so the label uses\n * the primary color (flips with the mode) to stay readable without a border.\n * - `warning`: keep the plain white label by design.\n */\nconst CONTRAST_OVERRIDE: Readonly<Record<string, string>> = {\n secondary: 'rgb(var(--tz-color-primary-rgb))',\n warning: '#ffffff',\n}\n\nexport function applyTheme(\n theme: Partial<ThemePalette>,\n target: HTMLElement = document.documentElement,\n): void {\n for (const [name, value] of Object.entries(theme)) {\n if (!value) continue\n const triplet = hexToRgbTriplet(value)\n target.style.setProperty(`--tz-color-${name}-rgb`, triplet)\n target.style.setProperty(\n `--tz-color-${name}-contrast`,\n CONTRAST_OVERRIDE[name] ?? contrastColor(triplet),\n )\n }\n}\n","import {\n createContext,\n useCallback,\n useContext,\n useLayoutEffect,\n useMemo,\n useState,\n type ReactNode,\n} from 'react'\nimport { applyTheme, type ThemePalette } from './applyTheme'\nimport { DEFAULT_TRANSLATIONS_NAMESPACE } from '../helpers/translations'\nimport {\n createAppTranslator,\n createTranslator,\n type AppMessages,\n type AppTranslator,\n type MessageOverrides,\n type Translator,\n} from '../i18n/messages'\n\nexport type ThemeMode = 'light' | 'dark'\n\nexport interface ThemeColors {\n /** Light-mode palette. Override any subset of the theme colors — the rest use the library defaults. */\n light?: Partial<ThemePalette>\n /** Dark-mode overrides, layered on the (merged) light palette + the library's dark defaults. */\n dark?: Partial<ThemePalette>\n}\n\n/** A content locale the app supports — a tab in `<TranslatedFields>`. */\nexport interface LocaleConfig {\n /** BCP-47 locale code, e.g. `'en-US'`. Namespaces the form field names and is the tab's fallback label. */\n code: string\n /** Human-readable tab label. Falls back to `code`. */\n label?: string\n}\n\n/** Theme settings — color overrides + initial mode. Lives under `Config.theme`. */\nexport interface ThemeConfig {\n /** Theme color overrides. Omit entirely to use the library's built-in theme. */\n colors?: ThemeColors\n /** Initial color mode. */\n mode?: ThemeMode\n /**\n * Default font family — the app-wide default the user's Settings choice overrides (persisted). One of\n * the pre-imported presets (`Inter` / `Roboto` / `Lato`) or any Google Font family name. Defaults to\n * `Inter`. A non-preset family is loaded on demand at runtime.\n */\n fontFamily?: string\n}\n\n/**\n * The configurable key / param **names** the library's components read — grouped under `Config.keys`\n * so they live in one place. Each is overridable; omit one to use its built-in default. Grows over\n * time (e.g. `page` / `size` for paginated tables ⇒ `?page=1&size=10`).\n */\nexport interface KeysConfig {\n /**\n * URL query param name a **top-level** `<Tabs>` syncs its active tab to (e.g. `'view'` ⇒ `?view=…`),\n * unless that strip sets its own `queryKey` (or `queryKey={null}` to opt out). Defaults to `'tab'`.\n */\n tabQueryKey?: string\n /**\n * URL query param name a **nested** `<Tabs>` (one rendered inside another tab's panel) syncs to, so it\n * doesn't collide with the outer strip's `tabQueryKey` (e.g. `?tab=…&nestedTab=…`). Auto-applied by\n * nesting depth; overridable per strip via `queryKey`. Defaults to `'nestedTab'`.\n */\n nestedTabQueryKey?: string\n /**\n * URL query param name a `<Stepper queryKey>` (the bare/`true` form) syncs its active step to\n * (**1-based**, e.g. `?step=2`); a string `queryKey` overrides it per stepper. Defaults to `'step'`.\n * (The sync itself is **opt-in** — a stepper with no `queryKey` never touches the URL.)\n */\n stepQueryKey?: string\n /**\n * Top-level namespace word for `<TranslatedFields>`' form names + the nested object — e.g.\n * `'languages'` ⇒ `languages[en-US].title`. Defaults to `'translations'`.\n */\n translationsNamespace?: string\n}\n\n/**\n * How a `<Table>` builds its **server-request** params — the query it hands the consumer (as `params` /\n * `query`) in `onChange`, so a server-mode fetch doesn't hand-map page/size/search/sort every time. This is\n * the **backend transport** layer, distinct from `keys.*QueryKey` (the browser-URL sync, always page-based\n * for shareable links). Set once in `config.table.query`, override per table via the `queryMapping` prop.\n * Every field is optional; the defaults reproduce the browser-URL shape (`?page=1&size=10&search=…&sort=-key`).\n */\nexport interface TableQueryConfig {\n /** Request param name for the page / offset. Defaults to `'page'` (e.g. `'skip'` for an offset API). */\n pageParam?: string\n /** Request param name for the page size. Defaults to `'size'` (e.g. `'limit'`). */\n sizeParam?: string\n /** Request param name for the search query (omitted when the search is empty). Defaults to `'search'` (e.g. `'q'`). */\n searchParam?: string\n /**\n * Request param name holding the sort **key**. Defaults to `'sort'` (e.g. `'sortBy'`). With\n * `sortFormat: 'field'` this single param also carries the direction (`-key` = desc); with `'separate'`\n * the direction goes to `sortOrderParam`.\n */\n sortParam?: string\n /**\n * Pagination style. `'page'` (default) emits the **1-based page number** as-is (`page=2`); `'offset'`\n * emits a **zero-based offset** `(page - 1) * size` instead (`skip=10`), for skip/offset APIs.\n */\n pagination?: 'page' | 'offset'\n /**\n * Sort encoding. `'field'` (default) is a single param with a `-` prefix for descending (`sort=-price`);\n * `'separate'` splits into two params — the key in `sortParam` + the direction in `sortOrderParam`\n * (`sortBy=price&order=desc`); `'suffix'` appends the direction value to the key in a single param\n * (`sort=priceAsc` / `sort=priceDesc` with `ascValue: 'Asc'` / `descValue: 'Desc'`).\n */\n sortFormat?: 'field' | 'separate' | 'suffix'\n /** Direction param name when `sortFormat: 'separate'`. Defaults to `'order'`. */\n sortOrderParam?: string\n /**\n * Value emitted for an ascending sort — the `sortOrderParam` value when `sortFormat: 'separate'`, or the\n * suffix appended to the key when `sortFormat: 'suffix'`. Defaults to `'asc'`.\n */\n ascValue?: string\n /**\n * Value emitted for a descending sort — the `sortOrderParam` value when `sortFormat: 'separate'`, or the\n * suffix appended to the key when `sortFormat: 'suffix'`. Defaults to `'desc'`.\n */\n descValue?: string\n /**\n * What to emit for the size param when the **\"All\"** rows-per-page choice is active. A `string`/`number`\n * sets `size=<allValue>` (e.g. `0` for APIs where `limit=0` means \"all\"); omit it (default) to drop the\n * size param entirely (many APIs treat a missing limit as unbounded).\n */\n allValue?: string | number\n /**\n * How a **`multiSelect`** filter serializes into the request query: `'repeat'` (default — `cat=a&cat=b`),\n * `'csv'` (`cat=a,b`), or `'indexed'` (`cat[0]=a&cat[1]=b`).\n */\n multiSelectFormat?: 'repeat' | 'csv' | 'indexed'\n /**\n * Suffix appended to a **range** filter's param for its lower / upper bound — e.g. `Min`/`Max` (default)\n * → `priceMin`/`priceMax`; set `'_gte'`/`'_lte'`, `'[gte]'`/`'[lte]'`, `'From'`/`'To'`, … to match your API.\n */\n rangeMinSuffix?: string\n rangeMaxSuffix?: string\n}\n\n/** `<Table>`-specific configuration. Grows over time; today just the server-request query mapping. */\nexport interface TableConfig {\n /** How `<Table>` builds its server-request params (emitted as `params` / `query` in `onChange`). */\n query?: TableQueryConfig\n}\n\n/** Signed-in user shown in the shell header avatar + its account menu (see `HeaderConfig`). */\nexport interface HeaderUser {\n /** Full name — shown as the menu's name line. */\n name?: string\n /** Email shown under the name in the account menu. */\n email?: string\n /** Avatar image URL (falls back to a user icon). */\n avatar?: string\n}\n\n/**\n * `RootLayout` header configuration — the shell's top-bar controls. Set it once app-wide in\n * `config.header`, or per shell via the `RootLayout` `header` prop (the prop wins, merged over config).\n */\nexport interface HeaderConfig {\n /** Show the built-in light/dark theme toggle. Defaults to `true`. */\n theme?: boolean\n /**\n * Make the shell header **stick to the top on scroll** (fixed) instead of scrolling away (static).\n * This is the app-wide default; the user can flip it in the **Settings** drawer and their choice is\n * persisted (`localStorage['tz-header-sticky']`), overriding this. Defaults to `false` (static).\n */\n sticky?: boolean\n /** Show the browser-fullscreen toggle (auto-hides where the Fullscreen API is unavailable). Defaults to `false`. */\n fullscreen?: boolean\n /** Show the **Settings** button (opens the right-side drawer to pick the per-mode `accent`). Defaults to `true`. */\n settings?: boolean\n /** Show the nav search over the sidebar's pages (with suggestions). Defaults to `true`. */\n search?: boolean\n /**\n * Show the header **language switcher** (the `Global`-icon dropdown of `config.i18n.languages`).\n * Defaults to `true`, but it only renders when more than one UI language is configured — so pass\n * `false` to hide it even with several languages (the panel stays on its current/default language).\n */\n languages?: boolean\n /** Show the breadcrumb trail at the top of the content. Defaults to **`true`**. */\n breadcrumbs?: boolean\n /** Render the automatic page-title `h2` (the active route's `staticData.name`). Defaults to `true`. */\n pageTitle?: boolean\n /** When provided, an account `Avatar` appears; its menu has a **Sign out** item that calls this. */\n onLogout?: () => void\n /** Signed-in user — shown in the header avatar and as a header block atop the account menu. */\n user?: HeaderUser\n}\n\n/**\n * UI-language config for the admin panel's **own** static strings (labels, placeholders, aria-labels).\n * Distinct from `locales` (which is content-translation locales for `<TranslatedFields>`). The library\n * ships built-in translations (English + Georgian), so listing `languages` here is enough to get a\n * localized panel — no per-app setup. Any language the library doesn't ship is supplied via `messages`.\n */\nexport interface I18nConfig {\n /**\n * Active UI language on first load (a locale code, e.g. `'ka-GE'`). Defaults to English if listed in\n * `languages`, else the first `languages` entry, else `'en-US'`. The user's switcher choice (persisted)\n * overrides it.\n */\n language?: string\n /**\n * The UI languages the panel offers — drives the Settings language switcher. One entry = a fixed\n * language (no switcher). Defaults to English only. (Reuses the `{ code, label }` shape.)\n */\n languages?: LocaleConfig[]\n /**\n * Extra / override message catalogs for the **library's own** strings, merged **over** the built-ins\n * and keyed by language code or base language (`'ka-GE'` or `'ka'`). Use this to localize into a\n * language the library doesn't ship, or to tweak a built-in string. Unset keys fall back to English.\n */\n messages?: MessageOverrides\n /**\n * Catalogs for the **consuming app's own** UI strings — its section titles, labels, business copy —\n * keyed by language code/base then by any string key the app picks. Read via **`useTranslations()`**,\n * which binds to the active UI language, so the app's text switches together with the panel. Resolution\n * per key: exact code → base language → English (`'en'`) → the key itself. This is the app's own copy;\n * `messages` above is only for the library's built-in strings.\n */\n appMessages?: AppMessages\n}\n\n/**\n * App-level configuration passed to `<ConfigProvider config={…}>`. Groups theming under `theme`,\n * the configurable key/param names under `keys`, and keeps the rest (`locales`, …) at the top — a\n * single place to grow.\n */\nexport interface Config {\n /** Theme settings (color overrides + initial mode). Omit entirely to use the built-in theme. */\n theme?: ThemeConfig\n /** Content locales the app supports — drive `<TranslatedFields>`' tabs (one per locale). */\n locales?: LocaleConfig[]\n /** UI-language config for the panel's own strings (the library ships the translations). See `I18nConfig`. */\n i18n?: I18nConfig\n /**\n * Configurable key / query-param names the components read — e.g. the `<Tabs>` query keys\n * (`tabQueryKey` / `nestedTabQueryKey`) and the `<TranslatedFields>` namespace\n * (`translationsNamespace`). Grows over time (`page`, `size`, …).\n */\n keys?: KeysConfig\n /** `<Table>` config — today the server-request query mapping (`table.query`) shared by every table. */\n table?: TableConfig\n /**\n * `RootLayout` header config, app-wide — the shell top-bar toggles (`theme` / `fullscreen` /\n * `search` / `breadcrumbs` / `pageTitle`) + the account (`onLogout` / `user`). A `RootLayout`\n * `header` prop is merged over this (the prop wins), so a specific shell can override.\n */\n header?: HeaderConfig\n}\n\ninterface ThemeContextValue {\n mode: ThemeMode\n setMode: (mode: ThemeMode) => void\n toggleMode: () => void\n /** The persisted accent-color overrides **per mode** (a hex, or `null` when using that mode's default). */\n accentColors: Record<ThemeMode, string | null>\n /** The configured/default `accent` **per mode** (before any override) — the \"no override\" values. */\n defaultAccentColors: Record<ThemeMode, string>\n /** Set (or clear with `null`) the accent override for `mode` (defaults to the current) — persists + re-applies. */\n setAccentColor: (color: string | null, mode?: ThemeMode) => void\n locales: LocaleConfig[]\n /** Resolved translations namespace (`config.keys.translationsNamespace` ?? the built-in default). */\n translationsNamespace: string\n /** Resolved top-level tabs query key (`config.keys.tabQueryKey` ?? the built-in default). */\n tabQueryKey: string\n /** Resolved nested tabs query key (`config.keys.nestedTabQueryKey` ?? the built-in default). */\n nestedTabQueryKey: string\n /** Resolved stepper query key (`config.keys.stepQueryKey` ?? the built-in default). */\n stepQueryKey: string\n /** The `<Table>` server-request query mapping (`config.table.query` ?? `{}`). Defaults applied by `buildTableQuery`. */\n tableQuery: TableQueryConfig\n /** App-wide `RootLayout` header config (`config.header` ?? `{}`); the `RootLayout` prop merges over it. */\n header: HeaderConfig\n /** Whether the shell header sticks to the top on scroll (fixed) vs scrolls away (static). Persisted. */\n headerSticky: boolean\n /** Set + persist the header sticky/static preference (overrides `config.header.sticky`). */\n setHeaderSticky: (sticky: boolean) => void\n /** The active font family (drives `--tz-font-family`). Persisted; seeded from `config.theme.fontFamily`. */\n fontFamily: string\n /** Set + persist the font family (a preset or any Google Font name; loaded on demand). */\n setFontFamily: (family: string) => void\n /** Active UI language code (drives `t`). Persisted; seeded from `config.i18n.language` (default English). */\n language: string\n /** Set + persist the active UI language (must be one of `languages`). */\n setLanguage: (code: string) => void\n /** The UI languages the panel offers (from `config.i18n.languages`, default English only). */\n languages: LocaleConfig[]\n /** Translator for the library's built-in strings, bound to the active `language`. */\n t: Translator\n /** Translator for the **app's own** strings (`config.i18n.appMessages`), bound to the active `language`. */\n appT: AppTranslator\n}\n\nconst ThemeContext = createContext<ThemeContextValue | null>(null)\nconst STORAGE_KEY = 'tz-theme-mode'\n/** Where the user's picked accent-color override is persisted, **per mode** (survives reloads). */\nconst accentStorageKey = (mode: ThemeMode) => `tz-accent-color-${mode}`\n/** Where the user's header sticky/static choice is persisted (survives reloads). */\nconst HEADER_STICKY_KEY = 'tz-header-sticky'\n/** Where the user's chosen font family is persisted (survives reloads). */\nconst FONT_STORAGE_KEY = 'tz-font-family'\n/** Where the user's chosen UI language is persisted (survives reloads). */\nconst LOCALE_KEY = 'tz-locale'\n/** Default UI languages when `config.i18n.languages` is unset — English only. */\nconst DEFAULT_LANGUAGES: LocaleConfig[] = [{ code: 'en-US', label: 'English' }]\n/** The default font family (matches the `--tz-font-family` token's primary family). */\nexport const DEFAULT_FONT_FAMILY = 'Inter'\n/** Families already in the shipped CSS (only the default) — these skip the runtime `<link>` load. */\nconst BUNDLED_FONTS: readonly string[] = [DEFAULT_FONT_FAMILY]\n/** The full fallback stack applied to `--tz-font-family` for a chosen family (mirrors theme.css). */\nconst fontStack = (family: string) =>\n `'${family}', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif`\n\n/** Add the Google Fonts preconnect hints once, so the on-demand font fetch isn't delayed by DNS/TLS. */\nfunction ensureFontPreconnect() {\n if (typeof document === 'undefined' || document.getElementById('tz-font-preconnect')) return\n const api = document.createElement('link')\n api.id = 'tz-font-preconnect'\n api.rel = 'preconnect'\n api.href = 'https://fonts.googleapis.com'\n document.head.appendChild(api)\n const gstatic = document.createElement('link')\n gstatic.rel = 'preconnect'\n gstatic.href = 'https://fonts.gstatic.com'\n gstatic.crossOrigin = 'anonymous'\n document.head.appendChild(gstatic)\n}\n\n/**\n * Ensure a Google Fonts stylesheet `<link>` exists for `family` (deduped by id). Only the default\n * (`Inter`) ships pre-imported, so every other family — the Roboto/Lato presets and any custom pick —\n * is loaded here on first use. Bare family request (no weight axes) so it works for any font — Google\n * serves the available weights.\n */\nfunction ensureFontLoaded(family: string) {\n if (typeof document === 'undefined' || BUNDLED_FONTS.includes(family)) return\n const id = `tz-font-${family.trim().replace(/\\s+/g, '-').toLowerCase()}`\n if (document.getElementById(id)) return\n ensureFontPreconnect()\n const link = document.createElement('link')\n link.id = id\n link.rel = 'stylesheet'\n link.href = `https://fonts.googleapis.com/css2?family=${encodeURIComponent(family.trim()).replace(/%20/g, '+')}&display=swap`\n document.head.appendChild(link)\n}\n/** The built-in default URL query param name a **top-level** `<Tabs>` syncs to (no `queryKey`/config). */\nexport const DEFAULT_TABS_QUERY_KEY = 'tab'\n/** The built-in default URL query param name a **nested** `<Tabs>` syncs to (no `queryKey`/config). */\nexport const DEFAULT_NESTED_TAB_QUERY_KEY = 'nestedTab'\n/** The built-in default URL query param name a `<Stepper>` syncs to (no `queryKey`/config). */\nexport const DEFAULT_STEP_QUERY_KEY = 'step'\n/** Stable empty-locales fallback so the context value memo doesn't churn when no locales are configured. */\nconst EMPTY_LOCALES: LocaleConfig[] = []\n/** Stable empty table-query fallback so the context memo doesn't churn when no `table.query` is configured. */\nconst EMPTY_TABLE_QUERY: TableQueryConfig = {}\n/** Stable empty header fallback so the context memo doesn't churn when no `header` is configured. */\nconst EMPTY_HEADER: HeaderConfig = {}\n\n/**\n * The library's built-in light palette — the single source of truth for every theme color's default\n * value. Apps override any subset via `config.colors.light`; the rest fall back to these. (theme.css\n * holds only the structure that references these values, not the values themselves.)\n */\nconst DEFAULT_LIGHT_COLORS: ThemePalette = {\n primary: '#13404e',\n secondary: '#ffffff',\n background: '#f9f9f9', // the rear + shell canvas — a soft off-white behind the white panels\n surface: '#ffffff', // the elevated panels (cards, sidebar, inputs, dropdowns, modals)\n accent: '#056472',\n success: '#00a854',\n error: '#f04134',\n info: '#039aa1',\n warning: '#ffbf00',\n}\n\n/**\n * Built-in dark-mode overrides — only the colors that differ from light; everything else inherits the\n * (merged) light palette. Apps override any of these via `config.colors.dark`.\n */\nconst DEFAULT_DARK_COLORS: Partial<ThemePalette> = {\n primary: '#e6e8eb',\n secondary: '#191919',\n background: '#0f0f0f', // the near-black rear + canvas\n surface: '#191919', // a touch lighter than the canvas, for the elevated panels\n accent: '#16a6b4', // a brighter teal — the light-mode accent is too dark on the dark canvas\n success: '#00a854',\n error: '#f04134',\n info: '#039aa1',\n warning: '#ffbf00',\n}\n\nfunction getInitialMode(fallback: ThemeMode): ThemeMode {\n const stored = localStorage.getItem(STORAGE_KEY)\n return stored === 'light' || stored === 'dark' ? stored : fallback\n}\n\n/** The persisted per-mode accent-color overrides (a hex string per mode, or `null` when none picked). */\nfunction getInitialAccentByMode(): Record<ThemeMode, string | null> {\n return {\n light: localStorage.getItem(accentStorageKey('light')) || null,\n dark: localStorage.getItem(accentStorageKey('dark')) || null,\n }\n}\n\n/** The persisted header sticky choice (`fallback` = the app's `config.header.sticky` when unset). */\nfunction getInitialHeaderSticky(fallback: boolean): boolean {\n const stored = localStorage.getItem(HEADER_STICKY_KEY)\n return stored === '1' ? true : stored === '0' ? false : fallback\n}\n\n/** The persisted font family (`fallback` = `config.theme.fontFamily` ?? the default when unset). */\nfunction getInitialFont(fallback: string): string {\n return localStorage.getItem(FONT_STORAGE_KEY) || fallback\n}\n\n/**\n * The initial UI language: the persisted choice (if still offered), else `config.i18n.language`, else\n * English if it's among the offered languages, else the first offered, else `'en-US'`. Always clamped\n * to a code that's actually in `languages`.\n */\nfunction getInitialLanguage(languages: LocaleConfig[], configLanguage?: string): string {\n const codes = languages.map((l) => l.code)\n const stored = localStorage.getItem(LOCALE_KEY)\n if (stored && codes.includes(stored)) return stored\n if (configLanguage && codes.includes(configLanguage)) return configLanguage\n return codes.find((c) => c.toLowerCase().startsWith('en')) ?? codes[0] ?? 'en-US'\n}\n\nexport interface ConfigProviderProps {\n /** App config — theme overrides, initial mode, locales. Omit for the built-in defaults (light mode). */\n config?: Config\n children: ReactNode\n}\n\nexport function ConfigProvider({ config, children }: ConfigProviderProps) {\n const [mode, setModeState] = useState<ThemeMode>(() =>\n getInitialMode(config?.theme?.mode ?? 'light'),\n )\n // user-picked accents that override the configured/default `accent` — kept PER MODE; persisted\n const [accentByMode, setAccentByMode] =\n useState<Record<ThemeMode, string | null>>(getInitialAccentByMode)\n // user's header sticky/static choice — persisted; seeded from config.header.sticky (default static)\n const [headerSticky, setHeaderStickyState] = useState<boolean>(() =>\n getInitialHeaderSticky(config?.header?.sticky ?? false),\n )\n // user's chosen font family — persisted; seeded from config.theme.fontFamily (default Inter)\n const [fontFamily, setFontFamilyState] = useState<string>(() =>\n getInitialFont(config?.theme?.fontFamily ?? DEFAULT_FONT_FAMILY),\n )\n // UI languages offered + the active one (persisted; seeded from config.i18n, default English)\n const languages = config?.i18n?.languages ?? DEFAULT_LANGUAGES\n const i18nMessages = config?.i18n?.messages\n const appMessages = config?.i18n?.appMessages\n const [language, setLanguageState] = useState<string>(() =>\n getInitialLanguage(languages, config?.i18n?.language),\n )\n const colors = config?.theme?.colors\n\n // the configured/default palette for BOTH modes, before any accent override:\n // light = library defaults then the app's light overrides; dark = that, then the library dark deltas,\n // then the app's dark overrides. (Both computed so the Settings drawer can offer a picker per mode.)\n const basePalettes = useMemo(() => {\n const light = { ...DEFAULT_LIGHT_COLORS, ...colors?.light }\n const dark = { ...light, ...DEFAULT_DARK_COLORS, ...colors?.dark }\n return { light, dark }\n }, [colors])\n // the accent per mode when there's NO override — exposed so UI needn't hardcode it\n const defaultAccentColors = useMemo(\n () => ({ light: basePalettes.light.accent, dark: basePalettes.dark.accent }),\n [basePalettes],\n )\n\n // Commit a mode's resolved theme straight to `<html>` (CSS vars + attrs + persisted mode). Called\n // **eagerly** on change (so the DOM updates the instant you toggle, NOT after React re-renders the\n // whole subtree — which is what made the switch feel ~1s late) and from the effect below (initial\n // mount / accent change / external `setMode`). Idempotent, so applying twice is harmless.\n const applyMode = useCallback(\n (nextMode: ThemeMode, accent: string | null = accentByMode[nextMode]) => {\n const base = basePalettes[nextMode]\n applyTheme(accent ? { ...base, accent } : base)\n const root = document.documentElement\n root.setAttribute('data-tz-theme', nextMode)\n root.style.setProperty('color-scheme', nextMode)\n localStorage.setItem(STORAGE_KEY, nextMode)\n },\n [basePalettes, accentByMode],\n )\n\n useLayoutEffect(() => {\n applyMode(mode)\n }, [applyMode, mode])\n\n const setMode = useCallback(\n (next: ThemeMode) => {\n applyMode(next) // eager DOM update — don't wait for the re-render/commit\n setModeState(next)\n },\n [applyMode],\n )\n\n const toggleMode = useCallback(\n () => setMode(mode === 'light' ? 'dark' : 'light'),\n [mode, setMode],\n )\n\n // set (or clear with `null`) the accent override for `target` (defaults to the current mode); persists\n const setAccentColor = useCallback(\n (color: string | null, target?: ThemeMode) => {\n const m = target ?? mode\n setAccentByMode((prev) => ({ ...prev, [m]: color }))\n if (color) localStorage.setItem(accentStorageKey(m), color)\n else localStorage.removeItem(accentStorageKey(m))\n if (m === mode) applyMode(mode, color) // eager for the active mode\n },\n [mode, applyMode],\n )\n\n // set + persist the header sticky preference (overrides config.header.sticky)\n const setHeaderSticky = useCallback((sticky: boolean) => {\n setHeaderStickyState(sticky)\n localStorage.setItem(HEADER_STICKY_KEY, sticky ? '1' : '0')\n }, [])\n\n // apply the font: load it (if not preloaded) + write the stack to --tz-font-family on <html>.\n // Eager on change + in a layout effect (mount / external change), like the mode/accent commit.\n const applyFont = useCallback((family: string) => {\n ensureFontLoaded(family)\n document.documentElement.style.setProperty('--tz-font-family', fontStack(family))\n }, [])\n useLayoutEffect(() => {\n applyFont(fontFamily)\n }, [applyFont, fontFamily])\n // set + persist the chosen font family (overrides config.theme.fontFamily)\n const setFontFamily = useCallback(\n (family: string) => {\n const next = family.trim() || DEFAULT_FONT_FAMILY\n applyFont(next) // eager — don't wait for the re-render\n setFontFamilyState(next)\n localStorage.setItem(FONT_STORAGE_KEY, next)\n },\n [applyFont],\n )\n\n // set + persist the active UI language\n const setLanguage = useCallback((code: string) => {\n setLanguageState(code)\n localStorage.setItem(LOCALE_KEY, code)\n }, [])\n // the translator bound to the active language (rebuilt only when the language or overrides change)\n const t = useMemo<Translator>(\n () => createTranslator(language, i18nMessages),\n [language, i18nMessages],\n )\n // the app's-own-strings translator, bound to the same active language (rebuilt on language/catalog change)\n const appT = useMemo<AppTranslator>(\n () => createAppTranslator(language, appMessages),\n [language, appMessages],\n )\n\n const locales = config?.locales ?? EMPTY_LOCALES\n const translationsNamespace =\n config?.keys?.translationsNamespace ?? DEFAULT_TRANSLATIONS_NAMESPACE\n const tabQueryKey = config?.keys?.tabQueryKey ?? DEFAULT_TABS_QUERY_KEY\n const nestedTabQueryKey = config?.keys?.nestedTabQueryKey ?? DEFAULT_NESTED_TAB_QUERY_KEY\n const stepQueryKey = config?.keys?.stepQueryKey ?? DEFAULT_STEP_QUERY_KEY\n const tableQuery = config?.table?.query ?? EMPTY_TABLE_QUERY\n const headerConfig = config?.header ?? EMPTY_HEADER\n\n const value = useMemo<ThemeContextValue>(\n () => ({\n mode,\n setMode,\n toggleMode,\n accentColors: accentByMode,\n defaultAccentColors,\n setAccentColor,\n locales,\n translationsNamespace,\n tabQueryKey,\n nestedTabQueryKey,\n stepQueryKey,\n tableQuery,\n header: headerConfig,\n headerSticky,\n setHeaderSticky,\n fontFamily,\n setFontFamily,\n language,\n setLanguage,\n languages,\n t,\n appT,\n }),\n [\n mode,\n setMode,\n toggleMode,\n accentByMode,\n defaultAccentColors,\n setAccentColor,\n locales,\n translationsNamespace,\n tabQueryKey,\n nestedTabQueryKey,\n stepQueryKey,\n tableQuery,\n headerConfig,\n headerSticky,\n setHeaderSticky,\n fontFamily,\n setFontFamily,\n language,\n setLanguage,\n languages,\n t,\n appT,\n ],\n )\n\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>\n}\n\nexport function useTheme(): ThemeContextValue {\n const value = useContext(ThemeContext)\n if (!value) {\n throw new Error('useTheme must be used within a <ConfigProvider>')\n }\n return value\n}\n\n/**\n * The content locales configured on `<ConfigProvider config={{ locales }}>`. Lenient — returns `[]`\n * outside a provider (locales are optional), so `<TranslatedFields>` can also take a `locales` prop.\n */\nexport function useLocales(): LocaleConfig[] {\n return useContext(ThemeContext)?.locales ?? EMPTY_LOCALES\n}\n\n/** Fallback English translator so a component used **without** a `<ConfigProvider>` still shows text. */\nconst DEFAULT_TRANSLATOR: Translator = createTranslator('en')\n/** Fallback app translator (no catalogs) — returns the key itself, so `useTranslations()` is safe anywhere. */\nconst DEFAULT_APP_TRANSLATOR: AppTranslator = createAppTranslator('en')\n\n/**\n * The translator for the library's built-in UI strings, bound to the active `config.i18n` language.\n * **Lenient** — outside a provider it returns an English translator, so components render standalone\n * (and in tests) with their default English labels. Use it for any built-in string:\n * `t('select.noOptions')`.\n */\nexport function useT(): Translator {\n return useContext(ThemeContext)?.t ?? DEFAULT_TRANSLATOR\n}\n\n/**\n * Translator for the **consuming app's own** strings — the catalogs passed to\n * `<ConfigProvider config={{ i18n: { appMessages } }}>` — bound to the active UI language, so the app's\n * copy switches together with the panel. Free-form string keys; per key it resolves exact code → base\n * language → English (`'en'`) → the key itself, with `{name}` interpolation:\n *\n * ```tsx\n * const t = useTranslations()\n * <PageLayout title={t('customer-transactions.title')} />\n * <p>{t('customer-transactions.count', { count: 128 })}</p>\n * ```\n *\n * **Lenient** — outside a provider (or with no `appMessages`) it echoes the key back, so it's safe\n * anywhere. Use `useT()` for the library's built-in strings; use this for your own.\n */\nexport function useTranslations(): AppTranslator {\n return useContext(ThemeContext)?.appT ?? DEFAULT_APP_TRANSLATOR\n}\n\n/**\n * The active UI language + switcher data: `{ language, setLanguage, languages }`. Lenient outside a\n * provider (English, single language, no-op setter) so it's safe to call anywhere.\n */\nexport function useLanguage(): {\n language: string\n setLanguage: (code: string) => void\n languages: LocaleConfig[]\n} {\n const ctx = useContext(ThemeContext)\n return {\n language: ctx?.language ?? 'en-US',\n setLanguage: ctx?.setLanguage ?? (() => {}),\n languages: ctx?.languages ?? DEFAULT_LANGUAGES,\n }\n}\n\n/**\n * The translations namespace configured on `<ConfigProvider config={{ keys: { translationsNamespace } }}>`,\n * resolved against the built-in default (`'translations'`). Lenient outside a provider. Use it to pass\n * the same namespace to the helpers, e.g. `buildTranslations(codes, fields, useTranslationsNamespace())`.\n */\nexport function useTranslationsNamespace(): string {\n return useContext(ThemeContext)?.translationsNamespace ?? DEFAULT_TRANSLATIONS_NAMESPACE\n}\n\n/**\n * The default top-level tabs query key configured on `<ConfigProvider config={{ keys: { tabQueryKey } }}>`,\n * resolved against the built-in default (`'tab'`). Lenient outside a provider. A top-level `<Tabs>` reads\n * it as the fallback for an omitted `queryKey`, so every tab strip URL-syncs out of the box.\n */\nexport function useTabsQueryKey(): string {\n return useContext(ThemeContext)?.tabQueryKey ?? DEFAULT_TABS_QUERY_KEY\n}\n\n/**\n * The default nested tabs query key configured on\n * `<ConfigProvider config={{ keys: { nestedTabQueryKey } }}>`, resolved against the built-in default\n * (`'nestedTab'`). Lenient outside a provider. A `<Tabs>` nested inside another tab's panel uses this\n * (instead of `tabQueryKey`) so the two strips don't collide on the same URL param.\n */\nexport function useNestedTabQueryKey(): string {\n return useContext(ThemeContext)?.nestedTabQueryKey ?? DEFAULT_NESTED_TAB_QUERY_KEY\n}\n\n/**\n * The default stepper query key configured on `<ConfigProvider config={{ keys: { stepQueryKey } }}>`,\n * resolved against the built-in default (`'step'`). Lenient outside a provider. A `<Stepper queryKey>`\n * (the bare/`true` opt-in form) reads it as the param name; a string `queryKey` overrides it.\n */\nexport function useStepQueryKey(): string {\n return useContext(ThemeContext)?.stepQueryKey ?? DEFAULT_STEP_QUERY_KEY\n}\n\n/**\n * The `<Table>` server-request query mapping configured on `<ConfigProvider config={{ table: { query } }}>`\n * (`{}` when unset / outside a provider). `<Table>` merges its own `queryMapping` prop over this, then feeds\n * the result to `buildTableQuery`, which applies the field defaults — so an unconfigured table emits the\n * default page-based `?page=…&size=…&search=…&sort=…` shape.\n */\nexport function useTableQueryConfig(): TableQueryConfig {\n return useContext(ThemeContext)?.tableQuery ?? EMPTY_TABLE_QUERY\n}\n\n/**\n * The app-wide `RootLayout` header config set on `<ConfigProvider config={{ header }}>` (`{}` when\n * unset / outside a provider). `RootLayout` merges its own `header` prop over this (the prop wins), so\n * a specific shell can override the app-wide defaults.\n */\nexport function useHeaderConfig(): HeaderConfig {\n return useContext(ThemeContext)?.header ?? EMPTY_HEADER\n}\n"],"names":["hexToRgbTriplet","hex","h","int","contrastColor","rgbTriplet","r","g","b","n","CONTRAST_OVERRIDE","applyTheme","theme","target","name","value","triplet","ThemeContext","createContext","STORAGE_KEY","accentStorageKey","mode","HEADER_STICKY_KEY","FONT_STORAGE_KEY","LOCALE_KEY","DEFAULT_LANGUAGES","DEFAULT_FONT_FAMILY","BUNDLED_FONTS","fontStack","family","ensureFontPreconnect","api","gstatic","ensureFontLoaded","id","link","DEFAULT_TABS_QUERY_KEY","DEFAULT_NESTED_TAB_QUERY_KEY","DEFAULT_STEP_QUERY_KEY","EMPTY_LOCALES","EMPTY_TABLE_QUERY","EMPTY_HEADER","DEFAULT_LIGHT_COLORS","DEFAULT_DARK_COLORS","getInitialMode","fallback","stored","getInitialAccentByMode","getInitialHeaderSticky","getInitialFont","getInitialLanguage","languages","configLanguage","codes","l","c","ConfigProvider","config","children","setModeState","useState","_a","accentByMode","setAccentByMode","headerSticky","setHeaderStickyState","fontFamily","setFontFamilyState","i18nMessages","_b","appMessages","_c","language","setLanguageState","colors","_d","basePalettes","useMemo","light","dark","defaultAccentColors","applyMode","useCallback","nextMode","accent","base","root","useLayoutEffect","setMode","next","toggleMode","setAccentColor","color","m","prev","setHeaderSticky","sticky","applyFont","setFontFamily","setLanguage","code","t","createTranslator","appT","createAppTranslator","locales","translationsNamespace","_e","DEFAULT_TRANSLATIONS_NAMESPACE","tabQueryKey","_f","nestedTabQueryKey","_g","stepQueryKey","_h","tableQuery","_i","headerConfig","jsx","useTheme","useContext","useLocales","DEFAULT_TRANSLATOR","DEFAULT_APP_TRANSLATOR","useT","useTranslations","useLanguage","ctx","useTranslationsNamespace","use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A2D,EAAWvG,CAAY,MAAvB,gBAAA4C,EAA0B,MAAK6D;AACxC;AAiBO,SAASG,KAAiC;;AAC/C,WAAOhE,IAAA2D,EAAWvG,CAAY,MAAvB,gBAAA4C,EAA0B,SAAQ8D;AAC3C;AAMO,SAASG,KAId;AACA,QAAMC,IAAMP,EAAWvG,CAAY;AACnC,SAAO;AAAA,IACL,WAAU8G,KAAA,gBAAAA,EAAK,aAAY;AAAA,IAC3B,cAAaA,KAAA,gBAAAA,EAAK,iBAAgB,MAAM;AAAA,IAAC;AAAA,IACzC,YAAWA,KAAA,gBAAAA,EAAK,cAAatG;AAAA,EAAA;AAEjC;AAOO,SAASuG,KAAmC;;AACjD,WAAOnE,IAAA2D,EAAWvG,CAAY,MAAvB,gBAAA4C,EAA0B,0BAAyB+C;AAC5D;AAOO,SAASqB,KAA0B;;AACxC,WAAOpE,IAAA2D,EAAWvG,CAAY,MAAvB,gBAAA4C,EAA0B,gBAAezB;AAClD;AAQO,SAAS8F,KAA+B;;AAC7C,WAAOrE,IAAA2D,EAAWvG,CAAY,MAAvB,gBAAA4C,EAA0B,sBAAqBxB;AACxD;AAOO,SAAS8F,KAA0B;;AACxC,WAAOtE,IAAA2D,EAAWvG,CAAY,MAAvB,gBAAA4C,EAA0B,iBAAgBvB;AACnD;AAQO,SAAS8F,KAAwC;;AACtD,WAAOvE,IAAA2D,EAAWvG,CAAY,MAAvB,gBAAA4C,EAA0B,eAAcrB;AACjD;AAOO,SAAS6F,KAAgC;;AAC9C,WAAOxE,IAAA2D,EAAWvG,CAAY,MAAvB,gBAAA4C,EAA0B,WAAUpB;AAC7C;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const Te=require("react/jsx-runtime"),a=require("react"),Z=require("./translations-CXEeeUDL.cjs"),A=require("./messages-Cy-qK5xU.cjs");function ie(e){let s=e.trim().replace(/^#/,"");s.length===3&&(s=s[0]+s[0]+s[1]+s[1]+s[2]+s[2]);const n=parseInt(s,16);return`${n>>16&255}, ${n>>8&255}, ${n&255}`}function pe(e){const[s,n,u]=e.split(",").map(C=>Number(C.trim()));return(s*299+n*587+u*114)/1e3>=150?"#04202b":"#ffffff"}const Ee={secondary:"rgb(var(--tz-color-primary-rgb))",warning:"#ffffff"};function ee(e,s=document.documentElement){for(const[n,u]of Object.entries(e)){if(!u)continue;const r=ie(u);s.style.setProperty(`--tz-color-${n}-rgb`,r),s.style.setProperty(`--tz-color-${n}-contrast`,Ee[n]??pe(r))}}const o=a.createContext(null),te="tz-theme-mode",h=e=>`tz-accent-color-${e}`,se="tz-header-sticky",ae="tz-font-family",ne="tz-locale",re=[{code:"en-US",label:"English"}],_="Inter",Se=[_],Ae=e=>`'${e}', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif`;function he(){if(typeof document>"u"||document.getElementById("tz-font-preconnect"))return;const e=document.createElement("link");e.id="tz-font-preconnect",e.rel="preconnect",e.href="https://fonts.googleapis.com",document.head.appendChild(e);const s=document.createElement("link");s.rel="preconnect",s.href="https://fonts.gstatic.com",s.crossOrigin="anonymous",document.head.appendChild(s)}function _e(e){if(typeof document>"u"||Se.includes(e))return;const s=`tz-font-${e.trim().replace(/\s+/g,"-").toLowerCase()}`;if(document.getElementById(s))return;he();const n=document.createElement("link");n.id=s,n.rel="stylesheet",n.href=`https://fonts.googleapis.com/css2?family=${encodeURIComponent(e.trim()).replace(/%20/g,"+")}&display=swap`,document.head.appendChild(n)}const L="tab",f="nestedTab",k="step",oe=[],ue={},le={},Ce={primary:"#13404e",secondary:"#ffffff",background:"#f9f9f9",surface:"#ffffff",accent:"#056472",success:"#00a854",error:"#f04134",info:"#039aa1",warning:"#ffbf00"},be={primary:"#e6e8eb",secondary:"#191919",background:"#0f0f0f",surface:"#191919",accent:"#16a6b4",success:"#00a854",error:"#f04134",info:"#039aa1",warning:"#ffbf00"};function Le(e){const s=localStorage.getItem(te);return s==="light"||s==="dark"?s:e}function fe(){return{light:localStorage.getItem(h("light"))||null,dark:localStorage.getItem(h("dark"))||null}}function ke(e){const s=localStorage.getItem(se);return s==="1"?!0:s==="0"?!1:e}function Fe(e){return localStorage.getItem(ae)||e}function Ie(e,s){const n=e.map(r=>r.code),u=localStorage.getItem(ne);return u&&n.includes(u)?u:s&&n.includes(s)?s:n.find(r=>r.toLowerCase().startsWith("en"))??n[0]??"en-US"}function Ue({config:e,children:s}){var $,q,x,G,j,V,W,J,X;const[n,u]=a.useState(()=>{var t;return Le(((t=e==null?void 0:e.theme)==null?void 0:t.mode)??"light")}),[r,C]=a.useState(fe),[F,ce]=a.useState(()=>{var t;return ke(((t=e==null?void 0:e.header)==null?void 0:t.sticky)??!1)}),[i,de]=a.useState(()=>{var t;return Fe(((t=e==null?void 0:e.theme)==null?void 0:t.fontFamily)??_)}),b=(($=e==null?void 0:e.i18n)==null?void 0:$.languages)??re,I=(q=e==null?void 0:e.i18n)==null?void 0:q.messages,U=(x=e==null?void 0:e.i18n)==null?void 0:x.appMessages,[m,me]=a.useState(()=>{var t;return Ie(b,(t=e==null?void 0:e.i18n)==null?void 0:t.language)}),c=(G=e==null?void 0:e.theme)==null?void 0:G.colors,T=a.useMemo(()=>{const t={...Ce,...c==null?void 0:c.light},l={...t,...be,...c==null?void 0:c.dark};return{light:t,dark:l}},[c]),K=a.useMemo(()=>({light:T.light.accent,dark:T.dark.accent}),[T]),y=a.useCallback((t,l=r[t])=>{const d=T[t];ee(l?{...d,accent:l}:d);const S=document.documentElement;S.setAttribute("data-tz-theme",t),S.style.setProperty("color-scheme",t),localStorage.setItem(te,t)},[T,r]);a.useLayoutEffect(()=>{y(n)},[y,n]);const p=a.useCallback(t=>{y(t),u(t)},[y]),R=a.useCallback(()=>p(n==="light"?"dark":"light"),[n,p]),Q=a.useCallback((t,l)=>{const d=l??n;C(S=>({...S,[d]:t})),t?localStorage.setItem(h(d),t):localStorage.removeItem(h(d)),d===n&&y(n,t)},[n,y]),N=a.useCallback(t=>{ce(t),localStorage.setItem(se,t?"1":"0")},[]),E=a.useCallback(t=>{_e(t),document.documentElement.style.setProperty("--tz-font-family",Ae(t))},[]);a.useLayoutEffect(()=>{E(i)},[E,i]);const D=a.useCallback(t=>{const l=t.trim()||_;E(l),de(l),localStorage.setItem(ae,l)},[E]),Y=a.useCallback(t=>{me(t),localStorage.setItem(ne,t)},[]),g=a.useMemo(()=>A.createTranslator(m,I),[m,I]),M=a.useMemo(()=>A.createAppTranslator(m,U),[m,U]),O=(e==null?void 0:e.locales)??oe,P=((j=e==null?void 0:e.keys)==null?void 0:j.translationsNamespace)??Z.DEFAULT_TRANSLATIONS_NAMESPACE,z=((V=e==null?void 0:e.keys)==null?void 0:V.tabQueryKey)??L,B=((W=e==null?void 0:e.keys)==null?void 0:W.nestedTabQueryKey)??f,v=((J=e==null?void 0:e.keys)==null?void 0:J.stepQueryKey)??k,w=((X=e==null?void 0:e.table)==null?void 0:X.query)??ue,H=(e==null?void 0:e.header)??le,ye=a.useMemo(()=>({mode:n,setMode:p,toggleMode:R,accentColors:r,defaultAccentColors:K,setAccentColor:Q,locales:O,translationsNamespace:P,tabQueryKey:z,nestedTabQueryKey:B,stepQueryKey:v,tableQuery:w,header:H,headerSticky:F,setHeaderSticky:N,fontFamily:i,setFontFamily:D,language:m,setLanguage:Y,languages:b,t:g,appT:M}),[n,p,R,r,K,Q,O,P,z,B,v,w,H,F,N,i,D,m,Y,b,g,M]);return Te.jsx(o.Provider,{value:ye,children:s})}function Ke(){const e=a.useContext(o);if(!e)throw new Error("useTheme must be used within a <ConfigProvider>");return e}function Re(){var e;return((e=a.useContext(o))==null?void 0:e.locales)??oe}const Qe=A.createTranslator("en"),Ne=A.createAppTranslator("en");function De(){var e;return((e=a.useContext(o))==null?void 0:e.t)??Qe}function Ye(){var e;return((e=a.useContext(o))==null?void 0:e.appT)??Ne}function ge(){const e=a.useContext(o);return{language:(e==null?void 0:e.language)??"en-US",setLanguage:(e==null?void 0:e.setLanguage)??(()=>{}),languages:(e==null?void 0:e.languages)??re}}function Me(){var e;return((e=a.useContext(o))==null?void 0:e.translationsNamespace)??Z.DEFAULT_TRANSLATIONS_NAMESPACE}function Oe(){var e;return((e=a.useContext(o))==null?void 0:e.tabQueryKey)??L}function Pe(){var e;return((e=a.useContext(o))==null?void 0:e.nestedTabQueryKey)??f}function ze(){var e;return((e=a.useContext(o))==null?void 0:e.stepQueryKey)??k}function Be(){var e;return((e=a.useContext(o))==null?void 0:e.tableQuery)??ue}function ve(){var e;return((e=a.useContext(o))==null?void 0:e.header)??le}exports.ConfigProvider=Ue;exports.DEFAULT_FONT_FAMILY=_;exports.DEFAULT_NESTED_TAB_QUERY_KEY=f;exports.DEFAULT_STEP_QUERY_KEY=k;exports.DEFAULT_TABS_QUERY_KEY=L;exports.applyTheme=ee;exports.useHeaderConfig=ve;exports.useLanguage=ge;exports.useLocales=Re;exports.useNestedTabQueryKey=Pe;exports.useStepQueryKey=ze;exports.useT=De;exports.useTableQueryConfig=Be;exports.useTabsQueryKey=Oe;exports.useTheme=Ke;exports.useTranslations=Ye;exports.useTranslationsNamespace=Me;
|
|
2
|
+
//# sourceMappingURL=ConfigProvider-ByOFXVyP.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConfigProvider-ByOFXVyP.cjs","sources":["../src/theme/applyTheme.ts","../src/theme/ConfigProvider.tsx"],"sourcesContent":["export interface ThemePalette {\n primary: string\n /**\n * A free theme color (near-white by default) selectable via the `color` prop — it is **no longer**\n * the component surface (elevated panels use `--tz-color-surface`).\n */\n secondary: string\n /**\n * The rear-most page background — the `<body>` fill + the shell canvas that the floating panels sit\n * on; nothing else uses it. Built-in defaults: a soft off-white in light mode, a near-black in dark mode.\n */\n background: string\n /**\n * The elevated **panel surface** — cards, sidebar, inputs/forms, dropdowns, modals (the panels that\n * float over `--tz-color-background`). Built-in defaults: white in light mode, a touch lighter than\n * the canvas in dark mode. Configurable per mode like any theme color.\n */\n surface: string\n /** The single accent color — the default tint for controls (`Button`, `IconButton`, …). */\n accent: string\n success: string\n error: string\n info: string\n warning: string\n}\n\n/** Names of the theme palette tokens (maps to `--tz-color-<name>`). */\nexport type ThemeColor = keyof ThemePalette\n\nfunction hexToRgbTriplet(hex: string): string {\n let h = hex.trim().replace(/^#/, '')\n if (h.length === 3) {\n h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2]\n }\n const int = parseInt(h, 16)\n return `${(int >> 16) & 255}, ${(int >> 8) & 255}, ${int & 255}`\n}\n\n/**\n * Picks a readable text color (near-black or white) to sit on top of a solid\n * fill — used by `contained` controls so the label stays legible on light\n * colors (e.g. a light `primary` in dark mode).\n */\nfunction contrastColor(rgbTriplet: string): string {\n const [r, g, b] = rgbTriplet.split(',').map((n) => Number(n.trim()))\n const yiq = (r * 299 + g * 587 + b * 114) / 1000\n return yiq >= 150 ? '#04202b' : '#ffffff'\n}\n\n/**\n * Per-color overrides for the `contained` label color, where the automatic\n * luminance pick isn't the desired look:\n * - `secondary`: near-white fill that blends with the page, so the label uses\n * the primary color (flips with the mode) to stay readable without a border.\n * - `warning`: keep the plain white label by design.\n */\nconst CONTRAST_OVERRIDE: Readonly<Record<string, string>> = {\n secondary: 'rgb(var(--tz-color-primary-rgb))',\n warning: '#ffffff',\n}\n\nexport function applyTheme(\n theme: Partial<ThemePalette>,\n target: HTMLElement = document.documentElement,\n): void {\n for (const [name, value] of Object.entries(theme)) {\n if (!value) continue\n const triplet = hexToRgbTriplet(value)\n target.style.setProperty(`--tz-color-${name}-rgb`, triplet)\n target.style.setProperty(\n `--tz-color-${name}-contrast`,\n CONTRAST_OVERRIDE[name] ?? contrastColor(triplet),\n )\n }\n}\n","import {\n createContext,\n useCallback,\n useContext,\n useLayoutEffect,\n useMemo,\n useState,\n type ReactNode,\n} from 'react'\nimport { applyTheme, type ThemePalette } from './applyTheme'\nimport { DEFAULT_TRANSLATIONS_NAMESPACE } from '../helpers/translations'\nimport {\n createAppTranslator,\n createTranslator,\n type AppMessages,\n type AppTranslator,\n type MessageOverrides,\n type Translator,\n} from '../i18n/messages'\n\nexport type ThemeMode = 'light' | 'dark'\n\nexport interface ThemeColors {\n /** Light-mode palette. Override any subset of the theme colors — the rest use the library defaults. */\n light?: Partial<ThemePalette>\n /** Dark-mode overrides, layered on the (merged) light palette + the library's dark defaults. */\n dark?: Partial<ThemePalette>\n}\n\n/** A content locale the app supports — a tab in `<TranslatedFields>`. */\nexport interface LocaleConfig {\n /** BCP-47 locale code, e.g. `'en-US'`. Namespaces the form field names and is the tab's fallback label. */\n code: string\n /** Human-readable tab label. Falls back to `code`. */\n label?: string\n}\n\n/** Theme settings — color overrides + initial mode. Lives under `Config.theme`. */\nexport interface ThemeConfig {\n /** Theme color overrides. Omit entirely to use the library's built-in theme. */\n colors?: ThemeColors\n /** Initial color mode. */\n mode?: ThemeMode\n /**\n * Default font family — the app-wide default the user's Settings choice overrides (persisted). One of\n * the pre-imported presets (`Inter` / `Roboto` / `Lato`) or any Google Font family name. Defaults to\n * `Inter`. A non-preset family is loaded on demand at runtime.\n */\n fontFamily?: string\n}\n\n/**\n * The configurable key / param **names** the library's components read — grouped under `Config.keys`\n * so they live in one place. Each is overridable; omit one to use its built-in default. Grows over\n * time (e.g. `page` / `size` for paginated tables ⇒ `?page=1&size=10`).\n */\nexport interface KeysConfig {\n /**\n * URL query param name a **top-level** `<Tabs>` syncs its active tab to (e.g. `'view'` ⇒ `?view=…`),\n * unless that strip sets its own `queryKey` (or `queryKey={null}` to opt out). Defaults to `'tab'`.\n */\n tabQueryKey?: string\n /**\n * URL query param name a **nested** `<Tabs>` (one rendered inside another tab's panel) syncs to, so it\n * doesn't collide with the outer strip's `tabQueryKey` (e.g. `?tab=…&nestedTab=…`). Auto-applied by\n * nesting depth; overridable per strip via `queryKey`. Defaults to `'nestedTab'`.\n */\n nestedTabQueryKey?: string\n /**\n * URL query param name a `<Stepper queryKey>` (the bare/`true` form) syncs its active step to\n * (**1-based**, e.g. `?step=2`); a string `queryKey` overrides it per stepper. Defaults to `'step'`.\n * (The sync itself is **opt-in** — a stepper with no `queryKey` never touches the URL.)\n */\n stepQueryKey?: string\n /**\n * Top-level namespace word for `<TranslatedFields>`' form names + the nested object — e.g.\n * `'languages'` ⇒ `languages[en-US].title`. Defaults to `'translations'`.\n */\n translationsNamespace?: string\n}\n\n/**\n * How a `<Table>` builds its **server-request** params — the query it hands the consumer (as `params` /\n * `query`) in `onChange`, so a server-mode fetch doesn't hand-map page/size/search/sort every time. This is\n * the **backend transport** layer, distinct from `keys.*QueryKey` (the browser-URL sync, always page-based\n * for shareable links). Set once in `config.table.query`, override per table via the `queryMapping` prop.\n * Every field is optional; the defaults reproduce the browser-URL shape (`?page=1&size=10&search=…&sort=-key`).\n */\nexport interface TableQueryConfig {\n /** Request param name for the page / offset. Defaults to `'page'` (e.g. `'skip'` for an offset API). */\n pageParam?: string\n /** Request param name for the page size. Defaults to `'size'` (e.g. `'limit'`). */\n sizeParam?: string\n /** Request param name for the search query (omitted when the search is empty). Defaults to `'search'` (e.g. `'q'`). */\n searchParam?: string\n /**\n * Request param name holding the sort **key**. Defaults to `'sort'` (e.g. `'sortBy'`). With\n * `sortFormat: 'field'` this single param also carries the direction (`-key` = desc); with `'separate'`\n * the direction goes to `sortOrderParam`.\n */\n sortParam?: string\n /**\n * Pagination style. `'page'` (default) emits the **1-based page number** as-is (`page=2`); `'offset'`\n * emits a **zero-based offset** `(page - 1) * size` instead (`skip=10`), for skip/offset APIs.\n */\n pagination?: 'page' | 'offset'\n /**\n * Sort encoding. `'field'` (default) is a single param with a `-` prefix for descending (`sort=-price`);\n * `'separate'` splits into two params — the key in `sortParam` + the direction in `sortOrderParam`\n * (`sortBy=price&order=desc`); `'suffix'` appends the direction value to the key in a single param\n * (`sort=priceAsc` / `sort=priceDesc` with `ascValue: 'Asc'` / `descValue: 'Desc'`).\n */\n sortFormat?: 'field' | 'separate' | 'suffix'\n /** Direction param name when `sortFormat: 'separate'`. Defaults to `'order'`. */\n sortOrderParam?: string\n /**\n * Value emitted for an ascending sort — the `sortOrderParam` value when `sortFormat: 'separate'`, or the\n * suffix appended to the key when `sortFormat: 'suffix'`. Defaults to `'asc'`.\n */\n ascValue?: string\n /**\n * Value emitted for a descending sort — the `sortOrderParam` value when `sortFormat: 'separate'`, or the\n * suffix appended to the key when `sortFormat: 'suffix'`. Defaults to `'desc'`.\n */\n descValue?: string\n /**\n * What to emit for the size param when the **\"All\"** rows-per-page choice is active. A `string`/`number`\n * sets `size=<allValue>` (e.g. `0` for APIs where `limit=0` means \"all\"); omit it (default) to drop the\n * size param entirely (many APIs treat a missing limit as unbounded).\n */\n allValue?: string | number\n /**\n * How a **`multiSelect`** filter serializes into the request query: `'repeat'` (default — `cat=a&cat=b`),\n * `'csv'` (`cat=a,b`), or `'indexed'` (`cat[0]=a&cat[1]=b`).\n */\n multiSelectFormat?: 'repeat' | 'csv' | 'indexed'\n /**\n * Suffix appended to a **range** filter's param for its lower / upper bound — e.g. `Min`/`Max` (default)\n * → `priceMin`/`priceMax`; set `'_gte'`/`'_lte'`, `'[gte]'`/`'[lte]'`, `'From'`/`'To'`, … to match your API.\n */\n rangeMinSuffix?: string\n rangeMaxSuffix?: string\n}\n\n/** `<Table>`-specific configuration. Grows over time; today just the server-request query mapping. */\nexport interface TableConfig {\n /** How `<Table>` builds its server-request params (emitted as `params` / `query` in `onChange`). */\n query?: TableQueryConfig\n}\n\n/** Signed-in user shown in the shell header avatar + its account menu (see `HeaderConfig`). */\nexport interface HeaderUser {\n /** Full name — shown as the menu's name line. */\n name?: string\n /** Email shown under the name in the account menu. */\n email?: string\n /** Avatar image URL (falls back to a user icon). */\n avatar?: string\n}\n\n/**\n * `RootLayout` header configuration — the shell's top-bar controls. Set it once app-wide in\n * `config.header`, or per shell via the `RootLayout` `header` prop (the prop wins, merged over config).\n */\nexport interface HeaderConfig {\n /** Show the built-in light/dark theme toggle. Defaults to `true`. */\n theme?: boolean\n /**\n * Make the shell header **stick to the top on scroll** (fixed) instead of scrolling away (static).\n * This is the app-wide default; the user can flip it in the **Settings** drawer and their choice is\n * persisted (`localStorage['tz-header-sticky']`), overriding this. Defaults to `false` (static).\n */\n sticky?: boolean\n /** Show the browser-fullscreen toggle (auto-hides where the Fullscreen API is unavailable). Defaults to `false`. */\n fullscreen?: boolean\n /** Show the **Settings** button (opens the right-side drawer to pick the per-mode `accent`). Defaults to `true`. */\n settings?: boolean\n /** Show the nav search over the sidebar's pages (with suggestions). Defaults to `true`. */\n search?: boolean\n /**\n * Show the header **language switcher** (the `Global`-icon dropdown of `config.i18n.languages`).\n * Defaults to `true`, but it only renders when more than one UI language is configured — so pass\n * `false` to hide it even with several languages (the panel stays on its current/default language).\n */\n languages?: boolean\n /** Show the breadcrumb trail at the top of the content. Defaults to **`true`**. */\n breadcrumbs?: boolean\n /** Render the automatic page-title `h2` (the active route's `staticData.name`). Defaults to `true`. */\n pageTitle?: boolean\n /** When provided, an account `Avatar` appears; its menu has a **Sign out** item that calls this. */\n onLogout?: () => void\n /** Signed-in user — shown in the header avatar and as a header block atop the account menu. */\n user?: HeaderUser\n}\n\n/**\n * UI-language config for the admin panel's **own** static strings (labels, placeholders, aria-labels).\n * Distinct from `locales` (which is content-translation locales for `<TranslatedFields>`). The library\n * ships built-in translations (English + Georgian), so listing `languages` here is enough to get a\n * localized panel — no per-app setup. Any language the library doesn't ship is supplied via `messages`.\n */\nexport interface I18nConfig {\n /**\n * Active UI language on first load (a locale code, e.g. `'ka-GE'`). Defaults to English if listed in\n * `languages`, else the first `languages` entry, else `'en-US'`. The user's switcher choice (persisted)\n * overrides it.\n */\n language?: string\n /**\n * The UI languages the panel offers — drives the Settings language switcher. One entry = a fixed\n * language (no switcher). Defaults to English only. (Reuses the `{ code, label }` shape.)\n */\n languages?: LocaleConfig[]\n /**\n * Extra / override message catalogs for the **library's own** strings, merged **over** the built-ins\n * and keyed by language code or base language (`'ka-GE'` or `'ka'`). Use this to localize into a\n * language the library doesn't ship, or to tweak a built-in string. Unset keys fall back to English.\n */\n messages?: MessageOverrides\n /**\n * Catalogs for the **consuming app's own** UI strings — its section titles, labels, business copy —\n * keyed by language code/base then by any string key the app picks. Read via **`useTranslations()`**,\n * which binds to the active UI language, so the app's text switches together with the panel. Resolution\n * per key: exact code → base language → English (`'en'`) → the key itself. This is the app's own copy;\n * `messages` above is only for the library's built-in strings.\n */\n appMessages?: AppMessages\n}\n\n/**\n * App-level configuration passed to `<ConfigProvider config={…}>`. Groups theming under `theme`,\n * the configurable key/param names under `keys`, and keeps the rest (`locales`, …) at the top — a\n * single place to grow.\n */\nexport interface Config {\n /** Theme settings (color overrides + initial mode). Omit entirely to use the built-in theme. */\n theme?: ThemeConfig\n /** Content locales the app supports — drive `<TranslatedFields>`' tabs (one per locale). */\n locales?: LocaleConfig[]\n /** UI-language config for the panel's own strings (the library ships the translations). See `I18nConfig`. */\n i18n?: I18nConfig\n /**\n * Configurable key / query-param names the components read — e.g. the `<Tabs>` query keys\n * (`tabQueryKey` / `nestedTabQueryKey`) and the `<TranslatedFields>` namespace\n * (`translationsNamespace`). Grows over time (`page`, `size`, …).\n */\n keys?: KeysConfig\n /** `<Table>` config — today the server-request query mapping (`table.query`) shared by every table. */\n table?: TableConfig\n /**\n * `RootLayout` header config, app-wide — the shell top-bar toggles (`theme` / `fullscreen` /\n * `search` / `breadcrumbs` / `pageTitle`) + the account (`onLogout` / `user`). A `RootLayout`\n * `header` prop is merged over this (the prop wins), so a specific shell can override.\n */\n header?: HeaderConfig\n}\n\ninterface ThemeContextValue {\n mode: ThemeMode\n setMode: (mode: ThemeMode) => void\n toggleMode: () => void\n /** The persisted accent-color overrides **per mode** (a hex, or `null` when using that mode's default). */\n accentColors: Record<ThemeMode, string | null>\n /** The configured/default `accent` **per mode** (before any override) — the \"no override\" values. */\n defaultAccentColors: Record<ThemeMode, string>\n /** Set (or clear with `null`) the accent override for `mode` (defaults to the current) — persists + re-applies. */\n setAccentColor: (color: string | null, mode?: ThemeMode) => void\n locales: LocaleConfig[]\n /** Resolved translations namespace (`config.keys.translationsNamespace` ?? the built-in default). */\n translationsNamespace: string\n /** Resolved top-level tabs query key (`config.keys.tabQueryKey` ?? the built-in default). */\n tabQueryKey: string\n /** Resolved nested tabs query key (`config.keys.nestedTabQueryKey` ?? the built-in default). */\n nestedTabQueryKey: string\n /** Resolved stepper query key (`config.keys.stepQueryKey` ?? the built-in default). */\n stepQueryKey: string\n /** The `<Table>` server-request query mapping (`config.table.query` ?? `{}`). Defaults applied by `buildTableQuery`. */\n tableQuery: TableQueryConfig\n /** App-wide `RootLayout` header config (`config.header` ?? `{}`); the `RootLayout` prop merges over it. */\n header: HeaderConfig\n /** Whether the shell header sticks to the top on scroll (fixed) vs scrolls away (static). Persisted. */\n headerSticky: boolean\n /** Set + persist the header sticky/static preference (overrides `config.header.sticky`). */\n setHeaderSticky: (sticky: boolean) => void\n /** The active font family (drives `--tz-font-family`). Persisted; seeded from `config.theme.fontFamily`. */\n fontFamily: string\n /** Set + persist the font family (a preset or any Google Font name; loaded on demand). */\n setFontFamily: (family: string) => void\n /** Active UI language code (drives `t`). Persisted; seeded from `config.i18n.language` (default English). */\n language: string\n /** Set + persist the active UI language (must be one of `languages`). */\n setLanguage: (code: string) => void\n /** The UI languages the panel offers (from `config.i18n.languages`, default English only). */\n languages: LocaleConfig[]\n /** Translator for the library's built-in strings, bound to the active `language`. */\n t: Translator\n /** Translator for the **app's own** strings (`config.i18n.appMessages`), bound to the active `language`. */\n appT: AppTranslator\n}\n\nconst ThemeContext = createContext<ThemeContextValue | null>(null)\nconst STORAGE_KEY = 'tz-theme-mode'\n/** Where the user's picked accent-color override is persisted, **per mode** (survives reloads). */\nconst accentStorageKey = (mode: ThemeMode) => `tz-accent-color-${mode}`\n/** Where the user's header sticky/static choice is persisted (survives reloads). */\nconst HEADER_STICKY_KEY = 'tz-header-sticky'\n/** Where the user's chosen font family is persisted (survives reloads). */\nconst FONT_STORAGE_KEY = 'tz-font-family'\n/** Where the user's chosen UI language is persisted (survives reloads). */\nconst LOCALE_KEY = 'tz-locale'\n/** Default UI languages when `config.i18n.languages` is unset — English only. */\nconst DEFAULT_LANGUAGES: LocaleConfig[] = [{ code: 'en-US', label: 'English' }]\n/** The default font family (matches the `--tz-font-family` token's primary family). */\nexport const DEFAULT_FONT_FAMILY = 'Inter'\n/** Families already in the shipped CSS (only the default) — these skip the runtime `<link>` load. */\nconst BUNDLED_FONTS: readonly string[] = [DEFAULT_FONT_FAMILY]\n/** The full fallback stack applied to `--tz-font-family` for a chosen family (mirrors theme.css). */\nconst fontStack = (family: string) =>\n `'${family}', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif`\n\n/** Add the Google Fonts preconnect hints once, so the on-demand font fetch isn't delayed by DNS/TLS. */\nfunction ensureFontPreconnect() {\n if (typeof document === 'undefined' || document.getElementById('tz-font-preconnect')) return\n const api = document.createElement('link')\n api.id = 'tz-font-preconnect'\n api.rel = 'preconnect'\n api.href = 'https://fonts.googleapis.com'\n document.head.appendChild(api)\n const gstatic = document.createElement('link')\n gstatic.rel = 'preconnect'\n gstatic.href = 'https://fonts.gstatic.com'\n gstatic.crossOrigin = 'anonymous'\n document.head.appendChild(gstatic)\n}\n\n/**\n * Ensure a Google Fonts stylesheet `<link>` exists for `family` (deduped by id). Only the default\n * (`Inter`) ships pre-imported, so every other family — the Roboto/Lato presets and any custom pick —\n * is loaded here on first use. Bare family request (no weight axes) so it works for any font — Google\n * serves the available weights.\n */\nfunction ensureFontLoaded(family: string) {\n if (typeof document === 'undefined' || BUNDLED_FONTS.includes(family)) return\n const id = `tz-font-${family.trim().replace(/\\s+/g, '-').toLowerCase()}`\n if (document.getElementById(id)) return\n ensureFontPreconnect()\n const link = document.createElement('link')\n link.id = id\n link.rel = 'stylesheet'\n link.href = `https://fonts.googleapis.com/css2?family=${encodeURIComponent(family.trim()).replace(/%20/g, '+')}&display=swap`\n document.head.appendChild(link)\n}\n/** The built-in default URL query param name a **top-level** `<Tabs>` syncs to (no `queryKey`/config). */\nexport const DEFAULT_TABS_QUERY_KEY = 'tab'\n/** The built-in default URL query param name a **nested** `<Tabs>` syncs to (no `queryKey`/config). */\nexport const DEFAULT_NESTED_TAB_QUERY_KEY = 'nestedTab'\n/** The built-in default URL query param name a `<Stepper>` syncs to (no `queryKey`/config). */\nexport const DEFAULT_STEP_QUERY_KEY = 'step'\n/** Stable empty-locales fallback so the context value memo doesn't churn when no locales are configured. */\nconst EMPTY_LOCALES: LocaleConfig[] = []\n/** Stable empty table-query fallback so the context memo doesn't churn when no `table.query` is configured. */\nconst EMPTY_TABLE_QUERY: TableQueryConfig = {}\n/** Stable empty header fallback so the context memo doesn't churn when no `header` is configured. */\nconst EMPTY_HEADER: HeaderConfig = {}\n\n/**\n * The library's built-in light palette — the single source of truth for every theme color's default\n * value. Apps override any subset via `config.colors.light`; the rest fall back to these. (theme.css\n * holds only the structure that references these values, not the values themselves.)\n */\nconst DEFAULT_LIGHT_COLORS: ThemePalette = {\n primary: '#13404e',\n secondary: '#ffffff',\n background: '#f9f9f9', // the rear + shell canvas — a soft off-white behind the white panels\n surface: '#ffffff', // the elevated panels (cards, sidebar, inputs, dropdowns, modals)\n accent: '#056472',\n success: '#00a854',\n error: '#f04134',\n info: '#039aa1',\n warning: '#ffbf00',\n}\n\n/**\n * Built-in dark-mode overrides — only the colors that differ from light; everything else inherits the\n * (merged) light palette. Apps override any of these via `config.colors.dark`.\n */\nconst DEFAULT_DARK_COLORS: Partial<ThemePalette> = {\n primary: '#e6e8eb',\n secondary: '#191919',\n background: '#0f0f0f', // the near-black rear + canvas\n surface: '#191919', // a touch lighter than the canvas, for the elevated panels\n accent: '#16a6b4', // a brighter teal — the light-mode accent is too dark on the dark canvas\n success: '#00a854',\n error: '#f04134',\n info: '#039aa1',\n warning: '#ffbf00',\n}\n\nfunction getInitialMode(fallback: ThemeMode): ThemeMode {\n const stored = localStorage.getItem(STORAGE_KEY)\n return stored === 'light' || stored === 'dark' ? stored : fallback\n}\n\n/** The persisted per-mode accent-color overrides (a hex string per mode, or `null` when none picked). */\nfunction getInitialAccentByMode(): Record<ThemeMode, string | null> {\n return {\n light: localStorage.getItem(accentStorageKey('light')) || null,\n dark: localStorage.getItem(accentStorageKey('dark')) || null,\n }\n}\n\n/** The persisted header sticky choice (`fallback` = the app's `config.header.sticky` when unset). */\nfunction getInitialHeaderSticky(fallback: boolean): boolean {\n const stored = localStorage.getItem(HEADER_STICKY_KEY)\n return stored === '1' ? true : stored === '0' ? false : fallback\n}\n\n/** The persisted font family (`fallback` = `config.theme.fontFamily` ?? the default when unset). */\nfunction getInitialFont(fallback: string): string {\n return localStorage.getItem(FONT_STORAGE_KEY) || fallback\n}\n\n/**\n * The initial UI language: the persisted choice (if still offered), else `config.i18n.language`, else\n * English if it's among the offered languages, else the first offered, else `'en-US'`. Always clamped\n * to a code that's actually in `languages`.\n */\nfunction getInitialLanguage(languages: LocaleConfig[], configLanguage?: string): string {\n const codes = languages.map((l) => l.code)\n const stored = localStorage.getItem(LOCALE_KEY)\n if (stored && codes.includes(stored)) return stored\n if (configLanguage && codes.includes(configLanguage)) return configLanguage\n return codes.find((c) => c.toLowerCase().startsWith('en')) ?? codes[0] ?? 'en-US'\n}\n\nexport interface ConfigProviderProps {\n /** App config — theme overrides, initial mode, locales. Omit for the built-in defaults (light mode). */\n config?: Config\n children: ReactNode\n}\n\nexport function ConfigProvider({ config, children }: ConfigProviderProps) {\n const [mode, setModeState] = useState<ThemeMode>(() =>\n getInitialMode(config?.theme?.mode ?? 'light'),\n )\n // user-picked accents that override the configured/default `accent` — kept PER MODE; persisted\n const [accentByMode, setAccentByMode] =\n useState<Record<ThemeMode, string | null>>(getInitialAccentByMode)\n // user's header sticky/static choice — persisted; seeded from config.header.sticky (default static)\n const [headerSticky, setHeaderStickyState] = useState<boolean>(() =>\n getInitialHeaderSticky(config?.header?.sticky ?? false),\n )\n // user's chosen font family — persisted; seeded from config.theme.fontFamily (default Inter)\n const [fontFamily, setFontFamilyState] = useState<string>(() =>\n getInitialFont(config?.theme?.fontFamily ?? DEFAULT_FONT_FAMILY),\n )\n // UI languages offered + the active one (persisted; seeded from config.i18n, default English)\n const languages = config?.i18n?.languages ?? DEFAULT_LANGUAGES\n const i18nMessages = config?.i18n?.messages\n const appMessages = config?.i18n?.appMessages\n const [language, setLanguageState] = useState<string>(() =>\n getInitialLanguage(languages, config?.i18n?.language),\n )\n const colors = config?.theme?.colors\n\n // the configured/default palette for BOTH modes, before any accent override:\n // light = library defaults then the app's light overrides; dark = that, then the library dark deltas,\n // then the app's dark overrides. (Both computed so the Settings drawer can offer a picker per mode.)\n const basePalettes = useMemo(() => {\n const light = { ...DEFAULT_LIGHT_COLORS, ...colors?.light }\n const dark = { ...light, ...DEFAULT_DARK_COLORS, ...colors?.dark }\n return { light, dark }\n }, [colors])\n // the accent per mode when there's NO override — exposed so UI needn't hardcode it\n const defaultAccentColors = useMemo(\n () => ({ light: basePalettes.light.accent, dark: basePalettes.dark.accent }),\n [basePalettes],\n )\n\n // Commit a mode's resolved theme straight to `<html>` (CSS vars + attrs + persisted mode). Called\n // **eagerly** on change (so the DOM updates the instant you toggle, NOT after React re-renders the\n // whole subtree — which is what made the switch feel ~1s late) and from the effect below (initial\n // mount / accent change / external `setMode`). Idempotent, so applying twice is harmless.\n const applyMode = useCallback(\n (nextMode: ThemeMode, accent: string | null = accentByMode[nextMode]) => {\n const base = basePalettes[nextMode]\n applyTheme(accent ? { ...base, accent } : base)\n const root = document.documentElement\n root.setAttribute('data-tz-theme', nextMode)\n root.style.setProperty('color-scheme', nextMode)\n localStorage.setItem(STORAGE_KEY, nextMode)\n },\n [basePalettes, accentByMode],\n )\n\n useLayoutEffect(() => {\n applyMode(mode)\n }, [applyMode, mode])\n\n const setMode = useCallback(\n (next: ThemeMode) => {\n applyMode(next) // eager DOM update — don't wait for the re-render/commit\n setModeState(next)\n },\n [applyMode],\n )\n\n const toggleMode = useCallback(\n () => setMode(mode === 'light' ? 'dark' : 'light'),\n [mode, setMode],\n )\n\n // set (or clear with `null`) the accent override for `target` (defaults to the current mode); persists\n const setAccentColor = useCallback(\n (color: string | null, target?: ThemeMode) => {\n const m = target ?? mode\n setAccentByMode((prev) => ({ ...prev, [m]: color }))\n if (color) localStorage.setItem(accentStorageKey(m), color)\n else localStorage.removeItem(accentStorageKey(m))\n if (m === mode) applyMode(mode, color) // eager for the active mode\n },\n [mode, applyMode],\n )\n\n // set + persist the header sticky preference (overrides config.header.sticky)\n const setHeaderSticky = useCallback((sticky: boolean) => {\n setHeaderStickyState(sticky)\n localStorage.setItem(HEADER_STICKY_KEY, sticky ? '1' : '0')\n }, [])\n\n // apply the font: load it (if not preloaded) + write the stack to --tz-font-family on <html>.\n // Eager on change + in a layout effect (mount / external change), like the mode/accent commit.\n const applyFont = useCallback((family: string) => {\n ensureFontLoaded(family)\n document.documentElement.style.setProperty('--tz-font-family', fontStack(family))\n }, [])\n useLayoutEffect(() => {\n applyFont(fontFamily)\n }, [applyFont, fontFamily])\n // set + persist the chosen font family (overrides config.theme.fontFamily)\n const setFontFamily = useCallback(\n (family: string) => {\n const next = family.trim() || DEFAULT_FONT_FAMILY\n applyFont(next) // eager — don't wait for the re-render\n setFontFamilyState(next)\n localStorage.setItem(FONT_STORAGE_KEY, next)\n },\n [applyFont],\n )\n\n // set + persist the active UI language\n const setLanguage = useCallback((code: string) => {\n setLanguageState(code)\n localStorage.setItem(LOCALE_KEY, code)\n }, [])\n // the translator bound to the active language (rebuilt only when the language or overrides change)\n const t = useMemo<Translator>(\n () => createTranslator(language, i18nMessages),\n [language, i18nMessages],\n )\n // the app's-own-strings translator, bound to the same active language (rebuilt on language/catalog change)\n const appT = useMemo<AppTranslator>(\n () => createAppTranslator(language, appMessages),\n [language, appMessages],\n )\n\n const locales = config?.locales ?? EMPTY_LOCALES\n const translationsNamespace =\n config?.keys?.translationsNamespace ?? DEFAULT_TRANSLATIONS_NAMESPACE\n const tabQueryKey = config?.keys?.tabQueryKey ?? DEFAULT_TABS_QUERY_KEY\n const nestedTabQueryKey = config?.keys?.nestedTabQueryKey ?? DEFAULT_NESTED_TAB_QUERY_KEY\n const stepQueryKey = config?.keys?.stepQueryKey ?? DEFAULT_STEP_QUERY_KEY\n const tableQuery = config?.table?.query ?? EMPTY_TABLE_QUERY\n const headerConfig = config?.header ?? EMPTY_HEADER\n\n const value = useMemo<ThemeContextValue>(\n () => ({\n mode,\n setMode,\n toggleMode,\n accentColors: accentByMode,\n defaultAccentColors,\n setAccentColor,\n locales,\n translationsNamespace,\n tabQueryKey,\n nestedTabQueryKey,\n stepQueryKey,\n tableQuery,\n header: headerConfig,\n headerSticky,\n setHeaderSticky,\n fontFamily,\n setFontFamily,\n language,\n setLanguage,\n languages,\n t,\n appT,\n }),\n [\n mode,\n setMode,\n toggleMode,\n accentByMode,\n defaultAccentColors,\n setAccentColor,\n locales,\n translationsNamespace,\n tabQueryKey,\n nestedTabQueryKey,\n stepQueryKey,\n tableQuery,\n headerConfig,\n headerSticky,\n setHeaderSticky,\n fontFamily,\n setFontFamily,\n language,\n setLanguage,\n languages,\n t,\n appT,\n ],\n )\n\n return <ThemeContext.Provider value={value}>{children}</ThemeContext.Provider>\n}\n\nexport function useTheme(): ThemeContextValue {\n const value = useContext(ThemeContext)\n if (!value) {\n throw new Error('useTheme must be used within a <ConfigProvider>')\n }\n return value\n}\n\n/**\n * The content locales configured on `<ConfigProvider config={{ locales }}>`. Lenient — returns `[]`\n * outside a provider (locales are optional), so `<TranslatedFields>` can also take a `locales` prop.\n */\nexport function useLocales(): LocaleConfig[] {\n return useContext(ThemeContext)?.locales ?? EMPTY_LOCALES\n}\n\n/** Fallback English translator so a component used **without** a `<ConfigProvider>` still shows text. */\nconst DEFAULT_TRANSLATOR: Translator = createTranslator('en')\n/** Fallback app translator (no catalogs) — returns the key itself, so `useTranslations()` is safe anywhere. */\nconst DEFAULT_APP_TRANSLATOR: AppTranslator = createAppTranslator('en')\n\n/**\n * The translator for the library's built-in UI strings, bound to the active `config.i18n` language.\n * **Lenient** — outside a provider it returns an English translator, so components render standalone\n * (and in tests) with their default English labels. Use it for any built-in string:\n * `t('select.noOptions')`.\n */\nexport function useT(): Translator {\n return useContext(ThemeContext)?.t ?? DEFAULT_TRANSLATOR\n}\n\n/**\n * Translator for the **consuming app's own** strings — the catalogs passed to\n * `<ConfigProvider config={{ i18n: { appMessages } }}>` — bound to the active UI language, so the app's\n * copy switches together with the panel. Free-form string keys; per key it resolves exact code → base\n * language → English (`'en'`) → the key itself, with `{name}` interpolation:\n *\n * ```tsx\n * const t = useTranslations()\n * <PageLayout title={t('customer-transactions.title')} />\n * <p>{t('customer-transactions.count', { count: 128 })}</p>\n * ```\n *\n * **Lenient** — outside a provider (or with no `appMessages`) it echoes the key back, so it's safe\n * anywhere. Use `useT()` for the library's built-in strings; use this for your own.\n */\nexport function useTranslations(): AppTranslator {\n return useContext(ThemeContext)?.appT ?? DEFAULT_APP_TRANSLATOR\n}\n\n/**\n * The active UI language + switcher data: `{ language, setLanguage, languages }`. Lenient outside a\n * provider (English, single language, no-op setter) so it's safe to call anywhere.\n */\nexport function useLanguage(): {\n language: string\n setLanguage: (code: string) => void\n languages: LocaleConfig[]\n} {\n const ctx = useContext(ThemeContext)\n return {\n language: ctx?.language ?? 'en-US',\n setLanguage: ctx?.setLanguage ?? (() => {}),\n languages: ctx?.languages ?? DEFAULT_LANGUAGES,\n }\n}\n\n/**\n * The translations namespace configured on `<ConfigProvider config={{ keys: { translationsNamespace } }}>`,\n * resolved against the built-in default (`'translations'`). Lenient outside a provider. Use it to pass\n * the same namespace to the helpers, e.g. `buildTranslations(codes, fields, useTranslationsNamespace())`.\n */\nexport function useTranslationsNamespace(): string {\n return useContext(ThemeContext)?.translationsNamespace ?? DEFAULT_TRANSLATIONS_NAMESPACE\n}\n\n/**\n * The default top-level tabs query key configured on `<ConfigProvider config={{ keys: { tabQueryKey } }}>`,\n * resolved against the built-in default (`'tab'`). Lenient outside a provider. A top-level `<Tabs>` reads\n * it as the fallback for an omitted `queryKey`, so every tab strip URL-syncs out of the box.\n */\nexport function useTabsQueryKey(): string {\n return useContext(ThemeContext)?.tabQueryKey ?? DEFAULT_TABS_QUERY_KEY\n}\n\n/**\n * The default nested tabs query key configured on\n * `<ConfigProvider config={{ keys: { nestedTabQueryKey } }}>`, resolved against the built-in default\n * (`'nestedTab'`). Lenient outside a provider. A `<Tabs>` nested inside another tab's panel uses this\n * (instead of `tabQueryKey`) so the two strips don't collide on the same URL param.\n */\nexport function useNestedTabQueryKey(): string {\n return useContext(ThemeContext)?.nestedTabQueryKey ?? DEFAULT_NESTED_TAB_QUERY_KEY\n}\n\n/**\n * The default stepper query key configured on `<ConfigProvider config={{ keys: { stepQueryKey } }}>`,\n * resolved against the built-in default (`'step'`). Lenient outside a provider. A `<Stepper queryKey>`\n * (the bare/`true` opt-in form) reads it as the param name; a string `queryKey` overrides it.\n */\nexport function useStepQueryKey(): string {\n return useContext(ThemeContext)?.stepQueryKey ?? DEFAULT_STEP_QUERY_KEY\n}\n\n/**\n * The `<Table>` server-request query mapping configured on `<ConfigProvider config={{ table: { query } }}>`\n * (`{}` when unset / outside a provider). `<Table>` merges its own `queryMapping` prop over this, then feeds\n * the result to `buildTableQuery`, which applies the field defaults — so an unconfigured table emits the\n * default page-based `?page=…&size=…&search=…&sort=…` shape.\n */\nexport function useTableQueryConfig(): TableQueryConfig {\n return useContext(ThemeContext)?.tableQuery ?? EMPTY_TABLE_QUERY\n}\n\n/**\n * The app-wide `RootLayout` header config set on `<ConfigProvider config={{ header }}>` (`{}` when\n * unset / outside a provider). `RootLayout` merges its own `header` prop over this (the prop wins), so\n * a specific shell can override the app-wide defaults.\n */\nexport function useHeaderConfig(): HeaderConfig {\n return useContext(ThemeContext)?.header ?? EMPTY_HEADER\n}\n"],"names":["hexToRgbTriplet","hex","h","int","contrastColor","rgbTriplet","r","g","b","n","CONTRAST_OVERRIDE","applyTheme","theme","target","name","value","triplet","ThemeContext","createContext","STORAGE_KEY","accentStorageKey","mode","HEADER_STICKY_KEY","FONT_STORAGE_KEY","LOCALE_KEY","DEFAULT_LANGUAGES","DEFAULT_FONT_FAMILY","BUNDLED_FONTS","fontStack","family","ensureFontPreconnect","api","gstatic","ensureFontLoaded","id","link","DEFAULT_TABS_QUERY_KEY","DEFAULT_NESTED_TAB_QUERY_KEY","DEFAULT_STEP_QUERY_KEY","EMPTY_LOCALES","EMPTY_TABLE_QUERY","EMPTY_HEADER","DEFAULT_LIGHT_COLORS","DEFAULT_DARK_COLORS","getInitialMode","fallback","stored","getInitialAccentByMode","getInitialHeaderSticky","getInitialFont","getInitialLanguage","languages","configLanguage","codes","l","c","ConfigProvider","config","children","setModeState","useState","_a","accentByMode","setAccentByMode","headerSticky","setHeaderStickyState","fontFamily","setFontFamilyState","i18nMessages","_b","appMessages","_c","language","setLanguageState","colors","_d","basePalettes","useMemo","light","dark","defaultAccentColors","applyMode","useCallback","nextMode","accent","base","root","useLayoutEffect","setMode","next","toggleMode","setAccentColor","color","m","prev","setHeaderSticky","sticky","applyFont","setFontFamily","setLanguage","code","t","createTranslator","appT","createAppTranslator","locales","translationsNamespace","_e","DEFAULT_TRANSLATIONS_NAMESPACE","tabQueryKey","_f","nestedTabQueryKey","_g","stepQueryKey","_h","tableQuery","_i","headerConfig","jsx","useTheme","useContext","useLocales","DEFAULT_TRANSLATOR","DEFAULT_APP_TRANSLATOR","useT","useTranslations","useLanguage","ctx","useTranslationsNamespace","useTabsQueryKey","useNestedTabQueryKey","useStepQueryKey","useTableQueryConfig","useHeaderConfig"],"mappings":"oJA6BA,SAASA,GAAgBC,EAAqB,CAC5C,IAAIC,EAAID,EAAI,KAAA,EAAO,QAAQ,KAAM,EAAE,EAC/BC,EAAE,SAAW,IACfA,EAAIA,EAAE,CAAC,EAAIA,EAAE,CAAC,EAAIA,EAAE,CAAC,EAAIA,EAAE,CAAC,EAAIA,EAAE,CAAC,EAAIA,EAAE,CAAC,GAE5C,MAAMC,EAAM,SAASD,EAAG,EAAE,EAC1B,MAAO,GAAIC,GAAO,GAAM,GAAG,K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B,EAAAA,oBAAoB,IAAI,EAQ/D,SAASoB,IAAmB,OACjC,QAAOJ,EAAAA,aAAWvG,CAAY,IAAvBuG,YAAAA,EAA0B,IAAKE,EACxC,CAiBO,SAASG,IAAiC,OAC/C,QAAOL,EAAAA,aAAWvG,CAAY,IAAvBuG,YAAAA,EAA0B,OAAQG,EAC3C,CAMO,SAASG,IAId,CACA,MAAMC,EAAMP,EAAAA,WAAWvG,CAAY,EACnC,MAAO,CACL,UAAU8G,GAAA,YAAAA,EAAK,WAAY,QAC3B,aAAaA,GAAA,YAAAA,EAAK,eAAgB,IAAM,CAAC,GACzC,WAAWA,GAAA,YAAAA,EAAK,YAAatG,EAAA,CAEjC,CAOO,SAASuG,IAAmC,OACjD,QAAOR,EAAAA,aAAWvG,CAAY,IAAvBuG,YAAAA,EAA0B,wBAAyBZ,EAAAA,8BAC5D,CAOO,SAASqB,IAA0B,OACxC,QAAOT,EAAAA,aAAWvG,CAAY,IAAvBuG,YAAAA,EAA0B,cAAepF,CAClD,CAQO,SAAS8F,IAA+B,OAC7C,QAAOV,EAAAA,aAAWvG,CAAY,IAAvBuG,YAAAA,EAA0B,oBAAqBnF,CACxD,CAOO,SAAS8F,IAA0B,OACxC,QAAOX,EAAAA,aAAWvG,CAAY,IAAvBuG,YAAAA,EAA0B,eAAgBlF,CACnD,CAQO,SAAS8F,IAAwC,OACtD,QAAOZ,EAAAA,aAAWvG,CAAY,IAAvBuG,YAAAA,EAA0B,aAAchF,EACjD,CAOO,SAAS6F,IAAgC,OAC9C,QAAOb,EAAAA,aAAWvG,CAAY,IAAvBuG,YAAAA,EAA0B,SAAU/E,EAC7C"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),r=require("react"),W=require("clsx"),Ie=require("./formContext-bTWrqdEV.cjs"),Ce=require("./FloatingPanel-U6sGYiSK.cjs"),_=require("./Icon-CXTl_QAP.cjs"),ke=require("./IconButton-D6TenQZ_.cjs"),G=require("./Typography-BFatE1_A.cjs"),je=require("./Calendar-C8uNezI-.cjs"),t=require("./DatePicker.module-tE-tGNBd.cjs"),Se=require("./ConfigProvider-ByOFXVyP.cjs"),ge=r.forwardRef(function({label:b,size:C="md",error:J,helperText:K,required:Q=!1,fullWidth:U=!0,disabled:f=!1,value:k,defaultValue:X,onChange:j,format:c="DD/MM/YYYY",valueFormat:S="YYYY-MM-DDTHH:mm:ss",placeholder:Z,min:ee,max:te,disabledDate:g,weekStartsOn:se=1,clearable:re=!0,name:i,id:ne,className:oe,style:ae},u){const F=Se.useT(),le=r.useId(),m=ne??le,O=`${m}-helper`,ce=`${m}-label`,y=Ie.useFormContext(),h=!!(y&&i),o=h?y.field(i):void 0,ie=k!==void 0?k:h?y.values[i]??"":void 0,w=k!==void 0||h,[ue,de]=r.useState(X??""),x=w?ie:ue,a=t.parseValue(x,S),D=J??(o==null?void 0:o.error)??!1,q=K??(o==null?void 0:o.helperText),M=t.parseISO(ee),B=t.parseISO(te),pe=t.maskFromFormat(c),v=e=>{e!==x&&(w||de(e),h&&y.setValue(i,e),j==null||j(e))},P=e=>v(e?t.formatValue(e,S):""),R=e=>!a||!e.isSame(a,"day"),[T,d]=r.useState(()=>a?a.format(c):"");r.useEffect(()=>{d(a?a.format(c):"")},[x,c,S]);const N=r.useRef(null),Y=r.useRef(null),[p,V]=r.useState(!1),[fe,E]=r.useState(()=>a??t.today()),me=r.useCallback(e=>{Y.current=e,typeof u=="function"?u(e):u&&(u.current=e)},[u]),I=r.useRef(void 0);I.current=o?()=>o.onBlur({}):void 0;const H=r.useRef(null),L=r.useCallback(e=>{var s,l;V(!1),(s=I.current)==null||s.call(I),e&&((l=Y.current)==null||l.focus())},[]);r.useEffect(()=>{p&&E(a??t.today())},[p]);const ye=e=>{const s=t.applyMask(e,pe);if(d(s),s===""){v("");return}const l=t.parseInput(s,c);l&&!$(l)&&R(l)&&P(l)},$=e=>M&&e.isBefore(M,"day")||B&&e.isAfter(B,"day")?!0:!!(g&&g(t.toISO(e))),he=e=>{var z,A;const s=t.parseInput(T,c);T===""?v(""):s&&!$(s)?(R(s)&&P(s),d(s.format(c))):d(a?a.format(c):"");const l=e.relatedTarget;l&&((z=H.current)!=null&&z.contains(l)||(A=N.current)!=null&&A.contains(l))||o==null||o.onBlur(e)},xe=e=>{const s=t.parseISO(e);s&&R(s)&&P(s),L(!0)},ve=C==="sm"?"sm":"md";return n.jsxs("div",{className:W.clsx(t.styles.field,t.styles[C],U&&t.styles.fullWidth,D&&t.styles.error,f&&t.styles.disabled,oe),style:ae,children:[b!=null&&n.jsxs("label",{htmlFor:m,className:t.styles.label,children:[n.jsx(G.Typography,{as:"span",variant:"bodySmall",color:"muted",children:b}),Q&&n.jsx("span",{className:t.styles.required,"aria-hidden":"true",children:"*"})]}),n.jsxs("div",{ref:N,className:W.clsx(t.styles.control,p&&t.styles.open),children:[n.jsx("input",{ref:me,id:m,name:i,className:t.styles.input,value:T,placeholder:Z??c.toLowerCase(),disabled:f,inputMode:"numeric",autoComplete:"off","aria-invalid":D||void 0,"aria-describedby":q!=null?O:void 0,onChange:e=>ye(e.target.value),onBlur:he}),re&&x!==""&&!f&&n.jsx("button",{type:"button",className:t.styles.clear,"aria-label":F("datePicker.clear"),tabIndex:-1,onMouseDown:e=>e.preventDefault(),onClick:()=>{var e;v(""),d(""),(e=Y.current)==null||e.focus()},children:n.jsx(_.Icon,{name:"CloseCircle",size:"sm"})}),n.jsx(ke.IconButton,{type:"button",variant:"text",color:"primary",size:C,disabled:f,"aria-label":F("datePicker.open"),"aria-haspopup":"dialog","aria-expanded":p,className:t.styles.calendarButton,onMouseDown:e=>e.preventDefault(),onClick:()=>V(e=>!e),children:n.jsx(_.Icon,{name:"Calendar3",size:ve})})]}),n.jsx(Ce.FloatingPanel,{ref:H,open:p,triggerRef:N,onClose:L,role:"dialog",ariaLabel:"Choose date",trapFocus:!0,className:t.styles.popover,children:n.jsx(je.Calendar,{value:a,month:fe,onMonthChange:E,onSelect:xe,min:M,max:B,disabledDate:g,weekStartsOn:se,autoFocus:!0,labelId:ce})}),q!=null&&n.jsx(G.Typography,{as:"span",id:O,variant:"bodySmall",color:D?"error":"muted",className:t.styles.helper,children:q})]})});exports.DatePicker=ge;
|
|
2
|
+
//# sourceMappingURL=DatePicker-DF4Epkn8.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker-DF4Epkn8.cjs","sources":["../src/components/DatePicker/DatePicker.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useRef,\n useState,\n type CSSProperties,\n type FocusEvent,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport { useT } from '../../theme'\nimport { useFormContext } from '../../form/formContext'\nimport { FloatingPanel } from '../FloatingPanel/FloatingPanel'\nimport { Icon } from '../Icon'\nimport { IconButton } from '../IconButton'\nimport { Typography } from '../Typography'\nimport { Calendar } from './Calendar'\nimport {\n applyMask,\n formatValue,\n maskFromFormat,\n parseISO,\n parseInput,\n parseValue,\n today,\n toISO,\n type Dayjs,\n} from './dateUtils'\nimport styles from './DatePicker.module.css'\n\nexport type DatePickerSize = 'sm' | 'md' | 'lg'\n\nexport interface DatePickerProps {\n /** Label rendered above the field. */\n label?: ReactNode\n /** Preset size — control height, font and calendar density. */\n size?: DatePickerSize\n /** Marks the field invalid: red border/ring + the `helperText` in the error color. */\n error?: boolean\n /** Helper / validation text under the field. Adopts the error color while `error`. */\n helperText?: ReactNode\n /** Adds a red asterisk after the label. */\n required?: boolean\n /** Stretches the field to fill its container width. Defaults to `true`. */\n fullWidth?: boolean\n /** Disables the field. */\n disabled?: boolean\n /** Controlled value — a date string in `valueFormat` (default ISO datetime; `''` = empty). */\n value?: string\n /** Initial value for uncontrolled use (in `valueFormat`). */\n defaultValue?: string\n /** Fires with the next date in `valueFormat` (`''` when cleared). */\n onChange?: (value: string) => void\n /** Display + typed-input format (dayjs tokens; should be numeric for the typed mask). Defaults to `'DD/MM/YYYY'`. */\n format?: string\n /**\n * Wire format of `value`/`defaultValue`/`onChange` (dayjs tokens), decoupled from the displayed\n * `format`. Defaults to the ISO datetime `'YYYY-MM-DDTHH:mm:ss'`. Incoming values are parsed\n * **leniently** (this format, then any ISO-8601 string — so a backend datetime like\n * `'2026-06-10T09:35:49.6134342'` is accepted), while `onChange` emits in exactly this format at the\n * **start of the UTC day** (e.g. `'2026-06-10T00:00:00'`). Pass `'YYYY-MM-DD'` for a plain date.\n */\n valueFormat?: string\n /** Placeholder shown when empty. Defaults to the lowercased `format` (e.g. `\"dd/mm/yyyy\"`). */\n placeholder?: string\n /** Earliest selectable date (ISO `'YYYY-MM-DD'`). */\n min?: string\n /** Latest selectable date (ISO `'YYYY-MM-DD'`). */\n max?: string\n /** Disables specific dates — receives each day as an ISO `'YYYY-MM-DD'` string. */\n disabledDate?: (date: string) => boolean\n /** First day of the week: 0 = Sunday … 6 = Saturday. Defaults to `1` (Monday). */\n weekStartsOn?: number\n /** Shows a clear (×) button when a date is set. Defaults to `true`. */\n clearable?: boolean\n /** Form field name — auto-binds to a surrounding `<Form>` (value is the ISO date string). */\n name?: string\n /** Id for the input (label association). */\n id?: string\n className?: string\n style?: CSSProperties\n}\n\n/**\n * A date field with a typed, masked input **and** a calendar popover. The input accepts typing in\n * `format` (default `DD/MM/YYYY`, masked) and parses strictly; the calendar icon opens a\n * `Dropdown`-style popover (portaled, flips, scroll-locked — shared via `useFloatingPanel`) with a\n * keyboard-navigable month grid + year picker. All calendar math runs in **UTC** so the date never\n * drifts with the viewer's timezone; the value is a string in `valueFormat` (default ISO datetime\n * `'YYYY-MM-DDTHH:mm:ss'`) — incoming values are parsed leniently (a richer backend datetime is\n * accepted) and emitted at the start of the UTC day. Supports `min`/`max`, `disabledDate`,\n * `weekStartsOn`, and\n * `clearable`. Controlled (`value` + `onChange`) or\n * uncontrolled (`defaultValue`), and binds to a surrounding `<Form>` by `name` (validate with e.g.\n * `z.string().min(1, 'Required')`). Token-only styling. Requires the `dayjs` peer dependency.\n */\nexport const DatePicker = forwardRef<HTMLInputElement, DatePickerProps>(function DatePicker(\n {\n label,\n size = 'md',\n error,\n helperText,\n required = false,\n fullWidth = true,\n disabled = false,\n value,\n defaultValue,\n onChange,\n format = 'DD/MM/YYYY',\n valueFormat = 'YYYY-MM-DDTHH:mm:ss',\n placeholder,\n min,\n max,\n disabledDate,\n weekStartsOn = 1,\n clearable = true,\n name,\n id: idProp,\n className,\n style,\n },\n ref,\n) {\n const t = useT()\n const reactId = useId()\n const id = idProp ?? reactId\n const helperId = `${id}-helper`\n const labelId = `${id}-label`\n\n // ── value (controlled / form-bound / uncontrolled) — ISO 'YYYY-MM-DD' ──────────────────────────\n const form = useFormContext()\n const isFormBound = Boolean(form && name)\n const bound = isFormBound ? form!.field(name!) : undefined\n const externalValue =\n value !== undefined\n ? value\n : isFormBound\n ? ((form!.values[name!] as string | undefined) ?? '')\n : undefined\n const isControlled = value !== undefined || isFormBound\n const [internal, setInternal] = useState<string>(defaultValue ?? '')\n const currentValue = isControlled ? externalValue! : internal\n const selected = parseValue(currentValue, valueFormat)\n\n const resolvedError = error ?? bound?.error ?? false\n const resolvedHelperText = helperText ?? bound?.helperText\n\n const minDate = parseISO(min)\n const maxDate = parseISO(max)\n const mask = maskFromFormat(format)\n\n const commit = (next: string) => {\n if (next === currentValue) return // skip redundant onChange / setValue with an unchanged value\n if (!isControlled) setInternal(next)\n if (isFormBound) form!.setValue(name!, next)\n onChange?.(next)\n }\n\n // emit a chosen day in the wire `valueFormat` (start of the UTC day), or '' to clear\n const commitDate = (d: Dayjs | null) => commit(d ? formatValue(d, valueFormat) : '')\n\n // true when `d` is a different calendar day than the current value — gates commits so a no-op\n // round-trip (e.g. focusing then blurring) never rewrites an unchanged value's time to midnight\n const dayChanged = (d: Dayjs) => !selected || !d.isSame(selected, 'day')\n\n // input display text (kept in sync with the committed value; free while typing an incomplete date)\n const [inputText, setInputText] = useState<string>(() =>\n selected ? selected.format(format) : '',\n )\n useEffect(() => {\n setInputText(selected ? selected.format(format) : '')\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentValue, format, valueFormat])\n\n // ── popover ────────────────────────────────────────────────────────────────────────────────────\n const triggerRef = useRef<HTMLDivElement | null>(null)\n const inputRef = useRef<HTMLInputElement | null>(null)\n const [open, setOpen] = useState(false)\n const [viewMonth, setViewMonth] = useState<Dayjs>(() => selected ?? today())\n\n const setInputRef = useCallback(\n (node: HTMLInputElement | null) => {\n inputRef.current = node\n if (typeof ref === 'function') ref(node)\n else if (ref) (ref as { current: HTMLInputElement | null }).current = node\n },\n [ref],\n )\n\n // keep the form's blur handler live for the stable closePopover (`bound` is recreated each render)\n const fieldBlurRef = useRef<(() => void) | undefined>(undefined)\n fieldBlurRef.current = bound ? () => bound.onBlur({} as FocusEvent<HTMLInputElement>) : undefined\n\n // the floating panel forwards its node here, for the focus-leaves-the-widget check on blur\n const popoverRef = useRef<HTMLDivElement | null>(null)\n\n const closePopover = useCallback((refocus: boolean) => {\n setOpen(false)\n fieldBlurRef.current?.()\n if (refocus) inputRef.current?.focus()\n }, [])\n\n // when opening, sync the calendar to the selected date (or today)\n useEffect(() => {\n if (open) setViewMonth(selected ?? today())\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open])\n\n const handleInputChange = (raw: string) => {\n const masked = applyMask(raw, mask)\n setInputText(masked)\n if (masked === '') {\n commit('') // emptying the field clears the value\n return\n }\n const parsed = parseInput(masked, format)\n // commit only a complete, valid, in-range, enabled date that changes the day\n if (parsed && !isOutOfRange(parsed) && dayChanged(parsed)) commitDate(parsed)\n }\n\n const isOutOfRange = (d: Dayjs): boolean => {\n if (minDate && d.isBefore(minDate, 'day')) return true\n if (maxDate && d.isAfter(maxDate, 'day')) return true\n return Boolean(disabledDate && disabledDate(toISO(d)))\n }\n\n const handleInputBlur = (event: FocusEvent<HTMLInputElement>) => {\n // re-format from the committed value (drops half-typed / invalid text); fires the form's touched\n const parsed = parseInput(inputText, format)\n if (inputText === '') {\n commit('') // an emptied field stays cleared (don't restore the old date)\n } else if (parsed && !isOutOfRange(parsed)) {\n if (dayChanged(parsed)) commitDate(parsed)\n setInputText(parsed.format(format))\n } else {\n setInputText(selected ? selected.format(format) : '')\n }\n // only mark touched when focus leaves the whole widget (not into the popover)\n const nextEl = event.relatedTarget as Node | null\n if (nextEl && (popoverRef.current?.contains(nextEl) || triggerRef.current?.contains(nextEl)))\n return\n bound?.onBlur(event)\n }\n\n const handleSelect = (iso: string) => {\n const picked = parseISO(iso)\n if (picked && dayChanged(picked)) commitDate(picked) // re-picking the same day preserves its value\n closePopover(true)\n }\n\n const iconSize: 'sm' | 'md' = size === 'sm' ? 'sm' : 'md'\n\n return (\n <div\n className={clsx(\n styles.field,\n styles[size],\n fullWidth && styles.fullWidth,\n resolvedError && styles.error,\n disabled && styles.disabled,\n className,\n )}\n style={style}\n >\n {label != null && (\n <label htmlFor={id} className={styles.label}>\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {label}\n </Typography>\n {required && (\n <span className={styles.required} aria-hidden=\"true\">\n *\n </span>\n )}\n </label>\n )}\n\n <div ref={triggerRef} className={clsx(styles.control, open && styles.open)}>\n <input\n ref={setInputRef}\n id={id}\n name={name}\n className={styles.input}\n value={inputText}\n placeholder={placeholder ?? format.toLowerCase()}\n disabled={disabled}\n inputMode=\"numeric\"\n autoComplete=\"off\"\n aria-invalid={resolvedError || undefined}\n aria-describedby={resolvedHelperText != null ? helperId : undefined}\n onChange={(e) => handleInputChange(e.target.value)}\n onBlur={handleInputBlur}\n />\n\n {clearable && currentValue !== '' && !disabled && (\n <button\n type=\"button\"\n className={styles.clear}\n aria-label={t('datePicker.clear')}\n tabIndex={-1}\n onMouseDown={(e) => e.preventDefault()}\n onClick={() => {\n commit('')\n setInputText('')\n inputRef.current?.focus()\n }}\n >\n <Icon name=\"CloseCircle\" size=\"sm\" />\n </button>\n )}\n\n <IconButton\n type=\"button\"\n variant=\"text\"\n color=\"primary\"\n size={size}\n disabled={disabled}\n aria-label={t('datePicker.open')}\n aria-haspopup=\"dialog\"\n aria-expanded={open}\n className={styles.calendarButton}\n onMouseDown={(e) => e.preventDefault()}\n onClick={() => setOpen((o) => !o)}\n >\n <Icon name=\"Calendar3\" size={iconSize} />\n </IconButton>\n </div>\n\n <FloatingPanel\n ref={popoverRef}\n open={open}\n triggerRef={triggerRef}\n onClose={closePopover}\n role=\"dialog\"\n ariaLabel=\"Choose date\"\n trapFocus\n className={styles.popover}\n >\n <Calendar\n value={selected}\n month={viewMonth}\n onMonthChange={setViewMonth}\n onSelect={handleSelect}\n min={minDate}\n max={maxDate}\n disabledDate={disabledDate}\n weekStartsOn={weekStartsOn}\n autoFocus\n labelId={labelId}\n />\n </FloatingPanel>\n\n {resolvedHelperText != null && (\n <Typography\n as=\"span\"\n id={helperId}\n variant=\"bodySmall\"\n color={resolvedError ? 'error' : 'muted'}\n className={styles.helper}\n >\n {resolvedHelperText}\n </Typography>\n )}\n </div>\n )\n})\n"],"names":["DatePicker","forwardRef","label","size","error","helperText","required","fullWidth","disabled","value","defaultValue","onChange","format","valueFormat","placeholder","min","max","disabledDate","weekStartsOn","clearable","name","idProp","className","style","ref","t","useT","reactId","useId","id","helperId","labelId","form","useFormContext","isFormBound","bound","externalValue","isControlled","internal","setInternal","useState","currentValue","selected","parseValue","resolvedError","resolvedHelperText","minDate","parseISO","maxDate","mask","maskFromFormat","commit","next","commitDate","d","formatValue","dayChanged","inputText","setInputText","useEffect","triggerRef","useRef","inputRef","open","setOpen","viewMonth","setViewMonth","today","setInputRef","useCallback","node","fieldBlurRef","popoverRef","closePopover","refocus","_a","_b","handleInputChange","raw","masked","applyMask","parsed","parseInput","isOutOfRange","toISO","handleInputBlur","event","nextEl","handleSelect","iso","picked","iconSize","jsxs","clsx","styles","jsx","Typography","Icon","IconButton","o","FloatingPanel","Calendar"],"mappings":"2ZAkGaA,GAAaC,EAAAA,WAA8C,SACtE,CACE,MAAAC,EACA,KAAAC,EAAO,KACP,MAAAC,EACA,W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