@alfadocs/ui-kit 0.31.0 → 0.31.3

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 (291) hide show
  1. package/dist/_chunks/{accordion-CNcodXuO.js → accordion-bSU21uTV.js} +3 -3
  2. package/dist/_chunks/{agenda-card-DO9_yogb.js → agenda-card-UJA6Arbs.js} +3 -3
  3. package/dist/_chunks/{agenda-tray-WLbfMip6.js → agenda-tray-1fAxNOMz.js} +4 -4
  4. package/dist/_chunks/{ai-prompt-input-BXlwNnWe.js → ai-prompt-input-C6sCr1Vi.js} +11 -10
  5. package/dist/_chunks/{alia-sidebar-C-232sD7.js → alia-sidebar-BEoMl6UL.js} +9 -9
  6. package/dist/_chunks/ar-CEpIJtcO.js +399 -0
  7. package/dist/_chunks/{audio-recorder-DL800PE_.js → audio-recorder-C1rhKhSN.js} +114 -114
  8. package/dist/_chunks/audio-visualiser-l6zPd0AG.js +162 -0
  9. package/dist/_chunks/{autocomplete-CUh0f7Dj.js → autocomplete-DIgdhCGJ.js} +2 -2
  10. package/dist/_chunks/{avatar-D_H4emLo.js → avatar-BNQNhoyL.js} +19 -18
  11. package/dist/_chunks/{badge-CIjQ1Us1.js → badge-CptERaHx.js} +2 -2
  12. package/dist/_chunks/{booking-Bhk9IYm3.js → booking-A4o9xI2n.js} +160 -149
  13. package/dist/_chunks/{breadcrumb--YI7lcHA.js → breadcrumb-CLlhx7qo.js} +2 -2
  14. package/dist/_chunks/{button-group-Bh2g_Ng-.js → button-group-Ciq6J4IW.js} +15 -14
  15. package/dist/_chunks/{calendar-WWNx448i.js → calendar-YHFknAGv.js} +22 -22
  16. package/dist/_chunks/{carousel.agent-C2Icc9_T.js → carousel.agent-DrX96W-1.js} +2 -2
  17. package/dist/_chunks/{chart-BLvFl169.js → chart-DLkVn_ex.js} +2 -2
  18. package/dist/_chunks/{chat-container-izziXViv.js → chat-container-ogB4OskO.js} +24 -23
  19. package/dist/_chunks/{chat-input-cyl_y9bh.js → chat-input-CQe7nR_v.js} +132 -118
  20. package/dist/_chunks/{chat-message-fg221-yx.js → chat-message-D53_fH2w.js} +2 -2
  21. package/dist/_chunks/{checkbox-Dgp_cfUr.js → checkbox-DRcOdmXv.js} +3 -3
  22. package/dist/_chunks/{checkbox-group-eVowqKcT.js → checkbox-group-CpUwlHug.js} +3 -3
  23. package/dist/_chunks/{collapsible-hHiyZp0b.js → collapsible-CERONory.js} +2 -2
  24. package/dist/_chunks/{color-picker-Bm-gzpsh.js → color-picker-9tL7pz5y.js} +192 -181
  25. package/dist/_chunks/{combobox-Da9eq00i.js → combobox-BC-DFx8G.js} +31 -30
  26. package/dist/_chunks/{command-palette-11BieSNq.js → command-palette-BiPAAno-.js} +125 -123
  27. package/dist/_chunks/{copy-field-BAF4mt9h.js → copy-field-CCq7j6Zc.js} +2 -2
  28. package/dist/_chunks/{date-picker-D0Ry1dMz.js → date-picker-B94HAV4A.js} +4 -4
  29. package/dist/_chunks/{date-range-picker-DYgHzMOo.js → date-range-picker-D4dgDlLU.js} +73 -73
  30. package/dist/_chunks/{date-time-picker-CGmGtcyc.js → date-time-picker-D1GEzf8p.js} +5 -5
  31. package/dist/_chunks/de-Dfbeau59.js +477 -0
  32. package/dist/_chunks/{description-list-CWjnaDGn.js → description-list-BEbK2g93.js} +2 -2
  33. package/dist/_chunks/{dialog-C-lTGVkB.js → dialog-Cee13rHU.js} +3 -3
  34. package/dist/_chunks/{dropdown-menu-DZxwF23X.js → dropdown-menu-BC5ZdOMo.js} +3 -3
  35. package/dist/_chunks/{editable-currency-cell-renderer-Od3Q-Y8J.js → editable-currency-cell-renderer-BpicmolK.js} +314 -317
  36. package/dist/_chunks/el-Dro3J7CP.js +373 -0
  37. package/dist/_chunks/{email-input-DvJ_kPKL.js → email-input-lQivsFrw.js} +3 -3
  38. package/dist/_chunks/es-Dvg8u70B.js +373 -0
  39. package/dist/_chunks/{file-upload-DxAQprcU.js → file-upload-CdozCPct.js} +226 -233
  40. package/dist/_chunks/fr-VOGjBSPP.js +338 -0
  41. package/dist/_chunks/{freemium-paywall-B9c8Ylww.js → freemium-paywall-D1N02Oam.js} +4 -4
  42. package/dist/_chunks/{header-DDj7uGD-.js → header-CTZWX-tm.js} +2 -2
  43. package/dist/_chunks/hi-BSDxWU_y.js +433 -0
  44. package/dist/_chunks/{icon-button-DPEqBKBQ.js → icon-button-CKEOrN37.js} +2 -2
  45. package/dist/_chunks/{icon-button-group-DeV3FpNY.js → icon-button-group-C48khLE0.js} +23 -22
  46. package/dist/_chunks/{isSameDay-DHG8Xade.js → isSameDay-DUEiAT0G.js} +2 -2
  47. package/dist/_chunks/isSameWeek-Dfzu29cW.js +14 -0
  48. package/dist/_chunks/it-CuonvcI_.js +401 -0
  49. package/dist/_chunks/ja-DO57gIOT.js +366 -0
  50. package/dist/_chunks/{key-value-pair-BvDY3zuc.js → key-value-pair-C8DaR3Xs.js} +2 -2
  51. package/dist/_chunks/{list-BdvDctBz.js → list-BOwqwy03.js} +44 -43
  52. package/dist/_chunks/{locale-picker-CY89MChR.js → locale-picker-D99UyZVJ.js} +4 -4
  53. package/dist/_chunks/{map-view-DyB8tr6c.js → map-view-WEWqXzof.js} +569 -557
  54. package/dist/_chunks/{message-card-D6iyPacd.js → message-card-BbRhZkDI.js} +3 -3
  55. package/dist/_chunks/{message-tray-Bh-0ra-Y.js → message-tray-B762TKuv.js} +11 -10
  56. package/dist/_chunks/{multi-select-dSe6Xtc4.js → multi-select-DOLO3K_z.js} +26 -25
  57. package/dist/_chunks/{navigation-menu-CyS1fBJ7.js → navigation-menu-C6lBYVv9.js} +3 -3
  58. package/dist/_chunks/nl-DjPaaWaW.js +326 -0
  59. package/dist/_chunks/{notification-card-vaMaA7Wa.js → notification-card-DMdO4g54.js} +2 -2
  60. package/dist/_chunks/{notification-tray-Cnum6LwM.js → notification-tray-Dl3FTleW.js} +17 -16
  61. package/dist/_chunks/{number-input-BZXu6bPY.js → number-input-Dj5L3pXK.js} +2 -2
  62. package/dist/_chunks/{otp-input-BDF_iNpa.js → otp-input-BEg_sn8A.js} +2 -2
  63. package/dist/_chunks/{pagination-BWaXF7W0.js → pagination-DQOgnxxw.js} +2 -2
  64. package/dist/_chunks/{parseISO-Dk4xa7q6.js → parseISO-DEpUNwxZ.js} +2 -2
  65. package/dist/_chunks/{patient-search-ZpHN-pgJ.js → patient-search-hFiYbqcl.js} +8 -8
  66. package/dist/_chunks/{patient-shell-CYaNkbA1.js → patient-shell-CDvMw_Nk.js} +6 -6
  67. package/dist/_chunks/{payment-form-Ds3rxvad.js → payment-form-D5rgnZu7.js} +2 -2
  68. package/dist/_chunks/{pdf-viewer-CIuaocnq.js → pdf-viewer-DvtEHcEP.js} +347 -320
  69. package/dist/_chunks/{phone-input-DKSHX7NQ.js → phone-input-DfZbPPvh.js} +217 -201
  70. package/dist/_chunks/pl-Cl4lOx2N.js +514 -0
  71. package/dist/_chunks/{popover-BfHSBEKq.js → popover-Devce-tT.js} +3 -3
  72. package/dist/_chunks/practice-results-RPL64j8E.js +1582 -0
  73. package/dist/_chunks/{privacy-lock-C6Ra5m3p.js → privacy-lock-DD-wHxBg.js} +3 -3
  74. package/dist/_chunks/{progress-B-PSO5OS.js → progress-kzIRcdaq.js} +11 -10
  75. package/dist/_chunks/pt-D7qO5CzD.js +370 -0
  76. package/dist/_chunks/{public-footer.agent-Bc99tE5Z.js → public-footer.agent-Bh0rnx4i.js} +21 -14
  77. package/dist/_chunks/{public-header.agent-B-B0WDAi.js → public-header.agent-B2dDg2_d.js} +3 -3
  78. package/dist/_chunks/{radio-i4ogu3cq.js → radio-TWf9Q-mp.js} +2 -2
  79. package/dist/_chunks/{radio-group-CTlGc36r.js → radio-group-BcF92GEF.js} +4 -4
  80. package/dist/_chunks/{react-day-picker-D3yzgvDB.js → react-day-picker-DsjfS7uI.js} +662 -615
  81. package/dist/_chunks/recaptcha-widget-CFYyLSEX.js +221 -0
  82. package/dist/_chunks/registry-nPAVE19X.js +21 -0
  83. package/dist/_chunks/{resizable-COV-cnth.js → resizable-3vzqDlg6.js} +29 -28
  84. package/dist/_chunks/{reviews-panel-bKEUKSic.js → reviews-panel-yanuBZs-.js} +4 -4
  85. package/dist/_chunks/{rich-text-editor-J-wAz9eN.js → rich-text-editor-CHmr9Bz8.js} +2 -2
  86. package/dist/_chunks/ro-CP2-VJ_O.js +361 -0
  87. package/dist/_chunks/ru-RPn9_Lpq.js +561 -0
  88. package/dist/_chunks/{scroll-area-DEDU-lp-.js → scroll-area-BWqCkEGz.js} +2 -2
  89. package/dist/_chunks/{search-bar-BRMW1-WG.js → search-bar-CP6wUJFY.js} +3 -3
  90. package/dist/_chunks/{search-input-CIA6pPfn.js → search-input-C1C3jQpD.js} +24 -23
  91. package/dist/_chunks/{select-C92AT_OZ.js → select-hsCaJSX3.js} +3 -3
  92. package/dist/_chunks/{sheet-D8Yl0nKR.js → sheet-BV-yuLE2.js} +3 -3
  93. package/dist/_chunks/{sidebar-DkyC6GvS.js → sidebar-BbR8f6oe.js} +3 -3
  94. package/dist/_chunks/{signature-capture-DjMlFOzS.js → signature-capture-C-fF71xI.js} +213 -205
  95. package/dist/_chunks/{slider-CfEzeseL.js → slider-BHWzXdjt.js} +3 -3
  96. package/dist/_chunks/{slot-grid-Q94gVmhn.js → slot-grid-Dz13dH82.js} +4 -4
  97. package/dist/_chunks/{sparkline-B5Ms55PZ.js → sparkline-DEROcSl0.js} +2 -2
  98. package/dist/_chunks/sq-AQvefouo.js +355 -0
  99. package/dist/_chunks/{stepper-progress-jFY8BSf7.js → stepper-progress-DDjq5nei.js} +16 -15
  100. package/dist/_chunks/streaming-text-GH07yIYh.js +127 -0
  101. package/dist/_chunks/sv-zkx9eBtD.js +376 -0
  102. package/dist/_chunks/{switch-D916VW86.js → switch-BJ6HD3Mn.js} +2 -2
  103. package/dist/_chunks/{tabs-aEQfQV3x.js → tabs-BpPYVme_.js} +4 -4
  104. package/dist/_chunks/{tag-bBPAvXyh.js → tag-CyoaEmf_.js} +2 -2
  105. package/dist/_chunks/{task-tray-6NlryfMJ.js → task-tray-DRK0b0Qb.js} +3 -3
  106. package/dist/_chunks/{text-area-D5GAe8pV.js → text-area-BIx0tZ05.js} +27 -26
  107. package/dist/_chunks/{text-input-CakysYnD.js → text-input-BaClJL8Y.js} +2 -2
  108. package/dist/_chunks/{theme-toggle-JoeMs_ws.js → theme-toggle-DpC28kt5.js} +6 -6
  109. package/dist/_chunks/{time-picker-DeVZkIY2.js → time-picker-B5umYwfv.js} +2 -2
  110. package/dist/_chunks/{timeline-CR7HjZCK.js → timeline-D0Wo7v_o.js} +3 -3
  111. package/dist/_chunks/{toast.agent-DVpKt38p.js → toast.agent-WHHfw5VX.js} +322 -320
  112. package/dist/_chunks/{tooltip-ClJd0ciy.js → tooltip-DvmfrNvB.js} +29 -20
  113. package/dist/_chunks/{tooth-scheme-3mITSXiZ.js → tooth-scheme-CxlsLjfN.js} +2 -2
  114. package/dist/_chunks/tr-Dmr412Ac.js +378 -0
  115. package/dist/_chunks/{transcript-panel-QUQ9XJmf.js → transcript-panel-DyhTpAP7.js} +21 -20
  116. package/dist/_chunks/{use-direction-D6rvvG9G.js → use-direction-Dp8h70PP.js} +7 -6
  117. package/dist/_chunks/use-isomorphic-layout-effect-BGfaCOP1.js +6 -0
  118. package/dist/_chunks/use-media-query-CcAx5SMM.js +16 -0
  119. package/dist/_chunks/{use-password-requirements-E0sSfx5X.js → use-password-requirements-DsgduV1x.js} +3 -3
  120. package/dist/_chunks/use-scroll-to-first-error-4Za-u5Nw.js +43 -0
  121. package/dist/_chunks/{workflow-map-DlWBJJBt.js → workflow-map-BSvQS3be.js} +6 -6
  122. package/dist/_chunks/zh-CN-DxVt64Zk.js +388 -0
  123. package/dist/agent/registry.d.ts +1 -6
  124. package/dist/agent-catalog.json +1 -1
  125. package/dist/components/_shared/date-locale.d.ts +7 -2
  126. package/dist/components/_shared/index.d.ts +1 -1
  127. package/dist/components/accordion/index.js +1 -1
  128. package/dist/components/agenda-card/index.js +1 -1
  129. package/dist/components/agenda-tray/index.js +1 -1
  130. package/dist/components/ai-prompt-input/index.js +1 -1
  131. package/dist/components/audio-recorder/index.js +1 -1
  132. package/dist/components/audio-visualiser/index.js +1 -1
  133. package/dist/components/autocomplete/index.js +1 -1
  134. package/dist/components/avatar/index.js +1 -1
  135. package/dist/components/badge/index.js +1 -1
  136. package/dist/components/booking/index.js +1 -1
  137. package/dist/components/breadcrumb/index.js +1 -1
  138. package/dist/components/button/index.js +1 -1
  139. package/dist/components/button-group/index.js +1 -1
  140. package/dist/components/calendar/index.js +1 -1
  141. package/dist/components/carousel/index.js +1 -1
  142. package/dist/components/chart/index.js +1 -1
  143. package/dist/components/chat-container/index.js +1 -1
  144. package/dist/components/chat-input/index.js +1 -1
  145. package/dist/components/chat-message/index.js +1 -1
  146. package/dist/components/checkbox/index.js +1 -1
  147. package/dist/components/checkbox-group/index.js +1 -1
  148. package/dist/components/collapsible/index.js +1 -1
  149. package/dist/components/color-picker/index.js +1 -1
  150. package/dist/components/combobox/index.js +1 -1
  151. package/dist/components/command-palette/index.js +1 -1
  152. package/dist/components/copy-field/index.js +1 -1
  153. package/dist/components/data-table/index.js +1 -1
  154. package/dist/components/date-picker/index.js +1 -1
  155. package/dist/components/date-range-picker/index.js +1 -1
  156. package/dist/components/date-time-picker/index.js +1 -1
  157. package/dist/components/description-list/index.js +1 -1
  158. package/dist/components/dialog/index.js +1 -1
  159. package/dist/components/dropdown-menu/index.js +1 -1
  160. package/dist/components/email-input/index.js +1 -1
  161. package/dist/components/file-upload/index.js +1 -1
  162. package/dist/components/freemium-paywall/index.js +1 -1
  163. package/dist/components/header/index.js +1 -1
  164. package/dist/components/header-settings/index.js +6 -6
  165. package/dist/components/icon-button/index.js +1 -1
  166. package/dist/components/icon-button-group/index.js +1 -1
  167. package/dist/components/key-value-pair/index.js +1 -1
  168. package/dist/components/list/index.js +1 -1
  169. package/dist/components/locale-picker/index.js +1 -1
  170. package/dist/components/map-view/index.js +1 -1
  171. package/dist/components/map-view/map-view.d.ts +10 -0
  172. package/dist/components/message-card/index.js +1 -1
  173. package/dist/components/message-tray/index.js +1 -1
  174. package/dist/components/multi-select/index.js +1 -1
  175. package/dist/components/navigation-menu/index.js +1 -1
  176. package/dist/components/notification-card/index.js +1 -1
  177. package/dist/components/notification-tray/index.js +1 -1
  178. package/dist/components/number-input/index.js +1 -1
  179. package/dist/components/otp-input/index.js +1 -1
  180. package/dist/components/pagination/index.js +1 -1
  181. package/dist/components/password-input/index.js +1 -1
  182. package/dist/components/patient-search/index.js +1 -1
  183. package/dist/components/payment-form/index.js +1 -1
  184. package/dist/components/pdf-viewer/index.js +1 -1
  185. package/dist/components/phone-input/index.js +1 -1
  186. package/dist/components/popover/index.js +1 -1
  187. package/dist/components/practice-results/index.js +1 -1
  188. package/dist/components/practice-results/practice-results.d.ts +23 -1
  189. package/dist/components/privacy-lock/index.js +1 -1
  190. package/dist/components/progress/index.js +1 -1
  191. package/dist/components/public-footer/index.js +1 -1
  192. package/dist/components/public-header/index.js +1 -1
  193. package/dist/components/radio/index.js +1 -1
  194. package/dist/components/radio-group/index.js +2 -2
  195. package/dist/components/recaptcha-widget/index.js +1 -1
  196. package/dist/components/resizable/index.js +1 -1
  197. package/dist/components/reviews-panel/index.js +1 -1
  198. package/dist/components/rich-text-editor/index.js +1 -1
  199. package/dist/components/scroll-area/index.js +1 -1
  200. package/dist/components/search-bar/index.js +1 -1
  201. package/dist/components/search-input/index.js +1 -1
  202. package/dist/components/select/index.js +1 -1
  203. package/dist/components/sheet/index.js +1 -1
  204. package/dist/components/sidebar/index.js +1 -1
  205. package/dist/components/signature-capture/index.js +1 -1
  206. package/dist/components/slider/index.js +1 -1
  207. package/dist/components/slot-grid/index.js +1 -1
  208. package/dist/components/sparkline/index.js +1 -1
  209. package/dist/components/stepper-progress/index.js +1 -1
  210. package/dist/components/streaming-text/index.js +1 -1
  211. package/dist/components/switch/index.js +1 -1
  212. package/dist/components/tabs/index.js +1 -1
  213. package/dist/components/tag/index.js +1 -1
  214. package/dist/components/task-tray/index.js +1 -1
  215. package/dist/components/text-area/index.js +1 -1
  216. package/dist/components/text-input/index.js +1 -1
  217. package/dist/components/theme-toggle/index.js +1 -1
  218. package/dist/components/time-picker/index.js +1 -1
  219. package/dist/components/timeline/index.js +1 -1
  220. package/dist/components/toast/index.js +1 -1
  221. package/dist/components/tooltip/index.js +1 -1
  222. package/dist/components/tooth-scheme/index.js +1 -1
  223. package/dist/components/transcript-panel/index.js +1 -1
  224. package/dist/components/workflow/index.js +1 -1
  225. package/dist/hooks/index.js +69 -66
  226. package/dist/i18n/locales/ar.d.ts +92 -0
  227. package/dist/i18n/locales/ar.js +82 -0
  228. package/dist/i18n/locales/de.d.ts +92 -0
  229. package/dist/i18n/locales/de.js +81 -0
  230. package/dist/i18n/locales/el.d.ts +92 -0
  231. package/dist/i18n/locales/el.js +82 -0
  232. package/dist/i18n/locales/en.d.ts +27 -0
  233. package/dist/i18n/locales/en.js +27 -0
  234. package/dist/i18n/locales/es.d.ts +92 -0
  235. package/dist/i18n/locales/es.js +81 -0
  236. package/dist/i18n/locales/fr.d.ts +92 -0
  237. package/dist/i18n/locales/fr.js +81 -0
  238. package/dist/i18n/locales/hi.d.ts +92 -0
  239. package/dist/i18n/locales/hi.js +82 -0
  240. package/dist/i18n/locales/it.d.ts +92 -0
  241. package/dist/i18n/locales/it.js +81 -0
  242. package/dist/i18n/locales/ja.d.ts +92 -0
  243. package/dist/i18n/locales/ja.js +82 -0
  244. package/dist/i18n/locales/nl.d.ts +92 -0
  245. package/dist/i18n/locales/nl.js +81 -0
  246. package/dist/i18n/locales/pl.d.ts +92 -0
  247. package/dist/i18n/locales/pl.js +82 -0
  248. package/dist/i18n/locales/pt.d.ts +92 -0
  249. package/dist/i18n/locales/pt.js +83 -0
  250. package/dist/i18n/locales/ro.d.ts +92 -0
  251. package/dist/i18n/locales/ro.js +82 -0
  252. package/dist/i18n/locales/ru.d.ts +92 -0
  253. package/dist/i18n/locales/ru.js +82 -0
  254. package/dist/i18n/locales/sq.d.ts +92 -0
  255. package/dist/i18n/locales/sq.js +82 -0
  256. package/dist/i18n/locales/sv.d.ts +92 -0
  257. package/dist/i18n/locales/sv.js +82 -0
  258. package/dist/i18n/locales/tr.d.ts +92 -0
  259. package/dist/i18n/locales/tr.js +82 -0
  260. package/dist/i18n/locales/zh.d.ts +92 -0
  261. package/dist/i18n/locales/zh.js +82 -0
  262. package/dist/index.js +541 -540
  263. package/dist/locales/ar.json +92 -0
  264. package/dist/locales/de.json +92 -0
  265. package/dist/locales/el.json +92 -0
  266. package/dist/locales/en.json +27 -0
  267. package/dist/locales/es.json +92 -0
  268. package/dist/locales/fr.json +92 -0
  269. package/dist/locales/hi.json +92 -0
  270. package/dist/locales/it.json +92 -0
  271. package/dist/locales/ja.json +92 -0
  272. package/dist/locales/nl.json +92 -0
  273. package/dist/locales/pl.json +92 -0
  274. package/dist/locales/pt.json +92 -0
  275. package/dist/locales/ro.json +92 -0
  276. package/dist/locales/ru.json +92 -0
  277. package/dist/locales/sq.json +92 -0
  278. package/dist/locales/sv.json +92 -0
  279. package/dist/locales/tr.json +92 -0
  280. package/dist/locales/zh.json +92 -0
  281. package/dist/patterns/alia-assistant/index.js +1 -1
  282. package/dist/patterns/patient-shell/index.js +1 -1
  283. package/dist/tokens.css +1 -1
  284. package/package.json +2 -2
  285. package/dist/_chunks/audio-visualiser-I-T4Z7EU.js +0 -145
  286. package/dist/_chunks/practice-results-CEKjwsgS.js +0 -1441
  287. package/dist/_chunks/recaptcha-widget-BtBNb6tB.js +0 -192
  288. package/dist/_chunks/registry-C9nwlNyL.js +0 -21
  289. package/dist/_chunks/smile-BSYLAHy6.js +0 -17
  290. package/dist/_chunks/streaming-text-BgjCTVOw.js +0 -105
  291. package/dist/_chunks/use-scroll-to-first-error-BrK7dKB_.js +0 -55
@@ -1,34 +1,34 @@
1
1
  import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as Ne, useId as Ue, useState as re, useRef as V, useCallback as y, useMemo as q, useEffect as ze } from "react";
3
- import { u as je } from "./index-BcMWc8W2.js";
4
- import { c as _ } from "./index-D2ZczOXr.js";
5
- import { useTranslation as Me } from "react-i18next";
6
- import { u as Ce } from "./form-field-context-B3APVHKx.js";
7
- import { u as Fe } from "./registry-C9nwlNyL.js";
2
+ import { forwardRef as xe, useId as ke, useState as re, useRef as O, useCallback as y, useMemo as T, useEffect as we } from "react";
3
+ import { u as Ne } from "./index-BcMWc8W2.js";
4
+ import { c as B } from "./index-D2ZczOXr.js";
5
+ import { useTranslation as Ue } from "react-i18next";
6
+ import { u as ze } from "./form-field-context-B3APVHKx.js";
7
+ import { u as je } from "./registry-nPAVE19X.js";
8
8
  import { C as le } from "./circle-alert-ChA9opNA.js";
9
- import { c as z } from "./createLucideIcon-CrFbzy84.js";
9
+ import { c as N } from "./createLucideIcon-CrFbzy84.js";
10
10
  import { X as ie } from "./x-CCcI3eJp.js";
11
- import { F as Le } from "./file-text-DSNuv2B8.js";
12
- import { F as Ae } from "./file-spreadsheet-zUkY8rJ2.js";
13
- import { C as Re } from "./circle-check-9AeSgJD_.js";
11
+ import { F as Me } from "./file-text-DSNuv2B8.js";
12
+ import { F as Ce } from "./file-spreadsheet-zUkY8rJ2.js";
13
+ import { C as Fe } from "./circle-check-9AeSgJD_.js";
14
14
  /**
15
15
  * @license lucide-react v1.8.0 - ISC
16
16
  *
17
17
  * This source code is licensed under the ISC license.
18
18
  * See the LICENSE file in the root directory of this source tree.
19
19
  */
20
- const De = [
20
+ const Le = [
21
21
  ["path", { d: "M12 13v8", key: "1l5pq0" }],
22
22
  ["path", { d: "M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242", key: "1pljnt" }],
23
23
  ["path", { d: "m8 17 4-4 4 4", key: "1quai1" }]
24
- ], Ie = z("cloud-upload", De);
24
+ ], Ae = N("cloud-upload", Le);
25
25
  /**
26
26
  * @license lucide-react v1.8.0 - ISC
27
27
  *
28
28
  * This source code is licensed under the ISC license.
29
29
  * See the LICENSE file in the root directory of this source tree.
30
30
  */
31
- const _e = [
31
+ const Re = [
32
32
  [
33
33
  "path",
34
34
  {
@@ -41,14 +41,14 @@ const _e = [
41
41
  ["path", { d: "M8 18v-2", key: "qcmpov" }],
42
42
  ["path", { d: "M8 7V6", key: "1nbb54" }],
43
43
  ["circle", { cx: "8", cy: "20", r: "2", key: "ckkr5m" }]
44
- ], Be = z("file-archive", _e);
44
+ ], De = N("file-archive", Re);
45
45
  /**
46
46
  * @license lucide-react v1.8.0 - ISC
47
47
  *
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
50
  */
51
- const He = [
51
+ const Ie = [
52
52
  [
53
53
  "path",
54
54
  {
@@ -59,14 +59,14 @@ const He = [
59
59
  ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
60
60
  ["circle", { cx: "10", cy: "12", r: "2", key: "737tya" }],
61
61
  ["path", { d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22", key: "wt3hpn" }]
62
- ], Oe = z("file-image", He);
62
+ ], _e = N("file-image", Ie);
63
63
  /**
64
64
  * @license lucide-react v1.8.0 - ISC
65
65
  *
66
66
  * This source code is licensed under the ISC license.
67
67
  * See the LICENSE file in the root directory of this source tree.
68
68
  */
69
- const Ee = [
69
+ const Be = [
70
70
  [
71
71
  "path",
72
72
  {
@@ -75,32 +75,32 @@ const Ee = [
75
75
  }
76
76
  ],
77
77
  ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
78
- ], $e = z("file", Ee);
78
+ ], He = N("file", Be);
79
79
  /**
80
80
  * @license lucide-react v1.8.0 - ISC
81
81
  *
82
82
  * This source code is licensed under the ISC license.
83
83
  * See the LICENSE file in the root directory of this source tree.
84
84
  */
85
- const Ve = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], qe = z("loader-circle", Ve);
85
+ const $e = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Ee = N("loader-circle", $e);
86
86
  /**
87
87
  * @license lucide-react v1.8.0 - ISC
88
88
  *
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
91
  */
92
- const Te = [
92
+ const Ve = [
93
93
  ["path", { d: "M12 3v12", key: "1x0j5s" }],
94
94
  ["path", { d: "m17 8-5-5-5 5", key: "7q97r8" }],
95
95
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
96
- ], T = z("upload", Te), We = {
96
+ ], P = N("upload", Ve), qe = {
97
97
  id: "file-upload",
98
98
  capabilities: ["submit", "dismiss"],
99
99
  state: {
100
100
  files: {
101
101
  type: "Array<{ id, name, size, status }>",
102
102
  description: "Files currently tracked by the uploader. Identifiers and metadata only — never file content.",
103
- read: (d) => d.getFiles()
103
+ read: (o) => o.getFiles()
104
104
  }
105
105
  },
106
106
  actions: {
@@ -108,15 +108,15 @@ const Te = [
108
108
  safety: "destructive",
109
109
  argsType: "{ id: string }",
110
110
  description: "Remove the file with the given id from the upload list.",
111
- invoke: (d, n) => {
112
- d.removeFile(n.id);
111
+ invoke: (o, a) => {
112
+ o.removeFile(a.id);
113
113
  }
114
114
  },
115
115
  clear: {
116
116
  safety: "destructive",
117
117
  description: "Remove all files from the upload list.",
118
- invoke: (d) => {
119
- d.clear();
118
+ invoke: (o) => {
119
+ o.clear();
120
120
  }
121
121
  }
122
122
  },
@@ -132,7 +132,7 @@ const Te = [
132
132
  description: "Each tracked file emits its id as data-file-id."
133
133
  }
134
134
  }
135
- }, Pe = _(
135
+ }, Oe = B(
136
136
  [
137
137
  "ds:relative ds:flex ds:flex-col ds:items-center ds:justify-center",
138
138
  "ds:min-h-48 ds:px-[var(--spacing-lg)] ds:py-[var(--spacing-xl)]",
@@ -165,7 +165,7 @@ const Te = [
165
165
  isDisabled: !1
166
166
  }
167
167
  }
168
- ), ae = _(
168
+ ), ae = B(
169
169
  [
170
170
  "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
171
171
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
@@ -178,7 +178,7 @@ const Te = [
178
178
  "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
179
179
  "ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
180
180
  ].join(" ")
181
- ), Ke = _(
181
+ ), Te = B(
182
182
  [
183
183
  "ds:flex ds:items-center ds:gap-[var(--spacing-md)]",
184
184
  "ds:rounded-[var(--radius-md)] ds:border ds:bg-background",
@@ -199,7 +199,7 @@ const Te = [
199
199
  status: "pending"
200
200
  }
201
201
  }
202
- ), oe = _(
202
+ ), oe = B(
203
203
  [
204
204
  "ds:inline-flex ds:items-center ds:justify-center",
205
205
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
@@ -211,52 +211,52 @@ const Te = [
211
211
  "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
212
212
  ].join(" ")
213
213
  );
214
- function Ge() {
214
+ function Pe() {
215
215
  return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;
216
216
  }
217
- function Xe(d) {
218
- return d.type.startsWith("image/");
217
+ function Ke(o) {
218
+ return o.type.startsWith("image/");
219
219
  }
220
- function Ye(d) {
220
+ function We(o) {
221
221
  var c;
222
- const n = ((c = d.name.split(".").pop()) == null ? void 0 : c.toLowerCase()) ?? "";
223
- return ["pdf", "doc", "docx", "txt", "rtf"].includes(n) ? /* @__PURE__ */ r(
224
- Le,
222
+ const a = ((c = o.name.split(".").pop()) == null ? void 0 : c.toLowerCase()) ?? "";
223
+ return ["pdf", "doc", "docx", "txt", "rtf"].includes(a) ? /* @__PURE__ */ r(
224
+ Me,
225
225
  {
226
226
  "aria-hidden": "true",
227
227
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
228
228
  }
229
- ) : ["zip", "rar", "7z", "tar", "gz"].includes(n) ? /* @__PURE__ */ r(
230
- Be,
229
+ ) : ["zip", "rar", "7z", "tar", "gz"].includes(a) ? /* @__PURE__ */ r(
230
+ De,
231
231
  {
232
232
  "aria-hidden": "true",
233
233
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
234
234
  }
235
- ) : ["xls", "xlsx", "csv"].includes(n) ? /* @__PURE__ */ r(
236
- Ae,
235
+ ) : ["xls", "xlsx", "csv"].includes(a) ? /* @__PURE__ */ r(
236
+ Ce,
237
237
  {
238
238
  "aria-hidden": "true",
239
239
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
240
240
  }
241
- ) : ["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"].includes(n) ? /* @__PURE__ */ r(
242
- Oe,
241
+ ) : ["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"].includes(a) ? /* @__PURE__ */ r(
242
+ _e,
243
243
  {
244
244
  "aria-hidden": "true",
245
245
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
246
246
  }
247
247
  ) : /* @__PURE__ */ r(
248
- $e,
248
+ He,
249
249
  {
250
250
  "aria-hidden": "true",
251
251
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
252
252
  }
253
253
  );
254
254
  }
255
- function Je(d) {
256
- switch (d) {
255
+ function Ge(o) {
256
+ switch (o) {
257
257
  case "uploading":
258
258
  return /* @__PURE__ */ r(
259
- qe,
259
+ Ee,
260
260
  {
261
261
  "aria-hidden": "true",
262
262
  className: "ds:size-4 ds:shrink-0 ds:text-primary ds:animate-spin"
@@ -264,7 +264,7 @@ function Je(d) {
264
264
  );
265
265
  case "complete":
266
266
  return /* @__PURE__ */ r(
267
- Re,
267
+ Fe,
268
268
  {
269
269
  "aria-hidden": "true",
270
270
  className: "ds:size-4 ds:shrink-0 ds:text-[var(--success)]"
@@ -282,23 +282,23 @@ function Je(d) {
282
282
  return null;
283
283
  }
284
284
  }
285
- const Qe = [
285
+ const Xe = [
286
286
  "inputs.fileUpload.units.bytes",
287
287
  "inputs.fileUpload.units.kilobytes",
288
288
  "inputs.fileUpload.units.megabytes",
289
289
  "inputs.fileUpload.units.gigabytes"
290
290
  ], ne = ["B", "KB", "MB", "GB"];
291
- function I(d, n, c) {
292
- let u = d, p = 0;
293
- for (; u >= 1024 && p < ne.length - 1; )
294
- u /= 1024, p++;
295
- const g = new Intl.NumberFormat(n, {
296
- maximumFractionDigits: p === 0 ? 0 : 1
297
- }).format(u), B = c(Qe[p], ne[p]);
298
- return `${g} ${B}`;
291
+ function _(o, a, c) {
292
+ let l = o, u = 0;
293
+ for (; l >= 1024 && u < ne.length - 1; )
294
+ l /= 1024, u++;
295
+ const g = new Intl.NumberFormat(a, {
296
+ maximumFractionDigits: u === 0 ? 0 : 1
297
+ }).format(l), U = c(Xe[u], ne[u]);
298
+ return `${g} ${U}`;
299
299
  }
300
- function Ze(d) {
301
- switch (d) {
300
+ function Ye(o) {
301
+ switch (o) {
302
302
  case "file-too-large":
303
303
  return "file-too-large";
304
304
  case "file-too-small":
@@ -311,89 +311,90 @@ function Ze(d) {
311
311
  return "file-invalid-type";
312
312
  }
313
313
  }
314
- function de(d) {
315
- const n = d.split(".");
316
- return n.length > 1 ? `.${n.pop().toLowerCase()}` : "";
314
+ function Je(o) {
315
+ const a = o.split(".");
316
+ return a.length > 1 ? `.${a.pop().toLowerCase()}` : "";
317
317
  }
318
- function Se(d) {
319
- const n = [];
320
- for (const u of Object.values(d))
321
- for (const p of u)
322
- n.push(p.toUpperCase().replace(".", ""));
323
- if (n.length > 0) return n.join(", ");
318
+ function de(o, a) {
319
+ const c = Je(o.name);
320
+ for (const [l, u] of Object.entries(a)) {
321
+ const g = l === "*/*" || l.endsWith("/*") && o.type.startsWith(l.replace("/*", "/")) || o.type === l, U = u.length === 0 || u.some((C) => C.toLowerCase() === c);
322
+ if (g && U) return !0;
323
+ }
324
+ return !1;
325
+ }
326
+ function Qe(o) {
327
+ const a = [];
328
+ for (const l of Object.values(o))
329
+ for (const u of l)
330
+ a.push(u.toUpperCase().replace(".", ""));
331
+ if (a.length > 0) return a.join(", ");
324
332
  const c = [];
325
- for (const u of Object.keys(d))
326
- u.endsWith("/*") ? c.push(u.replace("/*", "").split("/").pop() ?? u) : c.push(u.split("/").pop() ?? u);
333
+ for (const l of Object.keys(o))
334
+ l.endsWith("/*") ? c.push(l.replace("/*", "").split("/").pop() ?? l) : c.push(l.split("/").pop() ?? l);
327
335
  return c.join(", ");
328
336
  }
329
- const es = Ne(
337
+ const Ze = xe(
330
338
  ({
331
- id: d,
332
- accept: n,
339
+ id: o,
340
+ accept: a,
333
341
  maxSize: c,
334
- minSize: u,
335
- maxFiles: p = 1,
342
+ minSize: l,
343
+ maxFiles: u = 1,
336
344
  multiple: g = !1,
337
- disabled: B,
338
- strictAccept: W = !1,
345
+ disabled: U,
346
+ strictAccept: C = !1,
339
347
  onDrop: F,
340
348
  onUpload: H,
341
349
  onRemove: L,
342
350
  onReject: A,
343
- variant: h = "both",
351
+ variant: v = "both",
344
352
  showPreview: ce = !0,
345
- className: P
346
- }, j) => {
347
- const { t: o, i18n: w } = Me(), v = Ce(), ue = Ue(), x = v.disabled || B, pe = v.invalid, K = v.id || ue, [R, b] = re([]), [G, fe] = re([]), D = V(/* @__PURE__ */ new Map()), O = V(null), M = V(R);
348
- M.current = R;
349
- const N = y((e) => {
350
- O.current && (O.current.textContent = e);
353
+ className: K
354
+ }, z) => {
355
+ const { t: i, i18n: k } = Ue(), h = ze(), ue = ke(), x = h.disabled || U, pe = h.invalid, W = h.id || ue, [R, b] = re([]), [G, fe] = re([]), D = O(/* @__PURE__ */ new Map()), $ = O(null), j = O(R);
356
+ j.current = R;
357
+ const w = y((e) => {
358
+ $.current && ($.current.textContent = e);
351
359
  }, []), X = y(
352
- (e) => {
353
- if (!W || !n) return !0;
354
- for (const [s, a] of Object.entries(n)) {
355
- const t = s === "*/*" || s.endsWith("/*") && e.type.startsWith(s.replace("/*", "/")) || e.type === s, i = de(e.name), f = a.length === 0 || a.some((U) => U.toLowerCase() === i);
356
- if (t && f) return !0;
357
- }
358
- return !1;
359
- },
360
- [W, n]
360
+ (e) => !C || !a ? !0 : de(e, a),
361
+ [C, a]
361
362
  ), Y = y(
362
363
  async (e) => {
363
364
  if (!H) return;
364
365
  const s = new AbortController();
365
366
  D.current.set(e.id, s), b(
366
- (a) => a.map(
367
+ (n) => n.map(
367
368
  (t) => t.id === e.id ? { ...t, status: "uploading", progress: 0 } : t
368
369
  )
369
- ), N(o("inputs.fileUpload.uploading", "Uploading…"));
370
+ ), w(i("inputs.fileUpload.uploading", "Uploading…"));
370
371
  try {
371
372
  await H(e.file, {
372
373
  signal: s.signal,
373
- onProgress: (a) => {
374
+ onProgress: (n) => {
374
375
  b(
375
376
  (t) => t.map(
376
- (i) => i.id === e.id ? { ...i, progress: a } : i
377
+ (d) => d.id === e.id ? { ...d, progress: n } : d
377
378
  )
378
- ), N(
379
- o("inputs.fileUpload.progress", "{{percent}}% uploaded", {
380
- percent: a
379
+ ), w(
380
+ i("inputs.fileUpload.progress", "{{percent}}% uploaded", {
381
+ percent: n
381
382
  })
382
383
  );
383
384
  }
384
385
  }), b(
385
- (a) => a.map(
386
+ (n) => n.map(
386
387
  (t) => t.id === e.id ? { ...t, status: "complete", progress: 100 } : t
387
388
  )
388
- ), N(o("inputs.fileUpload.complete", "Upload complete"));
389
- } catch (a) {
389
+ ), w(i("inputs.fileUpload.complete", "Upload complete"));
390
+ } catch (n) {
390
391
  if (s.signal.aborted) {
391
- b((i) => i.filter((f) => f.id !== e.id));
392
+ b((d) => d.filter((f) => f.id !== e.id));
392
393
  return;
393
394
  }
394
- const t = a instanceof Error ? a.message : o("inputs.fileUpload.errors.uploadFailed", "Upload failed");
395
+ const t = n instanceof Error ? n.message : i("inputs.fileUpload.errors.uploadFailed", "Upload failed");
395
396
  b(
396
- (i) => i.map(
397
+ (d) => d.map(
397
398
  (f) => f.id === e.id ? { ...f, status: "error", error: t } : f
398
399
  )
399
400
  );
@@ -401,193 +402,185 @@ const es = Ne(
401
402
  D.current.delete(e.id);
402
403
  }
403
404
  },
404
- [H, N, o]
405
+ [H, w, i]
405
406
  ), E = y(
406
407
  (e, s) => {
407
- const a = s.flatMap(
408
- (l) => l.errors.map((k) => ({
409
- file: l.file,
410
- reason: Ze(k.code)
408
+ const n = s.flatMap(
409
+ (p) => p.errors.map((I) => ({
410
+ file: p.file,
411
+ reason: Ye(I.code)
411
412
  }))
412
- ), t = [], i = [];
413
- for (const l of e)
414
- X(l) ? i.push(l) : t.push({ file: l, reason: "file-invalid-type" });
415
- const f = [...a, ...t];
413
+ ), t = [], d = [];
414
+ for (const p of e)
415
+ X(p) ? d.push(p) : t.push({ file: p, reason: "file-invalid-type" });
416
+ const f = [...n, ...t];
416
417
  fe(f), f.length > 0 && (A == null || A(f));
417
- const U = i.map((l) => ({
418
- file: l,
419
- id: Ge(),
418
+ const q = d.map((p) => ({
419
+ file: p,
420
+ id: Pe(),
420
421
  status: "pending",
421
422
  progress: 0,
422
- preview: Xe(l) ? URL.createObjectURL(l) : void 0
423
+ preview: Ke(p) ? URL.createObjectURL(p) : void 0
423
424
  }));
424
- b((l) => {
425
- if (!g && p === 1) {
426
- for (const k of l)
427
- k.preview && URL.revokeObjectURL(k.preview);
428
- return U;
425
+ b((p) => {
426
+ if (!g && u === 1) {
427
+ for (const I of p)
428
+ I.preview && URL.revokeObjectURL(I.preview);
429
+ return q;
429
430
  }
430
- return [...l, ...U];
431
- }), F == null || F(i, f), N(
432
- o("inputs.fileUpload.filesSelected", "{{count}} file(s) selected", {
433
- count: i.length
431
+ return [...p, ...q];
432
+ }), F == null || F(d, f), w(
433
+ i("inputs.fileUpload.filesSelected", "{{count}} file(s) selected", {
434
+ count: d.length
434
435
  })
435
436
  );
436
- for (const l of U)
437
- Y(l);
437
+ for (const p of q)
438
+ Y(p);
438
439
  },
439
440
  [
440
441
  g,
441
- p,
442
+ u,
442
443
  F,
443
444
  A,
444
445
  X,
445
- N,
446
+ w,
446
447
  Y,
447
- o
448
+ i
448
449
  ]
449
- ), { getRootProps: me, getInputProps: J, isDragActive: C, open: Q } = je({
450
- accept: n,
450
+ ), { getRootProps: me, getInputProps: J, isDragActive: M, open: Q } = Ne({
451
+ accept: a,
451
452
  maxSize: c,
452
- minSize: u,
453
- maxFiles: g ? p : 1,
453
+ minSize: l,
454
+ maxFiles: g ? u : 1,
454
455
  multiple: g,
455
456
  disabled: x,
456
457
  onDrop: E,
457
- noClick: h === "button",
458
- noKeyboard: h === "button"
458
+ noClick: v === "button",
459
+ noKeyboard: v === "button"
459
460
  }), ge = y((e) => {
460
461
  const s = D.current.get(e);
461
- s == null || s.abort(), b((a) => {
462
- const t = a.find((i) => i.id === e);
463
- return t != null && t.preview && URL.revokeObjectURL(t.preview), a.filter((i) => i.id !== e);
462
+ s == null || s.abort(), b((n) => {
463
+ const t = n.find((d) => d.id === e);
464
+ return t != null && t.preview && URL.revokeObjectURL(t.preview), n.filter((d) => d.id !== e);
464
465
  });
465
- }, []), $ = y(
466
+ }, []), V = y(
466
467
  (e) => {
467
- const s = M.current.find((a) => a.id === e);
468
- s != null && s.preview && URL.revokeObjectURL(s.preview), b((a) => a.filter((t) => t.id !== e)), s && (L == null || L(s));
468
+ const s = j.current.find((n) => n.id === e);
469
+ s != null && s.preview && URL.revokeObjectURL(s.preview), b((n) => n.filter((t) => t.id !== e)), s && (L == null || L(s));
469
470
  },
470
471
  [L]
471
472
  ), Z = y(() => {
472
- for (const e of M.current) {
473
+ for (const e of j.current) {
473
474
  const s = D.current.get(e.id);
474
475
  s == null || s.abort(), e.preview && URL.revokeObjectURL(e.preview);
475
476
  }
476
477
  b([]);
477
- }, []), he = q(
478
+ }, []), ve = T(
478
479
  () => ({
479
- getFiles: () => M.current.map((e) => ({
480
+ getFiles: () => j.current.map((e) => ({
480
481
  id: e.id,
481
482
  name: e.file.name,
482
483
  size: e.file.size,
483
484
  status: e.status
484
485
  })),
485
- removeFile: (e) => $(e),
486
+ removeFile: (e) => V(e),
486
487
  clear: () => Z()
487
488
  }),
488
- [$, Z]
489
+ [V, Z]
489
490
  );
490
- Fe(We, he, d);
491
+ je(qe, ve, o);
491
492
  const S = y(
492
493
  (e) => {
493
- const s = [], a = [], t = g ? p : 1;
494
- for (const i of e) {
494
+ const s = [], n = [], t = g ? u : 1;
495
+ for (const d of e) {
495
496
  if (s.length >= t) {
496
- a.push({ file: i, reason: "too-many-files" });
497
+ n.push({ file: d, reason: "too-many-files" });
497
498
  continue;
498
499
  }
499
- if (c !== void 0 && i.size > c) {
500
- a.push({ file: i, reason: "file-too-large" });
500
+ if (c !== void 0 && d.size > c) {
501
+ n.push({ file: d, reason: "file-too-large" });
501
502
  continue;
502
503
  }
503
- if (u !== void 0 && i.size < u) {
504
- a.push({ file: i, reason: "file-too-small" });
504
+ if (l !== void 0 && d.size < l) {
505
+ n.push({ file: d, reason: "file-too-small" });
505
506
  continue;
506
507
  }
507
- if (n) {
508
- const f = de(i.name);
509
- if (!Object.entries(n).some(
510
- ([l, k]) => {
511
- const xe = l === "*/*" || l.endsWith("/*") && i.type.startsWith(l.replace("/*", "/")) || i.type === l, ke = k.length > 0 && k.some((we) => we.toLowerCase() === f);
512
- return xe || ke;
513
- }
514
- )) {
515
- a.push({ file: i, reason: "file-invalid-type" });
516
- continue;
517
- }
508
+ if (a && !de(d, a)) {
509
+ n.push({ file: d, reason: "file-invalid-type" });
510
+ continue;
518
511
  }
519
- s.push(i);
512
+ s.push(d);
520
513
  }
521
- return { accepted: s, rejected: a };
514
+ return { accepted: s, rejected: n };
522
515
  },
523
- [n, c, u, p, g]
516
+ [a, c, l, u, g]
524
517
  ), ee = y(
525
518
  (e) => {
526
519
  if (x) return;
527
520
  const s = Array.from(e.clipboardData.files);
528
521
  if (s.length > 0) {
529
522
  e.preventDefault();
530
- const { accepted: a, rejected: t } = S(s), i = t.map((f) => ({
523
+ const { accepted: n, rejected: t } = S(s), d = t.map((f) => ({
531
524
  file: f.file,
532
525
  errors: [{ code: f.reason, message: f.reason }]
533
526
  }));
534
- E(a, i);
527
+ E(n, d);
535
528
  }
536
529
  },
537
530
  [x, E, S]
538
531
  );
539
- ze(() => () => {
540
- for (const e of M.current)
532
+ we(() => () => {
533
+ for (const e of j.current)
541
534
  e.preview && URL.revokeObjectURL(e.preview);
542
535
  }, []);
543
- const se = q(() => {
536
+ const se = T(() => {
544
537
  const e = [];
545
- return n && e.push(Se(n)), c && e.push(
546
- o("inputs.fileUpload.maxSizeHint", "Max {{size}}", {
547
- size: I(c, w.language, o)
538
+ return a && e.push(Qe(a)), c && e.push(
539
+ i("inputs.fileUpload.maxSizeHint", "Max {{size}}", {
540
+ size: _(c, k.language, i)
548
541
  })
549
- ), g && p > 1 && e.push(
550
- o("inputs.fileUpload.maxFilesHint", "Up to {{count}} files", {
551
- count: p
542
+ ), g && u > 1 && e.push(
543
+ i("inputs.fileUpload.maxFilesHint", "Up to {{count}} files", {
544
+ count: u
552
545
  })
553
546
  ), e;
554
- }, [n, c, g, p, o, w.language]), te = q(() => G.map((e) => {
547
+ }, [a, c, g, u, i, k.language]), te = T(() => G.map((e) => {
555
548
  switch (e.reason) {
556
549
  case "file-too-large":
557
- return o(
550
+ return i(
558
551
  "inputs.fileUpload.errors.fileTooLarge",
559
552
  "File exceeds {{maxSize}}",
560
553
  {
561
- maxSize: c ? I(c, w.language, o) : ""
554
+ maxSize: c ? _(c, k.language, i) : ""
562
555
  }
563
556
  );
564
557
  case "file-too-small":
565
- return o(
558
+ return i(
566
559
  "inputs.fileUpload.errors.fileTooSmall",
567
560
  "File is smaller than {{minSize}}",
568
561
  {
569
- minSize: u ? I(u, w.language, o) : ""
562
+ minSize: l ? _(l, k.language, i) : ""
570
563
  }
571
564
  );
572
565
  case "file-invalid-type":
573
- return o(
566
+ return i(
574
567
  "inputs.fileUpload.errors.fileInvalidType",
575
568
  "File type not accepted"
576
569
  );
577
570
  case "too-many-files":
578
- return o(
571
+ return i(
579
572
  "inputs.fileUpload.errors.tooManyFiles",
580
573
  "Maximum {{maxFiles}} files allowed",
581
574
  {
582
- maxFiles: p
575
+ maxFiles: u
583
576
  }
584
577
  );
585
578
  }
586
- }), [G, o, c, u, p, w.language]), ve = () => R.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: R.map((e) => /* @__PURE__ */ m(
579
+ }), [G, i, c, l, u, k.language]), he = () => R.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: R.map((e) => /* @__PURE__ */ m(
587
580
  "li",
588
581
  {
589
582
  "data-file-id": e.id,
590
- className: Ke({ status: e.status }),
583
+ className: Te({ status: e.status }),
591
584
  children: [
592
585
  ce && e.preview ? /* @__PURE__ */ r(
593
586
  "img",
@@ -597,19 +590,19 @@ const es = Ne(
597
590
  "aria-hidden": "true",
598
591
  className: "ds:size-12 ds:shrink-0 ds:rounded-[var(--radius-md)] ds:object-cover ds:border ds:border-border"
599
592
  }
600
- ) : Ye(e.file),
593
+ ) : We(e.file),
601
594
  /* @__PURE__ */ m("div", { className: "ds:flex-1 ds:min-w-0", children: [
602
595
  /* @__PURE__ */ m("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
603
596
  /* @__PURE__ */ r("p", { className: "ds:truncate type-label ds:m-0", children: e.file.name }),
604
- Je(e.status)
597
+ Ge(e.status)
605
598
  ] }),
606
599
  /* @__PURE__ */ m("p", { className: "type-meta ds:text-muted-foreground ds:m-0 ds:mt-0.5", children: [
607
- I(e.file.size, w.language, o),
600
+ _(e.file.size, k.language, i),
608
601
  e.status === "uploading" && /* @__PURE__ */ m("span", { className: "ds:ms-[var(--spacing-sm)] ds:text-primary ds:font-medium", children: [
609
602
  e.progress,
610
603
  "%"
611
604
  ] }),
612
- e.status === "complete" && /* @__PURE__ */ r("span", { className: "ds:ms-[var(--spacing-sm)] ds:text-[var(--success)] ds:font-medium", children: o("inputs.fileUpload.complete", "Complete") })
605
+ 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") })
613
606
  ] }),
614
607
  e.status === "uploading" && /* @__PURE__ */ r(
615
608
  "div",
@@ -643,7 +636,7 @@ const es = Ne(
643
636
  {
644
637
  type: "button",
645
638
  onClick: () => ge(e.id),
646
- "aria-label": o("inputs.fileUpload.cancel", "Cancel upload"),
639
+ "aria-label": i("inputs.fileUpload.cancel", "Cancel upload"),
647
640
  className: oe(),
648
641
  children: /* @__PURE__ */ r(ie, { "aria-hidden": "true", className: "ds:size-4" })
649
642
  }
@@ -652,8 +645,8 @@ const es = Ne(
652
645
  "button",
653
646
  {
654
647
  type: "button",
655
- onClick: () => $(e.id),
656
- "aria-label": o("inputs.fileUpload.remove", "Remove file"),
648
+ onClick: () => V(e.id),
649
+ "aria-label": i("inputs.fileUpload.remove", "Remove file"),
657
650
  className: oe(),
658
651
  children: /* @__PURE__ */ r(ie, { "aria-hidden": "true", className: "ds:size-4" })
659
652
  }
@@ -662,13 +655,13 @@ const es = Ne(
662
655
  },
663
656
  e.id
664
657
  )) }), be = () => {
665
- if (h === "button") return null;
658
+ if (v === "button") return null;
666
659
  const e = me({
667
- className: Pe({
668
- isDragActive: C,
660
+ className: Oe({
661
+ isDragActive: M,
669
662
  hasError: pe ?? !1,
670
663
  isDisabled: x ?? !1,
671
- className: P
664
+ className: K
672
665
  }),
673
666
  tabIndex: x ? -1 : 0
674
667
  }), s = e.ref;
@@ -677,24 +670,24 @@ const es = Ne(
677
670
  {
678
671
  ...e,
679
672
  ref: (t) => {
680
- typeof s == "function" ? s(t) : s && (s.current = t), typeof j == "function" ? j(t) : j && (j.current = t);
673
+ typeof s == "function" ? s(t) : s && (s.current = t), typeof z == "function" ? z(t) : z && (z.current = t);
681
674
  },
682
675
  onPaste: ee,
683
- id: K,
684
- "aria-label": o(
676
+ id: W,
677
+ "aria-label": i(
685
678
  "inputs.fileUpload.dropHere",
686
679
  "Drop files here or click to browse"
687
680
  ),
688
- "aria-describedby": v.describedBy || void 0,
689
- "aria-invalid": v.invalid || void 0,
690
- "aria-required": v.required || void 0,
681
+ "aria-describedby": h.describedBy || void 0,
682
+ "aria-invalid": h.invalid || void 0,
683
+ "aria-required": h.required || void 0,
691
684
  "data-testid": "file-upload-dropzone",
692
685
  children: [
693
686
  /* @__PURE__ */ r(
694
687
  "input",
695
688
  {
696
689
  ...J({
697
- "aria-label": o(
690
+ "aria-label": i(
698
691
  "inputs.fileUpload.dropHere",
699
692
  "Drop files here or click to browse"
700
693
  )
@@ -702,15 +695,15 @@ const es = Ne(
702
695
  }
703
696
  ),
704
697
  /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)]", children: [
705
- /* @__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: C ? /* @__PURE__ */ r(Ie, { "aria-hidden": "true", className: "ds:size-7" }) : /* @__PURE__ */ r(T, { "aria-hidden": "true", className: "ds:size-7" }) }),
698
+ /* @__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: M ? /* @__PURE__ */ r(Ae, { "aria-hidden": "true", className: "ds:size-7" }) : /* @__PURE__ */ r(P, { "aria-hidden": "true", className: "ds:size-7" }) }),
706
699
  /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)]", children: [
707
- /* @__PURE__ */ r("p", { className: "type-label ds:text-foreground ds:text-center ds:m-0", children: C ? o("inputs.fileUpload.dropActive", "Drop files here") : o(
700
+ /* @__PURE__ */ r("p", { className: "type-label ds:text-foreground ds:text-center ds:m-0", children: M ? i("inputs.fileUpload.dropActive", "Drop files here") : i(
708
701
  "inputs.fileUpload.dropHere",
709
702
  "Drop files here or click to browse"
710
703
  ) }),
711
- se.length > 0 && !C && /* @__PURE__ */ r("p", { className: "type-meta ds:text-muted-foreground ds:text-center ds:m-0", children: se.join(" · ") })
704
+ se.length > 0 && !M && /* @__PURE__ */ r("p", { className: "type-meta ds:text-muted-foreground ds:text-center ds:m-0", children: se.join(" · ") })
712
705
  ] }),
713
- h === "both" && !C && /* @__PURE__ */ m(
706
+ v === "both" && !M && /* @__PURE__ */ m(
714
707
  "button",
715
708
  {
716
709
  type: "button",
@@ -722,8 +715,8 @@ const es = Ne(
722
715
  className: "ds:mt-[var(--spacing-xs)]"
723
716
  }),
724
717
  children: [
725
- /* @__PURE__ */ r(T, { "aria-hidden": "true", className: "ds:size-4" }),
726
- o("inputs.fileUpload.browse", "Browse files")
718
+ /* @__PURE__ */ r(P, { "aria-hidden": "true", className: "ds:size-4" }),
719
+ i("inputs.fileUpload.browse", "Browse files")
727
720
  ]
728
721
  }
729
722
  )
@@ -731,12 +724,12 @@ const es = Ne(
731
724
  ]
732
725
  }
733
726
  );
734
- }, ye = () => h === "dropzone" ? null : h === "button" ? /* @__PURE__ */ m("div", { onPaste: ee, ref: j, children: [
727
+ }, ye = () => v === "dropzone" ? null : v === "button" ? /* @__PURE__ */ m("div", { onPaste: ee, ref: z, children: [
735
728
  /* @__PURE__ */ r(
736
729
  "input",
737
730
  {
738
731
  ...J({
739
- "aria-label": o("inputs.fileUpload.browse", "Browse files")
732
+ "aria-label": i("inputs.fileUpload.browse", "Browse files")
740
733
  })
741
734
  }
742
735
  ),
@@ -746,22 +739,22 @@ const es = Ne(
746
739
  type: "button",
747
740
  onClick: Q,
748
741
  disabled: x,
749
- className: ae({ className: P }),
750
- id: h === "button" ? K : void 0,
751
- "aria-describedby": h === "button" && v.describedBy || void 0,
752
- "aria-invalid": h === "button" && v.invalid || void 0,
753
- "aria-required": h === "button" && v.required || void 0,
742
+ className: ae({ className: K }),
743
+ id: v === "button" ? W : void 0,
744
+ "aria-describedby": v === "button" && h.describedBy || void 0,
745
+ "aria-invalid": v === "button" && h.invalid || void 0,
746
+ "aria-required": v === "button" && h.required || void 0,
754
747
  children: [
755
- /* @__PURE__ */ r(T, { "aria-hidden": "true", className: "ds:size-4" }),
756
- o("inputs.fileUpload.browse", "Browse files")
748
+ /* @__PURE__ */ r(P, { "aria-hidden": "true", className: "ds:size-4" }),
749
+ i("inputs.fileUpload.browse", "Browse files")
757
750
  ]
758
751
  }
759
752
  )
760
753
  ] }) : null;
761
- return /* @__PURE__ */ m("div", { "data-component": "file-upload", "data-component-id": d, children: [
754
+ return /* @__PURE__ */ m("div", { "data-component": "file-upload", "data-component-id": o, children: [
762
755
  be(),
763
756
  ye(),
764
- ve(),
757
+ he(),
765
758
  te.length > 0 && /* @__PURE__ */ r(
766
759
  "div",
767
760
  {
@@ -789,7 +782,7 @@ const es = Ne(
789
782
  /* @__PURE__ */ r(
790
783
  "span",
791
784
  {
792
- ref: O,
785
+ ref: $,
793
786
  role: "status",
794
787
  "aria-live": "polite",
795
788
  className: "ds:sr-only"
@@ -798,9 +791,9 @@ const es = Ne(
798
791
  ] });
799
792
  }
800
793
  );
801
- es.displayName = "FileUpload";
794
+ Ze.displayName = "FileUpload";
802
795
  export {
803
- es as F,
804
- We as f
796
+ Ze as F,
797
+ qe as f
805
798
  };
806
- //# sourceMappingURL=file-upload-DxAQprcU.js.map
799
+ //# sourceMappingURL=file-upload-CdozCPct.js.map