@wix/form-elements 1.63.0 → 1.65.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 (112) hide show
  1. package/dist/component/{appointment-rac-B1VVk_Ui.js → appointment-rac-0kUk8XQJ.js} +5 -5
  2. package/dist/component/{bookings-address-rac-IQeHFdHT.js → bookings-address-rac-BUM0wpw0.js} +1 -1
  3. package/dist/component/{bookings-email-rac-z26A790r.js → bookings-email-rac-BHlvupVS.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-Djf0GPP4.js → bookings-first-name-rac-Bwn6xv1U.js} +1 -1
  5. package/dist/component/{bookings-header-rac-CXOzAOpz.js → bookings-header-rac-BkRvQMi4.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-CbB8alM9.js → bookings-last-name-rac-DRTj4VdX.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-CXrLx7Pn.js → bookings-login-bar-rac-D-2Bt7Kx.js} +5 -5
  8. package/dist/component/{bookings-phone-rac-DGYx7h5g.js → bookings-phone-rac-CTcHHpDr.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-viJG57XF.js → bookings-rich-text-rac-n-w9iWII.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-e-RAmupX.js → checkbox-field-rac-BamOJv3P.js} +43 -43
  11. package/dist/component/checkbox-group-field-headless-BmKJbEi0.js +210 -0
  12. package/dist/component/checkbox-group-field-rac-CC8qfj0Y.js +40 -0
  13. package/dist/component/{checkbox-group-rac-CDfDTWqz.js → checkbox-group-rac-CsrP7zD5.js} +1 -1
  14. package/dist/component/{checkbox-rac-BRBKYD_5.js → checkbox-rac-X6E-fJ8k.js} +1 -1
  15. package/dist/component/{contacts-address-rac-BtWWQi77.js → contacts-address-rac-oYnkIZ6m.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-DaEUXJTf.js → contacts-birthdate-rac-B7p8LgYA.js} +1 -1
  17. package/dist/component/{contacts-company-rac-IgRyjtcM.js → contacts-company-rac-cjLRO5J-.js} +1 -1
  18. package/dist/component/{contacts-email-rac-BS1MDrMk.js → contacts-email-rac-BlJJSkGK.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-BAvXypDF.js → contacts-first-name-rac-Nl-MDndn.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-C289RYPl.js → contacts-last-name-rac-DhxAobRI.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-DIpyskam.js → contacts-phone-rac-CZLWlH0T.js} +1 -1
  22. package/dist/component/{contacts-position-rac-nPeh3lKU.js → contacts-position-rac-DlKC0lCU.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-Ci5OLk68.js → contacts-subscribe-rac-POSKh1Ta.js} +2 -2
  24. package/dist/component/{contacts-tax-id-rac-C4WB-SR0.js → contacts-tax-id-rac-uyBKxOJn.js} +1 -1
  25. package/dist/component/{date-availability-HHjPx4Uv.js → date-availability-DnFJD1aS.js} +1 -1
  26. package/dist/component/{date-input-field-rac-GFgFcpX2.js → date-input-field-rac-DojzGm-i.js} +22 -22
  27. package/dist/component/{date-input-rac-B9BUEIA-.js → date-input-rac-BaPKcAuU.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-BfjYIIuY.js → date-picker-field-rac-C1rzJMV8.js} +24 -24
  29. package/dist/component/{date-picker-rac-Bd2UN0ZF.js → date-picker-rac-BHsOfkYn.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-CAXnxLQP.js → date-time-input-field-rac-B4jAAxU8.js} +32 -32
  31. package/dist/component/{date-time-input-rac-BuJ3Awlh.js → date-time-input-rac-XyL5z_ma.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-DKp4cBVa.js → dext-checkbox-group-rac-DzpdOP3i.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-BMu_k06A.js → dext-checkbox-rac-BUWkvW5s.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-L3sdldhT.js → dext-date-picker-rac-CR0PUoOn.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-UmabFzDN.js → dext-date-time-input-rac-D3WhLSKK.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-DbjgYaG-.js → dext-dropdown-rac-BJ1UfAIM.js} +1 -1
  37. package/dist/component/{dext-email-rac-rNudrOOK.js → dext-email-rac-xk_5C79-.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-hw1FTrJL.js → dext-number-input-rac-Cu1Sqoac.js} +1 -1
  39. package/dist/component/{dext-phone-rac-DrZ_Vwv2.js → dext-phone-rac-S34qxXwg.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-DAt2ax-I.js → dext-radio-group-rac-DXnAk_eU.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-BW2Ike11.js → dext-rating-input-rac-ewGpgB63.js} +1 -1
  42. package/dist/component/{dext-tags-rac-DDzwlKrR.js → dext-tags-rac-BApZKGqP.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-D0xf4z3z.js → dext-text-area-rac-DBtuaiwM.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-Da04OLmq.js → dext-text-input-rac-qI8VECmA.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-B-g4xTqh.js → dext-url-input-rac-C6vzqNjn.js} +1 -1
  46. package/dist/component/donation-rac-BDVKvG4j.js +302 -0
  47. package/dist/component/{dropdown-field-headless-Js5TxdU4.js → dropdown-field-headless-DBl8vGed.js} +16 -16
  48. package/dist/component/{dropdown-field-rac-BDxcvX00.js → dropdown-field-rac-O6G7_kSn.js} +9 -9
  49. package/dist/component/{dropdown-rac-B5UHNzV-.js → dropdown-rac-BImZ5Jwe.js} +1 -1
  50. package/dist/component/{ecom-address-rac-0zm4bX37.js → ecom-address-rac-BU4XZ_Do.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-DCXoI33l.js → ecom-subscription-checkbox-rac-DLzpoNYm.js} +3 -3
  52. package/dist/component/{email-input-field-rac-svf6hUHF.js → email-input-field-rac-Ui0p35z5.js} +45 -45
  53. package/dist/component/{events-repeater-rac-DMIqzuVK.js → events-repeater-rac-bPKOOOit.js} +49 -49
  54. package/dist/component/{events-rsvp-rac-B_YD4ckO.js → events-rsvp-rac-lsRBBfPQ.js} +3 -3
  55. package/dist/component/{field-error-headless-DTKnr5Zx.js → field-error-headless-D6iejMQP.js} +3 -3
  56. package/dist/component/{field-label-headless-DV4aNd5Y.js → field-label-headless-BWLfU3YB.js} +4 -4
  57. package/dist/component/field-rac.module-DnUIb9Oh.js +21 -0
  58. package/dist/component/{file-upload-rac-lGKJjG3m.js → file-upload-rac-DqKL8QQZ.js} +116 -116
  59. package/dist/component/{fixed-payment-rac-BVS6glii.js → fixed-payment-rac-BDtRB8w2.js} +14 -14
  60. package/dist/component/{form-DzjdnO7t.js → form-CtWkUmxc.js} +1563 -1556
  61. package/dist/component/form-element-classes-BSMjWijd.js +63 -0
  62. package/dist/component/form.css +1 -1
  63. package/dist/component/form.js +1 -1
  64. package/dist/component/{header-field-rac-tzBH-8Yh.js → header-field-rac-BLM8RCDY.js} +7 -7
  65. package/dist/component/{header-rac-6thQAvVF.js → header-rac-DViRwafg.js} +1 -1
  66. package/dist/component/image-choice-rac-D76t2y-b.js +141 -0
  67. package/dist/component/{index-Lnx0829a.js → index--iRBHLXJ.js} +4 -4
  68. package/dist/component/{index-DIP7KB8P.js → index-pEItT2oo.js} +2 -2
  69. package/dist/component/{isObjectLike-B_1KizZV.js → isObjectLike-968AHV2b.js} +1 -1
  70. package/dist/component/{multiline-address-field-rac-BY2SUp2d.js → multiline-address-field-rac-CObOc8KE.js} +82 -82
  71. package/dist/component/{multiline-address-rac-BL8Yp4F0.js → multiline-address-rac-1qVZkN41.js} +1 -1
  72. package/dist/component/{number-input-field-rac-x0yFmXbe.js → number-input-field-rac-CPQ3u0N7.js} +19 -19
  73. package/dist/component/{number-input-rac-pJXc2YsD.js → number-input-rac-Bq1UyUPZ.js} +1 -1
  74. package/dist/component/{password-rac-B4XCP64b.js → password-rac-BZPK1VkN.js} +15 -15
  75. package/dist/component/{payment-input-rac-CZdOAjK4.js → payment-input-rac-CQrV0WmN.js} +28 -28
  76. package/dist/component/{phone-input-field-rac-DO_V5Z_T.js → phone-input-field-rac-DzUE1-RF.js} +39 -39
  77. package/dist/component/{phone-rac-D16nLDjP.js → phone-rac-BovOZ7V5.js} +1 -1
  78. package/dist/component/{product-list-rac-DER8gVqy.js → product-list-rac-CeGm1_WN.js} +71 -71
  79. package/dist/component/quiz-radio-group-rac-Lw2thQqC.js +13 -0
  80. package/dist/component/{radio-group-field-rac-Dt2pU0VV.js → radio-group-field-rac-BSVmjEgZ.js} +8 -8
  81. package/dist/component/{radio-group-field-rac.module--sO0VqCA.js → radio-group-field-rac.module-Cb3mm0f2.js} +7 -7
  82. package/dist/component/{radio-group-rac-CqCmtkNQ.js → radio-group-rac-BHhOCSQ2.js} +1 -1
  83. package/dist/component/{rating-input-field-rac-xDrHHcL2.js → rating-input-field-rac-BvbBZZDO.js} +31 -31
  84. package/dist/component/{rating-input-rac-Bo5E9N87.js → rating-input-rac-DDe1EBpt.js} +1 -1
  85. package/dist/component/{rich-content-rac.module-CJXbNca9.js → rich-content-rac.module-BacYkzEv.js} +1 -1
  86. package/dist/component/{rich-text-field-rac-CkV0Z9F-.js → rich-text-field-rac-D1W0mUjr.js} +3 -3
  87. package/dist/component/{rich-text-rac-59DbKpXz.js → rich-text-rac-B-cOn0RU.js} +1 -1
  88. package/dist/component/{service-dropdown-rac-BLnflnUr.js → service-dropdown-rac-CebfMkGP.js} +41 -41
  89. package/dist/component/services-multi-choice-rac-C4bF1xhB.js +76 -0
  90. package/dist/component/{signature-rac-Bb5IaS28.js → signature-rac-DWWT65Ez.js} +48 -48
  91. package/dist/component/{submit-button-rac-Bjyi8sUA.js → submit-button-rac-_mgn4ChE.js} +6 -6
  92. package/dist/component/{tags-field-rac-C_VO3_69.js → tags-field-rac-7coCWj0y.js} +39 -39
  93. package/dist/component/{tags-rac-CKiutCWe.js → tags-rac-rgsn8Os0.js} +1 -1
  94. package/dist/component/{text-area-field-rac-Cg-vIhFe.js → text-area-field-rac-5lUQxnNM.js} +15 -15
  95. package/dist/component/{text-area-rac-tMFx38UD.js → text-area-rac-DpGOBzN3.js} +1 -1
  96. package/dist/component/{text-input-field-rac-CgN_2hOD.js → text-input-field-rac-CgWadDfM.js} +6 -6
  97. package/dist/component/{text-input-headless-CkhvKrFp.js → text-input-headless-fhxuPytc.js} +11 -11
  98. package/dist/component/{text-input-rac-BsyBgd3b.js → text-input-rac-kgWS3UUV.js} +1 -1
  99. package/dist/component/{time-input-rac-BxRVJtHE.js → time-input-rac-CuLUJcBH.js} +34 -34
  100. package/dist/component/{url-input-field-rac-B_1yVniS.js → url-input-field-rac-CAGHb2na.js} +22 -22
  101. package/dist/component/{url-input-rac-D8VrKYVe.js → url-input-rac-s5_SVi0h.js} +1 -1
  102. package/dist/component/{use-service-options-base-Ci9gIluo.js → use-service-options-base-CYAEJ75H.js} +6 -6
  103. package/dist/form.d.ts +3 -1
  104. package/package.json +2 -2
  105. package/dist/component/checkbox-group-field-headless-Cvia4lL6.js +0 -204
  106. package/dist/component/checkbox-group-field-rac-BXxk90dk.js +0 -33
  107. package/dist/component/donation-rac-gKeq72jg.js +0 -305
  108. package/dist/component/field-rac.module-DtugsLiL.js +0 -21
  109. package/dist/component/form-element-classes-Bi-nNM8q.js +0 -55
  110. package/dist/component/image-choice-rac-Dx1b-saW.js +0 -141
  111. package/dist/component/quiz-radio-group-rac-BgTmHHi4.js +0 -13
  112. package/dist/component/services-multi-choice-rac-C-bFjwx8.js +0 -76
@@ -0,0 +1,302 @@
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 { RadioGroup as ae, RadioField as Y, RadioButton as z, TextField as se, Group as le, Input as ie } from "react-aria-components";
5
+ import { debounce as ce } from "ts-debounce";
6
+ import { P as H, ai as A, af as j, as as ue, ab as v, ak as me } from "./form-CtWkUmxc.js";
7
+ import { f, a as b } from "./find-child-C60k4CxG.js";
8
+ import { a as Q } from "./format-currency-BwShJ9vM.js";
9
+ import { D as pe, E as de } from "./field-error-headless-D6iejMQP.js";
10
+ import { L as Ie } from "./field-label-headless-BWLfU3YB.js";
11
+ import { N as Ee } from "./options-layout-constants-DEfIEJWD.js";
12
+ import { a as Ce, b as fe } from "./numeric-input-utils-CuBMi4-a.js";
13
+ import { g as Oe } from "./payment-field-utils-DobiK5Xh.js";
14
+ import { u as he } from "./use-synced-display-value-DcAxdn3M.js";
15
+ import { E as _e } from "./error-icon-hZxQ6DEy.js";
16
+ import { s as D } from "./field-rac.module-DnUIb9Oh.js";
17
+ import { z as ye, P as be, k as Fe, l as Ne, m as De, y as ge, q as Le, j as Re } from "./form-element-classes-BSMjWijd.js";
18
+ import { o as Se } from "./options-rac.module-KM-VT_KY.js";
19
+ function Ae(e, n) {
20
+ return e.reduce((o, r) => (o[r[n]] = r, o), {});
21
+ }
22
+ function ve(e) {
23
+ return Ae(e, "id");
24
+ }
25
+ const Pe = 0.01;
26
+ function Te(e) {
27
+ var n;
28
+ return ((n = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : n.price) || "0";
29
+ }
30
+ function W(e, n) {
31
+ const o = Number(n || "0");
32
+ return {
33
+ productId: e.id,
34
+ price: e.priceType === H.DYNAMIC_PRICE ? o : String(o),
35
+ quantity: 1
36
+ };
37
+ }
38
+ function Me(e) {
39
+ return e.find((n) => n.priceType === H.DYNAMIC_PRICE);
40
+ }
41
+ function xe(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 Be(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
+ W(s, Te(s))
48
+ ] : [];
49
+ }
50
+ const a = ({ children: e }) => {
51
+ const { id: n, value: o, onChange: r, disabled: s, required: m, onBlur: p, onFocus: h, validation: c, addOther: u, addOtherPlaceholder: i, FieldLayout: I, hasError: O } = A(), { labelId: _ } = j(), { t: E } = ue(), { currency: P, regionalFormat: F } = v(), d = o == null ? void 0 : o[0], N = B(() => {
52
+ var C, x;
53
+ return ((x = (C = c == null ? void 0 : c.predefined) == null ? void 0 : C.paymentOptions) == null ? void 0 : x.products) || [];
54
+ }, [
55
+ c
56
+ ]), T = B(() => ve(N), [
57
+ N
58
+ ]), l = B(() => u ? Me(N) : void 0, [
59
+ N,
60
+ u
61
+ ]), J = xe(d, l), [q, M] = he({
62
+ sourceValue: J,
63
+ format: (C) => fe(String(C ?? ""), F),
64
+ regionalFormat: F
65
+ }), k = L((C) => {
66
+ r(Be(C, d, T)), M("");
67
+ }, [
68
+ r,
69
+ T,
70
+ d,
71
+ M
72
+ ]), $ = L((C) => {
73
+ l && r(typeof C == "number" ? [
74
+ W(l, String(C))
75
+ ] : []);
76
+ }, [
77
+ r,
78
+ l
79
+ ]), V = B(() => ce($, 500), [
80
+ $
81
+ ]), K = L((C) => {
82
+ (d == null ? void 0 : d.productId) !== (l == null ? void 0 : l.id) && r(void 0);
83
+ const { validInput: x, validNumber: te } = Ce(C.target.value, Pe, q, F);
84
+ M(x), V(te);
85
+ }, [
86
+ F,
87
+ r,
88
+ d,
89
+ l,
90
+ q,
91
+ V,
92
+ M
93
+ ]), w = (d == null ? void 0 : d.productId) || null, X = L(() => {
94
+ l != null && l.id && w !== l.id && k(l.id);
95
+ }, [
96
+ l == null ? void 0 : l.id,
97
+ w,
98
+ k
99
+ ]), Z = f(e, a.Label), G = f(e, a.Control), ee = f(e, a.Description), ne = f(e, a.Error);
100
+ return /* @__PURE__ */ t.createElement(I, {
101
+ fieldId: n,
102
+ renderLabel: () => Z,
103
+ renderInput: () => /* @__PURE__ */ t.createElement(ae, {
104
+ "aria-labelledby": _,
105
+ value: w,
106
+ onChange: k,
107
+ isDisabled: s,
108
+ isInvalid: O,
109
+ isRequired: m,
110
+ onBlur: p,
111
+ onFocus: h
112
+ }, G ? b(G, {
113
+ productsById: T,
114
+ addOther: u,
115
+ customAmount: q,
116
+ onCustomAmountInputChange: K,
117
+ currency: P,
118
+ t: E,
119
+ placeholder: i === void 0 ? E("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
+ }, je = ({ children: e, className: n, ...o }) => {
126
+ const { productsById: r, addOther: s, customAmount: m, onCustomAmountInputChange: p, currency: h, t: c, placeholder: u, customAmountProductId: i, onFocusCustomInput: I } = o, { hasError: O } = A(), _ = f(e, a.Options), E = f(e, a.OtherInput);
127
+ return /* @__PURE__ */ t.createElement("div", {
128
+ className: n,
129
+ "data-invalid": O
130
+ }, _ ? b(_, {
131
+ productsById: r
132
+ }) : null, s && i && /* @__PURE__ */ t.createElement(Y, {
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(z, {
146
+ "aria-label": c("donation.other-option.label", "Custom amount")
147
+ }, c("donation.other-option.label", "Custom amount"))), E && s ? b(E, {
148
+ customAmount: m,
149
+ onCustomAmountInputChange: p,
150
+ currency: h,
151
+ t: c,
152
+ placeholder: u,
153
+ customAmountProductId: i,
154
+ onFocusCustomInput: I
155
+ }) : null);
156
+ }, U = ({ children: e, className: n, ...o }) => {
157
+ const { productsById: r } = o, { options: s, numberOfColumns: m } = A(), { isMobile: p } = v(), h = f(e, U.Option), c = p ? Ee.ONE : m;
158
+ return /* @__PURE__ */ t.createElement("div", {
159
+ className: n,
160
+ "data-columns": c
161
+ }, s.map((u) => {
162
+ var O;
163
+ const i = r[u.value], I = (O = i == null ? void 0 : i.fixedPriceOptions) == null ? void 0 : O.price;
164
+ return b(h, {
165
+ key: u.value,
166
+ value: u.value,
167
+ price: I || "0"
168
+ });
169
+ }));
170
+ }, R = ({ children: e, className: n, ...o }) => {
171
+ const { value: r, price: s } = o, { id: m } = A(), { currency: p, regionalFormat: h } = v(), c = f(e, R.Value), u = f(e, R.Currency), { isCurrencyPrefixed: i } = Q({
172
+ amount: s,
173
+ currency: p == null ? void 0 : p.code,
174
+ locale: h
175
+ }), I = oe(null);
176
+ me(() => {
177
+ var _, E;
178
+ (E = (_ = I.current) == null ? void 0 : _.querySelector("input")) == null || E.focus();
179
+ }, m);
180
+ const O = c ? b(c, {
181
+ price: s
182
+ }) : null;
183
+ return /* @__PURE__ */ t.createElement(Y, {
184
+ value: r
185
+ }, /* @__PURE__ */ t.createElement(z, {
186
+ className: n,
187
+ ref: I
188
+ }, /* @__PURE__ */ t.createElement(t.Fragment, null, i && u, O, !i && u)));
189
+ }, qe = ({ className: e, ...n }) => {
190
+ const { price: o } = n, { currency: r, regionalFormat: s } = v(), { value: m } = Q({
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
+ }, ke = ({ 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 = qe;
205
+ R.Currency = ke;
206
+ const S = ({ children: e, className: n, ...o }) => {
207
+ const { customAmount: r, onCustomAmountInputChange: s, currency: m, t: p, placeholder: h, customAmountProductId: c, onFocusCustomInput: u } = o, { disabled: i, hasError: I } = A(), { labelId: O, prefixId: _ } = j(), E = f(e, S.Currency), P = f(e, S.Value), F = L((N) => {
208
+ s({
209
+ target: {
210
+ value: N
211
+ }
212
+ });
213
+ }, [
214
+ s
215
+ ]), d = L(() => {
216
+ u();
217
+ }, [
218
+ u
219
+ ]);
220
+ return /* @__PURE__ */ t.createElement(se, {
221
+ "aria-labelledby": `${O} ${_}`,
222
+ value: r,
223
+ onChange: F,
224
+ onFocus: d,
225
+ isDisabled: i,
226
+ isInvalid: I
227
+ }, /* @__PURE__ */ t.createElement(le, {
228
+ className: n,
229
+ isDisabled: i,
230
+ isInvalid: I
231
+ }, r && m && E ? b(E, {
232
+ currency: m,
233
+ t: p
234
+ }) : null, P ? b(P, {
235
+ placeholder: h,
236
+ customAmountProductId: c
237
+ }) : null));
238
+ }, we = ({ className: e, ...n }) => {
239
+ const { currency: o, t: r } = n, { prefixId: s } = j();
240
+ return /* @__PURE__ */ t.createElement("span", {
241
+ id: s,
242
+ "aria-hidden": !1,
243
+ "aria-label": Oe(r, o),
244
+ className: e
245
+ }, (o == null ? void 0 : o.sign) || (o == null ? void 0 : o.code) || "");
246
+ }, Ue = ({ className: e, ...n }) => {
247
+ const { placeholder: o, customAmountProductId: r } = n, { ariaDescribedBy: s, labelId: m, prefixId: p } = j();
248
+ return /* @__PURE__ */ t.createElement(ie, {
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 = we;
259
+ S.Value = Ue;
260
+ U.Option = R;
261
+ a.Label = Ie;
262
+ a.Control = je;
263
+ a.Options = U;
264
+ a.OtherInput = S;
265
+ a.Description = pe;
266
+ a.Error = de;
267
+ const $e = "_control_141js_1", Ve = "_options_141js_7", Ge = "_option_141js_7", Ye = "_optionCurrency_141js_89", ze = "_otherInput_141js_93", He = "_otherInputCurrency_141js_112", g = {
268
+ control: $e,
269
+ options: Ve,
270
+ option: Ge,
271
+ optionCurrency: Ye,
272
+ otherInput: ze,
273
+ otherInputCurrency: He
274
+ }, Qe = ({ content: e, locale: n }) => /* @__PURE__ */ t.createElement(re, {
275
+ content: e,
276
+ locale: n
277
+ }), We = () => /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
278
+ className: y(ye, D.label)
279
+ }, /* @__PURE__ */ t.createElement(a.Label.Required, {
280
+ className: y(be, D.requiredMark)
281
+ })), /* @__PURE__ */ t.createElement(a.Control, {
282
+ className: g.control
283
+ }, /* @__PURE__ */ t.createElement(a.Options, {
284
+ className: y(Fe, Se.options, g.options)
285
+ }, /* @__PURE__ */ t.createElement(a.Options.Option, {
286
+ className: ({ isSelected: e }) => y(Ne, e && De, g.option)
287
+ }, /* @__PURE__ */ t.createElement(a.Options.Option.Value, null), /* @__PURE__ */ t.createElement(a.Options.Option.Currency, {
288
+ className: g.optionCurrency
289
+ }))), /* @__PURE__ */ t.createElement(a.OtherInput, {
290
+ className: y(ge, D.input, g.otherInput)
291
+ }, /* @__PURE__ */ t.createElement(a.OtherInput.Currency, {
292
+ className: g.otherInputCurrency
293
+ }), /* @__PURE__ */ t.createElement(a.OtherInput.Value, {
294
+ className: D.innerInput
295
+ }))), /* @__PURE__ */ t.createElement(a.Error, {
296
+ className: y(Le, D.error)
297
+ }, /* @__PURE__ */ t.createElement(_e, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)), /* @__PURE__ */ t.createElement(a.Description, {
298
+ className: y(Re, D.description)
299
+ }, Qe)), En = () => /* @__PURE__ */ t.createElement(We, null);
300
+ export {
301
+ En as DonationRAC
302
+ };
@@ -1,21 +1,21 @@
1
1
  import e, { useState as E, useCallback as g, useRef as q } from "react";
2
2
  import { UNSAFE_PortalProvider as A } from "react-aria";
3
- import { Select as j, SelectValue as w, ListBox as M, ListBoxItem as U } from "react-aria-components";
4
- import { ah as p, ae as b, aj as _ } from "./form-DzjdnO7t.js";
3
+ import { Select as w, SelectValue as M, ListBox as U, ListBoxItem as _ } from "react-aria-components";
4
+ import { ai as p, af as b, ak as j } from "./form-CtWkUmxc.js";
5
5
  import { f as d, a as z } from "./find-child-C60k4CxG.js";
6
- import { D as G, E as H } from "./field-error-headless-DTKnr5Zx.js";
7
- import { L as J } from "./field-label-headless-DV4aNd5Y.js";
6
+ import { D as G, E as H } from "./field-error-headless-D6iejMQP.js";
7
+ import { L as J } from "./field-label-headless-BWLfU3YB.js";
8
8
  import { S as K, N as Q } from "./non-modal-popover-DtIMXHbe.js";
9
9
  const n = ({ children: t }) => {
10
- const { id: o, value: r, defaultValue: l, options: a = [], readOnly: s, onChange: u, placeholder: m, disabled: i, required: v, onBlur: O, onFocus: y, FieldLayout: F, hasError: h } = p(), [C, D] = E(!1), [L, I] = E(null), B = r && a.some((c) => (c.value ?? c.label) === r) ? r : l || null, { labelId: N } = b(), P = g((c) => {
10
+ const { id: o, value: r, defaultValue: l, options: a = [], readOnly: s, onChange: u, placeholder: m, disabled: i, required: v, onBlur: O, onFocus: y, FieldLayout: F, hasError: C } = p(), [D, L] = E(!1), [h, I] = E(null), B = r && a.some((c) => (c.value ?? c.label) === r) ? r : l || null, { labelId: N } = b(), P = g((c) => {
11
11
  s || u(typeof c == "string" ? c : null);
12
12
  }, [
13
13
  u,
14
14
  s
15
- ]), S = g((c) => D(c && !i && !s), [
15
+ ]), S = g((c) => L(c && !i && !s), [
16
16
  i,
17
17
  s
18
- ]), T = d(t, n.Label), x = d(t, n.Trigger), V = d(t, n.Options), R = d(t, n.Description), k = d(t, n.Error);
18
+ ]), T = d(t, n.Label), x = d(t, n.Trigger), V = d(t, n.Options), k = d(t, n.Description), R = d(t, n.Error);
19
19
  return /* @__PURE__ */ e.createElement(F, {
20
20
  fieldId: o,
21
21
  renderLabel: () => T,
@@ -25,25 +25,25 @@ const n = ({ children: t }) => {
25
25
  display: "contents"
26
26
  }
27
27
  }), /* @__PURE__ */ e.createElement(A, {
28
- getContainer: () => L
29
- }, /* @__PURE__ */ e.createElement(j, {
28
+ getContainer: () => h
29
+ }, /* @__PURE__ */ e.createElement(w, {
30
30
  "aria-labelledby": N,
31
31
  value: B,
32
- isOpen: C && !i && !s,
32
+ isOpen: D && !i && !s,
33
33
  onOpenChange: S,
34
34
  onChange: P,
35
35
  isDisabled: i,
36
- isInvalid: h,
36
+ isInvalid: C,
37
37
  isRequired: v,
38
38
  placeholder: m,
39
39
  onBlur: O,
40
40
  onFocus: y
41
41
  }, x, V))),
42
- renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, k, R)
42
+ renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, R, k)
43
43
  });
44
44
  }, W = ({ children: t, className: o }) => {
45
45
  const { inputId: r, ariaDescribedBy: l } = b(), { id: a, hasError: s, isLoading: u } = p(), m = q(null);
46
- return _(() => {
46
+ return j(() => {
47
47
  var i;
48
48
  (i = m.current) == null || i.focus();
49
49
  }, a), /* @__PURE__ */ e.createElement(K, {
@@ -53,21 +53,21 @@ const n = ({ children: t }) => {
53
53
  className: o,
54
54
  "data-invalid": s || void 0,
55
55
  "data-loading": u || void 0
56
- }, /* @__PURE__ */ e.createElement(w, null), t);
56
+ }, /* @__PURE__ */ e.createElement(M, null), t);
57
57
  }, f = ({ children: t, className: o }) => {
58
58
  const { options: r = [] } = p(), l = d(t, f.Option);
59
59
  return /* @__PURE__ */ e.createElement(Q, {
60
60
  className: o,
61
61
  containerPadding: 0,
62
62
  offset: 0
63
- }, /* @__PURE__ */ e.createElement(M, null, r.map((a) => z(l, {
63
+ }, /* @__PURE__ */ e.createElement(U, null, r.map((a) => z(l, {
64
64
  key: a.value ?? a.label,
65
65
  value: a.value ?? a.label,
66
66
  label: a.label
67
67
  }))));
68
68
  }, X = ({ className: t, ...o }) => {
69
69
  const { value: r, label: l } = o;
70
- return /* @__PURE__ */ e.createElement(U, {
70
+ return /* @__PURE__ */ e.createElement(_, {
71
71
  className: t,
72
72
  id: r,
73
73
  textValue: l
@@ -1,13 +1,13 @@
1
- import { RicosViewer as l } from "@wix/ricos/viewer";
1
+ import { RicosViewer as m } from "@wix/ricos/viewer";
2
2
  import t from "classnames";
3
3
  import e from "react";
4
- import { D as o } from "./dropdown-field-headless-Js5TxdU4.js";
5
- import { C as m } from "./chevron-down-icon-CcpVm6B-.js";
6
- import { E as n } from "./error-icon-hZxQ6DEy.js";
4
+ import { D as o } from "./dropdown-field-headless-DBl8vGed.js";
5
+ import { C as n } from "./chevron-down-icon-CcpVm6B-.js";
6
+ import { E as l } from "./error-icon-hZxQ6DEy.js";
7
7
  import { H as c } from "./custom-focus-class-_483Pkwp.js";
8
- import { s as r } from "./field-rac.module-DtugsLiL.js";
9
- import { r as E, H as i, q as p, u as _, l as S, h as R } from "./form-element-classes-Bi-nNM8q.js";
10
- const D = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(l, {
8
+ import { s as r } from "./field-rac.module-DnUIb9Oh.js";
9
+ import { z as E, P as i, y as p, C as _, q as S, j as R } from "./form-element-classes-BSMjWijd.js";
10
+ const D = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(m, {
11
11
  content: a,
12
12
  locale: s
13
13
  }), u = () => /* @__PURE__ */ e.createElement(o, null, /* @__PURE__ */ e.createElement(o.Label, {
@@ -16,7 +16,7 @@ const D = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(l, {
16
16
  className: t(i, r.requiredMark)
17
17
  })), /* @__PURE__ */ e.createElement(o.Trigger, {
18
18
  className: t(p, r.input, r.dropdownTrigger)
19
- }, /* @__PURE__ */ e.createElement(m, {
19
+ }, /* @__PURE__ */ e.createElement(n, {
20
20
  className: r.dropdownIcon
21
21
  })), /* @__PURE__ */ e.createElement(o.Options, {
22
22
  className: t(_, r.selectPopover, r.dropdownPopover)
@@ -24,7 +24,7 @@ const D = ({ content: a, locale: s }) => /* @__PURE__ */ e.createElement(l, {
24
24
  className: t(r.selectOption, c)
25
25
  })), /* @__PURE__ */ e.createElement(o.Error, {
26
26
  className: t(S, r.error)
27
- }, /* @__PURE__ */ e.createElement(n, null), /* @__PURE__ */ e.createElement(o.Error.Text, null)), /* @__PURE__ */ e.createElement(o.Description, {
27
+ }, /* @__PURE__ */ e.createElement(l, null), /* @__PURE__ */ e.createElement(o.Error.Text, null)), /* @__PURE__ */ e.createElement(o.Description, {
28
28
  className: t(R, r.description)
29
29
  }, D));
30
30
  export {
@@ -1,5 +1,5 @@
1
1
  import o from "react";
2
- import { D as r } from "./dropdown-field-rac-BDxcvX00.js";
2
+ import { D as r } from "./dropdown-field-rac-O6G7_kSn.js";
3
3
  const n = () => /* @__PURE__ */ o.createElement(r, null);
4
4
  export {
5
5
  n as DropdownRAC
@@ -1,5 +1,5 @@
1
1
  import e from "react";
2
- import { M as r } from "./multiline-address-field-rac-BY2SUp2d.js";
2
+ import { M as r } from "./multiline-address-field-rac-CObOc8KE.js";
3
3
  const l = () => /* @__PURE__ */ e.createElement(r, null);
4
4
  export {
5
5
  l as EcomAddressRAC
@@ -1,7 +1,7 @@
1
1
  import o, { useMemo as a } from "react";
2
- import { ah as n, ar as c, h as i } from "./form-DzjdnO7t.js";
3
- import { C } from "./checkbox-field-rac-e-RAmupX.js";
4
- import { j as l, k as p, i as m } from "./form-element-classes-Bi-nNM8q.js";
2
+ import { ai as n, as as c, h as i } from "./form-CtWkUmxc.js";
3
+ import { C } from "./checkbox-field-rac-BamOJv3P.js";
4
+ import { o as l, p, n as m } from "./form-element-classes-BSMjWijd.js";
5
5
  const _ = (e) => ({
6
6
  nodes: [
7
7
  {