@wix/form-elements 1.84.0 → 1.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 (107) hide show
  1. package/dist/component/{appointment-rac-BSy3u0GK.js → appointment-rac-CCaJ6P5r.js} +78 -78
  2. package/dist/component/{bookings-address-rac-CL7Bh1yH.js → bookings-address-rac-DEt9SGPG.js} +1 -1
  3. package/dist/component/{bookings-email-rac-Bw9tj_tv.js → bookings-email-rac-BydOvOUZ.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-BOOu_AXM.js → bookings-first-name-rac-BoQki0Pb.js} +1 -1
  5. package/dist/component/{bookings-header-rac-3kBei7GF.js → bookings-header-rac-DK-EcXrk.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-CUKbu22q.js → bookings-last-name-rac-BuGIyd43.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-CLrUhdX2.js → bookings-login-bar-rac-Cr500ehb.js} +6 -6
  8. package/dist/component/{bookings-phone-rac-7DViellg.js → bookings-phone-rac-Bq2zdMxo.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-CIUZX--G.js → bookings-rich-text-rac-DRmfusX9.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-C_jth3RK.js → checkbox-field-rac-b9mcZlMP.js} +5 -5
  11. package/dist/component/{checkbox-group-field-headless-D-c9Kyj8.js → checkbox-group-field-headless-BSNhdCfs.js} +30 -30
  12. package/dist/component/{checkbox-group-field-rac-MgGUuYII.js → checkbox-group-field-rac-BObfui8r.js} +6 -6
  13. package/dist/component/{checkbox-group-rac-rr1mN2EJ.js → checkbox-group-rac-CBNMgBHU.js} +1 -1
  14. package/dist/component/{checkbox-rac-CRsLQKhN.js → checkbox-rac-DXh-i6Ot.js} +1 -1
  15. package/dist/component/{contacts-address-rac-BFlNbQKh.js → contacts-address-rac-BDQLFakc.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-D7Ww3iAz.js → contacts-birthdate-rac-BUMVVVfb.js} +1 -1
  17. package/dist/component/{contacts-company-rac-DLl4nqH-.js → contacts-company-rac-CidGcaA3.js} +1 -1
  18. package/dist/component/{contacts-email-rac-K8fCs8qS.js → contacts-email-rac-GePAhKDQ.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-BOTxHl3m.js → contacts-first-name-rac-kw5sIBEE.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-bFnG-7Hm.js → contacts-last-name-rac-DzoZKs1n.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-B4teqDIV.js → contacts-phone-rac-CxVW4Zp0.js} +1 -1
  22. package/dist/component/{contacts-position-rac-CnWoXO5h.js → contacts-position-rac-CXFxlSty.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-Bco722BU.js → contacts-subscribe-rac-kpRGeELB.js} +2 -2
  24. package/dist/component/{contacts-tax-id-rac-QQsKhAx3.js → contacts-tax-id-rac-B5qw-rtP.js} +1 -1
  25. package/dist/component/{date-availability-DMbyb1GZ.js → date-availability-BCDMem-_.js} +1 -1
  26. package/dist/component/{date-input-field-rac-CVRjO19U.js → date-input-field-rac-BLDZ4_Mw.js} +43 -43
  27. package/dist/component/{date-input-rac-zi7AQ8Ai.js → date-input-rac-B1WGYKOp.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-5H10gH9D.js → date-picker-field-rac-BNd8aZ0c.js} +20 -20
  29. package/dist/component/{date-picker-rac-CxWNDsyJ.js → date-picker-rac-ItWxSngw.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-CDa-nyf8.js → date-time-input-field-rac-Ch8z0NRT.js} +5 -5
  31. package/dist/component/{date-time-input-rac-DglwFYb0.js → date-time-input-rac-FebIovNN.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-BBB652Uy.js → dext-checkbox-group-rac-BXYHMQ3R.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-BVtiGV3w.js → dext-checkbox-rac-C78ScIGY.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-Di4x6sI_.js → dext-date-picker-rac-BptT4fhe.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-agWHwUo7.js → dext-date-time-input-rac-RWJ51IjA.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-U3FZTA2-.js → dext-dropdown-rac-DZDOtSIG.js} +1 -1
  37. package/dist/component/{dext-email-rac-CZ9AQw_k.js → dext-email-rac-CJceqZsw.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-DFr_9ZX5.js → dext-number-input-rac-buSXk49E.js} +1 -1
  39. package/dist/component/{dext-phone-rac-BYsfNwXn.js → dext-phone-rac-CeHUOWck.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-B_jm5YAT.js → dext-radio-group-rac-CNyNSfeP.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-CNlhMKt-.js → dext-rating-input-rac-mmdh9tYT.js} +1 -1
  42. package/dist/component/{dext-tags-rac-y9x8Fg54.js → dext-tags-rac-CqJ4iv-V.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-BgRxIpn9.js → dext-text-area-rac-P1EzLNDE.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-CdzgUZ38.js → dext-text-input-rac-Dtz4ZLj7.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-Cg1TYyNV.js → dext-url-input-rac-DUVbW2yl.js} +1 -1
  46. package/dist/component/{donation-rac-Deiw7Tl9.js → donation-rac-Nn7z8_to.js} +43 -43
  47. package/dist/component/{dropdown-field-headless-BKj2rdy9.js → dropdown-field-headless-CT4uSCPR.js} +11 -11
  48. package/dist/component/{dropdown-field-rac-CIdC2_O3.js → dropdown-field-rac-CUiyFJi_.js} +5 -5
  49. package/dist/component/{dropdown-rac-CYxaJrXP.js → dropdown-rac-Bs_PVy1q.js} +1 -1
  50. package/dist/component/{ecom-address-rac-Crr3A_iU.js → ecom-address-rac-BTXwDlMM.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-DdXAex4c.js → ecom-subscription-checkbox-rac-CGI84A37.js} +3 -3
  52. package/dist/component/{email-input-field-rac-C516Fm0v.js → email-input-field-rac-DKD7FsQX.js} +54 -54
  53. package/dist/component/{events-repeater-rac-DL49KaIU.js → events-repeater-rac-B7yIRlyt.js} +30 -30
  54. package/dist/component/{events-rsvp-rac-B5EvAP8x.js → events-rsvp-rac-C7FOuFmH.js} +3 -3
  55. package/dist/component/{field-error-headless-D2CJ4Qk7.js → field-error-headless-BHTkMu35.js} +1 -1
  56. package/dist/component/{field-label-headless-D2-WvVKT.js → field-label-headless-D3DwX65k.js} +7 -7
  57. package/dist/component/{file-upload-rac-BG3msdbn.js → file-upload-rac-B3n_LYYK.js} +85 -85
  58. package/dist/component/{fixed-payment-rac-3bI_h_W0.js → fixed-payment-rac-C6jsiS4-.js} +12 -12
  59. package/dist/component/{form-B3KiRFhB.js → form-BkmOXzqo.js} +2510 -2487
  60. package/dist/component/{form-element-classes-Ct1UaxuQ.js → form-element-classes-BsXkFtp2.js} +90 -57
  61. package/dist/component/form.css +1 -1
  62. package/dist/component/form.js +1 -1
  63. package/dist/component/{header-field-rac-Bp7hStrt.js → header-field-rac-FG9EP9--.js} +5 -5
  64. package/dist/component/{header-rac-yVYId2B_.js → header-rac-DZZgqFjW.js} +1 -1
  65. package/dist/component/{image-choice-rac-D1mqJfcn.js → image-choice-rac-CXgE6z_f.js} +42 -42
  66. package/dist/component/{index-LrdDmlej.js → index-CSwTHDCX.js} +2 -2
  67. package/dist/component/{index-B0PANcv8.js → index-DKV2sNhD.js} +4 -4
  68. package/dist/component/{isObjectLike-DH7T0Txd.js → isObjectLike-DYfHbEQ3.js} +1 -1
  69. package/dist/component/{multiline-address-field-rac-C-gtuNCU.js → multiline-address-field-rac-DnCOKW8F.js} +128 -128
  70. package/dist/component/{multiline-address-rac-B3ixmNqi.js → multiline-address-rac-BZRlzLZq.js} +1 -1
  71. package/dist/component/{number-input-field-rac-BNPMYFay.js → number-input-field-rac-BOJNJ50c.js} +30 -30
  72. package/dist/component/{number-input-rac-BaEBt2uf.js → number-input-rac-D8ZcIPwq.js} +1 -1
  73. package/dist/component/{password-rac-B0H_ILkt.js → password-rac-T9PR5j2v.js} +19 -19
  74. package/dist/component/{payment-input-rac-LIk9MP5a.js → payment-input-rac-C9N3LZOZ.js} +17 -17
  75. package/dist/component/{phone-input-field-rac-CUUAacDK.js → phone-input-field-rac-BxUiCV5Z.js} +40 -40
  76. package/dist/component/{phone-rac-BYqYOw60.js → phone-rac-BjKFrr86.js} +1 -1
  77. package/dist/component/{product-list-rac-CvoI6ajr.js → product-list-rac-BG-VK_Hz.js} +41 -41
  78. package/dist/component/{quiz-radio-group-rac-D0IJGSh0.js → quiz-radio-group-rac-B1x7Yatu.js} +2 -2
  79. package/dist/component/{radio-button-module-classes-CWfSY9kQ.js → radio-button-module-classes-BXWANbga.js} +7 -7
  80. package/dist/component/{radio-group-field-rac-DisEhh0b.js → radio-group-field-rac-DmEOydAr.js} +4 -4
  81. package/dist/component/{radio-group-rac-DrwjFNWh.js → radio-group-rac-DAcU_lkj.js} +1 -1
  82. package/dist/component/{rating-input-field-rac-BLMQWT7z.js → rating-input-field-rac-Cazqeqzw.js} +16 -16
  83. package/dist/component/{rating-input-rac-CGJY2HSO.js → rating-input-rac-KJ8FnJTj.js} +1 -1
  84. package/dist/component/{rich-content-rac.module-C9cKdumu.js → rich-content-rac.module-PZgMV2M7.js} +1 -1
  85. package/dist/component/{rich-text-field-rac-DTSRvaTK.js → rich-text-field-rac-DNEeY_m8.js} +3 -3
  86. package/dist/component/{rich-text-rac-Blk3neHN.js → rich-text-rac-g9upYD25.js} +1 -1
  87. package/dist/component/{service-dropdown-rac-C9P5IWrV.js → service-dropdown-rac-CmmWetDa.js} +20 -20
  88. package/dist/component/{services-multi-choice-rac-Cnhwy1a9.js → services-multi-choice-rac-D0PJNlq2.js} +7 -7
  89. package/dist/component/{signature-rac-Benar-ci.js → signature-rac-Q4G3uEhw.js} +41 -41
  90. package/dist/component/submit-button-rac-DdLPGJ6v.js +141 -0
  91. package/dist/component/{tags-field-rac-wA_0ZinI.js → tags-field-rac-PZ8Vfmsn.js} +72 -72
  92. package/dist/component/{tags-rac-BcVGekA6.js → tags-rac-DLjeR5G1.js} +1 -1
  93. package/dist/component/{text-area-field-rac-VpuojNac.js → text-area-field-rac-BNVK0R0Z.js} +25 -25
  94. package/dist/component/{text-area-rac-DDvi8u5M.js → text-area-rac-CNOLe3Vx.js} +1 -1
  95. package/dist/component/{text-input-field-rac-C6LohBtn.js → text-input-field-rac-DjdW6TCf.js} +3 -3
  96. package/dist/component/{text-input-headless-5yKhWpLD.js → text-input-headless-DFWQwZAN.js} +10 -10
  97. package/dist/component/{text-input-rac-C8hsNUp6.js → text-input-rac-GXPtQEjT.js} +1 -1
  98. package/dist/component/{time-input-rac-fOT-pjju.js → time-input-rac-B_g-erqu.js} +19 -19
  99. package/dist/component/{url-input-field-rac-DxR6Hymf.js → url-input-field-rac-CXWYeQLf.js} +19 -19
  100. package/dist/component/{url-input-rac-B928R10o.js → url-input-rac-DX-vjyXj.js} +1 -1
  101. package/dist/component/use-element-state-class-name-lZnP6sE6.js +22 -0
  102. package/dist/component/{use-service-options-base-UyJmT2P6.js → use-service-options-base-BJE86Rzo.js} +5 -5
  103. package/dist/component/{use-text-input-class-name-Qk2v8a6-.js → use-text-input-class-name-B-GYaltW.js} +5 -5
  104. package/dist/form.d.ts +58 -2
  105. package/package.json +5 -3
  106. package/dist/component/submit-button-rac-BDJQsZC3.js +0 -116
  107. package/dist/component/use-element-state-class-name-CBjBYCW5.js +0 -20
@@ -1,13 +1,13 @@
1
1
  import t, { useState as Q, useRef as V, useMemo as oe, useEffect as se, useCallback as P, createContext as pe, useContext as fe } from "react";
2
2
  import { RicosViewer as Ee } from "@wix/ricos/viewer";
3
3
  import B from "classnames";
4
- import { ae as Fe, as as ie, an as ge, i as he, aq as xe, e as re, ar as be, af as ce, ai as q, ak as Ce } from "./form-B3KiRFhB.js";
4
+ import { af as Fe, at as ie, ao as ge, i as he, ar as xe, e as re, as as be, ag as ce, aj as j, al as Ce } from "./form-BkmOXzqo.js";
5
5
  import { E as Le } from "./error-icon-hZxQ6DEy.js";
6
6
  import { s as I } from "./field-rac.module-D06m9T9x.js";
7
- import { y as ne, O as De, a2 as Ne, i as ae, o as le } from "./form-element-classes-Ct1UaxuQ.js";
7
+ import { y as ne, P as De, a3 as Ne, i as le, o as ae } from "./form-element-classes-BsXkFtp2.js";
8
8
  import { f as h, a as z } from "./find-child-C60k4CxG.js";
9
- import { b as ye, a as ve, D as _e, E as Te } from "./field-error-headless-D2CJ4Qk7.js";
10
- import { L as Be } from "./field-label-headless-D2-WvVKT.js";
9
+ import { b as ye, a as ve, D as _e, E as Te } from "./field-error-headless-BHTkMu35.js";
10
+ import { L as Be } from "./field-label-headless-D3DwX65k.js";
11
11
  import { DropZone as Re, Text as Se, FileTrigger as Me, Button as de, ProgressBar as Ie } from "react-aria-components";
12
12
  const we = {
13
13
  Video: "video/*",
@@ -21,32 +21,32 @@ const we = {
21
21
  return async (o, i, d) => {
22
22
  if (!(r != null && r.uploadFile) || !o.length)
23
23
  return r != null && r.uploadFile || console.error("No uploadFile action"), o.length || console.error("No files to upload"), [];
24
- const x = o.map(({ file: a }) => r.uploadFile({
25
- file: a,
24
+ const x = o.map(({ file: l }) => r.uploadFile({
25
+ file: l,
26
26
  formId: n,
27
27
  uploadTarget: e
28
28
  }).then((s) => {
29
29
  const { id: b, displayName: m, url: c, isPrivate: N } = s, y = {
30
30
  fileId: b,
31
- displayName: m || a.name,
31
+ displayName: m || l.name,
32
32
  url: N ? void 0 : c,
33
- fileType: a.type || "application/octet-stream"
33
+ fileType: l.type || "application/octet-stream"
34
34
  };
35
35
  return i({
36
- file: a,
36
+ file: l,
37
37
  uploadedFile: y
38
38
  }), y;
39
39
  }).catch((s) => {
40
- d(s, a);
40
+ d(s, l);
41
41
  }));
42
- return (await Promise.all(x)).filter((a) => a !== void 0);
42
+ return (await Promise.all(x)).filter((l) => l !== void 0);
43
43
  };
44
44
  };
45
45
  function Ze({ valueSliderLimit: e, value: r, explanationText: n, target: o, onChange: i, uploadFileFormats: d, onBlur: x, onFilesCleared: D }) {
46
- const [a, s] = Q(ke(r)), [b, m] = Q(r || []), [c, N] = Q(), y = Ae(o), { t: E } = ie(), k = ge().includes(he.BUTTONS_HOVER), { setFormStatus: v } = xe(), S = V(!1), _ = V(i);
46
+ const [l, s] = Q(Ue(r)), [b, m] = Q(r || []), [c, N] = Q(), y = Ae(o), { t: E } = ie(), U = ge().includes(he.BUTTONS_HOVER), { setFormStatus: v } = xe(), S = V(!1), _ = V(i);
47
47
  _.current = i;
48
- const C = oe(() => a.some((u) => u.state === "uploading"), [
49
- a
48
+ const C = oe(() => l.some((u) => u.state === "uploading"), [
49
+ l
50
50
  ]);
51
51
  se(() => {
52
52
  S.current !== C && (S.current = C, v(o, C ? re.BUSY : re.READY));
@@ -55,21 +55,21 @@ function Ze({ valueSliderLimit: e, value: r, explanationText: n, target: o, onCh
55
55
  v,
56
56
  o
57
57
  ]);
58
- const U = P(() => {
59
- if (!a.length)
58
+ const k = P(() => {
59
+ if (!l.length)
60
60
  return n;
61
- const F = a.filter((u) => u.state === "uploading").length;
61
+ const F = l.filter((u) => u.state === "uploading").length;
62
62
  if (F) {
63
- const u = a.filter((p) => p.state === "uploaded" && p.file.size > 0).length, g = u / (u + F);
63
+ const u = l.filter((p) => p.state === "uploaded" && p.file.size > 0).length, g = u / (u + F);
64
64
  return E("form.file-upload.uploading", {
65
65
  count: Math.round(g * 100)
66
66
  });
67
67
  }
68
68
  return n || E("form.file-upload.explanation-text", {
69
- count: a.length
69
+ count: l.length
70
70
  });
71
71
  }, [
72
- a,
72
+ l,
73
73
  n,
74
74
  E
75
75
  ]), M = P(async (F) => {
@@ -96,30 +96,30 @@ function Ze({ valueSliderLimit: e, value: r, explanationText: n, target: o, onCh
96
96
  E
97
97
  ]), O = async (F) => {
98
98
  if (c && N(void 0), F) {
99
- if (a.length + F.length > e) {
99
+ if (l.length + F.length > e) {
100
100
  N(E("form.file-upload.error.upload-limit", {
101
101
  limit: e
102
102
  }));
103
103
  return;
104
104
  }
105
- const p = Array.from(F).reduce((f, L) => (a.some((Y) => Y.file.name === L.name) || f.push({
105
+ const p = Array.from(F).reduce((f, L) => (l.some((Y) => Y.file.name === L.name) || f.push({
106
106
  file: L,
107
107
  state: "uploading"
108
108
  }), f), []);
109
109
  s([
110
- ...a,
110
+ ...l,
111
111
  ...p
112
112
  ]), await M(p);
113
113
  }
114
- }, j = (F) => {
115
- const u = a[F];
114
+ }, q = (F) => {
115
+ const u = l[F];
116
116
  if (b && i && u.state !== "error") {
117
117
  const g = b.filter((f) => f.displayName !== u.file.name);
118
118
  i(g), m(g);
119
- const p = a.filter((f) => f.file.name !== u.file.name);
119
+ const p = l.filter((f) => f.file.name !== u.file.name);
120
120
  s(p), p.length === 0 && D();
121
121
  } else {
122
- const g = a.filter((p) => p !== u);
122
+ const g = l.filter((p) => p !== u);
123
123
  s(g), g.length === 0 && D();
124
124
  }
125
125
  }, $ = () => {
@@ -128,17 +128,17 @@ function Ze({ valueSliderLimit: e, value: r, explanationText: n, target: o, onCh
128
128
  s([]), m([]);
129
129
  }, []);
130
130
  return be(W), {
131
- files: a,
131
+ files: l,
132
132
  limitError: c,
133
- hover: k,
134
- getExplanationText: U,
133
+ hover: U,
134
+ getExplanationText: k,
135
135
  handleChange: O,
136
- handleDelete: j,
136
+ handleDelete: q,
137
137
  accept: K,
138
138
  handleBlur: $
139
139
  };
140
140
  }
141
- function ke(e = []) {
141
+ function Ue(e = []) {
142
142
  const r = e || [];
143
143
  try {
144
144
  return r.map((n) => ({
@@ -162,7 +162,7 @@ function Z() {
162
162
  return e;
163
163
  }
164
164
  const A = ({ children: e, className: r }) => {
165
- const { ariaDescribedBy: n } = ce(), { disabled: o, hasError: i } = q(), { handleFileChange: d } = Z(), x = h(e, A.Title), D = h(e, A.Subtitle), a = h(e, A.Button);
165
+ const { ariaDescribedBy: n } = ce(), { disabled: o, hasError: i } = j(), { handleFileChange: d } = Z(), x = h(e, A.Title), D = h(e, A.Subtitle), l = h(e, A.Button);
166
166
  return /* @__PURE__ */ t.createElement(Re, {
167
167
  "aria-describedby": n,
168
168
  className: r,
@@ -182,8 +182,8 @@ const A = ({ children: e, className: r }) => {
182
182
  }
183
183
  }, /* @__PURE__ */ t.createElement(Se, {
184
184
  slot: "label"
185
- }, x, D), a);
186
- }, Ue = ({ className: e, children: r }) => {
185
+ }, x, D), l);
186
+ }, ke = ({ className: e, children: r }) => {
187
187
  const { limitReached: n } = Z();
188
188
  return /* @__PURE__ */ t.createElement("p", {
189
189
  className: e
@@ -198,14 +198,14 @@ const A = ({ children: e, className: r }) => {
198
198
  limitReached: n
199
199
  }));
200
200
  }, J = ({ className: e, children: r, "aria-roledescription": n }) => {
201
- const { ariaDescribedBy: o, inputId: i, labelId: d, errorId: x } = ce(), { disabled: D, required: a, onFocus: s, hasError: b, errorMessage: m } = q(), { handleFileChange: c, accept: N, multiple: y, buttonRef: E, handleBlur: R, limitError: k, files: v } = Z(), S = (v == null ? void 0 : v.some((C) => C.errorMessage)) ?? !1, _ = !!(b || m || k || S);
201
+ const { ariaDescribedBy: o, inputId: i, labelId: d, errorId: x } = ce(), { disabled: D, required: l, onFocus: s, hasError: b, errorMessage: m } = j(), { handleFileChange: c, accept: N, multiple: y, buttonRef: E, handleBlur: R, limitError: U, files: v } = Z(), S = (v == null ? void 0 : v.some((C) => C.errorMessage)) ?? !1, _ = !!(b || m || U || S);
202
202
  return /* @__PURE__ */ t.createElement(Me, {
203
203
  acceptedFileTypes: N ? N.split(",") : void 0,
204
204
  allowsMultiple: y,
205
205
  onSelect: (C) => {
206
206
  if (C) {
207
- const U = Array.from(C), M = new DataTransfer();
208
- U.forEach((O) => M.items.add(O)), c(M.files);
207
+ const k = Array.from(C), M = new DataTransfer();
208
+ k.forEach((O) => M.items.add(O)), c(M.files);
209
209
  }
210
210
  }
211
211
  }, /* @__PURE__ */ t.createElement(de, {
@@ -220,7 +220,7 @@ const A = ({ children: e, className: r }) => {
220
220
  ...C,
221
221
  "aria-roledescription": n,
222
222
  "aria-invalid": _ || void 0,
223
- "aria-required": a
223
+ "aria-required": l
224
224
  }),
225
225
  isDisabled: D,
226
226
  className: e,
@@ -228,22 +228,22 @@ const A = ({ children: e, className: r }) => {
228
228
  onBlur: R
229
229
  }, r));
230
230
  }, Pe = ({ className: e }) => {
231
- const { buttonText: r } = q();
231
+ const { buttonText: r } = j();
232
232
  return /* @__PURE__ */ t.createElement("span", {
233
233
  className: e
234
234
  }, r);
235
235
  };
236
236
  J.Text = Pe;
237
- A.Title = Ue;
237
+ A.Title = ke;
238
238
  A.Subtitle = Oe;
239
239
  A.Button = J;
240
240
  const T = ({ children: e, className: r, ...n }) => {
241
- const { file: o, index: i } = n, d = o.file.name, x = h(e, T.Name), D = h(e, T.Remove), a = h(e, T.Spinner), s = h(e, T.Error);
241
+ const { file: o, index: i } = n, d = o.file.name, x = h(e, T.Name), D = h(e, T.Remove), l = h(e, T.Spinner), s = h(e, T.Error);
242
242
  return /* @__PURE__ */ t.createElement("div", {
243
243
  className: r
244
244
  }, z(x, {
245
245
  fileName: d
246
- }), o.state === "uploading" ? a : z(D, {
246
+ }), o.state === "uploading" ? l : z(D, {
247
247
  index: i,
248
248
  fileName: d
249
249
  }), o.errorMessage && z(s, {
@@ -255,15 +255,15 @@ const T = ({ children: e, className: r, ...n }) => {
255
255
  className: e
256
256
  }, n);
257
257
  }, Ve = ({ className: e, "aria-label": r, children: n, ...o }) => {
258
- const { fileName: i, index: d } = o, { disabled: x } = q(), { handleDelete: D, fileRemoveButtonRefs: a } = Z(), s = V(null);
258
+ const { fileName: i, index: d } = o, { disabled: x } = j(), { handleDelete: D, fileRemoveButtonRefs: l } = Z(), s = V(null);
259
259
  se(() => {
260
- const m = a.current, c = i;
260
+ const m = l.current, c = i;
261
261
  return m[c] = s, () => {
262
262
  m[c] === s && (m[c] = void 0);
263
263
  };
264
264
  }, [
265
265
  i,
266
- a
266
+ l
267
267
  ]);
268
268
  const b = () => {
269
269
  D(d);
@@ -285,14 +285,14 @@ const T = ({ children: e, className: r, ...n }) => {
285
285
  className: e,
286
286
  role: "alert"
287
287
  }, r)) : null;
288
- }, qe = ({ className: e, "aria-label": r, children: n }) => /* @__PURE__ */ t.createElement(Ie, {
288
+ }, je = ({ className: e, "aria-label": r, children: n }) => /* @__PURE__ */ t.createElement(Ie, {
289
289
  "aria-label": r,
290
290
  className: e,
291
291
  isIndeterminate: !0
292
292
  }, n);
293
293
  T.Name = ze;
294
294
  T.Remove = Ve;
295
- T.Spinner = qe;
295
+ T.Spinner = je;
296
296
  T.Error = ue;
297
297
  ue.Text = ye;
298
298
  const X = ({ children: e, className: r }) => {
@@ -306,18 +306,18 @@ const X = ({ children: e, className: r }) => {
306
306
  })));
307
307
  };
308
308
  X.File = T;
309
- const G = (e) => e.file.name, l = ({ children: e }) => {
310
- const { id: r, value: n, onChange: o, uploadFileFormats: i, valueSliderLimit: d, target: x, explanationText: D, onBlur: a, hasError: s, errorMessage: b, FieldLayout: m } = q(), c = V(null), N = V({}), y = P(() => {
309
+ const G = (e) => e.file.name, a = ({ children: e }) => {
310
+ const { id: r, value: n, onChange: o, uploadFileFormats: i, valueSliderLimit: d, target: x, explanationText: D, onBlur: l, hasError: s, errorMessage: b, FieldLayout: m } = j(), c = V(null), N = V({}), y = P(() => {
311
311
  var L;
312
312
  (L = c.current) == null || L.focus();
313
- }, []), { files: E, limitError: R, hover: k, getExplanationText: v, handleBlur: S, handleChange: _, handleDelete: C, accept: U } = Ze({
313
+ }, []), { files: E, limitError: R, hover: U, getExplanationText: v, handleBlur: S, handleChange: _, handleDelete: C, accept: k } = Ze({
314
314
  valueSliderLimit: d,
315
315
  value: n,
316
316
  explanationText: D,
317
317
  target: x,
318
318
  onChange: o,
319
319
  uploadFileFormats: i,
320
- onBlur: a,
320
+ onBlur: l,
321
321
  onFilesCleared: y
322
322
  }), M = P((L) => {
323
323
  var te;
@@ -326,16 +326,16 @@ const G = (e) => e.file.name, l = ({ children: e }) => {
326
326
  }, [
327
327
  C,
328
328
  E
329
- ]), O = d > 1, j = E.length >= d, $ = oe(() => ({
329
+ ]), O = d > 1, q = E.length >= d, $ = oe(() => ({
330
330
  handleFileChange: _,
331
331
  handleBlur: S,
332
332
  handleDelete: M,
333
333
  files: E,
334
- accept: U,
335
- limitReached: j,
334
+ accept: k,
335
+ limitReached: q,
336
336
  multiple: O,
337
337
  getExplanationText: v,
338
- hover: k,
338
+ hover: U,
339
339
  limitError: R,
340
340
  buttonRef: c,
341
341
  fileRemoveButtonRefs: N
@@ -344,13 +344,13 @@ const G = (e) => e.file.name, l = ({ children: e }) => {
344
344
  S,
345
345
  M,
346
346
  E,
347
- U,
348
- j,
347
+ k,
348
+ q,
349
349
  O,
350
350
  v,
351
- k,
351
+ U,
352
352
  R
353
- ]), K = h(e, l.Label), W = h(e, l.DropZone), F = h(e, l.Button), u = h(e, l.Explanation), g = h(e, l.Files), p = h(e, l.Description), f = h(e, l.Error);
353
+ ]), K = h(e, a.Label), W = h(e, a.DropZone), F = h(e, a.Button), u = h(e, a.Explanation), g = h(e, a.Files), p = h(e, a.Description), f = h(e, a.Error);
354
354
  return Ce(() => {
355
355
  var L;
356
356
  (L = c.current) == null || L.focus();
@@ -365,19 +365,19 @@ const G = (e) => e.file.name, l = ({ children: e }) => {
365
365
  errorMessage: R ?? b
366
366
  }), p, u, g)
367
367
  }));
368
- }, je = ({ className: e }) => {
368
+ }, qe = ({ className: e }) => {
369
369
  const { getExplanationText: r } = Z(), n = r();
370
370
  return n ? /* @__PURE__ */ t.createElement("p", {
371
371
  className: e
372
372
  }, n) : null;
373
373
  };
374
- l.Label = Be;
375
- l.DropZone = A;
376
- l.Button = J;
377
- l.Explanation = je;
378
- l.Files = X;
379
- l.Description = _e;
380
- l.Error = Te;
374
+ a.Label = Be;
375
+ a.DropZone = A;
376
+ a.Button = J;
377
+ a.Explanation = qe;
378
+ a.Files = X;
379
+ a.Description = _e;
380
+ a.Error = Te;
381
381
  const $e = (e) => /* @__PURE__ */ t.createElement("svg", {
382
382
  viewBox: "0 0 24 24",
383
383
  width: 24,
@@ -450,34 +450,34 @@ const $e = (e) => /* @__PURE__ */ t.createElement("svg", {
450
450
  locale: r
451
451
  }), nt = () => {
452
452
  const { t: e } = ie();
453
- return /* @__PURE__ */ t.createElement(l, null, /* @__PURE__ */ t.createElement(l.Label, {
453
+ return /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
454
454
  className: B(ne, I.label)
455
- }, /* @__PURE__ */ t.createElement(l.Label.Required, {
455
+ }, /* @__PURE__ */ t.createElement(a.Label.Required, {
456
456
  className: B(De, I.requiredMark)
457
- })), /* @__PURE__ */ t.createElement(l.Button, {
457
+ })), /* @__PURE__ */ t.createElement(a.Button, {
458
458
  className: B(Ne, I.uploadButton),
459
459
  "aria-roledescription": e("file-upload.aria-roledescription")
460
- }, /* @__PURE__ */ t.createElement($e, null), /* @__PURE__ */ t.createElement(l.Button.Text, null)), /* @__PURE__ */ t.createElement(l.Explanation, {
461
- className: B(ae, I.description, w.explanation)
462
- }), /* @__PURE__ */ t.createElement(l.Files, {
460
+ }, /* @__PURE__ */ t.createElement($e, null), /* @__PURE__ */ t.createElement(a.Button.Text, null)), /* @__PURE__ */ t.createElement(a.Explanation, {
461
+ className: B(le, I.description, w.explanation)
462
+ }), /* @__PURE__ */ t.createElement(a.Files, {
463
463
  className: B(ne, w.files)
464
- }, /* @__PURE__ */ t.createElement(l.Files.File, {
464
+ }, /* @__PURE__ */ t.createElement(a.Files.File, {
465
465
  className: w.file
466
- }, /* @__PURE__ */ t.createElement(l.Files.File.Name, {
466
+ }, /* @__PURE__ */ t.createElement(a.Files.File.Name, {
467
467
  className: w.fileName
468
- }), /* @__PURE__ */ t.createElement(l.Files.File.Spinner, {
468
+ }), /* @__PURE__ */ t.createElement(a.Files.File.Spinner, {
469
469
  className: w.spinner,
470
470
  "aria-label": e("file-upload.file.uploading-spinner.aria-label")
471
- }, /* @__PURE__ */ t.createElement(Ye, null)), /* @__PURE__ */ t.createElement(l.Files.File.Remove, {
471
+ }, /* @__PURE__ */ t.createElement(Ye, null)), /* @__PURE__ */ t.createElement(a.Files.File.Remove, {
472
472
  className: w.removeButton,
473
473
  "aria-label": e("file-upload.delete-file.aria-label")
474
- }, /* @__PURE__ */ t.createElement(We, null)), /* @__PURE__ */ t.createElement(l.Files.File.Error, {
475
- className: B(le, I.error, w.fileError)
476
- }, /* @__PURE__ */ t.createElement(Ke, null), /* @__PURE__ */ t.createElement(l.Files.File.Error.Text, null)))), /* @__PURE__ */ t.createElement(l.Description, {
477
- className: B(ae, I.description)
478
- }, rt), /* @__PURE__ */ t.createElement(l.Error, {
479
- className: B(le, I.error)
480
- }, /* @__PURE__ */ t.createElement(Le, null), /* @__PURE__ */ t.createElement(l.Error.Text, null)));
474
+ }, /* @__PURE__ */ t.createElement(We, null)), /* @__PURE__ */ t.createElement(a.Files.File.Error, {
475
+ className: B(ae, I.error, w.fileError)
476
+ }, /* @__PURE__ */ t.createElement(Ke, null), /* @__PURE__ */ t.createElement(a.Files.File.Error.Text, null)))), /* @__PURE__ */ t.createElement(a.Description, {
477
+ className: B(le, I.description)
478
+ }, rt), /* @__PURE__ */ t.createElement(a.Error, {
479
+ className: B(ae, I.error)
480
+ }, /* @__PURE__ */ t.createElement(Le, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)));
481
481
  }, Ft = () => /* @__PURE__ */ t.createElement(nt, null);
482
482
  export {
483
483
  Ft as FileUploadRAC
@@ -1,18 +1,18 @@
1
1
  import t, { useMemo as _ } from "react";
2
2
  import { RicosViewer as A } from "@wix/ricos/viewer";
3
3
  import u from "classnames";
4
- import { ai as C, ab as I, af as P } from "./form-B3KiRFhB.js";
4
+ import { aj as C, ab as I, ag as P } from "./form-BkmOXzqo.js";
5
5
  import { f as c, a as O } from "./find-child-C60k4CxG.js";
6
6
  import { f as S } from "./format-currency-BwShJ9vM.js";
7
- import { D as x, E as N } from "./field-error-headless-D2CJ4Qk7.js";
8
- import { L as R } from "./field-label-headless-D2-WvVKT.js";
7
+ import { D as x, E as N } from "./field-error-headless-BHTkMu35.js";
8
+ import { L as R } from "./field-label-headless-D3DwX65k.js";
9
9
  import { s as L } from "./field-rac.module-D06m9T9x.js";
10
- import { y as v, z as M, i as g } from "./form-element-classes-Ct1UaxuQ.js";
10
+ import { y as v, z as g, i as M } from "./form-element-classes-BsXkFtp2.js";
11
11
  const e = ({ children: r }) => {
12
12
  var p;
13
13
  const { id: n, validation: a, FieldLayout: l } = C(), { currency: o, regionalFormat: m } = I(), s = _(() => {
14
- var d, f, E;
15
- return (E = (f = (d = a == null ? void 0 : a.predefined) == null ? void 0 : d.paymentOptions) == null ? void 0 : f.products) == null ? void 0 : E[0];
14
+ var d, E, f;
15
+ return (f = (E = (d = a == null ? void 0 : a.predefined) == null ? void 0 : d.paymentOptions) == null ? void 0 : E.products) == null ? void 0 : f[0];
16
16
  }, [
17
17
  a
18
18
  ]), i = (p = s == null ? void 0 : s.fixedPriceOptions) == null ? void 0 : p.price, y = c(r, e.Label), F = c(r, e.Amount), b = c(r, e.Description), D = c(r, e.Error);
@@ -45,18 +45,18 @@ e.Label = T;
45
45
  e.Amount = B;
46
46
  e.Description = x;
47
47
  e.Error = N;
48
- const V = "_value_c7203_1", k = {
48
+ const V = "_value_c7203_1", j = {
49
49
  value: V
50
- }, w = ({ content: r, locale: n }) => /* @__PURE__ */ t.createElement(A, {
50
+ }, k = ({ content: r, locale: n }) => /* @__PURE__ */ t.createElement(A, {
51
51
  content: r,
52
52
  locale: n
53
- }), z = () => /* @__PURE__ */ t.createElement(e, null, /* @__PURE__ */ t.createElement(e.Label, {
53
+ }), w = () => /* @__PURE__ */ t.createElement(e, null, /* @__PURE__ */ t.createElement(e.Label, {
54
54
  className: u(v, L.label)
55
55
  }), /* @__PURE__ */ t.createElement(e.Amount, {
56
- className: u(M, k.value)
56
+ className: u(g, j.value)
57
57
  }), /* @__PURE__ */ t.createElement(e.Description, {
58
- className: u(g, L.description)
59
- }, w)), X = () => /* @__PURE__ */ t.createElement(z, null);
58
+ className: u(M, L.description)
59
+ }, k)), X = () => /* @__PURE__ */ t.createElement(w, null);
60
60
  export {
61
61
  X as FixedPaymentRAC
62
62
  };