@wix/form-elements 1.89.0 → 1.90.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 (115) hide show
  1. package/dist/component/{appointment-rac-DG8GUJpn.js → appointment-rac-DtPa-JZ9.js} +6 -6
  2. package/dist/component/{bookings-address-rac-cNBSx-Pr.js → bookings-address-rac-4l8kqoLi.js} +1 -1
  3. package/dist/component/{bookings-email-rac-CYdSoVWP.js → bookings-email-rac-76vUcGtU.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-CQB2o8ww.js → bookings-first-name-rac-IS7LUMxg.js} +1 -1
  5. package/dist/component/{bookings-header-rac-CzKvQond.js → bookings-header-rac-2wTzY64_.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-oK1BC5Am.js → bookings-last-name-rac-nxA75igv.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-CZNEy748.js → bookings-login-bar-rac-CRi1nntD.js} +21 -21
  8. package/dist/component/{bookings-phone-rac-D_4WfolC.js → bookings-phone-rac-DZjvHly0.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-CrEfeL4P.js → bookings-rich-text-rac-CYn1wwYQ.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-CGqshW45.js → checkbox-field-rac-DAcFLQNT.js} +49 -49
  11. package/dist/component/{checkbox-group-field-headless-C3_5IR-E.js → checkbox-group-field-headless-BJmS0Ce5.js} +30 -30
  12. package/dist/component/{checkbox-group-field-rac-DIzdgyAw.js → checkbox-group-field-rac-CeFUt2Nr.js} +9 -9
  13. package/dist/component/{checkbox-group-rac-EvWVfusV.js → checkbox-group-rac-eDChVoVP.js} +1 -1
  14. package/dist/component/{checkbox-indicator-module-classes-Bb3xB1ve.js → checkbox-indicator-module-classes-mJ7hl_8K.js} +1 -1
  15. package/dist/component/{checkbox-rac-CT_69Jei.js → checkbox-rac-DGmZdPnl.js} +1 -1
  16. package/dist/component/{contacts-address-rac-M8MZd777.js → contacts-address-rac-CGS83PMu.js} +1 -1
  17. package/dist/component/{contacts-birthdate-rac-BS-8HeRD.js → contacts-birthdate-rac-DkP-7tZ9.js} +1 -1
  18. package/dist/component/{contacts-company-rac-gmgKLvic.js → contacts-company-rac-D_KYvkYe.js} +1 -1
  19. package/dist/component/{contacts-email-rac-QQ6E9VzX.js → contacts-email-rac-4lGD56E8.js} +1 -1
  20. package/dist/component/{contacts-first-name-rac-DR7XheRo.js → contacts-first-name-rac-C5L3U9QV.js} +1 -1
  21. package/dist/component/{contacts-last-name-rac-CBJgTkj5.js → contacts-last-name-rac-SL3FSAhE.js} +1 -1
  22. package/dist/component/{contacts-phone-rac-CTl25HdK.js → contacts-phone-rac-DkUwJ56_.js} +1 -1
  23. package/dist/component/{contacts-position-rac-DBDOW7QR.js → contacts-position-rac-CeKJ5oJh.js} +1 -1
  24. package/dist/component/{contacts-subscribe-rac-C0-uJ7fU.js → contacts-subscribe-rac-Bjldz7ed.js} +2 -2
  25. package/dist/component/{contacts-tax-id-rac-BtXc0V1S.js → contacts-tax-id-rac-D8QxyDiU.js} +1 -1
  26. package/dist/component/{date-availability-IQtwk-aX.js → date-availability-DdMI-zNj.js} +1 -1
  27. package/dist/component/{date-input-field-rac-2rbZiSgo.js → date-input-field-rac-Da6j7OP2.js} +99 -98
  28. package/dist/component/{date-input-rac-j4--xZ8s.js → date-input-rac-tlmhXr4A.js} +1 -1
  29. package/dist/component/{date-picker-field-rac-Cl7ueVVn.js → date-picker-field-rac-ClNfMoR1.js} +43 -43
  30. package/dist/component/{date-picker-rac-BrObkuYv.js → date-picker-rac-BV3TGjsx.js} +1 -1
  31. package/dist/component/date-time-input-field-rac-5eHyKry0.js +424 -0
  32. package/dist/component/{date-time-input-rac-BShquR72.js → date-time-input-rac-DQk2ylbE.js} +1 -1
  33. package/dist/component/{dext-checkbox-group-rac-DNXYnHDM.js → dext-checkbox-group-rac-CBj9Y7Tp.js} +2 -2
  34. package/dist/component/{dext-checkbox-rac-RBMWmgyT.js → dext-checkbox-rac-C1KI5I2J.js} +1 -1
  35. package/dist/component/{dext-date-picker-rac-Dph_kV11.js → dext-date-picker-rac-D-8Ss0bx.js} +1 -1
  36. package/dist/component/{dext-date-time-input-rac-C3_gQkBT.js → dext-date-time-input-rac-CRnwLBSZ.js} +1 -1
  37. package/dist/component/{dext-dropdown-rac-D34vhtST.js → dext-dropdown-rac-BVTEMS0W.js} +1 -1
  38. package/dist/component/{dext-email-rac-Yzf4-vSg.js → dext-email-rac-CXeM4iQj.js} +1 -1
  39. package/dist/component/{dext-number-input-rac-D0jZXKaI.js → dext-number-input-rac-DMh08cy5.js} +1 -1
  40. package/dist/component/{dext-phone-rac-bqTpmTa0.js → dext-phone-rac-E1fFjkVW.js} +1 -1
  41. package/dist/component/{dext-radio-group-rac-AYPAzpqZ.js → dext-radio-group-rac-_BhRzFAr.js} +2 -2
  42. package/dist/component/{dext-rating-input-rac-DOSq-xVQ.js → dext-rating-input-rac-BRYVQOYw.js} +1 -1
  43. package/dist/component/{dext-tags-rac-BXtFTlL0.js → dext-tags-rac-C4iwtRcw.js} +2 -2
  44. package/dist/component/{dext-text-area-rac-46wwBQg_.js → dext-text-area-rac-CQ1KAhkU.js} +1 -1
  45. package/dist/component/{dext-text-input-rac-DVj6V1VG.js → dext-text-input-rac-xCoKhEt3.js} +1 -1
  46. package/dist/component/{dext-url-input-rac-B5zu9R5K.js → dext-url-input-rac-DyoEEa_v.js} +1 -1
  47. package/dist/component/{donation-rac-DeBMssGg.js → donation-rac-CSDVxWUj.js} +51 -51
  48. package/dist/component/dropdown-field-headless-BXyP9KYi.js +101 -0
  49. package/dist/component/dropdown-field-rac-D1Z_Jbzd.js +36 -0
  50. package/dist/component/{dropdown-rac-bUNYh49x.js → dropdown-rac-BEi7CMKT.js} +1 -1
  51. package/dist/component/{ecom-address-rac-CtrERV3f.js → ecom-address-rac-DGl7rlwa.js} +1 -1
  52. package/dist/component/{ecom-subscription-checkbox-rac-BrpwOSYM.js → ecom-subscription-checkbox-rac-D5HzzRQk.js} +6 -6
  53. package/dist/component/{email-input-field-rac-4yYxYc1a.js → email-input-field-rac-DHAK2K8E.js} +63 -63
  54. package/dist/component/{events-repeater-rac-B308C1JK.js → events-repeater-rac-N1mGqD4R.js} +35 -35
  55. package/dist/component/{events-rsvp-rac-C4_LJ3Wz.js → events-rsvp-rac-Ds9PnqHG.js} +6 -6
  56. package/dist/component/{field-error-headless-PMBWtb3Z.js → field-error-headless-9MKScovg.js} +12 -12
  57. package/dist/component/{field-label-headless-0racVfdo.js → field-label-headless-BaoLrUWJ.js} +12 -12
  58. package/dist/component/field-rac.module-BUvPquav.js +26 -0
  59. package/dist/component/{file-upload-rac-CZIHV2OL.js → file-upload-rac-CNbLRxUz.js} +116 -116
  60. package/dist/component/{fixed-payment-rac-COhRKeun.js → fixed-payment-rac-BFnvUksR.js} +15 -15
  61. package/dist/component/{form-UCnayEKT.js → form-B3YjGh0T.js} +129 -128
  62. package/dist/component/{form-element-classes--p2vz_Bm.js → form-element-classes-CLZXu-91.js} +79 -69
  63. package/dist/component/form.css +1 -1
  64. package/dist/component/form.js +1 -1
  65. package/dist/component/{header-field-rac-CpXa-NlC.js → header-field-rac-64pYqszP.js} +3 -3
  66. package/dist/component/{header-rac-CCsguMlZ.js → header-rac-BtPQVL59.js} +1 -1
  67. package/dist/component/{image-choice-rac-j2UH4Q4I.js → image-choice-rac-BsojUR1h.js} +20 -20
  68. package/dist/component/{index-Bxa3IDHm.js → index-CtiBRBqZ.js} +4 -4
  69. package/dist/component/{index-jg8dn8po.js → index-f2JBxCTd.js} +2 -2
  70. package/dist/component/{isObjectLike-Zw6J9g91.js → isObjectLike-BgqHLNgn.js} +1 -1
  71. package/dist/component/{multiline-address-field-rac-BeFAYL7V.js → multiline-address-field-rac-CH1hCUTf.js} +575 -574
  72. package/dist/component/{multiline-address-rac-BYr5_DQd.js → multiline-address-rac-CkOPWXfI.js} +1 -1
  73. package/dist/component/{number-input-field-rac-BNdJecUL.js → number-input-field-rac-B7U_08UK.js} +24 -24
  74. package/dist/component/{number-input-rac-Cqkj4JAF.js → number-input-rac-1jcchySg.js} +1 -1
  75. package/dist/component/{password-rac-D4iSs1ds.js → password-rac-CAaV8OrL.js} +21 -21
  76. package/dist/component/{payment-input-rac-BvBP47HP.js → payment-input-rac-B3Knhzrz.js} +25 -25
  77. package/dist/component/{phone-input-field-rac-Cggx8IlY.js → phone-input-field-rac-BGsvxtXz.js} +185 -184
  78. package/dist/component/{phone-rac-BISmYt_n.js → phone-rac-BUAW-44w.js} +1 -1
  79. package/dist/component/{product-list-rac-C1bm-U2G.js → product-list-rac-C7Nq3ZG4.js} +43 -43
  80. package/dist/component/quiz-radio-group-rac-CRa3I_NR.js +13 -0
  81. package/dist/component/{radio-button-module-classes-blfiatlc.js → radio-button-module-classes-BEvf741q.js} +7 -7
  82. package/dist/component/{radio-group-field-rac-BiiPUxbQ.js → radio-group-field-rac-BYTXrpnE.js} +5 -5
  83. package/dist/component/{radio-group-rac-Bn_W-3xz.js → radio-group-rac-138JrIhm.js} +1 -1
  84. package/dist/component/{rating-input-field-rac-CjXIoNMc.js → rating-input-field-rac-D5pOVdFJ.js} +24 -24
  85. package/dist/component/{rating-input-rac-Ci4uPo22.js → rating-input-rac-DuK1q9JB.js} +1 -1
  86. package/dist/component/{rich-content-rac.module-CDZniyrZ.js → rich-content-rac.module-H3hPgDtD.js} +4 -4
  87. package/dist/component/{rich-text-field-rac-BBRE9_Kr.js → rich-text-field-rac-Btwqm4wb.js} +5 -5
  88. package/dist/component/{rich-text-rac-C3MfJK-H.js → rich-text-rac-DIu8StCg.js} +1 -1
  89. package/dist/component/service-dropdown-rac-N8jqoUC_.js +146 -0
  90. package/dist/component/{services-multi-choice-rac-FDHRjDLS.js → services-multi-choice-rac-DlP0tB9d.js} +18 -18
  91. package/dist/component/{signature-rac-DfGPV0Mw.js → signature-rac-DuRzxIkO.js} +53 -53
  92. package/dist/component/{submit-button-rac-DRsqyJcl.js → submit-button-rac-DFmPp4jT.js} +7 -7
  93. package/dist/component/{tags-field-rac-CZ4FBGG9.js → tags-field-rac-DIgyn5P9.js} +56 -56
  94. package/dist/component/{tags-rac-CMHMsiwv.js → tags-rac-C6R6RHl2.js} +1 -1
  95. package/dist/component/text-area-field-rac-opBEx_8s.js +73 -0
  96. package/dist/component/{text-area-rac-BKGDa4E3.js → text-area-rac-D4iKhAqc.js} +1 -1
  97. package/dist/component/{text-input-field-rac-CU8eBRM4.js → text-input-field-rac-Ckp8Ierz.js} +6 -6
  98. package/dist/component/{text-input-headless-C1eFy2gl.js → text-input-headless-D-LXpqS3.js} +6 -6
  99. package/dist/component/{text-input-rac-DO0eI3ty.js → text-input-rac-ChxuJj-q.js} +1 -1
  100. package/dist/component/{time-input-rac-BJ0AL2Be.js → time-input-rac-C5_rEy7W.js} +23 -23
  101. package/dist/component/{url-input-field-rac-BtpAuKfp.js → url-input-field-rac-CBOnhquz.js} +22 -22
  102. package/dist/component/{url-input-rac-CjnPbcHt.js → url-input-rac-BY-BVg6r.js} +1 -1
  103. package/dist/component/use-dropdown-option-class-name-C1iEE28P.js +28 -0
  104. package/dist/component/{use-element-state-class-name-X08kIFhd.js → use-element-state-class-name--YLulmsU.js} +1 -1
  105. package/dist/component/{use-service-options-base-DfHhMveM.js → use-service-options-base-BNLFmnHJ.js} +3 -3
  106. package/dist/component/{use-text-input-class-name-BAuokapo.js → use-text-input-class-name-3Xp-hNDT.js} +4 -4
  107. package/dist/form.d.ts +3 -0
  108. package/package.json +2 -2
  109. package/dist/component/date-time-input-field-rac-mqea6CtW.js +0 -423
  110. package/dist/component/dropdown-field-headless-ShcoDfPa.js +0 -84
  111. package/dist/component/dropdown-field-rac-DruF_YdZ.js +0 -32
  112. package/dist/component/field-rac.module-D06m9T9x.js +0 -24
  113. package/dist/component/quiz-radio-group-rac-BhNhoOSI.js +0 -13
  114. package/dist/component/service-dropdown-rac-DQkk3SlS.js +0 -142
  115. package/dist/component/text-area-field-rac-BnRuG5y8.js +0 -73
@@ -1,14 +1,14 @@
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
- import B from "classnames";
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-UCnayEKT.js";
3
+ import R from "classnames";
4
+ import { ag as Fe, au as ie, ap as ge, i as he, as as xe, e as re, at as be, ah as ce, ak as q, am as Ce } from "./form-B3YjGh0T.js";
5
5
  import { E as Le } from "./error-icon-hZxQ6DEy.js";
6
- import { s as I } from "./field-rac.module-D06m9T9x.js";
7
- import { y as ne, P as De, a0 as Ne, i as le, o as ae } from "./form-element-classes--p2vz_Bm.js";
6
+ import { s as I } from "./field-rac.module-BUvPquav.js";
7
+ import { B as ne, R as De, a2 as Ne, i as ae, q as le } from "./form-element-classes-CLZXu-91.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-PMBWtb3Z.js";
10
- import { L as Be } from "./field-label-headless-0racVfdo.js";
11
- import { DropZone as Re, Text as Se, FileTrigger as Me, Button as de, ProgressBar as Ie } from "react-aria-components";
9
+ import { b as ve, a as ye, D as _e, E as Be } from "./field-error-headless-9MKScovg.js";
10
+ import { L as Re } from "./field-label-headless-BaoLrUWJ.js";
11
+ import { DropZone as Te, Text as Se, FileTrigger as Me, Button as de, ProgressBar as Ie } from "react-aria-components";
12
12
  const we = {
13
13
  Video: "video/*",
14
14
  Image: "image/*",
@@ -21,59 +21,59 @@ 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: l }) => r.uploadFile({
25
- file: l,
24
+ const x = o.map(({ file: a }) => r.uploadFile({
25
+ file: a,
26
26
  formId: n,
27
27
  uploadTarget: e
28
28
  }).then((s) => {
29
- const { id: b, displayName: m, url: c, isPrivate: N } = s, y = {
29
+ const { id: b, displayName: m, url: c, isPrivate: N } = s, v = {
30
30
  fileId: b,
31
- displayName: m || l.name,
31
+ displayName: m || a.name,
32
32
  url: N ? void 0 : c,
33
- fileType: l.type || "application/octet-stream"
33
+ fileType: a.type || "application/octet-stream"
34
34
  };
35
35
  return i({
36
- file: l,
37
- uploadedFile: y
38
- }), y;
36
+ file: a,
37
+ uploadedFile: v
38
+ }), v;
39
39
  }).catch((s) => {
40
- d(s, l);
40
+ d(s, a);
41
41
  }));
42
- return (await Promise.all(x)).filter((l) => l !== void 0);
42
+ return (await Promise.all(x)).filter((a) => a !== 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 [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);
46
+ const [a, s] = Q(ke(r)), [b, m] = Q(r || []), [c, N] = Q(), 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
- const C = oe(() => l.some((u) => u.state === "uploading"), [
49
- l
48
+ const C = oe(() => a.some((u) => u.state === "uploading"), [
49
+ a
50
50
  ]);
51
51
  se(() => {
52
- S.current !== C && (S.current = C, v(o, C ? re.BUSY : re.READY));
52
+ S.current !== C && (S.current = C, y(o, C ? re.BUSY : re.READY));
53
53
  }, [
54
54
  C,
55
- v,
55
+ y,
56
56
  o
57
57
  ]);
58
- const k = P(() => {
59
- if (!l.length)
58
+ const U = P(() => {
59
+ if (!a.length)
60
60
  return n;
61
- const F = l.filter((u) => u.state === "uploading").length;
61
+ const F = a.filter((u) => u.state === "uploading").length;
62
62
  if (F) {
63
- const u = l.filter((p) => p.state === "uploaded" && p.file.size > 0).length, g = u / (u + F);
63
+ const u = a.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: l.length
69
+ count: a.length
70
70
  });
71
71
  }, [
72
- l,
72
+ a,
73
73
  n,
74
74
  E
75
75
  ]), M = P(async (F) => {
76
- await y(F, ({ file: u, uploadedFile: g }) => {
76
+ await v(F, ({ file: u, uploadedFile: g }) => {
77
77
  s((p) => p.map((f) => f.file === u ? {
78
78
  file: u,
79
79
  state: "uploaded"
@@ -92,34 +92,34 @@ function Ze({ valueSliderLimit: e, value: r, explanationText: n, target: o, onCh
92
92
  } : f));
93
93
  });
94
94
  }, [
95
- y,
95
+ v,
96
96
  E
97
97
  ]), O = async (F) => {
98
98
  if (c && N(void 0), F) {
99
- if (l.length + F.length > e) {
99
+ if (a.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) => (l.some((Y) => Y.file.name === L.name) || f.push({
105
+ const p = Array.from(F).reduce((f, L) => (a.some((Y) => Y.file.name === L.name) || f.push({
106
106
  file: L,
107
107
  state: "uploading"
108
108
  }), f), []);
109
109
  s([
110
- ...l,
110
+ ...a,
111
111
  ...p
112
112
  ]), await M(p);
113
113
  }
114
- }, q = (F) => {
115
- const u = l[F];
114
+ }, j = (F) => {
115
+ const u = a[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 = l.filter((f) => f.file.name !== u.file.name);
119
+ const p = a.filter((f) => f.file.name !== u.file.name);
120
120
  s(p), p.length === 0 && D();
121
121
  } else {
122
- const g = l.filter((p) => p !== u);
122
+ const g = a.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: l,
131
+ files: a,
132
132
  limitError: c,
133
- hover: U,
134
- getExplanationText: k,
133
+ hover: k,
134
+ getExplanationText: U,
135
135
  handleChange: O,
136
- handleDelete: q,
136
+ handleDelete: j,
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,8 +162,8 @@ 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 } = j(), { handleFileChange: d } = Z(), x = h(e, A.Title), D = h(e, A.Subtitle), l = h(e, A.Button);
166
- return /* @__PURE__ */ t.createElement(Re, {
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);
166
+ return /* @__PURE__ */ t.createElement(Te, {
167
167
  "aria-describedby": n,
168
168
  className: r,
169
169
  "data-invalid": i,
@@ -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), l);
186
- }, ke = ({ className: e, children: r }) => {
185
+ }, x, D), a);
186
+ }, Ue = ({ 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: 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);
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: v, buttonRef: E, handleBlur: T, 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
- allowsMultiple: y,
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, {
@@ -220,30 +220,30 @@ const A = ({ children: e, className: r }) => {
220
220
  ...C,
221
221
  "aria-roledescription": n,
222
222
  "aria-invalid": _ || void 0,
223
- "aria-required": l
223
+ "aria-required": a
224
224
  }),
225
225
  isDisabled: D,
226
226
  className: e,
227
227
  onFocus: s,
228
- onBlur: R
228
+ onBlur: T
229
229
  }, r));
230
230
  }, Pe = ({ className: e }) => {
231
- const { buttonText: r } = j();
231
+ const { buttonText: r } = q();
232
232
  return /* @__PURE__ */ t.createElement("span", {
233
233
  className: e
234
234
  }, r);
235
235
  };
236
236
  J.Text = Pe;
237
- A.Title = ke;
237
+ A.Title = Ue;
238
238
  A.Subtitle = Oe;
239
239
  A.Button = J;
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), l = h(e, T.Spinner), s = h(e, T.Error);
240
+ const B = ({ children: e, className: r, ...n }) => {
241
+ const { file: o, index: i } = n, d = o.file.name, x = h(e, B.Name), D = h(e, B.Remove), a = h(e, B.Spinner), s = h(e, B.Error);
242
242
  return /* @__PURE__ */ t.createElement("div", {
243
243
  className: r
244
244
  }, z(x, {
245
245
  fileName: d
246
- }), o.state === "uploading" ? l : z(D, {
246
+ }), o.state === "uploading" ? a : 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 } = j(), { handleDelete: D, fileRemoveButtonRefs: l } = Z(), s = V(null);
258
+ const { fileName: i, index: d } = o, { disabled: x } = q(), { handleDelete: D, fileRemoveButtonRefs: a } = Z(), s = V(null);
259
259
  se(() => {
260
- const m = l.current, c = i;
260
+ const m = a.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
- l
266
+ a
267
267
  ]);
268
268
  const b = () => {
269
269
  D(d);
@@ -279,22 +279,22 @@ const T = ({ children: e, className: r, ...n }) => {
279
279
  }, n);
280
280
  }, ue = ({ className: e, children: r, ...n }) => {
281
281
  const { errorMessage: o } = n;
282
- return o ? /* @__PURE__ */ t.createElement(ve, {
282
+ return o ? /* @__PURE__ */ t.createElement(ye, {
283
283
  value: o
284
284
  }, /* @__PURE__ */ t.createElement("div", {
285
285
  className: e,
286
286
  role: "alert"
287
287
  }, r)) : null;
288
- }, je = ({ className: e, "aria-label": r, children: n }) => /* @__PURE__ */ t.createElement(Ie, {
288
+ }, qe = ({ 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 = ze;
294
- T.Remove = Ve;
295
- T.Spinner = je;
296
- T.Error = ue;
297
- ue.Text = ye;
293
+ B.Name = ze;
294
+ B.Remove = Ve;
295
+ B.Spinner = qe;
296
+ B.Error = ue;
297
+ ue.Text = ve;
298
298
  const X = ({ children: e, className: r }) => {
299
299
  const { files: n } = Z(), o = h(e, X.File);
300
300
  return !n || n.length === 0 ? null : /* @__PURE__ */ t.createElement("div", {
@@ -305,20 +305,20 @@ const X = ({ children: e, className: r }) => {
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 } = j(), c = V(null), N = V({}), y = P(() => {
308
+ X.File = B;
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({}), v = P(() => {
311
311
  var L;
312
312
  (L = c.current) == null || L.focus();
313
- }, []), { files: E, limitError: R, hover: U, getExplanationText: v, handleBlur: S, handleChange: _, handleDelete: C, accept: k } = Ze({
313
+ }, []), { files: E, limitError: T, hover: k, getExplanationText: y, handleBlur: S, handleChange: _, handleDelete: C, accept: U } = 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: l,
321
- onFilesCleared: y
320
+ onBlur: a,
321
+ onFilesCleared: v
322
322
  }), M = P((L) => {
323
323
  var te;
324
324
  const ee = E[L], Y = G(ee);
@@ -326,17 +326,17 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
326
326
  }, [
327
327
  C,
328
328
  E
329
- ]), O = d > 1, q = E.length >= d, $ = oe(() => ({
329
+ ]), O = d > 1, j = E.length >= d, $ = oe(() => ({
330
330
  handleFileChange: _,
331
331
  handleBlur: S,
332
332
  handleDelete: M,
333
333
  files: E,
334
- accept: k,
335
- limitReached: q,
334
+ accept: U,
335
+ limitReached: j,
336
336
  multiple: O,
337
- getExplanationText: v,
338
- hover: U,
339
- limitError: R,
337
+ getExplanationText: y,
338
+ hover: k,
339
+ limitError: T,
340
340
  buttonRef: c,
341
341
  fileRemoveButtonRefs: N
342
342
  }), [
@@ -344,13 +344,13 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
344
344
  S,
345
345
  M,
346
346
  E,
347
- k,
348
- q,
349
- O,
350
- v,
351
347
  U,
352
- R
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);
348
+ j,
349
+ O,
350
+ y,
351
+ k,
352
+ T
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);
354
354
  return Ce(() => {
355
355
  var L;
356
356
  (L = c.current) == null || L.focus();
@@ -361,23 +361,23 @@ const G = (e) => e.file.name, a = ({ children: e }) => {
361
361
  renderLabel: () => K,
362
362
  renderInput: () => W ?? F,
363
363
  renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, z(f, {
364
- hasError: !!(s || R),
365
- errorMessage: R ?? b
364
+ hasError: !!(s || T),
365
+ errorMessage: T ?? b
366
366
  }), p, u, g)
367
367
  }));
368
- }, qe = ({ className: e }) => {
368
+ }, je = ({ 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
- 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;
374
+ l.Label = Re;
375
+ l.DropZone = A;
376
+ l.Button = J;
377
+ l.Explanation = je;
378
+ l.Files = X;
379
+ l.Description = _e;
380
+ l.Error = Be;
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(a, null, /* @__PURE__ */ t.createElement(a.Label, {
454
- className: B(ne, I.label)
455
- }, /* @__PURE__ */ t.createElement(a.Label.Required, {
456
- className: B(De, I.requiredMark)
457
- })), /* @__PURE__ */ t.createElement(a.Button, {
458
- className: B(Ne, I.uploadButton),
453
+ return /* @__PURE__ */ t.createElement(l, null, /* @__PURE__ */ t.createElement(l.Label, {
454
+ className: R(ne, I.label)
455
+ }, /* @__PURE__ */ t.createElement(l.Label.Required, {
456
+ className: R(De, I.requiredMark)
457
+ })), /* @__PURE__ */ t.createElement(l.Button, {
458
+ className: R(Ne, I.uploadButton),
459
459
  "aria-roledescription": e("file-upload.aria-roledescription")
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
- className: B(ne, w.files)
464
- }, /* @__PURE__ */ t.createElement(a.Files.File, {
460
+ }, /* @__PURE__ */ t.createElement($e, null), /* @__PURE__ */ t.createElement(l.Button.Text, null)), /* @__PURE__ */ t.createElement(l.Explanation, {
461
+ className: R(ae, I.description, w.explanation)
462
+ }), /* @__PURE__ */ t.createElement(l.Files, {
463
+ className: R(ne, w.files)
464
+ }, /* @__PURE__ */ t.createElement(l.Files.File, {
465
465
  className: w.file
466
- }, /* @__PURE__ */ t.createElement(a.Files.File.Name, {
466
+ }, /* @__PURE__ */ t.createElement(l.Files.File.Name, {
467
467
  className: w.fileName
468
- }), /* @__PURE__ */ t.createElement(a.Files.File.Spinner, {
468
+ }), /* @__PURE__ */ t.createElement(l.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(a.Files.File.Remove, {
471
+ }, /* @__PURE__ */ t.createElement(Ye, null)), /* @__PURE__ */ t.createElement(l.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(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)));
474
+ }, /* @__PURE__ */ t.createElement(We, null)), /* @__PURE__ */ t.createElement(l.Files.File.Error, {
475
+ className: R(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: R(ae, I.description)
478
+ }, rt), /* @__PURE__ */ t.createElement(l.Error, {
479
+ className: R(le, I.error)
480
+ }, /* @__PURE__ */ t.createElement(Le, null), /* @__PURE__ */ t.createElement(l.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 _ } from "react";
1
+ import t, { useMemo as b } from "react";
2
2
  import { RicosViewer as A } from "@wix/ricos/viewer";
3
3
  import u from "classnames";
4
- import { aj as C, ab as I, ag as P } from "./form-UCnayEKT.js";
4
+ import { ak as C, ac as I, ah as P } from "./form-B3YjGh0T.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-PMBWtb3Z.js";
8
- import { L as R } from "./field-label-headless-0racVfdo.js";
9
- import { s as L } from "./field-rac.module-D06m9T9x.js";
10
- import { y as v, z as g, i as M } from "./form-element-classes--p2vz_Bm.js";
7
+ import { D as x, E as N } from "./field-error-headless-9MKScovg.js";
8
+ import { L as R } from "./field-label-headless-BaoLrUWJ.js";
9
+ import { s as L } from "./field-rac.module-BUvPquav.js";
10
+ import { B as v, C as B, i as M } from "./form-element-classes-CLZXu-91.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 = _(() => {
13
+ const { id: n, validation: a, FieldLayout: l } = C(), { currency: o, regionalFormat: m } = I(), s = b(() => {
14
14
  var d, E, f;
15
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
- ]), 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);
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);
19
19
  return /* @__PURE__ */ t.createElement(l, {
20
20
  fieldId: n,
21
21
  renderLabel: () => y,
@@ -24,9 +24,9 @@ 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, b)
27
+ renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, _, D)
28
28
  });
29
- }, B = ({ className: r, ...n }) => {
29
+ }, g = ({ className: r, ...n }) => {
30
30
  const { price: a, currencyCode: l, locale: o } = n, { inputId: m, ariaDescribedBy: s } = P(), i = S({
31
31
  amount: a,
32
32
  currency: l,
@@ -42,21 +42,21 @@ const e = ({ children: r }) => {
42
42
  className: r
43
43
  }, null);
44
44
  e.Label = T;
45
- e.Amount = B;
45
+ e.Amount = g;
46
46
  e.Description = x;
47
47
  e.Error = N;
48
- const V = "_value_c7203_1", j = {
48
+ const V = "_value_c7203_1", k = {
49
49
  value: V
50
- }, k = ({ content: r, locale: n }) => /* @__PURE__ */ t.createElement(A, {
50
+ }, h = ({ content: r, locale: n }) => /* @__PURE__ */ t.createElement(A, {
51
51
  content: r,
52
52
  locale: n
53
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(g, j.value)
56
+ className: u(B, k.value)
57
57
  }), /* @__PURE__ */ t.createElement(e.Description, {
58
58
  className: u(M, L.description)
59
- }, k)), X = () => /* @__PURE__ */ t.createElement(w, null);
59
+ }, h)), X = () => /* @__PURE__ */ t.createElement(w, null);
60
60
  export {
61
61
  X as FixedPaymentRAC
62
62
  };