@wix/form-elements 1.62.0 → 1.64.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 (113) hide show
  1. package/dist/component/{appointment-rac-Dqib2upI.js → appointment-rac-DojiZqx9.js} +35 -35
  2. package/dist/component/{bookings-address-rac-E-qq4-KG.js → bookings-address-rac-Bm_lQchD.js} +1 -1
  3. package/dist/component/{bookings-email-rac-DA_Hwn2j.js → bookings-email-rac-vwuy0kW8.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-o1n3lnRo.js → bookings-first-name-rac-BbWuLoeg.js} +1 -1
  5. package/dist/component/{bookings-header-rac-DQ0YvhxZ.js → bookings-header-rac-DVknNH29.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-BqL_84Sg.js → bookings-last-name-rac-BnT3Cq0b.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-CAN7roRc.js → bookings-login-bar-rac-DKi-VAXc.js} +16 -16
  8. package/dist/component/{bookings-phone-rac-CCJVdvkd.js → bookings-phone-rac-Bfy8rheB.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-CCklquEC.js → bookings-rich-text-rac-DGiBDcXw.js} +1 -1
  10. package/dist/component/checkbox-field-rac-CYADRY54.js +1312 -0
  11. package/dist/component/checkbox-group-field-headless-BDAFpX5F.js +210 -0
  12. package/dist/component/checkbox-group-field-rac-2YUsOmDI.js +40 -0
  13. package/dist/component/{checkbox-group-rac-DWPClKpf.js → checkbox-group-rac-CQf1C9H5.js} +1 -1
  14. package/dist/component/{checkbox-rac-CvbOws2U.js → checkbox-rac-Bjv8jZjs.js} +1 -1
  15. package/dist/component/{contacts-address-rac-CWFHC5LT.js → contacts-address-rac-BBTiEec9.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-DPmJPp8M.js → contacts-birthdate-rac-XReeFHVW.js} +1 -1
  17. package/dist/component/{contacts-company-rac-UWP9uDqI.js → contacts-company-rac-B-fUQszu.js} +1 -1
  18. package/dist/component/{contacts-email-rac-BCkkWYhr.js → contacts-email-rac-DBtcCcsV.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-KNRf92yT.js → contacts-first-name-rac-mkwU3706.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-C_EotEpo.js → contacts-last-name-rac-DY5N-AZx.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-DJGEWLsl.js → contacts-phone-rac-Ce1rMz_z.js} +1 -1
  22. package/dist/component/{contacts-position-rac-s1pZ662O.js → contacts-position-rac-B65H8PDu.js} +1 -1
  23. package/dist/component/contacts-subscribe-rac-BxO8rIyL.js +13 -0
  24. package/dist/component/{contacts-tax-id-rac-3MUvKEqW.js → contacts-tax-id-rac-Jtt0ySK2.js} +1 -1
  25. package/dist/component/{date-availability-CRsSX5_d.js → date-availability-B8UwvTJa.js} +1 -1
  26. package/dist/component/{date-input-field-rac-DPo7waqI.js → date-input-field-rac-RL2a0xoD.js} +23 -23
  27. package/dist/component/{date-input-rac-DsY8ehb1.js → date-input-rac-ak3G7V07.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-BtzlxVDB.js → date-picker-field-rac-SL_Roltf.js} +31 -31
  29. package/dist/component/{date-picker-rac-C-Aw6W87.js → date-picker-rac-ByrM0YIX.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-zre1vJ2m.js → date-time-input-field-rac-DOE7xcKi.js} +87 -87
  31. package/dist/component/{date-time-input-rac-CUvTUzbT.js → date-time-input-rac-BA-GyrAc.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-D4mhJU8E.js → dext-checkbox-group-rac-EwUnBO80.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-BeYmKpAZ.js → dext-checkbox-rac-CIRKi4B5.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-Mr0M3sNQ.js → dext-date-picker-rac-BYO_Q1zM.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-dgxfrHUw.js → dext-date-time-input-rac-BOahPeaH.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-CdZOoA5M.js → dext-dropdown-rac-sTD_r-0H.js} +1 -1
  37. package/dist/component/{dext-email-rac-TBiHlKjv.js → dext-email-rac-e-2_h3he.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-S78swyZ9.js → dext-number-input-rac-D6LACzWl.js} +1 -1
  39. package/dist/component/{dext-phone-rac-BhIaSHez.js → dext-phone-rac-kUycy5Od.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-B4xG4N8A.js → dext-radio-group-rac-DPD2UkrV.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-Bp2Pi5cP.js → dext-rating-input-rac-DUsnrl9W.js} +1 -1
  42. package/dist/component/{dext-tags-rac-Bnjgmyk-.js → dext-tags-rac-D6z69HuO.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-f1nJTM_n.js → dext-text-area-rac-C-DVtFJ1.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-B9m6oI-e.js → dext-text-input-rac-CIa2MdC6.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-CfEUdRdY.js → dext-url-input-rac-8rVVW5us.js} +1 -1
  46. package/dist/component/{donation-rac-BqKbQD_H.js → donation-rac-BjmSBabc.js} +62 -62
  47. package/dist/component/{dropdown-field-headless-CzoD076g.js → dropdown-field-headless-DReo519l.js} +5 -5
  48. package/dist/component/{dropdown-field-rac-5kD98Ubc.js → dropdown-field-rac-DzrjA2O6.js} +7 -7
  49. package/dist/component/{dropdown-rac-C9NpsRYi.js → dropdown-rac-CS7oLTp_.js} +1 -1
  50. package/dist/component/{ecom-address-rac-DdvJEnAO.js → ecom-address-rac-EIb88J_6.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-D7Lf1ETL.js → ecom-subscription-checkbox-rac-CE0Ks6qS.js} +5 -5
  52. package/dist/component/{email-input-field-rac-DUordV5X.js → email-input-field-rac-BScZxYHw.js} +47 -47
  53. package/dist/component/{events-repeater-rac-B1yDrnvJ.js → events-repeater-rac-Y0rH2Jli.js} +66 -66
  54. package/dist/component/{events-rsvp-rac-B65NtAMH.js → events-rsvp-rac-BiAYVv_b.js} +12 -12
  55. package/dist/component/{field-error-headless-DP4WSQU3.js → field-error-headless-DrnFrGun.js} +4 -4
  56. package/dist/component/{field-label-headless-BKmi7Fjg.js → field-label-headless-BIYf1BIh.js} +7 -7
  57. package/dist/component/field-rac.module-CWkwwhq4.js +21 -0
  58. package/dist/component/{file-upload-rac-DAg_G0_l.js → file-upload-rac-br--tZLp.js} +83 -83
  59. package/dist/component/{fixed-payment-rac-yO1w1gE2.js → fixed-payment-rac-XEtrsaMy.js} +15 -15
  60. package/dist/component/{form-D6A2hUbV.js → form-9yjqDnxY.js} +2719 -2709
  61. package/dist/component/form-element-classes-KRzHUNLu.js +57 -0
  62. package/dist/component/form.css +1 -1
  63. package/dist/component/form.js +1 -1
  64. package/dist/component/{header-field-rac-D3Bi6tTS.js → header-field-rac-CLELgzqY.js} +5 -5
  65. package/dist/component/{header-rac-Blv89pdS.js → header-rac-D8KGkVVp.js} +1 -1
  66. package/dist/component/{image-choice-rac-BLUZRNm0.js → image-choice-rac-Cl09CLP4.js} +30 -30
  67. package/dist/component/{index-BiYk1mJi.js → index-C4y71e1i.js} +2 -2
  68. package/dist/component/{index-Cv3_acT1.js → index-PHkE0Ru4.js} +4 -4
  69. package/dist/component/isObjectLike-srCDplej.js +86 -0
  70. package/dist/component/multiline-address-field-rac-CsBLI9y-.js +1613 -0
  71. package/dist/component/{multiline-address-rac-B9yHNebZ.js → multiline-address-rac-DFDPFfXh.js} +1 -1
  72. package/dist/component/{number-input-field-rac-SaC7jFUi.js → number-input-field-rac-DZRR7gdt.js} +19 -19
  73. package/dist/component/{number-input-rac-KYcJJPrs.js → number-input-rac-BCS5lkff.js} +1 -1
  74. package/dist/component/{password-rac-CD5bSL2g.js → password-rac-ClDGgR3E.js} +27 -27
  75. package/dist/component/{payment-input-rac-BlAscmFz.js → payment-input-rac-COydWmUE.js} +34 -34
  76. package/dist/component/{phone-input-field-rac-D-AosrgV.js → phone-input-field-rac-DYCibqe1.js} +54 -54
  77. package/dist/component/{phone-rac-DXLYlz5G.js → phone-rac-BS-dmWkJ.js} +1 -1
  78. package/dist/component/{product-list-rac-CGt4Gnj4.js → product-list-rac-hxOhaA-r.js} +84 -84
  79. package/dist/component/quiz-radio-group-rac-BT-YZO2Q.js +13 -0
  80. package/dist/component/{radio-group-field-rac-D8NS7qDq.js → radio-group-field-rac-DKqWnMBJ.js} +3 -3
  81. package/dist/component/{radio-group-field-rac.module-wK26tCZq.js → radio-group-field-rac.module-BwUynK_5.js} +9 -9
  82. package/dist/component/{radio-group-rac-HalDjwk1.js → radio-group-rac-DHURQZKK.js} +1 -1
  83. package/dist/component/{rating-input-field-rac-BBhMkSyL.js → rating-input-field-rac-CZRdSVrf.js} +37 -37
  84. package/dist/component/{rating-input-rac-BpgFnNoD.js → rating-input-rac-BaH52DYm.js} +1 -1
  85. package/dist/component/{rich-content-rac.module-BgJ2fteu.js → rich-content-rac.module-ILBfxEmN.js} +4 -4
  86. package/dist/component/{rich-text-field-rac-BZfCgvHc.js → rich-text-field-rac-B58q8Is7.js} +7 -7
  87. package/dist/component/{rich-text-rac-CG3V04Gr.js → rich-text-rac-DGbZh1eX.js} +1 -1
  88. package/dist/component/{service-dropdown-rac-Bc_y-R5O.js → service-dropdown-rac-DUiNIbdv.js} +42 -42
  89. package/dist/component/{services-multi-choice-rac-BeBdZpRV.js → services-multi-choice-rac-B7y9s2l8.js} +29 -29
  90. package/dist/component/{signature-rac-DNdpHxFp.js → signature-rac-CydpvQJZ.js} +37 -37
  91. package/dist/component/{submit-button-rac-Bogk1xYc.js → submit-button-rac-OO53h4H8.js} +8 -8
  92. package/dist/component/{tags-field-rac-COJG3T_9.js → tags-field-rac-eX3d3JEH.js} +50 -50
  93. package/dist/component/{tags-rac-DsaUqJ4w.js → tags-rac-CdIB_48Z.js} +1 -1
  94. package/dist/component/{text-area-field-rac-BVq5p83p.js → text-area-field-rac-Bir5Q7gz.js} +22 -22
  95. package/dist/component/{text-area-rac-D-uiOy62.js → text-area-rac-Ct1UNU04.js} +1 -1
  96. package/dist/component/{text-input-field-rac-wYvY_eBR.js → text-input-field-rac-onGUXC9J.js} +6 -6
  97. package/dist/component/{text-input-headless-BsL6OYhp.js → text-input-headless-Bs9m7QFg.js} +10 -10
  98. package/dist/component/{text-input-rac-Bu8kXhrN.js → text-input-rac-DK4nEw4D.js} +1 -1
  99. package/dist/component/{time-input-rac-PWXUi1qL.js → time-input-rac-BCG9ktFa.js} +40 -40
  100. package/dist/component/{url-input-field-rac-B4qgrssx.js → url-input-field-rac-mUkrVTcL.js} +25 -25
  101. package/dist/component/{url-input-rac-Bo51kTsG.js → url-input-rac-Cl7LFYlr.js} +1 -1
  102. package/dist/component/{use-service-options-base-Du6B6AP9.js → use-service-options-base-BYVuKRj2.js} +8 -8
  103. package/dist/form.d.ts +3 -1
  104. package/package.json +2 -14
  105. package/dist/component/checkbox-field-rac-DhAEMdL9.js +0 -625
  106. package/dist/component/checkbox-group-field-headless-EGVW3vG0.js +0 -204
  107. package/dist/component/checkbox-group-field-rac-DUDWNOwV.js +0 -33
  108. package/dist/component/contacts-subscribe-rac-D_2wIX9p.js +0 -13
  109. package/dist/component/field-rac.module-DtugsLiL.js +0 -21
  110. package/dist/component/form-element-classes-Bi-nNM8q.js +0 -55
  111. package/dist/component/isObject-BAwJJxQ3.js +0 -34
  112. package/dist/component/multiline-address-field-rac-_Sb56AEM.js +0 -1574
  113. package/dist/component/quiz-radio-group-rac-DaStzNZZ.js +0 -13
@@ -1,13 +1,13 @@
1
- import t, { useState as Q, useRef as z, useMemo as oe, useEffect as se, useCallback as P, createContext as pe, useContext as fe } from "react";
1
+ import t, { useState as J, 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 { E as Fe } from "./error-icon-hZxQ6DEy.js";
5
- import { s as I } from "./field-rac.module-DtugsLiL.js";
6
- import { r as re, H as ge, V as he, h as ne, l as le } from "./form-element-classes-Bi-nNM8q.js";
7
- import { ac as xe, aq as ie, al as be, i as Ce, ao as Le, e as ae, ap as De, ad as ce, ag as q, ai as Ne } from "./form-D6A2hUbV.js";
8
- import { f as h, a as V } from "./find-child-C60k4CxG.js";
9
- import { b as ve, a as ye, D as _e, E as Te } from "./field-error-headless-DP4WSQU3.js";
10
- import { L as Be } from "./field-label-headless-BKmi7Fjg.js";
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 j, ak as Ce } from "./form-9yjqDnxY.js";
5
+ import { E as Le } from "./error-icon-hZxQ6DEy.js";
6
+ import { s as I } from "./field-rac.module-CWkwwhq4.js";
7
+ import { t as ne, J as De, X as Ne, j as le, n as ae } from "./form-element-classes-KRzHUNLu.js";
8
+ import { f as h, a as z } from "./find-child-C60k4CxG.js";
9
+ import { b as ve, a as ye, D as _e, E as Te } from "./field-error-headless-DrnFrGun.js";
10
+ import { L as Be } from "./field-label-headless-BIYf1BIh.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/*",
@@ -17,7 +17,7 @@ const we = {
17
17
  Archive: ".zip, .rar, .tar, .tar.gz, .gz, .gzip, .jar, .7z, .fgz, .webarchive",
18
18
  Model3D: ".gltf, .glb"
19
19
  }, Ae = (e) => {
20
- const { actions: r, formId: n } = xe();
20
+ const { actions: r, formId: n } = Fe();
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"), [];
@@ -43,19 +43,19 @@ const we = {
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 [l, s] = Q(Ue(r)), [b, m] = Q(r || []), [c, N] = Q(), v = Ae(o), { t: E } = ie(), U = be().includes(Ce.BUTTONS_HOVER), { setFormStatus: y } = Le(), S = z(!1), _ = z(i);
46
+ const [l, s] = J(ke(r)), [b, m] = J(r || []), [c, N] = J(), v = Ae(o), { t: E } = ie(), k = ge().includes(he.BUTTONS_HOVER), { setFormStatus: y } = xe(), S = V(!1), _ = V(i);
47
47
  _.current = i;
48
48
  const C = oe(() => l.some((u) => u.state === "uploading"), [
49
49
  l
50
50
  ]);
51
51
  se(() => {
52
- S.current !== C && (S.current = C, y(o, C ? ae.BUSY : ae.READY));
52
+ S.current !== C && (S.current = C, y(o, C ? re.BUSY : re.READY));
53
53
  }, [
54
54
  C,
55
55
  y,
56
56
  o
57
57
  ]);
58
- const k = P(() => {
58
+ const U = P(() => {
59
59
  if (!l.length)
60
60
  return n;
61
61
  const F = l.filter((u) => u.state === "uploading").length;
@@ -102,7 +102,7 @@ function Ze({ valueSliderLimit: e, value: r, explanationText: n, target: o, onCh
102
102
  }));
103
103
  return;
104
104
  }
105
- const p = Array.from(F).reduce((f, L) => (l.some((W) => W.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), []);
@@ -111,7 +111,7 @@ function Ze({ valueSliderLimit: e, value: r, explanationText: n, target: o, onCh
111
111
  ...p
112
112
  ]), await M(p);
113
113
  }
114
- }, j = (F) => {
114
+ }, q = (F) => {
115
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);
@@ -124,21 +124,21 @@ function Ze({ valueSliderLimit: e, value: r, explanationText: n, target: o, onCh
124
124
  }
125
125
  }, $ = () => {
126
126
  c && N(void 0), x();
127
- }, K = d.map((F) => we[F]).join(), H = P(() => {
127
+ }, K = d.map((F) => we[F]).join(), W = P(() => {
128
128
  s([]), m([]);
129
129
  }, []);
130
- return De(H), {
130
+ return be(W), {
131
131
  files: l,
132
132
  limitError: c,
133
- hover: U,
134
- getExplanationText: k,
133
+ hover: k,
134
+ getExplanationText: U,
135
135
  handleChange: O,
136
- handleDelete: j,
136
+ handleDelete: q,
137
137
  accept: K,
138
138
  handleBlur: $
139
139
  };
140
140
  }
141
- function Ue(e = []) {
141
+ function ke(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), l = 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,
@@ -183,7 +183,7 @@ const A = ({ children: e, className: r }) => {
183
183
  }, /* @__PURE__ */ t.createElement(Se, {
184
184
  slot: "label"
185
185
  }, x, D), l);
186
- }, ke = ({ className: e, children: r }) => {
186
+ }, Ue = ({ className: e, children: r }) => {
187
187
  const { limitReached: n } = Z();
188
188
  return /* @__PURE__ */ t.createElement("p", {
189
189
  className: e
@@ -197,15 +197,15 @@ const A = ({ children: e, className: r }) => {
197
197
  }, r({
198
198
  limitReached: n
199
199
  }));
200
- }, J = ({ className: e, children: r, "aria-roledescription": n }) => {
201
- const { ariaDescribedBy: o, inputId: i, labelId: d, errorId: x } = ce(), { disabled: D, required: l, onFocus: s, hasError: b, errorMessage: m } = q(), { handleFileChange: c, accept: N, multiple: v, buttonRef: E, handleBlur: R, limitError: U, files: y } = Z(), S = (y == null ? void 0 : y.some((C) => C.errorMessage)) ?? !1, _ = !!(b || m || U || S);
200
+ }, X = ({ className: e, children: r, "aria-roledescription": n }) => {
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: v, buttonRef: E, handleBlur: R, limitError: k, files: y } = Z(), S = (y == null ? void 0 : y.some((C) => C.errorMessage)) ?? !1, _ = !!(b || m || k || S);
202
202
  return /* @__PURE__ */ t.createElement(Me, {
203
203
  acceptedFileTypes: N ? N.split(",") : void 0,
204
204
  allowsMultiple: v,
205
205
  onSelect: (C) => {
206
206
  if (C) {
207
- const k = Array.from(C), M = new DataTransfer();
208
- k.forEach((O) => M.items.add(O)), c(M.files);
207
+ const U = Array.from(C), M = new DataTransfer();
208
+ U.forEach((O) => M.items.add(O)), c(M.files);
209
209
  }
210
210
  }
211
211
  }, /* @__PURE__ */ t.createElement(de, {
@@ -228,34 +228,34 @@ 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
- J.Text = Pe;
237
- A.Title = ke;
236
+ X.Text = Pe;
237
+ A.Title = Ue;
238
238
  A.Subtitle = Oe;
239
- A.Button = J;
239
+ A.Button = X;
240
240
  const T = ({ children: e, className: r, ...n }) => {
241
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
- }, V(x, {
244
+ }, z(x, {
245
245
  fileName: d
246
- }), o.state === "uploading" ? l : V(D, {
246
+ }), o.state === "uploading" ? l : z(D, {
247
247
  index: i,
248
248
  fileName: d
249
- }), o.errorMessage && V(s, {
249
+ }), o.errorMessage && z(s, {
250
250
  errorMessage: o.errorMessage
251
251
  }));
252
- }, Ve = ({ className: e, ...r }) => {
252
+ }, ze = ({ className: e, ...r }) => {
253
253
  const { fileName: n } = r;
254
254
  return /* @__PURE__ */ t.createElement("span", {
255
255
  className: e
256
256
  }, n);
257
- }, ze = ({ className: e, "aria-label": r, children: n, ...o }) => {
258
- const { fileName: i, index: d } = o, { disabled: x } = q(), { handleDelete: D, fileRemoveButtonRefs: l } = Z(), s = z(null);
257
+ }, Ve = ({ className: e, "aria-label": r, children: n, ...o }) => {
258
+ const { fileName: i, index: d } = o, { disabled: x } = j(), { handleDelete: D, fileRemoveButtonRefs: l } = Z(), s = V(null);
259
259
  se(() => {
260
260
  const m = l.current, c = i;
261
261
  return m[c] = s, () => {
@@ -285,32 +285,32 @@ 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
- T.Name = Ve;
294
- T.Remove = ze;
295
- T.Spinner = qe;
293
+ T.Name = ze;
294
+ T.Remove = Ve;
295
+ T.Spinner = je;
296
296
  T.Error = ue;
297
297
  ue.Text = ve;
298
- const X = ({ children: e, className: r }) => {
299
- const { files: n } = Z(), o = h(e, X.File);
298
+ const G = ({ children: e, className: r }) => {
299
+ const { files: n } = Z(), o = h(e, G.File);
300
300
  return !n || n.length === 0 ? null : /* @__PURE__ */ t.createElement("div", {
301
301
  className: r
302
- }, n.map((i, d) => V(o, {
302
+ }, n.map((i, d) => z(o, {
303
303
  key: i.file.name || d,
304
304
  file: i,
305
305
  index: d
306
306
  })));
307
307
  };
308
- X.File = T;
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 } = q(), c = z(null), N = z({}), v = P(() => {
308
+ G.File = T;
309
+ const Q = (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({}), v = P(() => {
311
311
  var L;
312
312
  (L = c.current) == null || L.focus();
313
- }, []), { files: E, limitError: R, hover: U, getExplanationText: y, handleBlur: S, handleChange: _, handleDelete: C, accept: k } = Ze({
313
+ }, []), { files: E, limitError: R, hover: k, getExplanationText: y, handleBlur: S, handleChange: _, handleDelete: C, accept: U } = Ze({
314
314
  valueSliderLimit: d,
315
315
  value: n,
316
316
  explanationText: D,
@@ -321,21 +321,21 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
321
321
  onFilesCleared: v
322
322
  }), M = P((L) => {
323
323
  var te;
324
- const ee = E[L], W = G(ee);
325
- E.length > 1 && ((te = (E.filter((Y) => G(Y) !== W).map((Y) => N.current[G(Y)]).find(Boolean) ?? c).current) == null || te.focus()), C(L);
324
+ const ee = E[L], Y = Q(ee);
325
+ E.length > 1 && ((te = (E.filter((H) => Q(H) !== Y).map((H) => N.current[Q(H)]).find(Boolean) ?? c).current) == null || te.focus()), C(L);
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: k,
335
- limitReached: j,
334
+ accept: U,
335
+ limitReached: q,
336
336
  multiple: O,
337
337
  getExplanationText: y,
338
- hover: U,
338
+ hover: k,
339
339
  limitError: R,
340
340
  buttonRef: c,
341
341
  fileRemoveButtonRefs: N
@@ -344,14 +344,14 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
344
344
  S,
345
345
  M,
346
346
  E,
347
- k,
348
- j,
347
+ U,
348
+ q,
349
349
  O,
350
350
  y,
351
- U,
351
+ k,
352
352
  R
353
- ]), K = h(e, a.Label), H = 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
- return Ne(() => {
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
+ return Ce(() => {
355
355
  var L;
356
356
  (L = c.current) == null || L.focus();
357
357
  }, r), /* @__PURE__ */ t.createElement(me.Provider, {
@@ -359,13 +359,13 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
359
359
  }, /* @__PURE__ */ t.createElement(m, {
360
360
  fieldId: r,
361
361
  renderLabel: () => K,
362
- renderInput: () => H ?? F,
363
- renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, V(f, {
362
+ renderInput: () => W ?? F,
363
+ renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, z(f, {
364
364
  hasError: !!(s || R),
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
@@ -373,9 +373,9 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
373
373
  };
374
374
  a.Label = Be;
375
375
  a.DropZone = A;
376
- a.Button = J;
377
- a.Explanation = je;
378
- a.Files = X;
376
+ a.Button = X;
377
+ a.Explanation = qe;
378
+ a.Files = G;
379
379
  a.Description = _e;
380
380
  a.Error = Te;
381
381
  const $e = (e) => /* @__PURE__ */ t.createElement("svg", {
@@ -396,7 +396,7 @@ const $e = (e) => /* @__PURE__ */ t.createElement("svg", {
396
396
  ...e
397
397
  }, /* @__PURE__ */ t.createElement("path", {
398
398
  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"
399
- })), He = (e) => /* @__PURE__ */ t.createElement("svg", {
399
+ })), We = (e) => /* @__PURE__ */ t.createElement("svg", {
400
400
  viewBox: "0 0 24 24",
401
401
  width: 24,
402
402
  height: 24,
@@ -405,7 +405,7 @@ const $e = (e) => /* @__PURE__ */ t.createElement("svg", {
405
405
  ...e
406
406
  }, /* @__PURE__ */ t.createElement("path", {
407
407
  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"
408
- })), We = () => {
408
+ })), Ye = () => {
409
409
  const r = "calc(50% - 2px)";
410
410
  return /* @__PURE__ */ t.createElement("svg", {
411
411
  fill: "none",
@@ -437,12 +437,12 @@ const $e = (e) => /* @__PURE__ */ t.createElement("svg", {
437
437
  values: "0;360",
438
438
  repeatCount: "indefinite"
439
439
  })));
440
- }, Ye = "_explanation_16me0_1", Qe = "_files_16me0_5", Ge = "_file_16me0_5", Je = "_fileName_16me0_24", Xe = "_removeButton_16me0_32", et = "_spinner_16me0_72", tt = "_fileError_16me0_88", w = {
441
- explanation: Ye,
442
- files: Qe,
443
- file: Ge,
444
- fileName: Je,
445
- removeButton: Xe,
440
+ }, He = "_explanation_16me0_1", Je = "_files_16me0_5", Qe = "_file_16me0_5", Xe = "_fileName_16me0_24", Ge = "_removeButton_16me0_32", et = "_spinner_16me0_72", tt = "_fileError_16me0_88", w = {
441
+ explanation: He,
442
+ files: Je,
443
+ file: Qe,
444
+ fileName: Xe,
445
+ removeButton: Ge,
446
446
  spinner: et,
447
447
  fileError: tt
448
448
  }, rt = ({ content: e, locale: r }) => /* @__PURE__ */ t.createElement(Ee, {
@@ -451,16 +451,16 @@ const $e = (e) => /* @__PURE__ */ t.createElement("svg", {
451
451
  }), nt = () => {
452
452
  const { t: e } = ie();
453
453
  return /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
454
- className: B(re, I.label)
454
+ className: B(ne, I.label)
455
455
  }, /* @__PURE__ */ t.createElement(a.Label.Required, {
456
- className: B(ge, I.requiredMark)
456
+ className: B(De, I.requiredMark)
457
457
  })), /* @__PURE__ */ t.createElement(a.Button, {
458
- className: B(he, I.uploadButton),
458
+ className: B(Ne, I.uploadButton),
459
459
  "aria-roledescription": e("file-upload.aria-roledescription")
460
460
  }, /* @__PURE__ */ t.createElement($e, null), /* @__PURE__ */ t.createElement(a.Button.Text, null)), /* @__PURE__ */ t.createElement(a.Explanation, {
461
- className: B(ne, I.description, w.explanation)
461
+ className: B(le, I.description, w.explanation)
462
462
  }), /* @__PURE__ */ t.createElement(a.Files, {
463
- className: B(re, w.files)
463
+ className: B(ne, w.files)
464
464
  }, /* @__PURE__ */ t.createElement(a.Files.File, {
465
465
  className: w.file
466
466
  }, /* @__PURE__ */ t.createElement(a.Files.File.Name, {
@@ -468,16 +468,16 @@ const $e = (e) => /* @__PURE__ */ t.createElement("svg", {
468
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(We, null)), /* @__PURE__ */ t.createElement(a.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(He, null)), /* @__PURE__ */ t.createElement(a.Files.File.Error, {
475
- className: B(le, I.error, w.fileError)
474
+ }, /* @__PURE__ */ t.createElement(We, null)), /* @__PURE__ */ t.createElement(a.Files.File.Error, {
475
+ className: B(ae, I.error, w.fileError)
476
476
  }, /* @__PURE__ */ t.createElement(Ke, null), /* @__PURE__ */ t.createElement(a.Files.File.Error.Text, null)))), /* @__PURE__ */ t.createElement(a.Description, {
477
- className: B(ne, I.description)
477
+ className: B(le, I.description)
478
478
  }, rt), /* @__PURE__ */ t.createElement(a.Error, {
479
- className: B(le, I.error)
480
- }, /* @__PURE__ */ t.createElement(Fe, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)));
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,21 +1,21 @@
1
- import t, { useMemo as b } from "react";
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 { ag as C, aa as I, ad as P } from "./form-D6A2hUbV.js";
4
+ import { ai as C, ab as I, af as P } from "./form-9yjqDnxY.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-DP4WSQU3.js";
8
- import { L as R } from "./field-label-headless-BKmi7Fjg.js";
9
- import { s as L } from "./field-rac.module-DtugsLiL.js";
10
- import { r as v, t as g, h as M } from "./form-element-classes-Bi-nNM8q.js";
7
+ import { D as x, E as N } from "./field-error-headless-DrnFrGun.js";
8
+ import { L as R } from "./field-label-headless-BIYf1BIh.js";
9
+ import { s as L } from "./field-rac.module-CWkwwhq4.js";
10
+ import { t as v, v as M, j as g } from "./form-element-classes-KRzHUNLu.js";
11
11
  const e = ({ children: r }) => {
12
12
  var p;
13
- const { id: n, validation: a, FieldLayout: l } = C(), { currency: o, regionalFormat: m } = I(), s = b(() => {
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];
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];
16
16
  }, [
17
17
  a
18
- ]), i = (p = s == null ? void 0 : s.fixedPriceOptions) == null ? void 0 : p.price, y = c(r, e.Label), F = c(r, e.Amount), D = c(r, e.Description), _ = c(r, e.Error);
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);
19
19
  return /* @__PURE__ */ t.createElement(l, {
20
20
  fieldId: n,
21
21
  renderLabel: () => y,
@@ -24,7 +24,7 @@ const e = ({ children: r }) => {
24
24
  currencyCode: o == null ? void 0 : o.code,
25
25
  locale: m
26
26
  }),
27
- renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, _, D)
27
+ renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, D, b)
28
28
  });
29
29
  }, B = ({ className: r, ...n }) => {
30
30
  const { price: a, currencyCode: l, locale: o } = n, { inputId: m, ariaDescribedBy: s } = P(), i = S({
@@ -47,16 +47,16 @@ e.Description = x;
47
47
  e.Error = N;
48
48
  const V = "_value_19v7w_1", w = {
49
49
  value: V
50
- }, h = ({ content: r, locale: n }) => /* @__PURE__ */ t.createElement(A, {
50
+ }, j = ({ content: r, locale: n }) => /* @__PURE__ */ t.createElement(A, {
51
51
  content: r,
52
52
  locale: n
53
53
  }), k = () => /* @__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(g, w.value)
56
+ className: u(M, w.value)
57
57
  }), /* @__PURE__ */ t.createElement(e.Description, {
58
- className: u(M, L.description)
59
- }, h)), X = () => /* @__PURE__ */ t.createElement(k, null);
58
+ className: u(g, L.description)
59
+ }, j)), X = () => /* @__PURE__ */ t.createElement(k, null);
60
60
  export {
61
61
  X as FixedPaymentRAC
62
62
  };