@wix/form-elements 1.241.0 → 1.243.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 (109) hide show
  1. package/dist/component/{appointment-rac-CHG0WqmP.js → appointment-rac-D-dMrhRb.js} +43 -43
  2. package/dist/component/{bookings-address-rac-0gam8j7s.js → bookings-address-rac-B6aQ4P5I.js} +1 -1
  3. package/dist/component/{bookings-email-rac-DZlulUCa.js → bookings-email-rac-Bh849hrc.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-U4MHsWd1.js → bookings-first-name-rac-C69Ind1o.js} +1 -1
  5. package/dist/component/{bookings-header-rac-CDJfljEO.js → bookings-header-rac-DGUzMGRj.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-DLInE8pT.js → bookings-last-name-rac-Ch9Bm-sr.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-K3m0pn4a.js → bookings-login-bar-rac-CUhHuZm-.js} +1 -1
  8. package/dist/component/{bookings-phone-rac-CI8wi6GY.js → bookings-phone-rac-BI4PoSu3.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-Bwta9py6.js → bookings-rich-text-rac-B4D2ZCJs.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-Bs_vJ_oq.js → checkbox-field-rac-zE0dzJYu.js} +81 -81
  11. package/dist/component/{checkbox-group-field-headless-CwyrCRLc.js → checkbox-group-field-headless-C2x-la-e.js} +44 -44
  12. package/dist/component/{checkbox-group-field-rac-31RRmAz_.js → checkbox-group-field-rac-iJkQGTiJ.js} +4 -4
  13. package/dist/component/{checkbox-group-rac-Bz98tGbx.js → checkbox-group-rac-DoK5e4c8.js} +1 -1
  14. package/dist/component/{checkbox-rac-DFdDAv50.js → checkbox-rac-8i-6GMze.js} +1 -1
  15. package/dist/component/{contacts-address-rac-Ct5QNUdV.js → contacts-address-rac-CHcRQBjy.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-BUHd4cCk.js → contacts-birthdate-rac-CkSsvQ6R.js} +1 -1
  17. package/dist/component/{contacts-company-rac-CI_d3IHw.js → contacts-company-rac-CIsmil8s.js} +1 -1
  18. package/dist/component/{contacts-email-rac-CCbpBKs9.js → contacts-email-rac-AEvRJfWd.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-FBUDLP8v.js → contacts-first-name-rac-CLSJ2cna.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-BSNrn4eb.js → contacts-last-name-rac-o59dmvVn.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-CsrFVsq6.js → contacts-phone-rac-jh-YSD-N.js} +1 -1
  22. package/dist/component/{contacts-position-rac-2gwTiIIo.js → contacts-position-rac-Ak4X2gV_.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-DucA9CDH.js → contacts-subscribe-rac-By9Bk1YL.js} +1 -1
  24. package/dist/component/{contacts-tax-id-rac-LcMf98te.js → contacts-tax-id-rac-B1enZgKk.js} +1 -1
  25. package/dist/component/{date-availability-Bt56LTk9.js → date-availability--3J2b6Ur.js} +1 -1
  26. package/dist/component/{date-input-field-rac-DhJqiwKI.js → date-input-field-rac-BFt0DKA9.js} +66 -66
  27. package/dist/component/{date-input-rac-BISvPvDp.js → date-input-rac-D8BA8S1A.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-C4I7QrcQ.js → date-picker-field-rac-cwYdVf60.js} +40 -40
  29. package/dist/component/{date-picker-rac-C3nny4Tu.js → date-picker-rac-B7uR5ZnA.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-njri5kye.js → date-time-input-field-rac-PaKyrMb9.js} +98 -98
  31. package/dist/component/{date-time-input-rac-D9kJRPD-.js → date-time-input-rac-Ck8Edatx.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-D8cqL9dJ.js → dext-checkbox-group-rac-Cru3Lq4c.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-Dd1SbiE4.js → dext-checkbox-rac-wtMsRxly.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-C2r-njE7.js → dext-date-picker-rac-B34DtxLN.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-CAqXDbbj.js → dext-date-time-input-rac-BsdfLty5.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-B2VPep8Y.js → dext-dropdown-rac-DeZYnwo7.js} +1 -1
  37. package/dist/component/{dext-email-rac-24Jk1Mrj.js → dext-email-rac-B4GTK5H8.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-y4ohRhoE.js → dext-number-input-rac-BIyJJ9h0.js} +1 -1
  39. package/dist/component/{dext-phone-rac-CIKnuUWR.js → dext-phone-rac-lf64Ywlp.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-BVcTXiaB.js → dext-radio-group-rac-CGt1_jue.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-CZVnCJ70.js → dext-rating-input-rac-CbaW1lxS.js} +1 -1
  42. package/dist/component/{dext-tags-rac-CnlzoLOp.js → dext-tags-rac-DnHDnzD_.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-Bx5soEnf.js → dext-text-area-rac-C8DVKWKo.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-jm659H89.js → dext-text-input-rac-DVl-1SDY.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-DvdPiREA.js → dext-url-input-rac-CkpAMLF9.js} +1 -1
  46. package/dist/component/{dismiss-icon-CBZq_OBa.js → dismiss-icon-CwZIlL7w.js} +6 -6
  47. package/dist/component/{donation-rac-CE4WS0Lx.js → donation-rac-DCNG5ByO.js} +44 -44
  48. package/dist/component/{dropdown-field-rac-Bhp-OH4C.js → dropdown-field-rac-CVbM-0KX.js} +3 -3
  49. package/dist/component/{dropdown-rac-s7sa3er0.js → dropdown-rac-CE9IjTvE.js} +1 -1
  50. package/dist/component/{ecom-address-rac-CSrBFi_H.js → ecom-address-rac-BD_okFDt.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-BAbbwlHW.js → ecom-subscription-checkbox-rac-C7zdxqra.js} +2 -2
  52. package/dist/component/{email-input-field-rac-3G3Ozglm.js → email-input-field-rac-CY4wE0eP.js} +35 -35
  53. package/dist/component/{events-repeater-rac-BUy91Kxs.js → events-repeater-rac-Bh-TBEQG.js} +26 -26
  54. package/dist/component/{events-rsvp-rac-Gisnded3.js → events-rsvp-rac-BPhzKqUb.js} +3 -3
  55. package/dist/component/{field-error-headless-piKY_H3-.js → field-error-headless-D3lVhOaC.js} +1 -1
  56. package/dist/component/{field-label-headless-BueDpCx1.js → field-label-headless-CrZoTwxs.js} +5 -5
  57. package/dist/component/{file-upload-rac-CSsl-aS9.js → file-upload-rac-DYP83swC.js} +187 -186
  58. package/dist/component/{fixed-payment-rac-ChzdCJU5.js → fixed-payment-rac-DY7hXK7g.js} +11 -11
  59. package/dist/component/{form-DcxKWiG2.js → form-DpFQ9uO1.js} +3059 -2934
  60. package/dist/component/form.css +1 -1
  61. package/dist/component/form.js +1 -1
  62. package/dist/component/{header-field-rac-Cs75yckQ.js → header-field-rac-9wOBV_rW.js} +2 -2
  63. package/dist/component/{header-rac-CtYKxrpl.js → header-rac-gzKNBkq_.js} +1 -1
  64. package/dist/component/{image-choice-rac-Dmgx9mHc.js → image-choice-rac-B6dvv6Jc.js} +25 -25
  65. package/dist/component/{index-B6EvjVlP.js → index-CbCZUvYt.js} +2 -2
  66. package/dist/component/{index-BflhPqlx.js → index-DCl2274b.js} +4 -4
  67. package/dist/component/{isObjectLike-CgoQvRJK.js → isObjectLike-DDBjMXgH.js} +1 -1
  68. package/dist/component/{multiline-address-field-rac-Dp0Zf4Kf.js → multiline-address-field-rac-CPkSpMMb.js} +210 -210
  69. package/dist/component/{multiline-address-rac-C_mO6tFy.js → multiline-address-rac-DCnk-LvE.js} +1 -1
  70. package/dist/component/{number-input-field-rac-BqtaqBSU.js → number-input-field-rac-Dt0hM2jA.js} +19 -19
  71. package/dist/component/{number-input-rac-Cuwz2ZQV.js → number-input-rac-pjmjC2-7.js} +1 -1
  72. package/dist/component/{password-rac-_1CzsKwh.js → password-rac-D9Gmp1yw.js} +32 -32
  73. package/dist/component/{payment-input-rac-Im0lWoko.js → payment-input-rac-CI78trIl.js} +33 -33
  74. package/dist/component/{phone-input-field-rac-DWgYXcrE.js → phone-input-field-rac-BCPj6vEP.js} +39 -39
  75. package/dist/component/{phone-rac-B5Qf61W1.js → phone-rac-FAGNDAR-.js} +1 -1
  76. package/dist/component/{product-list-rac-C5EK2laJ.js → product-list-rac-D7n9P2wQ.js} +14 -14
  77. package/dist/component/{quiz-radio-group-rac-CP9zzyH6.js → quiz-radio-group-rac-BO55azn2.js} +1 -1
  78. package/dist/component/{radio-button-module-classes-CkGrAGkr.js → radio-button-module-classes-BIraDyOu.js} +35 -35
  79. package/dist/component/{radio-group-field-rac-C_42Fcne.js → radio-group-field-rac-BvUZ-DmS.js} +4 -4
  80. package/dist/component/{radio-group-rac-CXdbk24Q.js → radio-group-rac-qc0JijX9.js} +1 -1
  81. package/dist/component/{rating-input-field-rac-DCkEh6Aj.js → rating-input-field-rac-D3u_T_la.js} +18 -18
  82. package/dist/component/{rating-input-rac-B9A843l0.js → rating-input-rac-CqlPfSQQ.js} +1 -1
  83. package/dist/component/{rich-content-rac.module-CNC4XD5d.js → rich-content-rac.module-B4TapWZL.js} +9 -9
  84. package/dist/component/{rich-text-field-rac-5rrd72dQ.js → rich-text-field-rac-LgoEQuKS.js} +4 -4
  85. package/dist/component/{rich-text-rac-YrwQXZNA.js → rich-text-rac-1IcHKfEb.js} +1 -1
  86. package/dist/component/{service-dropdown-rac-CQCQPJXB.js → service-dropdown-rac-CMkRaLmg.js} +22 -22
  87. package/dist/component/{services-multi-choice-rac-CUzXOutN.js → services-multi-choice-rac-DzwHkD-j.js} +7 -7
  88. package/dist/component/{signature-rac-CCaJeBKX.js → signature-rac-D3X5-ScB.js} +71 -71
  89. package/dist/component/{submit-button-rac-DGWGdzRU.js → submit-button-rac-BWL76gny.js} +15 -15
  90. package/dist/component/{tags-field-rac-B_YaA_EP.js → tags-field-rac-BwGeFDfH.js} +24 -24
  91. package/dist/component/{tags-rac-CF-h7_KF.js → tags-rac-DU7-Kl1T.js} +1 -1
  92. package/dist/component/{text-area-field-rac-BQ5WJhWG.js → text-area-field-rac-BO_9zG3x.js} +19 -19
  93. package/dist/component/{text-area-rac-BFWz2X0C.js → text-area-rac-CG7vi5-F.js} +1 -1
  94. package/dist/component/{text-input-field-rac-Bxv2pGmX.js → text-input-field-rac-FWkVzsiY.js} +3 -3
  95. package/dist/component/{text-input-headless-B4aiikZS.js → text-input-headless-COFlfx6N.js} +9 -9
  96. package/dist/component/{text-input-rac-DeQ9w2CC.js → text-input-rac-D_7yUDzw.js} +1 -1
  97. package/dist/component/{time-input-rac-tu0cnsa5.js → time-input-rac-0Ggsm6qE.js} +24 -24
  98. package/dist/component/{url-input-field-rac-Cc6cm4so.js → url-input-field-rac-CH7kG_Qf.js} +25 -25
  99. package/dist/component/{url-input-rac-DeKtkN8j.js → url-input-rac-CjBn6ZWh.js} +1 -1
  100. package/dist/component/{use-dropdown-option-class-name-CkOKrSdx.js → use-dropdown-option-class-name-Cy_iJyiA.js} +2 -2
  101. package/dist/component/{use-dropdown-trigger-class-name-BPkfvqu4.js → use-dropdown-trigger-class-name-Ddu4_w_z.js} +26 -26
  102. package/dist/component/{use-element-state-class-name-Cvpi3dBc.js → use-element-state-class-name-DNjpnp27.js} +2 -2
  103. package/dist/component/{use-hoverable-input-class-name-rCSXDYsL.js → use-hoverable-input-class-name-Wy3Ujp2_.js} +2 -2
  104. package/dist/component/{use-is-forced-open-dropdown-CX5XR5lo.js → use-is-forced-open-dropdown-Vu0JjNY7.js} +4 -4
  105. package/dist/component/{use-native-mobile-input-CVBv_Asv.js → use-native-mobile-input-l8hf9N2p.js} +3 -3
  106. package/dist/component/{use-service-options-base-BnjbDbkj.js → use-service-options-base-Di4c__b_.js} +3 -3
  107. package/dist/component/use-text-input-class-name-BBZXre-_.js +6 -0
  108. package/package.json +2 -2
  109. package/dist/component/use-text-input-class-name-wxGkp-sq.js +0 -6
@@ -1,24 +1,24 @@
1
- import t, { useState as Y, useRef as H, useMemo as fe, useEffect as ne, useCallback as Z, createContext as _e, useContext as Le } from "react";
1
+ import t, { useState as q, useRef as H, useMemo as fe, useEffect as ne, useCallback as M, createContext as ge, useContext as Le } from "react";
2
2
  import he from "@wix/editor-react-components/AnimatedIcon";
3
- import { RicosViewer as xe } from "@wix/ricos/viewer";
4
- import A from "classnames";
5
- import { bJ as Ce, bY as re, bS as Ne, aO as ve, bV as De, aH as ce, bX as ye, bK as oe, bN as V, bP as Se, bH as Te, bG as Be, X as Ie, am as we, b as Ae, P as Re, Q as ue, R as Ze, N as de, M as me, I as Me, O as Oe, f as te } from "./form-DcxKWiG2.js";
6
- import { E as Ue } from "./error-icon-hZxQ6DEy.js";
7
- import { s as q } from "./field-rac.module-D0QzJXUv.js";
8
- import { u as pe } from "./use-element-state-class-name-Cvpi3dBc.js";
9
- import { DropZone as ke, Text as Pe, FileTrigger as He, Button as Ee, ProgressBar as ze, VisuallyHidden as Ve } from "react-aria-components";
3
+ import { RicosViewer as Ce } from "@wix/ricos/viewer";
4
+ import R from "classnames";
5
+ import { bK as xe, aT as Ne, bZ as re, bT as ve, aO as De, bW as Te, aH as ce, bY as ye, bL as oe, bO as V, bQ as Se, bI as Ie, bH as Be, X as we, am as Re, b as Ae, P as Me, Q as ue, R as Ze, N as de, M as me, I as Oe, O as Ue, f as te } from "./form-DpFQ9uO1.js";
6
+ import { E as ke } from "./error-icon-hZxQ6DEy.js";
7
+ import { s as j } from "./field-rac.module-D0QzJXUv.js";
8
+ import { u as pe } from "./use-element-state-class-name-DNjpnp27.js";
9
+ import { DropZone as Pe, Text as He, FileTrigger as ze, Button as Ee, ProgressBar as Ve, VisuallyHidden as $e } from "react-aria-components";
10
10
  import { f as x, a as Q } from "./find-child-C60k4CxG.js";
11
- import { b as $e, a as Ke, D as je, E as qe } from "./field-error-headless-piKY_H3-.js";
12
- import { L as Ye } from "./field-label-headless-BueDpCx1.js";
13
- const Qe = {
11
+ import { b as Ke, a as Ye, D as je, E as qe } from "./field-error-headless-D3lVhOaC.js";
12
+ import { L as Qe } from "./field-label-headless-CrZoTwxs.js";
13
+ const We = {
14
14
  Video: "video/*",
15
15
  Image: "image/*",
16
16
  Audio: "audio/*",
17
17
  Document: ".ai, .cdr, .csv, .doc, .docb, .docx, .dot, .dotx, .dwg, .eps, .epub, .fla, .gpx, .ical, .icalendar, .ics, .ifb, .indd, .ipynb, .key, .kml, .kmz, .mobi, .mtf, .mtx, .numbers, .odg, .odp, .ods, .odt, .otp, .ots, .ott, .oxps, .pages, .pdf, .pdn, .pkg, .pot, .potx, .pps, .ppsx, .ppt, .pptx, .psd, .pub, .rtf, .sldx, .txt, .json, .vcf, .xcf, .xls, .xlsx, .xlt, .xltx, .xlw, .xps,.xml,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/pdf,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel",
18
18
  Archive: ".zip, .rar, .tar, .tar.gz, .gz, .gzip, .jar, .7z, .fgz, .webarchive",
19
19
  Model3D: ".gltf, .glb"
20
- }, We = (e) => {
21
- const { actions: n, formId: r } = Ce();
20
+ }, Ge = (e) => {
21
+ const { actions: n, formId: r } = xe();
22
22
  return async (l, s, d) => {
23
23
  if (!(n != null && n.uploadFile) || !l.length)
24
24
  return n != null && n.uploadFile || console.error("No uploadFile action"), l.length || console.error("No files to upload"), [];
@@ -27,108 +27,109 @@ const Qe = {
27
27
  formId: r,
28
28
  uploadTarget: e
29
29
  }).then((i) => {
30
- const { id: C, displayName: m, url: p, isPrivate: c } = i, y = {
31
- fileId: C,
30
+ const { id: N, displayName: m, url: p, isPrivate: c, mimeType: y } = i, b = {
31
+ fileId: N,
32
32
  displayName: m || o.name,
33
33
  url: c ? void 0 : p,
34
- fileType: o.type || "application/octet-stream"
34
+ // the type declared for the upload, so the submission's fileType matches what the backend checked
35
+ fileType: y || o.type || Ne
35
36
  };
36
37
  return s({
37
38
  file: o,
38
- uploadedFile: y
39
- }), y;
39
+ uploadedFile: b
40
+ }), b;
40
41
  }).catch((i) => {
41
42
  d(i, o);
42
43
  }));
43
44
  return (await Promise.all(E)).filter((o) => o !== void 0);
44
45
  };
45
46
  };
46
- function Xe({ valueSliderLimit: e, value: n, explanationText: r, target: l, onChange: s, uploadFileFormats: d, onBlur: E, onFilesCleared: L }) {
47
- const [o, i] = Y(Ge(n)), [C, m] = Y(n || []), [p, c] = Y(), y = We(l), { t: N } = re(), g = Ne().includes(ve.BUTTONS_HOVER), { setFormStatus: T } = De(), I = H(!1), B = H(s);
48
- B.current = s;
47
+ function Xe({ valueSliderLimit: e, value: n, explanationText: r, target: l, onChange: s, uploadFileFormats: d, onBlur: E, onFilesCleared: h }) {
48
+ const [o, i] = q(Je(n)), [N, m] = q(n || []), [p, c] = q(), y = Ge(l), { t: b } = re(), g = ve().includes(De.BUTTONS_HOVER), { setFormStatus: S } = Te(), B = H(!1), I = H(s);
49
+ I.current = s;
49
50
  const v = fe(() => o.some((f) => f.state === "uploading"), [
50
51
  o
51
52
  ]);
52
53
  ne(() => {
53
- I.current !== v && (I.current = v, T(l, v ? ce.BUSY : ce.READY));
54
+ B.current !== v && (B.current = v, S(l, v ? ce.BUSY : ce.READY));
54
55
  }, [
55
56
  v,
56
- T,
57
+ S,
57
58
  l
58
59
  ]);
59
- const u = Z(() => {
60
+ const u = M(() => {
60
61
  if (!o.length)
61
62
  return;
62
- const _ = o.filter((f) => f.state === "uploading").length;
63
- if (_) {
64
- const f = o.filter((F) => F.state === "uploaded" && F.file.size > 0).length, h = f / (f + _);
65
- return N("form.file-upload.uploading", {
66
- count: Math.round(h * 100)
63
+ const L = o.filter((f) => f.state === "uploading").length;
64
+ if (L) {
65
+ const f = o.filter((F) => F.state === "uploaded" && F.file.size > 0).length, C = f / (f + L);
66
+ return b("form.file-upload.uploading", {
67
+ count: Math.round(C * 100)
67
68
  });
68
69
  }
69
- return N("form.file-upload.explanation-text", {
70
+ return b("form.file-upload.explanation-text", {
70
71
  count: o.length
71
72
  });
72
73
  }, [
73
74
  o,
74
- N
75
- ]), w = Z(() => o.length ? o.some((f) => f.state === "uploading") ? u() : r || u() : r, [
75
+ b
76
+ ]), w = M(() => o.length ? o.some((f) => f.state === "uploading") ? u() : r || u() : r, [
76
77
  o,
77
78
  r,
78
79
  u
79
- ]), S = Z(async (_) => {
80
- await y(_, ({ file: f, uploadedFile: h }) => {
81
- i((F) => F.map((b) => b.file === f ? {
80
+ ]), T = M(async (L) => {
81
+ await y(L, ({ file: f, uploadedFile: C }) => {
82
+ i((F) => F.map((_) => _.file === f ? {
82
83
  file: f,
83
84
  state: "uploaded"
84
- } : b)), m((F) => {
85
+ } : _)), m((F) => {
85
86
  var U;
86
- const b = [
87
+ const _ = [
87
88
  ...F
88
- ].concat(h);
89
- return (U = B.current) == null || U.call(B, b), b;
89
+ ].concat(C);
90
+ return (U = I.current) == null || U.call(I, _), _;
90
91
  });
91
- }, (f, h) => {
92
- i((F) => F.map((b) => b.file === h ? {
93
- file: h,
92
+ }, (f, C) => {
93
+ i((F) => F.map((_) => _.file === C ? {
94
+ file: C,
94
95
  state: "error",
95
- errorMessage: N("form.file-upload.error.upload-failed")
96
- } : b));
96
+ errorMessage: b("form.file-upload.error.upload-failed")
97
+ } : _));
97
98
  });
98
99
  }, [
99
100
  y,
100
- N
101
- ]), K = async (_) => {
102
- if (p && c(void 0), _) {
103
- if (o.length + _.length > e) {
104
- c(N("form.file-upload.error.upload-limit", {
101
+ b
102
+ ]), K = async (L) => {
103
+ if (p && c(void 0), L) {
104
+ if (o.length + L.length > e) {
105
+ c(b("form.file-upload.error.upload-limit", {
105
106
  limit: e
106
107
  }));
107
108
  return;
108
109
  }
109
- const F = Array.from(_).reduce((b, U) => (o.some((k) => k.file.name === U.name) || b.push({
110
+ const F = Array.from(L).reduce((_, U) => (o.some((k) => k.file.name === U.name) || _.push({
110
111
  file: U,
111
112
  state: "uploading"
112
- }), b), []);
113
+ }), _), []);
113
114
  i([
114
115
  ...o,
115
116
  ...F
116
- ]), await S(F);
117
+ ]), await T(F);
117
118
  }
118
- }, O = (_) => {
119
- const f = o[_];
120
- if (C && s && f.state !== "error") {
121
- const h = C.filter((b) => b.displayName !== f.file.name);
122
- s(h), m(h);
123
- const F = o.filter((b) => b.file.name !== f.file.name);
124
- i(F), F.length === 0 && L();
119
+ }, O = (L) => {
120
+ const f = o[L];
121
+ if (N && s && f.state !== "error") {
122
+ const C = N.filter((_) => _.displayName !== f.file.name);
123
+ s(C), m(C);
124
+ const F = o.filter((_) => _.file.name !== f.file.name);
125
+ i(F), F.length === 0 && h();
125
126
  } else {
126
- const h = o.filter((F) => F !== f);
127
- i(h), h.length === 0 && L();
127
+ const C = o.filter((F) => F !== f);
128
+ i(C), C.length === 0 && h();
128
129
  }
129
- }, j = () => {
130
+ }, Y = () => {
130
131
  p && c(void 0), E();
131
- }, W = d.map((_) => Qe[_]).join(), J = Z(() => {
132
+ }, W = d.map((L) => We[L]).join(), J = M(() => {
132
133
  i([]), m([]);
133
134
  }, []);
134
135
  return ye(J), {
@@ -140,10 +141,10 @@ function Xe({ valueSliderLimit: e, value: n, explanationText: r, target: l, onCh
140
141
  handleChange: K,
141
142
  handleDelete: O,
142
143
  accept: W,
143
- handleBlur: j
144
+ handleBlur: Y
144
145
  };
145
146
  }
146
- function Ge(e = []) {
147
+ function Je(e = []) {
147
148
  const n = e || [];
148
149
  try {
149
150
  return n.map((r) => ({
@@ -159,7 +160,7 @@ function Ge(e = []) {
159
160
  }
160
161
  return [];
161
162
  }
162
- const Fe = /* @__PURE__ */ _e(void 0);
163
+ const Fe = /* @__PURE__ */ ge(void 0);
163
164
  function $() {
164
165
  const e = Le(Fe);
165
166
  if (typeof e > "u")
@@ -170,15 +171,15 @@ const z = ({ children: e, className: n }) => {
170
171
  const { ariaDescribedBy: r } = oe(), { disabled: l, hasError: s } = V(), { handleFileChange: d, limitReached: E } = $();
171
172
  if (E)
172
173
  return null;
173
- const L = x(e, z.Title), o = x(e, z.Subtitle), i = x(e, z.Button);
174
- return /* @__PURE__ */ t.createElement(ke, {
174
+ const h = x(e, z.Title), o = x(e, z.Subtitle), i = x(e, z.Button);
175
+ return /* @__PURE__ */ t.createElement(Pe, {
175
176
  "aria-describedby": r,
176
177
  className: n,
177
178
  "data-invalid": s,
178
179
  isDisabled: l,
179
- onDrop: async (C) => {
180
+ onDrop: async (N) => {
180
181
  const m = [];
181
- for (const p of C.items)
182
+ for (const p of N.items)
182
183
  if (p.kind === "file") {
183
184
  const c = await p.getFile();
184
185
  c && m.push(c);
@@ -188,17 +189,17 @@ const z = ({ children: e, className: n }) => {
188
189
  m.forEach((c) => p.items.add(c)), d(p.files);
189
190
  }
190
191
  }
191
- }, /* @__PURE__ */ t.createElement(Pe, {
192
+ }, /* @__PURE__ */ t.createElement(He, {
192
193
  slot: "label"
193
- }, L, o), i);
194
- }, Je = ({ className: e, children: n }) => {
194
+ }, h, o), i);
195
+ }, et = ({ className: e, children: n }) => {
195
196
  const { limitReached: r } = $();
196
197
  return /* @__PURE__ */ t.createElement("p", {
197
198
  className: e
198
199
  }, n({
199
200
  limitReached: r
200
201
  }));
201
- }, et = ({ className: e, children: n }) => {
202
+ }, tt = ({ className: e, children: n }) => {
202
203
  const { limitReached: r } = $(), { explanationText: l } = V();
203
204
  return /* @__PURE__ */ t.createElement("p", {
204
205
  className: e
@@ -206,70 +207,70 @@ const z = ({ children: e, className: n }) => {
206
207
  limitReached: r
207
208
  }));
208
209
  }, le = ({ className: e, children: n, "aria-roledescription": r, onHoverStart: l, onHoverEnd: s, onFocusChange: d }) => {
209
- const { ariaDescribedBy: E, inputId: L, labelId: o, errorId: i } = oe(), { disabled: C, required: m, onFocus: p, hasError: c, errorMessage: y } = V(), { handleFileChange: N, accept: M, multiple: g, buttonRef: T, handleBlur: I, limitError: B, files: v } = $(), u = (v == null ? void 0 : v.some((S) => S.errorMessage)) ?? !1, w = !!(c || y || B || u);
210
- return /* @__PURE__ */ t.createElement(He, {
211
- acceptedFileTypes: M ? M.split(",") : void 0,
210
+ const { ariaDescribedBy: E, inputId: h, labelId: o, errorId: i } = oe(), { disabled: N, required: m, onFocus: p, hasError: c, errorMessage: y } = V(), { handleFileChange: b, accept: Z, multiple: g, buttonRef: S, handleBlur: B, limitError: I, files: v } = $(), u = (v == null ? void 0 : v.some((T) => T.errorMessage)) ?? !1, w = !!(c || y || I || u);
211
+ return /* @__PURE__ */ t.createElement(ze, {
212
+ acceptedFileTypes: Z ? Z.split(",") : void 0,
212
213
  allowsMultiple: g,
213
- onSelect: (S) => {
214
- if (S) {
215
- const K = Array.from(S), O = new DataTransfer();
216
- K.forEach((j) => O.items.add(j)), N(O.files);
214
+ onSelect: (T) => {
215
+ if (T) {
216
+ const K = Array.from(T), O = new DataTransfer();
217
+ K.forEach((Y) => O.items.add(Y)), b(O.files);
217
218
  }
218
219
  }
219
220
  }, /* @__PURE__ */ t.createElement(Ee, {
220
- ref: T,
221
- id: L,
221
+ ref: S,
222
+ id: h,
222
223
  // The visible button text first, then the field label ("Upload file,
223
224
  // Resume"), so speech-input users can say what they see (WCAG 2.5.3).
224
- "aria-labelledby": `${be(L)} ${o}`,
225
+ "aria-labelledby": `${be(h)} ${o}`,
225
226
  "aria-describedby": [
226
227
  E,
227
228
  i
228
229
  ].filter(Boolean).join(" "),
229
- render: (S) => /* @__PURE__ */ t.createElement("button", {
230
- ...S,
230
+ render: (T) => /* @__PURE__ */ t.createElement("button", {
231
+ ...T,
231
232
  "aria-roledescription": r,
232
233
  "aria-invalid": w || void 0,
233
234
  "aria-required": m
234
235
  }),
235
- isDisabled: C,
236
+ isDisabled: N,
236
237
  className: e,
237
238
  onFocus: p,
238
- onBlur: I,
239
+ onBlur: B,
239
240
  onHoverStart: l,
240
241
  onHoverEnd: s,
241
242
  onFocusChange: d
242
243
  }, n));
243
- }, be = (e) => `${e}-button-text`, tt = ({ className: e }) => {
244
+ }, be = (e) => `${e}-button-text`, nt = ({ className: e }) => {
244
245
  const { buttonText: n } = V(), { inputId: r } = oe();
245
246
  return /* @__PURE__ */ t.createElement("span", {
246
247
  id: be(r),
247
248
  className: e
248
249
  }, n);
249
250
  };
250
- le.Text = tt;
251
- z.Title = Je;
252
- z.Subtitle = et;
251
+ le.Text = nt;
252
+ z.Title = et;
253
+ z.Subtitle = tt;
253
254
  z.Button = le;
254
- const R = ({ children: e, className: n, ...r }) => {
255
- const { file: l, index: s } = r, d = l.file.name, E = x(e, R.Name), L = x(e, R.Remove), o = x(e, R.Spinner), i = x(e, R.Error);
255
+ const A = ({ children: e, className: n, ...r }) => {
256
+ const { file: l, index: s } = r, d = l.file.name, E = x(e, A.Name), h = x(e, A.Remove), o = x(e, A.Spinner), i = x(e, A.Error);
256
257
  return /* @__PURE__ */ t.createElement("div", {
257
258
  className: n
258
259
  }, Q(E, {
259
260
  fileName: d
260
- }), l.state === "uploading" ? o : Q(L, {
261
+ }), l.state === "uploading" ? o : Q(h, {
261
262
  index: s,
262
263
  fileName: d
263
264
  }), l.errorMessage && Q(i, {
264
265
  errorMessage: l.errorMessage
265
266
  }));
266
- }, nt = ({ className: e, ...n }) => {
267
+ }, rt = ({ className: e, ...n }) => {
267
268
  const { fileName: r } = n;
268
269
  return /* @__PURE__ */ t.createElement("span", {
269
270
  className: e
270
271
  }, r);
271
- }, rt = ({ className: e, "aria-label": n, children: r, ...l }) => {
272
- const { fileName: s, index: d } = l, { disabled: E } = V(), { handleDelete: L, fileRemoveButtonRefs: o } = $(), i = H(null);
272
+ }, ot = ({ className: e, "aria-label": n, children: r, ...l }) => {
273
+ const { fileName: s, index: d } = l, { disabled: E } = V(), { handleDelete: h, fileRemoveButtonRefs: o } = $(), i = H(null);
273
274
  ne(() => {
274
275
  const m = o.current, p = s;
275
276
  return m[p] = i, () => {
@@ -279,36 +280,36 @@ const R = ({ children: e, className: n, ...r }) => {
279
280
  s,
280
281
  o
281
282
  ]);
282
- const C = () => {
283
- L(d);
283
+ const N = () => {
284
+ h(d);
284
285
  };
285
286
  return /* @__PURE__ */ t.createElement(Ee, {
286
287
  ref: i,
287
288
  "aria-disabled": E,
288
289
  "aria-label": n,
289
290
  "aria-description": s,
290
- onClick: C,
291
+ onClick: N,
291
292
  className: e,
292
293
  isDisabled: E
293
294
  }, r);
294
- }, ge = ({ className: e, children: n, ...r }) => {
295
+ }, _e = ({ className: e, children: n, ...r }) => {
295
296
  const { errorMessage: l } = r;
296
- return l ? /* @__PURE__ */ t.createElement(Ke, {
297
+ return l ? /* @__PURE__ */ t.createElement(Ye, {
297
298
  value: l
298
299
  }, /* @__PURE__ */ t.createElement("div", {
299
300
  className: e,
300
301
  role: "alert"
301
302
  }, n)) : null;
302
- }, ot = ({ className: e, "aria-label": n, children: r }) => /* @__PURE__ */ t.createElement(ze, {
303
+ }, lt = ({ className: e, "aria-label": n, children: r }) => /* @__PURE__ */ t.createElement(Ve, {
303
304
  "aria-label": n,
304
305
  className: e,
305
306
  isIndeterminate: !0
306
307
  }, r);
307
- R.Name = nt;
308
- R.Remove = rt;
309
- R.Spinner = ot;
310
- R.Error = ge;
311
- ge.Text = $e;
308
+ A.Name = rt;
309
+ A.Remove = ot;
310
+ A.Spinner = lt;
311
+ A.Error = _e;
312
+ _e.Text = Ke;
312
313
  const ae = ({ children: e, className: n }) => {
313
314
  const { files: r } = $(), l = x(e, ae.File);
314
315
  return !r || r.length === 0 ? null : /* @__PURE__ */ t.createElement("div", {
@@ -319,44 +320,44 @@ const ae = ({ children: e, className: n }) => {
319
320
  index: d
320
321
  })));
321
322
  };
322
- ae.File = R;
323
- const G = (e) => e.file.name, a = ({ children: e }) => {
324
- const { t: n } = re(), { id: r, value: l, onChange: s, uploadFileFormats: d, valueSliderLimit: E, target: L, explanationText: o, onBlur: i, hasError: C, errorMessage: m, FieldLayout: p } = V(), c = H(null), y = H({}), N = H(!1), M = Z(() => {
325
- c.current ? c.current.focus() : N.current = !0;
326
- }, []), { files: g, limitError: T, hover: I, getExplanationText: B, getStatusText: v, handleBlur: u, handleChange: w, handleDelete: S, accept: K } = Xe({
323
+ ae.File = A;
324
+ const X = (e) => e.file.name, a = ({ children: e }) => {
325
+ const { t: n } = re(), { id: r, value: l, onChange: s, uploadFileFormats: d, valueSliderLimit: E, target: h, explanationText: o, onBlur: i, hasError: N, errorMessage: m, FieldLayout: p } = V(), c = H(null), y = H({}), b = H(!1), Z = M(() => {
326
+ c.current ? c.current.focus() : b.current = !0;
327
+ }, []), { files: g, limitError: S, hover: B, getExplanationText: I, getStatusText: v, handleBlur: u, handleChange: w, handleDelete: T, accept: K } = Xe({
327
328
  valueSliderLimit: E,
328
329
  value: l,
329
330
  explanationText: o,
330
- target: L,
331
+ target: h,
331
332
  onChange: s,
332
333
  uploadFileFormats: d,
333
334
  onBlur: i,
334
- onFilesCleared: M
335
- }), O = Z((k) => {
335
+ onFilesCleared: Z
336
+ }), O = M((k) => {
336
337
  var ie;
337
- const X = g[k], P = G(X);
338
- g.length > 1 && ((ie = (g.filter((ee) => G(ee) !== P).map((ee) => y.current[G(ee)]).find(Boolean) ?? c).current) == null || ie.focus()), S(k);
338
+ const G = g[k], P = X(G);
339
+ g.length > 1 && ((ie = (g.filter((ee) => X(ee) !== P).map((ee) => y.current[X(ee)]).find(Boolean) ?? c).current) == null || ie.focus()), T(k);
339
340
  }, [
340
- S,
341
+ T,
341
342
  g
342
343
  ]);
343
344
  ne(() => {
344
- N.current && c.current && (N.current = !1, c.current.focus());
345
+ b.current && c.current && (b.current = !1, c.current.focus());
345
346
  }, [
346
347
  g
347
348
  ]);
348
- const j = E > 1, W = g.length >= E, J = fe(() => ({
349
+ const Y = E > 1, W = g.length >= E, J = fe(() => ({
349
350
  handleFileChange: w,
350
351
  handleBlur: u,
351
352
  handleDelete: O,
352
353
  files: g,
353
354
  accept: K,
354
355
  limitReached: W,
355
- multiple: j,
356
- getExplanationText: B,
356
+ multiple: Y,
357
+ getExplanationText: I,
357
358
  getStatusText: v,
358
- hover: I,
359
- limitError: T,
359
+ hover: B,
360
+ limitError: S,
360
361
  buttonRef: c,
361
362
  fileRemoveButtonRefs: y
362
363
  }), [
@@ -366,54 +367,54 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
366
367
  g,
367
368
  K,
368
369
  W,
369
- j,
370
- B,
371
- v,
370
+ Y,
372
371
  I,
373
- T
374
- ]), _ = x(e, a.Label), f = x(e, a.DropZone), h = x(e, a.Button), F = x(e, a.Explanation), b = x(e, a.Files), U = x(e, a.Description), se = x(e, a.Error);
372
+ v,
373
+ B,
374
+ S
375
+ ]), L = x(e, a.Label), f = x(e, a.DropZone), C = x(e, a.Button), F = x(e, a.Explanation), _ = x(e, a.Files), U = x(e, a.Description), se = x(e, a.Error);
375
376
  return Se(() => {
376
- var k, X;
377
+ var k, G;
377
378
  if (c.current) {
378
379
  c.current.focus({
379
380
  preventScroll: !0
380
381
  });
381
382
  return;
382
383
  }
383
- (X = (k = g.map((P) => y.current[G(P)]).find((P) => P == null ? void 0 : P.current)) == null ? void 0 : k.current) == null || X.focus({
384
+ (G = (k = g.map((P) => y.current[X(P)]).find((P) => P == null ? void 0 : P.current)) == null ? void 0 : k.current) == null || G.focus({
384
385
  preventScroll: !0
385
386
  });
386
387
  }, r), /* @__PURE__ */ t.createElement(Fe.Provider, {
387
388
  value: J
388
389
  }, /* @__PURE__ */ t.createElement(p, {
389
390
  fieldId: r,
390
- renderLabel: () => _,
391
- renderInput: () => f ?? h,
391
+ renderLabel: () => L,
392
+ renderInput: () => f ?? C,
392
393
  renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, Q(se, {
393
- hasError: !!(C || T),
394
- errorMessage: T ?? m
395
- }), /* @__PURE__ */ t.createElement(Ve, {
394
+ hasError: !!(N || S),
395
+ errorMessage: S ?? m
396
+ }), /* @__PURE__ */ t.createElement($e, {
396
397
  role: "status",
397
398
  "aria-live": "polite",
398
399
  "aria-atomic": "true"
399
400
  }, n("form.file-upload.explanation-text", {
400
401
  count: g.length
401
- })), F, b, U)
402
+ })), F, _, U)
402
403
  }));
403
- }, lt = ({ className: e, showUploadStatusOnly: n }) => {
404
+ }, at = ({ className: e, showUploadStatusOnly: n }) => {
404
405
  const { files: r, getExplanationText: l, getStatusText: s } = $(), d = n ? s() : l();
405
406
  return r.length === 1 || !d ? null : /* @__PURE__ */ t.createElement("p", {
406
407
  className: e
407
408
  }, d);
408
409
  };
409
- a.Label = Ye;
410
+ a.Label = Qe;
410
411
  a.DropZone = z;
411
412
  a.Button = le;
412
- a.Explanation = lt;
413
+ a.Explanation = at;
413
414
  a.Files = ae;
414
415
  a.Description = je;
415
416
  a.Error = qe;
416
- const at = (e) => /* @__PURE__ */ t.createElement("svg", {
417
+ const st = (e) => /* @__PURE__ */ t.createElement("svg", {
417
418
  viewBox: "0 0 24 24",
418
419
  width: 24,
419
420
  height: 24,
@@ -422,7 +423,7 @@ const at = (e) => /* @__PURE__ */ t.createElement("svg", {
422
423
  ...e
423
424
  }, /* @__PURE__ */ t.createElement("path", {
424
425
  d: "M12 12 12 6 11 6 11 12 5 12 5 13 11 13 11 19 12 19 12 13 18 13 18 12z"
425
- })), st = (e) => /* @__PURE__ */ t.createElement("svg", {
426
+ })), it = (e) => /* @__PURE__ */ t.createElement("svg", {
426
427
  viewBox: "0 0 24 24",
427
428
  width: 24,
428
429
  height: 24,
@@ -431,7 +432,7 @@ const at = (e) => /* @__PURE__ */ t.createElement("svg", {
431
432
  ...e
432
433
  }, /* @__PURE__ */ t.createElement("path", {
433
434
  d: "M12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 Z M12,20 C16.418278,20 20,16.418278 20,12 C20,7.581722 16.418278,4 12,4 C7.581722,4 4,7.581722 4,12 C4,16.418278 7.581722,20 12,20 Z M12.7287834,7.27532214 C12.9203342,7.46687299 13.0199347,7.73174979 13.0020527,8.00205275 L13.0020527,12.0020527 C13.0199347,12.2723557 12.9203342,12.5372325 12.7287834,12.7287834 C12.5372325,12.9203342 12.2723557,13.0199347 12.0020527,13.0020527 C11.7317498,13.0199347 11.466873,12.9203342 11.2753221,12.7287834 C11.0837713,12.5372325 10.9841708,12.2723557 11.0020527,12.0020527 L11.0020527,8.00205275 C10.9841708,7.73174979 11.0837713,7.46687299 11.2753221,7.27532214 C11.466873,7.08377129 11.7317498,6.98417081 12.0020527,7.00205275 C12.2723557,6.98417081 12.5372325,7.08377129 12.7287834,7.27532214 Z M12.7287834,15.2753221 C12.9203342,15.466873 13.0199347,15.7317498 13.0020527,16.0020527 C13.0199347,16.2723557 12.9203342,16.5372325 12.7287834,16.7287834 C12.5372325,16.9203342 12.2723557,17.0199347 12.0020527,17.0020527 C11.7317498,17.0199347 11.466873,16.9203342 11.2753221,16.7287834 C11.0837713,16.5372325 10.9841708,16.2723557 11.0020527,16.0020527 C10.9841708,15.7317498 11.0837713,15.466873 11.2753221,15.2753221 C11.466873,15.0837713 11.7317498,14.9841708 12.0020527,15.0020527 C12.2723557,14.9841708 12.5372325,15.0837713 12.7287834,15.2753221 Z"
434
- })), it = (e) => /* @__PURE__ */ t.createElement("svg", {
435
+ })), ct = (e) => /* @__PURE__ */ t.createElement("svg", {
435
436
  viewBox: "0 0 24 24",
436
437
  width: 24,
437
438
  height: 24,
@@ -440,7 +441,7 @@ const at = (e) => /* @__PURE__ */ t.createElement("svg", {
440
441
  ...e
441
442
  }, /* @__PURE__ */ t.createElement("path", {
442
443
  d: "M17,17 C17,18.6568542 15.6568542,20 14,20 L9,20 C7.34314575,20 6,18.6568542 6,17 L6,7 L5,7 L5,6 L18,6 L18,7 L17,7 L17,17 Z M9,9 L10,9 L10,16 L9,16 L9,9 Z M11,9 L12,9 L12,16 L11,16 L11,9 Z M13,9 L14,9 L14,16 L13,16 L13,9 Z M7,17 C7,18.1045695 7.8954305,19 9,19 L14,19 C15.1045695,19 16,18.1045695 16,17 L16,7 L7,7 L7,17 Z M13,6 L13,5 L10,5 L10,6 L9,6 L9,5 C9,4.44771525 9.44771525,4 10,4 L13,4 C13.5522847,4 14,4.44771525 14,5 L14,6 L13,6 Z"
443
- })), ct = () => {
444
+ })), ut = () => {
444
445
  const n = "calc(50% - 2px)";
445
446
  return /* @__PURE__ */ t.createElement("svg", {
446
447
  fill: "none",
@@ -472,26 +473,26 @@ const at = (e) => /* @__PURE__ */ t.createElement("svg", {
472
473
  values: "0;360",
473
474
  repeatCount: "indefinite"
474
475
  })));
475
- }, ut = "_dropZone_1rkyw_1", dt = "_dropZoneHover_1rkyw_26", mt = "_dropZoneTitle_1rkyw_63", pt = "_dropZoneSubtitle_1rkyw_68", ft = "_button_1rkyw_72", Et = "_buttonHover_1rkyw_125", Ft = "_explanation_1rkyw_142", bt = "_files_1rkyw_146", gt = "_file_1rkyw_146", _t = "_fileName_1rkyw_195", Lt = "_buttonLabel_1rkyw_203", ht = "_removeButton_1rkyw_207", xt = "_spinner_1rkyw_254", Ct = "_fileError_1rkyw_270", D = {
476
- dropZone: ut,
477
- dropZoneHover: dt,
478
- dropZoneTitle: mt,
479
- dropZoneSubtitle: pt,
480
- button: ft,
481
- buttonHover: Et,
482
- explanation: Ft,
483
- files: bt,
476
+ }, dt = "_dropZone_1rkyw_1", mt = "_dropZoneHover_1rkyw_26", pt = "_dropZoneTitle_1rkyw_63", ft = "_dropZoneSubtitle_1rkyw_68", Et = "_button_1rkyw_72", Ft = "_buttonHover_1rkyw_125", bt = "_explanation_1rkyw_142", _t = "_files_1rkyw_146", gt = "_file_1rkyw_146", Lt = "_fileName_1rkyw_195", ht = "_buttonLabel_1rkyw_203", Ct = "_removeButton_1rkyw_207", xt = "_spinner_1rkyw_254", Nt = "_fileError_1rkyw_270", D = {
477
+ dropZone: dt,
478
+ dropZoneHover: mt,
479
+ dropZoneTitle: pt,
480
+ dropZoneSubtitle: ft,
481
+ button: Et,
482
+ buttonHover: Ft,
483
+ explanation: bt,
484
+ files: _t,
484
485
  file: gt,
485
- fileName: _t,
486
- buttonLabel: Lt,
487
- removeButton: ht,
486
+ fileName: Lt,
487
+ buttonLabel: ht,
488
+ removeButton: Ct,
488
489
  spinner: xt,
489
- fileError: Ct
490
- }, Nt = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(xe, {
490
+ fileError: Nt
491
+ }, vt = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(Ce, {
491
492
  content: e,
492
493
  locale: n
493
- }), vt = () => {
494
- var T, I, B, v;
494
+ }), Dt = () => {
495
+ var S, B, I, v;
495
496
  const { t: e } = re(), { disabled: n, readOnly: r } = V(), l = !n && !r, s = pe({
496
497
  globalClasses: de,
497
498
  moduleClasses: {
@@ -499,26 +500,26 @@ const at = (e) => /* @__PURE__ */ t.createElement("svg", {
499
500
  hover: D.dropZoneHover
500
501
  }
501
502
  }), d = pe({
502
- globalClasses: Oe,
503
+ globalClasses: Ue,
503
504
  moduleClasses: {
504
505
  base: D.button,
505
506
  hover: D.buttonHover
506
507
  }
507
- }), E = (v = (B = (I = (T = Te().fileUpload) == null ? void 0 : T.elementProps) == null ? void 0 : I.uploadButton) == null ? void 0 : B.elementProps) == null ? void 0 : v.icon, { wix: L, className: o, ...i } = E ?? {}, C = Be(te.FILE_UPLOAD, te.UPLOAD_BUTTON, te.UPLOAD_BUTTON_LABEL), m = H(null), [p, c] = Y(!1), [y, N] = Y(!1), M = Z(() => {
508
+ }), E = (v = (I = (B = (S = Ie().fileUpload) == null ? void 0 : S.elementProps) == null ? void 0 : B.uploadButton) == null ? void 0 : I.elementProps) == null ? void 0 : v.icon, { wix: h, className: o, ...i } = E ?? {}, N = Be(te.FILE_UPLOAD, te.UPLOAD_BUTTON, te.UPLOAD_BUTTON_LABEL), m = H(null), [p, c] = q(!1), [y, b] = q(!1), Z = M(() => {
508
509
  var u;
509
510
  c(!0), (u = m.current) == null || u.runAnimationForward();
510
- }, []), g = Z(() => {
511
+ }, []), g = M(() => {
511
512
  var u;
512
513
  c(!1), (u = m.current) == null || u.runAnimationBackward();
513
514
  }, []);
514
515
  return /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
515
- className: A(Ie, q.label)
516
+ className: R(we, j.label)
516
517
  }, /* @__PURE__ */ t.createElement(a.Label.Required, {
517
- className: A(we, q.requiredMark)
518
+ className: R(Re, j.requiredMark)
518
519
  })), /* @__PURE__ */ t.createElement(a.DropZone, {
519
- className: ({ isHovered: u, isFocused: w, isDropTarget: S }) => s({
520
+ className: ({ isHovered: u, isFocused: w, isDropTarget: T }) => s({
520
521
  isSelected: !1,
521
- isHovered: u || S,
522
+ isHovered: u || T,
522
523
  isFocused: w,
523
524
  isInteractive: l
524
525
  })
@@ -534,40 +535,40 @@ const at = (e) => /* @__PURE__ */ t.createElement("svg", {
534
535
  isInteractive: l
535
536
  }),
536
537
  "aria-roledescription": e("file-upload.aria-roledescription"),
537
- onHoverStart: M,
538
+ onHoverStart: Z,
538
539
  onHoverEnd: g,
539
- onFocusChange: N
540
+ onFocusChange: b
540
541
  }, i.svg ? /* @__PURE__ */ t.createElement(he, {
541
542
  ...i,
542
543
  ref: m,
543
- className: A(Ae, Re, o)
544
- }) : E ? null : /* @__PURE__ */ t.createElement(at, null), /* @__PURE__ */ t.createElement(a.DropZone.Button.Text, {
545
- className: A(ue.base, D.buttonLabel, C, {
544
+ className: R(Ae, Me, o)
545
+ }) : E ? null : /* @__PURE__ */ t.createElement(st, null), /* @__PURE__ */ t.createElement(a.DropZone.Button.Text, {
546
+ className: R(ue.base, D.buttonLabel, N, {
546
547
  [ue.hover]: l && (p || y)
547
548
  })
548
549
  }))), /* @__PURE__ */ t.createElement(a.Explanation, {
549
- className: A(Ze, q.description, D.explanation),
550
+ className: R(Ze, j.description, D.explanation),
550
551
  showUploadStatusOnly: !0
551
552
  }), /* @__PURE__ */ t.createElement(a.Files, {
552
553
  className: D.files
553
554
  }, /* @__PURE__ */ t.createElement(a.Files.File, {
554
- className: A(de.base, D.file)
555
+ className: R(de.base, D.file)
555
556
  }, /* @__PURE__ */ t.createElement(a.Files.File.Name, {
556
557
  className: D.fileName
557
558
  }), /* @__PURE__ */ t.createElement(a.Files.File.Spinner, {
558
559
  className: D.spinner,
559
560
  "aria-label": e("file-upload.file.uploading-spinner.aria-label")
560
- }, /* @__PURE__ */ t.createElement(ct, null)), /* @__PURE__ */ t.createElement(a.Files.File.Remove, {
561
+ }, /* @__PURE__ */ t.createElement(ut, null)), /* @__PURE__ */ t.createElement(a.Files.File.Remove, {
561
562
  className: D.removeButton,
562
563
  "aria-label": e("file-upload.delete-file.aria-label")
563
- }, /* @__PURE__ */ t.createElement(it, null)), /* @__PURE__ */ t.createElement(a.Files.File.Error, {
564
- className: A(me, q.error, D.fileError)
565
- }, /* @__PURE__ */ t.createElement(st, null), /* @__PURE__ */ t.createElement(a.Files.File.Error.Text, null)))), /* @__PURE__ */ t.createElement(a.Description, {
566
- className: A(Me, q.description)
567
- }, Nt), /* @__PURE__ */ t.createElement(a.Error, {
568
- className: A(me, q.error)
569
- }, /* @__PURE__ */ t.createElement(Ue, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)));
570
- }, kt = () => /* @__PURE__ */ t.createElement(vt, null);
564
+ }, /* @__PURE__ */ t.createElement(ct, null)), /* @__PURE__ */ t.createElement(a.Files.File.Error, {
565
+ className: R(me, j.error, D.fileError)
566
+ }, /* @__PURE__ */ t.createElement(it, null), /* @__PURE__ */ t.createElement(a.Files.File.Error.Text, null)))), /* @__PURE__ */ t.createElement(a.Description, {
567
+ className: R(Oe, j.description)
568
+ }, vt), /* @__PURE__ */ t.createElement(a.Error, {
569
+ className: R(me, j.error)
570
+ }, /* @__PURE__ */ t.createElement(ke, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)));
571
+ }, Pt = () => /* @__PURE__ */ t.createElement(Dt, null);
571
572
  export {
572
- kt as FileUploadRAC
573
+ Pt as FileUploadRAC
573
574
  };