@wix/form-elements 1.79.0 → 1.81.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 (106) hide show
  1. package/dist/component/{appointment-rac-lokvpd_p.js → appointment-rac-DmwbqZse.js} +82 -82
  2. package/dist/component/{bookings-address-rac-CU5NjBsy.js → bookings-address-rac-RCzVU87c.js} +1 -1
  3. package/dist/component/{bookings-email-rac-h3VGXrSQ.js → bookings-email-rac-Df_Wte1_.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-BtsTk_1b.js → bookings-first-name-rac-BmdRGYxF.js} +1 -1
  5. package/dist/component/{bookings-header-rac-BApE1hIE.js → bookings-header-rac-DewQWtkZ.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-BnO5iij1.js → bookings-last-name-rac-DmmNBuqy.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-BT1npKru.js → bookings-login-bar-rac-QskvFo0C.js} +5 -5
  8. package/dist/component/{bookings-phone-rac-DWf0haGa.js → bookings-phone-rac-7wn8IXna.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-C79XHlRL.js → bookings-rich-text-rac-B5nk0BlD.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-DNvhTChN.js → checkbox-field-rac-BnVNfYWL.js} +5 -5
  11. package/dist/component/{checkbox-group-field-headless-6hzWQkif.js → checkbox-group-field-headless-Bx5Y-RMP.js} +3 -3
  12. package/dist/component/{checkbox-group-field-rac-DbaB5Fx6.js → checkbox-group-field-rac-CZW28rj5.js} +7 -7
  13. package/dist/component/{checkbox-group-rac-BsKKhTeh.js → checkbox-group-rac-B20t8dTB.js} +1 -1
  14. package/dist/component/{checkbox-rac-Dx7LXOdw.js → checkbox-rac-ifC6qSE8.js} +1 -1
  15. package/dist/component/{contacts-address-rac-DJZ8_DKm.js → contacts-address-rac-XJRKvPlp.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-CWvsa7Kq.js → contacts-birthdate-rac-CKYESrPO.js} +1 -1
  17. package/dist/component/{contacts-company-rac-DgF8QpOb.js → contacts-company-rac-BXwEeb0p.js} +1 -1
  18. package/dist/component/{contacts-email-rac-CVqiij34.js → contacts-email-rac-D8Yspo_m.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-BwsRVRHq.js → contacts-first-name-rac-mvCGP1LJ.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-Blgm2DBB.js → contacts-last-name-rac-Clg9RXal.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-Dhtv3PGY.js → contacts-phone-rac-qEwjhByI.js} +1 -1
  22. package/dist/component/{contacts-position-rac-DYebFQea.js → contacts-position-rac-Bh8fvf2M.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-B_cvGaYj.js → contacts-subscribe-rac-DEQ2XkZo.js} +2 -2
  24. package/dist/component/{contacts-tax-id-rac-B_F4I7rf.js → contacts-tax-id-rac-0DUZ4tJz.js} +1 -1
  25. package/dist/component/{date-availability-Cc4kd1Yk.js → date-availability-2ek2RtXx.js} +1 -1
  26. package/dist/component/{date-input-field-rac-C__QbeDM.js → date-input-field-rac-Bp4SQB-t.js} +29 -29
  27. package/dist/component/{date-input-rac-BhzbmHYK.js → date-input-rac-CYsJcMe5.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-CASH891N.js → date-picker-field-rac-BGQvnSYI.js} +9 -9
  29. package/dist/component/{date-picker-rac-CMYAA925.js → date-picker-rac-BVncggYR.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-DPuxZ68o.js → date-time-input-field-rac-B1mggelc.js} +33 -33
  31. package/dist/component/{date-time-input-rac-BTJhrUXG.js → date-time-input-rac-DzdCno0L.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-5zlp2x1M.js → dext-checkbox-group-rac-CNCpeolD.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-Cn5u395b.js → dext-checkbox-rac-BYDQ58Mo.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-CFfQwbC_.js → dext-date-picker-rac-aYYk8Nrl.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-zRYi-0W6.js → dext-date-time-input-rac-v2v974p5.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-CtlNh5vF.js → dext-dropdown-rac-C846KZCe.js} +1 -1
  37. package/dist/component/{dext-email-rac-BQF4M5Mf.js → dext-email-rac-izjbfME9.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-GR4vTWMp.js → dext-number-input-rac-CnOFsD7l.js} +1 -1
  39. package/dist/component/{dext-phone-rac-COCdZPr9.js → dext-phone-rac-D8GMXD88.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-ZpHitbT0.js → dext-radio-group-rac-BtiyGCRh.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-Er2HC9eD.js → dext-rating-input-rac-BHJ1kitb.js} +1 -1
  42. package/dist/component/{dext-tags-rac-EciVMPQ0.js → dext-tags-rac-CvNjwS5R.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-D6JxrykV.js → dext-text-area-rac-X5L0Q3sC.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-CD3xkLpw.js → dext-text-input-rac-swkyAJqC.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-BNqCYy-H.js → dext-url-input-rac-BYlXOAkz.js} +1 -1
  46. package/dist/component/donation-rac-CDWLBZZM.js +318 -0
  47. package/dist/component/{dropdown-field-headless-NMc4cFx2.js → dropdown-field-headless-JJzbZvps.js} +3 -3
  48. package/dist/component/{dropdown-field-rac-hSbwxz3M.js → dropdown-field-rac-BodpIQ9Q.js} +5 -5
  49. package/dist/component/{dropdown-rac-DY2QSx-Q.js → dropdown-rac-Bfbxxx9k.js} +1 -1
  50. package/dist/component/{ecom-address-rac-CGlQmW6l.js → ecom-address-rac-BCnsL5tr.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-K3Dx-Boa.js → ecom-subscription-checkbox-rac-CNSdI_ty.js} +3 -3
  52. package/dist/component/{email-input-field-rac-DCKR6Yco.js → email-input-field-rac-Btaa4O5T.js} +48 -48
  53. package/dist/component/{events-repeater-rac-DS2hIZ81.js → events-repeater-rac-xBwqJddt.js} +10 -10
  54. package/dist/component/{events-rsvp-rac-iSG0hWt3.js → events-rsvp-rac-D90PwkHd.js} +3 -3
  55. package/dist/component/{field-error-headless-Lb5aaoR3.js → field-error-headless-BErhh9GG.js} +1 -1
  56. package/dist/component/{field-label-headless-C1VDQVhB.js → field-label-headless-BGyK-5xW.js} +1 -1
  57. package/dist/component/{file-upload-rac-BEUXTVXa.js → file-upload-rac-MxH3CVml.js} +21 -21
  58. package/dist/component/{fixed-payment-rac-BwrQJQ6w.js → fixed-payment-rac-DpBA9irF.js} +13 -13
  59. package/dist/component/{form-element-classes-BuM-vthE.js → form-element-classes-jC8D0LnK.js} +77 -63
  60. package/dist/component/{form-1k13yOes.js → form-f0tqdMye.js} +69 -69
  61. package/dist/component/form.css +1 -1
  62. package/dist/component/form.js +1 -1
  63. package/dist/component/{header-field-rac-BeFf5qfw.js → header-field-rac-BXxFqu9u.js} +3 -3
  64. package/dist/component/{header-rac-Cqvmjc8G.js → header-rac-BN70esac.js} +1 -1
  65. package/dist/component/image-choice-rac-DLBGIBXL.js +158 -0
  66. package/dist/component/{index-DhL-iYwY.js → index-BvB-uE1H.js} +2 -2
  67. package/dist/component/{index-B0SdXZJm.js → index-DXLEHYlA.js} +4 -4
  68. package/dist/component/{isObjectLike-DOWF1bjK.js → isObjectLike-BYOX5XY4.js} +1 -1
  69. package/dist/component/{multiline-address-field-rac-CBhxL2MB.js → multiline-address-field-rac-fcQYnPlO.js} +52 -52
  70. package/dist/component/{multiline-address-rac-BgZnu3UR.js → multiline-address-rac-D82Gbj3n.js} +1 -1
  71. package/dist/component/{number-input-field-rac-Cq0KLrSv.js → number-input-field-rac-B0-4Rz3w.js} +16 -16
  72. package/dist/component/{number-input-rac-ovbP_aP5.js → number-input-rac-Bnsvb-SO.js} +1 -1
  73. package/dist/component/{password-rac-DLKw8FXz.js → password-rac-BdBjFa8y.js} +15 -15
  74. package/dist/component/{payment-input-rac-EHufj8Y0.js → payment-input-rac-DkAGOvaF.js} +18 -18
  75. package/dist/component/{phone-input-field-rac-D1KzskYy.js → phone-input-field-rac-Ce_wuE46.js} +54 -54
  76. package/dist/component/{phone-rac-D71sfMS7.js → phone-rac-DslINtcH.js} +1 -1
  77. package/dist/component/{product-list-rac-BGrTM8kv.js → product-list-rac-C4P_SOyG.js} +25 -25
  78. package/dist/component/{quiz-radio-group-rac-BU2GBlqo.js → quiz-radio-group-rac-noy4fmD8.js} +2 -2
  79. package/dist/component/{radio-button-module-classes-BqNsWvgU.js → radio-button-module-classes-DXQ1UlmI.js} +3 -3
  80. package/dist/component/{radio-group-field-rac-BSY-fyxl.js → radio-group-field-rac-CYBDq7R1.js} +5 -5
  81. package/dist/component/{radio-group-rac-geRsORyh.js → radio-group-rac-CGHQFyJY.js} +1 -1
  82. package/dist/component/{rating-input-field-rac-D6gRUiSX.js → rating-input-field-rac-elaferlI.js} +18 -18
  83. package/dist/component/{rating-input-rac-BMtu7e5q.js → rating-input-rac-fnOtTKN8.js} +1 -1
  84. package/dist/component/{rich-content-rac.module-CFMzPWHV.js → rich-content-rac.module-DbwuwQeo.js} +1 -1
  85. package/dist/component/{rich-text-field-rac-D0Klsdj7.js → rich-text-field-rac-DtcQC8zU.js} +3 -3
  86. package/dist/component/{rich-text-rac-o7idQY51.js → rich-text-rac-CuT97sby.js} +1 -1
  87. package/dist/component/{service-dropdown-rac-BXq358Pw.js → service-dropdown-rac-rk2tzikX.js} +24 -24
  88. package/dist/component/{services-multi-choice-rac-DVRk7Ayt.js → services-multi-choice-rac-BMQyF_xs.js} +7 -7
  89. package/dist/component/{signature-rac-CblU7c_6.js → signature-rac-DeV9C6ta.js} +41 -41
  90. package/dist/component/{submit-button-rac-DYz_oLbv.js → submit-button-rac-BpN-FYtM.js} +2 -2
  91. package/dist/component/tags-field-rac-ByC9DnyH.js +217 -0
  92. package/dist/component/{tags-rac-yRjGACmm.js → tags-rac-Dabz4jHd.js} +1 -1
  93. package/dist/component/{text-area-field-rac-C4ytlqwT.js → text-area-field-rac-CtSa8XW_.js} +14 -14
  94. package/dist/component/{text-area-rac-DkCdp41z.js → text-area-rac-CDLF-_56.js} +1 -1
  95. package/dist/component/{text-input-field-rac-TSY90sCu.js → text-input-field-rac-C6fQYKhI.js} +5 -5
  96. package/dist/component/{text-input-headless-D3b0XErK.js → text-input-headless-BwVLU9cp.js} +3 -3
  97. package/dist/component/{text-input-rac-CKiScYKV.js → text-input-rac-CoGTzfo1.js} +1 -1
  98. package/dist/component/{time-input-rac-Cjs21F9f.js → time-input-rac-DQDupKTA.js} +17 -17
  99. package/dist/component/{url-input-field-rac-Bf5NoN4o.js → url-input-field-rac-4T8gcMHH.js} +8 -8
  100. package/dist/component/{url-input-rac-DqgvJboS.js → url-input-rac-_d6XRdKX.js} +1 -1
  101. package/dist/component/{use-element-state-class-name-DkaI8J4Y.js → use-element-state-class-name-BqmaTba3.js} +1 -1
  102. package/dist/component/{use-service-options-base-cL2N21mJ.js → use-service-options-base-CRgxxz7b.js} +1 -1
  103. package/package.json +2 -2
  104. package/dist/component/donation-rac-Du_qsPD6.js +0 -307
  105. package/dist/component/image-choice-rac-DU1Tf2-T.js +0 -146
  106. package/dist/component/tags-field-rac-D068ijAD.js +0 -206
@@ -1,5 +1,5 @@
1
1
  import e from "react";
2
- import { T as r } from "./text-area-field-rac-C4ytlqwT.js";
2
+ import { T as r } from "./text-area-field-rac-CtSa8XW_.js";
3
3
  const a = () => /* @__PURE__ */ e.createElement(r, null);
4
4
  export {
5
5
  a as TextAreaRAC
@@ -1,11 +1,11 @@
1
1
  import { RicosViewer as m } from "@wix/ricos/viewer";
2
2
  import t from "classnames";
3
3
  import e from "react";
4
- import { T as r } from "./text-input-headless-D3b0XErK.js";
4
+ import { T as r } from "./text-input-headless-BwVLU9cp.js";
5
5
  import { E as o } from "./error-icon-hZxQ6DEy.js";
6
6
  import { s as a } from "./field-rac.module-ColNPUt0.js";
7
- import { z as n, P as c, y as E, p as i, i as p } from "./form-element-classes-BuM-vthE.js";
8
- const R = ({ content: s, locale: l }) => /* @__PURE__ */ e.createElement(m, {
7
+ import { y as n, O as c, x as E, o as i, i as R } from "./form-element-classes-jC8D0LnK.js";
8
+ const _ = ({ content: s, locale: l }) => /* @__PURE__ */ e.createElement(m, {
9
9
  content: s,
10
10
  locale: l
11
11
  }), N = () => /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
@@ -17,8 +17,8 @@ const R = ({ content: s, locale: l }) => /* @__PURE__ */ e.createElement(m, {
17
17
  }), /* @__PURE__ */ e.createElement(r.Error, {
18
18
  className: t(i, a.error)
19
19
  }, /* @__PURE__ */ e.createElement(o, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
20
- className: t(p, a.description)
21
- }, R));
20
+ className: t(R, a.description)
21
+ }, _));
22
22
  export {
23
23
  N as T
24
24
  };
@@ -1,9 +1,9 @@
1
1
  import t, { useRef as L } from "react";
2
2
  import { TextField as R, Input as v } from "react-aria-components";
3
- import { ai as d, af as c, ak as T } from "./form-1k13yOes.js";
3
+ import { ai as d, af as c, ak as T } from "./form-f0tqdMye.js";
4
4
  import { f as a } from "./find-child-C60k4CxG.js";
5
- import { D as g, E as h } from "./field-error-headless-Lb5aaoR3.js";
6
- import { L as x } from "./field-label-headless-C1VDQVhB.js";
5
+ import { D as g, E as h } from "./field-error-headless-BErhh9GG.js";
6
+ import { L as x } from "./field-label-headless-BGyK-5xW.js";
7
7
  const e = ({ children: r }) => {
8
8
  const { id: s, value: i, onChange: l, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: f, FieldLayout: b } = d(), { labelId: E } = c(), I = a(r, e.Label), F = a(r, e.Input), y = a(r, e.Description), D = a(r, e.Error);
9
9
  return /* @__PURE__ */ t.createElement(b, {
@@ -1,5 +1,5 @@
1
1
  import t from "react";
2
- import { T as e } from "./text-input-field-rac-TSY90sCu.js";
2
+ import { T as e } from "./text-input-field-rac-C6fQYKhI.js";
3
3
  const o = () => /* @__PURE__ */ t.createElement(e, null);
4
4
  export {
5
5
  o as TextInputRAC
@@ -1,31 +1,31 @@
1
- import e, { useCallback as H, useRef as V, useContext as k } from "react";
2
- import { RicosViewer as q } from "@wix/ricos/viewer";
1
+ import e, { useCallback as H, useRef as V, useContext as x } from "react";
2
+ import { RicosViewer as k } from "@wix/ricos/viewer";
3
3
  import c from "classnames";
4
- import { parseTime as v } from "@internationalized/date";
5
- import { TimeField as x, DateInput as B, DateSegment as h, TimeFieldStateContext as U } from "react-aria-components";
6
- import { ai as p, af as j, as as T, ak as z } from "./form-1k13yOes.js";
4
+ import { parseTime as q } from "@internationalized/date";
5
+ import { TimeField as v, DateInput as B, DateSegment as h, TimeFieldStateContext as U } from "react-aria-components";
6
+ import { ai as p, af as j, as as T, ak as Q } from "./form-f0tqdMye.js";
7
7
  import { f as m, a as F } from "./find-child-C60k4CxG.js";
8
- import { D as Q, E as G } from "./field-error-headless-Lb5aaoR3.js";
9
- import { L as J } from "./field-label-headless-C1VDQVhB.js";
8
+ import { D as z, E as G } from "./field-error-headless-BErhh9GG.js";
9
+ import { L as J } from "./field-label-headless-BGyK-5xW.js";
10
10
  import { E as K } from "./error-icon-hZxQ6DEy.js";
11
11
  import { H as S } from "./custom-focus-class-_483Pkwp.js";
12
12
  import { s as E } from "./field-rac.module-ColNPUt0.js";
13
- import { z as W, P as X, y as Y, p as Z, i as $ } from "./form-element-classes-BuM-vthE.js";
13
+ import { y as W, O as X, x as Y, o as Z, i as $ } from "./form-element-classes-jC8D0LnK.js";
14
14
  const r = ({ children: t }) => {
15
15
  const { id: n, value: l, onChange: o, disabled: i, readOnly: s, required: a, onBlur: d, onFocus: f, use24HourFormat: b, FieldLayout: I, hasError: C } = p(), { inputId: L, ariaDescribedBy: g, labelId: D } = j(), R = H((M) => {
16
16
  const w = ae(M);
17
17
  o(w);
18
18
  }, [
19
19
  o
20
- ]), y = m(t, r.Label), N = m(t, r.Time), P = m(t, r.Description), A = m(t, r.Error), O = ne(l);
20
+ ]), y = m(t, r.Label), N = m(t, r.Time), O = m(t, r.Description), P = m(t, r.Error), A = ne(l);
21
21
  return /* @__PURE__ */ e.createElement(I, {
22
22
  fieldId: n,
23
23
  renderLabel: () => y,
24
- renderInput: () => /* @__PURE__ */ e.createElement(x, {
24
+ renderInput: () => /* @__PURE__ */ e.createElement(v, {
25
25
  "aria-labelledby": D,
26
26
  id: L,
27
27
  "aria-describedby": g,
28
- value: O,
28
+ value: A,
29
29
  onChange: R,
30
30
  isDisabled: i,
31
31
  isReadOnly: s,
@@ -35,7 +35,7 @@ const r = ({ children: t }) => {
35
35
  onFocus: f,
36
36
  hourCycle: b ? 24 : 12
37
37
  }, N),
38
- renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, A, P)
38
+ renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, P, O)
39
39
  });
40
40
  }, u = ({ children: t, className: n }) => {
41
41
  const { hasError: l } = p(), o = m(t, u.Hour), i = m(t, u.Minute), s = m(t, u.Period);
@@ -66,7 +66,7 @@ const r = ({ children: t }) => {
66
66
  });
67
67
  }, ee = ({ className: t, ...n }) => {
68
68
  const { id: l, hidePlaceholder: o } = p(), { segment: i } = n, { t: s } = T(), a = V(null);
69
- z(() => {
69
+ Q(() => {
70
70
  var f;
71
71
  (f = a.current) == null || f.focus();
72
72
  }, l);
@@ -89,7 +89,7 @@ const r = ({ children: t }) => {
89
89
  }
90
90
  });
91
91
  }, re = ({ className: t, ...n }) => {
92
- const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = T(), s = k(U), a = l ? void 0 : i("field.date.placeholder.period"), d = () => s == null ? void 0 : s.increment("dayPeriod");
92
+ const { hidePlaceholder: l } = p(), { segment: o } = n, { t: i } = T(), s = x(U), a = l ? void 0 : i("field.date.placeholder.period"), d = () => s == null ? void 0 : s.increment("dayPeriod");
93
93
  return /* @__PURE__ */ e.createElement(h, {
94
94
  segment: o,
95
95
  className: t,
@@ -104,13 +104,13 @@ u.Minute = te;
104
104
  u.Period = re;
105
105
  r.Label = J;
106
106
  r.Time = u;
107
- r.Description = Q;
107
+ r.Description = z;
108
108
  r.Error = G;
109
109
  function ne(t) {
110
110
  if (!t)
111
111
  return null;
112
112
  try {
113
- return v(t);
113
+ return q(t);
114
114
  } catch {
115
115
  return null;
116
116
  }
@@ -130,7 +130,7 @@ const oe = "_time_1wbmw_1", se = "_hour_1wbmw_14", le = "_minute_1wbmw_15", ie =
130
130
  hour: se,
131
131
  minute: le,
132
132
  period: ie
133
- }, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(q, {
133
+ }, ce = ({ content: t, locale: n }) => /* @__PURE__ */ e.createElement(k, {
134
134
  content: t,
135
135
  locale: n
136
136
  }), me = () => /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
@@ -2,14 +2,14 @@ import { RicosViewer as O } from "@wix/ricos/viewer";
2
2
  import l from "classnames";
3
3
  import r, { useCallback as h, useRef as y } from "react";
4
4
  import { TextField as N, Input as A } from "react-aria-components";
5
- import { ai as E, af as d, ak as P } from "./form-1k13yOes.js";
5
+ import { ai as E, af as d, ak as k } from "./form-f0tqdMye.js";
6
6
  import { f as u } from "./find-child-C60k4CxG.js";
7
- import { D as k, E as B } from "./field-error-headless-Lb5aaoR3.js";
8
- import { L as M } from "./field-label-headless-C1VDQVhB.js";
7
+ import { D as B, E as M } from "./field-error-headless-BErhh9GG.js";
8
+ import { L as P } from "./field-label-headless-BGyK-5xW.js";
9
9
  import { u as T } from "./use-invoke-callback-UH73A_J3.js";
10
10
  import { E as v } from "./error-icon-hZxQ6DEy.js";
11
11
  import { s } from "./field-rac.module-ColNPUt0.js";
12
- import { z as U, P as g, y as q, p as x, i as w } from "./form-element-classes-BuM-vthE.js";
12
+ import { y as U, O as g, x as q, o as x, i as w } from "./form-element-classes-jC8D0LnK.js";
13
13
  const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
14
14
  const { id: o, value: n, onChange: a, disabled: m, readOnly: i, required: c, hasError: I, onBlur: f, onFocus: F, FieldLayout: L } = E(), { labelId: R } = d(), p = T(f), b = u(t, e.Label), D = u(t, e.Input), _ = u(t, e.Description), C = u(t, e.Error), S = h(() => {
15
15
  a(V(n)), p();
@@ -36,7 +36,7 @@ const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
36
36
  });
37
37
  }, W = ({ className: t }) => {
38
38
  const { id: o, placeholder: n } = E(), { inputId: a, ariaDescribedBy: m } = d(), i = y(null);
39
- return P(() => {
39
+ return k(() => {
40
40
  var c;
41
41
  (c = i.current) == null || c.focus();
42
42
  }, o), /* @__PURE__ */ r.createElement(A, {
@@ -48,10 +48,10 @@ const V = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e
48
48
  placeholder: n
49
49
  });
50
50
  };
51
- e.Label = M;
51
+ e.Label = P;
52
52
  e.Input = W;
53
- e.Description = k;
54
- e.Error = B;
53
+ e.Description = B;
54
+ e.Error = M;
55
55
  const $ = ({ content: t, locale: o }) => /* @__PURE__ */ r.createElement(O, {
56
56
  content: t,
57
57
  locale: o
@@ -1,5 +1,5 @@
1
1
  import r from "react";
2
- import { U as t } from "./url-input-field-rac-Bf5NoN4o.js";
2
+ import { U as t } from "./url-input-field-rac-4T8gcMHH.js";
3
3
  const n = () => /* @__PURE__ */ r.createElement(t, null);
4
4
  export {
5
5
  n as UrlInputRAC
@@ -1,5 +1,5 @@
1
1
  import d from "classnames";
2
- import { ac as s } from "./form-1k13yOes.js";
2
+ import { ac as s } from "./form-f0tqdMye.js";
3
3
  const E = ({ globalClasses: e, moduleClasses: t }) => {
4
4
  var c;
5
5
  const r = ((c = s(e.key)) == null ? void 0 : c.split(/\s+/)) ?? [], m = r.includes(e.selected), o = r.includes(e.hover);
@@ -1,5 +1,5 @@
1
1
  import { useState as o, useCallback as D, useEffect as m, useMemo as b } from "react";
2
- import { ah as v } from "./form-1k13yOes.js";
2
+ import { ah as v } from "./form-f0tqdMye.js";
3
3
  const k = (h) => {
4
4
  const { fieldType: I, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = h, [L, O] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(I), r = D((e) => {
5
5
  let d = e.map((l) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/form-elements",
3
- "version": "1.79.0",
3
+ "version": "1.81.0",
4
4
  "description": "The Wix Forms rendering element for Builder apps, loaded at runtime as @wix/form-elements/Form",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -151,5 +151,5 @@
151
151
  ]
152
152
  }
153
153
  },
154
- "falconPackageHash": "b31c650f4d62d89278bcd21ec99b907b103ee3eda9264f109c181444"
154
+ "falconPackageHash": "db40d7d28b6f8133fa23c3e988f9d61d091dd06ed55cb7ead11bf3a5"
155
155
  }
@@ -1,307 +0,0 @@
1
- import t, { useMemo as B, useCallback as L, useRef as oe } from "react";
2
- import { RicosViewer as re } from "@wix/ricos/viewer";
3
- import y from "classnames";
4
- import { P as j, ai as A, af as k, as as ae, ab as v, ak as se, ac as le } from "./form-1k13yOes.js";
5
- import { RadioGroup as ie, RadioField as z, RadioButton as H, TextField as ce, Group as ue, Input as me } from "react-aria-components";
6
- import { debounce as pe } from "ts-debounce";
7
- import { f as O, a as N } from "./find-child-C60k4CxG.js";
8
- import { a as K } from "./format-currency-BwShJ9vM.js";
9
- import { D as de, E as Ee } from "./field-error-headless-Lb5aaoR3.js";
10
- import { L as Ie } from "./field-label-headless-C1VDQVhB.js";
11
- import { N as Ce } from "./options-layout-constants-DEfIEJWD.js";
12
- import { a as Oe, b as fe } from "./numeric-input-utils-CuBMi4-a.js";
13
- import { g as _e } from "./payment-field-utils-DobiK5Xh.js";
14
- import { u as he } from "./use-synced-display-value-DcAxdn3M.js";
15
- import { E as ye } from "./error-icon-hZxQ6DEy.js";
16
- import { s as g } from "./field-rac.module-ColNPUt0.js";
17
- import { z as Ne, P as be, j as Fe, k as ge, l as De, y as Le, p as Re, i as Se, F as Ae } from "./form-element-classes-BuM-vthE.js";
18
- import { o as ve } from "./options-rac.module-KM-VT_KY.js";
19
- function Te(e, n) {
20
- return e.reduce((o, r) => (o[r[n]] = r, o), {});
21
- }
22
- function xe(e) {
23
- return Te(e, "id");
24
- }
25
- const Me = 0.01;
26
- function Pe(e) {
27
- var n;
28
- return ((n = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : n.price) || "0";
29
- }
30
- function Q(e, n) {
31
- const o = Number(n || "0");
32
- return {
33
- productId: e.id,
34
- price: e.priceType === j.DYNAMIC_PRICE ? o : String(o),
35
- quantity: 1
36
- };
37
- }
38
- function Be(e) {
39
- return e.find((n) => n.priceType === j.DYNAMIC_PRICE);
40
- }
41
- function ke(e, n) {
42
- return (e == null ? void 0 : e.productId) === (n == null ? void 0 : n.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
43
- }
44
- function qe(e, n, o) {
45
- const r = (n == null ? void 0 : n.productId) === e ? void 0 : e, s = r ? o[r] : void 0;
46
- return s ? [
47
- Q(s, Pe(s))
48
- ] : [];
49
- }
50
- const a = ({ children: e }) => {
51
- const { id: n, value: o, onChange: r, disabled: s, required: m, onBlur: p, onFocus: _, validation: c, addOther: u, addOtherPlaceholder: i, FieldLayout: E, hasError: f } = A(), { labelId: h } = k(), { t: I } = ae(), { currency: T, regionalFormat: b } = v(), d = o == null ? void 0 : o[0], F = B(() => {
52
- var C, P;
53
- return ((P = (C = c == null ? void 0 : c.predefined) == null ? void 0 : C.paymentOptions) == null ? void 0 : P.products) || [];
54
- }, [
55
- c
56
- ]), x = B(() => xe(F), [
57
- F
58
- ]), l = B(() => u ? Be(F) : void 0, [
59
- F,
60
- u
61
- ]), W = ke(d, l), [q, M] = he({
62
- sourceValue: W,
63
- format: (C) => fe(String(C ?? ""), b),
64
- regionalFormat: b
65
- }), w = L((C) => {
66
- r(qe(C, d, x)), M("");
67
- }, [
68
- r,
69
- x,
70
- d,
71
- M
72
- ]), V = L((C) => {
73
- l && r(typeof C == "number" ? [
74
- Q(l, String(C))
75
- ] : []);
76
- }, [
77
- r,
78
- l
79
- ]), Y = B(() => pe(V, 500), [
80
- V
81
- ]), J = L((C) => {
82
- (d == null ? void 0 : d.productId) !== (l == null ? void 0 : l.id) && r(void 0);
83
- const { validInput: P, validNumber: te } = Oe(C.target.value, Me, q, b);
84
- M(P), Y(te);
85
- }, [
86
- b,
87
- r,
88
- d,
89
- l,
90
- q,
91
- Y,
92
- M
93
- ]), U = (d == null ? void 0 : d.productId) || null, X = L(() => {
94
- l != null && l.id && U !== l.id && w(l.id);
95
- }, [
96
- l == null ? void 0 : l.id,
97
- U,
98
- w
99
- ]), Z = O(e, a.Label), G = O(e, a.Control), ee = O(e, a.Description), ne = O(e, a.Error);
100
- return /* @__PURE__ */ t.createElement(E, {
101
- fieldId: n,
102
- renderLabel: () => Z,
103
- renderInput: () => /* @__PURE__ */ t.createElement(ie, {
104
- "aria-labelledby": h,
105
- value: U,
106
- onChange: w,
107
- isDisabled: s,
108
- isInvalid: f,
109
- isRequired: m,
110
- onBlur: p,
111
- onFocus: _
112
- }, G ? N(G, {
113
- productsById: x,
114
- addOther: u,
115
- customAmount: q,
116
- onCustomAmountInputChange: J,
117
- currency: T,
118
- t: I,
119
- placeholder: i === void 0 ? I("donation.other-option.placeholder") : i,
120
- customAmountProductId: l == null ? void 0 : l.id,
121
- onFocusCustomInput: X
122
- }) : null),
123
- renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, ne, ee)
124
- });
125
- }, we = ({ children: e, className: n, ...o }) => {
126
- const { productsById: r, addOther: s, customAmount: m, onCustomAmountInputChange: p, currency: _, t: c, placeholder: u, customAmountProductId: i, onFocusCustomInput: E } = o, { hasError: f } = A(), h = O(e, a.Options), I = O(e, a.OtherInput);
127
- return /* @__PURE__ */ t.createElement("div", {
128
- className: n,
129
- "data-invalid": f
130
- }, h ? N(h, {
131
- productsById: r
132
- }) : null, s && i && /* @__PURE__ */ t.createElement(z, {
133
- value: i,
134
- style: {
135
- position: "absolute",
136
- width: "1px",
137
- height: "1px",
138
- padding: "0",
139
- margin: "-1px",
140
- overflow: "hidden",
141
- clip: "rect(0, 0, 0, 0)",
142
- whiteSpace: "nowrap",
143
- border: "0"
144
- }
145
- }, /* @__PURE__ */ t.createElement(H, {
146
- "aria-label": c("donation.other-option.label", "Custom amount")
147
- }, c("donation.other-option.label", "Custom amount"))), I && s ? N(I, {
148
- customAmount: m,
149
- onCustomAmountInputChange: p,
150
- currency: _,
151
- t: c,
152
- placeholder: u,
153
- customAmountProductId: i,
154
- onFocusCustomInput: E
155
- }) : null);
156
- }, $ = ({ children: e, className: n, ...o }) => {
157
- const { productsById: r } = o, { options: s, numberOfColumns: m } = A(), { isMobile: p } = v(), _ = O(e, $.Option), c = p ? Ce.ONE : m;
158
- return /* @__PURE__ */ t.createElement("div", {
159
- className: n,
160
- "data-columns": c
161
- }, s.map((u) => {
162
- var f;
163
- const i = r[u.value], E = (f = i == null ? void 0 : i.fixedPriceOptions) == null ? void 0 : f.price;
164
- return N(_, {
165
- key: u.value,
166
- value: u.value,
167
- price: E || "0"
168
- });
169
- }));
170
- }, R = ({ children: e, className: n, ...o }) => {
171
- const { value: r, price: s } = o, { id: m } = A(), { currency: p, regionalFormat: _ } = v(), c = O(e, R.Value), u = O(e, R.Currency), { isCurrencyPrefixed: i } = K({
172
- amount: s,
173
- currency: p == null ? void 0 : p.code,
174
- locale: _
175
- }), E = oe(null);
176
- se(() => {
177
- var h, I;
178
- (I = (h = E.current) == null ? void 0 : h.querySelector("input")) == null || I.focus();
179
- }, m);
180
- const f = c ? N(c, {
181
- price: s
182
- }) : null;
183
- return /* @__PURE__ */ t.createElement(z, {
184
- value: r
185
- }, /* @__PURE__ */ t.createElement(H, {
186
- className: n,
187
- ref: E
188
- }, /* @__PURE__ */ t.createElement(t.Fragment, null, i && u, f, !i && u)));
189
- }, Ue = ({ className: e, ...n }) => {
190
- const { price: o } = n, { currency: r, regionalFormat: s } = v(), { value: m } = K({
191
- amount: o,
192
- currency: r == null ? void 0 : r.code,
193
- locale: s
194
- });
195
- return /* @__PURE__ */ t.createElement("span", {
196
- className: e
197
- }, m);
198
- }, $e = ({ className: e }) => {
199
- const { currency: n } = v();
200
- return /* @__PURE__ */ t.createElement("span", {
201
- className: e
202
- }, (n == null ? void 0 : n.sign) || (n == null ? void 0 : n.code) || "");
203
- };
204
- R.Value = Ue;
205
- R.Currency = $e;
206
- const S = ({ children: e, className: n, ...o }) => {
207
- const { customAmount: r, onCustomAmountInputChange: s, currency: m, t: p, placeholder: _, customAmountProductId: c, onFocusCustomInput: u } = o, { disabled: i, hasError: E } = A(), { labelId: f, prefixId: h } = k(), I = O(e, S.Currency), T = O(e, S.Value), b = L((F) => {
208
- s({
209
- target: {
210
- value: F
211
- }
212
- });
213
- }, [
214
- s
215
- ]), d = L(() => {
216
- u();
217
- }, [
218
- u
219
- ]);
220
- return /* @__PURE__ */ t.createElement(ce, {
221
- "aria-labelledby": `${f} ${h}`,
222
- value: r,
223
- onChange: b,
224
- onFocus: d,
225
- isDisabled: i,
226
- isInvalid: E
227
- }, /* @__PURE__ */ t.createElement(ue, {
228
- className: n,
229
- isDisabled: i,
230
- isInvalid: E
231
- }, r && m && I ? N(I, {
232
- currency: m,
233
- t: p
234
- }) : null, T ? N(T, {
235
- placeholder: _,
236
- customAmountProductId: c
237
- }) : null));
238
- }, Ve = ({ className: e, ...n }) => {
239
- const { currency: o, t: r } = n, { prefixId: s } = k();
240
- return /* @__PURE__ */ t.createElement("span", {
241
- id: s,
242
- "aria-hidden": !1,
243
- "aria-label": _e(r, o),
244
- className: e
245
- }, (o == null ? void 0 : o.sign) || (o == null ? void 0 : o.code) || "");
246
- }, Ye = ({ className: e, ...n }) => {
247
- const { placeholder: o, customAmountProductId: r } = n, { ariaDescribedBy: s, labelId: m, prefixId: p } = k();
248
- return /* @__PURE__ */ t.createElement(me, {
249
- id: r,
250
- "aria-labelledby": `${m} ${p}`,
251
- "aria-describedby": s,
252
- placeholder: o,
253
- inputMode: "decimal",
254
- autoComplete: "off",
255
- className: e
256
- });
257
- };
258
- S.Currency = Ve;
259
- S.Value = Ye;
260
- $.Option = R;
261
- a.Label = Ie;
262
- a.Control = we;
263
- a.Options = $;
264
- a.OtherInput = S;
265
- a.Description = de;
266
- a.Error = Ee;
267
- const Ge = "_control_11glx_1", je = "_options_11glx_7", ze = "_option_11glx_7", He = "_optionCurrency_11glx_89", Ke = "_otherInput_11glx_93", Qe = "_otherInputCurrency_11glx_112", D = {
268
- control: Ge,
269
- options: je,
270
- option: ze,
271
- optionCurrency: He,
272
- otherInput: Ke,
273
- otherInputCurrency: Qe
274
- }, We = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(re, {
275
- content: e,
276
- locale: n
277
- }), Je = () => {
278
- const e = le(Ae.DONATION_OPTION);
279
- return /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
280
- className: y(Ne, g.label)
281
- }, /* @__PURE__ */ t.createElement(a.Label.Required, {
282
- className: y(be, g.requiredMark)
283
- })), /* @__PURE__ */ t.createElement(a.Control, {
284
- className: D.control
285
- }, /* @__PURE__ */ t.createElement(a.Options, {
286
- className: y(Fe, ve.options, D.options)
287
- }, /* @__PURE__ */ t.createElement(a.Options.Option, {
288
- className: ({ isSelected: n }) => y(ge, D.option, e, {
289
- [De]: n
290
- })
291
- }, /* @__PURE__ */ t.createElement(a.Options.Option.Value, null), /* @__PURE__ */ t.createElement(a.Options.Option.Currency, {
292
- className: D.optionCurrency
293
- }))), /* @__PURE__ */ t.createElement(a.OtherInput, {
294
- className: y(Le, g.input, D.otherInput)
295
- }, /* @__PURE__ */ t.createElement(a.OtherInput.Currency, {
296
- className: D.otherInputCurrency
297
- }), /* @__PURE__ */ t.createElement(a.OtherInput.Value, {
298
- className: g.innerInput
299
- }))), /* @__PURE__ */ t.createElement(a.Error, {
300
- className: y(Re, g.error)
301
- }, /* @__PURE__ */ t.createElement(ye, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)), /* @__PURE__ */ t.createElement(a.Description, {
302
- className: y(Se, g.description)
303
- }, We));
304
- }, On = () => /* @__PURE__ */ t.createElement(Je, null);
305
- export {
306
- On as DonationRAC
307
- };