@alfadocs/ui-kit 0.73.0 → 0.77.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 (199) hide show
  1. package/dist/_chunks/actions-cell-renderer-DLrcSTK_.js +1546 -0
  2. package/dist/_chunks/{address-fields-COyjgqxA.js → address-fields-7k59FnJ6.js} +2 -2
  3. package/dist/_chunks/{ai-prompt-input-DFm58UjY.js → ai-prompt-input-DziJCGLe.js} +2 -2
  4. package/dist/_chunks/{audio-recorder-CjAY0GAc.js → audio-recorder-Cc3KuL9y.js} +2 -2
  5. package/dist/_chunks/{bishop-score-Bs6t6Zv1.js → bishop-score-DDW5-gb9.js} +2 -2
  6. package/dist/_chunks/{booking-CWnZhZ5g.js → booking-CLmeXtGv.js} +3 -3
  7. package/dist/_chunks/{care-plan-card-CfIP3Vc1.js → care-plan-card-BrwhyIJI.js} +2 -2
  8. package/dist/_chunks/{care-plan-entry-card-CRbS-G00.js → care-plan-entry-card-DWEdCQM3.js} +2 -2
  9. package/dist/_chunks/{country-select-DYHDLEjG.js → country-select-BN9nedAp.js} +2 -2
  10. package/dist/_chunks/data-table-tabs-BEUXiRlu.js +710 -0
  11. package/dist/_chunks/document-preview-CvHnHf6T.js +243 -0
  12. package/dist/_chunks/{document-scanner-BE6Jz4Ob.js → document-scanner-B6h1Ir56.js} +2 -2
  13. package/dist/_chunks/{field-value-DCXJXKab.js → field-value-DHG6gEKS.js} +2 -2
  14. package/dist/_chunks/file-Cwe9VC1A.js +40 -0
  15. package/dist/_chunks/file-manager-DfTG7bxx.js +1771 -0
  16. package/dist/_chunks/{file-upload-B2SXhRiN.js → file-upload-DENvuhfs.js} +98 -129
  17. package/dist/_chunks/flag-Cnmivlrl.js +641 -0
  18. package/dist/_chunks/{gestational-age-calculator-C9Dfis4I.js → gestational-age-calculator-BpYw-WF-.js} +2 -2
  19. package/dist/_chunks/{header-settings-CRQDCYgr.js → header-settings-DMfdx0Vq.js} +2 -2
  20. package/dist/_chunks/{icon-picker-BePK27S-.js → icon-picker-CM9ubkew.js} +2 -2
  21. package/dist/_chunks/link-cell-renderer-BQGUs45d.js +711 -0
  22. package/dist/_chunks/{locale-picker-Cbfqc0_N.js → locale-picker-EyvPrwDc.js} +3 -3
  23. package/dist/_chunks/{marketplace-app-shell-Dm6S-hun.js → marketplace-app-shell-Bxq1PYAj.js} +3 -3
  24. package/dist/_chunks/{muscle-scheme-B9MIkuj0.js → muscle-scheme-CFBE2dme.js} +6 -14
  25. package/dist/_chunks/{notes-panel-B_8-Mebz.js → notes-panel-Cvdp818a.js} +2 -2
  26. package/dist/_chunks/{optical-prescription-BQ75_kf6.js → optical-prescription-BEjYQjiO.js} +2 -2
  27. package/dist/_chunks/{patient-details-JkOI3Ijd.js → patient-details-zy76MRh7.js} +5 -5
  28. package/dist/_chunks/{patient-summary-card-CQOLMH3E.js → patient-summary-card-D6kgdTNn.js} +2 -2
  29. package/dist/_chunks/{patient-table-B_mOe-ZT.js → patient-table-DweKjiXg.js} +122 -118
  30. package/dist/_chunks/periodontal-chart-CYBhr9vc.js +1305 -0
  31. package/dist/_chunks/periodontal-diagnosis-cco40xTa.js +345 -0
  32. package/dist/_chunks/periodontal-risk-chart-bUGkMwDg.js +334 -0
  33. package/dist/_chunks/{phone-input-dtnrvnZf.js → phone-input-D00ZBAm-.js} +2 -2
  34. package/dist/_chunks/{popover-DGTKfLWh.js → popover-Cc0a69sw.js} +31 -28
  35. package/dist/_chunks/{pregnancy-dating-IsDVfqJX.js → pregnancy-dating-msMl_6wz.js} +2 -2
  36. package/dist/_chunks/{radiograph-panel.agent-e488ooH8.js → radiograph-panel.agent-CxF9pVxd.js} +2 -2
  37. package/dist/_chunks/{rich-text-editor-CgA2bYwi.js → rich-text-editor-CCWjNkbx.js} +186 -177
  38. package/dist/_chunks/{select-BmCbJMJS.js → select-BW5ecXlX.js} +13 -13
  39. package/dist/_chunks/{sidebar-CtU35PIX.js → sidebar-C0PbwJBc.js} +357 -320
  40. package/dist/_chunks/signature-request-C-mskXwi.js +318 -0
  41. package/dist/_chunks/{tabs-DVQ941Sj.js → tabs-CVTukWRD.js} +2 -2
  42. package/dist/_chunks/{tasks-panel-LCK5ZXvU.js → tasks-panel-CjGAhIN8.js} +2 -2
  43. package/dist/_chunks/tooth-data-BwuoKFf4.js +660 -0
  44. package/dist/_chunks/tooth-scheme-BzJ6rcte.js +1483 -0
  45. package/dist/_chunks/{unit-converter-3uL_tMCm.js → unit-converter-CSLWFDQh.js} +2 -2
  46. package/dist/agent-catalog.json +1430 -213
  47. package/dist/agent-i18n/en.json +86 -5
  48. package/dist/components/_shared/entity-card/entity-card.d.ts +1 -1
  49. package/dist/components/address-fields/index.js +1 -1
  50. package/dist/components/ai-prompt-input/index.js +1 -1
  51. package/dist/components/anamnesis-card/anamnesis-card.d.ts +1 -1
  52. package/dist/components/appointment-card/appointment-card.d.ts +1 -1
  53. package/dist/components/audio-recorder/index.js +1 -1
  54. package/dist/components/bishop-score/index.js +1 -1
  55. package/dist/components/booking/index.js +1 -1
  56. package/dist/components/card/card.d.ts +1 -1
  57. package/dist/components/care-plan-card/index.js +1 -1
  58. package/dist/components/care-plan-entry-card/index.js +1 -1
  59. package/dist/components/clinical-note-card/clinical-note-card.d.ts +1 -1
  60. package/dist/components/contact-profile-card/contact-profile-card.d.ts +1 -1
  61. package/dist/components/country-select/index.js +1 -1
  62. package/dist/components/data-table/index.js +35 -34
  63. package/dist/components/data-table/toolbar.d.ts +1 -1
  64. package/dist/components/data-table-tabs/data-table-tabs.agent.d.ts +4 -0
  65. package/dist/components/data-table-tabs/data-table-tabs.d.ts +93 -0
  66. package/dist/components/data-table-tabs/index.d.ts +5 -0
  67. package/dist/components/data-table-tabs/index.js +8 -0
  68. package/dist/components/data-table-tabs/use-data-table-filter-tabs.d.ts +63 -0
  69. package/dist/components/document-preview/document-preview.agent.d.ts +4 -0
  70. package/dist/components/document-preview/document-preview.d.ts +64 -0
  71. package/dist/components/document-preview/index.d.ts +4 -0
  72. package/dist/components/document-preview/index.js +6 -0
  73. package/dist/components/document-scanner/index.js +1 -1
  74. package/dist/components/file-manager/dialogs.d.ts +48 -0
  75. package/dist/components/file-manager/file-manager.agent.d.ts +4 -0
  76. package/dist/components/file-manager/file-manager.d.ts +82 -0
  77. package/dist/components/file-manager/folder-tree.d.ts +12 -0
  78. package/dist/components/file-manager/index.d.ts +5 -0
  79. package/dist/components/file-manager/index.js +6 -0
  80. package/dist/components/file-manager/list-view.d.ts +49 -0
  81. package/dist/components/file-manager/toolbar.d.ts +15 -0
  82. package/dist/components/file-manager/types.d.ts +167 -0
  83. package/dist/components/file-manager/utils.d.ts +34 -0
  84. package/dist/components/file-upload/index.js +1 -1
  85. package/dist/components/flag/index.js +1 -1
  86. package/dist/components/gestational-age-calculator/index.js +1 -1
  87. package/dist/components/header-settings/index.js +1 -1
  88. package/dist/components/icon-picker/index.js +1 -1
  89. package/dist/components/index.d.ts +7 -0
  90. package/dist/components/locale-picker/index.js +1 -1
  91. package/dist/components/message-card/message-card.d.ts +1 -1
  92. package/dist/components/muscle-scheme/index.js +1 -1
  93. package/dist/components/notes-panel/index.js +1 -1
  94. package/dist/components/notification-card/notification-card.d.ts +1 -1
  95. package/dist/components/operator-hero/operator-hero.d.ts +1 -1
  96. package/dist/components/optical-prescription/index.js +1 -1
  97. package/dist/components/patient-details/index.js +1 -1
  98. package/dist/components/patient-summary-card/index.js +1 -1
  99. package/dist/components/patient-summary-card/patient-summary-card.d.ts +1 -1
  100. package/dist/components/patient-table/index.js +1 -1
  101. package/dist/components/payment-card/payment-card.d.ts +1 -1
  102. package/dist/components/payment-card/payment-request-card.d.ts +1 -1
  103. package/dist/components/periodontal-chart/index.d.ts +6 -0
  104. package/dist/components/periodontal-chart/index.js +23 -0
  105. package/dist/components/periodontal-chart/periodontal-chart-data.d.ts +164 -0
  106. package/dist/components/periodontal-chart/periodontal-chart.agent.d.ts +4 -0
  107. package/dist/components/periodontal-chart/periodontal-chart.d.ts +71 -0
  108. package/dist/components/periodontal-chart-card/periodontal-chart-card.d.ts +1 -1
  109. package/dist/components/periodontal-diagnosis/index.d.ts +6 -0
  110. package/dist/components/periodontal-diagnosis/index.js +13 -0
  111. package/dist/components/periodontal-diagnosis/periodontal-diagnosis-data.d.ts +30 -0
  112. package/dist/components/periodontal-diagnosis/periodontal-diagnosis.agent.d.ts +4 -0
  113. package/dist/components/periodontal-diagnosis/periodontal-diagnosis.d.ts +44 -0
  114. package/dist/components/periodontal-risk-chart/index.d.ts +6 -0
  115. package/dist/components/periodontal-risk-chart/index.js +9 -0
  116. package/dist/components/periodontal-risk-chart/periodontal-risk-chart.agent.d.ts +4 -0
  117. package/dist/components/periodontal-risk-chart/periodontal-risk-chart.d.ts +28 -0
  118. package/dist/components/periodontal-risk-chart/periodontal-risk-data.d.ts +47 -0
  119. package/dist/components/phone-input/index.js +1 -1
  120. package/dist/components/popover/index.js +1 -1
  121. package/dist/components/popover/popover.d.ts +1 -0
  122. package/dist/components/pregnancy-dating/index.js +1 -1
  123. package/dist/components/product-hub-tray/product-hub-panel.d.ts +1 -1
  124. package/dist/components/radiograph-panel/index.js +1 -1
  125. package/dist/components/rich-text-editor/index.js +1 -1
  126. package/dist/components/select/index.js +1 -1
  127. package/dist/components/sidebar/index.js +1 -1
  128. package/dist/components/sidebar/sidebar.d.ts +9 -0
  129. package/dist/components/skeleton-scheme/index.js +5 -13
  130. package/dist/components/stat/stat.d.ts +1 -1
  131. package/dist/components/tabs/index.js +1 -1
  132. package/dist/components/tasks-panel/index.js +1 -1
  133. package/dist/components/tooth-scheme/index.js +29 -28
  134. package/dist/components/unit-converter/index.js +1 -1
  135. package/dist/i18n/locales/ar.d.ts +321 -0
  136. package/dist/i18n/locales/ar.js +321 -0
  137. package/dist/i18n/locales/de.d.ts +321 -0
  138. package/dist/i18n/locales/de.js +321 -0
  139. package/dist/i18n/locales/el.d.ts +321 -0
  140. package/dist/i18n/locales/el.js +321 -0
  141. package/dist/i18n/locales/en.d.ts +321 -0
  142. package/dist/i18n/locales/en.js +321 -0
  143. package/dist/i18n/locales/es.d.ts +321 -0
  144. package/dist/i18n/locales/es.js +321 -0
  145. package/dist/i18n/locales/fr.d.ts +321 -0
  146. package/dist/i18n/locales/fr.js +321 -0
  147. package/dist/i18n/locales/hi.d.ts +321 -0
  148. package/dist/i18n/locales/hi.js +321 -0
  149. package/dist/i18n/locales/it.d.ts +321 -0
  150. package/dist/i18n/locales/it.js +321 -0
  151. package/dist/i18n/locales/ja.d.ts +321 -0
  152. package/dist/i18n/locales/ja.js +321 -0
  153. package/dist/i18n/locales/nl.d.ts +321 -0
  154. package/dist/i18n/locales/nl.js +321 -0
  155. package/dist/i18n/locales/pl.d.ts +321 -0
  156. package/dist/i18n/locales/pl.js +321 -0
  157. package/dist/i18n/locales/pt.d.ts +321 -0
  158. package/dist/i18n/locales/pt.js +321 -0
  159. package/dist/i18n/locales/ro.d.ts +321 -0
  160. package/dist/i18n/locales/ro.js +321 -0
  161. package/dist/i18n/locales/ru.d.ts +321 -0
  162. package/dist/i18n/locales/ru.js +321 -0
  163. package/dist/i18n/locales/sq.d.ts +321 -0
  164. package/dist/i18n/locales/sq.js +321 -0
  165. package/dist/i18n/locales/sv.d.ts +321 -0
  166. package/dist/i18n/locales/sv.js +321 -0
  167. package/dist/i18n/locales/tr.d.ts +321 -0
  168. package/dist/i18n/locales/tr.js +321 -0
  169. package/dist/i18n/locales/zh.d.ts +321 -0
  170. package/dist/i18n/locales/zh.js +321 -0
  171. package/dist/index.js +834 -783
  172. package/dist/locales/ar.json +321 -0
  173. package/dist/locales/de.json +321 -0
  174. package/dist/locales/el.json +321 -0
  175. package/dist/locales/en.json +321 -0
  176. package/dist/locales/es.json +321 -0
  177. package/dist/locales/fr.json +321 -0
  178. package/dist/locales/hi.json +321 -0
  179. package/dist/locales/it.json +321 -0
  180. package/dist/locales/ja.json +321 -0
  181. package/dist/locales/nl.json +321 -0
  182. package/dist/locales/pl.json +321 -0
  183. package/dist/locales/pt.json +321 -0
  184. package/dist/locales/ro.json +321 -0
  185. package/dist/locales/ru.json +321 -0
  186. package/dist/locales/sq.json +321 -0
  187. package/dist/locales/sv.json +321 -0
  188. package/dist/locales/tr.json +321 -0
  189. package/dist/locales/zh.json +321 -0
  190. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  191. package/dist/patterns/signature-request/index.d.ts +3 -0
  192. package/dist/patterns/signature-request/index.js +5 -0
  193. package/dist/patterns/signature-request/signature-request.d.ts +81 -0
  194. package/dist/tokens.css +1 -1
  195. package/package.json +29 -1
  196. package/dist/_chunks/columns-2-8lq4-b8e.js +0 -15
  197. package/dist/_chunks/flag-DZ6V7-hU.js +0 -637
  198. package/dist/_chunks/link-cell-renderer-CLI7sBkX.js +0 -2210
  199. package/dist/_chunks/tooth-scheme-CX49GycY.js +0 -2133
@@ -1,35 +1,36 @@
1
1
  import { jsxs as m, jsx as r } from "react/jsx-runtime";
2
- import { forwardRef as xe, useId as we, useState as re, useRef as O, useCallback as y, useMemo as T, useEffect as ke } from "react";
3
- import { u as Ue } from "./index-BcMWc8W2.js";
4
- import { c as _ } from "./index-D2ZczOXr.js";
2
+ import { forwardRef as xe, useId as Ue, useState as re, useRef as T, useCallback as y, useMemo as V, useEffect as we } from "react";
3
+ import { u as ke } from "./index-BcMWc8W2.js";
4
+ import { c as B } from "./index-D2ZczOXr.js";
5
5
  import { useTranslation as Ne } from "react-i18next";
6
6
  import { u as ze } from "./form-field-context-B3APVHKx.js";
7
7
  import { u as je } from "./registry-DvAUVLHh.js";
8
8
  import { C as le } from "./circle-alert-rGDZ73Wh.js";
9
- import { c as F } from "./createLucideIcon-DhHxpK9K.js";
10
- import { U as K } from "./upload-BfT2hzMg.js";
9
+ import { c as K } from "./createLucideIcon-DhHxpK9K.js";
10
+ import { U as $ } from "./upload-BfT2hzMg.js";
11
11
  import { X as ie } from "./x-B5YnXwCz.js";
12
12
  import { F as Fe } from "./file-text-5yv6r2ls.js";
13
13
  import { F as Ce } from "./file-spreadsheet-DmwyfV4O.js";
14
- import { C as Me } from "./circle-check-BN6rz4NV.js";
14
+ import { F as Le, a as Me } from "./file-Cwe9VC1A.js";
15
+ import { C as Re } from "./circle-check-BN6rz4NV.js";
15
16
  /**
16
17
  * @license lucide-react v1.22.0 - ISC
17
18
  *
18
19
  * This source code is licensed under the ISC license.
19
20
  * See the LICENSE file in the root directory of this source tree.
20
21
  */
21
- const Le = [
22
+ const Ae = [
22
23
  ["path", { d: "M12 13v8", key: "1l5pq0" }],
23
24
  ["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" }],
24
25
  ["path", { d: "m8 17 4-4 4 4", key: "1quai1" }]
25
- ], Ae = F("cloud-upload", Le);
26
+ ], Ie = K("cloud-upload", Ae);
26
27
  /**
27
28
  * @license lucide-react v1.22.0 - ISC
28
29
  *
29
30
  * This source code is licensed under the ISC license.
30
31
  * See the LICENSE file in the root directory of this source tree.
31
32
  */
32
- const Re = [
33
+ const De = [
33
34
  [
34
35
  "path",
35
36
  {
@@ -42,48 +43,14 @@ const Re = [
42
43
  ["path", { d: "M8 18v-2", key: "qcmpov" }],
43
44
  ["path", { d: "M8 7V6", key: "1nbb54" }],
44
45
  ["circle", { cx: "8", cy: "20", r: "2", key: "ckkr5m" }]
45
- ], Ie = F("file-archive", Re);
46
+ ], Be = K("file-archive", De);
46
47
  /**
47
48
  * @license lucide-react v1.22.0 - ISC
48
49
  *
49
50
  * This source code is licensed under the ISC license.
50
51
  * See the LICENSE file in the root directory of this source tree.
51
52
  */
52
- const De = [
53
- [
54
- "path",
55
- {
56
- d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
57
- key: "1oefj6"
58
- }
59
- ],
60
- ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
61
- ["circle", { cx: "10", cy: "12", r: "2", key: "737tya" }],
62
- ["path", { d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22", key: "wt3hpn" }]
63
- ], Be = F("file-image", De);
64
- /**
65
- * @license lucide-react v1.22.0 - ISC
66
- *
67
- * This source code is licensed under the ISC license.
68
- * See the LICENSE file in the root directory of this source tree.
69
- */
70
- const _e = [
71
- [
72
- "path",
73
- {
74
- d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
75
- key: "1oefj6"
76
- }
77
- ],
78
- ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
79
- ], He = F("file", _e);
80
- /**
81
- * @license lucide-react v1.22.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */
86
- const Ee = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Ve = F("loader-circle", Ee), $e = {
53
+ const He = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Ee = K("loader-circle", He), qe = {
87
54
  id: "file-upload",
88
55
  capabilities: ["dismiss"],
89
56
  state: {
@@ -140,7 +107,7 @@ const Ee = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Ve =
140
107
  description: "Each tracked file emits its id as data-file-id."
141
108
  }
142
109
  }
143
- }, qe = _(
110
+ }, Oe = B(
144
111
  [
145
112
  "ds:relative ds:flex ds:flex-col ds:items-center ds:justify-center",
146
113
  "ds:min-h-48 ds:px-[var(--spacing-lg)] ds:py-[var(--spacing-xl)]",
@@ -173,7 +140,7 @@ const Ee = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Ve =
173
140
  isDisabled: !1
174
141
  }
175
142
  }
176
- ), ae = _(
143
+ ), ae = B(
177
144
  [
178
145
  "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
179
146
  // Full-width on phone so the affordance stacks cleanly; natural width
@@ -189,7 +156,7 @@ const Ee = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Ve =
189
156
  "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
190
157
  "ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
191
158
  ].join(" ")
192
- ), Oe = _(
159
+ ), _e = B(
193
160
  [
194
161
  "ds:flex ds:items-center ds:gap-[var(--spacing-md)]",
195
162
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)] ds:bg-background",
@@ -210,7 +177,7 @@ const Ee = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Ve =
210
177
  status: "pending"
211
178
  }
212
179
  }
213
- ), oe = _(
180
+ ), oe = B(
214
181
  [
215
182
  "ds:inline-flex ds:items-center ds:justify-center",
216
183
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
@@ -225,10 +192,10 @@ const Ee = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Ve =
225
192
  function Te() {
226
193
  return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : `${Date.now()}-${Math.random().toString(36).slice(2, 11)}`;
227
194
  }
228
- function Ke(o) {
195
+ function Ve(o) {
229
196
  return o.type.startsWith("image/");
230
197
  }
231
- function Pe(o) {
198
+ function $e(o) {
232
199
  var c;
233
200
  const a = ((c = o.name.split(".").pop()) == null ? void 0 : c.toLowerCase()) ?? "";
234
201
  return ["pdf", "doc", "docx", "txt", "rtf"].includes(a) ? /* @__PURE__ */ r(
@@ -238,7 +205,7 @@ function Pe(o) {
238
205
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
239
206
  }
240
207
  ) : ["zip", "rar", "7z", "tar", "gz"].includes(a) ? /* @__PURE__ */ r(
241
- Ie,
208
+ Be,
242
209
  {
243
210
  "aria-hidden": "true",
244
211
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
@@ -250,24 +217,24 @@ function Pe(o) {
250
217
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
251
218
  }
252
219
  ) : ["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"].includes(a) ? /* @__PURE__ */ r(
253
- Be,
220
+ Le,
254
221
  {
255
222
  "aria-hidden": "true",
256
223
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
257
224
  }
258
225
  ) : /* @__PURE__ */ r(
259
- He,
226
+ Me,
260
227
  {
261
228
  "aria-hidden": "true",
262
229
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
263
230
  }
264
231
  );
265
232
  }
266
- function We(o) {
233
+ function Ke(o) {
267
234
  switch (o) {
268
235
  case "uploading":
269
236
  return /* @__PURE__ */ r(
270
- Ve,
237
+ Ee,
271
238
  {
272
239
  "aria-hidden": "true",
273
240
  className: "ds:size-4 ds:shrink-0 ds:text-primary ds:animate-spin"
@@ -275,7 +242,7 @@ function We(o) {
275
242
  );
276
243
  case "complete":
277
244
  return /* @__PURE__ */ r(
278
- Me,
245
+ Re,
279
246
  {
280
247
  "aria-hidden": "true",
281
248
  className: "ds:size-4 ds:shrink-0 ds:text-[var(--success)]"
@@ -293,22 +260,22 @@ function We(o) {
293
260
  return null;
294
261
  }
295
262
  }
296
- const Ge = [
263
+ const Pe = [
297
264
  "inputs.fileUpload.units.bytes",
298
265
  "inputs.fileUpload.units.kilobytes",
299
266
  "inputs.fileUpload.units.megabytes",
300
267
  "inputs.fileUpload.units.gigabytes"
301
268
  ], de = ["B", "KB", "MB", "GB"];
302
- function B(o, a, c) {
269
+ function D(o, a, c) {
303
270
  let l = o, u = 0;
304
271
  for (; l >= 1024 && u < de.length - 1; )
305
272
  l /= 1024, u++;
306
273
  const g = new Intl.NumberFormat(a, {
307
274
  maximumFractionDigits: u === 0 ? 0 : 1
308
- }).format(l), U = c(Ge[u], de[u]);
309
- return `${g} ${U}`;
275
+ }).format(l), k = c(Pe[u], de[u]);
276
+ return `${g} ${k}`;
310
277
  }
311
- function Xe(o) {
278
+ function We(o) {
312
279
  switch (o) {
313
280
  case "file-too-large":
314
281
  return "file-too-large";
@@ -322,19 +289,19 @@ function Xe(o) {
322
289
  return "file-invalid-type";
323
290
  }
324
291
  }
325
- function Ye(o) {
292
+ function Ge(o) {
326
293
  const a = o.split(".");
327
294
  return a.length > 1 ? `.${a.pop().toLowerCase()}` : "";
328
295
  }
329
296
  function ne(o, a) {
330
- const c = Ye(o.name);
297
+ const c = Ge(o.name);
331
298
  for (const [l, u] of Object.entries(a)) {
332
- const g = l === "*/*" || l.endsWith("/*") && o.type.startsWith(l.replace("/*", "/")) || o.type === l, U = u.length === 0 || u.some((C) => C.toLowerCase() === c);
333
- if (g && U) return !0;
299
+ const g = l === "*/*" || l.endsWith("/*") && o.type.startsWith(l.replace("/*", "/")) || o.type === l, k = u.length === 0 || u.some((F) => F.toLowerCase() === c);
300
+ if (g && k) return !0;
334
301
  }
335
302
  return !1;
336
303
  }
337
- function Je(o) {
304
+ function Xe(o) {
338
305
  const a = [];
339
306
  for (const l of Object.values(o))
340
307
  for (const u of l)
@@ -345,7 +312,7 @@ function Je(o) {
345
312
  l.endsWith("/*") ? c.push(l.replace("/*", "").split("/").pop() ?? l) : c.push(l.split("/").pop() ?? l);
346
313
  return c.join(", ");
347
314
  }
348
- const Qe = xe(
315
+ const Ye = xe(
349
316
  ({
350
317
  id: o,
351
318
  accept: a,
@@ -353,32 +320,32 @@ const Qe = xe(
353
320
  minSize: l,
354
321
  maxFiles: u = 1,
355
322
  multiple: g = !1,
356
- disabled: U,
357
- strictAccept: C = !1,
358
- onDrop: M,
323
+ disabled: k,
324
+ strictAccept: F = !1,
325
+ onDrop: C,
359
326
  onUpload: H,
360
327
  onRemove: L,
361
- onReject: A,
328
+ onReject: M,
362
329
  variant: v = "both",
363
330
  showPreview: ce = !0,
364
331
  className: P
365
332
  }, N) => {
366
- const { t: i, i18n: w } = Ne(), h = ze(), ue = we(), x = h.disabled || U, pe = h.invalid, W = h.id || ue, [R, b] = re([]), [G, fe] = re([]), I = O(/* @__PURE__ */ new Map()), E = O(null), z = O(R);
333
+ const { t: i, i18n: U } = Ne(), h = ze(), ue = Ue(), x = h.disabled || k, pe = h.invalid, W = h.id || ue, [R, b] = re([]), [G, fe] = re([]), A = T(/* @__PURE__ */ new Map()), E = T(null), z = T(R);
367
334
  z.current = R;
368
- const k = y((e) => {
335
+ const w = y((e) => {
369
336
  E.current && (E.current.textContent = e);
370
337
  }, []), X = y(
371
- (e) => !C || !a ? !0 : ne(e, a),
372
- [C, a]
338
+ (e) => !F || !a ? !0 : ne(e, a),
339
+ [F, a]
373
340
  ), Y = y(
374
341
  async (e) => {
375
342
  if (!H) return;
376
343
  const s = new AbortController();
377
- I.current.set(e.id, s), b(
344
+ A.current.set(e.id, s), b(
378
345
  (d) => d.map(
379
346
  (t) => t.id === e.id ? { ...t, status: "uploading", progress: 0 } : t
380
347
  )
381
- ), k(i("inputs.fileUpload.uploading", "Uploading…"));
348
+ ), w(i("inputs.fileUpload.uploading", "Uploading…"));
382
349
  try {
383
350
  await H(e.file, {
384
351
  signal: s.signal,
@@ -387,7 +354,7 @@ const Qe = xe(
387
354
  (t) => t.map(
388
355
  (n) => n.id === e.id ? { ...n, progress: d } : n
389
356
  )
390
- ), k(
357
+ ), w(
391
358
  i("inputs.fileUpload.progress", "{{percent}}% uploaded", {
392
359
  percent: d
393
360
  })
@@ -397,7 +364,7 @@ const Qe = xe(
397
364
  (d) => d.map(
398
365
  (t) => t.id === e.id ? { ...t, status: "complete", progress: 100 } : t
399
366
  )
400
- ), k(i("inputs.fileUpload.complete", "Upload complete"));
367
+ ), w(i("inputs.fileUpload.complete", "Upload complete"));
401
368
  } catch (d) {
402
369
  if (s.signal.aborted) {
403
370
  b((n) => n.filter((f) => f.id !== e.id));
@@ -410,71 +377,71 @@ const Qe = xe(
410
377
  )
411
378
  );
412
379
  } finally {
413
- I.current.delete(e.id);
380
+ A.current.delete(e.id);
414
381
  }
415
382
  },
416
- [H, k, i]
417
- ), V = y(
383
+ [H, w, i]
384
+ ), q = y(
418
385
  (e, s) => {
419
386
  const d = s.flatMap(
420
- (p) => p.errors.map((D) => ({
387
+ (p) => p.errors.map((I) => ({
421
388
  file: p.file,
422
- reason: Xe(D.code)
389
+ reason: We(I.code)
423
390
  }))
424
391
  ), t = [], n = [];
425
392
  for (const p of e)
426
393
  X(p) ? n.push(p) : t.push({ file: p, reason: "file-invalid-type" });
427
394
  const f = [...d, ...t];
428
- fe(f), f.length > 0 && (A == null || A(f));
429
- const q = n.map((p) => ({
395
+ fe(f), f.length > 0 && (M == null || M(f));
396
+ const _ = n.map((p) => ({
430
397
  file: p,
431
398
  id: Te(),
432
399
  status: "pending",
433
400
  progress: 0,
434
- preview: Ke(p) ? URL.createObjectURL(p) : void 0
401
+ preview: Ve(p) ? URL.createObjectURL(p) : void 0
435
402
  }));
436
403
  b((p) => {
437
404
  if (!g && u === 1) {
438
- for (const D of p)
439
- D.preview && URL.revokeObjectURL(D.preview);
440
- return q;
405
+ for (const I of p)
406
+ I.preview && URL.revokeObjectURL(I.preview);
407
+ return _;
441
408
  }
442
- return [...p, ...q];
443
- }), M == null || M(n, f), k(
409
+ return [...p, ..._];
410
+ }), C == null || C(n, f), w(
444
411
  i("inputs.fileUpload.filesSelected", "{{count}} file(s) selected", {
445
412
  count: n.length
446
413
  })
447
414
  );
448
- for (const p of q)
415
+ for (const p of _)
449
416
  Y(p);
450
417
  },
451
418
  [
452
419
  g,
453
420
  u,
421
+ C,
454
422
  M,
455
- A,
456
423
  X,
457
- k,
424
+ w,
458
425
  Y,
459
426
  i
460
427
  ]
461
- ), { getRootProps: me, getInputProps: J, isDragActive: j, open: Q } = Ue({
428
+ ), { getRootProps: me, getInputProps: J, isDragActive: j, open: Q } = ke({
462
429
  accept: a,
463
430
  maxSize: c,
464
431
  minSize: l,
465
432
  maxFiles: g ? u : 1,
466
433
  multiple: g,
467
434
  disabled: x,
468
- onDrop: V,
435
+ onDrop: q,
469
436
  noClick: v === "button",
470
437
  noKeyboard: v === "button"
471
438
  }), ge = y((e) => {
472
- const s = I.current.get(e);
439
+ const s = A.current.get(e);
473
440
  s == null || s.abort(), b((d) => {
474
441
  const t = d.find((n) => n.id === e);
475
442
  return t != null && t.preview && URL.revokeObjectURL(t.preview), d.filter((n) => n.id !== e);
476
443
  });
477
- }, []), $ = y(
444
+ }, []), O = y(
478
445
  (e) => {
479
446
  const s = z.current.find((d) => d.id === e);
480
447
  s != null && s.preview && URL.revokeObjectURL(s.preview), b((d) => d.filter((t) => t.id !== e)), s && (L == null || L(s));
@@ -482,11 +449,11 @@ const Qe = xe(
482
449
  [L]
483
450
  ), Z = y(() => {
484
451
  for (const e of z.current) {
485
- const s = I.current.get(e.id);
452
+ const s = A.current.get(e.id);
486
453
  s == null || s.abort(), e.preview && URL.revokeObjectURL(e.preview);
487
454
  }
488
455
  b([]);
489
- }, []), ve = T(
456
+ }, []), ve = V(
490
457
  () => ({
491
458
  getFiles: () => z.current.map((e) => ({
492
459
  id: e.id,
@@ -494,12 +461,12 @@ const Qe = xe(
494
461
  size: e.file.size,
495
462
  status: e.status
496
463
  })),
497
- removeFile: (e) => $(e),
464
+ removeFile: (e) => O(e),
498
465
  clear: () => Z()
499
466
  }),
500
- [$, Z]
467
+ [O, Z]
501
468
  );
502
- je($e, ve, o);
469
+ je(qe, ve, o);
503
470
  const S = y(
504
471
  (e) => {
505
472
  const s = [], d = [], t = g ? u : 1;
@@ -535,34 +502,34 @@ const Qe = xe(
535
502
  file: f.file,
536
503
  errors: [{ code: f.reason, message: f.reason }]
537
504
  }));
538
- V(d, n);
505
+ q(d, n);
539
506
  }
540
507
  },
541
- [x, V, S]
508
+ [x, q, S]
542
509
  );
543
- ke(() => () => {
510
+ we(() => () => {
544
511
  for (const e of z.current)
545
512
  e.preview && URL.revokeObjectURL(e.preview);
546
513
  }, []);
547
- const se = T(() => {
514
+ const se = V(() => {
548
515
  const e = [];
549
- return a && e.push(Je(a)), c && e.push(
516
+ return a && e.push(Xe(a)), c && e.push(
550
517
  i("inputs.fileUpload.maxSizeHint", "Max {{size}}", {
551
- size: B(c, w.language, i)
518
+ size: D(c, U.language, i)
552
519
  })
553
520
  ), g && u > 1 && e.push(
554
521
  i("inputs.fileUpload.maxFilesHint", "Up to {{count}} files", {
555
522
  count: u
556
523
  })
557
524
  ), e;
558
- }, [a, c, g, u, i, w.language]), te = T(() => G.map((e) => {
525
+ }, [a, c, g, u, i, U.language]), te = V(() => G.map((e) => {
559
526
  switch (e.reason) {
560
527
  case "file-too-large":
561
528
  return i(
562
529
  "inputs.fileUpload.errors.fileTooLarge",
563
530
  "File exceeds {{maxSize}}",
564
531
  {
565
- maxSize: c ? B(c, w.language, i) : ""
532
+ maxSize: c ? D(c, U.language, i) : ""
566
533
  }
567
534
  );
568
535
  case "file-too-small":
@@ -570,7 +537,7 @@ const Qe = xe(
570
537
  "inputs.fileUpload.errors.fileTooSmall",
571
538
  "File is smaller than {{minSize}}",
572
539
  {
573
- minSize: l ? B(l, w.language, i) : ""
540
+ minSize: l ? D(l, U.language, i) : ""
574
541
  }
575
542
  );
576
543
  case "file-invalid-type":
@@ -587,11 +554,11 @@ const Qe = xe(
587
554
  }
588
555
  );
589
556
  }
590
- }), [G, i, c, l, u, w.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(
557
+ }), [G, i, c, l, u, U.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(
591
558
  "li",
592
559
  {
593
560
  "data-file-id": e.id,
594
- className: Oe({ status: e.status }),
561
+ className: _e({ status: e.status }),
595
562
  children: [
596
563
  ce && e.preview ? /* @__PURE__ */ r(
597
564
  "img",
@@ -601,14 +568,14 @@ const Qe = xe(
601
568
  "aria-hidden": "true",
602
569
  className: "ds:size-12 ds:shrink-0 ds:rounded-[var(--radius-md)] ds:object-cover ds:border ds:border-border"
603
570
  }
604
- ) : Pe(e.file),
571
+ ) : $e(e.file),
605
572
  /* @__PURE__ */ m("div", { className: "ds:flex-1 ds:min-w-0", children: [
606
573
  /* @__PURE__ */ m("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
607
574
  /* @__PURE__ */ r("p", { className: "ds:truncate type-label ds:m-0", children: e.file.name }),
608
- We(e.status)
575
+ Ke(e.status)
609
576
  ] }),
610
577
  /* @__PURE__ */ m("p", { className: "type-meta ds:text-muted-foreground ds:m-0 ds:mt-0.5", children: [
611
- B(e.file.size, w.language, i),
578
+ D(e.file.size, U.language, i),
612
579
  e.status === "uploading" && /* @__PURE__ */ m("span", { className: "ds:ms-[var(--spacing-sm)] ds:text-primary ds:font-medium", children: [
613
580
  e.progress,
614
581
  "%"
@@ -656,7 +623,7 @@ const Qe = xe(
656
623
  "button",
657
624
  {
658
625
  type: "button",
659
- onClick: () => $(e.id),
626
+ onClick: () => O(e.id),
660
627
  "aria-label": i("inputs.fileUpload.remove", "Remove file"),
661
628
  className: oe(),
662
629
  children: /* @__PURE__ */ r(ie, { "aria-hidden": "true", className: "ds:size-4" })
@@ -668,7 +635,7 @@ const Qe = xe(
668
635
  )) }), be = () => {
669
636
  if (v === "button") return null;
670
637
  const e = me({
671
- className: qe({
638
+ className: Oe({
672
639
  isDragActive: j,
673
640
  hasError: pe ?? !1,
674
641
  isDisabled: x ?? !1,
@@ -706,7 +673,7 @@ const Qe = xe(
706
673
  }
707
674
  ),
708
675
  /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)]", children: [
709
- /* @__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(Ae, { "aria-hidden": "true", className: "ds:size-7" }) : /* @__PURE__ */ r(K, { "aria-hidden": "true", className: "ds:size-7" }) }),
676
+ /* @__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(Ie, { "aria-hidden": "true", className: "ds:size-7" }) : /* @__PURE__ */ r($, { "aria-hidden": "true", className: "ds:size-7" }) }),
710
677
  /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)]", children: [
711
678
  /* @__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(
712
679
  "inputs.fileUpload.dropHere",
@@ -726,7 +693,7 @@ const Qe = xe(
726
693
  className: "ds:mt-[var(--spacing-xs)]"
727
694
  }),
728
695
  children: [
729
- /* @__PURE__ */ r(K, { "aria-hidden": "true", className: "ds:size-4" }),
696
+ /* @__PURE__ */ r($, { "aria-hidden": "true", className: "ds:size-4" }),
730
697
  i("inputs.fileUpload.browse", "Browse files")
731
698
  ]
732
699
  }
@@ -756,7 +723,7 @@ const Qe = xe(
756
723
  "aria-invalid": v === "button" && h.invalid || void 0,
757
724
  "aria-required": v === "button" && h.required || void 0,
758
725
  children: [
759
- /* @__PURE__ */ r(K, { "aria-hidden": "true", className: "ds:size-4" }),
726
+ /* @__PURE__ */ r($, { "aria-hidden": "true", className: "ds:size-4" }),
760
727
  i("inputs.fileUpload.browse", "Browse files")
761
728
  ]
762
729
  }
@@ -802,11 +769,13 @@ const Qe = xe(
802
769
  ] });
803
770
  }
804
771
  );
805
- Qe.displayName = "FileUpload";
772
+ Ye.displayName = "FileUpload";
806
773
  export {
807
- Qe as F,
808
- Ve as L,
774
+ Ie as C,
775
+ Ye as F,
776
+ Ee as L,
777
+ Be as a,
809
778
  ae as b,
810
- $e as f
779
+ qe as f
811
780
  };
812
- //# sourceMappingURL=file-upload-B2SXhRiN.js.map
781
+ //# sourceMappingURL=file-upload-DENvuhfs.js.map