@alfadocs/ui-kit-debug 1.117.0 → 1.119.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 (257) hide show
  1. package/dist/_chunks/{address-autocomplete-Bnc9ieKO.js → address-autocomplete-zLygkxFc.js} +2 -2
  2. package/dist/_chunks/{address-autocomplete-Bnc9ieKO.js.map → address-autocomplete-zLygkxFc.js.map} +1 -1
  3. package/dist/_chunks/{address-fields-RIaGnpnm.js → address-fields-Dl1ALKhP.js} +2 -2
  4. package/dist/_chunks/{address-fields-RIaGnpnm.js.map → address-fields-Dl1ALKhP.js.map} +1 -1
  5. package/dist/_chunks/bill-line-table-DUMEHnQ4.js +1754 -0
  6. package/dist/_chunks/bill-line-table-DUMEHnQ4.js.map +1 -0
  7. package/dist/_chunks/{calendar-appointment-editor-dialog-BEmBcb61.js → calendar-appointment-editor-dialog-rw02sXGw.js} +4 -4
  8. package/dist/_chunks/{calendar-appointment-editor-dialog-BEmBcb61.js.map → calendar-appointment-editor-dialog-rw02sXGw.js.map} +1 -1
  9. package/dist/_chunks/{compact-editor-fields-6sTWRLtf.js → compact-editor-fields-cP6yh7xv.js} +3 -3
  10. package/dist/_chunks/{compact-editor-fields-6sTWRLtf.js.map → compact-editor-fields-cP6yh7xv.js.map} +1 -1
  11. package/dist/_chunks/counts-BXtzNv_G.js +92 -0
  12. package/dist/_chunks/counts-BXtzNv_G.js.map +1 -0
  13. package/dist/_chunks/{data-grid-DiBSbN2Y.js → data-grid-Bbf8t4z3.js} +2 -2
  14. package/dist/_chunks/{data-grid-DiBSbN2Y.js.map → data-grid-Bbf8t4z3.js.map} +1 -1
  15. package/dist/_chunks/{default-tabs-CD285u0C.js → default-tabs-Cxkw1Ws0.js} +332 -368
  16. package/dist/_chunks/default-tabs-Cxkw1Ws0.js.map +1 -0
  17. package/dist/_chunks/{document-scanner-5p-Uu8dy.js → document-scanner-CETscDea.js} +2 -2
  18. package/dist/_chunks/{document-scanner-5p-Uu8dy.js.map → document-scanner-CETscDea.js.map} +1 -1
  19. package/dist/_chunks/file-code-Cf-_gSzd.js +23 -0
  20. package/dist/_chunks/file-code-Cf-_gSzd.js.map +1 -0
  21. package/dist/_chunks/{file-manager-CV1_GtjC.js → file-manager-DNq-sEsy.js} +2 -2
  22. package/dist/_chunks/{file-manager-CV1_GtjC.js.map → file-manager-DNq-sEsy.js.map} +1 -1
  23. package/dist/_chunks/{file-upload-CxjCs7TX.js → file-upload-DQc0LsBM.js} +385 -311
  24. package/dist/_chunks/file-upload-DQc0LsBM.js.map +1 -0
  25. package/dist/_chunks/invoice-upload-list-CsFsRgbt.js +952 -0
  26. package/dist/_chunks/invoice-upload-list-CsFsRgbt.js.map +1 -0
  27. package/dist/_chunks/map-view-CHeGd94F.js +1443 -0
  28. package/dist/_chunks/map-view-CHeGd94F.js.map +1 -0
  29. package/dist/_chunks/maps-MpMxTBov.js +63 -0
  30. package/dist/_chunks/maps-MpMxTBov.js.map +1 -0
  31. package/dist/_chunks/{maps-core-gate-Dgs7jXxy.js → maps-core-gate-C4dyo1ic.js} +5 -5
  32. package/dist/_chunks/{maps-core-gate-Dgs7jXxy.js.map → maps-core-gate-C4dyo1ic.js.map} +1 -1
  33. package/dist/_chunks/{notes-panel-CHR-Jv6N.js → notes-panel-BOwlTz2-.js} +2 -2
  34. package/dist/_chunks/{notes-panel-CHR-Jv6N.js.map → notes-panel-BOwlTz2-.js.map} +1 -1
  35. package/dist/_chunks/package-plus-CTecQK3x.js +25 -0
  36. package/dist/_chunks/package-plus-CTecQK3x.js.map +1 -0
  37. package/dist/_chunks/{practice-results-CzHWprX4.js → practice-results-b3uchdBn.js} +40 -39
  38. package/dist/_chunks/practice-results-b3uchdBn.js.map +1 -0
  39. package/dist/_chunks/{public-footer-CB7ruuLI.js → public-footer-C8UIzqLJ.js} +326 -243
  40. package/dist/_chunks/public-footer-C8UIzqLJ.js.map +1 -0
  41. package/dist/_chunks/{radiograph-panel.agent-9jwXlOXB.js → radiograph-panel.agent-Dcv16n7u.js} +2 -2
  42. package/dist/_chunks/{radiograph-panel.agent-9jwXlOXB.js.map → radiograph-panel.agent-Dcv16n7u.js.map} +1 -1
  43. package/dist/_chunks/{reserved.agent-TaZfI3yj.js → reserved.agent-V2Eqoabh.js} +2 -2
  44. package/dist/_chunks/{reserved.agent-TaZfI3yj.js.map → reserved.agent-V2Eqoabh.js.map} +1 -1
  45. package/dist/_chunks/{rich-text-editor-CMPA5Wgy.js → rich-text-editor-BLEdXJ0l.js} +2 -2
  46. package/dist/_chunks/{rich-text-editor-CMPA5Wgy.js.map → rich-text-editor-BLEdXJ0l.js.map} +1 -1
  47. package/dist/_chunks/{signed-out-frame-bh7fn_Px.js → signed-out-frame-fUf7tqs3.js} +2 -2
  48. package/dist/_chunks/{signed-out-frame-bh7fn_Px.js.map → signed-out-frame-fUf7tqs3.js.map} +1 -1
  49. package/dist/_chunks/{task-editor-WdDCqbIL.js → task-editor-Czcx9B-3.js} +2 -2
  50. package/dist/_chunks/{task-editor-WdDCqbIL.js.map → task-editor-Czcx9B-3.js.map} +1 -1
  51. package/dist/_chunks/{toolbar-z8vXnpXz.js → toolbar-DoKcoE2q.js} +2 -2
  52. package/dist/_chunks/{toolbar-z8vXnpXz.js.map → toolbar-DoKcoE2q.js.map} +1 -1
  53. package/dist/_chunks/types-BrJRsnSG.js +291 -0
  54. package/dist/_chunks/types-BrJRsnSG.js.map +1 -0
  55. package/dist/_chunks/warehouse-load-summary-D88M4Ii7.js +255 -0
  56. package/dist/_chunks/warehouse-load-summary-D88M4Ii7.js.map +1 -0
  57. package/dist/agent-catalog.json +360 -14
  58. package/dist/agent-i18n/en.json +31 -2
  59. package/dist/browser-support.js +1 -1
  60. package/dist/components/_shared/warehouse-load/counts.d.ts +82 -0
  61. package/dist/components/_shared/warehouse-load/counts.d.ts.map +1 -0
  62. package/dist/components/_shared/warehouse-load/index.d.ts +4 -0
  63. package/dist/components/_shared/warehouse-load/index.d.ts.map +1 -0
  64. package/dist/components/_shared/warehouse-load/maps.d.ts +67 -0
  65. package/dist/components/_shared/warehouse-load/maps.d.ts.map +1 -0
  66. package/dist/components/_shared/warehouse-load/types.d.ts +18 -0
  67. package/dist/components/_shared/warehouse-load/types.d.ts.map +1 -0
  68. package/dist/components/address-autocomplete/index.js +1 -1
  69. package/dist/components/address-fields/index.js +1 -1
  70. package/dist/components/bill-line-table/bill-line-table.columns.d.ts +2 -0
  71. package/dist/components/bill-line-table/bill-line-table.columns.d.ts.map +1 -1
  72. package/dist/components/bill-line-table/bill-line-table.d.ts.map +1 -1
  73. package/dist/components/bill-line-table/bill-line-table.header.d.ts +7 -0
  74. package/dist/components/bill-line-table/bill-line-table.header.d.ts.map +1 -0
  75. package/dist/components/bill-line-table/bill-line-table.model.d.ts +10 -1
  76. package/dist/components/bill-line-table/bill-line-table.model.d.ts.map +1 -1
  77. package/dist/components/bill-line-table/bill-line-table.types.d.ts +66 -1
  78. package/dist/components/bill-line-table/bill-line-table.types.d.ts.map +1 -1
  79. package/dist/components/bill-line-table/bill-line-table.variants.d.ts +12 -0
  80. package/dist/components/bill-line-table/bill-line-table.variants.d.ts.map +1 -1
  81. package/dist/components/bill-line-table/index.d.ts +2 -2
  82. package/dist/components/bill-line-table/index.d.ts.map +1 -1
  83. package/dist/components/bill-line-table/index.js +10 -8
  84. package/dist/components/bill-table/index.js +1 -1
  85. package/dist/components/booking/index.js +1 -1
  86. package/dist/components/data-grid/data-grid.variants.d.ts +1 -1
  87. package/dist/components/data-grid/index.js +2 -2
  88. package/dist/components/document-scanner/index.js +1 -1
  89. package/dist/components/file-manager/index.js +1 -1
  90. package/dist/components/file-upload/file-upload.d.ts +30 -1
  91. package/dist/components/file-upload/file-upload.d.ts.map +1 -1
  92. package/dist/components/file-upload/index.js +1 -1
  93. package/dist/components/flag/flag-view.d.ts +1 -1
  94. package/dist/components/index.d.ts +3 -0
  95. package/dist/components/index.d.ts.map +1 -1
  96. package/dist/components/invoice-upload/index.d.ts +5 -0
  97. package/dist/components/invoice-upload/index.d.ts.map +1 -0
  98. package/dist/components/invoice-upload/index.js +7 -0
  99. package/dist/components/invoice-upload/index.js.map +1 -0
  100. package/dist/components/invoice-upload/invoice-upload.agent.d.ts +4 -0
  101. package/dist/components/invoice-upload/invoice-upload.agent.d.ts.map +1 -0
  102. package/dist/components/invoice-upload/invoice-upload.d.ts +3 -0
  103. package/dist/components/invoice-upload/invoice-upload.d.ts.map +1 -0
  104. package/dist/components/invoice-upload/types.d.ts +72 -0
  105. package/dist/components/invoice-upload/types.d.ts.map +1 -0
  106. package/dist/components/invoice-upload-list/cells.d.ts +36 -0
  107. package/dist/components/invoice-upload-list/cells.d.ts.map +1 -0
  108. package/dist/components/invoice-upload-list/columns.d.ts +14 -0
  109. package/dist/components/invoice-upload-list/columns.d.ts.map +1 -0
  110. package/dist/components/invoice-upload-list/handle.d.ts +18 -0
  111. package/dist/components/invoice-upload-list/handle.d.ts.map +1 -0
  112. package/dist/components/invoice-upload-list/index.d.ts +5 -0
  113. package/dist/components/invoice-upload-list/index.d.ts.map +1 -0
  114. package/dist/components/invoice-upload-list/index.js +10 -0
  115. package/dist/components/invoice-upload-list/index.js.map +1 -0
  116. package/dist/components/invoice-upload-list/invoice-upload-list.agent.d.ts +4 -0
  117. package/dist/components/invoice-upload-list/invoice-upload-list.agent.d.ts.map +1 -0
  118. package/dist/components/invoice-upload-list/invoice-upload-list.d.ts +10 -0
  119. package/dist/components/invoice-upload-list/invoice-upload-list.d.ts.map +1 -0
  120. package/dist/components/invoice-upload-list/invoice-upload-list.variants.d.ts +28 -0
  121. package/dist/components/invoice-upload-list/invoice-upload-list.variants.d.ts.map +1 -0
  122. package/dist/components/invoice-upload-list/model.d.ts +40 -0
  123. package/dist/components/invoice-upload-list/model.d.ts.map +1 -0
  124. package/dist/components/invoice-upload-list/types.d.ts +154 -0
  125. package/dist/components/invoice-upload-list/types.d.ts.map +1 -0
  126. package/dist/components/map-view/index.js +1 -1
  127. package/dist/components/map-view/map-view-cluster.d.ts +42 -0
  128. package/dist/components/map-view/map-view-cluster.d.ts.map +1 -0
  129. package/dist/components/map-view/map-view.d.ts +39 -0
  130. package/dist/components/map-view/map-view.d.ts.map +1 -1
  131. package/dist/components/notes-panel/index.js +1 -1
  132. package/dist/components/practice-results/index.js +1 -1
  133. package/dist/components/practice-results/practice-results.d.ts.map +1 -1
  134. package/dist/components/public-footer/index.js +1 -1
  135. package/dist/components/public-footer/public-footer.d.ts +24 -0
  136. package/dist/components/public-footer/public-footer.d.ts.map +1 -1
  137. package/dist/components/public-header/public-header.d.ts +1 -1
  138. package/dist/components/radiograph-panel/index.js +1 -1
  139. package/dist/components/rich-text-editor/index.js +1 -1
  140. package/dist/components/task-editor/index.js +1 -1
  141. package/dist/components/warehouse-load-summary/index.d.ts +4 -0
  142. package/dist/components/warehouse-load-summary/index.d.ts.map +1 -0
  143. package/dist/components/warehouse-load-summary/index.js +6 -0
  144. package/dist/components/warehouse-load-summary/index.js.map +1 -0
  145. package/dist/components/warehouse-load-summary/model.d.ts +8 -0
  146. package/dist/components/warehouse-load-summary/model.d.ts.map +1 -0
  147. package/dist/components/warehouse-load-summary/types.d.ts +50 -0
  148. package/dist/components/warehouse-load-summary/types.d.ts.map +1 -0
  149. package/dist/components/warehouse-load-summary/warehouse-load-summary.agent.d.ts +4 -0
  150. package/dist/components/warehouse-load-summary/warehouse-load-summary.agent.d.ts.map +1 -0
  151. package/dist/components/warehouse-load-summary/warehouse-load-summary.d.ts +7 -0
  152. package/dist/components/warehouse-load-summary/warehouse-load-summary.d.ts.map +1 -0
  153. package/dist/core.css +1 -1
  154. package/dist/i18n/locales/ar.d.ts +210 -0
  155. package/dist/i18n/locales/ar.d.ts.map +1 -1
  156. package/dist/i18n/locales/ar.js +204 -4
  157. package/dist/i18n/locales/ar.js.map +1 -1
  158. package/dist/i18n/locales/de.d.ts +210 -0
  159. package/dist/i18n/locales/de.d.ts.map +1 -1
  160. package/dist/i18n/locales/de.js +208 -4
  161. package/dist/i18n/locales/de.js.map +1 -1
  162. package/dist/i18n/locales/el.d.ts +210 -0
  163. package/dist/i18n/locales/el.d.ts.map +1 -1
  164. package/dist/i18n/locales/el.js +208 -4
  165. package/dist/i18n/locales/el.js.map +1 -1
  166. package/dist/i18n/locales/en.d.ts +210 -0
  167. package/dist/i18n/locales/en.d.ts.map +1 -1
  168. package/dist/i18n/locales/en.js +210 -0
  169. package/dist/i18n/locales/en.js.map +1 -1
  170. package/dist/i18n/locales/es.d.ts +210 -0
  171. package/dist/i18n/locales/es.d.ts.map +1 -1
  172. package/dist/i18n/locales/es.js +206 -4
  173. package/dist/i18n/locales/es.js.map +1 -1
  174. package/dist/i18n/locales/fr.d.ts +210 -0
  175. package/dist/i18n/locales/fr.d.ts.map +1 -1
  176. package/dist/i18n/locales/fr.js +206 -4
  177. package/dist/i18n/locales/fr.js.map +1 -1
  178. package/dist/i18n/locales/hi.d.ts +210 -0
  179. package/dist/i18n/locales/hi.d.ts.map +1 -1
  180. package/dist/i18n/locales/hi.js +204 -4
  181. package/dist/i18n/locales/hi.js.map +1 -1
  182. package/dist/i18n/locales/it.d.ts +210 -0
  183. package/dist/i18n/locales/it.d.ts.map +1 -1
  184. package/dist/i18n/locales/it.js +204 -4
  185. package/dist/i18n/locales/it.js.map +1 -1
  186. package/dist/i18n/locales/ja.d.ts +210 -0
  187. package/dist/i18n/locales/ja.d.ts.map +1 -1
  188. package/dist/i18n/locales/ja.js +204 -4
  189. package/dist/i18n/locales/ja.js.map +1 -1
  190. package/dist/i18n/locales/nl.d.ts +210 -0
  191. package/dist/i18n/locales/nl.d.ts.map +1 -1
  192. package/dist/i18n/locales/nl.js +204 -4
  193. package/dist/i18n/locales/nl.js.map +1 -1
  194. package/dist/i18n/locales/pl.d.ts +210 -0
  195. package/dist/i18n/locales/pl.d.ts.map +1 -1
  196. package/dist/i18n/locales/pl.js +204 -4
  197. package/dist/i18n/locales/pl.js.map +1 -1
  198. package/dist/i18n/locales/pt.d.ts +210 -0
  199. package/dist/i18n/locales/pt.d.ts.map +1 -1
  200. package/dist/i18n/locales/pt.js +206 -4
  201. package/dist/i18n/locales/pt.js.map +1 -1
  202. package/dist/i18n/locales/ro.d.ts +210 -0
  203. package/dist/i18n/locales/ro.d.ts.map +1 -1
  204. package/dist/i18n/locales/ro.js +204 -4
  205. package/dist/i18n/locales/ro.js.map +1 -1
  206. package/dist/i18n/locales/ru.d.ts +210 -0
  207. package/dist/i18n/locales/ru.d.ts.map +1 -1
  208. package/dist/i18n/locales/ru.js +204 -4
  209. package/dist/i18n/locales/ru.js.map +1 -1
  210. package/dist/i18n/locales/sq.d.ts +210 -0
  211. package/dist/i18n/locales/sq.d.ts.map +1 -1
  212. package/dist/i18n/locales/sq.js +206 -4
  213. package/dist/i18n/locales/sq.js.map +1 -1
  214. package/dist/i18n/locales/sv.d.ts +210 -0
  215. package/dist/i18n/locales/sv.d.ts.map +1 -1
  216. package/dist/i18n/locales/sv.js +204 -4
  217. package/dist/i18n/locales/sv.js.map +1 -1
  218. package/dist/i18n/locales/tr.d.ts +210 -0
  219. package/dist/i18n/locales/tr.d.ts.map +1 -1
  220. package/dist/i18n/locales/tr.js +204 -4
  221. package/dist/i18n/locales/tr.js.map +1 -1
  222. package/dist/i18n/locales/zh.d.ts +210 -0
  223. package/dist/i18n/locales/zh.d.ts.map +1 -1
  224. package/dist/i18n/locales/zh.js +204 -4
  225. package/dist/i18n/locales/zh.js.map +1 -1
  226. package/dist/index.js +1190 -1174
  227. package/dist/index.js.map +1 -1
  228. package/dist/locales/ar.json +214 -4
  229. package/dist/locales/de.json +214 -4
  230. package/dist/locales/el.json +214 -4
  231. package/dist/locales/en.json +210 -0
  232. package/dist/locales/es.json +214 -4
  233. package/dist/locales/fr.json +214 -4
  234. package/dist/locales/hi.json +214 -4
  235. package/dist/locales/it.json +214 -4
  236. package/dist/locales/ja.json +214 -4
  237. package/dist/locales/nl.json +214 -4
  238. package/dist/locales/pl.json +214 -4
  239. package/dist/locales/pt.json +214 -4
  240. package/dist/locales/ro.json +214 -4
  241. package/dist/locales/ru.json +214 -4
  242. package/dist/locales/sq.json +214 -4
  243. package/dist/locales/sv.json +214 -4
  244. package/dist/locales/tr.json +214 -4
  245. package/dist/locales/zh.json +214 -4
  246. package/dist/patterns/calendar/index.js +1 -1
  247. package/dist/patterns/signed-out-frame/index.js +1 -1
  248. package/dist/tokens.css +1 -1
  249. package/package.json +13 -1
  250. package/dist/_chunks/bill-line-table-vCnVo7_a.js +0 -1565
  251. package/dist/_chunks/bill-line-table-vCnVo7_a.js.map +0 -1
  252. package/dist/_chunks/default-tabs-CD285u0C.js.map +0 -1
  253. package/dist/_chunks/file-upload-CxjCs7TX.js.map +0 -1
  254. package/dist/_chunks/map-view-Frj8vE7n.js +0 -1105
  255. package/dist/_chunks/map-view-Frj8vE7n.js.map +0 -1
  256. package/dist/_chunks/practice-results-CzHWprX4.js.map +0 -1
  257. package/dist/_chunks/public-footer-CB7ruuLI.js.map +0 -1
@@ -1,27 +1,27 @@
1
- import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as ye, useId as xe, useState as te, useRef as K, useCallback as y, useMemo as $, useEffect as we } from "react";
3
- import { u as Ue } from "./index-BcMWc8W2.js";
4
- import { c as H } from "./index-D2ZczOXr.js";
5
- import { useTranslation as Ne } from "react-i18next";
6
- import { u as ke, a as ze } from "./form-field-context-DtiROUJV.js";
7
- import { u as je } from "./registry-DvAUVLHh.js";
8
- import { C as ne } from "./circle-alert-rGDZ73Wh.js";
9
- import { U as M } from "./upload-BfT2hzMg.js";
10
- import { X as re } from "./x-B5YnXwCz.js";
11
- import { F as Fe } from "./file-text-5yv6r2ls.js";
12
- import { c as Ce } from "./createLucideIcon-DhHxpK9K.js";
13
- import { F as Le } from "./file-spreadsheet-DmwyfV4O.js";
14
- import { F as Re } from "./file-image-cDgE-BTy.js";
15
- import { F as Ie } from "./file-BuG1VMAy.js";
16
- import { C as Ae } from "./circle-check-BN6rz4NV.js";
17
- import { L as De } from "./loader-circle-BECIU_8N.js";
1
+ import { jsxs as m, jsx as o } from "react/jsx-runtime";
2
+ import { forwardRef as De, useId as Me, useState as ue, useRef as G, useCallback as w, useMemo as H, useEffect as Be } from "react";
3
+ import { u as Ee } from "./index-BcMWc8W2.js";
4
+ import { c as q } from "./index-D2ZczOXr.js";
5
+ import { useTranslation as He } from "react-i18next";
6
+ import { u as Oe, a as qe } from "./form-field-context-DtiROUJV.js";
7
+ import { u as Ve } from "./registry-DvAUVLHh.js";
8
+ import { C as he } from "./circle-alert-rGDZ73Wh.js";
9
+ import { U as O } from "./upload-BfT2hzMg.js";
10
+ import { X as pe } from "./x-B5YnXwCz.js";
11
+ import { F as Ke } from "./file-text-5yv6r2ls.js";
12
+ import { c as Te } from "./createLucideIcon-DhHxpK9K.js";
13
+ import { F as $e } from "./file-spreadsheet-DmwyfV4O.js";
14
+ import { F as Pe } from "./file-image-cDgE-BTy.js";
15
+ import { F as _e } from "./file-BuG1VMAy.js";
16
+ import { C as We } from "./circle-check-BN6rz4NV.js";
17
+ import { L as Ge } from "./loader-circle-BECIU_8N.js";
18
18
  /**
19
19
  * @license lucide-react v1.22.0 - ISC
20
20
  *
21
21
  * This source code is licensed under the ISC license.
22
22
  * See the LICENSE file in the root directory of this source tree.
23
23
  */
24
- const Me = [
24
+ const Xe = [
25
25
  [
26
26
  "path",
27
27
  {
@@ -34,7 +34,7 @@ const Me = [
34
34
  ["path", { d: "M8 18v-2", key: "qcmpov" }],
35
35
  ["path", { d: "M8 7V6", key: "1nbb54" }],
36
36
  ["circle", { cx: "8", cy: "20", r: "2", key: "ckkr5m" }]
37
- ], Be = Ce("file-archive", Me), He = {
37
+ ], Ye = Te("file-archive", Xe), Je = {
38
38
  id: "file-upload",
39
39
  capabilities: ["dismiss"],
40
40
  state: {
@@ -65,8 +65,8 @@ const Me = [
65
65
  examples: [
66
66
  { args: { id: "file-1" }, note: "Remove the first tracked file." }
67
67
  ],
68
- invoke: (a, o) => {
69
- a.removeFile(o.id);
68
+ invoke: (a, t) => {
69
+ a.removeFile(t.id);
70
70
  }
71
71
  },
72
72
  clear: {
@@ -91,7 +91,7 @@ const Me = [
91
91
  description: "Each tracked file emits its id as data-file-id."
92
92
  }
93
93
  }
94
- }, Ee = H(
94
+ }, Qe = q(
95
95
  [
96
96
  "ds:relative ds:flex ds:flex-col ds:items-center ds:justify-center",
97
97
  "ds:min-h-48 ds:px-[var(--spacing-lg)] ds:py-[var(--spacing-xl)]",
@@ -124,7 +124,7 @@ const Me = [
124
124
  isDisabled: !1
125
125
  }
126
126
  }
127
- ), ie = H(
127
+ ), fe = q(
128
128
  [
129
129
  "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
130
130
  // Full-width on phone so the affordance stacks cleanly; natural width
@@ -140,7 +140,7 @@ const Me = [
140
140
  "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
141
141
  "ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
142
142
  ].join(" ")
143
- ), Oe = H(
143
+ ), Ze = q(
144
144
  [
145
145
  "ds:flex ds:items-center ds:gap-[var(--spacing-md)]",
146
146
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)] ds:bg-background",
@@ -161,7 +161,7 @@ const Me = [
161
161
  status: "pending"
162
162
  }
163
163
  }
164
- ), oe = H(
164
+ ), me = q(
165
165
  [
166
166
  "ds:inline-flex ds:items-center ds:justify-center",
167
167
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
@@ -173,68 +173,68 @@ const Me = [
173
173
  "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
174
174
  ].join(" ")
175
175
  );
176
- function Te() {
176
+ function Se() {
177
177
  return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;
178
178
  }
179
- function Ve(a) {
179
+ function es(a) {
180
180
  return a.type.startsWith("image/");
181
181
  }
182
- function qe(a) {
183
- var c;
184
- const o = ((c = a.name.split(".").pop()) == null ? void 0 : c.toLowerCase()) ?? "";
185
- return ["pdf", "doc", "docx", "txt", "rtf"].includes(o) ? /* @__PURE__ */ r(
186
- Fe,
182
+ function ss(a) {
183
+ var p;
184
+ const t = ((p = a.name.split(".").pop()) == null ? void 0 : p.toLowerCase()) ?? "";
185
+ return ["pdf", "doc", "docx", "txt", "rtf"].includes(t) ? /* @__PURE__ */ o(
186
+ Ke,
187
187
  {
188
188
  "aria-hidden": "true",
189
189
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
190
190
  }
191
- ) : ["zip", "rar", "7z", "tar", "gz"].includes(o) ? /* @__PURE__ */ r(
192
- Be,
191
+ ) : ["zip", "rar", "7z", "tar", "gz"].includes(t) ? /* @__PURE__ */ o(
192
+ Ye,
193
193
  {
194
194
  "aria-hidden": "true",
195
195
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
196
196
  }
197
- ) : ["xls", "xlsx", "csv"].includes(o) ? /* @__PURE__ */ r(
198
- Le,
197
+ ) : ["xls", "xlsx", "csv"].includes(t) ? /* @__PURE__ */ o(
198
+ $e,
199
199
  {
200
200
  "aria-hidden": "true",
201
201
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
202
202
  }
203
- ) : ["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"].includes(o) ? /* @__PURE__ */ r(
204
- Re,
203
+ ) : ["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"].includes(t) ? /* @__PURE__ */ o(
204
+ Pe,
205
205
  {
206
206
  "aria-hidden": "true",
207
207
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
208
208
  }
209
- ) : /* @__PURE__ */ r(
210
- Ie,
209
+ ) : /* @__PURE__ */ o(
210
+ _e,
211
211
  {
212
212
  "aria-hidden": "true",
213
213
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
214
214
  }
215
215
  );
216
216
  }
217
- function Ke(a) {
217
+ function ts(a) {
218
218
  switch (a) {
219
219
  case "uploading":
220
- return /* @__PURE__ */ r(
221
- De,
220
+ return /* @__PURE__ */ o(
221
+ Ge,
222
222
  {
223
223
  "aria-hidden": "true",
224
224
  className: "ds:size-4 ds:shrink-0 ds:text-primary ds:animate-spin"
225
225
  }
226
226
  );
227
227
  case "complete":
228
- return /* @__PURE__ */ r(
229
- Ae,
228
+ return /* @__PURE__ */ o(
229
+ We,
230
230
  {
231
231
  "aria-hidden": "true",
232
232
  className: "ds:size-4 ds:shrink-0 ds:text-[var(--success)]"
233
233
  }
234
234
  );
235
235
  case "error":
236
- return /* @__PURE__ */ r(
237
- ne,
236
+ return /* @__PURE__ */ o(
237
+ he,
238
238
  {
239
239
  "aria-hidden": "true",
240
240
  className: "ds:size-4 ds:shrink-0 ds:text-destructive"
@@ -244,22 +244,22 @@ function Ke(a) {
244
244
  return null;
245
245
  }
246
246
  }
247
- const $e = [
247
+ const rs = [
248
248
  "inputs.fileUpload.units.bytes",
249
249
  "inputs.fileUpload.units.kilobytes",
250
250
  "inputs.fileUpload.units.megabytes",
251
251
  "inputs.fileUpload.units.gigabytes"
252
- ], ae = ["B", "KB", "MB", "GB"];
253
- function B(a, o, c) {
254
- let l = a, u = 0;
255
- for (; l >= 1024 && u < ae.length - 1; )
256
- l /= 1024, u++;
257
- const g = new Intl.NumberFormat(o, {
252
+ ], ge = ["B", "KB", "MB", "GB"];
253
+ function F(a, t, p) {
254
+ let c = a, u = 0;
255
+ for (; c >= 1024 && u < ge.length - 1; )
256
+ c /= 1024, u++;
257
+ const f = new Intl.NumberFormat(t, {
258
258
  maximumFractionDigits: u === 0 ? 0 : 1
259
- }).format(l), N = c($e[u], ae[u]);
260
- return `${g} ${N}`;
259
+ }).format(c), y = p(rs[u], ge[u]);
260
+ return `${f} ${y}`;
261
261
  }
262
- function Pe(a) {
262
+ function is(a) {
263
263
  switch (a) {
264
264
  case "file-too-large":
265
265
  return "file-too-large";
@@ -269,175 +269,202 @@ function Pe(a) {
269
269
  return "file-invalid-type";
270
270
  case "too-many-files":
271
271
  return "too-many-files";
272
+ case "total-too-large":
273
+ return "total-too-large";
272
274
  default:
273
275
  return "file-invalid-type";
274
276
  }
275
277
  }
276
- function _e(a) {
277
- const o = a.split(".");
278
- return o.length > 1 ? `.${o.pop().toLowerCase()}` : "";
278
+ function os(a) {
279
+ const t = a.split(".");
280
+ return t.length > 1 ? `.${t.pop().toLowerCase()}` : "";
279
281
  }
280
- function de(a, o) {
281
- const c = _e(a.name);
282
- for (const [l, u] of Object.entries(o)) {
283
- const g = l === "*/*" || l.endsWith("/*") && a.type.startsWith(l.replace("/*", "/")) || a.type === l, N = u.length === 0 || u.some((F) => F.toLowerCase() === c);
284
- if (g && N) return !0;
282
+ function ve(a, t) {
283
+ const p = os(a.name);
284
+ for (const [c, u] of Object.entries(t)) {
285
+ const f = c === "*/*" || c.endsWith("/*") && a.type.startsWith(c.replace("/*", "/")) || a.type === c, y = u.length === 0 || u.some((V) => V.toLowerCase() === p);
286
+ if (f && y) return !0;
285
287
  }
286
288
  return !1;
287
289
  }
288
- function We(a) {
289
- const o = [];
290
- for (const l of Object.values(a))
291
- for (const u of l)
292
- o.push(u.toUpperCase().replace(".", ""));
293
- if (o.length > 0) return o.join(", ");
294
- const c = [];
295
- for (const l of Object.keys(a))
296
- l.endsWith("/*") ? c.push(l.replace("/*", "").split("/").pop() ?? l) : c.push(l.split("/").pop() ?? l);
297
- return c.join(", ");
290
+ function ns(a) {
291
+ if (!a) return [];
292
+ const t = Object.values(a).flat().map((p) => p.toLowerCase());
293
+ return Array.from(new Set(t));
298
294
  }
299
- const Ge = ye(
295
+ function as(a) {
296
+ const t = [];
297
+ for (const c of Object.values(a))
298
+ for (const u of c)
299
+ t.push(u.toUpperCase().replace(".", ""));
300
+ if (t.length > 0) return t.join(", ");
301
+ const p = [];
302
+ for (const c of Object.keys(a))
303
+ c.endsWith("/*") ? p.push(c.replace("/*", "").split("/").pop() ?? c) : p.push(c.split("/").pop() ?? c);
304
+ return p.join(", ");
305
+ }
306
+ const ds = De(
300
307
  ({
301
308
  id: a,
302
- accept: o,
303
- maxSize: c,
304
- minSize: l,
309
+ accept: t,
310
+ maxSize: p,
311
+ minSize: c,
305
312
  maxFiles: u = 1,
306
- multiple: g = !1,
307
- disabled: N,
308
- strictAccept: F = !1,
309
- onDrop: C,
310
- onUpload: E,
311
- onRemove: L,
312
- onReject: R,
313
- variant: v = "both",
314
- showPreview: le = !0,
315
- className: P
316
- }, k) => {
317
- const { t: i, i18n: w } = Ne("ui"), h = ke(), ce = xe(), x = h.disabled || N, ue = h.invalid, _ = ze(h) || ce, [I, b] = te([]), [W, pe] = te([]), A = K(/* @__PURE__ */ new Map()), O = K(null), z = K(I);
318
- z.current = I;
319
- const U = y((e) => {
320
- O.current && (O.current.textContent = e);
321
- }, []), G = y(
322
- (e) => !F || !o ? !0 : de(e, o),
323
- [F, o]
324
- ), X = y(
313
+ maxTotalSize: f,
314
+ showFileList: y = !0,
315
+ describedBy: V,
316
+ listedFiles: K,
317
+ multiple: v = !1,
318
+ disabled: be,
319
+ strictAccept: X = !1,
320
+ onDrop: R,
321
+ onUpload: T,
322
+ onRemove: A,
323
+ onReject: D,
324
+ variant: h = "both",
325
+ showPreview: ye = !0,
326
+ className: Y
327
+ }, I) => {
328
+ const { t: i, i18n: x } = He("ui"), N = Oe(), xe = Me(), j = N.disabled || be, Ue = N.invalid, J = qe(N) || xe, [M, U] = ue([]), [Q, we] = ue([]), B = G(/* @__PURE__ */ new Map()), $ = G(null), z = G(M);
329
+ z.current = M;
330
+ const C = w((e) => {
331
+ $.current && ($.current.textContent = e);
332
+ }, []), Z = w(
333
+ (e) => !X || !t ? !0 : ve(e, t),
334
+ [X, t]
335
+ ), S = w(
325
336
  async (e) => {
326
- if (!E) return;
337
+ if (!T) return;
327
338
  const s = new AbortController();
328
- A.current.set(e.id, s), b(
329
- (d) => d.map(
330
- (t) => t.id === e.id ? { ...t, status: "uploading", progress: 0 } : t
339
+ B.current.set(e.id, s), U(
340
+ (n) => n.map(
341
+ (r) => r.id === e.id ? { ...r, status: "uploading", progress: 0 } : r
331
342
  )
332
- ), U(i("inputs.fileUpload.uploading", "Uploading…"));
343
+ ), C(i("inputs.fileUpload.uploading", "Uploading…"));
333
344
  try {
334
- await E(e.file, {
345
+ await T(e.file, {
335
346
  signal: s.signal,
336
- onProgress: (d) => {
337
- b(
338
- (t) => t.map(
339
- (n) => n.id === e.id ? { ...n, progress: d } : n
347
+ onProgress: (n) => {
348
+ U(
349
+ (r) => r.map(
350
+ (d) => d.id === e.id ? { ...d, progress: n } : d
340
351
  )
341
- ), U(
352
+ ), C(
342
353
  i("inputs.fileUpload.progress", "{{percent}}% uploaded", {
343
- percent: d
354
+ percent: n
344
355
  })
345
356
  );
346
357
  }
347
- }), b(
348
- (d) => d.map(
349
- (t) => t.id === e.id ? { ...t, status: "complete", progress: 100 } : t
358
+ }), U(
359
+ (n) => n.map(
360
+ (r) => r.id === e.id ? { ...r, status: "complete", progress: 100 } : r
350
361
  )
351
- ), U(i("inputs.fileUpload.complete", "Upload complete"));
352
- } catch (d) {
362
+ ), C(i("inputs.fileUpload.complete", "Upload complete"));
363
+ } catch (n) {
353
364
  if (s.signal.aborted) {
354
- b((n) => n.filter((f) => f.id !== e.id));
365
+ U((d) => d.filter((g) => g.id !== e.id));
355
366
  return;
356
367
  }
357
- const t = d instanceof Error ? d.message : i("inputs.fileUpload.errors.uploadFailed", "Upload failed");
358
- b(
359
- (n) => n.map(
360
- (f) => f.id === e.id ? { ...f, status: "error", error: t } : f
368
+ const r = n instanceof Error ? n.message : i("inputs.fileUpload.errors.uploadFailed", "Upload failed");
369
+ U(
370
+ (d) => d.map(
371
+ (g) => g.id === e.id ? { ...g, status: "error", error: r } : g
361
372
  )
362
373
  );
363
374
  } finally {
364
- A.current.delete(e.id);
375
+ B.current.delete(e.id);
365
376
  }
366
377
  },
367
- [E, U, i]
368
- ), T = y(
378
+ [T, C, i]
379
+ ), ee = [N.describedBy, V].filter(Boolean).join(" ") || void 0, Ne = H(() => {
380
+ if (!t || !("*/*" in t)) return t;
381
+ const { "*/*": e, ...s } = t;
382
+ return e.length > 0 ? { ...s, "application/octet-stream": e } : s;
383
+ }, [t]), P = w(
369
384
  (e, s) => {
370
- const d = s.flatMap(
371
- (p) => p.errors.map((D) => ({
372
- file: p.file,
373
- reason: Pe(D.code)
385
+ const n = s.flatMap(
386
+ (l) => l.errors.map((b) => ({
387
+ file: l.file,
388
+ reason: is(b.code)
374
389
  }))
375
- ), t = [], n = [];
376
- for (const p of e)
377
- G(p) ? n.push(p) : t.push({ file: p, reason: "file-invalid-type" });
378
- const f = [...d, ...t];
379
- pe(f), f.length > 0 && (R == null || R(f));
380
- const q = n.map((p) => ({
381
- file: p,
382
- id: Te(),
390
+ ), r = [], d = [];
391
+ for (const l of e)
392
+ Z(l) ? d.push(l) : r.push({ file: l, reason: "file-invalid-type" });
393
+ const g = !v && u === 1, de = K ?? z.current.filter((l) => l.status !== "error").map((l) => ({ size: l.file.size })), Le = g ? 0 : de.length, Re = g ? 0 : de.reduce((l, b) => l + b.size, 0);
394
+ let k = d;
395
+ const le = [], ce = K !== void 0 && v && Le + k.length > u, Ae = f !== void 0 && Re + k.reduce((l, b) => l + b.size, 0) > f;
396
+ if (k.length > 0 && (ce || Ae)) {
397
+ const l = ce ? "too-many-files" : "total-too-large";
398
+ for (const b of k) le.push({ file: b, reason: l });
399
+ k = [];
400
+ }
401
+ const E = [...n, ...r, ...le];
402
+ we(E), E.length > 0 && (D == null || D(E));
403
+ const W = k.map((l) => ({
404
+ file: l,
405
+ id: Se(),
383
406
  status: "pending",
384
407
  progress: 0,
385
- preview: Ve(p) ? URL.createObjectURL(p) : void 0
408
+ preview: y && es(l) ? URL.createObjectURL(l) : void 0
386
409
  }));
387
- b((p) => {
388
- if (!g && u === 1) {
389
- for (const D of p)
390
- D.preview && URL.revokeObjectURL(D.preview);
391
- return q;
410
+ if (U((l) => {
411
+ if (!y) return l;
412
+ if (!v && u === 1) {
413
+ for (const b of l)
414
+ b.preview && URL.revokeObjectURL(b.preview);
415
+ return W;
392
416
  }
393
- return [...p, ...q];
394
- }), C == null || C(n, f), U(
417
+ return [...l, ...W];
418
+ }), R == null || R(k, E), C(
395
419
  i("inputs.fileUpload.filesSelected", "{{count}} file(s) selected", {
396
- count: n.length
420
+ count: k.length
397
421
  })
398
- );
399
- for (const p of q)
400
- X(p);
422
+ ), y)
423
+ for (const l of W)
424
+ S(l);
401
425
  },
402
426
  [
403
- g,
427
+ v,
404
428
  u,
405
- C,
429
+ f,
430
+ y,
431
+ K,
406
432
  R,
407
- G,
408
- U,
409
- X,
433
+ D,
434
+ Z,
435
+ C,
436
+ S,
410
437
  i
411
438
  ]
412
- ), { getRootProps: fe, getInputProps: Y, isDragActive: j, open: J } = Ue({
413
- accept: o,
414
- maxSize: c,
415
- minSize: l,
416
- maxFiles: g ? u : 1,
417
- multiple: g,
418
- disabled: x,
419
- onDrop: T,
420
- noClick: v === "button",
421
- noKeyboard: v === "button"
422
- }), me = y((e) => {
423
- const s = A.current.get(e);
424
- s == null || s.abort(), b((d) => {
425
- const t = d.find((n) => n.id === e);
426
- return t != null && t.preview && URL.revokeObjectURL(t.preview), d.filter((n) => n.id !== e);
439
+ ), { getRootProps: ke, getInputProps: se, isDragActive: L, open: te } = Ee({
440
+ accept: Ne,
441
+ maxSize: p,
442
+ minSize: c,
443
+ maxFiles: v ? u : 1,
444
+ multiple: v,
445
+ disabled: j,
446
+ onDrop: P,
447
+ noClick: h === "button",
448
+ noKeyboard: h === "button"
449
+ }), je = w((e) => {
450
+ const s = B.current.get(e);
451
+ s == null || s.abort(), U((n) => {
452
+ const r = n.find((d) => d.id === e);
453
+ return r != null && r.preview && URL.revokeObjectURL(r.preview), n.filter((d) => d.id !== e);
427
454
  });
428
- }, []), V = y(
455
+ }, []), _ = w(
429
456
  (e) => {
430
- const s = z.current.find((d) => d.id === e);
431
- s != null && s.preview && URL.revokeObjectURL(s.preview), b((d) => d.filter((t) => t.id !== e)), s && (L == null || L(s));
457
+ const s = z.current.find((n) => n.id === e);
458
+ s != null && s.preview && URL.revokeObjectURL(s.preview), U((n) => n.filter((r) => r.id !== e)), s && (A == null || A(s));
432
459
  },
433
- [L]
434
- ), Q = y(() => {
460
+ [A]
461
+ ), re = w(() => {
435
462
  for (const e of z.current) {
436
- const s = A.current.get(e.id);
463
+ const s = B.current.get(e.id);
437
464
  s == null || s.abort(), e.preview && URL.revokeObjectURL(e.preview);
438
465
  }
439
- b([]);
440
- }, []), ge = $(
466
+ U([]);
467
+ }, []), ze = H(
441
468
  () => ({
442
469
  getFiles: () => z.current.map((e) => ({
443
470
  id: e.id,
@@ -445,106 +472,152 @@ const Ge = ye(
445
472
  size: e.file.size,
446
473
  status: e.status
447
474
  })),
448
- removeFile: (e) => V(e),
449
- clear: () => Q()
475
+ removeFile: (e) => _(e),
476
+ clear: () => re()
450
477
  }),
451
- [V, Q]
478
+ [_, re]
452
479
  );
453
- je(He, ge, a);
454
- const Z = y(
480
+ Ve(Je, ze, a);
481
+ const ie = w(
455
482
  (e) => {
456
- const s = [], d = [], t = g ? u : 1;
457
- for (const n of e) {
458
- if (s.length >= t) {
459
- d.push({ file: n, reason: "too-many-files" });
483
+ const s = [], n = [], r = v ? u : 1;
484
+ if (e.length > r)
485
+ return {
486
+ accepted: s,
487
+ rejected: e.map((d) => ({
488
+ file: d,
489
+ reason: "too-many-files"
490
+ }))
491
+ };
492
+ for (const d of e) {
493
+ if (p !== void 0 && d.size > p) {
494
+ n.push({ file: d, reason: "file-too-large" });
460
495
  continue;
461
496
  }
462
- if (c !== void 0 && n.size > c) {
463
- d.push({ file: n, reason: "file-too-large" });
497
+ if (c !== void 0 && d.size < c) {
498
+ n.push({ file: d, reason: "file-too-small" });
464
499
  continue;
465
500
  }
466
- if (l !== void 0 && n.size < l) {
467
- d.push({ file: n, reason: "file-too-small" });
501
+ if (t && !ve(d, t)) {
502
+ n.push({ file: d, reason: "file-invalid-type" });
468
503
  continue;
469
504
  }
470
- if (o && !de(n, o)) {
471
- d.push({ file: n, reason: "file-invalid-type" });
472
- continue;
473
- }
474
- s.push(n);
505
+ s.push(d);
475
506
  }
476
- return { accepted: s, rejected: d };
507
+ return { accepted: s, rejected: n };
477
508
  },
478
- [o, c, l, u, g]
479
- ), S = y(
509
+ [t, p, c, u, v]
510
+ ), oe = w(
480
511
  (e) => {
481
- if (x) return;
512
+ if (j) return;
482
513
  const s = Array.from(e.clipboardData.files);
483
514
  if (s.length > 0) {
484
515
  e.preventDefault();
485
- const { accepted: d, rejected: t } = Z(s), n = t.map((f) => ({
486
- file: f.file,
487
- errors: [{ code: f.reason, message: f.reason }]
516
+ const { accepted: n, rejected: r } = ie(s), d = r.map((g) => ({
517
+ file: g.file,
518
+ errors: [{ code: g.reason, message: g.reason }]
488
519
  }));
489
- T(d, n);
520
+ P(n, d);
490
521
  }
491
522
  },
492
- [x, T, Z]
523
+ [j, P, ie]
493
524
  );
494
- we(() => () => {
525
+ Be(() => () => {
495
526
  for (const e of z.current)
496
527
  e.preview && URL.revokeObjectURL(e.preview);
497
528
  }, []);
498
- const ee = $(() => {
529
+ const ne = H(() => {
499
530
  const e = [];
500
- return o && e.push(We(o)), c && e.push(
531
+ return t && e.push(as(t)), p && e.push(
501
532
  i("inputs.fileUpload.maxSizeHint", "Max {{size}}", {
502
- size: B(c, w.language, i)
533
+ size: F(p, x.language, i)
503
534
  })
504
- ), g && u > 1 && e.push(
535
+ ), v && u > 1 && Number.isFinite(u) && e.push(
505
536
  i("inputs.fileUpload.maxFilesHint", "Up to {{count}} files", {
506
537
  count: u
507
538
  })
539
+ ), f && e.push(
540
+ i("inputs.fileUpload.maxTotalSizeHint", "Up to {{size}} in total", {
541
+ size: F(f, x.language, i)
542
+ })
508
543
  ), e;
509
- }, [o, c, g, u, i, w.language]), se = $(() => W.map((e) => {
510
- switch (e.reason) {
511
- case "file-too-large":
512
- return i(
513
- "inputs.fileUpload.errors.fileTooLarge",
514
- "File exceeds {{maxSize}}",
515
- {
516
- maxSize: c ? B(c, w.language, i) : ""
517
- }
518
- );
519
- case "file-too-small":
520
- return i(
521
- "inputs.fileUpload.errors.fileTooSmall",
522
- "File is smaller than {{minSize}}",
523
- {
524
- minSize: l ? B(l, w.language, i) : ""
525
- }
526
- );
527
- case "file-invalid-type":
528
- return i(
529
- "inputs.fileUpload.errors.fileInvalidType",
530
- "File type not accepted"
531
- );
532
- case "too-many-files":
533
- return i(
534
- "inputs.fileUpload.errors.tooManyFiles",
535
- "Maximum {{maxFiles}} files allowed",
536
- {
537
- maxFiles: u
544
+ }, [t, p, f, v, u, i, x.language]), ae = H(() => {
545
+ const e = /* @__PURE__ */ new Set();
546
+ return Q.filter((n) => e.has(n.reason) ? !1 : (e.add(n.reason), !0)).map((n) => {
547
+ switch (n.reason) {
548
+ case "file-too-large":
549
+ return i(
550
+ "inputs.fileUpload.errors.fileTooLarge",
551
+ "File exceeds {{maxSize}}",
552
+ {
553
+ maxSize: p ? F(p, x.language, i) : ""
554
+ }
555
+ );
556
+ case "file-too-small":
557
+ return i(
558
+ "inputs.fileUpload.errors.fileTooSmall",
559
+ "File is smaller than {{minSize}}",
560
+ {
561
+ minSize: c ? F(c, x.language, i) : ""
562
+ }
563
+ );
564
+ case "file-invalid-type": {
565
+ const r = ns(t);
566
+ if (r.length > 0) {
567
+ let d;
568
+ try {
569
+ d = new Intl.ListFormat(x.language, {
570
+ style: "long",
571
+ type: "conjunction"
572
+ }).format(r);
573
+ } catch {
574
+ d = r.join(", ");
575
+ }
576
+ return i(
577
+ "inputs.fileUpload.errors.fileInvalidTypeNamed",
578
+ "Only {{types}} files can be uploaded",
579
+ { types: d }
580
+ );
538
581
  }
539
- );
540
- }
541
- }), [W, i, c, l, u, w.language]), ve = () => I.length === 0 ? null : /* @__PURE__ */ r("ul", { className: "ds:mt-[var(--spacing-md)] ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:list-none ds:p-0 ds:m-0", children: I.map((e) => /* @__PURE__ */ m(
582
+ return i(
583
+ "inputs.fileUpload.errors.fileInvalidType",
584
+ "File type not accepted"
585
+ );
586
+ }
587
+ case "too-many-files":
588
+ return i(
589
+ "inputs.fileUpload.errors.tooManyFiles",
590
+ "Maximum {{maxFiles}} files allowed",
591
+ {
592
+ maxFiles: u
593
+ }
594
+ );
595
+ case "total-too-large":
596
+ return i(
597
+ "inputs.fileUpload.errors.totalTooLarge",
598
+ "Files exceed {{maxTotalSize}} in total",
599
+ {
600
+ maxTotalSize: f ? F(f, x.language, i) : ""
601
+ }
602
+ );
603
+ }
604
+ });
605
+ }, [
606
+ Q,
607
+ i,
608
+ t,
609
+ p,
610
+ c,
611
+ u,
612
+ f,
613
+ x.language
614
+ ]), Ce = () => !y || M.length === 0 ? null : /* @__PURE__ */ o("ul", { className: "ds:mt-[var(--spacing-md)] ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:list-none ds:p-0 ds:m-0", children: M.map((e) => /* @__PURE__ */ m(
542
615
  "li",
543
616
  {
544
617
  "data-file-id": e.id,
545
- className: Oe({ status: e.status }),
618
+ className: Ze({ status: e.status }),
546
619
  children: [
547
- le && e.preview ? /* @__PURE__ */ r(
620
+ ye && e.preview ? /* @__PURE__ */ o(
548
621
  "img",
549
622
  {
550
623
  src: e.preview,
@@ -552,21 +625,21 @@ const Ge = ye(
552
625
  "aria-hidden": "true",
553
626
  className: "ds:size-12 ds:shrink-0 ds:rounded-[var(--radius-md)] ds:object-cover ds:border ds:border-border"
554
627
  }
555
- ) : qe(e.file),
628
+ ) : ss(e.file),
556
629
  /* @__PURE__ */ m("div", { className: "ds:flex-1 ds:min-w-0", children: [
557
630
  /* @__PURE__ */ m("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
558
- /* @__PURE__ */ r("p", { className: "ds:truncate type-label ds:m-0", children: e.file.name }),
559
- Ke(e.status)
631
+ /* @__PURE__ */ o("p", { className: "ds:truncate type-label ds:m-0", children: e.file.name }),
632
+ ts(e.status)
560
633
  ] }),
561
634
  /* @__PURE__ */ m("p", { className: "type-meta ds:text-muted-foreground ds:m-0 ds:mt-0.5", children: [
562
- B(e.file.size, w.language, i),
635
+ F(e.file.size, x.language, i),
563
636
  e.status === "uploading" && /* @__PURE__ */ m("span", { className: "ds:ms-[var(--spacing-sm)] ds:text-primary ds:font-medium", children: [
564
637
  e.progress,
565
638
  "%"
566
639
  ] }),
567
- e.status === "complete" && /* @__PURE__ */ r("span", { className: "ds:ms-[var(--spacing-sm)] ds:text-[var(--success)] ds:font-medium", children: i("inputs.fileUpload.complete", "Complete") })
640
+ e.status === "complete" && /* @__PURE__ */ o("span", { className: "ds:ms-[var(--spacing-sm)] ds:text-[var(--success)] ds:font-medium", children: i("inputs.fileUpload.complete", "Complete") })
568
641
  ] }),
569
- e.status === "uploading" && /* @__PURE__ */ r(
642
+ e.status === "uploading" && /* @__PURE__ */ o(
570
643
  "div",
571
644
  {
572
645
  role: "progressbar",
@@ -575,7 +648,7 @@ const Ge = ye(
575
648
  "aria-valuemin": 0,
576
649
  "aria-valuemax": 100,
577
650
  className: "ds:mt-[var(--spacing-sm)] ds:h-1.5 ds:w-full ds:rounded-[var(--radius-full)] ds:bg-muted ds:overflow-hidden",
578
- children: /* @__PURE__ */ r(
651
+ children: /* @__PURE__ */ o(
579
652
  "div",
580
653
  {
581
654
  className: "ds:h-full ds:rounded-[var(--radius-full)] ds:bg-primary ds:transition-[inline-size] ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
@@ -584,7 +657,7 @@ const Ge = ye(
584
657
  )
585
658
  }
586
659
  ),
587
- e.status === "error" && e.error && /* @__PURE__ */ r(
660
+ e.status === "error" && e.error && /* @__PURE__ */ o(
588
661
  "p",
589
662
  {
590
663
  role: "alert",
@@ -593,62 +666,62 @@ const Ge = ye(
593
666
  }
594
667
  )
595
668
  ] }),
596
- e.status === "uploading" && /* @__PURE__ */ r(
669
+ e.status === "uploading" && /* @__PURE__ */ o(
597
670
  "button",
598
671
  {
599
672
  type: "button",
600
- onClick: () => me(e.id),
673
+ onClick: () => je(e.id),
601
674
  "aria-label": i("inputs.fileUpload.cancel", "Cancel upload"),
602
- className: oe(),
603
- children: /* @__PURE__ */ r(re, { "aria-hidden": "true", className: "ds:size-4" })
675
+ className: me(),
676
+ children: /* @__PURE__ */ o(pe, { "aria-hidden": "true", className: "ds:size-4" })
604
677
  }
605
678
  ),
606
- (e.status === "complete" || e.status === "pending" || e.status === "error") && /* @__PURE__ */ r(
679
+ (e.status === "complete" || e.status === "pending" || e.status === "error") && /* @__PURE__ */ o(
607
680
  "button",
608
681
  {
609
682
  type: "button",
610
- onClick: () => V(e.id),
683
+ onClick: () => _(e.id),
611
684
  "aria-label": i("inputs.fileUpload.remove", "Remove file"),
612
- className: oe(),
613
- children: /* @__PURE__ */ r(re, { "aria-hidden": "true", className: "ds:size-4" })
685
+ className: me(),
686
+ children: /* @__PURE__ */ o(pe, { "aria-hidden": "true", className: "ds:size-4" })
614
687
  }
615
688
  )
616
689
  ]
617
690
  },
618
691
  e.id
619
- )) }), he = () => {
620
- if (v === "button") return null;
621
- const e = fe({
622
- className: Ee({
623
- isDragActive: j,
624
- hasError: ue ?? !1,
625
- isDisabled: x ?? !1,
626
- className: P
692
+ )) }), Fe = () => {
693
+ if (h === "button") return null;
694
+ const e = ke({
695
+ className: Qe({
696
+ isDragActive: L,
697
+ hasError: Ue ?? !1,
698
+ isDisabled: j ?? !1,
699
+ className: Y
627
700
  }),
628
- tabIndex: x ? -1 : 0
701
+ tabIndex: j ? -1 : 0
629
702
  }), s = e.ref;
630
703
  return /* @__PURE__ */ m(
631
704
  "div",
632
705
  {
633
706
  ...e,
634
- ref: (t) => {
635
- typeof s == "function" ? s(t) : s && (s.current = t), typeof k == "function" ? k(t) : k && (k.current = t);
707
+ ref: (r) => {
708
+ typeof s == "function" ? s(r) : s && (s.current = r), typeof I == "function" ? I(r) : I && (I.current = r);
636
709
  },
637
- onPaste: S,
638
- id: _,
710
+ onPaste: oe,
711
+ id: J,
639
712
  "aria-label": i(
640
713
  "inputs.fileUpload.dropHere",
641
714
  "Drop files here or click to browse"
642
715
  ),
643
- "aria-describedby": h.describedBy || void 0,
644
- "aria-invalid": h.invalid || void 0,
645
- "aria-required": h.required || void 0,
716
+ "aria-describedby": ee,
717
+ "aria-invalid": N.invalid || void 0,
718
+ "aria-required": N.required || void 0,
646
719
  "data-testid": "file-upload-dropzone",
647
720
  children: [
648
- /* @__PURE__ */ r(
721
+ /* @__PURE__ */ o(
649
722
  "input",
650
723
  {
651
- ...Y({
724
+ ...se({
652
725
  "aria-label": i(
653
726
  "inputs.fileUpload.dropHere",
654
727
  "Drop files here or click to browse"
@@ -657,27 +730,27 @@ const Ge = ye(
657
730
  }
658
731
  ),
659
732
  /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)]", children: [
660
- /* @__PURE__ */ r("div", { className: "ds:flex ds:items-center ds:justify-center ds:size-14 ds:rounded-[var(--radius-full)] ds:bg-primary/10 ds:text-primary ds:transition-colors ds:duration-[var(--animation-duration)] ds:group-hover:bg-primary/15 ds:motion-reduce:transition-none", children: j ? /* @__PURE__ */ r(M, { "aria-hidden": "true", className: "ds:size-7" }) : /* @__PURE__ */ r(M, { "aria-hidden": "true", className: "ds:size-7" }) }),
733
+ /* @__PURE__ */ o("div", { className: "ds:flex ds:items-center ds:justify-center ds:size-14 ds:rounded-[var(--radius-full)] ds:bg-primary/10 ds:text-primary ds:transition-colors ds:duration-[var(--animation-duration)] ds:group-hover:bg-primary/15 ds:motion-reduce:transition-none", children: L ? /* @__PURE__ */ o(O, { "aria-hidden": "true", className: "ds:size-7" }) : /* @__PURE__ */ o(O, { "aria-hidden": "true", className: "ds:size-7" }) }),
661
734
  /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)]", children: [
662
- /* @__PURE__ */ r("p", { className: "type-label ds:text-foreground ds:text-center ds:m-0", children: j ? i("inputs.fileUpload.dropActive", "Drop files here") : i(
735
+ /* @__PURE__ */ o("p", { className: "type-label ds:text-foreground ds:text-center ds:m-0", children: L ? i("inputs.fileUpload.dropActive", "Drop files here") : i(
663
736
  "inputs.fileUpload.dropHere",
664
737
  "Drop files here or click to browse"
665
738
  ) }),
666
- ee.length > 0 && !j && /* @__PURE__ */ r("p", { className: "type-meta ds:text-muted-foreground ds:text-center ds:m-0", children: ee.join(" · ") })
739
+ ne.length > 0 && !L && /* @__PURE__ */ o("p", { className: "type-meta ds:text-muted-foreground ds:text-center ds:m-0", children: ne.join(" · ") })
667
740
  ] }),
668
- v === "both" && !j && /* @__PURE__ */ m(
741
+ h === "both" && !L && /* @__PURE__ */ m(
669
742
  "button",
670
743
  {
671
744
  type: "button",
672
- onClick: (t) => {
673
- t.stopPropagation(), J();
745
+ onClick: (r) => {
746
+ r.stopPropagation(), te();
674
747
  },
675
- disabled: x,
676
- className: ie({
748
+ disabled: j,
749
+ className: fe({
677
750
  className: "ds:mt-[var(--spacing-xs)]"
678
751
  }),
679
752
  children: [
680
- /* @__PURE__ */ r(M, { "aria-hidden": "true", className: "ds:size-4" }),
753
+ /* @__PURE__ */ o(O, { "aria-hidden": "true", className: "ds:size-4" }),
681
754
  i("inputs.fileUpload.browse", "Browse files")
682
755
  ]
683
756
  }
@@ -686,11 +759,11 @@ const Ge = ye(
686
759
  ]
687
760
  }
688
761
  );
689
- }, be = () => v === "dropzone" ? null : v === "button" ? /* @__PURE__ */ m("div", { onPaste: S, ref: k, children: [
690
- /* @__PURE__ */ r(
762
+ }, Ie = () => h === "dropzone" ? null : h === "button" ? /* @__PURE__ */ m("div", { onPaste: oe, ref: I, children: [
763
+ /* @__PURE__ */ o(
691
764
  "input",
692
765
  {
693
- ...Y({
766
+ ...se({
694
767
  "aria-label": i("inputs.fileUpload.browse", "Browse files")
695
768
  })
696
769
  }
@@ -699,52 +772,52 @@ const Ge = ye(
699
772
  "button",
700
773
  {
701
774
  type: "button",
702
- onClick: J,
703
- disabled: x,
704
- className: ie({ className: P }),
705
- id: v === "button" ? _ : void 0,
706
- "aria-describedby": v === "button" && h.describedBy || void 0,
707
- "aria-invalid": v === "button" && h.invalid || void 0,
708
- "aria-required": v === "button" && h.required || void 0,
775
+ onClick: te,
776
+ disabled: j,
777
+ className: fe({ className: Y }),
778
+ id: h === "button" ? J : void 0,
779
+ "aria-describedby": h === "button" ? ee : void 0,
780
+ "aria-invalid": h === "button" && N.invalid || void 0,
781
+ "aria-required": h === "button" && N.required || void 0,
709
782
  children: [
710
- /* @__PURE__ */ r(M, { "aria-hidden": "true", className: "ds:size-4" }),
783
+ /* @__PURE__ */ o(O, { "aria-hidden": "true", className: "ds:size-4" }),
711
784
  i("inputs.fileUpload.browse", "Browse files")
712
785
  ]
713
786
  }
714
787
  )
715
788
  ] }) : null;
716
789
  return /* @__PURE__ */ m("div", { "data-component": "file-upload", "data-component-id": a, children: [
717
- he(),
718
- be(),
719
- ve(),
720
- se.length > 0 && /* @__PURE__ */ r(
790
+ Fe(),
791
+ Ie(),
792
+ Ce(),
793
+ ae.length > 0 && /* @__PURE__ */ o(
721
794
  "div",
722
795
  {
723
796
  role: "alert",
724
797
  className: "ds:mt-[var(--spacing-sm)] ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
725
- children: se.map((e, s) => /* @__PURE__ */ m(
798
+ children: ae.map((e, s) => /* @__PURE__ */ m(
726
799
  "div",
727
800
  {
728
801
  className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
729
802
  children: [
730
- /* @__PURE__ */ r(
731
- ne,
803
+ /* @__PURE__ */ o(
804
+ he,
732
805
  {
733
806
  "aria-hidden": "true",
734
807
  className: "ds:size-3.5 ds:shrink-0 ds:text-destructive"
735
808
  }
736
809
  ),
737
- /* @__PURE__ */ r("p", { className: "type-meta ds:text-destructive ds:m-0", children: e })
810
+ /* @__PURE__ */ o("p", { className: "type-meta ds:text-destructive ds:m-0", children: e })
738
811
  ]
739
812
  },
740
813
  s
741
814
  ))
742
815
  }
743
816
  ),
744
- /* @__PURE__ */ r(
817
+ /* @__PURE__ */ o(
745
818
  "span",
746
819
  {
747
- ref: O,
820
+ ref: $,
748
821
  role: "status",
749
822
  "aria-live": "polite",
750
823
  className: "ds:sr-only"
@@ -753,11 +826,12 @@ const Ge = ye(
753
826
  ] });
754
827
  }
755
828
  );
756
- Ge.displayName = "FileUpload";
829
+ ds.displayName = "FileUpload";
757
830
  export {
758
- Ge as F,
759
- Be as a,
760
- ie as b,
761
- He as f
831
+ ds as F,
832
+ F as a,
833
+ fe as b,
834
+ Ye as c,
835
+ Je as f
762
836
  };
763
- //# sourceMappingURL=file-upload-CxjCs7TX.js.map
837
+ //# sourceMappingURL=file-upload-DQc0LsBM.js.map