@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 @@
1
+ {"version":3,"file":"FileUploader-VtmmwUFE.js","sources":["../src/components/FileUploader/FileUploaderEditDialog.tsx","../src/components/FileUploader/FileUploaderPreview.tsx","../src/components/FileUploader/FileUploader.tsx"],"sourcesContent":["import { useRef, useState, type ChangeEvent } from 'react'\nimport ReactCrop, { type Crop, type PercentCrop, type PixelCrop } from 'react-image-crop'\nimport 'react-image-crop/dist/ReactCrop.css'\nimport { useT, type LocaleConfig } from '../../theme'\nimport { Button } from '../Button'\nimport { Modal } from '../Modal'\nimport { TextField } from '../TextField'\nimport { Typography } from '../Typography'\nimport styles from './FileUploaderEditDialog.module.css'\n\n/** What a dialog hands back on Save: the alt-text draft (alt-text mode) or a cropped File (crop mode). */\nexport interface EditDialogResult {\n /** Alt-text values keyed by locale code (or the single `''` key in non-localized mode). */\n draft?: Record<string, string>\n /** A freshly-cropped File (native-resolution, lossless). */\n croppedFile?: File\n}\n\nexport interface FileUploaderEditDialogProps {\n /** Which editor to show — the **crop** stage or the **alt text** fields (each is its own modal). */\n mode: 'crop' | 'altText'\n /** Display name (modal description + the cropped File's name). */\n name: string\n /** Image URL for crop mode (object URL for a File, or the source URL). */\n imageUrl: string | null\n /** MIME type for the cropped output — keeps the original (PNG ⇒ lossless). */\n mimeType: string\n /** Locales for the alt-text editor (one field each); a single `{ code: '' }` ⇒ one plain field. */\n editLocales: LocaleConfig[]\n /** The alt-text draft to seed from the item's current value. */\n initialDraft: Record<string, string>\n /** Close without saving. */\n onClose: () => void\n /** Commit the result (alt-text draft or cropped File). */\n onSave: (result: EditDialogResult) => void\n}\n\n/** The crop selection in the image's NATIVE pixels — what actually gets exported (no resample / resize). */\ninterface NaturalCrop {\n x: number\n y: number\n width: number\n height: number\n}\n\n/**\n * The FileUploader per-item edit modal. Two separate modes (each opened from its own card button):\n * **`crop`** — a draggable selection over the image, exported at the image's native resolution (lossless,\n * dimensions shown live); **`altText`** — one `TextField` per locale (stacked, no tabs). Built on the\n * library's `Modal` + `TextField` and **`react-image-crop`** (an optional peer). Internal — not exported.\n */\nexport function FileUploaderEditDialog({\n mode,\n name,\n imageUrl,\n mimeType,\n editLocales,\n initialDraft,\n onClose,\n onSave,\n}: FileUploaderEditDialogProps) {\n const t = useT()\n const imgRef = useRef<HTMLImageElement>(null)\n const [crop, setCrop] = useState<Crop>()\n // store the crop in NATIVE coords (computed on every drag) so the export never depends on display size\n const [naturalCrop, setNaturalCrop] = useState<NaturalCrop | null>(null)\n // the image's intrinsic size (captured on load) — shown as the readout until a crop is selected\n const [naturalSize, setNaturalSize] = useState<{ w: number; h: number } | null>(null)\n const [draft, setDraft] = useState<Record<string, string>>(initialDraft)\n const [cropError, setCropError] = useState<string | null>(null)\n const [busy, setBusy] = useState(false)\n\n const onCropChange = (px: PixelCrop, percent: PercentCrop) => {\n setCrop(percent)\n const img = imgRef.current\n if (img && img.width > 0 && px.width >= 1 && px.height >= 1) {\n const sx = img.naturalWidth / img.width\n const sy = img.naturalHeight / img.height\n setNaturalCrop({\n x: Math.round(px.x * sx),\n y: Math.round(px.y * sy),\n width: Math.round(px.width * sx),\n height: Math.round(px.height * sy),\n })\n } else {\n setNaturalCrop(null)\n }\n }\n\n // Crop at native resolution: copy the selected region 1:1 (no resample → no quality loss, no resize).\n const buildCroppedFile = async (): Promise<File | undefined> => {\n const image = imgRef.current\n if (!image || !naturalCrop || naturalCrop.width < 1 || naturalCrop.height < 1) return undefined\n const canvas = document.createElement('canvas')\n canvas.width = naturalCrop.width\n canvas.height = naturalCrop.height\n const ctx = canvas.getContext('2d')\n if (!ctx) return undefined\n ctx.imageSmoothingEnabled = false // 1:1 native-pixel copy — no resampling\n ctx.drawImage(\n image,\n naturalCrop.x,\n naturalCrop.y,\n naturalCrop.width,\n naturalCrop.height,\n 0,\n 0,\n naturalCrop.width,\n naturalCrop.height,\n )\n // toBlob throws on a cross-origin-tainted canvas — let handleSave catch it\n const blob = await new Promise<Blob | null>((resolve) => canvas.toBlob(resolve, mimeType, 1))\n // a null blob is a failed export too (not just tainted) — throw so it surfaces as a crop error\n // instead of silently resolving to `undefined` and discarding the crop with no feedback\n if (!blob) throw new Error('canvas.toBlob returned null')\n return new File([blob], name, { type: mimeType, lastModified: Date.now() })\n }\n\n const handleSave = async () => {\n if (mode === 'altText') {\n onSave({ draft })\n return\n }\n setBusy(true)\n try {\n const croppedFile =\n naturalCrop && naturalCrop.width >= 1 && naturalCrop.height >= 1\n ? await buildCroppedFile()\n : undefined\n onSave({ croppedFile }) // parent commits + closes (this dialog unmounts)\n } catch {\n setCropError(t('fileUploader.cropError'))\n setBusy(false)\n }\n }\n\n return (\n <Modal\n open\n onClose={onClose}\n size={mode === 'crop' ? 'lg' : 'sm'}\n icon={mode === 'crop' ? 'Crop' : 'Text'}\n title={mode === 'crop' ? t('fileUploader.cropTitle') : t('fileUploader.altTitle')}\n description={name}\n footer={\n <>\n <Button variant=\"text\" color=\"accent\" onClick={onClose} disabled={busy}>\n {t('common.cancel')}\n </Button>\n <Button onClick={handleSave} loading={busy}>\n {t('common.save')}\n </Button>\n </>\n }\n >\n {mode === 'crop' ? (\n <div className={styles.cropSection}>\n <div className={styles.cropHead}>\n <Typography variant=\"bodySmall\" color=\"muted\">\n {t('fileUploader.cropHint')}\n </Typography>\n <Typography variant=\"bodySmall\" color={naturalCrop ? 'text' : 'muted'}>\n {naturalCrop\n ? `${naturalCrop.width} × ${naturalCrop.height} px`\n : naturalSize\n ? `${naturalSize.w} × ${naturalSize.h} px`\n : ''}\n </Typography>\n </div>\n <div className={styles.cropStage}>\n <ReactCrop crop={crop} onChange={onCropChange} className={styles.crop}>\n <img\n ref={imgRef}\n src={imageUrl ?? undefined}\n alt=\"\"\n className={styles.cropImg}\n onLoad={(e) =>\n setNaturalSize({\n w: e.currentTarget.naturalWidth,\n h: e.currentTarget.naturalHeight,\n })\n }\n />\n </ReactCrop>\n </div>\n {cropError && (\n <Typography variant=\"bodySmall\" color=\"error\">\n {cropError}\n </Typography>\n )}\n </div>\n ) : (\n <div className={styles.altFields}>\n {editLocales.map((l) => (\n <TextField\n key={l.code}\n label={l.label ?? (l.code || t('fileUploader.altTitle'))}\n placeholder={t('fileUploader.altPlaceholder')}\n value={draft[l.code] ?? ''}\n onChange={(e: ChangeEvent<HTMLInputElement>) =>\n setDraft((d) => ({ ...d, [l.code]: e.target.value }))\n }\n />\n ))}\n </div>\n )}\n </Modal>\n )\n}\n","import { clsx } from 'clsx'\nimport { useT } from '../../theme'\nimport { Icon } from '../Icon'\nimport { Overlay } from '../Overlay/Overlay'\nimport styles from './FileUploaderPreview.module.css'\n\nexport interface FileUploaderPreviewProps {\n /** The media URL (a File's object URL or a source URL). */\n url: string\n /** Render a `<video controls>` instead of an `<img>`. */\n isVideo: boolean\n /**\n * The image is an SVG — a vector has no reliable pixel size (a viewBox-only icon shows tiny, a sizeless\n * one collapses to nothing), so when set the image is given a floored box (`min-*` + `object-fit:\n * contain`): a small SVG scales up to a visible minimum while a larger one keeps its real size.\n */\n isSvg?: boolean\n /** Accessible name / image alt. */\n name: string\n /** Dismiss the overlay. */\n onClose: () => void\n}\n\n/**\n * A fullscreen media lightbox for the FileUploader — a dark backdrop with the image (or a `<video>` with\n * controls) centered. Built on the shared `<Overlay>` (portal to `<body>`, scroll-lock, fade-in, backdrop\n * / Escape dismissal); a darker scrim (`dim={0.85}`) than a Modal since media reads over black. Opened\n * from a card's **Eye** button (image + video items only). Internal — not exported.\n */\nexport function FileUploaderPreview({\n url,\n isVideo,\n isSvg,\n name,\n onClose,\n}: FileUploaderPreviewProps) {\n const t = useT()\n return (\n <Overlay\n open\n onClose={onClose}\n dim={0.85}\n className={styles.backdrop}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label={t('fileUploader.preview', { name })}\n >\n <button\n type=\"button\"\n className={styles.close}\n aria-label={t('fileUploader.closePreview')}\n onClick={onClose}\n autoFocus\n >\n <Icon name=\"Close\" size=\"lg\" />\n </button>\n {isVideo ? (\n <video src={url} className={styles.media} controls playsInline />\n ) : (\n // an SVG's natural size is unreliable, so it always gets the floored box (`.mediaSvg`); a raster\n // keeps its natural size, only capped to the viewport (`.media`)\n <img src={url} alt={name} className={clsx(styles.media, isSvg && styles.mediaSvg)} />\n )}\n </Overlay>\n )\n}\n","import {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type CSSProperties,\n type FocusEvent,\n type HTMLAttributes,\n type ReactNode,\n} from 'react'\nimport { clsx } from 'clsx'\nimport {\n DndContext,\n KeyboardSensor,\n PointerSensor,\n closestCenter,\n useSensor,\n useSensors,\n type DragEndEvent,\n} from '@dnd-kit/core'\nimport {\n SortableContext,\n arrayMove,\n useSortable,\n sortableKeyboardCoordinates,\n rectSortingStrategy,\n} from '@dnd-kit/sortable'\nimport { CSS } from '@dnd-kit/utilities'\nimport type { AutoAnimationPlugin } from '@formkit/auto-animate'\nimport { useAutoAnimate } from '@formkit/auto-animate/react'\nimport { useDropzone, type Accept, type FileRejection } from 'react-dropzone'\nimport { useFormContext } from '../../form/formContext'\nimport { useLocales, useT, type LocaleConfig } from '../../theme'\nimport { toast } from '../Toast/toastStore'\nimport { Icon } from '../Icon'\nimport { Typography } from '../Typography'\nimport { FileUploaderEditDialog, type EditDialogResult } from './FileUploaderEditDialog'\nimport { FileUploaderPreview } from './FileUploaderPreview'\n// shared field chrome (wrapper / label / required / helper) — the Slider precedent\nimport fieldStyles from '../TextField/TextField.module.css'\nimport styles from './FileUploader.module.css'\n\n/**\n * A single file entry. A freshly-picked file carries its binary in `file`; an already-uploaded one\n * (a backend response, edit mode) carries only its URL in `source` — then `file` is absent.\n */\nexport interface FileUploaderItem {\n /** The picked binary — present for a newly-selected file, absent for an already-uploaded one. */\n file?: File\n /** Server URL of an already-uploaded file (edit mode); `''` for a fresh pick. */\n source?: string\n /** Position in the list (0-based) — kept in sync with the visual order on every change. */\n sortIndex: number\n /**\n * Optional alt text, edited per card via the `allowAltText` modal. **Per-locale by default** —\n * `Record<localeCode, string>` (e.g. `{ 'en-US': 'A red car', 'ka-GE': '…' }`); with\n * **`localizedAltText={false}`** it's a single **`string`**. Absent until something is typed.\n */\n altText?: Record<string, string> | string\n}\n\n/** Single mode → one item (or `null`); `multiple` mode → an array. */\nexport type FileUploaderValue = FileUploaderItem | FileUploaderItem[] | null\n\nexport interface FileUploaderProps extends Omit<\n HTMLAttributes<HTMLDivElement>,\n 'onChange' | 'defaultValue'\n> {\n /** Accept more than one file — the value becomes an array. Defaults to `false`. */\n multiple?: boolean\n /** Allow dropping files onto the dropzone (drag from the OS). Defaults to `true`. */\n allowDrop?: boolean\n /** Allow drag + keyboard reordering of the rows (only meaningful with `multiple`). Defaults to `true`. */\n allowReorder?: boolean\n /** Show a download button on each item (downloads the File / source). Defaults to `true`. */\n allowDownload?: boolean\n /**\n * Show a per-card **preview** (Eye) button — opens a fullscreen lightbox of the image / video. Defaults\n * to `true`. Only rendered for **image + video** items (a PDF / doc has nothing to preview).\n */\n allowPreview?: boolean\n /**\n * Show a per-card **edit** button that opens a modal for editing the item's `altText`. Defaults to\n * `true` — pass `false` to hide it. The modal renders one input per content locale (a tab strip when\n * there are several), so the edited value lands in `item.altText` keyed by locale code (or a single\n * string with `localizedAltText={false}`).\n */\n allowAltText?: boolean\n /**\n * Locales for the `allowAltText` editor (one input/tab each). Defaults to the app's `ConfigProvider`\n * locales (`useLocales()`); pass this to override — mirrors `<TranslatedFields locales>`. Ignored when\n * `localizedAltText` is `false`.\n */\n altTextLocales?: LocaleConfig[]\n /**\n * Whether the `allowAltText` editor is **per-locale**. Defaults to `true` — `altText` is a\n * `Record<localeCode, string>` with one input/tab per locale. Pass **`false`** for a single plain input\n * (no locales), so `altText` is just a **`string`**.\n */\n localizedAltText?: boolean\n /**\n * Allow the same file to be added more than once. By default (`false`) a pick that matches an\n * already-present item by content (a File by name + size + last-modified, a source by URL) is skipped\n * and a notice is shown. Only meaningful with `multiple` (single mode replaces, so it can't stack).\n */\n allowDuplicates?: boolean\n /** Disables the whole control — no adding, removing, reordering, or downloading; dimmed + inert. */\n disabled?: boolean\n /**\n * Accepted file types (react-dropzone's format: a MIME type → file-extensions map) — restricts the file\n * picker and rejects non-matching picks/drops (a rejection raises a `toast.error`). E.g. `{ 'image/*': [] }`\n * or `{ 'image/*': [], 'application/pdf': ['.pdf'] }`. Omit to accept any type.\n */\n accept?: Accept\n /** Maximum number of files (only meaningful with `multiple`). Picks beyond it are rejected with a notice. */\n maxFiles?: number\n /**\n * Maximum size per file — a bytes `number`, or a human string like `\"5MB\"` / `\"500KB\"`. A picked file\n * over the limit is **rejected** (not added) and raises a **`toast.error`** (so a `<Toaster>` — mounted\n * by `RootLayout` by default — must be present to see it). A file supplied via `value`/`defaultValue`\n * that exceeds the limit is still rendered but flagged in an error state (red ring + `\"Exceeds … limit\"`).\n */\n maxFileSize?: number | string\n /** Where a newly added file lands in the list (`multiple` only): `'start'` (top) or `'end'` (bottom). Defaults to `'end'`. */\n itemInsertLocation?: 'start' | 'end'\n /** Controlled value — one item (or `null`) when single, an array when `multiple`. */\n value?: FileUploaderValue\n /** Initial value for uncontrolled use. */\n defaultValue?: FileUploaderValue\n /** Fires with the next value whenever files are added, removed, or reordered. */\n onChange?: (value: FileUploaderValue) => void\n /** Label rendered above the control. */\n label?: ReactNode\n /** Marks the field invalid: red dropzone border + the `helperText` in the error color. */\n error?: boolean\n /** Helper / validation text under the control. Adopts the error color while `error`. */\n helperText?: ReactNode\n /** Adds a red asterisk after the label. */\n required?: boolean\n /** Stretches the control to fill its container width. Defaults to `true`. */\n fullWidth?: boolean\n /**\n * Binds the field to a surrounding `<Form>` — the form value is the item / array, validated with e.g.\n * `z.array(fileItemSchema).min(1)`. Reads the raw `form.values[name]` and writes via `setValue`;\n * error/touched come from the form, and the form's scroll-to-error can focus the field.\n */\n name?: string\n}\n\nconst canMakeObjectUrl = (): boolean =>\n typeof URL !== 'undefined' && typeof URL.createObjectURL === 'function'\n\n// auto-animate plugin: the ENTER (add) is handled by a CSS mount animation on `.row` (a reliable, visible\n// drop-in), so here `add` is a no-op to avoid double-animating; auto-animate still smoothly animates the\n// `remove` (lift + fade) and the `remain` reflow (rows sliding up to fill a gap).\nconst ANIM_MS = 300\nconst listAnimation: AutoAnimationPlugin = (el, action, oldCoords, newCoords) => {\n let keyframes: Keyframe[] = [{}, {}]\n let duration = ANIM_MS\n if (action === 'add') {\n duration = 0\n } else if (action === 'remove') {\n keyframes = [\n { opacity: 1, transform: 'translateY(0)' },\n { opacity: 0, transform: 'translateY(-8px)' },\n ]\n } else if (oldCoords && newCoords) {\n const dx = oldCoords.left - newCoords.left\n const dy = oldCoords.top - newCoords.top\n keyframes = [{ transform: `translate(${dx}px, ${dy}px)` }, { transform: 'translate(0, 0)' }]\n }\n return new KeyframeEffect(el, keyframes, { duration, easing: 'ease-out' })\n}\n\n/** Human-readable byte size, e.g. `2.4 MB`. (Exported for unit tests; not part of the public surface.) */\nexport const formatBytes = (bytes: number): string => {\n if (bytes < 1024) return `${bytes} B`\n const units = ['KB', 'MB', 'GB', 'TB']\n let value = bytes / 1024\n let i = 0\n while (value >= 1024 && i < units.length - 1) {\n value /= 1024\n i += 1\n }\n return `${value.toFixed(value < 10 ? 1 : 0)} ${units[i]}`\n}\n\n/** Coerce a `maxFileSize` (a bytes number, or a human string like `\"5MB\"` / `\"500 KB\"`) to bytes. */\nexport const toBytes = (size: number | string): number | undefined => {\n if (typeof size === 'number') return size\n const match = /^\\s*([\\d.]+)\\s*(b|kb|mb|gb|tb)?\\s*$/i.exec(size)\n if (!match) return undefined\n const units: Record<string, number> = {\n b: 1,\n kb: 1024,\n mb: 1024 ** 2,\n gb: 1024 ** 3,\n tb: 1024 ** 4,\n }\n return parseFloat(match[1]) * (units[(match[2] || 'b').toLowerCase()] ?? 1)\n}\n\n/**\n * A content-identity key for de-duplication. The same file picked twice arrives as two distinct `File`\n * objects (so a `WeakMap`/reference check can't catch it), but its name + size + last-modified match.\n */\nexport const fileKey = (file: File): string => `f:${file.name}:${file.size}:${file.lastModified}`\n/** The dedup key for an existing item — a File by its content, an already-uploaded one by its URL. */\nexport const itemKey = (item: FileUploaderItem): string =>\n item.file ? fileKey(item.file) : `s:${item.source ?? ''}`\n\n/** Display name — the File's name or the last path segment of a source URL. */\nexport const labelOf = (item: FileUploaderItem): string => {\n if (item.file) return item.file.name\n if (item.source) {\n if (/^(data|blob):/i.test(item.source)) return 'File'\n return item.source.split(/[?#]/)[0].split('/').pop() || 'File'\n }\n return 'File'\n}\n\n/**\n * Whether an item is an image — the only kind that gets the **crop** + **alt-text** editors (a video / PDF\n * / doc has nothing to crop or describe). A File is judged by its MIME `type`; a source URL by a known\n * image extension or a `data:image/…` URI, defaulting to `true` when it carries no recognizable extension\n * (the image-first assumption — e.g. extensionless CDN URLs).\n */\nexport const isImageItem = (item: FileUploaderItem): boolean => {\n if (item.file) return item.file.type.startsWith('image/')\n const src = item.source\n if (!src) return false\n if (/^data:image\\//i.test(src)) return true\n if (/^data:/i.test(src)) return false // a non-image data URI\n return (\n /\\.(png|jpe?g|gif|webp|avif|svg|bmp|ico|heic|heif)(?:[?#]|$)/i.test(src) ||\n !/\\.[a-z0-9]{1,8}(?:[?#]|$)/i.test(src)\n )\n}\n\n/** Whether an item is a video — rendered as a playable `<video controls>` preview instead of an `<img>`. */\nexport const isVideoItem = (item: FileUploaderItem): boolean => {\n if (item.file) return item.file.type.startsWith('video/')\n const src = item.source\n if (!src) return false\n return /^data:video\\//i.test(src) || /\\.(mp4|webm|ogg|ogv|mov|m4v|avi|mkv)(?:[?#]|$)/i.test(src)\n}\n\n/** Download an item — a File via a fresh object URL, a source URL via a download link. */\nconst triggerDownload = (item: FileUploaderItem) => {\n if (typeof document === 'undefined') return\n const a = document.createElement('a')\n a.style.display = 'none'\n if (item.file) {\n if (!canMakeObjectUrl()) return\n const url = URL.createObjectURL(item.file)\n a.href = url\n a.download = item.file.name\n document.body.appendChild(a)\n a.click()\n a.remove()\n setTimeout(() => URL.revokeObjectURL(url), 1000)\n } else if (item.source) {\n a.href = item.source\n a.download = labelOf(item)\n a.target = '_blank'\n a.rel = 'noopener'\n document.body.appendChild(a)\n a.click()\n a.remove()\n }\n}\n\n/**\n * Split a name into the part that may truncate and a short trailing extension that should always stay\n * visible — so a long name middle-ellipses as `name….ext` instead of overflowing or losing the type.\n */\nexport const splitName = (name: string): { base: string; ext: string } => {\n const dot = name.lastIndexOf('.')\n // only peel off a real, short extension (\".png\", \".jpeg\") — not a dot buried in a long hash\n return dot > 0 && name.length - dot <= 7\n ? { base: name.slice(0, dot), ext: name.slice(dot) }\n : { base: name, ext: '' }\n}\n\n// ── one row ─────────────────────────────────────────────────────────────────────────────────────\n\ninterface RowProps {\n id: string\n item: FileUploaderItem\n preview: string | null\n sortable: boolean\n entering: boolean\n disabled?: boolean\n error?: string\n onRemove: () => void\n onCrop?: () => void\n onAltText?: () => void\n onDownload?: () => void\n onView?: () => void\n onPreviewError?: () => void\n}\n\nfunction Row({\n id,\n item,\n preview,\n sortable,\n entering,\n disabled,\n error,\n onRemove,\n onCrop,\n onAltText,\n onDownload,\n onView,\n onPreviewError,\n}: RowProps) {\n // the whole tile is the drag handle (no separate grip — matches the image-card visual)\n const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({\n id,\n disabled: !sortable,\n })\n const style: CSSProperties = {\n transform: CSS.Transform.toString(transform),\n transition,\n }\n const t = useT()\n const label = labelOf(item)\n const { base, ext } = splitName(label)\n const meta = item.file ? formatBytes(item.file.size) : t('fileUploader.uploaded')\n const video = isVideoItem(item)\n\n const downloadBtn = onDownload ? (\n <button\n type=\"button\"\n className={styles.tileAction}\n aria-label={t('fileUploader.download', { name: label })}\n onClick={onDownload}\n onPointerDown={(e) => e.stopPropagation()}\n >\n <Icon name=\"DocumentDownload\" size=\"sm\" />\n </button>\n ) : null\n\n return (\n <div\n ref={setNodeRef}\n style={style}\n className={clsx(\n styles.tile,\n sortable && styles.grabbable,\n entering && styles.entering,\n isDragging && styles.dragging,\n error && styles.tileError,\n )}\n {...attributes}\n {...listeners}\n >\n {preview ? (\n video ? (\n <>\n {/* first-frame thumbnail (no controls) + a centred play badge so it reads as a video */}\n <video\n src={preview}\n className={styles.tileImg}\n muted\n playsInline\n preload=\"metadata\"\n draggable={false}\n onError={onPreviewError}\n />\n <span className={styles.tilePlay} aria-hidden=\"true\">\n <Icon name=\"Play\" size=\"lg\" />\n </span>\n </>\n ) : (\n <img\n src={preview}\n alt=\"\"\n className={styles.tileImg}\n draggable={false}\n onError={onPreviewError}\n />\n )\n ) : (\n <span className={styles.tileFallback} aria-hidden=\"true\">\n <Icon name=\"Document\" size=\"lg\" />\n </span>\n )}\n\n {/* top scrim: name/meta on the left, the remove × pinned top-right */}\n <div className={styles.tileTop}>\n <span className={styles.tileText}>\n <span className={styles.name} title={label}>\n <span className={styles.nameBase}>{base}</span>\n {ext && <span className={styles.nameExt}>{ext}</span>}\n </span>\n <span className={clsx(styles.tileMeta, error && styles.metaError)}>{error ?? meta}</span>\n </span>\n {!disabled && (\n <button\n type=\"button\"\n className={styles.tileRemove}\n aria-label={t('fileUploader.remove', { name: label })}\n onClick={onRemove}\n onPointerDown={(e) => e.stopPropagation()} // don't start a drag from the remove button\n >\n <Icon name=\"Close\" size=\"sm\" />\n </button>\n )}\n </div>\n\n {/* bottom scrim: crop (Crop) + alt text (Text) + download on the left (crop/alt are image-only),\n the view (Eye) fullscreen-preview button pinned bottom-right */}\n {(onCrop || onAltText || onDownload || onView) && (\n <div className={styles.tileBottom}>\n {onCrop && (\n <button\n type=\"button\"\n className={styles.tileAction}\n aria-label={t('fileUploader.crop', { name: label })}\n onClick={onCrop}\n onPointerDown={(e) => e.stopPropagation()}\n >\n <Icon name=\"Crop\" size=\"sm\" />\n </button>\n )}\n {onAltText && (\n <button\n type=\"button\"\n className={styles.tileAction}\n aria-label={t('fileUploader.editAlt', { name: label })}\n onClick={onAltText}\n onPointerDown={(e) => e.stopPropagation()}\n >\n <Icon name=\"Text\" size=\"sm\" />\n </button>\n )}\n {downloadBtn}\n {onView && (\n <button\n type=\"button\"\n className={clsx(styles.tileAction, styles.tileActionEnd)}\n aria-label={t('fileUploader.preview', { name: label })}\n onClick={onView}\n onPointerDown={(e) => e.stopPropagation()}\n >\n <Icon name=\"Eye\" size=\"sm\" />\n </button>\n )}\n </div>\n )}\n </div>\n )\n}\n\n// ── the field ───────────────────────────────────────────────────────────────────────────────────\n\n/**\n * A small, clean file field that **collects** files for the consumer to upload on save — it never\n * uploads itself. New picks carry their binary in `file`; already-uploaded files arrive with a\n * `source` URL. A soft dropzone panel sits above a grid of image cards (thumbnail/file-icon + name +\n * size, with overlaid remove + download buttons). `allowDrop` enables drag-from-OS (via\n * `react-dropzone`); `allowReorder` enables drag + keyboard reordering (via `@dnd-kit`); cards animate\n * in/out (via `@formkit/auto-animate`). Controlled (`value` + `onChange`) or uncontrolled\n * (`defaultValue`); binds to a `<Form>` by `name`. The forwarded ref points at the root.\n */\nexport const FileUploader = forwardRef<HTMLDivElement, FileUploaderProps>(function FileUploader(\n {\n multiple = false,\n allowDrop = true,\n allowReorder = true,\n allowDownload = true,\n allowPreview = true,\n allowAltText = true,\n altTextLocales,\n localizedAltText = true,\n allowDuplicates = false,\n disabled = false,\n accept,\n maxFiles,\n maxFileSize,\n itemInsertLocation = 'end',\n value,\n defaultValue,\n onChange,\n label,\n error,\n helperText,\n required = false,\n fullWidth = true,\n name,\n id: idProp,\n onBlur,\n className,\n style,\n ...props\n },\n ref,\n) {\n const reactId = useId()\n const id = idProp ?? reactId\n const helperId = `${id}-helper`\n\n const maxBytes = maxFileSize != null ? toBytes(maxFileSize) : undefined\n const [notice, setNotice] = useState<string | null>(null)\n // the rejection notice auto-dismisses so it doesn't linger forever\n useEffect(() => {\n if (!notice) return\n const timer = window.setTimeout(() => setNotice(null), 4000)\n return () => window.clearTimeout(timer)\n }, [notice])\n\n // Auto-bind to a surrounding <Form> by `name`. The value is a typed object/array, so read it RAW from\n // values[name] (never field().value, which String-coerces); error/touched come from field().\n const form = useFormContext()\n const isFormBound = Boolean(form && name)\n const bound = form && name ? form.field(name) : undefined\n\n const fallback: FileUploaderValue = multiple ? [] : null\n const externalValue: FileUploaderValue | undefined =\n value !== undefined\n ? value\n : isFormBound\n ? ((form!.values[name!] as FileUploaderValue | undefined) ?? fallback)\n : undefined\n const isControlled = externalValue !== undefined\n const [internal, setInternal] = useState<FileUploaderValue>(defaultValue ?? fallback)\n const current = isControlled ? externalValue! : internal\n const items: FileUploaderItem[] =\n current == null ? [] : Array.isArray(current) ? current : [current]\n\n const resolvedError = error ?? bound?.error ?? false\n const resolvedHelperText = helperText ?? bound?.helperText\n const shownHelper = notice ?? resolvedHelperText\n const helperIsError = Boolean(notice) || resolvedError\n\n const reorderEnabled = allowReorder && multiple && !disabled\n\n // Stable ids per item so a row keeps its identity (and focus) across reorders.\n const fileIds = useRef(new WeakMap<File, string>())\n const seed = useRef(0)\n const idOf = (item: FileUploaderItem, index: number): string => {\n if (item.file) {\n let id = fileIds.current.get(item.file)\n if (!id) {\n seed.current += 1\n id = `f${seed.current}`\n fileIds.current.set(item.file, id)\n }\n return id\n }\n return item.source ? `s:${item.source}` : `i:${index}`\n }\n const ids = items.map((item, i) => idOf(item, i))\n\n // Ids that have already animated in, so only genuinely new rows get the entrance animation — a reorder\n // re-inserts the moved/shifted nodes, which would otherwise restart the CSS drop-in on them.\n const enteredIds = useRef<Set<string>>(new Set())\n const enteringIds = new Set(ids.filter((id) => !enteredIds.current.has(id)))\n useEffect(() => {\n enteredIds.current = new Set(ids)\n })\n\n // Source URLs that failed to load as an image (so we fall back to the file icon).\n const [failedSources, setFailedSources] = useState<ReadonlySet<string>>(() => new Set())\n const markSourceFailed = (src: string) =>\n setFailedSources((prev) => (prev.has(src) ? prev : new Set(prev).add(src)))\n\n // Files whose object-URL preview failed to load (a corrupt/undecodable image) — same fallback.\n const [failedFiles, setFailedFiles] = useState<ReadonlySet<File>>(() => new Set())\n const markFileFailed = (file: File) =>\n setFailedFiles((prev) => (prev.has(file) ? prev : new Set(prev).add(file)))\n\n // Object URLs for image/video File previews, revoked when the File leaves the value / on unmount.\n const objectUrls = useRef(new Map<File, string>())\n const previewOf = (item: FileUploaderItem): string | null => {\n if (item.file) {\n const type = item.file.type\n if (\n (!type.startsWith('image/') && !type.startsWith('video/')) ||\n !canMakeObjectUrl() ||\n failedFiles.has(item.file)\n )\n return null\n let url = objectUrls.current.get(item.file)\n if (!url) {\n url = URL.createObjectURL(item.file)\n objectUrls.current.set(item.file, url)\n }\n return url\n }\n // an already-uploaded item is assumed to be a previewable image/video (image-first uploader); a\n // non-media URL just falls the row back to the file icon via the <img> onError handler\n if (item.source && !failedSources.has(item.source)) return item.source\n return null\n }\n // fullscreen preview (Eye) — snapshot the media so the lightbox is self-contained. Declared above\n // the object-URL cleanup effect below so that effect can spare the URL the lightbox is showing.\n const [preview, setPreview] = useState<{\n url: string\n isVideo: boolean\n isSvg: boolean\n name: string\n } | null>(null)\n useEffect(() => {\n const cache = objectUrls.current\n const liveFiles = new Set(items.map((it) => it.file).filter(Boolean) as File[])\n const liveSources = new Set(items.filter((it) => !it.file && it.source).map((it) => it.source!))\n for (const [file, url] of cache) {\n // don't revoke the URL the open lightbox is showing — a controlled value swap that removes the\n // item would otherwise break the media mid-display; the deferred revoke runs once it closes\n // (this effect re-runs on `preview` change) or on unmount\n if (!liveFiles.has(file) && url !== preview?.url) {\n URL.revokeObjectURL(url)\n cache.delete(file)\n }\n }\n setFailedSources((prev) => {\n if (prev.size === 0) return prev\n const next = new Set([...prev].filter((s) => liveSources.has(s)))\n return next.size === prev.size ? prev : next\n })\n }, [current, preview]) // eslint-disable-line react-hooks/exhaustive-deps -- `current` is the value identity\n useEffect(() => {\n const cache = objectUrls.current\n return () => {\n for (const url of cache.values()) URL.revokeObjectURL(url)\n cache.clear()\n }\n }, [])\n\n const reindex = (arr: FileUploaderItem[]): FileUploaderItem[] =>\n arr.map((it, i) => (it.sortIndex === i ? it : { ...it, sortIndex: i }))\n\n const commit = (next: FileUploaderItem[]) => {\n const ordered = reindex(next)\n const out: FileUploaderValue = multiple ? ordered : (ordered[0] ?? null)\n if (!isControlled) setInternal(out)\n if (isFormBound) form!.setValue(name!, out)\n onChange?.(out)\n }\n\n // mark the bound form field touched (the impl ignores the event — it just flips the touched flag)\n const markTouched = () => bound?.onBlur({} as FocusEvent<HTMLInputElement>)\n\n const t = useT()\n // ── edit dialogs (separate Crop and Alt-text modals, opened from a card's two buttons) ────────────\n const configLocales = useLocales()\n const altLocales = altTextLocales ?? configLocales\n // per-locale (default): one field per locale (falling back to a single field if none configured);\n // non-localized: always a single field, keyed under '' (the value is a plain string)\n const editLocales = localizedAltText && altLocales.length > 0 ? altLocales : [{ code: '' }]\n // track the edited item by its STABLE id (not its index) so an external value change while a dialog is\n // open — reorder/remove/refetch — can't retarget the save onto the wrong item\n const [editId, setEditId] = useState<string | null>(null)\n const [editMode, setEditMode] = useState<'crop' | 'altText'>('altText')\n const editPos = editId != null ? ids.indexOf(editId) : -1\n const editingItem = editPos !== -1 ? items[editPos] : null\n const openCropEditor = (index: number) => {\n setEditMode('crop')\n setEditId(ids[index] ?? null)\n }\n const openAltEditor = (index: number) => {\n setEditMode('altText')\n setEditId(ids[index] ?? null)\n }\n const closeEditor = () => setEditId(null)\n\n const openPreview = (item: FileUploaderItem) => {\n const url = previewOf(item)\n if (!url) return\n // SVGs need an explicit box in the lightbox (they often lack an intrinsic pixel size)\n const isSvg = item.file\n ? item.file.type === 'image/svg+xml'\n : /^data:image\\/svg/i.test(item.source ?? '') || /\\.svg(?:[?#]|$)/i.test(item.source ?? '')\n setPreview({ url, isVideo: isVideoItem(item), isSvg, name: labelOf(item) })\n }\n // seed the alt-text dialog's draft from the item's current value (record vs single string)\n const editInitialDraft: Record<string, string> = editingItem\n ? localizedAltText\n ? editingItem.altText && typeof editingItem.altText === 'object'\n ? { ...editingItem.altText }\n : {}\n : { '': typeof editingItem.altText === 'string' ? editingItem.altText : '' }\n : {}\n const saveEdit = ({ draft, croppedFile }: EditDialogResult) => {\n if (editPos === -1) return closeEditor() // the item went away under us — bail\n commit(\n items.map((it, i) => {\n if (ids[i] !== editId) return it\n const next: FileUploaderItem = { ...it }\n // alt-text dialog → rebuild altText from the draft (localized record / single string)\n if (draft !== undefined) {\n if (localizedAltText) {\n // prune empty/whitespace entries so the model isn't littered with blank locales\n const cleaned = Object.fromEntries(\n Object.entries(draft)\n .map(([code, text]) => [code, text.trim()] as [string, string])\n .filter(([, text]) => text !== ''),\n )\n next.altText = Object.keys(cleaned).length > 0 ? cleaned : undefined\n } else {\n next.altText = (draft[''] ?? '').trim() || undefined\n }\n }\n // crop dialog → replace the image with the cropped File (native-res, lossless); a source item\n // becomes a fresh pick (the cropped version uploads on save)\n if (croppedFile) {\n next.file = croppedFile\n next.source = ''\n }\n return next\n }),\n )\n closeEditor()\n }\n\n const addFiles = (accepted: File[], rejections: FileRejection[] = []) => {\n // Hard rejections (the file is invalid: wrong type, or over `maxFileSize` — react-dropzone rejects\n // both, so they never reach `accepted`) surface as a Toast error and are not added.\n const wrongType = rejections.filter((r) => r.errors.some((e) => e.code === 'file-invalid-type'))\n const tooLarge = rejections.filter((r) => r.errors.some((e) => e.code === 'file-too-large'))\n if (wrongType.length > 0)\n toast.error(\n wrongType.length === 1\n ? t('fileUploader.wrongTypeOne', { name: wrongType[0].file.name })\n : t('fileUploader.wrongTypeMany', { count: wrongType.length }),\n )\n if (tooLarge.length > 0 && maxBytes != null)\n toast.error(\n tooLarge.length === 1\n ? t('fileUploader.tooLargeOne', {\n name: tooLarge[0].file.name,\n size: formatBytes(maxBytes),\n })\n : t('fileUploader.tooLargeMany', { count: tooLarge.length, size: formatBytes(maxBytes) }),\n )\n\n // Soft notices (the file is valid, just not added now) stay in the inline helper slot + auto-dismiss.\n const reasons: string[] = []\n let taken = accepted\n // drop files already present (same content) + intra-batch dupes, unless explicitly allowed\n if (multiple && !allowDuplicates) {\n const seen = new Set(items.map(itemKey))\n const unique: File[] = []\n for (const file of taken) {\n const key = fileKey(file)\n if (seen.has(key)) continue\n seen.add(key)\n unique.push(file)\n }\n if (unique.length < taken.length) reasons.push(t('fileUploader.duplicate'))\n taken = unique\n }\n if (multiple && maxFiles != null) {\n const room = Math.max(0, maxFiles - items.length)\n if (taken.length > room) {\n taken = taken.slice(0, room)\n reasons.push(\n maxFiles === 1\n ? t('fileUploader.hintUpToOne', { count: maxFiles })\n : t('fileUploader.hintUpToMany', { count: maxFiles }),\n )\n }\n }\n\n setNotice(reasons.length > 0 ? reasons.join(' · ') : null)\n if (taken.length === 0) return\n const picked = taken.map<FileUploaderItem>((file) => ({ file, source: '', sortIndex: 0 }))\n if (!multiple) {\n commit([picked[0]])\n return\n }\n commit(itemInsertLocation === 'start' ? [...picked, ...items] : [...items, ...picked])\n }\n const removeAt = (index: number) => {\n setNotice(null)\n commit(items.filter((_, i) => i !== index))\n // removing is an explicit interaction — mark touched so an emptied required field reveals its error\n markTouched()\n }\n\n // auto-animate handles add / remove / shift on the list; it's paused during a dnd-kit drag so the two\n // don't both animate the reorder (dnd-kit owns the drag visuals, auto-animate owns enter/exit).\n const [listRef, enableAnimations] = useAutoAnimate(listAnimation)\n const reEnableAnimations = () => {\n if (typeof requestAnimationFrame === 'function')\n requestAnimationFrame(() => enableAnimations(true))\n else enableAnimations(true)\n }\n const handleDragStart = () => enableAnimations(false)\n const handleDragCancel = () => reEnableAnimations()\n const handleDragEnd = (event: DragEndEvent) => {\n const { active, over } = event\n if (over && active.id !== over.id) {\n const from = ids.indexOf(String(active.id))\n const to = ids.indexOf(String(over.id))\n if (from !== -1 && to !== -1) commit(arrayMove(items, from, to))\n }\n reEnableAnimations() // after the reorder DOM settles, so the move isn't double-animated\n }\n\n const sensors = useSensors(\n useSensor(PointerSensor, { activationConstraint: { distance: 5 } }),\n useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }),\n )\n\n // opening the native file dialog blurs the window, which would otherwise mark the field touched and flash\n // a \"required\" error before the user picks anything; suppress that one blur and only mark touched when the\n // dialog is *canceled* with no selection (the real \"engaged, added nothing\" signal)\n const fileDialogOpen = useRef(false)\n\n const { getRootProps, getInputProps, isDragActive } = useDropzone({\n multiple,\n accept,\n // reject oversized picks here so they never get added; the rejection surfaces as a Toast in addFiles\n maxSize: maxBytes,\n disabled,\n noKeyboard: false,\n noDrag: !allowDrop,\n onFileDialogOpen: () => {\n fileDialogOpen.current = true\n },\n onFileDialogCancel: () => {\n fileDialogOpen.current = false\n markTouched()\n },\n onDrop: (accepted, rejections) => {\n fileDialogOpen.current = false\n addFiles(accepted, rejections)\n },\n })\n\n const showDropzone = multiple || items.length === 0\n\n // static constraint hint shown inside the dropzone (e.g. \"Up to 5 files · Max 5 MB each\")\n const hintParts: string[] = []\n if (multiple && maxFiles != null)\n hintParts.push(\n maxFiles === 1\n ? t('fileUploader.hintUpToOne', { count: maxFiles })\n : t('fileUploader.hintUpToMany', { count: maxFiles }),\n )\n if (maxBytes != null) hintParts.push(t('fileUploader.hintMax', { size: formatBytes(maxBytes) }))\n const hint = hintParts.join(' · ')\n\n const prompt: ReactNode = allowDrop ? (\n <>\n <span className={styles.accent}>{t('fileUploader.choose')}</span>{' '}\n {t('fileUploader.dropSuffix')}\n </>\n ) : (\n <span className={styles.accent}>{t('fileUploader.choose')}</span>\n )\n\n // mark the field touched once focus leaves the whole widget (so blurThenLive errors reveal on blur)\n const onRootBlur = (event: FocusEvent<HTMLDivElement>) => {\n onBlur?.(event)\n if (event.currentTarget.contains(event.relatedTarget as Node | null)) return\n // opening the alt-text editor moves focus into the body-portaled Modal (outside the root); that's not\n // focus leaving the widget, so don't mark touched (mirrors Select's portaled-popover guard)\n if (editId != null) return\n // the native file-dialog blur isn't \"leaving the widget\" either — consume it (touched is set instead on\n // dialog cancel); only a genuine blur-away marks touched\n if (fileDialogOpen.current) {\n fileDialogOpen.current = false\n return\n }\n markTouched()\n }\n\n return (\n <div\n ref={ref}\n id={id}\n className={clsx(\n styles.root,\n fullWidth && styles.fullWidth,\n resolvedError && styles.error,\n disabled && styles.disabled,\n className,\n )}\n style={style}\n aria-invalid={resolvedError || undefined}\n aria-describedby={shownHelper != null ? helperId : undefined}\n onBlur={onRootBlur}\n {...props}\n // name + tabIndex are load-bearing for the form's scroll-to-error → spread last so props can't clobber\n {...(name ? { name, tabIndex: -1 } : {})}\n >\n {label != null && (\n <label className={fieldStyles.label}>\n <Typography as=\"span\" variant=\"bodySmall\" color=\"muted\">\n {label}\n </Typography>\n {required && (\n <span className={fieldStyles.required} aria-hidden=\"true\">\n *\n </span>\n )}\n </label>\n )}\n\n {showDropzone && (\n <div\n {...getRootProps({ className: clsx(styles.dropzone, isDragActive && styles.dropping) })}\n >\n <input {...getInputProps()} />\n <span className={styles.dropIcon} aria-hidden=\"true\">\n <Icon name=\"DocumentUpload\" size=\"lg\" />\n </span>\n <span className={styles.dropText}>\n <span className={styles.prompt}>{prompt}</span>\n {hint && <span className={styles.hint}>{hint}</span>}\n </span>\n </div>\n )}\n\n {/* always rendered (even when empty) so auto-animate can animate the last card out on removal */}\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n onDragStart={reorderEnabled ? handleDragStart : undefined}\n onDragEnd={reorderEnabled ? handleDragEnd : undefined}\n onDragCancel={reorderEnabled ? handleDragCancel : undefined}\n >\n <SortableContext items={ids} strategy={rectSortingStrategy}>\n <div ref={listRef} className={clsx(styles.list, items.length > 0 && styles.populated)}>\n {items.map((item, index) => (\n <Row\n key={ids[index]}\n id={ids[index]}\n item={item}\n preview={previewOf(item)}\n sortable={reorderEnabled && items.length > 1}\n entering={enteringIds.has(ids[index])}\n disabled={disabled}\n error={\n item.file && maxBytes != null && item.file.size > maxBytes\n ? t('fileUploader.exceedsLimit', { size: formatBytes(maxBytes) })\n : undefined\n }\n onRemove={() => removeAt(index)}\n // crop + alt text are image-only — a video / PDF / doc has nothing to crop or describe\n onCrop={\n allowAltText && !disabled && isImageItem(item)\n ? () => openCropEditor(index)\n : undefined\n }\n onAltText={\n allowAltText && !disabled && isImageItem(item)\n ? () => openAltEditor(index)\n : undefined\n }\n onDownload={allowDownload && !disabled ? () => triggerDownload(item) : undefined}\n // fullscreen preview — image + video only (a PDF / doc has nothing to preview)\n onView={\n allowPreview &&\n !disabled &&\n previewOf(item) != null &&\n (isImageItem(item) || isVideoItem(item))\n ? () => openPreview(item)\n : undefined\n }\n onPreviewError={\n item.file\n ? () => markFileFailed(item.file!)\n : item.source\n ? () => markSourceFailed(item.source!)\n : undefined\n }\n />\n ))}\n </div>\n </SortableContext>\n </DndContext>\n\n {shownHelper != null && (\n <Typography\n as=\"span\"\n id={helperId}\n variant=\"bodySmall\"\n color={helperIsError ? 'error' : 'muted'}\n className={fieldStyles.helper}\n role=\"status\"\n aria-live=\"polite\"\n >\n {shownHelper}\n </Typography>\n )}\n\n {editingItem && (\n <FileUploaderEditDialog\n key={`${editId}:${editMode}`}\n mode={editMode}\n name={labelOf(editingItem)}\n imageUrl={previewOf(editingItem)}\n mimeType={editingItem.file?.type || 'image/png'}\n editLocales={editLocales}\n initialDraft={editInitialDraft}\n onClose={closeEditor}\n onSave={saveEdit}\n />\n )}\n\n {preview && (\n <FileUploaderPreview\n url={preview.url}\n isVideo={preview.isVideo}\n isSvg={preview.isSvg}\n name={preview.name}\n onClose={() => setPreview(null)}\n />\n )}\n </div>\n )\n})\n"],"names":["FileUploaderEditDialog","mode","name","imageUrl","mimeType","editLocales","initialDraft","onClose","onSave","t","useT","imgRef","useRef","crop","setCrop","useState","naturalCrop","setNaturalCrop","naturalSize","setNaturalSize","draft","setDraft","cropError","setCropError","busy","setBusy","onCropChange","px","percent","img","sx","sy","buildCroppedFile","image","canvas","ctx","blob","resolve","handleSave","croppedFile","jsx","Modal","jsxs","Fragment","Button","styles","Typography","ReactCrop","e","l","TextField","d","FileUploaderPreview","url","isVideo","isSvg","Overlay","Icon","clsx","canMakeObjectUrl","ANIM_MS","listAnimation","el","action","oldCoords","newCoords","keyframes","duration","dx","dy","formatBytes","bytes","units","value","i","toBytes","size","match","fileKey","file","itemKey","item","labelOf","isImageItem","src","isVideoItem","triggerDownload","a","splitName","dot","Row","id","preview","sortable","entering","disabled","error","onRemove","onCrop","onAltText","onDownload","onView","onPreviewError","attributes","listeners","setNodeRef","transform","transition","isDragging","useSortable","style","CSS","label","base","ext","meta","video","downloadBtn","FileUploader","forwardRef","multiple","allowDrop","allowReorder","allowDownload","allowPreview","allowAltText","altTextLocales","localizedAltText","allowDuplicates","accept","maxFiles","maxFileSize","itemInsertLocation","defaultValue","onChange","helperText","required","fullWidth","idProp","onBlur","className","props","ref","reactId","useId","helperId","maxBytes","notice","setNotice","useEffect","timer","form","useFormContext","isFormBound","bound","fallback","externalValue","isControlled","internal","setInternal","current","items","resolvedError","resolvedHelperText","shownHelper","helperIsError","reorderEnabled","fileIds","seed","idOf","index","ids","enteredIds","enteringIds","failedSources","setFailedSources","markSourceFailed","prev","failedFiles","setFailedFiles","markFileFailed","objectUrls","previewOf","type","setPreview","cache","liveFiles","it","liveSources","next","s","reindex","arr","commit","ordered","out","markTouched","configLocales","useLocales","altLocales","editId","setEditId","editMode","setEditMode","editPos","editingItem","openCropEditor","openAltEditor","closeEditor","openPreview","editInitialDraft","saveEdit","cleaned","code","text","addFiles","accepted","rejections","wrongType","r","tooLarge","toast","reasons","taken","seen","unique","key","room","picked","removeAt","_","listRef","enableAnimations","useAutoAnimate","reEnableAnimations","handleDragStart","handleDragCancel","handleDragEnd","event","active","over","from","to","arrayMove","sensors","useSensors","useSensor","PointerSensor","KeyboardSensor","sortableKeyboardCoordinates","fileDialogOpen","getRootProps","getInputProps","isDragActive","useDropzone","showDropzone","hintParts","hint","prompt","onRootBlur","fieldStyles","DndContext","closestCenter","SortableContext","rectSortingStrategy","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAmDO,SAASA,GAAuB;AAAA,EACrC,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AACF,GAAgC;AAC9B,QAAMC,IAAIC,GAAA,GACJC,IAASC,EAAyB,IAAI,GACtC,CAACC,GAAMC,CAAO,IAAIC,EAAA,GAElB,CAACC,GAAaC,CAAc,IAAIF,EAA6B,IAAI,GAEjE,CAACG,GAAaC,CAA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CAAW;AAAA,YAC/B,YAAU4D,KAAA5D,EAAY,SAAZ,gBAAA4D,GAAkB,SAAQ;AAAA,YACpC,aAAApQ;AAAA,YACA,cAAc6M;AAAA,YACd,SAASF;AAAA,YACT,QAAQG;AAAA,UAAA;AAAA,UARH,GAAGX,EAAM,IAAIE,EAAQ;AAAA,QAAA;AAAA,QAY7B9G,KACC,gBAAApD;AAAA,UAACY;AAAA,UAAA;AAAA,YACC,KAAKwC,EAAQ;AAAA,YACb,SAASA,EAAQ;AAAA,YACjB,OAAOA,EAAQ;AAAA,YACf,MAAMA,EAAQ;AAAA,YACd,SAAS,MAAM4F,GAAW,IAAI;AAAA,UAAA;AAAA,QAAA;AAAA,MAChC;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
@@ -0,0 +1,24 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { forwardRef as e } from "react";
3
+ import { clsx as g } from "clsx";
4
+ import { f as m } from "./messages-C-zecFBE.js";
5
+ const i = "_flag_14ypt_1", p = {
6
+ flag: i
7
+ }, x = e(function({ code: t, size: a = 16, className: o, style: l, ...s }, f) {
8
+ const r = m(t);
9
+ return r ? /* @__PURE__ */ n(
10
+ "span",
11
+ {
12
+ ref: f,
13
+ className: g(p.flag, o),
14
+ style: { "--tz-flag-height": `${a}px`, ...l },
15
+ "aria-hidden": "true",
16
+ dangerouslySetInnerHTML: { __html: r },
17
+ ...s
18
+ }
19
+ ) : null;
20
+ });
21
+ export {
22
+ x as F
23
+ };
24
+ //# sourceMappingURL=Flag-BWCX6oSR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Flag-BWCX6oSR.js","sources":["../src/components/Flag/Flag.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes } from 'react'\nimport { clsx } from 'clsx'\nimport { flagFor } from '../../i18n/messages'\nimport styles from './Flag.module.css'\n\nexport interface FlagProps extends HTMLAttributes<HTMLSpanElement> {\n /** UI-language code (e.g. `'ka-GE'`); the flag is matched by base language via `flagFor`. */\n code: string\n /** Flag height in px (width follows the 4:3 flag ratio). Defaults to `16`. */\n size?: number\n}\n\n/**\n * A small rounded country/language flag, rendered from the library's built-in flag registry\n * (`flagFor(code)`, matched by base language). The SVG is library-shipped (trusted), so it's injected as\n * markup; the component renders **nothing** when the language has no shipped flag. Used by the shell's\n * header language switcher, but public for any language UI.\n */\nexport const Flag = forwardRef<HTMLSpanElement, FlagProps>(function Flag(\n { code, size = 16, className, style, ...props },\n ref,\n) {\n const svg = flagFor(code)\n if (!svg) return null\n return (\n <span\n ref={ref}\n className={clsx(styles.flag, className)}\n style={{ '--tz-flag-height': `${size}px`, ...style } as CSSProperties}\n aria-hidden=\"true\"\n dangerouslySetInnerHTML={{ __html: svg }}\n {...props}\n />\n )\n})\n"],"names":["Flag","forwardRef","code","size","className","style","props","ref","svg","flagFor","jsx","clsx","styles"],"mappings":";;;;;;GAkBaA,IAAOC,EAAuC,SACzD,EAAE,MAAAC,GAAM,MAAAC,IAAO,IAAI,WAAAC,GAAW,OAAAC,GAAO,GAAGC,EAAA,GACxCC,GACA;AACA,QAAMC,IAAMC,EAAQP,CAAI;AACxB,SAAKM,IAEH,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAH;AAAA,MACA,WAAWI,EAAKC,EAAO,MAAMR,CAAS;AAAA,MACtC,OAAO,EAAE,oBAAoB,GAAGD,CAAI,MAAM,GAAGE,EAAA;AAAA,MAC7C,eAAY;AAAA,MACZ,yBAAyB,EAAE,QAAQG,EAAA;AAAA,MAClC,GAAGF;AAAA,IAAA;AAAA,EAAA,IARS;AAWnB,CAAC;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const c=require("react/jsx-runtime"),g=require("react"),o=require("clsx"),u=require("./messages-Cy-qK5xU.cjs"),i="_flag_14ypt_1",f={flag:i},x=g.forwardRef(function({code:s,size:t=16,className:r,style:n,...a},l){const e=u.flagFor(s);return e?c.jsx("span",{ref:l,className:o.clsx(f.flag,r),style:{"--tz-flag-height":`${t}px`,...n},"aria-hidden":"true",dangerouslySetInnerHTML:{__html:e},...a}):null});exports.Flag=x;
2
+ //# sourceMappingURL=Flag-EPZOrH-U.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Flag-EPZOrH-U.cjs","sources":["../src/components/Flag/Flag.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes } from 'react'\nimport { clsx } from 'clsx'\nimport { flagFor } from '../../i18n/messages'\nimport styles from './Flag.module.css'\n\nexport interface FlagProps extends HTMLAttributes<HTMLSpanElement> {\n /** UI-language code (e.g. `'ka-GE'`); the flag is matched by base language via `flagFor`. */\n code: string\n /** Flag height in px (width follows the 4:3 flag ratio). Defaults to `16`. */\n size?: number\n}\n\n/**\n * A small rounded country/language flag, rendered from the library's built-in flag registry\n * (`flagFor(code)`, matched by base language). The SVG is library-shipped (trusted), so it's injected as\n * markup; the component renders **nothing** when the language has no shipped flag. Used by the shell's\n * header language switcher, but public for any language UI.\n */\nexport const Flag = forwardRef<HTMLSpanElement, FlagProps>(function Flag(\n { code, size = 16, className, style, ...props },\n ref,\n) {\n const svg = flagFor(code)\n if (!svg) return null\n return (\n <span\n ref={ref}\n className={clsx(styles.flag, className)}\n style={{ '--tz-flag-height': `${size}px`, ...style } as CSSProperties}\n aria-hidden=\"true\"\n dangerouslySetInnerHTML={{ __html: svg }}\n {...props}\n />\n )\n})\n"],"names":["Flag","forwardRef","code","size","className","style","props","ref","svg","flagFor","jsx","clsx","styles"],"mappings":"yJAkBaA,EAAOC,EAAAA,WAAuC,SACzD,CAAE,KAAAC,EAAM,KAAAC,EAAO,GAAI,UAAAC,EAAW,MAAAC,EAAO,GAAGC,CAAA,EACxCC,EACA,CACA,MAAMC,EAAMC,EAAAA,QAAQP,CAAI,EACxB,OAAKM,EAEHE,EAAAA,IAAC,OAAA,CACC,IAAAH,EACA,UAAWI,EAAAA,KAAKC,EAAO,KAAMR,CAAS,EACtC,MAAO,CAAE,mBAAoB,GAAGD,CAAI,KAAM,GAAGE,CAAA,EAC7C,cAAY,OACZ,wBAAyB,CAAE,OAAQG,CAAA,EAClC,GAAGF,CAAA,CAAA,EARS,IAWnB,CAAC"}
@@ -0,0 +1,50 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { forwardRef as u } from "react";
3
+ const y = /* @__PURE__ */ new Set(["xxs", "xs", "sm", "md", "lg", "xl", "xxl"]), b = {
4
+ start: "flex-start",
5
+ center: "center",
6
+ end: "flex-end",
7
+ stretch: "stretch",
8
+ baseline: "baseline"
9
+ }, w = {
10
+ start: "flex-start",
11
+ center: "center",
12
+ end: "flex-end",
13
+ between: "space-between",
14
+ around: "space-around",
15
+ evenly: "space-evenly"
16
+ };
17
+ function s(e) {
18
+ if (e != null)
19
+ return typeof e == "number" ? `${e}px` : y.has(e) ? `var(--tz-space-${e})` : e;
20
+ }
21
+ const h = u(function({
22
+ direction: l = "row",
23
+ gap: f,
24
+ align: n,
25
+ justify: r,
26
+ wrap: a = !1,
27
+ padding: o,
28
+ inline: x = !1,
29
+ grow: t,
30
+ style: c,
31
+ ...i
32
+ }, d) {
33
+ const p = {
34
+ display: x ? "inline-flex" : "flex",
35
+ flexDirection: l,
36
+ gap: s(f),
37
+ alignItems: n && b[n],
38
+ justifyContent: r && w[r],
39
+ flexWrap: a ? "wrap" : void 0,
40
+ padding: s(o),
41
+ flexGrow: t === !0 ? 1 : t === !1 ? void 0 : t,
42
+ ...c
43
+ };
44
+ return /* @__PURE__ */ m("div", { ref: d, style: p, ...i });
45
+ });
46
+ export {
47
+ h as F,
48
+ s
49
+ };
50
+ //# sourceMappingURL=Flex-Bj3mMF5A.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Flex-Bj3mMF5A.js","sources":["../src/components/Flex/Flex.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes } from 'react'\n\n/** A space value: a `--tz-space-*` scale key, a raw number (px), or any CSS length string. */\nexport type Spacing = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | number | (string & {})\nexport type FlexDirection = 'row' | 'column'\nexport type FlexAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline'\nexport type FlexJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly'\n\nconst SCALE = new Set(['xxs', 'xs', 'sm', 'md', 'lg', 'xl', 'xxl'])\nconst ALIGN: Record<FlexAlign, string> = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n stretch: 'stretch',\n baseline: 'baseline',\n}\nconst JUSTIFY: Record<FlexJustify, string> = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n between: 'space-between',\n around: 'space-around',\n evenly: 'space-evenly',\n}\n\n/** Resolve a `Spacing` to a CSS value — scale key → token, number → px, else passthrough. */\nexport function space(value?: Spacing): string | undefined {\n if (value == null) return undefined\n if (typeof value === 'number') return `${value}px`\n return SCALE.has(value) ? `var(--tz-space-${value})` : value\n}\n\nexport interface FlexProps extends HTMLAttributes<HTMLDivElement> {\n /** Main axis. `row` (default) or `column`. */\n direction?: FlexDirection\n /** Gap between children (token key, px number, or CSS value). */\n gap?: Spacing\n /** `align-items`. */\n align?: FlexAlign\n /** `justify-content`. */\n justify?: FlexJustify\n /** Allow children to wrap onto multiple lines. */\n wrap?: boolean\n /** Padding (token key, px number, or CSS value — e.g. `\"24px 8px\"`). */\n padding?: Spacing\n /** Render as `inline-flex` instead of `flex`. */\n inline?: boolean\n /** The box's own `flex-grow` (when this Flex is itself a flex child). `true` = `1`. */\n grow?: boolean | number\n}\n\n/**\n * A flexbox layout primitive — set direction/gap/alignment/padding via props instead of inline styles.\n * `Row` and `Col` are thin presets over it. Spacing accepts `--tz-space-*` keys (`\"md\"`), raw px\n * numbers, or any CSS value; consumer `style` still merges last.\n */\nexport const Flex = forwardRef<HTMLDivElement, FlexProps>(function Flex(\n {\n direction = 'row',\n gap,\n align,\n justify,\n wrap = false,\n padding,\n inline = false,\n grow,\n style,\n ...props\n },\n ref,\n) {\n const flexStyle: CSSProperties = {\n display: inline ? 'inline-flex' : 'flex',\n flexDirection: direction,\n gap: space(gap),\n alignItems: align && ALIGN[align],\n justifyContent: justify && JUSTIFY[justify],\n flexWrap: wrap ? 'wrap' : undefined,\n padding: space(padding),\n flexGrow: grow === true ? 1 : grow === false ? undefined : grow,\n ...style,\n }\n return <div ref={ref} style={flexStyle} {...props} />\n})\n"],"names":["SCALE","ALIGN","JUSTIFY","space","value","Flex","forwardRef","direction","gap","align","justify","wrap","padding","inline","grow","style","props","ref","flexStyle"],"mappings":";;AAQA,MAAMA,IAAQ,oBAAI,IAAI,CAAC,OAAO,MAAM,MAAM,MAAM,MAAM,MAAM,KAAK,CAAC,GAC5DC,IAAmC;AAAA,EACvC,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,SAAS;AAAA,EACT,UAAU;AACZ,GACMC,IAAuC;AAAA,EAC3C,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AACV;AAGO,SAASC,EAAMC,GAAqC;AACzD,MAAIA,KAAS;AACb,WAAI,OAAOA,KAAU,WAAiB,GAAGA,CAAK,OACvCJ,EAAM,IAAII,CAAK,IAAI,kBAAkBA,CAAK,MAAMA;AACzD;AA0BO,MAAMC,IAAOC,EAAsC,SACxD;AAAA,EACE,WAAAC,IAAY;AAAA,EACZ,KAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,GACAC,GACA;AACA,QAAMC,IAA2B;AAAA,IAC/B,SAASL,IAAS,gBAAgB;AAAA,IAClC,eAAeN;AAAA,IACf,KAAKJ,EAAMK,CAAG;AAAA,IACd,YAAYC,KAASR,EAAMQ,CAAK;AAAA,IAChC,gBAAgBC,KAAWR,EAAQQ,CAAO;AAAA,IAC1C,UAAUC,IAAO,SAAS;AAAA,IAC1B,SAASR,EAAMS,CAAO;AAAA,IACtB,UAAUE,MAAS,KAAO,IAAIA,MAAS,KAAQ,SAAYA;AAAA,IAC3D,GAAGC;AAAA,EAAA;AAEL,2BAAQ,OAAA,EAAI,KAAAE,GAAU,OAAOC,GAAY,GAAGF,GAAO;AACrD,CAAC;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const u=require("react/jsx-runtime"),y=require("react"),b=new Set(["xxs","xs","sm","md","lg","xl","xxl"]),m={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch",baseline:"baseline"},w={start:"flex-start",center:"center",end:"flex-end",between:"space-between",around:"space-around",evenly:"space-evenly"};function n(e){if(e!=null)return typeof e=="number"?`${e}px`:b.has(e)?`var(--tz-space-${e})`:e}const F=y.forwardRef(function({direction:c="row",gap:l,align:s,justify:r,wrap:x=!1,padding:a,inline:f=!1,grow:t,style:i,...o},d){const p={display:f?"inline-flex":"flex",flexDirection:c,gap:n(l),alignItems:s&&m[s],justifyContent:r&&w[r],flexWrap:x?"wrap":void 0,padding:n(a),flexGrow:t===!0?1:t===!1?void 0:t,...i};return u.jsx("div",{ref:d,style:p,...o})});exports.Flex=F;exports.space=n;
2
+ //# sourceMappingURL=Flex-CqL3Ghda.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Flex-CqL3Ghda.cjs","sources":["../src/components/Flex/Flex.tsx"],"sourcesContent":["import { forwardRef, type CSSProperties, type HTMLAttributes } from 'react'\n\n/** A space value: a `--tz-space-*` scale key, a raw number (px), or any CSS length string. */\nexport type Spacing = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | number | (string & {})\nexport type FlexDirection = 'row' | 'column'\nexport type FlexAlign = 'start' | 'center' | 'end' | 'stretch' | 'baseline'\nexport type FlexJustify = 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly'\n\nconst SCALE = new Set(['xxs', 'xs', 'sm', 'md', 'lg', 'xl', 'xxl'])\nconst ALIGN: Record<FlexAlign, string> = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n stretch: 'stretch',\n baseline: 'baseline',\n}\nconst JUSTIFY: Record<FlexJustify, string> = {\n start: 'flex-start',\n center: 'center',\n end: 'flex-end',\n between: 'space-between',\n around: 'space-around',\n evenly: 'space-evenly',\n}\n\n/** Resolve a `Spacing` to a CSS value — scale key → token, number → px, else passthrough. */\nexport function space(value?: Spacing): string | undefined {\n if (value == null) return undefined\n if (typeof value === 'number') return `${value}px`\n return SCALE.has(value) ? `var(--tz-space-${value})` : value\n}\n\nexport interface FlexProps extends HTMLAttributes<HTMLDivElement> {\n /** Main axis. `row` (default) or `column`. */\n direction?: FlexDirection\n /** Gap between children (token key, px number, or CSS value). */\n gap?: Spacing\n /** `align-items`. */\n align?: FlexAlign\n /** `justify-content`. */\n justify?: FlexJustify\n /** Allow children to wrap onto multiple lines. */\n wrap?: boolean\n /** Padding (token key, px number, or CSS value — e.g. `\"24px 8px\"`). */\n padding?: Spacing\n /** Render as `inline-flex` instead of `flex`. */\n inline?: boolean\n /** The box's own `flex-grow` (when this Flex is itself a flex child). `true` = `1`. */\n grow?: boolean | number\n}\n\n/**\n * A flexbox layout primitive — set direction/gap/alignment/padding via props instead of inline styles.\n * `Row` and `Col` are thin presets over it. Spacing accepts `--tz-space-*` keys (`\"md\"`), raw px\n * numbers, or any CSS value; consumer `style` still merges last.\n */\nexport const Flex = forwardRef<HTMLDivElement, FlexProps>(function Flex(\n {\n direction = 'row',\n gap,\n align,\n justify,\n wrap = false,\n padding,\n inline = false,\n grow,\n style,\n ...props\n },\n ref,\n) {\n const flexStyle: CSSProperties = {\n display: inline ? 'inline-flex' : 'flex',\n flexDirection: direction,\n gap: space(gap),\n alignItems: align && ALIGN[align],\n justifyContent: justify && JUSTIFY[justify],\n flexWrap: wrap ? 'wrap' : undefined,\n padding: space(padding),\n flexGrow: grow === true ? 1 : grow === false ? undefined : grow,\n ...style,\n }\n return <div ref={ref} style={flexStyle} {...props} />\n})\n"],"names":["SCALE","ALIGN","JUSTIFY","space","value","Flex","forwardRef","direction","gap","align","justify","wrap","padding","inline","grow","style","props","ref","flexStyle"],"mappings":"qEAQMA,EAAQ,IAAI,IAAI,CAAC,MAAO,KAAM,KAAM,KAAM,KAAM,KAAM,KAAK,CAAC,EAC5DC,EAAmC,CACvC,MAAO,aACP,OAAQ,SACR,IAAK,WACL,QAAS,UACT,SAAU,UACZ,EACMC,EAAuC,CAC3C,MAAO,aACP,OAAQ,SACR,IAAK,WACL,QAAS,gBACT,OAAQ,eACR,OAAQ,cACV,EAGO,SAASC,EAAMC,EAAqC,CACzD,GAAIA,GAAS,KACb,OAAI,OAAOA,GAAU,SAAiB,GAAGA,CAAK,KACvCJ,EAAM,IAAII,CAAK,EAAI,kBAAkBA,CAAK,IAAMA,CACzD,CA0BO,MAAMC,EAAOC,EAAAA,WAAsC,SACxD,CACE,UAAAC,EAAY,MACZ,IAAAC,EACA,MAAAC,EACA,QAAAC,EACA,KAAAC,EAAO,GACP,QAAAC,EACA,OAAAC,EAAS,GACT,KAAAC,EACA,MAAAC,EACA,GAAGC,CACL,EACAC,EACA,CACA,MAAMC,EAA2B,CAC/B,QAASL,EAAS,cAAgB,OAClC,cAAeN,EACf,IAAKJ,EAAMK,CAAG,EACd,WAAYC,GAASR,EAAMQ,CAAK,EAChC,eAAgBC,GAAWR,EAAQQ,CAAO,EAC1C,SAAUC,EAAO,OAAS,OAC1B,QAASR,EAAMS,CAAO,EACtB,SAAUE,IAAS,GAAO,EAAIA,IAAS,GAAQ,OAAYA,EAC3D,GAAGC,CAAA,EAEL,aAAQ,MAAA,CAAI,IAAAE,EAAU,MAAOC,EAAY,GAAGF,EAAO,CACrD,CAAC"}
@@ -0,0 +1,131 @@
1
+ import { jsx as K } from "react/jsx-runtime";
2
+ import { useRef as O, useState as k, useCallback as S, useLayoutEffect as W, useEffect as A, forwardRef as g } from "react";
3
+ import { createPortal as z } from "react-dom";
4
+ import { clsx as B } from "clsx";
5
+ import { u as _ } from "./useLockBodyScroll-DwBILLPK.js";
6
+ const l = 8, M = 6;
7
+ function q({
8
+ open: a,
9
+ triggerRef: i,
10
+ align: p = "start",
11
+ onClose: v
12
+ }) {
13
+ const c = O(null), [P, x] = k(null), [D, h] = k(!1);
14
+ _(a);
15
+ const u = S(() => {
16
+ const r = i.current, n = c.current;
17
+ if (!r || !n) return;
18
+ const e = r.getBoundingClientRect(), d = n.offsetHeight, s = window.innerHeight, f = window.innerWidth, t = s - e.bottom - M - l, y = e.top - M - l;
19
+ let m = "bottom";
20
+ d > t && y > t && (m = "top");
21
+ const E = Math.max(0, m === "bottom" ? t : y), L = Math.min(d, E);
22
+ let o = m === "bottom" ? e.bottom + M : e.top - M - L;
23
+ o = Math.min(
24
+ Math.max(o, l),
25
+ Math.max(l, s - l - L)
26
+ );
27
+ const w = n.offsetWidth, b = p === "end" ? e.right - w : e.left, F = Math.min(
28
+ Math.max(b, l),
29
+ Math.max(l, f - l - w)
30
+ );
31
+ x({ top: o, left: F, width: e.width, side: m, maxHeight: E });
32
+ }, [i, p]);
33
+ return W(() => {
34
+ if (!a) {
35
+ h(!1);
36
+ return;
37
+ }
38
+ u();
39
+ }, [a, u]), A(() => {
40
+ if (!a) return;
41
+ const r = requestAnimationFrame(() => h(!0)), n = () => u();
42
+ window.addEventListener("resize", n), window.addEventListener("scroll", n, !0);
43
+ let e;
44
+ return typeof ResizeObserver < "u" && (e = new ResizeObserver(n), c.current && e.observe(c.current), i.current && e.observe(i.current)), () => {
45
+ cancelAnimationFrame(r), window.removeEventListener("resize", n), window.removeEventListener("scroll", n, !0), e == null || e.disconnect();
46
+ };
47
+ }, [a, u, i]), A(() => {
48
+ if (!a) return;
49
+ const r = (e) => {
50
+ var s, f, t;
51
+ const d = e.target;
52
+ (s = i.current) != null && s.contains(d) || (f = c.current) != null && f.contains(d) || v(!!((t = c.current) != null && t.contains(document.activeElement)));
53
+ }, n = (e) => {
54
+ e.key === "Escape" && v(!0);
55
+ };
56
+ return document.addEventListener("pointerdown", r, !0), document.addEventListener("keydown", n), () => {
57
+ document.removeEventListener("pointerdown", r, !0), document.removeEventListener("keydown", n);
58
+ };
59
+ }, [a, v, i]), { popoverRef: c, position: P, visible: D, reposition: u };
60
+ }
61
+ const T = "_panel_1cr9q_5", I = {
62
+ panel: T
63
+ }, N = 'a[href]:not([tabindex="-1"]), button:not([tabindex="-1"]):not(:disabled), input:not([tabindex="-1"]):not(:disabled), select:not([tabindex="-1"]):not(:disabled), textarea:not([tabindex="-1"]):not(:disabled), [tabindex="0"]', U = g(function({
64
+ open: i,
65
+ triggerRef: p,
66
+ align: v,
67
+ onClose: c,
68
+ id: P,
69
+ role: x,
70
+ ariaLabel: D,
71
+ trapFocus: h = !1,
72
+ matchTriggerWidth: u = !1,
73
+ width: r,
74
+ className: n,
75
+ style: e,
76
+ children: d
77
+ }, s) {
78
+ const {
79
+ popoverRef: f,
80
+ position: t,
81
+ visible: y
82
+ } = q({
83
+ open: i,
84
+ triggerRef: p,
85
+ align: v,
86
+ onClose: c
87
+ }), m = (o) => {
88
+ f.current = o, typeof s == "function" ? s(o) : s && (s.current = o);
89
+ }, E = (o) => {
90
+ if (o.key !== "Tab") return;
91
+ const w = f.current;
92
+ if (!w) return;
93
+ const b = w.querySelectorAll(N);
94
+ if (b.length === 0) return;
95
+ const F = b[0], H = b[b.length - 1];
96
+ o.shiftKey && document.activeElement === F ? (o.preventDefault(), H.focus()) : !o.shiftKey && document.activeElement === H && (o.preventDefault(), F.focus());
97
+ };
98
+ if (!i) return null;
99
+ const L = r ?? (u ? t == null ? void 0 : t.width : void 0);
100
+ return z(
101
+ /* @__PURE__ */ K(
102
+ "div",
103
+ {
104
+ ref: m,
105
+ id: P,
106
+ className: B(I.panel, n),
107
+ role: x,
108
+ "aria-modal": x === "dialog" && h ? !0 : void 0,
109
+ "aria-label": D,
110
+ "data-open": y ? "true" : "false",
111
+ "data-side": (t == null ? void 0 : t.side) ?? "bottom",
112
+ onKeyDown: h ? E : void 0,
113
+ style: {
114
+ position: "fixed",
115
+ top: (t == null ? void 0 : t.top) ?? 0,
116
+ left: (t == null ? void 0 : t.left) ?? 0,
117
+ width: L,
118
+ maxHeight: t == null ? void 0 : t.maxHeight,
119
+ visibility: t ? "visible" : "hidden",
120
+ ...e
121
+ },
122
+ children: d
123
+ }
124
+ ),
125
+ document.body
126
+ );
127
+ });
128
+ export {
129
+ U as F
130
+ };
131
+ //# sourceMappingURL=FloatingPanel-BG9Uag__.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingPanel-BG9Uag__.js","sources":["../src/hooks/useFloatingPanel.ts","../src/components/FloatingPanel/FloatingPanel.tsx"],"sourcesContent":["import { useCallback, useEffect, useLayoutEffect, useRef, useState, type RefObject } from 'react'\nimport { useLockBodyScroll } from './useLockBodyScroll'\n\n/** Geometry computed for a floating panel anchored to a trigger. */\nexport interface FloatingPanelPosition {\n top: number\n left: number\n width: number\n side: 'top' | 'bottom'\n maxHeight: number\n}\n\nconst VIEWPORT_PADDING = 8\nconst OFFSET = 6\n\nexport interface UseFloatingPanelOptions {\n /** Whether the panel is open. */\n open: boolean\n /** Ref to the anchor/trigger element. */\n triggerRef: RefObject<HTMLElement | null>\n /**\n * Horizontal alignment to the trigger: `start` (panel's left edge at the trigger's left — grows\n * right, the default) or `end` (panel's right edge at the trigger's right — grows left).\n */\n align?: 'start' | 'end'\n /**\n * Dismiss request. Outside-pointerdown passes whether focus was parked inside the panel (so the\n * consumer can restore focus to the trigger); Escape passes `true`.\n */\n onClose: (refocus: boolean) => void\n}\n\nexport interface UseFloatingPanelResult {\n /** Attach to the portaled panel element. */\n popoverRef: RefObject<HTMLDivElement | null>\n /** Computed geometry (null until first measured). */\n position: FloatingPanelPosition | null\n /** Enter-animation flag (rAF-driven once open). */\n visible: boolean\n /** Force a re-measure (rarely needed — scroll/resize/ResizeObserver already drive it). */\n reposition: () => void\n}\n\n/**\n * Shared floating-panel plumbing — a `<body>`-portaled panel that opens below its trigger (flips above\n * only when it would overflow), exposes the trigger width (for select-like matching), clamps to the\n * viewport, re-positions on scroll/resize (+ `ResizeObserver`), locks page scroll while open, and\n * dismisses on outside-pointerdown / `Escape`. The consumer owns the trigger ref, the `open` state, and\n * the `onClose` cleanup; this hook owns the panel ref, geometry, the enter-animation flag, and the\n * listeners. Wrapped by the internal `FloatingPanel` component, which every popover in the library\n * (`Select` / `MultiSelect`, the date/time pickers, `ColorPicker`) renders. Internal (not public).\n */\nexport function useFloatingPanel({\n open,\n triggerRef,\n align = 'start',\n onClose,\n}: UseFloatingPanelOptions): UseFloatingPanelResult {\n const popoverRef = useRef<HTMLDivElement | null>(null)\n const [position, setPosition] = useState<FloatingPanelPosition | null>(null)\n const [visible, setVisible] = useState(false)\n\n useLockBodyScroll(open)\n\n const reposition = useCallback(() => {\n const trigger = triggerRef.current\n const panel = popoverRef.current\n if (!trigger || !panel) return\n const rect = trigger.getBoundingClientRect()\n const panelH = panel.offsetHeight\n const vh = window.innerHeight\n const vw = window.innerWidth\n\n const spaceBelow = vh - rect.bottom - OFFSET - VIEWPORT_PADDING\n const spaceAbove = rect.top - OFFSET - VIEWPORT_PADDING\n // prefer below; flip up only when below can't fit AND above has more room\n let side: 'top' | 'bottom' = 'bottom'\n if (panelH > spaceBelow && spaceAbove > spaceBelow) side = 'top'\n\n const maxHeight = Math.max(0, side === 'bottom' ? spaceBelow : spaceAbove)\n const usedH = Math.min(panelH, maxHeight)\n let top = side === 'bottom' ? rect.bottom + OFFSET : rect.top - OFFSET - usedH\n top = Math.min(\n Math.max(top, VIEWPORT_PADDING),\n Math.max(VIEWPORT_PADDING, vh - VIEWPORT_PADDING - usedH),\n )\n // clamp using the panel's actual width (a panel can be wider than its trigger, e.g. a calendar);\n // `width` returns the trigger width for consumers that match it (Select/MultiSelect).\n const panelW = panel.offsetWidth\n // `end` pins the panel's right edge to the trigger's right (grows left); `start` pins left (grows right)\n const baseLeft = align === 'end' ? rect.right - panelW : rect.left\n const left = Math.min(\n Math.max(baseLeft, VIEWPORT_PADDING),\n Math.max(VIEWPORT_PADDING, vw - VIEWPORT_PADDING - panelW),\n )\n setPosition({ top, left, width: rect.width, side, maxHeight })\n }, [triggerRef, align])\n\n useLayoutEffect(() => {\n if (!open) {\n setVisible(false)\n return\n }\n reposition()\n }, [open, reposition])\n\n useEffect(() => {\n if (!open) return\n const raf = requestAnimationFrame(() => setVisible(true))\n const onReposition = () => reposition()\n window.addEventListener('resize', onReposition)\n window.addEventListener('scroll', onReposition, true)\n let ro: ResizeObserver | undefined\n if (typeof ResizeObserver !== 'undefined') {\n ro = new ResizeObserver(onReposition)\n if (popoverRef.current) ro.observe(popoverRef.current)\n if (triggerRef.current) ro.observe(triggerRef.current)\n }\n return () => {\n cancelAnimationFrame(raf)\n window.removeEventListener('resize', onReposition)\n window.removeEventListener('scroll', onReposition, true)\n ro?.disconnect()\n }\n }, [open, reposition, triggerRef])\n\n useEffect(() => {\n if (!open) return\n const onPointerDown = (e: PointerEvent) => {\n const t = e.target as Node\n if (triggerRef.current?.contains(t) || popoverRef.current?.contains(t)) return\n // restore focus to the trigger only if it was parked inside the panel (e.g. a search box)\n onClose(!!popoverRef.current?.contains(document.activeElement))\n }\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') onClose(true)\n }\n document.addEventListener('pointerdown', onPointerDown, true)\n document.addEventListener('keydown', onKey)\n return () => {\n document.removeEventListener('pointerdown', onPointerDown, true)\n document.removeEventListener('keydown', onKey)\n }\n }, [open, onClose, triggerRef])\n\n return { popoverRef, position, visible, reposition }\n}\n","import {\n forwardRef,\n type CSSProperties,\n type KeyboardEvent,\n type ReactNode,\n type RefObject,\n} from 'react'\nimport { createPortal } from 'react-dom'\nimport { clsx } from 'clsx'\nimport { useFloatingPanel } from '../../hooks/useFloatingPanel'\nimport styles from './FloatingPanel.module.css'\n\nexport interface FloatingPanelProps {\n /** Whether the panel is open — gates the portal and drives the enter animation. */\n open: boolean\n /** Ref to the anchor/trigger element the panel is positioned against. */\n triggerRef: RefObject<HTMLElement | null>\n /** Horizontal alignment to the trigger: `start` (default, grows right) or `end` (grows left). */\n align?: 'start' | 'end'\n /** Dismiss request: outside-pointerdown (arg = restore focus to the trigger?) or Escape (`true`). */\n onClose: (refocus: boolean) => void\n /** `id` for the panel element — pair with the trigger's `aria-controls`. */\n id?: string\n /** ARIA role for the panel element (e.g. `'dialog'`). Omit for a plain wrapper (e.g. around a listbox). */\n role?: string\n /** Accessible label, paired with `role`. */\n ariaLabel?: string\n /** Trap Tab focus inside the panel + mark it `aria-modal` (for modal dialogs like the date pickers). */\n trapFocus?: boolean\n /** Constrain the panel to the trigger's width (select-like). */\n matchTriggerWidth?: boolean\n /** Fixed panel width (px number or any CSS width). Wins over `matchTriggerWidth`. */\n width?: number | string\n /** Class(es) for the panel element, merged after the shared chrome (layout overrides live here). */\n className?: string\n /** Inline style merged onto the panel (e.g. a custom CSS var). */\n style?: CSSProperties\n /** Panel content. */\n children: ReactNode\n}\n\n/** Focusable descendants used by the optional focus trap. */\n// include inputs/selects/textareas/links — picker panels (DatePicker/ColorPicker/…) contain text\n// inputs, and a button-only selector let Shift+Tab escape the trap into the scroll-locked page\nconst FOCUSABLE =\n 'a[href]:not([tabindex=\"-1\"]), button:not([tabindex=\"-1\"]):not(:disabled), input:not([tabindex=\"-1\"]):not(:disabled), select:not([tabindex=\"-1\"]):not(:disabled), textarea:not([tabindex=\"-1\"]):not(:disabled), [tabindex=\"0\"]'\n\n/**\n * The shared floating popover used across the library — `Select` / `MultiSelect`, the date/time\n * pickers, `ColorPicker`, and the public `Popover`. Wraps `useFloatingPanel` and renders a `<body>`-portaled, viewport-clamped\n * panel that opens below its trigger (flips above only when it would overflow), locks page scroll while\n * open, animates in (opacity + translate, keyed off `data-open`/`data-side`), and dismisses on\n * outside-pointerdown / `Escape`. Optionally **traps Tab focus** (`trapFocus`, for modal dialogs — also\n * sets `aria-modal`). The forwarded ref points at the panel element, so a consumer can still read it for\n * blur/focus bookkeeping. Internal (not part of the public component surface).\n */\nexport const FloatingPanel = forwardRef<HTMLDivElement, FloatingPanelProps>(function FloatingPanel(\n {\n open,\n triggerRef,\n align,\n onClose,\n id,\n role,\n ariaLabel,\n trapFocus = false,\n matchTriggerWidth = false,\n width,\n className,\n style,\n children,\n },\n forwardedRef,\n) {\n const {\n popoverRef,\n position: pos,\n visible,\n } = useFloatingPanel({\n open,\n triggerRef,\n align,\n onClose,\n })\n\n // attach the panel node to both the hook's ref (for positioning) and the forwarded ref (for the\n // consumer's blur/focus bookkeeping)\n const setRef = (node: HTMLDivElement | null) => {\n popoverRef.current = node\n if (typeof forwardedRef === 'function') forwardedRef(node)\n else if (forwardedRef) forwardedRef.current = node\n }\n\n // trap Tab within the dialog so focus can't strand on the scroll-locked page behind it\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key !== 'Tab') return\n const panel = popoverRef.current\n if (!panel) return\n const focusables = panel.querySelectorAll<HTMLElement>(FOCUSABLE)\n if (focusables.length === 0) return\n const first = focusables[0]\n const last = focusables[focusables.length - 1]\n if (event.shiftKey && document.activeElement === first) {\n event.preventDefault()\n last.focus()\n } else if (!event.shiftKey && document.activeElement === last) {\n event.preventDefault()\n first.focus()\n }\n }\n\n if (!open) return null\n\n const resolvedWidth = width ?? (matchTriggerWidth ? pos?.width : undefined)\n\n return createPortal(\n <div\n ref={setRef}\n id={id}\n className={clsx(styles.panel, className)}\n role={role}\n aria-modal={role === 'dialog' && trapFocus ? true : undefined}\n aria-label={ariaLabel}\n data-open={visible ? 'true' : 'false'}\n data-side={pos?.side ?? 'bottom'}\n onKeyDown={trapFocus ? handleKeyDown : undefined}\n style={{\n position: 'fixed',\n top: pos?.top ?? 0,\n left: pos?.left ?? 0,\n width: resolvedWidth,\n maxHeight: pos?.maxHeight,\n visibility: pos ? 'visible' : 'hidden',\n ...style,\n }}\n >\n {children}\n </div>,\n document.body,\n )\n})\n"],"names":["VIEWPORT_PADDING","OFFSET","useFloatingPanel","open","triggerRef","align","onClose","popoverRef","useRef","position","setPosition","useState","visible","setVisible","useLockBodyScroll","reposition","useCallback","trigger","panel","rect","panelH","vh","vw","spaceBelow","spaceAbove","side","maxHeight","usedH","top","panelW","baseLeft","left","useLayoutEffect","useEffect","raf","onReposition","ro","onPointerDown","t","_a","_b","_c","onKey","FOCUSABLE","FloatingPanel","forwardRef","id","role","ariaLabel","trapFocus","matchTriggerWidth","width","className","style","children","forwardedRef","pos","setRef","node","handleKeyDown","event","focusables","first","last","resolvedWidth","createPortal","jsx","clsx","styles"],"mappings":";;;;;AAYA,MAAMA,IAAmB,GACnBC,IAAS;AAuCR,SAASC,EAAiB;AAAA,EAC/B,MAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,SAAAC;AACF,GAAoD;AAClD,QAAMC,IAAaC,EAA8B,IAAI,GAC/C,CAACC,GAAUC,CAAW,IAAIC,EAAuC,IAAI,GACrE,CAACC,GAASC,CAAU,IAAIF,EAAS,EAAK;AAE5C,EAAAG,EAAkBX,CAAI;AAEtB,QAAMY,IAAaC,EAAY,MAAM;AACnC,UAAMC,IAAUb,EAAW,SACrBc,IAAQX,EAAW;AACzB,QAAI,CAACU,KAAW,CAACC,EAAO;AACxB,UAAMC,IAAOF,EAAQ,sBAAA,GACfG,IAASF,EAAM,cACfG,IAAK,OAAO,aACZC,IAAK,OAAO,YAEZC,IAAaF,IAAKF,EAAK,SAASlB,IAASD,GACzCwB,IAAaL,EAAK,MAAMlB,IAASD;AAEvC,QAAIyB,IAAyB;AAC7B,IAAIL,IAASG,KAAcC,IAAaD,MAAYE,IAAO;AAE3D,UAAMC,IAAY,KAAK,IAAI,GAAGD,MAAS,WAAWF,IAAaC,CAAU,GACnEG,IAAQ,KAAK,IAAIP,GAAQM,CAAS;AACxC,QAAIE,IAAMH,MAAS,WAAWN,EAAK,SAASlB,IAASkB,EAAK,MAAMlB,IAAS0B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MAAA;AAAA,IAAA;AAAA,IAEH,SAAS;AAAA,EAAA;AAEb,CAAC;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const H=require("react/jsx-runtime"),u=require("react"),S=require("react-dom"),A=require("clsx"),g=require("./useLockBodyScroll-CIXHZo-Q.cjs"),l=8,D=6;function B({open:c,triggerRef:i,align:y="start",onClose:h}){const a=u.useRef(null),[F,E]=u.useState(null),[M,w]=u.useState(!1);g.useLockBodyScroll(c);const d=u.useCallback(()=>{const r=i.current,n=a.current;if(!r||!n)return;const e=r.getBoundingClientRect(),f=n.offsetHeight,s=window.innerHeight,m=window.innerWidth,t=s-e.bottom-D-l,p=e.top-D-l;let b="bottom";f>t&&p>t&&(b="top");const L=Math.max(0,b==="bottom"?t:p),P=Math.min(f,L);let o=b==="bottom"?e.bottom+D:e.top-D-P;o=Math.min(Math.max(o,l),Math.max(l,s-l-P));const x=n.offsetWidth,v=y==="end"?e.right-x:e.left,q=Math.min(Math.max(v,l),Math.max(l,m-l-x));E({top:o,left:q,width:e.width,side:b,maxHeight:L})},[i,y]);return u.useLayoutEffect(()=>{if(!c){w(!1);return}d()},[c,d]),u.useEffect(()=>{if(!c)return;const r=requestAnimationFrame(()=>w(!0)),n=()=>d();window.addEventListener("resize",n),window.addEventListener("scroll",n,!0);let e;return typeof ResizeObserver<"u"&&(e=new ResizeObserver(n),a.current&&e.observe(a.current),i.current&&e.observe(i.current)),()=>{cancelAnimationFrame(r),window.removeEventListener("resize",n),window.removeEventListener("scroll",n,!0),e==null||e.disconnect()}},[c,d,i]),u.useEffect(()=>{if(!c)return;const r=e=>{var s,m,t;const f=e.target;(s=i.current)!=null&&s.contains(f)||(m=a.current)!=null&&m.contains(f)||h(!!((t=a.current)!=null&&t.contains(document.activeElement)))},n=e=>{e.key==="Escape"&&h(!0)};return document.addEventListener("pointerdown",r,!0),document.addEventListener("keydown",n),()=>{document.removeEventListener("pointerdown",r,!0),document.removeEventListener("keydown",n)}},[c,h,i]),{popoverRef:a,position:F,visible:M,reposition:d}}const K="_panel_1cr9q_5",O={panel:K},W='a[href]:not([tabindex="-1"]), button:not([tabindex="-1"]):not(:disabled), input:not([tabindex="-1"]):not(:disabled), select:not([tabindex="-1"]):not(:disabled), textarea:not([tabindex="-1"]):not(:disabled), [tabindex="0"]',z=u.forwardRef(function({open:i,triggerRef:y,align:h,onClose:a,id:F,role:E,ariaLabel:M,trapFocus:w=!1,matchTriggerWidth:d=!1,width:r,className:n,style:e,children:f},s){const{popoverRef:m,position:t,visible:p}=B({open:i,triggerRef:y,align:h,onClose:a}),b=o=>{m.current=o,typeof s=="function"?s(o):s&&(s.current=o)},L=o=>{if(o.key!=="Tab")return;const x=m.current;if(!x)return;const v=x.querySelectorAll(W);if(v.length===0)return;const q=v[0],k=v[v.length-1];o.shiftKey&&document.activeElement===q?(o.preventDefault(),k.focus()):!o.shiftKey&&document.activeElement===k&&(o.preventDefault(),q.focus())};if(!i)return null;const P=r??(d?t==null?void 0:t.width:void 0);return S.createPortal(H.jsx("div",{ref:b,id:F,className:A.clsx(O.panel,n),role:E,"aria-modal":E==="dialog"&&w?!0:void 0,"aria-label":M,"data-open":p?"true":"false","data-side":(t==null?void 0:t.side)??"bottom",onKeyDown:w?L:void 0,style:{position:"fixed",top:(t==null?void 0:t.top)??0,left:(t==null?void 0:t.left)??0,width:P,maxHeight:t==null?void 0:t.maxHeight,visibility:t?"visible":"hidden",...e},children:f}),document.body)});exports.FloatingPanel=z;
2
+ //# sourceMappingURL=FloatingPanel-U6sGYiSK.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingPanel-U6sGYiSK.cjs","sources":["../src/hooks/useFloatingPanel.ts","../src/components/FloatingPanel/FloatingPanel.tsx"],"sourcesContent":["import { useCallback, useEffect, useLayoutEffect, useRef, useState, type RefObject } from 'react'\nimport { useLockBodyScroll } from './useLockBodyScroll'\n\n/** Geometry computed for a floating panel anchored to a trigger. */\nexport interface FloatingPanelPosition {\n top: number\n left: number\n width: number\n side: 'top' | 'bottom'\n maxHeight: number\n}\n\nconst VIEWPORT_PADDING = 8\nconst OFFSET = 6\n\nexport interface UseFloatingPanelOptions {\n /** Whether the panel is open. */\n open: boolean\n /** Ref to the anchor/trigger element. */\n triggerRef: RefObject<HTMLElement | null>\n /**\n * Horizontal alignment to the trigger: `start` (panel's left edge at the trigger's left — grows\n * right, the default) or `end` (panel's right edge at the trigger's right — grows left).\n */\n align?: 'start' | 'end'\n /**\n * Dismiss request. Outside-pointerdown passes whether focus was parked inside the panel (so the\n * consumer can restore focus to the trigger); Escape passes `true`.\n */\n onClose: (refocus: boolean) => void\n}\n\nexport interface UseFloatingPanelResult {\n /** Attach to the portaled panel element. */\n popoverRef: RefObject<HTMLDivElement | null>\n /** Computed geometry (null until first measured). */\n position: FloatingPanelPosition | null\n /** Enter-animation flag (rAF-driven once open). */\n visible: boolean\n /** Force a re-measure (rarely needed — scroll/resize/ResizeObserver already drive it). */\n reposition: () => void\n}\n\n/**\n * Shared floating-panel plumbing — a `<body>`-portaled panel that opens below its trigger (flips above\n * only when it would overflow), exposes the trigger width (for select-like matching), clamps to the\n * viewport, re-positions on scroll/resize (+ `ResizeObserver`), locks page scroll while open, and\n * dismisses on outside-pointerdown / `Escape`. The consumer owns the trigger ref, the `open` state, and\n * the `onClose` cleanup; this hook owns the panel ref, geometry, the enter-animation flag, and the\n * listeners. Wrapped by the internal `FloatingPanel` component, which every popover in the library\n * (`Select` / `MultiSelect`, the date/time pickers, `ColorPicker`) renders. Internal (not public).\n */\nexport function useFloatingPanel({\n open,\n triggerRef,\n align = 'start',\n onClose,\n}: UseFloatingPanelOptions): UseFloatingPanelResult {\n const popoverRef = useRef<HTMLDivElement | null>(null)\n const [position, setPosition] = useState<FloatingPanelPosition | null>(null)\n const [visible, setVisible] = useState(false)\n\n useLockBodyScroll(open)\n\n const reposition = useCallback(() => {\n const trigger = triggerRef.current\n const panel = popoverRef.current\n if (!trigger || !panel) return\n const rect = trigger.getBoundingClientRect()\n const panelH = panel.offsetHeight\n const vh = window.innerHeight\n const vw = window.innerWidth\n\n const spaceBelow = vh - rect.bottom - OFFSET - VIEWPORT_PADDING\n const spaceAbove = rect.top - OFFSET - VIEWPORT_PADDING\n // prefer below; flip up only when below can't fit AND above has more room\n let side: 'top' | 'bottom' = 'bottom'\n if (panelH > spaceBelow && spaceAbove > spaceBelow) side = 'top'\n\n const maxHeight = Math.max(0, side === 'bottom' ? spaceBelow : spaceAbove)\n const usedH = Math.min(panelH, maxHeight)\n let top = side === 'bottom' ? rect.bottom + OFFSET : rect.top - OFFSET - usedH\n top = Math.min(\n Math.max(top, VIEWPORT_PADDING),\n Math.max(VIEWPORT_PADDING, vh - VIEWPORT_PADDING - usedH),\n )\n // clamp using the panel's actual width (a panel can be wider than its trigger, e.g. a calendar);\n // `width` returns the trigger width for consumers that match it (Select/MultiSelect).\n const panelW = panel.offsetWidth\n // `end` pins the panel's right edge to the trigger's right (grows left); `start` pins left (grows right)\n const baseLeft = align === 'end' ? rect.right - panelW : rect.left\n const left = Math.min(\n Math.max(baseLeft, VIEWPORT_PADDING),\n Math.max(VIEWPORT_PADDING, vw - VIEWPORT_PADDING - panelW),\n )\n setPosition({ top, left, width: rect.width, side, maxHeight })\n }, [triggerRef, align])\n\n useLayoutEffect(() => {\n if (!open) {\n setVisible(false)\n return\n }\n reposition()\n }, [open, reposition])\n\n useEffect(() => {\n if (!open) return\n const raf = requestAnimationFrame(() => setVisible(true))\n const onReposition = () => reposition()\n window.addEventListener('resize', onReposition)\n window.addEventListener('scroll', onReposition, true)\n let ro: ResizeObserver | undefined\n if (typeof ResizeObserver !== 'undefined') {\n ro = new ResizeObserver(onReposition)\n if (popoverRef.current) ro.observe(popoverRef.current)\n if (triggerRef.current) ro.observe(triggerRef.current)\n }\n return () => {\n cancelAnimationFrame(raf)\n window.removeEventListener('resize', onReposition)\n window.removeEventListener('scroll', onReposition, true)\n ro?.disconnect()\n }\n }, [open, reposition, triggerRef])\n\n useEffect(() => {\n if (!open) return\n const onPointerDown = (e: PointerEvent) => {\n const t = e.target as Node\n if (triggerRef.current?.contains(t) || popoverRef.current?.contains(t)) return\n // restore focus to the trigger only if it was parked inside the panel (e.g. a search box)\n onClose(!!popoverRef.current?.contains(document.activeElement))\n }\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') onClose(true)\n }\n document.addEventListener('pointerdown', onPointerDown, true)\n document.addEventListener('keydown', onKey)\n return () => {\n document.removeEventListener('pointerdown', onPointerDown, true)\n document.removeEventListener('keydown', onKey)\n }\n }, [open, onClose, triggerRef])\n\n return { popoverRef, position, visible, reposition }\n}\n","import {\n forwardRef,\n type CSSProperties,\n type KeyboardEvent,\n type ReactNode,\n type RefObject,\n} from 'react'\nimport { createPortal } from 'react-dom'\nimport { clsx } from 'clsx'\nimport { useFloatingPanel } from '../../hooks/useFloatingPanel'\nimport styles from './FloatingPanel.module.css'\n\nexport interface FloatingPanelProps {\n /** Whether the panel is open — gates the portal and drives the enter animation. */\n open: boolean\n /** Ref to the anchor/trigger element the panel is positioned against. */\n triggerRef: RefObject<HTMLElement | null>\n /** Horizontal alignment to the trigger: `start` (default, grows right) or `end` (grows left). */\n align?: 'start' | 'end'\n /** Dismiss request: outside-pointerdown (arg = restore focus to the trigger?) or Escape (`true`). */\n onClose: (refocus: boolean) => void\n /** `id` for the panel element — pair with the trigger's `aria-controls`. */\n id?: string\n /** ARIA role for the panel element (e.g. `'dialog'`). Omit for a plain wrapper (e.g. around a listbox). */\n role?: string\n /** Accessible label, paired with `role`. */\n ariaLabel?: string\n /** Trap Tab focus inside the panel + mark it `aria-modal` (for modal dialogs like the date pickers). */\n trapFocus?: boolean\n /** Constrain the panel to the trigger's width (select-like). */\n matchTriggerWidth?: boolean\n /** Fixed panel width (px number or any CSS width). Wins over `matchTriggerWidth`. */\n width?: number | string\n /** Class(es) for the panel element, merged after the shared chrome (layout overrides live here). */\n className?: string\n /** Inline style merged onto the panel (e.g. a custom CSS var). */\n style?: CSSProperties\n /** Panel content. */\n children: ReactNode\n}\n\n/** Focusable descendants used by the optional focus trap. */\n// include inputs/selects/textareas/links — picker panels (DatePicker/ColorPicker/…) contain text\n// inputs, and a button-only selector let Shift+Tab escape the trap into the scroll-locked page\nconst FOCUSABLE =\n 'a[href]:not([tabindex=\"-1\"]), button:not([tabindex=\"-1\"]):not(:disabled), input:not([tabindex=\"-1\"]):not(:disabled), select:not([tabindex=\"-1\"]):not(:disabled), textarea:not([tabindex=\"-1\"]):not(:disabled), [tabindex=\"0\"]'\n\n/**\n * The shared floating popover used across the library — `Select` / `MultiSelect`, the date/time\n * pickers, `ColorPicker`, and the public `Popover`. Wraps `useFloatingPanel` and renders a `<body>`-portaled, viewport-clamped\n * panel that opens below its trigger (flips above only when it would overflow), locks page scroll while\n * open, animates in (opacity + translate, keyed off `data-open`/`data-side`), and dismisses on\n * outside-pointerdown / `Escape`. Optionally **traps Tab focus** (`trapFocus`, for modal dialogs — also\n * sets `aria-modal`). The forwarded ref points at the panel element, so a consumer can still read it for\n * blur/focus bookkeeping. Internal (not part of the public component surface).\n */\nexport const FloatingPanel = forwardRef<HTMLDivElement, FloatingPanelProps>(function FloatingPanel(\n {\n open,\n triggerRef,\n align,\n onClose,\n id,\n role,\n ariaLabel,\n trapFocus = false,\n matchTriggerWidth = false,\n width,\n className,\n style,\n children,\n },\n forwardedRef,\n) {\n const {\n popoverRef,\n position: pos,\n visible,\n } = useFloatingPanel({\n open,\n triggerRef,\n align,\n onClose,\n })\n\n // attach the panel node to both the hook's ref (for positioning) and the forwarded ref (for the\n // consumer's blur/focus bookkeeping)\n const setRef = (node: HTMLDivElement | null) => {\n popoverRef.current = node\n if (typeof forwardedRef === 'function') forwardedRef(node)\n else if (forwardedRef) forwardedRef.current = node\n }\n\n // trap Tab within the dialog so focus can't strand on the scroll-locked page behind it\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (event.key !== 'Tab') return\n const panel = popoverRef.current\n if (!panel) return\n const focusables = panel.querySelectorAll<HTMLElement>(FOCUSABLE)\n if (focusables.length === 0) return\n const first = focusables[0]\n const last = focusables[focusables.length - 1]\n if (event.shiftKey && document.activeElement === first) {\n event.preventDefault()\n last.focus()\n } else if (!event.shiftKey && document.activeElement === last) {\n event.preventDefault()\n first.focus()\n }\n }\n\n if (!open) return null\n\n const resolvedWidth = width ?? (matchTriggerWidth ? pos?.width : undefined)\n\n return createPortal(\n <div\n ref={setRef}\n id={id}\n className={clsx(styles.panel, className)}\n role={role}\n aria-modal={role === 'dialog' && trapFocus ? true : undefined}\n aria-label={ariaLabel}\n data-open={visible ? 'true' : 'false'}\n data-side={pos?.side ?? 'bottom'}\n onKeyDown={trapFocus ? handleKeyDown : undefined}\n style={{\n position: 'fixed',\n top: pos?.top ?? 0,\n left: pos?.left ?? 0,\n width: resolvedWidth,\n maxHeight: pos?.maxHeight,\n visibility: pos ? 'visible' : 'hidden',\n ...style,\n }}\n >\n {children}\n </div>,\n document.body,\n )\n})\n"],"names":["VIEWPORT_PADDING","OFFSET","useFloatingPanel","open","triggerRef","align","onClose","popoverRef","useRef","position","setPosition","useState","visible","setVisible","useLockBodyScroll","reposition","useCallback","trigger","panel","rect","panelH","vh","vw","spaceBelow","spaceAbove","side","maxHeight","usedH","top","panelW","baseLeft","left","useLayoutEffect","useEffect","raf","onReposition","ro","onPointerDown","t","_a","_b","_c","onKey","FOCUSABLE","FloatingPanel","forwardRef","id","role","ariaLabel","trapFocus","matchTriggerWidth","width","className","style","children","forwardedRef","pos","setRef","node","handleKeyDown","event","focusables","first","last","resolvedWidth","createPortal","jsx","clsx","styles"],"mappings":"4JAYMA,EAAmB,EACnBC,EAAS,EAuCR,SAASC,EAAiB,CAC/B,KAAAC,EACA,WAAAC,EACA,MAAAC,EAAQ,QACR,QAAAC,CACF,EAAoD,CAClD,MAAMC,EAAaC,EAAAA,OAA8B,IAAI,EAC/C,CAACC,EAAUC,CAAW,EAAIC,EAAAA,SAAuC,IAAI,EACrE,CAACC,EAASC,CAAU,EAAIF,EAAA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KH,GAAA,YAAAA,EAAK,MAAO,EACjB,MAAMA,GAAA,YAAAA,EAAK,OAAQ,EACnB,MAAOQ,EACP,UAAWR,GAAA,YAAAA,EAAK,UAChB,WAAYA,EAAM,UAAY,SAC9B,GAAGH,CAAA,EAGJ,SAAAC,CAAA,CAAA,EAEH,SAAS,IAAA,CAEb,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";const r=require("react/jsx-runtime"),o=require("./formContext-bTWrqdEV.cjs");function i({form:e,children:t,...n}){return r.jsx("form",{noValidate:!0,...n,onSubmit:e.handleSubmit,children:r.jsx(o.FormContext.Provider,{value:e,children:t})})}exports.Form=i;
2
+ //# sourceMappingURL=Form-Bz2xgkEm.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form-Bz2xgkEm.cjs","sources":["../src/form/Form.tsx"],"sourcesContent":["import type { FormHTMLAttributes, ReactNode } from 'react'\nimport { FormContext } from './formContext'\nimport type { FormApi } from './useForm'\n\nexport interface FormProps<Values> extends Omit<FormHTMLAttributes<HTMLFormElement>, 'onSubmit'> {\n /** A form instance from `useForm()`. Provides validation + binding to nested fields by `name`. */\n form: FormApi<Values>\n children?: ReactNode\n}\n\n/**\n * Wraps a form: renders a native `<form>` wired to `form.handleSubmit` and shares the instance via\n * context so nested controls auto-bind by `name` (e.g. `<TextField name=\"email\" />`) — no need to\n * spread `{...form.field('email')}`. `noValidate` is set so the browser's native validation UI\n * stays out of the way of the schema-driven errors.\n */\nexport function Form<Values>({ form, children, ...props }: FormProps<Values>) {\n return (\n <form noValidate {...props} onSubmit={form.handleSubmit}>\n <FormContext.Provider value={form as unknown as FormApi<Record<string, unknown>>}>\n {children}\n </FormContext.Provider>\n </form>\n )\n}\n"],"names":["Form","form","children","props","jsx","FormContext"],"mappings":"0FAgBO,SAASA,EAAa,CAAE,KAAAC,EAAM,SAAAC,EAAU,GAAGC,GAA4B,CAC5E,aACG,OAAA,CAAK,WAAU,GAAE,GAAGA,EAAO,SAAUF,EAAK,aACzC,SAAAG,EAAAA,IAACC,EAAAA,YAAY,SAAZ,CAAqB,MAAOJ,EAC1B,SAAAC,EACH,EACF,CAEJ"}
@@ -0,0 +1,9 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { F as i } from "./formContext-B7ln1Miy.js";
3
+ function a({ form: r, children: t, ...e }) {
4
+ return /* @__PURE__ */ o("form", { noValidate: !0, ...e, onSubmit: r.handleSubmit, children: /* @__PURE__ */ o(i.Provider, { value: r, children: t }) });
5
+ }
6
+ export {
7
+ a as F
8
+ };
9
+ //# sourceMappingURL=Form-kglaJYr5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Form-kglaJYr5.js","sources":["../src/form/Form.tsx"],"sourcesContent":["import type { FormHTMLAttributes, ReactNode } from 'react'\nimport { FormContext } from './formContext'\nimport type { FormApi } from './useForm'\n\nexport interface FormProps<Values> extends Omit<FormHTMLAttributes<HTMLFormElement>, 'onSubmit'> {\n /** A form instance from `useForm()`. Provides validation + binding to nested fields by `name`. */\n form: FormApi<Values>\n children?: ReactNode\n}\n\n/**\n * Wraps a form: renders a native `<form>` wired to `form.handleSubmit` and shares the instance via\n * context so nested controls auto-bind by `name` (e.g. `<TextField name=\"email\" />`) — no need to\n * spread `{...form.field('email')}`. `noValidate` is set so the browser's native validation UI\n * stays out of the way of the schema-driven errors.\n */\nexport function Form<Values>({ form, children, ...props }: FormProps<Values>) {\n return (\n <form noValidate {...props} onSubmit={form.handleSubmit}>\n <FormContext.Provider value={form as unknown as FormApi<Record<string, unknown>>}>\n {children}\n </FormContext.Provider>\n </form>\n )\n}\n"],"names":["Form","form","children","props","jsx","FormContext"],"mappings":";;AAgBO,SAASA,EAAa,EAAE,MAAAC,GAAM,UAAAC,GAAU,GAAGC,KAA4B;AAC5E,2BACG,QAAA,EAAK,YAAU,IAAE,GAAGA,GAAO,UAAUF,EAAK,cACzC,UAAA,gBAAAG,EAACC,EAAY,UAAZ,EAAqB,OAAOJ,GAC1B,UAAAC,GACH,GACF;AAEJ;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const s=require("react/jsx-runtime"),c=require("react"),F=require("./Icon-CXTl_QAP.cjs"),h=require("./IconButton-D6TenQZ_.cjs"),q=require("./ConfigProvider-ByOFXVyP.cjs"),E=c.forwardRef(function({variant:i="outlined",...t},d){const[a]=c.useState(()=>typeof document<"u"&&typeof document.documentElement.requestFullscreen=="function"),[l,f]=c.useState(!1),m=q.useT();if(c.useEffect(()=>{const e=()=>f(document.fullscreenElement!=null);return e(),document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]),!a)return null;const g=()=>{var e,n,u,o,r;document.fullscreenElement?(n=(e=document.exitFullscreen)==null?void 0:e.call(document))==null||n.catch(()=>{}):(r=(o=(u=document.documentElement).requestFullscreen)==null?void 0:o.call(u))==null||r.catch(()=>{})};return s.jsx(h.IconButton,{ref:d,variant:i,role:"switch","aria-checked":l,"aria-label":m("fullscreenToggle.label"),...t,onClick:e=>{var n;(n=t.onClick)==null||n.call(t,e),g()},children:s.jsx(F.Icon,{name:"Maximize3",style:l?{transform:"rotate(180deg)"}:void 0})})});exports.FullscreenToggle=E;
2
+ //# sourceMappingURL=FullscreenToggle-DDKN5n8B.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FullscreenToggle-DDKN5n8B.cjs","sources":["../src/components/FullscreenToggle/FullscreenToggle.tsx"],"sourcesContent":["import { forwardRef, useEffect, useState } from 'react'\nimport { useT } from '../../theme'\nimport { Icon } from '../Icon'\nimport { IconButton, type IconButtonProps } from '../IconButton'\n\n/** Inherits `IconButton`'s look (variant, color, size); the icon and toggle behavior are built in. */\nexport type FullscreenToggleProps = Omit<IconButtonProps, 'children'>\n\n/**\n * A one-tap browser fullscreen switch. Renders an `IconButton` that calls the Fullscreen API —\n * `requestFullscreen` to maximize, `exitFullscreen` to restore — and flips its `Maximize3` icon 180°\n * while fullscreen (so it reads as \"minimize\"), keeping state in sync via the `fullscreenchange`\n * event. Renders **nothing** where the Fullscreen API is unavailable (e.g. iOS Safari on iPhone), so\n * it auto-hides on devices that can't go fullscreen. Styling comes from `IconButton`, so `variant`,\n * `color` and `size` pass through.\n */\nexport const FullscreenToggle = forwardRef<HTMLButtonElement, FullscreenToggleProps>(\n function FullscreenToggle({ variant = 'outlined', ...props }, ref) {\n // The Fullscreen API is absent on some devices (notably iOS Safari on iPhone); hide the control\n // there, since tapping it could never do anything.\n const [supported] = useState(\n () =>\n typeof document !== 'undefined' &&\n typeof document.documentElement.requestFullscreen === 'function',\n )\n const [isFullscreen, setIsFullscreen] = useState(false)\n const t = useT()\n\n useEffect(() => {\n const sync = () => setIsFullscreen(document.fullscreenElement != null)\n sync() // pick up a session that's already fullscreen on mount\n document.addEventListener('fullscreenchange', sync)\n return () => document.removeEventListener('fullscreenchange', sync)\n }, [])\n\n if (!supported) return null\n\n const toggle = () => {\n // `?.` guards environments without the Fullscreen API; `.catch` swallows a blocked request\n if (document.fullscreenElement) {\n document.exitFullscreen?.()?.catch(() => {})\n } else {\n document.documentElement.requestFullscreen?.()?.catch(() => {})\n }\n }\n\n return (\n <IconButton\n ref={ref}\n variant={variant}\n role=\"switch\"\n aria-checked={isFullscreen}\n aria-label={t('fullscreenToggle.label')}\n {...props}\n onClick={(event) => {\n props.onClick?.(event) // preserve a caller-supplied handler, then toggle\n toggle()\n }}\n >\n <Icon name=\"Maximize3\" style={isFullscreen ? { transform: 'rotate(180deg)' } : undefined} />\n </IconButton>\n )\n },\n)\n"],"names":["FullscreenToggle","forwardRef","variant","props","ref","supported","useState","isFullscreen","setIsFullscreen","t","useT","useEffect","sync","toggle","_b","_a","_e","_d","_c","jsx","IconButton","event","Icon"],"mappings":"wLAgBaA,EAAmBC,EAAAA,WAC9B,SAA0B,CAAE,QAAAC,EAAU,WAAY,GAAGC,CAAA,EAASC,EAAK,CAGjE,KAAM,CAACC,CAAS,EAAIC,EAAAA,SAClB,IACE,OAAO,SAAa,KACpB,OAAO,SAAS,gBAAgB,mBAAsB,UAAA,EAEpD,CAACC,EAAcC,CAAe,EAAIF,EAAAA,SAAS,EAAK,EAChDG,EAAIC,EAAAA,KAAA,EASV,GAPAC,EAAAA,UAAU,IAAM,CACd,MAAMC,EAAO,IAAMJ,EAAgB,SAAS,mBAAqB,IAAI,EACrE,OAAAI,EAAA,EACA,SAAS,iBAAiB,mBAAoBA,CAAI,EAC3C,IAAM,SAAS,oBAAoB,mBAAoBA,CAAI,CACpE,EAAG,CAAA,CAAE,EAED,CAACP,EAAW,OAAO,KAEvB,MAAMQ,EAAS,IAAM,eAEf,SAAS,mBACXC,GAAAC,EAAA,SAAS,iBAAT,YAAAA,EAAA,uBAAAD,EAA6B,MAAM,IAAM,CAAC,IAE1CE,GAAAC,GAAAC,EAAA,SAAS,iBAAgB,oBAAzB,YAAAD,EAAA,KAAAC,KAAA,MAAAF,EAAgD,MAAM,IAAM,CAAC,EAEjE,EAEA,OACEG,EAAAA,IAACC,EAAAA,WAAA,CACC,IAAAhB,EACA,QAAAF,EACA,KAAK,SACL,eAAcK,EACd,aAAYE,EAAE,wBAAwB,EACrC,GAAGN,EACJ,QAAUkB,GAAU,QAClBN,EAAAZ,EAAM,UAAN,MAAAY,EAAA,KAAAZ,EAAgBkB,GAChBR,EAAA,CACF,EAEA,SAAAM,EAAAA,IAACG,OAAA,CAAK,KAAK,YAAY,MAAOf,EAAe,CAAE,UAAW,gBAAA,EAAqB,MAAA,CAAW,CAAA,CAAA,CAGhG,CACF"}