@alfadocs/ui-kit 0.84.1 → 0.85.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 (65) hide show
  1. package/dist/_chunks/{ai-consent-banner-DUhr1yNj.js → ai-consent-banner-BXD7W6FI.js} +2 -2
  2. package/dist/_chunks/{alert-KJbsPYkI.js → alert-Cxaqd-QO.js} +12 -12
  3. package/dist/_chunks/{audio-recorder-Cc3KuL9y.js → audio-recorder-BjnB7V8n.js} +2 -2
  4. package/dist/_chunks/{booking-CLmeXtGv.js → booking-BvCu2XWY.js} +2 -2
  5. package/dist/_chunks/{document-preview-nwfulDEs.js → document-preview-DXl9migE.js} +2 -2
  6. package/dist/_chunks/{document-scanner-B6h1Ir56.js → document-scanner-cS_ispQs.js} +3 -3
  7. package/dist/_chunks/{entity-summary--vP698Jn.js → entity-summary-BILN4wEG.js} +2 -2
  8. package/dist/_chunks/{field-value-DHG6gEKS.js → field-value-BRVbZJej.js} +133 -144
  9. package/dist/_chunks/{file-manager-DLJlinIO.js → file-manager-B9LZzT5E.js} +129 -129
  10. package/dist/_chunks/{file-upload-DENvuhfs.js → file-upload-CwxdqkMK.js} +134 -146
  11. package/dist/_chunks/{freemium-paywall-CmV642PA.js → freemium-paywall-Dr2342_S.js} +2 -2
  12. package/dist/_chunks/{marketplace-app-shell-Br2yebEK.js → marketplace-app-shell-Chcj4q4z.js} +2 -2
  13. package/dist/_chunks/message-square-Bye4ATvx.js +20 -0
  14. package/dist/_chunks/{notes-panel-Cvdp818a.js → notes-panel-BLjlYBt-.js} +2 -2
  15. package/dist/_chunks/{patient-details-COvYWp2e.js → patient-details-B9LCdyWW.js} +2 -2
  16. package/dist/_chunks/{patient-search-BaUJ_Y-N.js → patient-search-vtRTSdf6.js} +2 -2
  17. package/dist/_chunks/{patient-summary-card-D6kgdTNn.js → patient-summary-card-vn1H4xWj.js} +2 -2
  18. package/dist/_chunks/{patient-table-BHzmUbzu.js → patient-table-B6AKMTm3.js} +182 -196
  19. package/dist/_chunks/{payment-form-DL9xk9BA.js → payment-form-BoGxEmGn.js} +2 -2
  20. package/dist/_chunks/{payment-request-card-d-RmzsUd.js → payment-request-card-CygO1anM.js} +72 -70
  21. package/dist/_chunks/{pdf-viewer-DF3VMaPo.js → pdf-viewer-CcOuR2wj.js} +2 -2
  22. package/dist/_chunks/{practice-results-BCr7jMt1.js → practice-results-yKbwIxqa.js} +2 -2
  23. package/dist/_chunks/{radiograph-panel.agent-CxF9pVxd.js → radiograph-panel.agent-M9XD4ze4.js} +2 -2
  24. package/dist/_chunks/{rich-text-editor-CCWjNkbx.js → rich-text-editor-RRkBN_WB.js} +2 -2
  25. package/dist/_chunks/{session-countdown-C8AsE072.js → session-countdown-Bc70VXN1.js} +58 -48
  26. package/dist/_chunks/{sign-document-Bfk0WpWV.js → sign-document-DI561d1C.js} +2 -2
  27. package/dist/_chunks/{signature-request-CEOrCDyk.js → signature-request-D_6jgDZd.js} +60 -77
  28. package/dist/_chunks/{task-tray-Br3vc0O1.js → task-tray-CLIqIXUZ.js} +58 -70
  29. package/dist/_chunks/{toast.agent-uV8CeAy6.js → toast.agent-Iw2jWdce.js} +2 -2
  30. package/dist/_chunks/{warning-stack-BlG_Ujy3.js → warning-stack-CAHQ0xxS.js} +2 -2
  31. package/dist/_chunks/{workflow-map-C643Q43h.js → workflow-map-SIfAhmWz.js} +2 -2
  32. package/dist/agent-catalog.json +1 -1
  33. package/dist/components/ai-consent-banner/index.js +1 -1
  34. package/dist/components/alert/index.js +1 -1
  35. package/dist/components/audio-recorder/index.js +1 -1
  36. package/dist/components/booking/index.js +1 -1
  37. package/dist/components/document-preview/index.js +1 -1
  38. package/dist/components/document-scanner/index.js +1 -1
  39. package/dist/components/entity-summary/index.js +1 -1
  40. package/dist/components/file-manager/index.js +1 -1
  41. package/dist/components/file-upload/index.js +1 -1
  42. package/dist/components/freemium-paywall/index.js +1 -1
  43. package/dist/components/notes-panel/index.js +1 -1
  44. package/dist/components/patient-details/index.js +1 -1
  45. package/dist/components/patient-search/index.js +1 -1
  46. package/dist/components/patient-summary-card/index.js +1 -1
  47. package/dist/components/patient-table/index.js +1 -1
  48. package/dist/components/payment-card/index.js +1 -1
  49. package/dist/components/payment-form/index.js +1 -1
  50. package/dist/components/pdf-viewer/index.js +1 -1
  51. package/dist/components/practice-results/index.js +1 -1
  52. package/dist/components/radiograph-panel/index.js +1 -1
  53. package/dist/components/rich-text-editor/index.js +1 -1
  54. package/dist/components/session-countdown/index.js +1 -1
  55. package/dist/components/sign-document/index.js +1 -1
  56. package/dist/components/task-tray/index.js +1 -1
  57. package/dist/components/toast/index.js +1 -1
  58. package/dist/components/warning-stack/index.js +1 -1
  59. package/dist/components/workflow/index.js +1 -1
  60. package/dist/index.js +434 -445
  61. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  62. package/dist/patterns/signature-request/index.js +1 -1
  63. package/dist/tokens.css +1 -1
  64. package/package.json +5 -3
  65. package/dist/_chunks/circle-x-W8Enq3i4.js +0 -16
@@ -1,36 +1,25 @@
1
1
  import { jsxs as m, jsx as r } from "react/jsx-runtime";
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
- import { useTranslation as Ne } from "react-i18next";
2
+ import { forwardRef as xe, useId as we, useState as te, useRef as K, useCallback as y, useMemo as _, useEffect as Ue } from "react";
3
+ import { u as Ne } from "./index-BcMWc8W2.js";
4
+ import { c as H } from "./index-D2ZczOXr.js";
5
+ import { useTranslation as ke } 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
- import { C as le } from "./circle-alert-rGDZ73Wh.js";
9
- import { c as K } from "./createLucideIcon-DhHxpK9K.js";
10
- import { U as $ } from "./upload-BfT2hzMg.js";
11
- import { X as ie } from "./x-B5YnXwCz.js";
8
+ import { C as ne } from "./circle-alert-rGDZ73Wh.js";
9
+ import { U as D } from "./upload-BfT2hzMg.js";
10
+ import { X as re } from "./x-B5YnXwCz.js";
12
11
  import { F as Fe } from "./file-text-5yv6r2ls.js";
12
+ import { c as le } from "./createLucideIcon-DhHxpK9K.js";
13
13
  import { F as Ce } from "./file-spreadsheet-DmwyfV4O.js";
14
- import { F as Le, a as Me } from "./file-Cwe9VC1A.js";
15
- import { C as Re } from "./circle-check-BN6rz4NV.js";
14
+ import { F as Le, a as Re } from "./file-Cwe9VC1A.js";
15
+ import { C as Ie } from "./circle-check-BN6rz4NV.js";
16
16
  /**
17
17
  * @license lucide-react v1.22.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
21
  */
22
- const Ae = [
23
- ["path", { d: "M12 13v8", key: "1l5pq0" }],
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" }],
25
- ["path", { d: "m8 17 4-4 4 4", key: "1quai1" }]
26
- ], Ie = K("cloud-upload", Ae);
27
- /**
28
- * @license lucide-react v1.22.0 - ISC
29
- *
30
- * This source code is licensed under the ISC license.
31
- * See the LICENSE file in the root directory of this source tree.
32
- */
33
- const De = [
22
+ const Me = [
34
23
  [
35
24
  "path",
36
25
  {
@@ -43,14 +32,14 @@ const De = [
43
32
  ["path", { d: "M8 18v-2", key: "qcmpov" }],
44
33
  ["path", { d: "M8 7V6", key: "1nbb54" }],
45
34
  ["circle", { cx: "8", cy: "20", r: "2", key: "ckkr5m" }]
46
- ], Be = K("file-archive", De);
35
+ ], Ae = le("file-archive", Me);
47
36
  /**
48
37
  * @license lucide-react v1.22.0 - ISC
49
38
  *
50
39
  * This source code is licensed under the ISC license.
51
40
  * See the LICENSE file in the root directory of this source tree.
52
41
  */
53
- const He = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Ee = K("loader-circle", He), qe = {
42
+ const De = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Be = le("loader-circle", De), He = {
54
43
  id: "file-upload",
55
44
  capabilities: ["dismiss"],
56
45
  state: {
@@ -107,7 +96,7 @@ const He = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Ee =
107
96
  description: "Each tracked file emits its id as data-file-id."
108
97
  }
109
98
  }
110
- }, Oe = B(
99
+ }, Ee = H(
111
100
  [
112
101
  "ds:relative ds:flex ds:flex-col ds:items-center ds:justify-center",
113
102
  "ds:min-h-48 ds:px-[var(--spacing-lg)] ds:py-[var(--spacing-xl)]",
@@ -140,7 +129,7 @@ const He = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Ee =
140
129
  isDisabled: !1
141
130
  }
142
131
  }
143
- ), ae = B(
132
+ ), ie = H(
144
133
  [
145
134
  "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-xs)]",
146
135
  // Full-width on phone so the affordance stacks cleanly; natural width
@@ -156,7 +145,7 @@ const He = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Ee =
156
145
  "ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
157
146
  "ds:disabled:cursor-not-allowed ds:disabled:opacity-50"
158
147
  ].join(" ")
159
- ), _e = B(
148
+ ), Oe = H(
160
149
  [
161
150
  "ds:flex ds:items-center ds:gap-[var(--spacing-md)]",
162
151
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--border)] ds:bg-background",
@@ -177,7 +166,7 @@ const He = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Ee =
177
166
  status: "pending"
178
167
  }
179
168
  }
180
- ), oe = B(
169
+ ), ae = H(
181
170
  [
182
171
  "ds:inline-flex ds:items-center ds:justify-center",
183
172
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
@@ -195,7 +184,7 @@ function Te() {
195
184
  function Ve(o) {
196
185
  return o.type.startsWith("image/");
197
186
  }
198
- function $e(o) {
187
+ function qe(o) {
199
188
  var c;
200
189
  const a = ((c = o.name.split(".").pop()) == null ? void 0 : c.toLowerCase()) ?? "";
201
190
  return ["pdf", "doc", "docx", "txt", "rtf"].includes(a) ? /* @__PURE__ */ r(
@@ -205,7 +194,7 @@ function $e(o) {
205
194
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
206
195
  }
207
196
  ) : ["zip", "rar", "7z", "tar", "gz"].includes(a) ? /* @__PURE__ */ r(
208
- Be,
197
+ Ae,
209
198
  {
210
199
  "aria-hidden": "true",
211
200
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
@@ -223,7 +212,7 @@ function $e(o) {
223
212
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
224
213
  }
225
214
  ) : /* @__PURE__ */ r(
226
- Me,
215
+ Re,
227
216
  {
228
217
  "aria-hidden": "true",
229
218
  className: "ds:size-10 ds:shrink-0 ds:text-muted-foreground"
@@ -234,7 +223,7 @@ function Ke(o) {
234
223
  switch (o) {
235
224
  case "uploading":
236
225
  return /* @__PURE__ */ r(
237
- Ee,
226
+ Be,
238
227
  {
239
228
  "aria-hidden": "true",
240
229
  className: "ds:size-4 ds:shrink-0 ds:text-primary ds:animate-spin"
@@ -242,7 +231,7 @@ function Ke(o) {
242
231
  );
243
232
  case "complete":
244
233
  return /* @__PURE__ */ r(
245
- Re,
234
+ Ie,
246
235
  {
247
236
  "aria-hidden": "true",
248
237
  className: "ds:size-4 ds:shrink-0 ds:text-[var(--success)]"
@@ -250,7 +239,7 @@ function Ke(o) {
250
239
  );
251
240
  case "error":
252
241
  return /* @__PURE__ */ r(
253
- le,
242
+ ne,
254
243
  {
255
244
  "aria-hidden": "true",
256
245
  className: "ds:size-4 ds:shrink-0 ds:text-destructive"
@@ -260,22 +249,22 @@ function Ke(o) {
260
249
  return null;
261
250
  }
262
251
  }
263
- const Pe = [
252
+ const _e = [
264
253
  "inputs.fileUpload.units.bytes",
265
254
  "inputs.fileUpload.units.kilobytes",
266
255
  "inputs.fileUpload.units.megabytes",
267
256
  "inputs.fileUpload.units.gigabytes"
268
- ], de = ["B", "KB", "MB", "GB"];
269
- function D(o, a, c) {
257
+ ], oe = ["B", "KB", "MB", "GB"];
258
+ function B(o, a, c) {
270
259
  let l = o, u = 0;
271
- for (; l >= 1024 && u < de.length - 1; )
260
+ for (; l >= 1024 && u < oe.length - 1; )
272
261
  l /= 1024, u++;
273
262
  const g = new Intl.NumberFormat(a, {
274
263
  maximumFractionDigits: u === 0 ? 0 : 1
275
- }).format(l), k = c(Pe[u], de[u]);
276
- return `${g} ${k}`;
264
+ }).format(l), N = c(_e[u], oe[u]);
265
+ return `${g} ${N}`;
277
266
  }
278
- function We(o) {
267
+ function $e(o) {
279
268
  switch (o) {
280
269
  case "file-too-large":
281
270
  return "file-too-large";
@@ -289,19 +278,19 @@ function We(o) {
289
278
  return "file-invalid-type";
290
279
  }
291
280
  }
292
- function Ge(o) {
281
+ function Pe(o) {
293
282
  const a = o.split(".");
294
283
  return a.length > 1 ? `.${a.pop().toLowerCase()}` : "";
295
284
  }
296
- function ne(o, a) {
297
- const c = Ge(o.name);
285
+ function de(o, a) {
286
+ const c = Pe(o.name);
298
287
  for (const [l, u] of Object.entries(a)) {
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;
288
+ const g = l === "*/*" || l.endsWith("/*") && o.type.startsWith(l.replace("/*", "/")) || o.type === l, N = u.length === 0 || u.some((F) => F.toLowerCase() === c);
289
+ if (g && N) return !0;
301
290
  }
302
291
  return !1;
303
292
  }
304
- function Xe(o) {
293
+ function We(o) {
305
294
  const a = [];
306
295
  for (const l of Object.values(o))
307
296
  for (const u of l)
@@ -312,7 +301,7 @@ function Xe(o) {
312
301
  l.endsWith("/*") ? c.push(l.replace("/*", "").split("/").pop() ?? l) : c.push(l.split("/").pop() ?? l);
313
302
  return c.join(", ");
314
303
  }
315
- const Ye = xe(
304
+ const Ge = xe(
316
305
  ({
317
306
  id: o,
318
307
  accept: a,
@@ -320,41 +309,41 @@ const Ye = xe(
320
309
  minSize: l,
321
310
  maxFiles: u = 1,
322
311
  multiple: g = !1,
323
- disabled: k,
312
+ disabled: N,
324
313
  strictAccept: F = !1,
325
314
  onDrop: C,
326
- onUpload: H,
315
+ onUpload: E,
327
316
  onRemove: L,
328
- onReject: M,
317
+ onReject: R,
329
318
  variant: v = "both",
330
319
  showPreview: ce = !0,
331
- className: P
332
- }, N) => {
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);
334
- z.current = R;
335
- const w = y((e) => {
336
- E.current && (E.current.textContent = e);
337
- }, []), X = y(
338
- (e) => !F || !a ? !0 : ne(e, a),
320
+ className: $
321
+ }, k) => {
322
+ const { t: i, i18n: w } = ke(), h = ze(), ue = we(), x = h.disabled || N, pe = h.invalid, P = h.id || ue, [I, b] = te([]), [W, fe] = te([]), M = K(/* @__PURE__ */ new Map()), O = K(null), z = K(I);
323
+ z.current = I;
324
+ const U = y((e) => {
325
+ O.current && (O.current.textContent = e);
326
+ }, []), G = y(
327
+ (e) => !F || !a ? !0 : de(e, a),
339
328
  [F, a]
340
- ), Y = y(
329
+ ), X = y(
341
330
  async (e) => {
342
- if (!H) return;
331
+ if (!E) return;
343
332
  const s = new AbortController();
344
- A.current.set(e.id, s), b(
333
+ M.current.set(e.id, s), b(
345
334
  (d) => d.map(
346
335
  (t) => t.id === e.id ? { ...t, status: "uploading", progress: 0 } : t
347
336
  )
348
- ), w(i("inputs.fileUpload.uploading", "Uploading…"));
337
+ ), U(i("inputs.fileUpload.uploading", "Uploading…"));
349
338
  try {
350
- await H(e.file, {
339
+ await E(e.file, {
351
340
  signal: s.signal,
352
341
  onProgress: (d) => {
353
342
  b(
354
343
  (t) => t.map(
355
344
  (n) => n.id === e.id ? { ...n, progress: d } : n
356
345
  )
357
- ), w(
346
+ ), U(
358
347
  i("inputs.fileUpload.progress", "{{percent}}% uploaded", {
359
348
  percent: d
360
349
  })
@@ -364,7 +353,7 @@ const Ye = xe(
364
353
  (d) => d.map(
365
354
  (t) => t.id === e.id ? { ...t, status: "complete", progress: 100 } : t
366
355
  )
367
- ), w(i("inputs.fileUpload.complete", "Upload complete"));
356
+ ), U(i("inputs.fileUpload.complete", "Upload complete"));
368
357
  } catch (d) {
369
358
  if (s.signal.aborted) {
370
359
  b((n) => n.filter((f) => f.id !== e.id));
@@ -377,23 +366,23 @@ const Ye = xe(
377
366
  )
378
367
  );
379
368
  } finally {
380
- A.current.delete(e.id);
369
+ M.current.delete(e.id);
381
370
  }
382
371
  },
383
- [H, w, i]
384
- ), q = y(
372
+ [E, U, i]
373
+ ), T = y(
385
374
  (e, s) => {
386
375
  const d = s.flatMap(
387
- (p) => p.errors.map((I) => ({
376
+ (p) => p.errors.map((A) => ({
388
377
  file: p.file,
389
- reason: We(I.code)
378
+ reason: $e(A.code)
390
379
  }))
391
380
  ), t = [], n = [];
392
381
  for (const p of e)
393
- X(p) ? n.push(p) : t.push({ file: p, reason: "file-invalid-type" });
382
+ G(p) ? n.push(p) : t.push({ file: p, reason: "file-invalid-type" });
394
383
  const f = [...d, ...t];
395
- fe(f), f.length > 0 && (M == null || M(f));
396
- const _ = n.map((p) => ({
384
+ fe(f), f.length > 0 && (R == null || R(f));
385
+ const q = n.map((p) => ({
397
386
  file: p,
398
387
  id: Te(),
399
388
  status: "pending",
@@ -402,58 +391,58 @@ const Ye = xe(
402
391
  }));
403
392
  b((p) => {
404
393
  if (!g && u === 1) {
405
- for (const I of p)
406
- I.preview && URL.revokeObjectURL(I.preview);
407
- return _;
394
+ for (const A of p)
395
+ A.preview && URL.revokeObjectURL(A.preview);
396
+ return q;
408
397
  }
409
- return [...p, ..._];
410
- }), C == null || C(n, f), w(
398
+ return [...p, ...q];
399
+ }), C == null || C(n, f), U(
411
400
  i("inputs.fileUpload.filesSelected", "{{count}} file(s) selected", {
412
401
  count: n.length
413
402
  })
414
403
  );
415
- for (const p of _)
416
- Y(p);
404
+ for (const p of q)
405
+ X(p);
417
406
  },
418
407
  [
419
408
  g,
420
409
  u,
421
410
  C,
422
- M,
411
+ R,
412
+ G,
413
+ U,
423
414
  X,
424
- w,
425
- Y,
426
415
  i
427
416
  ]
428
- ), { getRootProps: me, getInputProps: J, isDragActive: j, open: Q } = ke({
417
+ ), { getRootProps: me, getInputProps: Y, isDragActive: j, open: J } = Ne({
429
418
  accept: a,
430
419
  maxSize: c,
431
420
  minSize: l,
432
421
  maxFiles: g ? u : 1,
433
422
  multiple: g,
434
423
  disabled: x,
435
- onDrop: q,
424
+ onDrop: T,
436
425
  noClick: v === "button",
437
426
  noKeyboard: v === "button"
438
427
  }), ge = y((e) => {
439
- const s = A.current.get(e);
428
+ const s = M.current.get(e);
440
429
  s == null || s.abort(), b((d) => {
441
430
  const t = d.find((n) => n.id === e);
442
431
  return t != null && t.preview && URL.revokeObjectURL(t.preview), d.filter((n) => n.id !== e);
443
432
  });
444
- }, []), O = y(
433
+ }, []), V = y(
445
434
  (e) => {
446
435
  const s = z.current.find((d) => d.id === e);
447
436
  s != null && s.preview && URL.revokeObjectURL(s.preview), b((d) => d.filter((t) => t.id !== e)), s && (L == null || L(s));
448
437
  },
449
438
  [L]
450
- ), Z = y(() => {
439
+ ), Q = y(() => {
451
440
  for (const e of z.current) {
452
- const s = A.current.get(e.id);
441
+ const s = M.current.get(e.id);
453
442
  s == null || s.abort(), e.preview && URL.revokeObjectURL(e.preview);
454
443
  }
455
444
  b([]);
456
- }, []), ve = V(
445
+ }, []), ve = _(
457
446
  () => ({
458
447
  getFiles: () => z.current.map((e) => ({
459
448
  id: e.id,
@@ -461,13 +450,13 @@ const Ye = xe(
461
450
  size: e.file.size,
462
451
  status: e.status
463
452
  })),
464
- removeFile: (e) => O(e),
465
- clear: () => Z()
453
+ removeFile: (e) => V(e),
454
+ clear: () => Q()
466
455
  }),
467
- [O, Z]
456
+ [V, Q]
468
457
  );
469
- je(qe, ve, o);
470
- const S = y(
458
+ je(He, ve, o);
459
+ const Z = y(
471
460
  (e) => {
472
461
  const s = [], d = [], t = g ? u : 1;
473
462
  for (const n of e) {
@@ -483,7 +472,7 @@ const Ye = xe(
483
472
  d.push({ file: n, reason: "file-too-small" });
484
473
  continue;
485
474
  }
486
- if (a && !ne(n, a)) {
475
+ if (a && !de(n, a)) {
487
476
  d.push({ file: n, reason: "file-invalid-type" });
488
477
  continue;
489
478
  }
@@ -492,44 +481,44 @@ const Ye = xe(
492
481
  return { accepted: s, rejected: d };
493
482
  },
494
483
  [a, c, l, u, g]
495
- ), ee = y(
484
+ ), S = y(
496
485
  (e) => {
497
486
  if (x) return;
498
487
  const s = Array.from(e.clipboardData.files);
499
488
  if (s.length > 0) {
500
489
  e.preventDefault();
501
- const { accepted: d, rejected: t } = S(s), n = t.map((f) => ({
490
+ const { accepted: d, rejected: t } = Z(s), n = t.map((f) => ({
502
491
  file: f.file,
503
492
  errors: [{ code: f.reason, message: f.reason }]
504
493
  }));
505
- q(d, n);
494
+ T(d, n);
506
495
  }
507
496
  },
508
- [x, q, S]
497
+ [x, T, Z]
509
498
  );
510
- we(() => () => {
499
+ Ue(() => () => {
511
500
  for (const e of z.current)
512
501
  e.preview && URL.revokeObjectURL(e.preview);
513
502
  }, []);
514
- const se = V(() => {
503
+ const ee = _(() => {
515
504
  const e = [];
516
- return a && e.push(Xe(a)), c && e.push(
505
+ return a && e.push(We(a)), c && e.push(
517
506
  i("inputs.fileUpload.maxSizeHint", "Max {{size}}", {
518
- size: D(c, U.language, i)
507
+ size: B(c, w.language, i)
519
508
  })
520
509
  ), g && u > 1 && e.push(
521
510
  i("inputs.fileUpload.maxFilesHint", "Up to {{count}} files", {
522
511
  count: u
523
512
  })
524
513
  ), e;
525
- }, [a, c, g, u, i, U.language]), te = V(() => G.map((e) => {
514
+ }, [a, c, g, u, i, w.language]), se = _(() => W.map((e) => {
526
515
  switch (e.reason) {
527
516
  case "file-too-large":
528
517
  return i(
529
518
  "inputs.fileUpload.errors.fileTooLarge",
530
519
  "File exceeds {{maxSize}}",
531
520
  {
532
- maxSize: c ? D(c, U.language, i) : ""
521
+ maxSize: c ? B(c, w.language, i) : ""
533
522
  }
534
523
  );
535
524
  case "file-too-small":
@@ -537,7 +526,7 @@ const Ye = xe(
537
526
  "inputs.fileUpload.errors.fileTooSmall",
538
527
  "File is smaller than {{minSize}}",
539
528
  {
540
- minSize: l ? D(l, U.language, i) : ""
529
+ minSize: l ? B(l, w.language, i) : ""
541
530
  }
542
531
  );
543
532
  case "file-invalid-type":
@@ -554,11 +543,11 @@ const Ye = xe(
554
543
  }
555
544
  );
556
545
  }
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(
546
+ }), [W, i, c, l, u, w.language]), he = () => 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(
558
547
  "li",
559
548
  {
560
549
  "data-file-id": e.id,
561
- className: _e({ status: e.status }),
550
+ className: Oe({ status: e.status }),
562
551
  children: [
563
552
  ce && e.preview ? /* @__PURE__ */ r(
564
553
  "img",
@@ -568,14 +557,14 @@ const Ye = xe(
568
557
  "aria-hidden": "true",
569
558
  className: "ds:size-12 ds:shrink-0 ds:rounded-[var(--radius-md)] ds:object-cover ds:border ds:border-border"
570
559
  }
571
- ) : $e(e.file),
560
+ ) : qe(e.file),
572
561
  /* @__PURE__ */ m("div", { className: "ds:flex-1 ds:min-w-0", children: [
573
562
  /* @__PURE__ */ m("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
574
563
  /* @__PURE__ */ r("p", { className: "ds:truncate type-label ds:m-0", children: e.file.name }),
575
564
  Ke(e.status)
576
565
  ] }),
577
566
  /* @__PURE__ */ m("p", { className: "type-meta ds:text-muted-foreground ds:m-0 ds:mt-0.5", children: [
578
- D(e.file.size, U.language, i),
567
+ B(e.file.size, w.language, i),
579
568
  e.status === "uploading" && /* @__PURE__ */ m("span", { className: "ds:ms-[var(--spacing-sm)] ds:text-primary ds:font-medium", children: [
580
569
  e.progress,
581
570
  "%"
@@ -615,18 +604,18 @@ const Ye = xe(
615
604
  type: "button",
616
605
  onClick: () => ge(e.id),
617
606
  "aria-label": i("inputs.fileUpload.cancel", "Cancel upload"),
618
- className: oe(),
619
- children: /* @__PURE__ */ r(ie, { "aria-hidden": "true", className: "ds:size-4" })
607
+ className: ae(),
608
+ children: /* @__PURE__ */ r(re, { "aria-hidden": "true", className: "ds:size-4" })
620
609
  }
621
610
  ),
622
611
  (e.status === "complete" || e.status === "pending" || e.status === "error") && /* @__PURE__ */ r(
623
612
  "button",
624
613
  {
625
614
  type: "button",
626
- onClick: () => O(e.id),
615
+ onClick: () => V(e.id),
627
616
  "aria-label": i("inputs.fileUpload.remove", "Remove file"),
628
- className: oe(),
629
- children: /* @__PURE__ */ r(ie, { "aria-hidden": "true", className: "ds:size-4" })
617
+ className: ae(),
618
+ children: /* @__PURE__ */ r(re, { "aria-hidden": "true", className: "ds:size-4" })
630
619
  }
631
620
  )
632
621
  ]
@@ -635,11 +624,11 @@ const Ye = xe(
635
624
  )) }), be = () => {
636
625
  if (v === "button") return null;
637
626
  const e = me({
638
- className: Oe({
627
+ className: Ee({
639
628
  isDragActive: j,
640
629
  hasError: pe ?? !1,
641
630
  isDisabled: x ?? !1,
642
- className: P
631
+ className: $
643
632
  }),
644
633
  tabIndex: x ? -1 : 0
645
634
  }), s = e.ref;
@@ -648,10 +637,10 @@ const Ye = xe(
648
637
  {
649
638
  ...e,
650
639
  ref: (t) => {
651
- typeof s == "function" ? s(t) : s && (s.current = t), typeof N == "function" ? N(t) : N && (N.current = t);
640
+ typeof s == "function" ? s(t) : s && (s.current = t), typeof k == "function" ? k(t) : k && (k.current = t);
652
641
  },
653
- onPaste: ee,
654
- id: W,
642
+ onPaste: S,
643
+ id: P,
655
644
  "aria-label": i(
656
645
  "inputs.fileUpload.dropHere",
657
646
  "Drop files here or click to browse"
@@ -664,7 +653,7 @@ const Ye = xe(
664
653
  /* @__PURE__ */ r(
665
654
  "input",
666
655
  {
667
- ...J({
656
+ ...Y({
668
657
  "aria-label": i(
669
658
  "inputs.fileUpload.dropHere",
670
659
  "Drop files here or click to browse"
@@ -673,27 +662,27 @@ const Ye = xe(
673
662
  }
674
663
  ),
675
664
  /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-sm)]", children: [
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" }) }),
665
+ /* @__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(D, { "aria-hidden": "true", className: "ds:size-7" }) : /* @__PURE__ */ r(D, { "aria-hidden": "true", className: "ds:size-7" }) }),
677
666
  /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:items-center ds:gap-[var(--spacing-xs)]", children: [
678
667
  /* @__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(
679
668
  "inputs.fileUpload.dropHere",
680
669
  "Drop files here or click to browse"
681
670
  ) }),
682
- se.length > 0 && !j && /* @__PURE__ */ r("p", { className: "type-meta ds:text-muted-foreground ds:text-center ds:m-0", children: se.join(" · ") })
671
+ ee.length > 0 && !j && /* @__PURE__ */ r("p", { className: "type-meta ds:text-muted-foreground ds:text-center ds:m-0", children: ee.join(" · ") })
683
672
  ] }),
684
673
  v === "both" && !j && /* @__PURE__ */ m(
685
674
  "button",
686
675
  {
687
676
  type: "button",
688
677
  onClick: (t) => {
689
- t.stopPropagation(), Q();
678
+ t.stopPropagation(), J();
690
679
  },
691
680
  disabled: x,
692
- className: ae({
681
+ className: ie({
693
682
  className: "ds:mt-[var(--spacing-xs)]"
694
683
  }),
695
684
  children: [
696
- /* @__PURE__ */ r($, { "aria-hidden": "true", className: "ds:size-4" }),
685
+ /* @__PURE__ */ r(D, { "aria-hidden": "true", className: "ds:size-4" }),
697
686
  i("inputs.fileUpload.browse", "Browse files")
698
687
  ]
699
688
  }
@@ -702,11 +691,11 @@ const Ye = xe(
702
691
  ]
703
692
  }
704
693
  );
705
- }, ye = () => v === "dropzone" ? null : v === "button" ? /* @__PURE__ */ m("div", { onPaste: ee, ref: N, children: [
694
+ }, ye = () => v === "dropzone" ? null : v === "button" ? /* @__PURE__ */ m("div", { onPaste: S, ref: k, children: [
706
695
  /* @__PURE__ */ r(
707
696
  "input",
708
697
  {
709
- ...J({
698
+ ...Y({
710
699
  "aria-label": i("inputs.fileUpload.browse", "Browse files")
711
700
  })
712
701
  }
@@ -715,15 +704,15 @@ const Ye = xe(
715
704
  "button",
716
705
  {
717
706
  type: "button",
718
- onClick: Q,
707
+ onClick: J,
719
708
  disabled: x,
720
- className: ae({ className: P }),
721
- id: v === "button" ? W : void 0,
709
+ className: ie({ className: $ }),
710
+ id: v === "button" ? P : void 0,
722
711
  "aria-describedby": v === "button" && h.describedBy || void 0,
723
712
  "aria-invalid": v === "button" && h.invalid || void 0,
724
713
  "aria-required": v === "button" && h.required || void 0,
725
714
  children: [
726
- /* @__PURE__ */ r($, { "aria-hidden": "true", className: "ds:size-4" }),
715
+ /* @__PURE__ */ r(D, { "aria-hidden": "true", className: "ds:size-4" }),
727
716
  i("inputs.fileUpload.browse", "Browse files")
728
717
  ]
729
718
  }
@@ -733,18 +722,18 @@ const Ye = xe(
733
722
  be(),
734
723
  ye(),
735
724
  he(),
736
- te.length > 0 && /* @__PURE__ */ r(
725
+ se.length > 0 && /* @__PURE__ */ r(
737
726
  "div",
738
727
  {
739
728
  role: "alert",
740
729
  className: "ds:mt-[var(--spacing-sm)] ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
741
- children: te.map((e, s) => /* @__PURE__ */ m(
730
+ children: se.map((e, s) => /* @__PURE__ */ m(
742
731
  "div",
743
732
  {
744
733
  className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
745
734
  children: [
746
735
  /* @__PURE__ */ r(
747
- le,
736
+ ne,
748
737
  {
749
738
  "aria-hidden": "true",
750
739
  className: "ds:size-3.5 ds:shrink-0 ds:text-destructive"
@@ -760,7 +749,7 @@ const Ye = xe(
760
749
  /* @__PURE__ */ r(
761
750
  "span",
762
751
  {
763
- ref: E,
752
+ ref: O,
764
753
  role: "status",
765
754
  "aria-live": "polite",
766
755
  className: "ds:sr-only"
@@ -769,13 +758,12 @@ const Ye = xe(
769
758
  ] });
770
759
  }
771
760
  );
772
- Ye.displayName = "FileUpload";
761
+ Ge.displayName = "FileUpload";
773
762
  export {
774
- Ie as C,
775
- Ye as F,
776
- Ee as L,
777
- Be as a,
778
- ae as b,
779
- qe as f
763
+ Ge as F,
764
+ Be as L,
765
+ Ae as a,
766
+ ie as b,
767
+ He as f
780
768
  };
781
- //# sourceMappingURL=file-upload-DENvuhfs.js.map
769
+ //# sourceMappingURL=file-upload-CwxdqkMK.js.map