@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.
Files changed (943) hide show
  1. package/dist/Accordion-CAxa1I-m.js +112 -0
  2. package/dist/Accordion-CAxa1I-m.js.map +1 -0
  3. package/dist/Accordion-Dy_dM79Y.cjs +2 -0
  4. package/dist/Accordion-Dy_dM79Y.cjs.map +1 -0
  5. package/dist/Alert-BQpA48PY.js +71 -0
  6. package/dist/Alert-BQpA48PY.js.map +1 -0
  7. package/dist/Alert-DKIjM-9x.cjs +2 -0
  8. package/dist/Alert-DKIjM-9x.cjs.map +1 -0
  9. package/dist/Avatar-BJVCdo-K.js +60 -0
  10. package/dist/Avatar-BJVCdo-K.js.map +1 -0
  11. package/dist/Avatar-_ufXh3AY.cjs +2 -0
  12. package/dist/Avatar-_ufXh3AY.cjs.map +1 -0
  13. package/dist/AvatarGroup-DdJf4aT7.js +33 -0
  14. package/dist/AvatarGroup-DdJf4aT7.js.map +1 -0
  15. package/dist/AvatarGroup-TW1pt4tj.cjs +2 -0
  16. package/dist/AvatarGroup-TW1pt4tj.cjs.map +1 -0
  17. package/dist/Badge-BQpr2Jee.cjs +2 -0
  18. package/dist/Badge-BQpr2Jee.cjs.map +1 -0
  19. package/dist/Badge-DSWigoGC.js +50 -0
  20. package/dist/Badge-DSWigoGC.js.map +1 -0
  21. package/dist/Breadcrumbs-Bx5UgwDy.js +35 -0
  22. package/dist/Breadcrumbs-Bx5UgwDy.js.map +1 -0
  23. package/dist/Breadcrumbs-CHONper7.cjs +2 -0
  24. package/dist/Breadcrumbs-CHONper7.cjs.map +1 -0
  25. package/dist/Button-D4bfVNNa.cjs +2 -0
  26. package/dist/Button-D4bfVNNa.cjs.map +1 -0
  27. package/dist/Button-DhEv0YFk.js +72 -0
  28. package/dist/Button-DhEv0YFk.js.map +1 -0
  29. package/dist/Calendar-Bh317SaV.js +267 -0
  30. package/dist/Calendar-Bh317SaV.js.map +1 -0
  31. package/dist/Calendar-C8uNezI-.cjs +2 -0
  32. package/dist/Calendar-C8uNezI-.cjs.map +1 -0
  33. package/dist/Card-CfyaerZZ.cjs +2 -0
  34. package/dist/Card-CfyaerZZ.cjs.map +1 -0
  35. package/dist/Card-DzClqJuu.js +118 -0
  36. package/dist/Card-DzClqJuu.js.map +1 -0
  37. package/dist/Checkbox-DXOzYIAz.cjs +2 -0
  38. package/dist/Checkbox-DXOzYIAz.cjs.map +1 -0
  39. package/dist/Checkbox-XKL_Q5qj.js +84 -0
  40. package/dist/Checkbox-XKL_Q5qj.js.map +1 -0
  41. package/dist/Chip-Cfo0v3Z8.js +92 -0
  42. package/dist/Chip-Cfo0v3Z8.js.map +1 -0
  43. package/dist/Chip-DSrdXLBU.cjs +2 -0
  44. package/dist/Chip-DSrdXLBU.cjs.map +1 -0
  45. package/dist/ChoiceCardGroup-6eFM1eL0.cjs +2 -0
  46. package/dist/ChoiceCardGroup-6eFM1eL0.cjs.map +1 -0
  47. package/dist/ChoiceCardGroup-CvFzZlgI.js +181 -0
  48. package/dist/ChoiceCardGroup-CvFzZlgI.js.map +1 -0
  49. package/dist/CodeBlock-DOk5wekc.cjs +2 -0
  50. package/dist/CodeBlock-DOk5wekc.cjs.map +1 -0
  51. package/dist/CodeBlock-n3KExtTO.js +104 -0
  52. package/dist/CodeBlock-n3KExtTO.js.map +1 -0
  53. package/dist/Col-D2TfZKiM.js +13 -0
  54. package/dist/Col-D2TfZKiM.js.map +1 -0
  55. package/dist/Col-R5mAy8T9.cjs +2 -0
  56. package/dist/Col-R5mAy8T9.cjs.map +1 -0
  57. package/dist/ColorPicker-2udt1ORM.js +119 -0
  58. package/dist/ColorPicker-2udt1ORM.js.map +1 -0
  59. package/dist/ColorPicker-BwmaXCOy.cjs +2 -0
  60. package/dist/ColorPicker-BwmaXCOy.cjs.map +1 -0
  61. package/dist/ColorPickerPanel-BM9OwDDE.js +336 -0
  62. package/dist/ColorPickerPanel-BM9OwDDE.js.map +1 -0
  63. package/dist/ColorPickerPanel-ByB1mLSi.cjs +2 -0
  64. package/dist/ColorPickerPanel-ByB1mLSi.cjs.map +1 -0
  65. package/dist/ConfigProvider-2c94kUOk.js +291 -0
  66. package/dist/ConfigProvider-2c94kUOk.js.map +1 -0
  67. package/dist/ConfigProvider-ByOFXVyP.cjs +2 -0
  68. package/dist/ConfigProvider-ByOFXVyP.cjs.map +1 -0
  69. package/dist/DatePicker-DF4Epkn8.cjs +2 -0
  70. package/dist/DatePicker-DF4Epkn8.cjs.map +1 -0
  71. package/dist/DatePicker-WM9TC6L_.js +191 -0
  72. package/dist/DatePicker-WM9TC6L_.js.map +1 -0
  73. package/dist/DatePicker.module-BZDftL4g.js +138 -0
  74. package/dist/DatePicker.module-BZDftL4g.js.map +1 -0
  75. package/dist/DatePicker.module-tE-tGNBd.cjs +2 -0
  76. package/dist/DatePicker.module-tE-tGNBd.cjs.map +1 -0
  77. package/dist/DateTimePicker-C557OjBU.cjs +2 -0
  78. package/dist/DateTimePicker-C557OjBU.cjs.map +1 -0
  79. package/dist/DateTimePicker-DBtcWK0F.js +245 -0
  80. package/dist/DateTimePicker-DBtcWK0F.js.map +1 -0
  81. package/dist/Divider-CzbhdCiD.cjs +2 -0
  82. package/dist/Divider-CzbhdCiD.cjs.map +1 -0
  83. package/dist/Divider-LtH3dLgw.js +36 -0
  84. package/dist/Divider-LtH3dLgw.js.map +1 -0
  85. package/dist/Dropdown-DKAXue5_.js +146 -0
  86. package/dist/Dropdown-DKAXue5_.js.map +1 -0
  87. package/dist/Dropdown-DygP50OB.cjs +2 -0
  88. package/dist/Dropdown-DygP50OB.cjs.map +1 -0
  89. package/dist/EmptyState-CCCpZ-ZA.cjs +2 -0
  90. package/dist/EmptyState-CCCpZ-ZA.cjs.map +1 -0
  91. package/dist/EmptyState-CetM49vk.js +38 -0
  92. package/dist/EmptyState-CetM49vk.js.map +1 -0
  93. package/dist/FileUploader-B4TJHyoi.cjs +2 -0
  94. package/dist/FileUploader-B4TJHyoi.cjs.map +1 -0
  95. package/dist/FileUploader-VtmmwUFE.js +684 -0
  96. package/dist/FileUploader-VtmmwUFE.js.map +1 -0
  97. package/dist/Flag-BWCX6oSR.js +24 -0
  98. package/dist/Flag-BWCX6oSR.js.map +1 -0
  99. package/dist/Flag-EPZOrH-U.cjs +2 -0
  100. package/dist/Flag-EPZOrH-U.cjs.map +1 -0
  101. package/dist/Flex-Bj3mMF5A.js +50 -0
  102. package/dist/Flex-Bj3mMF5A.js.map +1 -0
  103. package/dist/Flex-CqL3Ghda.cjs +2 -0
  104. package/dist/Flex-CqL3Ghda.cjs.map +1 -0
  105. package/dist/FloatingPanel-BG9Uag__.js +131 -0
  106. package/dist/FloatingPanel-BG9Uag__.js.map +1 -0
  107. package/dist/FloatingPanel-U6sGYiSK.cjs +2 -0
  108. package/dist/FloatingPanel-U6sGYiSK.cjs.map +1 -0
  109. package/dist/Form-Bz2xgkEm.cjs +2 -0
  110. package/dist/Form-Bz2xgkEm.cjs.map +1 -0
  111. package/dist/Form-kglaJYr5.js +9 -0
  112. package/dist/Form-kglaJYr5.js.map +1 -0
  113. package/dist/FullscreenToggle-DDKN5n8B.cjs +2 -0
  114. package/dist/FullscreenToggle-DDKN5n8B.cjs.map +1 -0
  115. package/dist/FullscreenToggle-oWzYqUPH.js +42 -0
  116. package/dist/FullscreenToggle-oWzYqUPH.js.map +1 -0
  117. package/dist/Grid-Bw95bKkJ.cjs +2 -0
  118. package/dist/Grid-Bw95bKkJ.cjs.map +1 -0
  119. package/dist/Grid-CY-syhTX.js +24 -0
  120. package/dist/Grid-CY-syhTX.js.map +1 -0
  121. package/dist/Icon-CXTl_QAP.cjs +2 -0
  122. package/dist/Icon-CXTl_QAP.cjs.map +1 -0
  123. package/dist/Icon-CophpkHo.js +1228 -0
  124. package/dist/Icon-CophpkHo.js.map +1 -0
  125. package/dist/IconButton-CBusrDa9.js +68 -0
  126. package/dist/IconButton-CBusrDa9.js.map +1 -0
  127. package/dist/IconButton-D6TenQZ_.cjs +2 -0
  128. package/dist/IconButton-D6TenQZ_.cjs.map +1 -0
  129. package/dist/List-BHgFI9Ll.js +26 -0
  130. package/dist/List-BHgFI9Ll.js.map +1 -0
  131. package/dist/List-CNz2M3-q.cjs +2 -0
  132. package/dist/List-CNz2M3-q.cjs.map +1 -0
  133. package/dist/ListItem-B4yqZR-Z.js +74 -0
  134. package/dist/ListItem-B4yqZR-Z.js.map +1 -0
  135. package/dist/ListItem-RH-D-Wey.cjs +2 -0
  136. package/dist/ListItem-RH-D-Wey.cjs.map +1 -0
  137. package/dist/Loader-C4JoXOyA.js +28 -0
  138. package/dist/Loader-C4JoXOyA.js.map +1 -0
  139. package/dist/Loader-D1MtlQOH.cjs +2 -0
  140. package/dist/Loader-D1MtlQOH.cjs.map +1 -0
  141. package/dist/Modal-B2YSCVVt.cjs +2 -0
  142. package/dist/Modal-B2YSCVVt.cjs.map +1 -0
  143. package/dist/Modal-BuaPDlKV.js +195 -0
  144. package/dist/Modal-BuaPDlKV.js.map +1 -0
  145. package/dist/MultiSelect-BGRT_B60.js +350 -0
  146. package/dist/MultiSelect-BGRT_B60.js.map +1 -0
  147. package/dist/MultiSelect-CSJKSWpA.cjs +2 -0
  148. package/dist/MultiSelect-CSJKSWpA.cjs.map +1 -0
  149. package/dist/MultilineTextField-CwNCJ9lZ.js +123 -0
  150. package/dist/MultilineTextField-CwNCJ9lZ.js.map +1 -0
  151. package/dist/MultilineTextField-Dz6Fg8RJ.cjs +2 -0
  152. package/dist/MultilineTextField-Dz6Fg8RJ.cjs.map +1 -0
  153. package/dist/NumberField-DBpO-Z_7.cjs +2 -0
  154. package/dist/NumberField-DBpO-Z_7.cjs.map +1 -0
  155. package/dist/NumberField-DBvhSQCw.js +183 -0
  156. package/dist/NumberField-DBvhSQCw.js.map +1 -0
  157. package/dist/OtpField-BUBYyorC.cjs +2 -0
  158. package/dist/OtpField-BUBYyorC.cjs.map +1 -0
  159. package/dist/OtpField-CTq-CUbF.js +171 -0
  160. package/dist/OtpField-CTq-CUbF.js.map +1 -0
  161. package/dist/PageLayout-DddzYw2B.js +12 -0
  162. package/dist/PageLayout-DddzYw2B.js.map +1 -0
  163. package/dist/PageLayout-Dfbjw6jD.cjs +2 -0
  164. package/dist/PageLayout-Dfbjw6jD.cjs.map +1 -0
  165. package/dist/Pagination-CN9V8M5C.js +139 -0
  166. package/dist/Pagination-CN9V8M5C.js.map +1 -0
  167. package/dist/Pagination-DRwTLPh8.cjs +2 -0
  168. package/dist/Pagination-DRwTLPh8.cjs.map +1 -0
  169. package/dist/Popover-CBI1icIM.cjs +2 -0
  170. package/dist/Popover-CBI1icIM.cjs.map +1 -0
  171. package/dist/Popover-CgIU4Rhg.js +65 -0
  172. package/dist/Popover-CgIU4Rhg.js.map +1 -0
  173. package/dist/RadioGroup-C8u7eNBS.cjs +2 -0
  174. package/dist/RadioGroup-C8u7eNBS.cjs.map +1 -0
  175. package/dist/RadioGroup-DbodUJW8.js +141 -0
  176. package/dist/RadioGroup-DbodUJW8.js.map +1 -0
  177. package/dist/RemoveDialog-Bvt6sH79.js +47 -0
  178. package/dist/RemoveDialog-Bvt6sH79.js.map +1 -0
  179. package/dist/RemoveDialog-ClyZKyUG.cjs +2 -0
  180. package/dist/RemoveDialog-ClyZKyUG.cjs.map +1 -0
  181. package/dist/RichTextEditor-BTx8Py3I.js +806 -0
  182. package/dist/RichTextEditor-BTx8Py3I.js.map +1 -0
  183. package/dist/RichTextEditor-CAYt1Zm1.cjs +2 -0
  184. package/dist/RichTextEditor-CAYt1Zm1.cjs.map +1 -0
  185. package/dist/RootLayout-Cp-9CVjP.cjs +2 -0
  186. package/dist/RootLayout-Cp-9CVjP.cjs.map +1 -0
  187. package/dist/RootLayout-DCpfuFWF.js +405 -0
  188. package/dist/RootLayout-DCpfuFWF.js.map +1 -0
  189. package/dist/Select-PbTyxB1Q.js +338 -0
  190. package/dist/Select-PbTyxB1Q.js.map +1 -0
  191. package/dist/Select-_6WogC0u.cjs +2 -0
  192. package/dist/Select-_6WogC0u.cjs.map +1 -0
  193. package/dist/Sidebar-AaIlRzgk.cjs +2 -0
  194. package/dist/Sidebar-AaIlRzgk.cjs.map +1 -0
  195. package/dist/Sidebar-DRCs2ygZ.js +422 -0
  196. package/dist/Sidebar-DRCs2ygZ.js.map +1 -0
  197. package/dist/Slider-dxYVXRev.cjs +2 -0
  198. package/dist/Slider-dxYVXRev.cjs.map +1 -0
  199. package/dist/Slider-oGXd5e9X.js +184 -0
  200. package/dist/Slider-oGXd5e9X.js.map +1 -0
  201. package/dist/SpeedDial-C4jxIXTr.cjs +2 -0
  202. package/dist/SpeedDial-C4jxIXTr.cjs.map +1 -0
  203. package/dist/SpeedDial-DgFj16BQ.js +165 -0
  204. package/dist/SpeedDial-DgFj16BQ.js.map +1 -0
  205. package/dist/Stepper-7pPEBRLI.cjs +2 -0
  206. package/dist/Stepper-7pPEBRLI.cjs.map +1 -0
  207. package/dist/Stepper-COKAyN1L.js +165 -0
  208. package/dist/Stepper-COKAyN1L.js.map +1 -0
  209. package/dist/SwatchPicker-D30aSrbY.js +129 -0
  210. package/dist/SwatchPicker-D30aSrbY.js.map +1 -0
  211. package/dist/SwatchPicker-DbAU9-ux.cjs +2 -0
  212. package/dist/SwatchPicker-DbAU9-ux.cjs.map +1 -0
  213. package/dist/Switch-DMPJ0fhB.js +85 -0
  214. package/dist/Switch-DMPJ0fhB.js.map +1 -0
  215. package/dist/Switch-DRkZ6kHJ.cjs +2 -0
  216. package/dist/Switch-DRkZ6kHJ.cjs.map +1 -0
  217. package/dist/Table-BeOumGng.cjs +2 -0
  218. package/dist/Table-BeOumGng.cjs.map +1 -0
  219. package/dist/Table-BjPLvMbf.js +1090 -0
  220. package/dist/Table-BjPLvMbf.js.map +1 -0
  221. package/dist/Tabs--DDM-zKe.js +190 -0
  222. package/dist/Tabs--DDM-zKe.js.map +1 -0
  223. package/dist/Tabs-BZcMnjdC.cjs +2 -0
  224. package/dist/Tabs-BZcMnjdC.cjs.map +1 -0
  225. package/dist/TagsField-BTJcZS9P.js +186 -0
  226. package/dist/TagsField-BTJcZS9P.js.map +1 -0
  227. package/dist/TagsField-kknWiJZZ.cjs +2 -0
  228. package/dist/TagsField-kknWiJZZ.cjs.map +1 -0
  229. package/dist/TextField-BPefnD5M.cjs +2 -0
  230. package/dist/TextField-BPefnD5M.cjs.map +1 -0
  231. package/dist/TextField-DMI1X09n.js +266 -0
  232. package/dist/TextField-DMI1X09n.js.map +1 -0
  233. package/dist/TextField.module-QePvGeJ3.js +27 -0
  234. package/dist/TextField.module-QePvGeJ3.js.map +1 -0
  235. package/dist/TextField.module-m-UllwzG.cjs +2 -0
  236. package/dist/TextField.module-m-UllwzG.cjs.map +1 -0
  237. package/dist/ThemeToggle-DTal3RX5.cjs +2 -0
  238. package/dist/ThemeToggle-DTal3RX5.cjs.map +1 -0
  239. package/dist/ThemeToggle-Deh9j8pm.js +28 -0
  240. package/dist/ThemeToggle-Deh9j8pm.js.map +1 -0
  241. package/dist/TimeColumns-BCNmu4b_.js +147 -0
  242. package/dist/TimeColumns-BCNmu4b_.js.map +1 -0
  243. package/dist/TimeColumns-Duh4DcYJ.cjs +2 -0
  244. package/dist/TimeColumns-Duh4DcYJ.cjs.map +1 -0
  245. package/dist/TimePicker-3JgvK2on.js +194 -0
  246. package/dist/TimePicker-3JgvK2on.js.map +1 -0
  247. package/dist/TimePicker-CfGrCH9T.cjs +2 -0
  248. package/dist/TimePicker-CfGrCH9T.cjs.map +1 -0
  249. package/dist/Timeline-CoxW0Ia_.cjs +2 -0
  250. package/dist/Timeline-CoxW0Ia_.cjs.map +1 -0
  251. package/dist/Timeline-WkV4k_we.js +71 -0
  252. package/dist/Timeline-WkV4k_we.js.map +1 -0
  253. package/dist/Toaster-Bk5GtPjX.cjs +2 -0
  254. package/dist/Toaster-Bk5GtPjX.cjs.map +1 -0
  255. package/dist/Toaster-D-eG1xv7.js +63 -0
  256. package/dist/Toaster-D-eG1xv7.js.map +1 -0
  257. package/dist/ToggleButtonGroup-BWd7MOcc.js +123 -0
  258. package/dist/ToggleButtonGroup-BWd7MOcc.js.map +1 -0
  259. package/dist/ToggleButtonGroup-DYRLwKKh.cjs +2 -0
  260. package/dist/ToggleButtonGroup-DYRLwKKh.cjs.map +1 -0
  261. package/dist/Tooltip-Ao7az09p.cjs +2 -0
  262. package/dist/Tooltip-Ao7az09p.cjs.map +1 -0
  263. package/dist/Tooltip-Cb_FKxT9.js +65 -0
  264. package/dist/Tooltip-Cb_FKxT9.js.map +1 -0
  265. package/dist/TranslatedFields-CI0F9bHw.js +82 -0
  266. package/dist/TranslatedFields-CI0F9bHw.js.map +1 -0
  267. package/dist/TranslatedFields-DT3bYse6.cjs +2 -0
  268. package/dist/TranslatedFields-DT3bYse6.cjs.map +1 -0
  269. package/dist/Typography-BFatE1_A.cjs +2 -0
  270. package/dist/Typography-BFatE1_A.cjs.map +1 -0
  271. package/dist/Typography-Cta6Rg4L.js +51 -0
  272. package/dist/Typography-Cta6Rg4L.js.map +1 -0
  273. package/dist/UserCard-BhqtX1vU.js +74 -0
  274. package/dist/UserCard-BhqtX1vU.js.map +1 -0
  275. package/dist/UserCard-OlLeyyS0.cjs +2 -0
  276. package/dist/UserCard-OlLeyyS0.cjs.map +1 -0
  277. package/dist/access-DPUHbE-S.cjs +2 -0
  278. package/dist/access-DPUHbE-S.cjs.map +1 -0
  279. package/dist/access-Db4knwyR.js +25 -0
  280. package/dist/access-Db4knwyR.js.map +1 -0
  281. package/dist/components/Accordion/Accordion.d.cts +43 -0
  282. package/dist/components/Accordion/Accordion.d.ts +43 -0
  283. package/dist/components/Accordion/AccordionItem.d.cts +20 -0
  284. package/dist/components/Accordion/AccordionItem.d.ts +20 -0
  285. package/dist/components/Accordion/accordionContext.d.cts +13 -0
  286. package/dist/components/Accordion/accordionContext.d.ts +13 -0
  287. package/dist/components/Accordion/index.cjs +2 -0
  288. package/dist/components/Accordion/index.cjs.map +1 -0
  289. package/dist/components/Accordion/index.d.cts +4 -0
  290. package/dist/components/Accordion/index.d.ts +4 -0
  291. package/dist/components/Accordion/index.js +7 -0
  292. package/dist/components/Accordion/index.js.map +1 -0
  293. package/dist/components/Alert/Alert.d.cts +30 -0
  294. package/dist/components/Alert/Alert.d.ts +30 -0
  295. package/dist/components/Alert/index.cjs +2 -0
  296. package/dist/components/Alert/index.cjs.map +1 -0
  297. package/dist/components/Alert/index.d.cts +2 -0
  298. package/dist/components/Alert/index.d.ts +2 -0
  299. package/dist/components/Alert/index.js +6 -0
  300. package/dist/components/Alert/index.js.map +1 -0
  301. package/dist/components/Avatar/Avatar.d.cts +28 -0
  302. package/dist/components/Avatar/Avatar.d.ts +28 -0
  303. package/dist/components/Avatar/AvatarGroup.d.cts +19 -0
  304. package/dist/components/Avatar/AvatarGroup.d.ts +19 -0
  305. package/dist/components/Avatar/index.cjs +2 -0
  306. package/dist/components/Avatar/index.cjs.map +1 -0
  307. package/dist/components/Avatar/index.d.cts +4 -0
  308. package/dist/components/Avatar/index.d.ts +4 -0
  309. package/dist/components/Avatar/index.js +8 -0
  310. package/dist/components/Avatar/index.js.map +1 -0
  311. package/dist/components/Badge/Badge.d.cts +26 -0
  312. package/dist/components/Badge/Badge.d.ts +26 -0
  313. package/dist/components/Badge/index.cjs +2 -0
  314. package/dist/components/Badge/index.cjs.map +1 -0
  315. package/dist/components/Badge/index.d.cts +2 -0
  316. package/dist/components/Badge/index.d.ts +2 -0
  317. package/dist/components/Badge/index.js +6 -0
  318. package/dist/components/Badge/index.js.map +1 -0
  319. package/dist/components/Breadcrumbs/Breadcrumbs.d.cts +17 -0
  320. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +17 -0
  321. package/dist/components/Breadcrumbs/index.cjs +2 -0
  322. package/dist/components/Breadcrumbs/index.cjs.map +1 -0
  323. package/dist/components/Breadcrumbs/index.d.cts +2 -0
  324. package/dist/components/Breadcrumbs/index.d.ts +2 -0
  325. package/dist/components/Breadcrumbs/index.js +6 -0
  326. package/dist/components/Breadcrumbs/index.js.map +1 -0
  327. package/dist/components/Button/Button.d.cts +23 -0
  328. package/dist/components/Button/Button.d.ts +23 -0
  329. package/dist/components/Button/index.cjs +2 -0
  330. package/dist/components/Button/index.cjs.map +1 -0
  331. package/dist/components/Button/index.d.cts +2 -0
  332. package/dist/components/Button/index.d.ts +2 -0
  333. package/dist/components/Button/index.js +6 -0
  334. package/dist/components/Button/index.js.map +1 -0
  335. package/dist/components/Card/Card.d.cts +37 -0
  336. package/dist/components/Card/Card.d.ts +37 -0
  337. package/dist/components/Card/index.cjs +2 -0
  338. package/dist/components/Card/index.cjs.map +1 -0
  339. package/dist/components/Card/index.d.cts +2 -0
  340. package/dist/components/Card/index.d.ts +2 -0
  341. package/dist/components/Card/index.js +6 -0
  342. package/dist/components/Card/index.js.map +1 -0
  343. package/dist/components/Checkbox/Checkbox.d.cts +29 -0
  344. package/dist/components/Checkbox/Checkbox.d.ts +29 -0
  345. package/dist/components/Checkbox/index.cjs +2 -0
  346. package/dist/components/Checkbox/index.cjs.map +1 -0
  347. package/dist/components/Checkbox/index.d.cts +2 -0
  348. package/dist/components/Checkbox/index.d.ts +2 -0
  349. package/dist/components/Checkbox/index.js +6 -0
  350. package/dist/components/Checkbox/index.js.map +1 -0
  351. package/dist/components/Chip/Chip.d.cts +37 -0
  352. package/dist/components/Chip/Chip.d.ts +37 -0
  353. package/dist/components/Chip/index.cjs +2 -0
  354. package/dist/components/Chip/index.cjs.map +1 -0
  355. package/dist/components/Chip/index.d.cts +2 -0
  356. package/dist/components/Chip/index.d.ts +2 -0
  357. package/dist/components/Chip/index.js +6 -0
  358. package/dist/components/Chip/index.js.map +1 -0
  359. package/dist/components/ChoiceCard/ChoiceCard.d.cts +41 -0
  360. package/dist/components/ChoiceCard/ChoiceCard.d.ts +41 -0
  361. package/dist/components/ChoiceCard/ChoiceCardGroup.d.cts +72 -0
  362. package/dist/components/ChoiceCard/ChoiceCardGroup.d.ts +72 -0
  363. package/dist/components/ChoiceCard/choiceCardContext.d.cts +21 -0
  364. package/dist/components/ChoiceCard/choiceCardContext.d.ts +21 -0
  365. package/dist/components/ChoiceCard/index.cjs +2 -0
  366. package/dist/components/ChoiceCard/index.cjs.map +1 -0
  367. package/dist/components/ChoiceCard/index.d.cts +4 -0
  368. package/dist/components/ChoiceCard/index.d.ts +4 -0
  369. package/dist/components/ChoiceCard/index.js +7 -0
  370. package/dist/components/ChoiceCard/index.js.map +1 -0
  371. package/dist/components/CodeBlock/CodeBlock.d.cts +30 -0
  372. package/dist/components/CodeBlock/CodeBlock.d.ts +30 -0
  373. package/dist/components/CodeBlock/index.cjs +2 -0
  374. package/dist/components/CodeBlock/index.cjs.map +1 -0
  375. package/dist/components/CodeBlock/index.d.cts +2 -0
  376. package/dist/components/CodeBlock/index.d.ts +2 -0
  377. package/dist/components/CodeBlock/index.js +6 -0
  378. package/dist/components/CodeBlock/index.js.map +1 -0
  379. package/dist/components/ColorPicker/ColorPicker.d.cts +47 -0
  380. package/dist/components/ColorPicker/ColorPicker.d.ts +47 -0
  381. package/dist/components/ColorPicker/ColorPickerPanel.d.cts +20 -0
  382. package/dist/components/ColorPicker/ColorPickerPanel.d.ts +20 -0
  383. package/dist/components/ColorPicker/colorUtils.d.cts +44 -0
  384. package/dist/components/ColorPicker/colorUtils.d.ts +44 -0
  385. package/dist/components/ColorPicker/index.cjs +2 -0
  386. package/dist/components/ColorPicker/index.cjs.map +1 -0
  387. package/dist/components/ColorPicker/index.d.cts +2 -0
  388. package/dist/components/ColorPicker/index.d.ts +2 -0
  389. package/dist/components/ColorPicker/index.js +6 -0
  390. package/dist/components/ColorPicker/index.js.map +1 -0
  391. package/dist/components/DatePicker/Calendar.d.cts +29 -0
  392. package/dist/components/DatePicker/Calendar.d.ts +29 -0
  393. package/dist/components/DatePicker/DatePicker.d.cts +66 -0
  394. package/dist/components/DatePicker/DatePicker.d.ts +66 -0
  395. package/dist/components/DatePicker/dateUtils.d.cts +86 -0
  396. package/dist/components/DatePicker/dateUtils.d.ts +86 -0
  397. package/dist/components/DatePicker/index.cjs +2 -0
  398. package/dist/components/DatePicker/index.cjs.map +1 -0
  399. package/dist/components/DatePicker/index.d.cts +2 -0
  400. package/dist/components/DatePicker/index.d.ts +2 -0
  401. package/dist/components/DatePicker/index.js +6 -0
  402. package/dist/components/DatePicker/index.js.map +1 -0
  403. package/dist/components/DateTimePicker/DateTimePicker.d.cts +79 -0
  404. package/dist/components/DateTimePicker/DateTimePicker.d.ts +79 -0
  405. package/dist/components/DateTimePicker/TimeColumns.d.cts +22 -0
  406. package/dist/components/DateTimePicker/TimeColumns.d.ts +22 -0
  407. package/dist/components/DateTimePicker/index.cjs +2 -0
  408. package/dist/components/DateTimePicker/index.cjs.map +1 -0
  409. package/dist/components/DateTimePicker/index.d.cts +2 -0
  410. package/dist/components/DateTimePicker/index.d.ts +2 -0
  411. package/dist/components/DateTimePicker/index.js +6 -0
  412. package/dist/components/DateTimePicker/index.js.map +1 -0
  413. package/dist/components/Divider/Divider.d.cts +17 -0
  414. package/dist/components/Divider/Divider.d.ts +17 -0
  415. package/dist/components/Divider/index.cjs +2 -0
  416. package/dist/components/Divider/index.cjs.map +1 -0
  417. package/dist/components/Divider/index.d.cts +2 -0
  418. package/dist/components/Divider/index.d.ts +2 -0
  419. package/dist/components/Divider/index.js +6 -0
  420. package/dist/components/Divider/index.js.map +1 -0
  421. package/dist/components/Dropdown/Dropdown.d.cts +44 -0
  422. package/dist/components/Dropdown/Dropdown.d.ts +44 -0
  423. package/dist/components/Dropdown/index.cjs +2 -0
  424. package/dist/components/Dropdown/index.cjs.map +1 -0
  425. package/dist/components/Dropdown/index.d.cts +2 -0
  426. package/dist/components/Dropdown/index.d.ts +2 -0
  427. package/dist/components/Dropdown/index.js +6 -0
  428. package/dist/components/Dropdown/index.js.map +1 -0
  429. package/dist/components/EmptyState/EmptyState.d.cts +29 -0
  430. package/dist/components/EmptyState/EmptyState.d.ts +29 -0
  431. package/dist/components/EmptyState/index.cjs +2 -0
  432. package/dist/components/EmptyState/index.cjs.map +1 -0
  433. package/dist/components/EmptyState/index.d.cts +2 -0
  434. package/dist/components/EmptyState/index.d.ts +2 -0
  435. package/dist/components/EmptyState/index.js +6 -0
  436. package/dist/components/EmptyState/index.js.map +1 -0
  437. package/dist/components/FileUploader/FileUploader.d.cts +144 -0
  438. package/dist/components/FileUploader/FileUploader.d.ts +144 -0
  439. package/dist/components/FileUploader/FileUploaderEditDialog.d.cts +34 -0
  440. package/dist/components/FileUploader/FileUploaderEditDialog.d.ts +34 -0
  441. package/dist/components/FileUploader/FileUploaderPreview.d.cts +23 -0
  442. package/dist/components/FileUploader/FileUploaderPreview.d.ts +23 -0
  443. package/dist/components/FileUploader/index.cjs +2 -0
  444. package/dist/components/FileUploader/index.cjs.map +1 -0
  445. package/dist/components/FileUploader/index.d.cts +2 -0
  446. package/dist/components/FileUploader/index.d.ts +2 -0
  447. package/dist/components/FileUploader/index.js +6 -0
  448. package/dist/components/FileUploader/index.js.map +1 -0
  449. package/dist/components/Flag/Flag.d.cts +14 -0
  450. package/dist/components/Flag/Flag.d.ts +14 -0
  451. package/dist/components/Flag/index.cjs +2 -0
  452. package/dist/components/Flag/index.cjs.map +1 -0
  453. package/dist/components/Flag/index.d.cts +2 -0
  454. package/dist/components/Flag/index.d.ts +2 -0
  455. package/dist/components/Flag/index.js +6 -0
  456. package/dist/components/Flag/index.js.map +1 -0
  457. package/dist/components/Flex/Col.d.cts +8 -0
  458. package/dist/components/Flex/Col.d.ts +8 -0
  459. package/dist/components/Flex/Flex.d.cts +32 -0
  460. package/dist/components/Flex/Flex.d.ts +32 -0
  461. package/dist/components/Flex/Grid.d.cts +28 -0
  462. package/dist/components/Flex/Grid.d.ts +28 -0
  463. package/dist/components/Flex/Row.d.cts +8 -0
  464. package/dist/components/Flex/Row.d.ts +8 -0
  465. package/dist/components/Flex/index.cjs +2 -0
  466. package/dist/components/Flex/index.cjs.map +1 -0
  467. package/dist/components/Flex/index.d.cts +8 -0
  468. package/dist/components/Flex/index.d.ts +8 -0
  469. package/dist/components/Flex/index.js +11 -0
  470. package/dist/components/Flex/index.js.map +1 -0
  471. package/dist/components/FloatingPanel/FloatingPanel.d.cts +39 -0
  472. package/dist/components/FloatingPanel/FloatingPanel.d.ts +39 -0
  473. package/dist/components/FullscreenToggle/FullscreenToggle.d.cts +12 -0
  474. package/dist/components/FullscreenToggle/FullscreenToggle.d.ts +12 -0
  475. package/dist/components/FullscreenToggle/index.cjs +2 -0
  476. package/dist/components/FullscreenToggle/index.cjs.map +1 -0
  477. package/dist/components/FullscreenToggle/index.d.cts +2 -0
  478. package/dist/components/FullscreenToggle/index.d.ts +2 -0
  479. package/dist/components/FullscreenToggle/index.js +6 -0
  480. package/dist/components/FullscreenToggle/index.js.map +1 -0
  481. package/dist/components/Icon/Icon.d.cts +19 -0
  482. package/dist/components/Icon/Icon.d.ts +19 -0
  483. package/dist/components/Icon/index.cjs +2 -0
  484. package/dist/components/Icon/index.cjs.map +1 -0
  485. package/dist/components/Icon/index.d.cts +4 -0
  486. package/dist/components/Icon/index.d.ts +4 -0
  487. package/dist/components/Icon/index.js +9 -0
  488. package/dist/components/Icon/index.js.map +1 -0
  489. package/dist/components/IconButton/IconButton.d.cts +28 -0
  490. package/dist/components/IconButton/IconButton.d.ts +28 -0
  491. package/dist/components/IconButton/index.cjs +2 -0
  492. package/dist/components/IconButton/index.cjs.map +1 -0
  493. package/dist/components/IconButton/index.d.cts +2 -0
  494. package/dist/components/IconButton/index.d.ts +2 -0
  495. package/dist/components/IconButton/index.js +6 -0
  496. package/dist/components/IconButton/index.js.map +1 -0
  497. package/dist/components/List/List.d.cts +20 -0
  498. package/dist/components/List/List.d.ts +20 -0
  499. package/dist/components/List/ListItem.d.cts +33 -0
  500. package/dist/components/List/ListItem.d.ts +33 -0
  501. package/dist/components/List/index.cjs +2 -0
  502. package/dist/components/List/index.cjs.map +1 -0
  503. package/dist/components/List/index.d.cts +4 -0
  504. package/dist/components/List/index.d.ts +4 -0
  505. package/dist/components/List/index.js +8 -0
  506. package/dist/components/List/index.js.map +1 -0
  507. package/dist/components/List/listContext.d.cts +5 -0
  508. package/dist/components/List/listContext.d.ts +5 -0
  509. package/dist/components/Loader/Loader.d.cts +15 -0
  510. package/dist/components/Loader/Loader.d.ts +15 -0
  511. package/dist/components/Loader/index.cjs +2 -0
  512. package/dist/components/Loader/index.cjs.map +1 -0
  513. package/dist/components/Loader/index.d.cts +2 -0
  514. package/dist/components/Loader/index.d.ts +2 -0
  515. package/dist/components/Loader/index.js +6 -0
  516. package/dist/components/Loader/index.js.map +1 -0
  517. package/dist/components/Modal/Modal.d.cts +63 -0
  518. package/dist/components/Modal/Modal.d.ts +63 -0
  519. package/dist/components/Modal/index.cjs +2 -0
  520. package/dist/components/Modal/index.cjs.map +1 -0
  521. package/dist/components/Modal/index.d.cts +2 -0
  522. package/dist/components/Modal/index.d.ts +2 -0
  523. package/dist/components/Modal/index.js +6 -0
  524. package/dist/components/Modal/index.js.map +1 -0
  525. package/dist/components/MultiSelect/MultiSelect.d.cts +72 -0
  526. package/dist/components/MultiSelect/MultiSelect.d.ts +72 -0
  527. package/dist/components/MultiSelect/index.cjs +2 -0
  528. package/dist/components/MultiSelect/index.cjs.map +1 -0
  529. package/dist/components/MultiSelect/index.d.cts +2 -0
  530. package/dist/components/MultiSelect/index.d.ts +2 -0
  531. package/dist/components/MultiSelect/index.js +6 -0
  532. package/dist/components/MultiSelect/index.js.map +1 -0
  533. package/dist/components/MultilineTextField/MultilineTextField.d.cts +28 -0
  534. package/dist/components/MultilineTextField/MultilineTextField.d.ts +28 -0
  535. package/dist/components/MultilineTextField/index.cjs +2 -0
  536. package/dist/components/MultilineTextField/index.cjs.map +1 -0
  537. package/dist/components/MultilineTextField/index.d.cts +2 -0
  538. package/dist/components/MultilineTextField/index.d.ts +2 -0
  539. package/dist/components/MultilineTextField/index.js +6 -0
  540. package/dist/components/MultilineTextField/index.js.map +1 -0
  541. package/dist/components/NumberField/NumberField.d.cts +45 -0
  542. package/dist/components/NumberField/NumberField.d.ts +45 -0
  543. package/dist/components/NumberField/index.cjs +2 -0
  544. package/dist/components/NumberField/index.cjs.map +1 -0
  545. package/dist/components/NumberField/index.d.cts +2 -0
  546. package/dist/components/NumberField/index.d.ts +2 -0
  547. package/dist/components/NumberField/index.js +6 -0
  548. package/dist/components/NumberField/index.js.map +1 -0
  549. package/dist/components/OtpField/OtpField.d.cts +55 -0
  550. package/dist/components/OtpField/OtpField.d.ts +55 -0
  551. package/dist/components/OtpField/index.cjs +2 -0
  552. package/dist/components/OtpField/index.cjs.map +1 -0
  553. package/dist/components/OtpField/index.d.cts +2 -0
  554. package/dist/components/OtpField/index.d.ts +2 -0
  555. package/dist/components/OtpField/index.js +6 -0
  556. package/dist/components/OtpField/index.js.map +1 -0
  557. package/dist/components/Overlay/Overlay.d.cts +29 -0
  558. package/dist/components/Overlay/Overlay.d.ts +29 -0
  559. package/dist/components/PageLayout/PageLayout.d.cts +13 -0
  560. package/dist/components/PageLayout/PageLayout.d.ts +13 -0
  561. package/dist/components/PageLayout/index.cjs +2 -0
  562. package/dist/components/PageLayout/index.cjs.map +1 -0
  563. package/dist/components/PageLayout/index.d.cts +2 -0
  564. package/dist/components/PageLayout/index.d.ts +2 -0
  565. package/dist/components/PageLayout/index.js +6 -0
  566. package/dist/components/PageLayout/index.js.map +1 -0
  567. package/dist/components/Pagination/Pagination.d.cts +44 -0
  568. package/dist/components/Pagination/Pagination.d.ts +44 -0
  569. package/dist/components/Pagination/index.cjs +2 -0
  570. package/dist/components/Pagination/index.cjs.map +1 -0
  571. package/dist/components/Pagination/index.d.cts +2 -0
  572. package/dist/components/Pagination/index.d.ts +2 -0
  573. package/dist/components/Pagination/index.js +6 -0
  574. package/dist/components/Pagination/index.js.map +1 -0
  575. package/dist/components/Pagination/paginationRange.d.cts +21 -0
  576. package/dist/components/Pagination/paginationRange.d.ts +21 -0
  577. package/dist/components/Popover/Popover.d.cts +43 -0
  578. package/dist/components/Popover/Popover.d.ts +43 -0
  579. package/dist/components/Popover/index.cjs +2 -0
  580. package/dist/components/Popover/index.cjs.map +1 -0
  581. package/dist/components/Popover/index.d.cts +2 -0
  582. package/dist/components/Popover/index.d.ts +2 -0
  583. package/dist/components/Popover/index.js +6 -0
  584. package/dist/components/Popover/index.js.map +1 -0
  585. package/dist/components/Radio/Radio.d.cts +27 -0
  586. package/dist/components/Radio/Radio.d.ts +27 -0
  587. package/dist/components/Radio/RadioGroup.d.cts +47 -0
  588. package/dist/components/Radio/RadioGroup.d.ts +47 -0
  589. package/dist/components/Radio/index.cjs +2 -0
  590. package/dist/components/Radio/index.cjs.map +1 -0
  591. package/dist/components/Radio/index.d.cts +4 -0
  592. package/dist/components/Radio/index.d.ts +4 -0
  593. package/dist/components/Radio/index.js +7 -0
  594. package/dist/components/Radio/index.js.map +1 -0
  595. package/dist/components/Radio/radioContext.d.cts +18 -0
  596. package/dist/components/Radio/radioContext.d.ts +18 -0
  597. package/dist/components/RemoveDialog/RemoveDialog.d.cts +35 -0
  598. package/dist/components/RemoveDialog/RemoveDialog.d.ts +35 -0
  599. package/dist/components/RemoveDialog/index.cjs +2 -0
  600. package/dist/components/RemoveDialog/index.cjs.map +1 -0
  601. package/dist/components/RemoveDialog/index.d.cts +2 -0
  602. package/dist/components/RemoveDialog/index.d.ts +2 -0
  603. package/dist/components/RemoveDialog/index.js +6 -0
  604. package/dist/components/RemoveDialog/index.js.map +1 -0
  605. package/dist/components/RichTextEditor/RichTextEditor.d.cts +48 -0
  606. package/dist/components/RichTextEditor/RichTextEditor.d.ts +48 -0
  607. package/dist/components/RichTextEditor/Toolbar.d.cts +10 -0
  608. package/dist/components/RichTextEditor/Toolbar.d.ts +10 -0
  609. package/dist/components/RichTextEditor/index.cjs +2 -0
  610. package/dist/components/RichTextEditor/index.cjs.map +1 -0
  611. package/dist/components/RichTextEditor/index.d.cts +2 -0
  612. package/dist/components/RichTextEditor/index.d.ts +2 -0
  613. package/dist/components/RichTextEditor/index.js +6 -0
  614. package/dist/components/RichTextEditor/index.js.map +1 -0
  615. package/dist/components/RichTextEditor/nodes/ImageNode.d.cts +33 -0
  616. package/dist/components/RichTextEditor/nodes/ImageNode.d.ts +33 -0
  617. package/dist/components/RichTextEditor/nodes/VideoNode.d.cts +36 -0
  618. package/dist/components/RichTextEditor/nodes/VideoNode.d.ts +36 -0
  619. package/dist/components/RichTextEditor/urlSafety.d.cts +16 -0
  620. package/dist/components/RichTextEditor/urlSafety.d.ts +16 -0
  621. package/dist/components/RootLayout/RootLayout.d.cts +46 -0
  622. package/dist/components/RootLayout/RootLayout.d.ts +46 -0
  623. package/dist/components/RootLayout/SettingsDrawer.d.cts +23 -0
  624. package/dist/components/RootLayout/SettingsDrawer.d.ts +23 -0
  625. package/dist/components/RootLayout/index.cjs +2 -0
  626. package/dist/components/RootLayout/index.cjs.map +1 -0
  627. package/dist/components/RootLayout/index.d.cts +2 -0
  628. package/dist/components/RootLayout/index.d.ts +2 -0
  629. package/dist/components/RootLayout/index.js +6 -0
  630. package/dist/components/RootLayout/index.js.map +1 -0
  631. package/dist/components/Select/Select.d.cts +85 -0
  632. package/dist/components/Select/Select.d.ts +85 -0
  633. package/dist/components/Select/index.cjs +2 -0
  634. package/dist/components/Select/index.cjs.map +1 -0
  635. package/dist/components/Select/index.d.cts +2 -0
  636. package/dist/components/Select/index.d.ts +2 -0
  637. package/dist/components/Select/index.js +6 -0
  638. package/dist/components/Select/index.js.map +1 -0
  639. package/dist/components/Sidebar/Sidebar.d.cts +90 -0
  640. package/dist/components/Sidebar/Sidebar.d.ts +90 -0
  641. package/dist/components/Sidebar/index.cjs +2 -0
  642. package/dist/components/Sidebar/index.cjs.map +1 -0
  643. package/dist/components/Sidebar/index.d.cts +1 -0
  644. package/dist/components/Sidebar/index.d.ts +1 -0
  645. package/dist/components/Sidebar/index.js +7 -0
  646. package/dist/components/Sidebar/index.js.map +1 -0
  647. package/dist/components/Slider/Slider.d.cts +58 -0
  648. package/dist/components/Slider/Slider.d.ts +58 -0
  649. package/dist/components/Slider/index.cjs +2 -0
  650. package/dist/components/Slider/index.cjs.map +1 -0
  651. package/dist/components/Slider/index.d.cts +2 -0
  652. package/dist/components/Slider/index.d.ts +2 -0
  653. package/dist/components/Slider/index.js +6 -0
  654. package/dist/components/Slider/index.js.map +1 -0
  655. package/dist/components/SpeedDial/SpeedDial.d.cts +56 -0
  656. package/dist/components/SpeedDial/SpeedDial.d.ts +56 -0
  657. package/dist/components/SpeedDial/SpeedDialAction.d.cts +18 -0
  658. package/dist/components/SpeedDial/SpeedDialAction.d.ts +18 -0
  659. package/dist/components/SpeedDial/index.cjs +2 -0
  660. package/dist/components/SpeedDial/index.cjs.map +1 -0
  661. package/dist/components/SpeedDial/index.d.cts +4 -0
  662. package/dist/components/SpeedDial/index.d.ts +4 -0
  663. package/dist/components/SpeedDial/index.js +7 -0
  664. package/dist/components/SpeedDial/index.js.map +1 -0
  665. package/dist/components/SpeedDial/speedDialContext.d.cts +19 -0
  666. package/dist/components/SpeedDial/speedDialContext.d.ts +19 -0
  667. package/dist/components/Stepper/Stepper.d.cts +94 -0
  668. package/dist/components/Stepper/Stepper.d.ts +94 -0
  669. package/dist/components/Stepper/index.cjs +2 -0
  670. package/dist/components/Stepper/index.cjs.map +1 -0
  671. package/dist/components/Stepper/index.d.cts +2 -0
  672. package/dist/components/Stepper/index.d.ts +2 -0
  673. package/dist/components/Stepper/index.js +6 -0
  674. package/dist/components/Stepper/index.js.map +1 -0
  675. package/dist/components/SwatchPicker/SwatchPicker.d.cts +43 -0
  676. package/dist/components/SwatchPicker/SwatchPicker.d.ts +43 -0
  677. package/dist/components/SwatchPicker/index.cjs +2 -0
  678. package/dist/components/SwatchPicker/index.cjs.map +1 -0
  679. package/dist/components/SwatchPicker/index.d.cts +2 -0
  680. package/dist/components/SwatchPicker/index.d.ts +2 -0
  681. package/dist/components/SwatchPicker/index.js +6 -0
  682. package/dist/components/SwatchPicker/index.js.map +1 -0
  683. package/dist/components/Switch/Switch.d.cts +29 -0
  684. package/dist/components/Switch/Switch.d.ts +29 -0
  685. package/dist/components/Switch/index.cjs +2 -0
  686. package/dist/components/Switch/index.cjs.map +1 -0
  687. package/dist/components/Switch/index.d.cts +2 -0
  688. package/dist/components/Switch/index.d.ts +2 -0
  689. package/dist/components/Switch/index.js +6 -0
  690. package/dist/components/Switch/index.js.map +1 -0
  691. package/dist/components/Table/Table.d.cts +248 -0
  692. package/dist/components/Table/Table.d.ts +248 -0
  693. package/dist/components/Table/TableFilters.d.cts +16 -0
  694. package/dist/components/Table/TableFilters.d.ts +16 -0
  695. package/dist/components/Table/index.cjs +2 -0
  696. package/dist/components/Table/index.cjs.map +1 -0
  697. package/dist/components/Table/index.d.cts +3 -0
  698. package/dist/components/Table/index.d.ts +3 -0
  699. package/dist/components/Table/index.js +6 -0
  700. package/dist/components/Table/index.js.map +1 -0
  701. package/dist/components/Table/tableFilter.d.cts +65 -0
  702. package/dist/components/Table/tableFilter.d.ts +65 -0
  703. package/dist/components/Tabs/Tabs.d.cts +80 -0
  704. package/dist/components/Tabs/Tabs.d.ts +80 -0
  705. package/dist/components/Tabs/index.cjs +2 -0
  706. package/dist/components/Tabs/index.cjs.map +1 -0
  707. package/dist/components/Tabs/index.d.cts +2 -0
  708. package/dist/components/Tabs/index.d.ts +2 -0
  709. package/dist/components/Tabs/index.js +6 -0
  710. package/dist/components/Tabs/index.js.map +1 -0
  711. package/dist/components/TagsField/TagsField.d.cts +47 -0
  712. package/dist/components/TagsField/TagsField.d.ts +47 -0
  713. package/dist/components/TagsField/index.cjs +2 -0
  714. package/dist/components/TagsField/index.cjs.map +1 -0
  715. package/dist/components/TagsField/index.d.cts +2 -0
  716. package/dist/components/TagsField/index.d.ts +2 -0
  717. package/dist/components/TagsField/index.js +6 -0
  718. package/dist/components/TagsField/index.js.map +1 -0
  719. package/dist/components/TextField/TextField.d.cts +62 -0
  720. package/dist/components/TextField/TextField.d.ts +62 -0
  721. package/dist/components/TextField/index.cjs +2 -0
  722. package/dist/components/TextField/index.cjs.map +1 -0
  723. package/dist/components/TextField/index.d.cts +2 -0
  724. package/dist/components/TextField/index.d.ts +2 -0
  725. package/dist/components/TextField/index.js +6 -0
  726. package/dist/components/TextField/index.js.map +1 -0
  727. package/dist/components/ThemeToggle/ThemeToggle.d.cts +9 -0
  728. package/dist/components/ThemeToggle/ThemeToggle.d.ts +9 -0
  729. package/dist/components/ThemeToggle/index.cjs +2 -0
  730. package/dist/components/ThemeToggle/index.cjs.map +1 -0
  731. package/dist/components/ThemeToggle/index.d.cts +2 -0
  732. package/dist/components/ThemeToggle/index.d.ts +2 -0
  733. package/dist/components/ThemeToggle/index.js +6 -0
  734. package/dist/components/ThemeToggle/index.js.map +1 -0
  735. package/dist/components/TimePicker/TimePicker.d.cts +68 -0
  736. package/dist/components/TimePicker/TimePicker.d.ts +68 -0
  737. package/dist/components/TimePicker/index.cjs +2 -0
  738. package/dist/components/TimePicker/index.cjs.map +1 -0
  739. package/dist/components/TimePicker/index.d.cts +2 -0
  740. package/dist/components/TimePicker/index.d.ts +2 -0
  741. package/dist/components/TimePicker/index.js +6 -0
  742. package/dist/components/TimePicker/index.js.map +1 -0
  743. package/dist/components/Timeline/Timeline.d.cts +37 -0
  744. package/dist/components/Timeline/Timeline.d.ts +37 -0
  745. package/dist/components/Timeline/TimelineItem.d.cts +26 -0
  746. package/dist/components/Timeline/TimelineItem.d.ts +26 -0
  747. package/dist/components/Timeline/index.cjs +2 -0
  748. package/dist/components/Timeline/index.cjs.map +1 -0
  749. package/dist/components/Timeline/index.d.cts +4 -0
  750. package/dist/components/Timeline/index.d.ts +4 -0
  751. package/dist/components/Timeline/index.js +7 -0
  752. package/dist/components/Timeline/index.js.map +1 -0
  753. package/dist/components/Timeline/timelineContext.d.cts +10 -0
  754. package/dist/components/Timeline/timelineContext.d.ts +10 -0
  755. package/dist/components/Toast/ToastItem.d.cts +12 -0
  756. package/dist/components/Toast/ToastItem.d.ts +12 -0
  757. package/dist/components/Toast/Toaster.d.cts +18 -0
  758. package/dist/components/Toast/Toaster.d.ts +18 -0
  759. package/dist/components/Toast/index.cjs +2 -0
  760. package/dist/components/Toast/index.cjs.map +1 -0
  761. package/dist/components/Toast/index.d.cts +4 -0
  762. package/dist/components/Toast/index.d.ts +4 -0
  763. package/dist/components/Toast/index.js +8 -0
  764. package/dist/components/Toast/index.js.map +1 -0
  765. package/dist/components/Toast/toastStore.d.cts +45 -0
  766. package/dist/components/Toast/toastStore.d.ts +45 -0
  767. package/dist/components/ToggleButton/ToggleButton.d.cts +26 -0
  768. package/dist/components/ToggleButton/ToggleButton.d.ts +26 -0
  769. package/dist/components/ToggleButton/ToggleButtonGroup.d.cts +52 -0
  770. package/dist/components/ToggleButton/ToggleButtonGroup.d.ts +52 -0
  771. package/dist/components/ToggleButton/index.cjs +2 -0
  772. package/dist/components/ToggleButton/index.cjs.map +1 -0
  773. package/dist/components/ToggleButton/index.d.cts +4 -0
  774. package/dist/components/ToggleButton/index.d.ts +4 -0
  775. package/dist/components/ToggleButton/index.js +7 -0
  776. package/dist/components/ToggleButton/index.js.map +1 -0
  777. package/dist/components/ToggleButton/toggleButtonGroupContext.d.cts +15 -0
  778. package/dist/components/ToggleButton/toggleButtonGroupContext.d.ts +15 -0
  779. package/dist/components/Tooltip/Tooltip.d.cts +21 -0
  780. package/dist/components/Tooltip/Tooltip.d.ts +21 -0
  781. package/dist/components/Tooltip/index.cjs +2 -0
  782. package/dist/components/Tooltip/index.cjs.map +1 -0
  783. package/dist/components/Tooltip/index.d.cts +2 -0
  784. package/dist/components/Tooltip/index.d.ts +2 -0
  785. package/dist/components/Tooltip/index.js +6 -0
  786. package/dist/components/Tooltip/index.js.map +1 -0
  787. package/dist/components/TranslatedFields/TranslatedFields.d.cts +56 -0
  788. package/dist/components/TranslatedFields/TranslatedFields.d.ts +56 -0
  789. package/dist/components/TranslatedFields/index.cjs +2 -0
  790. package/dist/components/TranslatedFields/index.cjs.map +1 -0
  791. package/dist/components/TranslatedFields/index.d.cts +2 -0
  792. package/dist/components/TranslatedFields/index.d.ts +2 -0
  793. package/dist/components/TranslatedFields/index.js +6 -0
  794. package/dist/components/TranslatedFields/index.js.map +1 -0
  795. package/dist/components/Typography/Typography.d.cts +30 -0
  796. package/dist/components/Typography/Typography.d.ts +30 -0
  797. package/dist/components/Typography/index.cjs +2 -0
  798. package/dist/components/Typography/index.cjs.map +1 -0
  799. package/dist/components/Typography/index.d.cts +2 -0
  800. package/dist/components/Typography/index.d.ts +2 -0
  801. package/dist/components/Typography/index.js +6 -0
  802. package/dist/components/Typography/index.js.map +1 -0
  803. package/dist/components/UserCard/UserCard.d.cts +33 -0
  804. package/dist/components/UserCard/UserCard.d.ts +33 -0
  805. package/dist/components/UserCard/index.cjs +2 -0
  806. package/dist/components/UserCard/index.cjs.map +1 -0
  807. package/dist/components/UserCard/index.d.cts +2 -0
  808. package/dist/components/UserCard/index.d.ts +2 -0
  809. package/dist/components/UserCard/index.js +6 -0
  810. package/dist/components/UserCard/index.js.map +1 -0
  811. package/dist/components/index.d.cts +57 -0
  812. package/dist/components/index.d.ts +57 -0
  813. package/dist/entries/components.cjs +2 -0
  814. package/dist/entries/components.cjs.map +1 -0
  815. package/dist/entries/components.d.cts +3 -0
  816. package/dist/entries/components.d.ts +3 -0
  817. package/dist/entries/components.js +140 -0
  818. package/dist/entries/components.js.map +1 -0
  819. package/dist/entries/helpers.cjs +2 -0
  820. package/dist/entries/helpers.cjs.map +1 -0
  821. package/dist/entries/helpers.d.cts +4 -0
  822. package/dist/entries/helpers.d.ts +4 -0
  823. package/dist/entries/helpers.js +17 -0
  824. package/dist/entries/helpers.js.map +1 -0
  825. package/dist/entries/hooks.cjs +2 -0
  826. package/dist/entries/hooks.cjs.map +1 -0
  827. package/dist/entries/hooks.d.cts +7 -0
  828. package/dist/entries/hooks.d.ts +7 -0
  829. package/dist/entries/hooks.js +12 -0
  830. package/dist/entries/hooks.js.map +1 -0
  831. package/dist/entries/i18n.cjs +2 -0
  832. package/dist/entries/i18n.cjs.map +1 -0
  833. package/dist/entries/i18n.d.cts +3 -0
  834. package/dist/entries/i18n.d.ts +3 -0
  835. package/dist/entries/i18n.js +11 -0
  836. package/dist/entries/i18n.js.map +1 -0
  837. package/dist/entries/icons.cjs +2 -0
  838. package/dist/entries/icons.cjs.map +1 -0
  839. package/dist/entries/icons.d.cts +2 -0
  840. package/dist/entries/icons.d.ts +2 -0
  841. package/dist/entries/icons.js +9 -0
  842. package/dist/entries/icons.js.map +1 -0
  843. package/dist/entries/theme.cjs +2 -0
  844. package/dist/entries/theme.cjs.map +1 -0
  845. package/dist/entries/theme.d.cts +2 -0
  846. package/dist/entries/theme.d.ts +2 -0
  847. package/dist/entries/theme.js +18 -0
  848. package/dist/entries/theme.js.map +1 -0
  849. package/dist/form/Form.d.cts +14 -0
  850. package/dist/form/Form.d.ts +14 -0
  851. package/dist/form/formContext.d.cts +8 -0
  852. package/dist/form/formContext.d.ts +8 -0
  853. package/dist/form/index.d.cts +5 -0
  854. package/dist/form/index.d.ts +5 -0
  855. package/dist/form/useForm.d.cts +81 -0
  856. package/dist/form/useForm.d.ts +81 -0
  857. package/dist/formContext-B7ln1Miy.js +10 -0
  858. package/dist/formContext-B7ln1Miy.js.map +1 -0
  859. package/dist/formContext-bTWrqdEV.cjs +2 -0
  860. package/dist/formContext-bTWrqdEV.cjs.map +1 -0
  861. package/dist/helpers/access.d.cts +11 -0
  862. package/dist/helpers/access.d.ts +11 -0
  863. package/dist/helpers/table.d.cts +41 -0
  864. package/dist/helpers/table.d.ts +41 -0
  865. package/dist/helpers/translations.d.cts +63 -0
  866. package/dist/helpers/translations.d.ts +63 -0
  867. package/dist/hooks/index.d.cts +4 -0
  868. package/dist/hooks/index.d.ts +4 -0
  869. package/dist/hooks/useDisclosure.d.cts +7 -0
  870. package/dist/hooks/useDisclosure.d.ts +7 -0
  871. package/dist/hooks/useFloatingPanel.d.cts +45 -0
  872. package/dist/hooks/useFloatingPanel.d.ts +45 -0
  873. package/dist/hooks/useLockBodyScroll.d.cts +7 -0
  874. package/dist/hooks/useLockBodyScroll.d.ts +7 -0
  875. package/dist/hooks/useMediaQuery.d.cts +13 -0
  876. package/dist/hooks/useMediaQuery.d.ts +13 -0
  877. package/dist/i18n/locales/de.d.cts +5 -0
  878. package/dist/i18n/locales/de.d.ts +5 -0
  879. package/dist/i18n/locales/en.d.cts +9 -0
  880. package/dist/i18n/locales/en.d.ts +9 -0
  881. package/dist/i18n/locales/es.d.cts +5 -0
  882. package/dist/i18n/locales/es.d.ts +5 -0
  883. package/dist/i18n/locales/fr.d.cts +5 -0
  884. package/dist/i18n/locales/fr.d.ts +5 -0
  885. package/dist/i18n/locales/it.d.cts +5 -0
  886. package/dist/i18n/locales/it.d.ts +5 -0
  887. package/dist/i18n/locales/ka.d.cts +8 -0
  888. package/dist/i18n/locales/ka.d.ts +8 -0
  889. package/dist/i18n/locales/ru.d.cts +5 -0
  890. package/dist/i18n/locales/ru.d.ts +5 -0
  891. package/dist/i18n/messages.d.cts +241 -0
  892. package/dist/i18n/messages.d.ts +241 -0
  893. package/dist/icons/icons.d.cts +2 -0
  894. package/dist/icons/icons.d.ts +2 -0
  895. package/dist/icons/names.d.cts +3 -0
  896. package/dist/icons/names.d.ts +3 -0
  897. package/dist/index.cjs +2 -0
  898. package/dist/index.cjs.map +1 -0
  899. package/dist/index.css +203 -0
  900. package/dist/index.d.cts +6 -0
  901. package/dist/index.d.ts +6 -0
  902. package/dist/index.js +185 -0
  903. package/dist/index.js.map +1 -0
  904. package/dist/messages-C-zecFBE.js +1363 -0
  905. package/dist/messages-C-zecFBE.js.map +1 -0
  906. package/dist/messages-Cy-qK5xU.cjs +36 -0
  907. package/dist/messages-Cy-qK5xU.cjs.map +1 -0
  908. package/dist/names-C2Yj1p3u.cjs +2 -0
  909. package/dist/names-C2Yj1p3u.cjs.map +1 -0
  910. package/dist/names-D8ABK2Wk.js +1205 -0
  911. package/dist/names-D8ABK2Wk.js.map +1 -0
  912. package/dist/reset.css +78 -0
  913. package/dist/table-CZRQGNdk.cjs +2 -0
  914. package/dist/table-CZRQGNdk.cjs.map +1 -0
  915. package/dist/table-DF3zTrC3.js +49 -0
  916. package/dist/table-DF3zTrC3.js.map +1 -0
  917. package/dist/theme/ConfigProvider.d.cts +362 -0
  918. package/dist/theme/ConfigProvider.d.ts +362 -0
  919. package/dist/theme/applyTheme.d.cts +28 -0
  920. package/dist/theme/applyTheme.d.ts +28 -0
  921. package/dist/theme/index.d.cts +5 -0
  922. package/dist/theme/index.d.ts +5 -0
  923. package/dist/toastStore-B4Tk2Xk7.cjs +2 -0
  924. package/dist/toastStore-B4Tk2Xk7.cjs.map +1 -0
  925. package/dist/toastStore-Cx_JOKwS.js +32 -0
  926. package/dist/toastStore-Cx_JOKwS.js.map +1 -0
  927. package/dist/translations-CXEeeUDL.cjs +2 -0
  928. package/dist/translations-CXEeeUDL.cjs.map +1 -0
  929. package/dist/translations-D15tFHM1.js +74 -0
  930. package/dist/translations-D15tFHM1.js.map +1 -0
  931. package/dist/useForm-B_5wDIER.js +126 -0
  932. package/dist/useForm-B_5wDIER.js.map +1 -0
  933. package/dist/useForm-C7erBHt0.cjs +2 -0
  934. package/dist/useForm-C7erBHt0.cjs.map +1 -0
  935. package/dist/useLockBodyScroll-CIXHZo-Q.cjs +2 -0
  936. package/dist/useLockBodyScroll-CIXHZo-Q.cjs.map +1 -0
  937. package/dist/useLockBodyScroll-DwBILLPK.js +35 -0
  938. package/dist/useLockBodyScroll-DwBILLPK.js.map +1 -0
  939. package/dist/useMediaQuery-BCsNfMA1.cjs +2 -0
  940. package/dist/useMediaQuery-BCsNfMA1.cjs.map +1 -0
  941. package/dist/useMediaQuery-_1EcFoC5.js +17 -0
  942. package/dist/useMediaQuery-_1EcFoC5.js.map +1 -0
  943. package/package.json +244 -0
@@ -0,0 +1,362 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type ThemePalette } from './applyTheme';
3
+ import { type AppMessages, type AppTranslator, type MessageOverrides, type Translator } from '../i18n/messages';
4
+ export type ThemeMode = 'light' | 'dark';
5
+ export interface ThemeColors {
6
+ /** Light-mode palette. Override any subset of the theme colors — the rest use the library defaults. */
7
+ light?: Partial<ThemePalette>;
8
+ /** Dark-mode overrides, layered on the (merged) light palette + the library's dark defaults. */
9
+ dark?: Partial<ThemePalette>;
10
+ }
11
+ /** A content locale the app supports — a tab in `<TranslatedFields>`. */
12
+ export interface LocaleConfig {
13
+ /** BCP-47 locale code, e.g. `'en-US'`. Namespaces the form field names and is the tab's fallback label. */
14
+ code: string;
15
+ /** Human-readable tab label. Falls back to `code`. */
16
+ label?: string;
17
+ }
18
+ /** Theme settings — color overrides + initial mode. Lives under `Config.theme`. */
19
+ export interface ThemeConfig {
20
+ /** Theme color overrides. Omit entirely to use the library's built-in theme. */
21
+ colors?: ThemeColors;
22
+ /** Initial color mode. */
23
+ mode?: ThemeMode;
24
+ /**
25
+ * Default font family — the app-wide default the user's Settings choice overrides (persisted). One of
26
+ * the pre-imported presets (`Inter` / `Roboto` / `Lato`) or any Google Font family name. Defaults to
27
+ * `Inter`. A non-preset family is loaded on demand at runtime.
28
+ */
29
+ fontFamily?: string;
30
+ }
31
+ /**
32
+ * The configurable key / param **names** the library's components read — grouped under `Config.keys`
33
+ * so they live in one place. Each is overridable; omit one to use its built-in default. Grows over
34
+ * time (e.g. `page` / `size` for paginated tables ⇒ `?page=1&size=10`).
35
+ */
36
+ export interface KeysConfig {
37
+ /**
38
+ * URL query param name a **top-level** `<Tabs>` syncs its active tab to (e.g. `'view'` ⇒ `?view=…`),
39
+ * unless that strip sets its own `queryKey` (or `queryKey={null}` to opt out). Defaults to `'tab'`.
40
+ */
41
+ tabQueryKey?: string;
42
+ /**
43
+ * URL query param name a **nested** `<Tabs>` (one rendered inside another tab's panel) syncs to, so it
44
+ * doesn't collide with the outer strip's `tabQueryKey` (e.g. `?tab=…&nestedTab=…`). Auto-applied by
45
+ * nesting depth; overridable per strip via `queryKey`. Defaults to `'nestedTab'`.
46
+ */
47
+ nestedTabQueryKey?: string;
48
+ /**
49
+ * URL query param name a `<Stepper queryKey>` (the bare/`true` form) syncs its active step to
50
+ * (**1-based**, e.g. `?step=2`); a string `queryKey` overrides it per stepper. Defaults to `'step'`.
51
+ * (The sync itself is **opt-in** — a stepper with no `queryKey` never touches the URL.)
52
+ */
53
+ stepQueryKey?: string;
54
+ /**
55
+ * Top-level namespace word for `<TranslatedFields>`' form names + the nested object — e.g.
56
+ * `'languages'` ⇒ `languages[en-US].title`. Defaults to `'translations'`.
57
+ */
58
+ translationsNamespace?: string;
59
+ }
60
+ /**
61
+ * How a `<Table>` builds its **server-request** params — the query it hands the consumer (as `params` /
62
+ * `query`) in `onChange`, so a server-mode fetch doesn't hand-map page/size/search/sort every time. This is
63
+ * the **backend transport** layer, distinct from `keys.*QueryKey` (the browser-URL sync, always page-based
64
+ * for shareable links). Set once in `config.table.query`, override per table via the `queryMapping` prop.
65
+ * Every field is optional; the defaults reproduce the browser-URL shape (`?page=1&size=10&search=…&sort=-key`).
66
+ */
67
+ export interface TableQueryConfig {
68
+ /** Request param name for the page / offset. Defaults to `'page'` (e.g. `'skip'` for an offset API). */
69
+ pageParam?: string;
70
+ /** Request param name for the page size. Defaults to `'size'` (e.g. `'limit'`). */
71
+ sizeParam?: string;
72
+ /** Request param name for the search query (omitted when the search is empty). Defaults to `'search'` (e.g. `'q'`). */
73
+ searchParam?: string;
74
+ /**
75
+ * Request param name holding the sort **key**. Defaults to `'sort'` (e.g. `'sortBy'`). With
76
+ * `sortFormat: 'field'` this single param also carries the direction (`-key` = desc); with `'separate'`
77
+ * the direction goes to `sortOrderParam`.
78
+ */
79
+ sortParam?: string;
80
+ /**
81
+ * Pagination style. `'page'` (default) emits the **1-based page number** as-is (`page=2`); `'offset'`
82
+ * emits a **zero-based offset** `(page - 1) * size` instead (`skip=10`), for skip/offset APIs.
83
+ */
84
+ pagination?: 'page' | 'offset';
85
+ /**
86
+ * Sort encoding. `'field'` (default) is a single param with a `-` prefix for descending (`sort=-price`);
87
+ * `'separate'` splits into two params — the key in `sortParam` + the direction in `sortOrderParam`
88
+ * (`sortBy=price&order=desc`); `'suffix'` appends the direction value to the key in a single param
89
+ * (`sort=priceAsc` / `sort=priceDesc` with `ascValue: 'Asc'` / `descValue: 'Desc'`).
90
+ */
91
+ sortFormat?: 'field' | 'separate' | 'suffix';
92
+ /** Direction param name when `sortFormat: 'separate'`. Defaults to `'order'`. */
93
+ sortOrderParam?: string;
94
+ /**
95
+ * Value emitted for an ascending sort — the `sortOrderParam` value when `sortFormat: 'separate'`, or the
96
+ * suffix appended to the key when `sortFormat: 'suffix'`. Defaults to `'asc'`.
97
+ */
98
+ ascValue?: string;
99
+ /**
100
+ * Value emitted for a descending sort — the `sortOrderParam` value when `sortFormat: 'separate'`, or the
101
+ * suffix appended to the key when `sortFormat: 'suffix'`. Defaults to `'desc'`.
102
+ */
103
+ descValue?: string;
104
+ /**
105
+ * What to emit for the size param when the **"All"** rows-per-page choice is active. A `string`/`number`
106
+ * sets `size=<allValue>` (e.g. `0` for APIs where `limit=0` means "all"); omit it (default) to drop the
107
+ * size param entirely (many APIs treat a missing limit as unbounded).
108
+ */
109
+ allValue?: string | number;
110
+ /**
111
+ * How a **`multiSelect`** filter serializes into the request query: `'repeat'` (default — `cat=a&cat=b`),
112
+ * `'csv'` (`cat=a,b`), or `'indexed'` (`cat[0]=a&cat[1]=b`).
113
+ */
114
+ multiSelectFormat?: 'repeat' | 'csv' | 'indexed';
115
+ /**
116
+ * Suffix appended to a **range** filter's param for its lower / upper bound — e.g. `Min`/`Max` (default)
117
+ * → `priceMin`/`priceMax`; set `'_gte'`/`'_lte'`, `'[gte]'`/`'[lte]'`, `'From'`/`'To'`, … to match your API.
118
+ */
119
+ rangeMinSuffix?: string;
120
+ rangeMaxSuffix?: string;
121
+ }
122
+ /** `<Table>`-specific configuration. Grows over time; today just the server-request query mapping. */
123
+ export interface TableConfig {
124
+ /** How `<Table>` builds its server-request params (emitted as `params` / `query` in `onChange`). */
125
+ query?: TableQueryConfig;
126
+ }
127
+ /** Signed-in user shown in the shell header avatar + its account menu (see `HeaderConfig`). */
128
+ export interface HeaderUser {
129
+ /** Full name — shown as the menu's name line. */
130
+ name?: string;
131
+ /** Email shown under the name in the account menu. */
132
+ email?: string;
133
+ /** Avatar image URL (falls back to a user icon). */
134
+ avatar?: string;
135
+ }
136
+ /**
137
+ * `RootLayout` header configuration — the shell's top-bar controls. Set it once app-wide in
138
+ * `config.header`, or per shell via the `RootLayout` `header` prop (the prop wins, merged over config).
139
+ */
140
+ export interface HeaderConfig {
141
+ /** Show the built-in light/dark theme toggle. Defaults to `true`. */
142
+ theme?: boolean;
143
+ /**
144
+ * Make the shell header **stick to the top on scroll** (fixed) instead of scrolling away (static).
145
+ * This is the app-wide default; the user can flip it in the **Settings** drawer and their choice is
146
+ * persisted (`localStorage['tz-header-sticky']`), overriding this. Defaults to `false` (static).
147
+ */
148
+ sticky?: boolean;
149
+ /** Show the browser-fullscreen toggle (auto-hides where the Fullscreen API is unavailable). Defaults to `false`. */
150
+ fullscreen?: boolean;
151
+ /** Show the **Settings** button (opens the right-side drawer to pick the per-mode `accent`). Defaults to `true`. */
152
+ settings?: boolean;
153
+ /** Show the nav search over the sidebar's pages (with suggestions). Defaults to `true`. */
154
+ search?: boolean;
155
+ /**
156
+ * Show the header **language switcher** (the `Global`-icon dropdown of `config.i18n.languages`).
157
+ * Defaults to `true`, but it only renders when more than one UI language is configured — so pass
158
+ * `false` to hide it even with several languages (the panel stays on its current/default language).
159
+ */
160
+ languages?: boolean;
161
+ /** Show the breadcrumb trail at the top of the content. Defaults to **`true`**. */
162
+ breadcrumbs?: boolean;
163
+ /** Render the automatic page-title `h2` (the active route's `staticData.name`). Defaults to `true`. */
164
+ pageTitle?: boolean;
165
+ /** When provided, an account `Avatar` appears; its menu has a **Sign out** item that calls this. */
166
+ onLogout?: () => void;
167
+ /** Signed-in user — shown in the header avatar and as a header block atop the account menu. */
168
+ user?: HeaderUser;
169
+ }
170
+ /**
171
+ * UI-language config for the admin panel's **own** static strings (labels, placeholders, aria-labels).
172
+ * Distinct from `locales` (which is content-translation locales for `<TranslatedFields>`). The library
173
+ * ships built-in translations (English + Georgian), so listing `languages` here is enough to get a
174
+ * localized panel — no per-app setup. Any language the library doesn't ship is supplied via `messages`.
175
+ */
176
+ export interface I18nConfig {
177
+ /**
178
+ * Active UI language on first load (a locale code, e.g. `'ka-GE'`). Defaults to English if listed in
179
+ * `languages`, else the first `languages` entry, else `'en-US'`. The user's switcher choice (persisted)
180
+ * overrides it.
181
+ */
182
+ language?: string;
183
+ /**
184
+ * The UI languages the panel offers — drives the Settings language switcher. One entry = a fixed
185
+ * language (no switcher). Defaults to English only. (Reuses the `{ code, label }` shape.)
186
+ */
187
+ languages?: LocaleConfig[];
188
+ /**
189
+ * Extra / override message catalogs for the **library's own** strings, merged **over** the built-ins
190
+ * and keyed by language code or base language (`'ka-GE'` or `'ka'`). Use this to localize into a
191
+ * language the library doesn't ship, or to tweak a built-in string. Unset keys fall back to English.
192
+ */
193
+ messages?: MessageOverrides;
194
+ /**
195
+ * Catalogs for the **consuming app's own** UI strings — its section titles, labels, business copy —
196
+ * keyed by language code/base then by any string key the app picks. Read via **`useTranslations()`**,
197
+ * which binds to the active UI language, so the app's text switches together with the panel. Resolution
198
+ * per key: exact code → base language → English (`'en'`) → the key itself. This is the app's own copy;
199
+ * `messages` above is only for the library's built-in strings.
200
+ */
201
+ appMessages?: AppMessages;
202
+ }
203
+ /**
204
+ * App-level configuration passed to `<ConfigProvider config={…}>`. Groups theming under `theme`,
205
+ * the configurable key/param names under `keys`, and keeps the rest (`locales`, …) at the top — a
206
+ * single place to grow.
207
+ */
208
+ export interface Config {
209
+ /** Theme settings (color overrides + initial mode). Omit entirely to use the built-in theme. */
210
+ theme?: ThemeConfig;
211
+ /** Content locales the app supports — drive `<TranslatedFields>`' tabs (one per locale). */
212
+ locales?: LocaleConfig[];
213
+ /** UI-language config for the panel's own strings (the library ships the translations). See `I18nConfig`. */
214
+ i18n?: I18nConfig;
215
+ /**
216
+ * Configurable key / query-param names the components read — e.g. the `<Tabs>` query keys
217
+ * (`tabQueryKey` / `nestedTabQueryKey`) and the `<TranslatedFields>` namespace
218
+ * (`translationsNamespace`). Grows over time (`page`, `size`, …).
219
+ */
220
+ keys?: KeysConfig;
221
+ /** `<Table>` config — today the server-request query mapping (`table.query`) shared by every table. */
222
+ table?: TableConfig;
223
+ /**
224
+ * `RootLayout` header config, app-wide — the shell top-bar toggles (`theme` / `fullscreen` /
225
+ * `search` / `breadcrumbs` / `pageTitle`) + the account (`onLogout` / `user`). A `RootLayout`
226
+ * `header` prop is merged over this (the prop wins), so a specific shell can override.
227
+ */
228
+ header?: HeaderConfig;
229
+ }
230
+ interface ThemeContextValue {
231
+ mode: ThemeMode;
232
+ setMode: (mode: ThemeMode) => void;
233
+ toggleMode: () => void;
234
+ /** The persisted accent-color overrides **per mode** (a hex, or `null` when using that mode's default). */
235
+ accentColors: Record<ThemeMode, string | null>;
236
+ /** The configured/default `accent` **per mode** (before any override) — the "no override" values. */
237
+ defaultAccentColors: Record<ThemeMode, string>;
238
+ /** Set (or clear with `null`) the accent override for `mode` (defaults to the current) — persists + re-applies. */
239
+ setAccentColor: (color: string | null, mode?: ThemeMode) => void;
240
+ locales: LocaleConfig[];
241
+ /** Resolved translations namespace (`config.keys.translationsNamespace` ?? the built-in default). */
242
+ translationsNamespace: string;
243
+ /** Resolved top-level tabs query key (`config.keys.tabQueryKey` ?? the built-in default). */
244
+ tabQueryKey: string;
245
+ /** Resolved nested tabs query key (`config.keys.nestedTabQueryKey` ?? the built-in default). */
246
+ nestedTabQueryKey: string;
247
+ /** Resolved stepper query key (`config.keys.stepQueryKey` ?? the built-in default). */
248
+ stepQueryKey: string;
249
+ /** The `<Table>` server-request query mapping (`config.table.query` ?? `{}`). Defaults applied by `buildTableQuery`. */
250
+ tableQuery: TableQueryConfig;
251
+ /** App-wide `RootLayout` header config (`config.header` ?? `{}`); the `RootLayout` prop merges over it. */
252
+ header: HeaderConfig;
253
+ /** Whether the shell header sticks to the top on scroll (fixed) vs scrolls away (static). Persisted. */
254
+ headerSticky: boolean;
255
+ /** Set + persist the header sticky/static preference (overrides `config.header.sticky`). */
256
+ setHeaderSticky: (sticky: boolean) => void;
257
+ /** The active font family (drives `--tz-font-family`). Persisted; seeded from `config.theme.fontFamily`. */
258
+ fontFamily: string;
259
+ /** Set + persist the font family (a preset or any Google Font name; loaded on demand). */
260
+ setFontFamily: (family: string) => void;
261
+ /** Active UI language code (drives `t`). Persisted; seeded from `config.i18n.language` (default English). */
262
+ language: string;
263
+ /** Set + persist the active UI language (must be one of `languages`). */
264
+ setLanguage: (code: string) => void;
265
+ /** The UI languages the panel offers (from `config.i18n.languages`, default English only). */
266
+ languages: LocaleConfig[];
267
+ /** Translator for the library's built-in strings, bound to the active `language`. */
268
+ t: Translator;
269
+ /** Translator for the **app's own** strings (`config.i18n.appMessages`), bound to the active `language`. */
270
+ appT: AppTranslator;
271
+ }
272
+ /** The default font family (matches the `--tz-font-family` token's primary family). */
273
+ export declare const DEFAULT_FONT_FAMILY = "Inter";
274
+ /** The built-in default URL query param name a **top-level** `<Tabs>` syncs to (no `queryKey`/config). */
275
+ export declare const DEFAULT_TABS_QUERY_KEY = "tab";
276
+ /** The built-in default URL query param name a **nested** `<Tabs>` syncs to (no `queryKey`/config). */
277
+ export declare const DEFAULT_NESTED_TAB_QUERY_KEY = "nestedTab";
278
+ /** The built-in default URL query param name a `<Stepper>` syncs to (no `queryKey`/config). */
279
+ export declare const DEFAULT_STEP_QUERY_KEY = "step";
280
+ export interface ConfigProviderProps {
281
+ /** App config — theme overrides, initial mode, locales. Omit for the built-in defaults (light mode). */
282
+ config?: Config;
283
+ children: ReactNode;
284
+ }
285
+ export declare function ConfigProvider({ config, children }: ConfigProviderProps): import("react/jsx-runtime").JSX.Element;
286
+ export declare function useTheme(): ThemeContextValue;
287
+ /**
288
+ * The content locales configured on `<ConfigProvider config={{ locales }}>`. Lenient — returns `[]`
289
+ * outside a provider (locales are optional), so `<TranslatedFields>` can also take a `locales` prop.
290
+ */
291
+ export declare function useLocales(): LocaleConfig[];
292
+ /**
293
+ * The translator for the library's built-in UI strings, bound to the active `config.i18n` language.
294
+ * **Lenient** — outside a provider it returns an English translator, so components render standalone
295
+ * (and in tests) with their default English labels. Use it for any built-in string:
296
+ * `t('select.noOptions')`.
297
+ */
298
+ export declare function useT(): Translator;
299
+ /**
300
+ * Translator for the **consuming app's own** strings — the catalogs passed to
301
+ * `<ConfigProvider config={{ i18n: { appMessages } }}>` — bound to the active UI language, so the app's
302
+ * copy switches together with the panel. Free-form string keys; per key it resolves exact code → base
303
+ * language → English (`'en'`) → the key itself, with `{name}` interpolation:
304
+ *
305
+ * ```tsx
306
+ * const t = useTranslations()
307
+ * <PageLayout title={t('customer-transactions.title')} />
308
+ * <p>{t('customer-transactions.count', { count: 128 })}</p>
309
+ * ```
310
+ *
311
+ * **Lenient** — outside a provider (or with no `appMessages`) it echoes the key back, so it's safe
312
+ * anywhere. Use `useT()` for the library's built-in strings; use this for your own.
313
+ */
314
+ export declare function useTranslations(): AppTranslator;
315
+ /**
316
+ * The active UI language + switcher data: `{ language, setLanguage, languages }`. Lenient outside a
317
+ * provider (English, single language, no-op setter) so it's safe to call anywhere.
318
+ */
319
+ export declare function useLanguage(): {
320
+ language: string;
321
+ setLanguage: (code: string) => void;
322
+ languages: LocaleConfig[];
323
+ };
324
+ /**
325
+ * The translations namespace configured on `<ConfigProvider config={{ keys: { translationsNamespace } }}>`,
326
+ * resolved against the built-in default (`'translations'`). Lenient outside a provider. Use it to pass
327
+ * the same namespace to the helpers, e.g. `buildTranslations(codes, fields, useTranslationsNamespace())`.
328
+ */
329
+ export declare function useTranslationsNamespace(): string;
330
+ /**
331
+ * The default top-level tabs query key configured on `<ConfigProvider config={{ keys: { tabQueryKey } }}>`,
332
+ * resolved against the built-in default (`'tab'`). Lenient outside a provider. A top-level `<Tabs>` reads
333
+ * it as the fallback for an omitted `queryKey`, so every tab strip URL-syncs out of the box.
334
+ */
335
+ export declare function useTabsQueryKey(): string;
336
+ /**
337
+ * The default nested tabs query key configured on
338
+ * `<ConfigProvider config={{ keys: { nestedTabQueryKey } }}>`, resolved against the built-in default
339
+ * (`'nestedTab'`). Lenient outside a provider. A `<Tabs>` nested inside another tab's panel uses this
340
+ * (instead of `tabQueryKey`) so the two strips don't collide on the same URL param.
341
+ */
342
+ export declare function useNestedTabQueryKey(): string;
343
+ /**
344
+ * The default stepper query key configured on `<ConfigProvider config={{ keys: { stepQueryKey } }}>`,
345
+ * resolved against the built-in default (`'step'`). Lenient outside a provider. A `<Stepper queryKey>`
346
+ * (the bare/`true` opt-in form) reads it as the param name; a string `queryKey` overrides it.
347
+ */
348
+ export declare function useStepQueryKey(): string;
349
+ /**
350
+ * The `<Table>` server-request query mapping configured on `<ConfigProvider config={{ table: { query } }}>`
351
+ * (`{}` when unset / outside a provider). `<Table>` merges its own `queryMapping` prop over this, then feeds
352
+ * the result to `buildTableQuery`, which applies the field defaults — so an unconfigured table emits the
353
+ * default page-based `?page=…&size=…&search=…&sort=…` shape.
354
+ */
355
+ export declare function useTableQueryConfig(): TableQueryConfig;
356
+ /**
357
+ * The app-wide `RootLayout` header config set on `<ConfigProvider config={{ header }}>` (`{}` when
358
+ * unset / outside a provider). `RootLayout` merges its own `header` prop over this (the prop wins), so
359
+ * a specific shell can override the app-wide defaults.
360
+ */
361
+ export declare function useHeaderConfig(): HeaderConfig;
362
+ export {};
@@ -0,0 +1,28 @@
1
+ export interface ThemePalette {
2
+ primary: string;
3
+ /**
4
+ * A free theme color (near-white by default) selectable via the `color` prop — it is **no longer**
5
+ * the component surface (elevated panels use `--tz-color-surface`).
6
+ */
7
+ secondary: string;
8
+ /**
9
+ * The rear-most page background — the `<body>` fill + the shell canvas that the floating panels sit
10
+ * on; nothing else uses it. Built-in defaults: a soft off-white in light mode, a near-black in dark mode.
11
+ */
12
+ background: string;
13
+ /**
14
+ * The elevated **panel surface** — cards, sidebar, inputs/forms, dropdowns, modals (the panels that
15
+ * float over `--tz-color-background`). Built-in defaults: white in light mode, a touch lighter than
16
+ * the canvas in dark mode. Configurable per mode like any theme color.
17
+ */
18
+ surface: string;
19
+ /** The single accent color — the default tint for controls (`Button`, `IconButton`, …). */
20
+ accent: string;
21
+ success: string;
22
+ error: string;
23
+ info: string;
24
+ warning: string;
25
+ }
26
+ /** Names of the theme palette tokens (maps to `--tz-color-<name>`). */
27
+ export type ThemeColor = keyof ThemePalette;
28
+ export declare function applyTheme(theme: Partial<ThemePalette>, target?: HTMLElement): void;
@@ -0,0 +1,28 @@
1
+ export interface ThemePalette {
2
+ primary: string;
3
+ /**
4
+ * A free theme color (near-white by default) selectable via the `color` prop — it is **no longer**
5
+ * the component surface (elevated panels use `--tz-color-surface`).
6
+ */
7
+ secondary: string;
8
+ /**
9
+ * The rear-most page background — the `<body>` fill + the shell canvas that the floating panels sit
10
+ * on; nothing else uses it. Built-in defaults: a soft off-white in light mode, a near-black in dark mode.
11
+ */
12
+ background: string;
13
+ /**
14
+ * The elevated **panel surface** — cards, sidebar, inputs/forms, dropdowns, modals (the panels that
15
+ * float over `--tz-color-background`). Built-in defaults: white in light mode, a touch lighter than
16
+ * the canvas in dark mode. Configurable per mode like any theme color.
17
+ */
18
+ surface: string;
19
+ /** The single accent color — the default tint for controls (`Button`, `IconButton`, …). */
20
+ accent: string;
21
+ success: string;
22
+ error: string;
23
+ info: string;
24
+ warning: string;
25
+ }
26
+ /** Names of the theme palette tokens (maps to `--tz-color-<name>`). */
27
+ export type ThemeColor = keyof ThemePalette;
28
+ export declare function applyTheme(theme: Partial<ThemePalette>, target?: HTMLElement): void;
@@ -0,0 +1,5 @@
1
+ export { applyTheme } from './applyTheme';
2
+ export type { ThemePalette, ThemeColor } from './applyTheme';
3
+ export { ConfigProvider, useTheme, useLocales, useTranslationsNamespace, useTabsQueryKey, useNestedTabQueryKey, useStepQueryKey, useTableQueryConfig, useHeaderConfig, useT, useTranslations, useLanguage, DEFAULT_TABS_QUERY_KEY, DEFAULT_NESTED_TAB_QUERY_KEY, DEFAULT_STEP_QUERY_KEY, DEFAULT_FONT_FAMILY, } from './ConfigProvider';
4
+ export type { Config, ThemeConfig, ThemeColors, ThemeMode, ConfigProviderProps, LocaleConfig, KeysConfig, TableConfig, TableQueryConfig, HeaderConfig, HeaderUser, I18nConfig, } from './ConfigProvider';
5
+ export type { Messages, MessageKey, MessageCatalog, MessageOverrides, Translator, AppMessages, AppTranslator, } from '../i18n/messages';
@@ -0,0 +1,5 @@
1
+ export { applyTheme } from './applyTheme';
2
+ export type { ThemePalette, ThemeColor } from './applyTheme';
3
+ export { ConfigProvider, useTheme, useLocales, useTranslationsNamespace, useTabsQueryKey, useNestedTabQueryKey, useStepQueryKey, useTableQueryConfig, useHeaderConfig, useT, useTranslations, useLanguage, DEFAULT_TABS_QUERY_KEY, DEFAULT_NESTED_TAB_QUERY_KEY, DEFAULT_STEP_QUERY_KEY, DEFAULT_FONT_FAMILY, } from './ConfigProvider';
4
+ export type { Config, ThemeConfig, ThemeColors, ThemeMode, ConfigProviderProps, LocaleConfig, KeysConfig, TableConfig, TableQueryConfig, HeaderConfig, HeaderUser, I18nConfig, } from './ConfigProvider';
5
+ export type { Messages, MessageKey, MessageCatalog, MessageOverrides, Translator, AppMessages, AppTranslator, } from '../i18n/messages';
@@ -0,0 +1,2 @@
1
+ "use strict";let t=[],T=0;const d=new Set,c=()=>{for(const s of d)s()},m=s=>(d.add(s),()=>{d.delete(s)}),b=()=>t,o=(s,e,n)=>{const a=(n==null?void 0:n.id)??`tz-toast-${++T}`,r=t.findIndex(i=>i.id===a),l={...r>=0?t[r]:void 0,...n,id:a,message:s,color:e,open:!0};return t=r>=0?t.map((i,u)=>u===r?l:i):[...t,l],c(),a},f=s=>{t=t.map(e=>e.id===s?{...e,open:!1}:e),c()},g=s=>{t=t.filter(e=>e.id!==s),c()},v=Object.assign((s,e)=>o(s,"info",e),{success:(s,e)=>o(s,"success",e),error:(s,e)=>o(s,"error",e),warning:(s,e)=>o(s,"warning",e),info:(s,e)=>o(s,"info",e),dismiss:s=>{s==null?(t=t.map(e=>({...e,open:!1})),c()):f(s)}});exports.closeToast=f;exports.getToasts=b;exports.removeToast=g;exports.subscribeToasts=m;exports.toast=v;
2
+ //# sourceMappingURL=toastStore-B4Tk2Xk7.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toastStore-B4Tk2Xk7.cjs","sources":["../src/components/Toast/toastStore.ts"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { ThemeColor } from '../../theme'\nimport type { IconName } from '../../icons/names'\nimport type { AlertVariant } from '../Alert'\n\n/** Where the `Toaster` stacks toasts. */\nexport type ToastPosition =\n | 'top-left'\n | 'top-center'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'bottom-right'\n\nexport interface ToastOptions {\n /** Auto-dismiss delay in ms; `Infinity` keeps it open until dismissed. Defaults to the `Toaster`'s `duration`. */\n duration?: number\n /** Alert tint style. Defaults to `contained` (solid fill). */\n variant?: AlertVariant\n /** Leading icon — an `IconName`, a node, or `false` to hide it. Defaults to the semantic icon for the color. */\n icon?: IconName | ReactNode | false\n /** Trailing action (e.g. an `UNDO` button). */\n action?: ReactNode\n /** Explicit id — reuse it to update an existing toast or to target `toast.dismiss(id)`. Auto-generated otherwise. */\n id?: string\n}\n\n/** A live toast in the store (internal). `open` flips to `false` to drive the exit animation before removal. */\nexport interface ToastRecord extends ToastOptions {\n id: string\n message: ReactNode\n color: ThemeColor\n open: boolean\n}\n\nlet toasts: ToastRecord[] = []\nlet seq = 0\nconst listeners = new Set<() => void>()\n\nconst emit = () => {\n for (const listener of listeners) listener()\n}\n\n/** Subscribe to store changes (used by `Toaster` via `useSyncExternalStore`). */\nexport const subscribeToasts = (listener: () => void): (() => void) => {\n listeners.add(listener)\n return () => {\n listeners.delete(listener)\n }\n}\n\n/** The current toasts — a stable reference between changes (snapshot for `useSyncExternalStore`). */\nexport const getToasts = (): ToastRecord[] => toasts\n\nconst upsert = (message: ReactNode, color: ThemeColor, options?: ToastOptions): string => {\n const id = options?.id ?? `tz-toast-${++seq}`\n const index = toasts.findIndex((t) => t.id === id)\n // on update-by-id, merge over the existing record so fields omitted this call (action, a sticky\n // duration, …) are preserved rather than silently reset to defaults\n const prev = index >= 0 ? toasts[index] : undefined\n const record: ToastRecord = { ...prev, ...options, id, message, color, open: true }\n toasts = index >= 0 ? toasts.map((t, i) => (i === index ? record : t)) : [...toasts, record]\n emit()\n return id\n}\n\n/** Mark a toast as closing — drives its exit animation; the `Toaster` removes it afterwards. */\nexport const closeToast = (id: string): void => {\n toasts = toasts.map((t) => (t.id === id ? { ...t, open: false } : t))\n emit()\n}\n\n/** Remove a toast outright (called by the `Toaster` once its exit animation finishes). */\nexport const removeToast = (id: string): void => {\n toasts = toasts.filter((t) => t.id !== id)\n emit()\n}\n\n/** Imperative toast API — callable from anywhere (event handlers, async code, outside React). */\nexport interface ToastApi {\n /** Show a neutral (info) toast. Returns the toast id. */\n (message: ReactNode, options?: ToastOptions): string\n success: (message: ReactNode, options?: ToastOptions) => string\n error: (message: ReactNode, options?: ToastOptions) => string\n warning: (message: ReactNode, options?: ToastOptions) => string\n info: (message: ReactNode, options?: ToastOptions) => string\n /** Dismiss a toast by id, or all toasts when called with no argument. */\n dismiss: (id?: string) => void\n}\n\nexport const toast: ToastApi = Object.assign(\n (message: ReactNode, options?: ToastOptions) => upsert(message, 'info', options),\n {\n success: (message: ReactNode, options?: ToastOptions) => upsert(message, 'success', options),\n error: (message: ReactNode, options?: ToastOptions) => upsert(message, 'error', options),\n warning: (message: ReactNode, options?: ToastOptions) => upsert(message, 'warning', options),\n info: (message: ReactNode, options?: ToastOptions) => upsert(message, 'info', options),\n dismiss: (id?: string) => {\n if (id == null) {\n toasts = toasts.map((t) => ({ ...t, open: false }))\n emit()\n } else {\n closeToast(id)\n }\n },\n },\n)\n"],"names":["toasts","seq","listeners","emit","listener","subscribeToasts","getToasts","upsert","message","color","options","id","index","t","record","i","closeToast","removeToast","toast"],"mappings":"aAmCA,IAAIA,EAAwB,CAAA,EACxBC,EAAM,EACV,MAAMC,MAAgB,IAEhBC,EAAO,IAAM,CACjB,UAAWC,KAAYF,EAAWE,EAAA,CACpC,EAGaC,EAAmBD,IAC9BF,EAAU,IAAIE,CAAQ,EACf,IAAM,CACXF,EAAU,OAAOE,CAAQ,CAC3B,GAIWE,EAAY,IAAqBN,EAExCO,EAAS,CAACC,EAAoBC,EAAmBC,IAAmC,CACxF,MAAMC,GAAKD,GAAA,YAAAA,EAAS,KAAM,YAAY,EAAET,CAAG,GACrCW,EAAQZ,EAAO,UAAWa,GAAMA,EAAE,KAAOF,CAAE,EAI3CG,EAAsB,CAAE,GADjBF,GAAS,EAAIZ,EAAOY,CAAK,EAAI,OACH,GAAGF,EAAS,GAAAC,EAAI,QAAAH,EAAS,MAAAC,EAAO,KAAM,EAAA,EAC7E,OAAAT,EAASY,GAAS,EAAIZ,EAAO,IAAI,CAACa,EAAGE,IAAOA,IAAMH,EAAQE,EAASD,CAAE,EAAI,CAAC,GAAGb,EAAQc,CAAM,EAC3FX,EAAA,EACOQ,CACT,EAGaK,EAAcL,GAAqB,CAC9CX,EAASA,EAAO,IAAKa,GAAOA,EAAE,KAAOF,EAAK,CAAE,GAAGE,EAAG,KAAM,EAAA,EAAUA,CAAE,EACpEV,EAAA,CACF,EAGac,EAAeN,GAAqB,CAC/CX,EAASA,EAAO,OAAQa,GAAMA,EAAE,KAAOF,CAAE,EACzCR,EAAA,CACF,EAcae,EAAkB,OAAO,OACpC,CAACV,EAAoBE,IAA2BH,EAAOC,EAAS,OAAQE,CAAO,EAC/E,CACE,QAAS,CAACF,EAAoBE,IAA2BH,EAAOC,EAAS,UAAWE,CAAO,EAC3F,MAAO,CAACF,EAAoBE,IAA2BH,EAAOC,EAAS,QAASE,CAAO,EACvF,QAAS,CAACF,EAAoBE,IAA2BH,EAAOC,EAAS,UAAWE,CAAO,EAC3F,KAAM,CAACF,EAAoBE,IAA2BH,EAAOC,EAAS,OAAQE,CAAO,EACrF,QAAUC,GAAgB,CACpBA,GAAM,MACRX,EAASA,EAAO,IAAKa,IAAO,CAAE,GAAGA,EAAG,KAAM,EAAA,EAAQ,EAClDV,EAAA,GAEAa,EAAWL,CAAE,CAEjB,CAAA,CAEJ"}
@@ -0,0 +1,32 @@
1
+ let t = [], u = 0;
2
+ const d = /* @__PURE__ */ new Set(), c = () => {
3
+ for (const s of d) s();
4
+ }, p = (s) => (d.add(s), () => {
5
+ d.delete(s);
6
+ }), v = () => t, n = (s, e, o) => {
7
+ const a = (o == null ? void 0 : o.id) ?? `tz-toast-${++u}`, r = t.findIndex((i) => i.id === a), l = { ...r >= 0 ? t[r] : void 0, ...o, id: a, message: s, color: e, open: !0 };
8
+ return t = r >= 0 ? t.map((i, f) => f === r ? l : i) : [...t, l], c(), a;
9
+ }, m = (s) => {
10
+ t = t.map((e) => e.id === s ? { ...e, open: !1 } : e), c();
11
+ }, T = (s) => {
12
+ t = t.filter((e) => e.id !== s), c();
13
+ }, b = Object.assign(
14
+ (s, e) => n(s, "info", e),
15
+ {
16
+ success: (s, e) => n(s, "success", e),
17
+ error: (s, e) => n(s, "error", e),
18
+ warning: (s, e) => n(s, "warning", e),
19
+ info: (s, e) => n(s, "info", e),
20
+ dismiss: (s) => {
21
+ s == null ? (t = t.map((e) => ({ ...e, open: !1 })), c()) : m(s);
22
+ }
23
+ }
24
+ );
25
+ export {
26
+ m as c,
27
+ v as g,
28
+ T as r,
29
+ p as s,
30
+ b as t
31
+ };
32
+ //# sourceMappingURL=toastStore-Cx_JOKwS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toastStore-Cx_JOKwS.js","sources":["../src/components/Toast/toastStore.ts"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { ThemeColor } from '../../theme'\nimport type { IconName } from '../../icons/names'\nimport type { AlertVariant } from '../Alert'\n\n/** Where the `Toaster` stacks toasts. */\nexport type ToastPosition =\n | 'top-left'\n | 'top-center'\n | 'top-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'bottom-right'\n\nexport interface ToastOptions {\n /** Auto-dismiss delay in ms; `Infinity` keeps it open until dismissed. Defaults to the `Toaster`'s `duration`. */\n duration?: number\n /** Alert tint style. Defaults to `contained` (solid fill). */\n variant?: AlertVariant\n /** Leading icon — an `IconName`, a node, or `false` to hide it. Defaults to the semantic icon for the color. */\n icon?: IconName | ReactNode | false\n /** Trailing action (e.g. an `UNDO` button). */\n action?: ReactNode\n /** Explicit id — reuse it to update an existing toast or to target `toast.dismiss(id)`. Auto-generated otherwise. */\n id?: string\n}\n\n/** A live toast in the store (internal). `open` flips to `false` to drive the exit animation before removal. */\nexport interface ToastRecord extends ToastOptions {\n id: string\n message: ReactNode\n color: ThemeColor\n open: boolean\n}\n\nlet toasts: ToastRecord[] = []\nlet seq = 0\nconst listeners = new Set<() => void>()\n\nconst emit = () => {\n for (const listener of listeners) listener()\n}\n\n/** Subscribe to store changes (used by `Toaster` via `useSyncExternalStore`). */\nexport const subscribeToasts = (listener: () => void): (() => void) => {\n listeners.add(listener)\n return () => {\n listeners.delete(listener)\n }\n}\n\n/** The current toasts — a stable reference between changes (snapshot for `useSyncExternalStore`). */\nexport const getToasts = (): ToastRecord[] => toasts\n\nconst upsert = (message: ReactNode, color: ThemeColor, options?: ToastOptions): string => {\n const id = options?.id ?? `tz-toast-${++seq}`\n const index = toasts.findIndex((t) => t.id === id)\n // on update-by-id, merge over the existing record so fields omitted this call (action, a sticky\n // duration, …) are preserved rather than silently reset to defaults\n const prev = index >= 0 ? toasts[index] : undefined\n const record: ToastRecord = { ...prev, ...options, id, message, color, open: true }\n toasts = index >= 0 ? toasts.map((t, i) => (i === index ? record : t)) : [...toasts, record]\n emit()\n return id\n}\n\n/** Mark a toast as closing — drives its exit animation; the `Toaster` removes it afterwards. */\nexport const closeToast = (id: string): void => {\n toasts = toasts.map((t) => (t.id === id ? { ...t, open: false } : t))\n emit()\n}\n\n/** Remove a toast outright (called by the `Toaster` once its exit animation finishes). */\nexport const removeToast = (id: string): void => {\n toasts = toasts.filter((t) => t.id !== id)\n emit()\n}\n\n/** Imperative toast API — callable from anywhere (event handlers, async code, outside React). */\nexport interface ToastApi {\n /** Show a neutral (info) toast. Returns the toast id. */\n (message: ReactNode, options?: ToastOptions): string\n success: (message: ReactNode, options?: ToastOptions) => string\n error: (message: ReactNode, options?: ToastOptions) => string\n warning: (message: ReactNode, options?: ToastOptions) => string\n info: (message: ReactNode, options?: ToastOptions) => string\n /** Dismiss a toast by id, or all toasts when called with no argument. */\n dismiss: (id?: string) => void\n}\n\nexport const toast: ToastApi = Object.assign(\n (message: ReactNode, options?: ToastOptions) => upsert(message, 'info', options),\n {\n success: (message: ReactNode, options?: ToastOptions) => upsert(message, 'success', options),\n error: (message: ReactNode, options?: ToastOptions) => upsert(message, 'error', options),\n warning: (message: ReactNode, options?: ToastOptions) => upsert(message, 'warning', options),\n info: (message: ReactNode, options?: ToastOptions) => upsert(message, 'info', options),\n dismiss: (id?: string) => {\n if (id == null) {\n toasts = toasts.map((t) => ({ ...t, open: false }))\n emit()\n } else {\n closeToast(id)\n }\n },\n },\n)\n"],"names":["toasts","seq","listeners","emit","listener","subscribeToasts","getToasts","upsert","message","color","options","id","index","t","record","i","closeToast","removeToast","toast"],"mappings":"AAmCA,IAAIA,IAAwB,CAAA,GACxBC,IAAM;AACV,MAAMC,wBAAgB,IAAA,GAEhBC,IAAO,MAAM;AACjB,aAAWC,KAAYF,EAAW,CAAAE,EAAA;AACpC,GAGaC,IAAkB,CAACD,OAC9BF,EAAU,IAAIE,CAAQ,GACf,MAAM;AACX,EAAAF,EAAU,OAAOE,CAAQ;AAC3B,IAIWE,IAAY,MAAqBN,GAExCO,IAAS,CAACC,GAAoBC,GAAmBC,MAAmC;AACxF,QAAMC,KAAKD,KAAA,gBAAAA,EAAS,OAAM,YAAY,EAAET,CAAG,IACrCW,IAAQZ,EAAO,UAAU,CAACa,MAAMA,EAAE,OAAOF,CAAE,GAI3CG,IAAsB,EAAE,GADjBF,KAAS,IAAIZ,EAAOY,CAAK,IAAI,QACH,GAAGF,GAAS,IAAAC,GAAI,SAAAH,GAAS,OAAAC,GAAO,MAAM,GAAA;AAC7E,SAAAT,IAASY,KAAS,IAAIZ,EAAO,IAAI,CAACa,GAAGE,MAAOA,MAAMH,IAAQE,IAASD,CAAE,IAAI,CAAC,GAAGb,GAAQc,CAAM,GAC3FX,EAAA,GACOQ;AACT,GAGaK,IAAa,CAACL,MAAqB;AAC9C,EAAAX,IAASA,EAAO,IAAI,CAACa,MAAOA,EAAE,OAAOF,IAAK,EAAE,GAAGE,GAAG,MAAM,GAAA,IAAUA,CAAE,GACpEV,EAAA;AACF,GAGac,IAAc,CAACN,MAAqB;AAC/C,EAAAX,IAASA,EAAO,OAAO,CAACa,MAAMA,EAAE,OAAOF,CAAE,GACzCR,EAAA;AACF,GAcae,IAAkB,OAAO;AAAA,EACpC,CAACV,GAAoBE,MAA2BH,EAAOC,GAAS,QAAQE,CAAO;AAAA,EAC/E;AAAA,IACE,SAAS,CAACF,GAAoBE,MAA2BH,EAAOC,GAAS,WAAWE,CAAO;AAAA,IAC3F,OAAO,CAACF,GAAoBE,MAA2BH,EAAOC,GAAS,SAASE,CAAO;AAAA,IACvF,SAAS,CAACF,GAAoBE,MAA2BH,EAAOC,GAAS,WAAWE,CAAO;AAAA,IAC3F,MAAM,CAACF,GAAoBE,MAA2BH,EAAOC,GAAS,QAAQE,CAAO;AAAA,IACrF,SAAS,CAACC,MAAgB;AACxB,MAAIA,KAAM,QACRX,IAASA,EAAO,IAAI,CAACa,OAAO,EAAE,GAAGA,GAAG,MAAM,GAAA,EAAQ,GAClDV,EAAA,KAEAa,EAAWL,CAAE;AAAA,IAEjB;AAAA,EAAA;AAEJ;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const c="translations",l=(e,r,o=c)=>`${o}[${e}].${r}`;function d(e,r,o=c){const n={};for(const t of e){const s=typeof t=="string"?t:t.code;for(const i of Object.keys(r))n[l(s,i,o)]=r[i]}return n}function b(e,r){const o=`${r}[`;if(!e.startsWith(o))return null;const n=e.indexOf("]",o.length);if(n===-1||e[n+1]!==".")return null;const t=e.slice(o.length,n),s=e.slice(n+2);return t&&s?{locale:t,field:s}:null}function p(e,r=c){var n;const o={};for(const[t,s]of Object.entries(e)){const i=b(t,r);if(i){const f=o[r]??(o[r]={});(f[n=i.locale]??(f[n]={}))[i.field]=s}else o[t]=s}return o}function u(e,r=c){const o={};for(const[n,t]of Object.entries(e))if(n===r&&t&&typeof t=="object"&&!Array.isArray(t)){for(const[s,i]of Object.entries(t))if(i&&typeof i=="object")for(const[f,a]of Object.entries(i))o[l(s,f,r)]=a}else o[n]=t;return o}function T(e){const r=new FormData,o=(n,t)=>{if(t!=null)if(t instanceof Blob)r.append(n,t);else if(t instanceof Date)r.append(n,t.toISOString());else if(Array.isArray(t))t.filter(s=>s!=null).forEach((s,i)=>o(`${n}[${i}]`,s));else if(typeof t=="object"){const s=Object.getPrototypeOf(t);if(s===Object.prototype||s===null)for(const[i,f]of Object.entries(t))o(`${n}[${i}]`,f);else r.append(n,String(t))}else r.append(n,String(t))};for(const[n,t]of Object.entries(e))o(n,t);return r}exports.DEFAULT_TRANSLATIONS_NAMESPACE=c;exports.buildTranslationName=l;exports.buildTranslations=d;exports.flattenTranslations=u;exports.nestTranslations=p;exports.toFormData=T;
2
+ //# sourceMappingURL=translations-CXEeeUDL.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations-CXEeeUDL.cjs","sources":["../src/helpers/translations.ts"],"sourcesContent":["import type { LocaleConfig } from '../theme'\n\n/**\n * Translation form helpers — framework-agnostic glue between `<TranslatedFields>`' **flat** field\n * names (`translations[en-US].title` — the `FormData` shape) and the **nested** JSON shape\n * (`{ translations: { 'en-US': { title } } }`). Public from `sava-test/helpers`.\n */\n\n/** The default top-level namespace for the translation field names + the nested object. */\nexport const DEFAULT_TRANSLATIONS_NAMESPACE = 'translations'\n\n/**\n * Builds a field's form name: `<namespace>[<locale>].<field>` (e.g. `translations[en-US].title`) —\n * the flat, bracketed key that maps cleanly to `FormData`. `namespace` defaults to `'translations'`.\n */\nexport const buildTranslationName = (\n locale: string,\n field: string,\n namespace: string = DEFAULT_TRANSLATIONS_NAMESPACE,\n): string => `${namespace}[${locale}].${field}`\n\n/**\n * Expands a per-field map into the flat, locale-namespaced record `<TranslatedFields>` submits — use\n * it to build a `<Form>`'s `defaultValues` **and** (with Zod field schemas as the values) the schema\n * shape. Pass the same `namespace` you give the component if you changed it.\n *\n * ```ts\n * const locales = ['en-US', 'ka-GE']\n * const fields = { title: '', description: '', shortDescription: '' }\n * const defaultValues = buildTranslations(locales, fields)\n * // { 'translations[en-US].title': '', …, 'translations[ka-GE].shortDescription': '' }\n * const schema = z.object(\n * buildTranslations(locales, { title: z.string().min(1), description: z.string(), shortDescription: z.string() }),\n * )\n * ```\n */\nexport function buildTranslations<T>(\n locales: ReadonlyArray<string | LocaleConfig>,\n fields: Record<string, T>,\n namespace: string = DEFAULT_TRANSLATIONS_NAMESPACE,\n): Record<string, T> {\n const out: Record<string, T> = {}\n for (const loc of locales) {\n const code = typeof loc === 'string' ? loc : loc.code\n for (const field of Object.keys(fields)) {\n out[buildTranslationName(code, field, namespace)] = fields[field]\n }\n }\n return out\n}\n\n/** Parse a flat translation key (`<namespace>[<locale>].<field>`) → `{ locale, field }`, or `null`. */\nfunction parseTranslationKey(\n key: string,\n namespace: string,\n): { locale: string; field: string } | null {\n const open = `${namespace}[`\n if (!key.startsWith(open)) return null\n const close = key.indexOf(']', open.length)\n if (close === -1 || key[close + 1] !== '.') return null\n const locale = key.slice(open.length, close)\n const field = key.slice(close + 2)\n return locale && field ? { locale, field } : null\n}\n\n/**\n * Flat form values → the **nested** JSON shape. Translation keys (`translations[en-US].title`) fold\n * into `{ [namespace]: { [locale]: { [field]: value } } }`; every other key stays top-level. Use it at\n * the submit boundary when you POST JSON (rather than `FormData`):\n *\n * ```ts\n * await api.post('/news', nestTranslations(form.values))\n * // { email: 1, translations: { 'en-US': { title: '…' }, 'ka-GE': { title: '…' } } }\n * ```\n */\nexport function nestTranslations(\n flat: Record<string, unknown>,\n namespace: string = DEFAULT_TRANSLATIONS_NAMESPACE,\n): Record<string, unknown> {\n const out: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(flat)) {\n const parsed = parseTranslationKey(key, namespace)\n if (parsed) {\n const bucket = (out[namespace] ??= {}) as Record<string, Record<string, unknown>>\n ;(bucket[parsed.locale] ??= {})[parsed.field] = value\n } else {\n out[key] = value\n }\n }\n return out\n}\n\n/**\n * The inverse of `nestTranslations`: a **nested** object (e.g. a backend response) → the flat values a\n * `<Form>` / `<TranslatedFields>` expects. Feed the result as `defaultValues` (or into `reset`):\n *\n * ```ts\n * const form = useForm({ schema, defaultValues: flattenTranslations(response) })\n * // { email: 1, 'translations[en-US].title': '…', 'translations[ka-GE].title': '…' }\n * ```\n */\nexport function flattenTranslations(\n nested: Record<string, unknown>,\n namespace: string = DEFAULT_TRANSLATIONS_NAMESPACE,\n): Record<string, unknown> {\n const out: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(nested)) {\n if (key === namespace && value && typeof value === 'object' && !Array.isArray(value)) {\n for (const [locale, fields] of Object.entries(value as Record<string, unknown>)) {\n if (fields && typeof fields === 'object') {\n for (const [field, v] of Object.entries(fields as Record<string, unknown>)) {\n out[buildTranslationName(locale, field, namespace)] = v\n }\n }\n }\n } else {\n out[key] = value\n }\n }\n return out\n}\n\n/**\n * Serialize flat form values into a `FormData` for a `multipart/form-data` POST. The flat translation\n * keys map straight through (`translations[en-US].title`); arrays become indexed keys (`tags[0]`,\n * `tags[1]`) with nullish items skipped so indices stay contiguous; `Blob`/`File` values are appended\n * as-is; a `Date` becomes an ISO string; only **plain** objects recurse (a class instance like a dayjs\n * object is stringified, not exploded into `$d`/`$y` keys); `null`/`undefined` are skipped; everything\n * else is stringified.\n *\n * ```ts\n * await fetch('/news', { method: 'POST', body: toFormData(form.values) })\n * ```\n */\nexport function toFormData(values: Record<string, unknown>): FormData {\n const fd = new FormData()\n const append = (key: string, value: unknown): void => {\n if (value === null || value === undefined) return\n if (value instanceof Blob) {\n fd.append(key, value)\n } else if (value instanceof Date) {\n fd.append(key, value.toISOString())\n } else if (Array.isArray(value)) {\n // drop nullish items so indices stay contiguous (gapped indices break strict parsers)\n value\n .filter((item) => item != null)\n .forEach((item, index) => append(`${key}[${index}]`, item))\n } else if (typeof value === 'object') {\n const proto = Object.getPrototypeOf(value)\n if (proto === Object.prototype || proto === null) {\n for (const [k, v] of Object.entries(value as Record<string, unknown>))\n append(`${key}[${k}]`, v)\n } else {\n fd.append(key, String(value)) // class instance (Date handled above) → stringify, don't explode keys\n }\n } else {\n fd.append(key, String(value))\n }\n }\n for (const [key, value] of Object.entries(values)) append(key, value)\n return fd\n}\n"],"names":["DEFAULT_TRANSLATIONS_NAMESPACE","buildTranslationName","locale","field","namespace","buildTranslations","locales","fields","out","loc","code","parseTranslationKey","key","open","close","nestTranslations","flat","value","parsed","bucket","_a","flattenTranslations","nested","v","toFormData","values","fd","append","item","index","proto","k"],"mappings":"aASO,MAAMA,EAAiC,eAMjCC,EAAuB,CAClCC,EACAC,EACAC,EAAoBJ,IACT,GAAGI,CAAS,IAAIF,CAAM,KAAKC,CAAK,GAiBtC,SAASE,EACdC,EACAC,EACAH,EAAoBJ,EACD,CACnB,MAAMQ,EAAyB,CAAA,EAC/B,UAAWC,KAAOH,EAAS,CACzB,MAAMI,EAAO,OAAOD,GAAQ,SAAWA,EAAMA,EAAI,KACjD,UAAWN,KAAS,OAAO,KAAKI,CAAM,EACpCC,EAAIP,EAAqBS,EAAMP,EAAOC,CAAS,CAAC,EAAIG,EAAOJ,CAAK,CAEpE,CACA,OAAOK,CACT,CAGA,SAASG,EACPC,EACAR,EAC0C,CAC1C,MAAMS,EAAO,GAAGT,CAAS,IACzB,GAAI,CAACQ,EAAI,WAAWC,CAAI,EAAG,OAAO,KAClC,MAAMC,EAAQF,EAAI,QAAQ,IAAKC,EAAK,MAAM,EAC1C,GAAIC,IAAU,IAAMF,EAAIE,EAAQ,CAAC,IAAM,IAAK,OAAO,KACnD,MAAMZ,EAASU,EAAI,MAAMC,EAAK,OAAQC,CAAK,EACrCX,EAAQS,EAAI,MAAME,EAAQ,CAAC,EACjC,OAAOZ,GAAUC,EAAQ,CAAE,OAAAD,EAAQ,MAAAC,GAAU,IAC/C,CAYO,SAASY,EACdC,EACAZ,EAAoBJ,EACK,OACzB,MAAMQ,EAA+B,CAAA,EACrC,SAAW,CAACI,EAAKK,CAAK,IAAK,OAAO,QAAQD,CAAI,EAAG,CAC/C,MAAME,EAASP,EAAoBC,EAAKR,CAAS,EACjD,GAAIc,EAAQ,CACV,MAAMC,EAAUX,EAAAJ,KAAAI,EAAAJ,GAAmB,CAAA,IACjCe,EAAAC,EAAOF,EAAO,UAAdC,EAAAC,GAA0B,CAAA,IAAIF,EAAO,KAAK,EAAID,CAClD,MACET,EAAII,CAAG,EAAIK,CAEf,CACA,OAAOT,CACT,CAWO,SAASa,EACdC,EACAlB,EAAoBJ,EACK,CACzB,MAAMQ,EAA+B,CAAA,EACrC,SAAW,CAACI,EAAKK,CAAK,IAAK,OAAO,QAAQK,CAAM,EAC9C,GAAIV,IAAQR,GAAaa,GAAS,OAAOA,GAAU,UAAY,CAAC,MAAM,QAAQA,CAAK,GACjF,SAAW,CAACf,EAAQK,CAAM,IAAK,OAAO,QAAQU,CAAgC,EAC5E,GAAIV,GAAU,OAAOA,GAAW,SAC9B,SAAW,CAACJ,EAAOoB,CAAC,IAAK,OAAO,QAAQhB,CAAiC,EACvEC,EAAIP,EAAqBC,EAAQC,EAAOC,CAAS,CAAC,EAAImB,OAK5Df,EAAII,CAAG,EAAIK,EAGf,OAAOT,CACT,CAcO,SAASgB,EAAWC,EAA2C,CACpE,MAAMC,EAAK,IAAI,SACTC,EAAS,CAACf,EAAaK,IAAyB,CACpD,GAAIA,GAAU,KACd,GAAIA,aAAiB,KACnBS,EAAG,OAAOd,EAAKK,CAAK,UACXA,aAAiB,KAC1BS,EAAG,OAAOd,EAAKK,EAAM,YAAA,CAAa,UACzB,MAAM,QAAQA,CAAK,EAE5BA,EACG,OAAQW,GAASA,GAAQ,IAAI,EAC7B,QAAQ,CAACA,EAAMC,IAAUF,EAAO,GAAGf,CAAG,IAAIiB,CAAK,IAAKD,CAAI,CAAC,UACnD,OAAOX,GAAU,SAAU,CACpC,MAAMa,EAAQ,OAAO,eAAeb,CAAK,EACzC,GAAIa,IAAU,OAAO,WAAaA,IAAU,KAC1C,SAAW,CAACC,EAAGR,CAAC,IAAK,OAAO,QAAQN,CAAgC,EAClEU,EAAO,GAAGf,CAAG,IAAImB,CAAC,IAAKR,CAAC,OAE1BG,EAAG,OAAOd,EAAK,OAAOK,CAAK,CAAC,CAEhC,MACES,EAAG,OAAOd,EAAK,OAAOK,CAAK,CAAC,CAEhC,EACA,SAAW,CAACL,EAAKK,CAAK,IAAK,OAAO,QAAQQ,CAAM,EAAGE,EAAOf,EAAKK,CAAK,EACpE,OAAOS,CACT"}
@@ -0,0 +1,74 @@
1
+ const c = "translations", l = (r, s, n = c) => `${n}[${r}].${s}`;
2
+ function p(r, s, n = c) {
3
+ const o = {};
4
+ for (const t of r) {
5
+ const e = typeof t == "string" ? t : t.code;
6
+ for (const f of Object.keys(s))
7
+ o[l(e, f, n)] = s[f];
8
+ }
9
+ return o;
10
+ }
11
+ function d(r, s) {
12
+ const n = `${s}[`;
13
+ if (!r.startsWith(n)) return null;
14
+ const o = r.indexOf("]", n.length);
15
+ if (o === -1 || r[o + 1] !== ".") return null;
16
+ const t = r.slice(n.length, o), e = r.slice(o + 2);
17
+ return t && e ? { locale: t, field: e } : null;
18
+ }
19
+ function b(r, s = c) {
20
+ var o;
21
+ const n = {};
22
+ for (const [t, e] of Object.entries(r)) {
23
+ const f = d(t, s);
24
+ if (f) {
25
+ const i = n[s] ?? (n[s] = {});
26
+ (i[o = f.locale] ?? (i[o] = {}))[f.field] = e;
27
+ } else
28
+ n[t] = e;
29
+ }
30
+ return n;
31
+ }
32
+ function O(r, s = c) {
33
+ const n = {};
34
+ for (const [o, t] of Object.entries(r))
35
+ if (o === s && t && typeof t == "object" && !Array.isArray(t)) {
36
+ for (const [e, f] of Object.entries(t))
37
+ if (f && typeof f == "object")
38
+ for (const [i, a] of Object.entries(f))
39
+ n[l(e, i, s)] = a;
40
+ } else
41
+ n[o] = t;
42
+ return n;
43
+ }
44
+ function j(r) {
45
+ const s = new FormData(), n = (o, t) => {
46
+ if (t != null)
47
+ if (t instanceof Blob)
48
+ s.append(o, t);
49
+ else if (t instanceof Date)
50
+ s.append(o, t.toISOString());
51
+ else if (Array.isArray(t))
52
+ t.filter((e) => e != null).forEach((e, f) => n(`${o}[${f}]`, e));
53
+ else if (typeof t == "object") {
54
+ const e = Object.getPrototypeOf(t);
55
+ if (e === Object.prototype || e === null)
56
+ for (const [f, i] of Object.entries(t))
57
+ n(`${o}[${f}]`, i);
58
+ else
59
+ s.append(o, String(t));
60
+ } else
61
+ s.append(o, String(t));
62
+ };
63
+ for (const [o, t] of Object.entries(r)) n(o, t);
64
+ return s;
65
+ }
66
+ export {
67
+ c as D,
68
+ p as a,
69
+ l as b,
70
+ O as f,
71
+ b as n,
72
+ j as t
73
+ };
74
+ //# sourceMappingURL=translations-D15tFHM1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translations-D15tFHM1.js","sources":["../src/helpers/translations.ts"],"sourcesContent":["import type { LocaleConfig } from '../theme'\n\n/**\n * Translation form helpers — framework-agnostic glue between `<TranslatedFields>`' **flat** field\n * names (`translations[en-US].title` — the `FormData` shape) and the **nested** JSON shape\n * (`{ translations: { 'en-US': { title } } }`). Public from `sava-test/helpers`.\n */\n\n/** The default top-level namespace for the translation field names + the nested object. */\nexport const DEFAULT_TRANSLATIONS_NAMESPACE = 'translations'\n\n/**\n * Builds a field's form name: `<namespace>[<locale>].<field>` (e.g. `translations[en-US].title`) —\n * the flat, bracketed key that maps cleanly to `FormData`. `namespace` defaults to `'translations'`.\n */\nexport const buildTranslationName = (\n locale: string,\n field: string,\n namespace: string = DEFAULT_TRANSLATIONS_NAMESPACE,\n): string => `${namespace}[${locale}].${field}`\n\n/**\n * Expands a per-field map into the flat, locale-namespaced record `<TranslatedFields>` submits — use\n * it to build a `<Form>`'s `defaultValues` **and** (with Zod field schemas as the values) the schema\n * shape. Pass the same `namespace` you give the component if you changed it.\n *\n * ```ts\n * const locales = ['en-US', 'ka-GE']\n * const fields = { title: '', description: '', shortDescription: '' }\n * const defaultValues = buildTranslations(locales, fields)\n * // { 'translations[en-US].title': '', …, 'translations[ka-GE].shortDescription': '' }\n * const schema = z.object(\n * buildTranslations(locales, { title: z.string().min(1), description: z.string(), shortDescription: z.string() }),\n * )\n * ```\n */\nexport function buildTranslations<T>(\n locales: ReadonlyArray<string | LocaleConfig>,\n fields: Record<string, T>,\n namespace: string = DEFAULT_TRANSLATIONS_NAMESPACE,\n): Record<string, T> {\n const out: Record<string, T> = {}\n for (const loc of locales) {\n const code = typeof loc === 'string' ? loc : loc.code\n for (const field of Object.keys(fields)) {\n out[buildTranslationName(code, field, namespace)] = fields[field]\n }\n }\n return out\n}\n\n/** Parse a flat translation key (`<namespace>[<locale>].<field>`) → `{ locale, field }`, or `null`. */\nfunction parseTranslationKey(\n key: string,\n namespace: string,\n): { locale: string; field: string } | null {\n const open = `${namespace}[`\n if (!key.startsWith(open)) return null\n const close = key.indexOf(']', open.length)\n if (close === -1 || key[close + 1] !== '.') return null\n const locale = key.slice(open.length, close)\n const field = key.slice(close + 2)\n return locale && field ? { locale, field } : null\n}\n\n/**\n * Flat form values → the **nested** JSON shape. Translation keys (`translations[en-US].title`) fold\n * into `{ [namespace]: { [locale]: { [field]: value } } }`; every other key stays top-level. Use it at\n * the submit boundary when you POST JSON (rather than `FormData`):\n *\n * ```ts\n * await api.post('/news', nestTranslations(form.values))\n * // { email: 1, translations: { 'en-US': { title: '…' }, 'ka-GE': { title: '…' } } }\n * ```\n */\nexport function nestTranslations(\n flat: Record<string, unknown>,\n namespace: string = DEFAULT_TRANSLATIONS_NAMESPACE,\n): Record<string, unknown> {\n const out: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(flat)) {\n const parsed = parseTranslationKey(key, namespace)\n if (parsed) {\n const bucket = (out[namespace] ??= {}) as Record<string, Record<string, unknown>>\n ;(bucket[parsed.locale] ??= {})[parsed.field] = value\n } else {\n out[key] = value\n }\n }\n return out\n}\n\n/**\n * The inverse of `nestTranslations`: a **nested** object (e.g. a backend response) → the flat values a\n * `<Form>` / `<TranslatedFields>` expects. Feed the result as `defaultValues` (or into `reset`):\n *\n * ```ts\n * const form = useForm({ schema, defaultValues: flattenTranslations(response) })\n * // { email: 1, 'translations[en-US].title': '…', 'translations[ka-GE].title': '…' }\n * ```\n */\nexport function flattenTranslations(\n nested: Record<string, unknown>,\n namespace: string = DEFAULT_TRANSLATIONS_NAMESPACE,\n): Record<string, unknown> {\n const out: Record<string, unknown> = {}\n for (const [key, value] of Object.entries(nested)) {\n if (key === namespace && value && typeof value === 'object' && !Array.isArray(value)) {\n for (const [locale, fields] of Object.entries(value as Record<string, unknown>)) {\n if (fields && typeof fields === 'object') {\n for (const [field, v] of Object.entries(fields as Record<string, unknown>)) {\n out[buildTranslationName(locale, field, namespace)] = v\n }\n }\n }\n } else {\n out[key] = value\n }\n }\n return out\n}\n\n/**\n * Serialize flat form values into a `FormData` for a `multipart/form-data` POST. The flat translation\n * keys map straight through (`translations[en-US].title`); arrays become indexed keys (`tags[0]`,\n * `tags[1]`) with nullish items skipped so indices stay contiguous; `Blob`/`File` values are appended\n * as-is; a `Date` becomes an ISO string; only **plain** objects recurse (a class instance like a dayjs\n * object is stringified, not exploded into `$d`/`$y` keys); `null`/`undefined` are skipped; everything\n * else is stringified.\n *\n * ```ts\n * await fetch('/news', { method: 'POST', body: toFormData(form.values) })\n * ```\n */\nexport function toFormData(values: Record<string, unknown>): FormData {\n const fd = new FormData()\n const append = (key: string, value: unknown): void => {\n if (value === null || value === undefined) return\n if (value instanceof Blob) {\n fd.append(key, value)\n } else if (value instanceof Date) {\n fd.append(key, value.toISOString())\n } else if (Array.isArray(value)) {\n // drop nullish items so indices stay contiguous (gapped indices break strict parsers)\n value\n .filter((item) => item != null)\n .forEach((item, index) => append(`${key}[${index}]`, item))\n } else if (typeof value === 'object') {\n const proto = Object.getPrototypeOf(value)\n if (proto === Object.prototype || proto === null) {\n for (const [k, v] of Object.entries(value as Record<string, unknown>))\n append(`${key}[${k}]`, v)\n } else {\n fd.append(key, String(value)) // class instance (Date handled above) → stringify, don't explode keys\n }\n } else {\n fd.append(key, String(value))\n }\n }\n for (const [key, value] of Object.entries(values)) append(key, value)\n return fd\n}\n"],"names":["DEFAULT_TRANSLATIONS_NAMESPACE","buildTranslationName","locale","field","namespace","buildTranslations","locales","fields","out","loc","code","parseTranslationKey","key","open","close","nestTranslations","flat","_a","value","parsed","bucket","flattenTranslations","nested","v","toFormData","values","fd","append","item","index","proto","k"],"mappings":"AASO,MAAMA,IAAiC,gBAMjCC,IAAuB,CAClCC,GACAC,GACAC,IAAoBJ,MACT,GAAGI,CAAS,IAAIF,CAAM,KAAKC,CAAK;AAiBtC,SAASE,EACdC,GACAC,GACAH,IAAoBJ,GACD;AACnB,QAAMQ,IAAyB,CAAA;AAC/B,aAAWC,KAAOH,GAAS;AACzB,UAAMI,IAAO,OAAOD,KAAQ,WAAWA,IAAMA,EAAI;AACjD,eAAWN,KAAS,OAAO,KAAKI,CAAM;AACpC,MAAAC,EAAIP,EAAqBS,GAAMP,GAAOC,CAAS,CAAC,IAAIG,EAAOJ,CAAK;AAAA,EAEpE;AACA,SAAOK;AACT;AAGA,SAASG,EACPC,GACAR,GAC0C;AAC1C,QAAMS,IAAO,GAAGT,CAAS;AACzB,MAAI,CAACQ,EAAI,WAAWC,CAAI,EAAG,QAAO;AAClC,QAAMC,IAAQF,EAAI,QAAQ,KAAKC,EAAK,MAAM;AAC1C,MAAIC,MAAU,MAAMF,EAAIE,IAAQ,CAAC,MAAM,IAAK,QAAO;AACnD,QAAMZ,IAASU,EAAI,MAAMC,EAAK,QAAQC,CAAK,GACrCX,IAAQS,EAAI,MAAME,IAAQ,CAAC;AACjC,SAAOZ,KAAUC,IAAQ,EAAE,QAAAD,GAAQ,OAAAC,MAAU;AAC/C;AAYO,SAASY,EACdC,GACAZ,IAAoBJ,GACK;AArEpB,MAAAiB;AAsEL,QAAMT,IAA+B,CAAA;AACrC,aAAW,CAACI,GAAKM,CAAK,KAAK,OAAO,QAAQF,CAAI,GAAG;AAC/C,UAAMG,IAASR,EAAoBC,GAAKR,CAAS;AACjD,QAAIe,GAAQ;AACV,YAAMC,IAAUZ,EAAAJ,OAAAI,EAAAJ,KAAmB,CAAA;AAClC,OAACgB,EAAAH,IAAOE,EAAO,YAAdC,EAAAH,KAA0B,CAAA,IAAIE,EAAO,KAAK,IAAID;AAAA,IAClD;AACE,MAAAV,EAAII,CAAG,IAAIM;AAAA,EAEf;AACA,SAAOV;AACT;AAWO,SAASa,EACdC,GACAlB,IAAoBJ,GACK;AACzB,QAAMQ,IAA+B,CAAA;AACrC,aAAW,CAACI,GAAKM,CAAK,KAAK,OAAO,QAAQI,CAAM;AAC9C,QAAIV,MAAQR,KAAac,KAAS,OAAOA,KAAU,YAAY,CAAC,MAAM,QAAQA,CAAK;AACjF,iBAAW,CAAChB,GAAQK,CAAM,KAAK,OAAO,QAAQW,CAAgC;AAC5E,YAAIX,KAAU,OAAOA,KAAW;AAC9B,qBAAW,CAACJ,GAAOoB,CAAC,KAAK,OAAO,QAAQhB,CAAiC;AACvE,YAAAC,EAAIP,EAAqBC,GAAQC,GAAOC,CAAS,CAAC,IAAImB;AAAA;AAK5D,MAAAf,EAAII,CAAG,IAAIM;AAGf,SAAOV;AACT;AAcO,SAASgB,EAAWC,GAA2C;AACpE,QAAMC,IAAK,IAAI,SAAA,GACTC,IAAS,CAACf,GAAaM,MAAyB;AACpD,QAAIA,KAAU;AACd,UAAIA,aAAiB;AACnB,QAAAQ,EAAG,OAAOd,GAAKM,CAAK;AAAA,eACXA,aAAiB;AAC1B,QAAAQ,EAAG,OAAOd,GAAKM,EAAM,YAAA,CAAa;AAAA,eACzB,MAAM,QAAQA,CAAK;AAE5B,QAAAA,EACG,OAAO,CAACU,MAASA,KAAQ,IAAI,EAC7B,QAAQ,CAACA,GAAMC,MAAUF,EAAO,GAAGf,CAAG,IAAIiB,CAAK,KAAKD,CAAI,CAAC;AAAA,eACnD,OAAOV,KAAU,UAAU;AACpC,cAAMY,IAAQ,OAAO,eAAeZ,CAAK;AACzC,YAAIY,MAAU,OAAO,aAAaA,MAAU;AAC1C,qBAAW,CAACC,GAAGR,CAAC,KAAK,OAAO,QAAQL,CAAgC;AAClE,YAAAS,EAAO,GAAGf,CAAG,IAAImB,CAAC,KAAKR,CAAC;AAAA;AAE1B,UAAAG,EAAG,OAAOd,GAAK,OAAOM,CAAK,CAAC;AAAA,MAEhC;AACE,QAAAQ,EAAG,OAAOd,GAAK,OAAOM,CAAK,CAAC;AAAA,EAEhC;AACA,aAAW,CAACN,GAAKM,CAAK,KAAK,OAAO,QAAQO,CAAM,EAAG,CAAAE,EAAOf,GAAKM,CAAK;AACpE,SAAOQ;AACT;"}