@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/form-elements",
3
- "version": "1.63.0",
3
+ "version": "1.65.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": "ceca4ba400e894c9f62e0f27ba30b756661135d9a581458098ac5453"
154
+ "falconPackageHash": "5dd02e9327f855cfffcfcc5bf111aff3a56a31f8be69e2f99476d77d"
155
155
  }
@@ -1,204 +0,0 @@
1
- import d, { useMemo as x, useCallback as _, useRef as P, useState as w, useEffect as U } from "react";
2
- import { CheckboxGroup as W, CheckboxField as j, CheckboxButton as A, TextField as z, Input as J } from "react-aria-components";
3
- import { debounce as K } from "ts-debounce";
4
- import { ah as N, ae as Q, ar as X, ab as Y, aj as Z } from "./form-DzjdnO7t.js";
5
- import { f as L, a as y } from "./find-child-C60k4CxG.js";
6
- import { D as ee, E as te } from "./field-error-headless-DTKnr5Zx.js";
7
- import { L as ae } from "./field-label-headless-DV4aNd5Y.js";
8
- import { F as ne } from "./fieldset-headless-CD3fds9J.js";
9
- import { N as se } from "./options-layout-constants-DEfIEJWD.js";
10
- const R = "Other", le = (e, t) => e.some((o) => !t.includes(o)), B = (e, t) => e.length > 0 && le(e, t), oe = (e, t) => {
11
- const o = t == null ? void 0 : t("add-other.default-other-option-label");
12
- return e || o || R;
13
- }, T = (e, t) => {
14
- const n = t ? t.length + 2 : 0;
15
- return (e.find((r) => r.startsWith(`${t}: `)) || "").slice(n);
16
- }, k = (e) => e.map((t) => t.value ?? t.label), v = ({ children: e }) => {
17
- const t = N(), { id: o, value: n, onChange: a, disabled: r, required: i, onBlur: E, onFocus: m, hasError: b, FieldLayout: c } = t, { inputId: p, labelId: u, ariaDescribedBy: l } = Q(), f = L(e, v.Label), h = L(e, v.Options), g = L(e, v.Description), C = L(e, v.Error), s = x(() => n || [], [
18
- n
19
- ]), O = _((V) => {
20
- a == null || a(V);
21
- }, [
22
- a
23
- ]);
24
- return /* @__PURE__ */ d.createElement(c, {
25
- fieldId: o,
26
- renderLabel: () => f,
27
- renderInput: () => /* @__PURE__ */ d.createElement(ne, {
28
- id: p,
29
- ariaLabelledBy: u,
30
- ariaDescribedBy: l,
31
- required: i,
32
- onBlur: E,
33
- onFocus: m
34
- }, /* @__PURE__ */ d.createElement(W, {
35
- "aria-labelledby": u,
36
- value: s,
37
- onChange: O,
38
- isDisabled: r,
39
- isRequired: i,
40
- isInvalid: b
41
- }, h)),
42
- renderDescription: () => /* @__PURE__ */ d.createElement(d.Fragment, null, C, g)
43
- });
44
- }, $ = ({ children: e, className: t }) => {
45
- const o = N(), { id: n, options: a, addOther: r, addOtherLabel: i, numberOfColumns: E } = o, { t: m } = X(), { isMobile: b } = Y(), c = L(e, $.Option), p = oe(i, m), u = b ? se.ONE : E;
46
- return /* @__PURE__ */ d.createElement("div", {
47
- className: t,
48
- "data-columns": u
49
- }, a == null ? void 0 : a.map((l, f) => {
50
- const h = l.value ?? l.label;
51
- return y(c, {
52
- key: l.id || l.label,
53
- value: h,
54
- label: l.label,
55
- isFirst: f === 0,
56
- fieldId: n
57
- });
58
- }), r && y(c, {
59
- key: R,
60
- value: R,
61
- label: p,
62
- isOther: !0
63
- }));
64
- }, re = ({ className: e }) => /* @__PURE__ */ d.createElement("div", {
65
- "aria-hidden": "true",
66
- className: e
67
- }), ce = ({ className: e, ...t }) => {
68
- const { label: o } = t;
69
- return /* @__PURE__ */ d.createElement("span", {
70
- className: e
71
- }, o);
72
- }, F = ({ children: e, className: t, ...o }) => {
73
- const { value: n, label: a, isFirst: r = !1, isOther: i = !1, fieldId: E } = o, m = N(), { value: b, onChange: c, disabled: p, readOnly: u, hasError: l, options: f } = m, h = P(null);
74
- Z(() => {
75
- var I;
76
- r && ((I = h.current) == null || I.focus({
77
- preventScroll: !0
78
- }));
79
- }, E);
80
- const g = L(e, F.Label), C = L(e, F.Input), s = x(() => b || [], [
81
- b
82
- ]), O = x(() => i ? s.find((I) => I === a || I.startsWith(`${a}: `)) || a : n, [
83
- i,
84
- s,
85
- a,
86
- n
87
- ]), V = _((I) => {
88
- if (!i)
89
- return;
90
- const S = k(f || []), D = s.filter((H) => S.includes(H)), G = I ? [
91
- ...D,
92
- a
93
- ] : D;
94
- c == null || c(G);
95
- }, [
96
- i,
97
- a,
98
- c,
99
- f,
100
- s
101
- ]);
102
- return /* @__PURE__ */ d.createElement(j, {
103
- value: O,
104
- onChange: i ? V : void 0,
105
- isDisabled: p,
106
- isReadOnly: u,
107
- isInvalid: l
108
- }, /* @__PURE__ */ d.createElement(A, {
109
- ref: h,
110
- className: t,
111
- "data-hook": `checkbox-${a}`
112
- }, C, y(g, {
113
- label: a
114
- })));
115
- };
116
- F.Label = ce;
117
- F.Input = re;
118
- const M = ({ children: e, ...t }) => {
119
- const { value: o, label: n, isFirst: a = !1, isOther: r = !1, fieldId: i } = t, E = N(), { value: m, onChange: b, options: c, addOtherPlaceholder: p, otherInputCharacterLimit: u, disabled: l, readOnly: f, hasError: h } = E, g = L(e, F), C = L(e, q), s = x(() => m || [], [
120
- m
121
- ]), O = x(() => {
122
- if (!r)
123
- return !1;
124
- const V = k(c || []);
125
- return B(s, V);
126
- }, [
127
- r,
128
- s,
129
- c
130
- ]);
131
- return /* @__PURE__ */ d.createElement(d.Fragment, null, y(g, {
132
- value: o,
133
- label: n,
134
- isFirst: a,
135
- isOther: r,
136
- fieldId: i
137
- }), r && O && y(C, {
138
- fieldValue: s,
139
- onChange: b,
140
- label: n,
141
- placeholder: p,
142
- maxLength: u,
143
- disabled: l,
144
- readOnly: f,
145
- hasError: h,
146
- ariaLabel: n,
147
- addOtherLabel: n,
148
- options: c
149
- }));
150
- }, q = ({ className: e, inputClassName: t, ...o }) => {
151
- const { fieldValue: n, onChange: a, label: r, placeholder: i, maxLength: E, disabled: m, readOnly: b, hasError: c, ariaLabel: p, addOtherLabel: u, options: l } = o, [f, h] = w(() => {
152
- const s = k(l || []);
153
- return B(n, s) ? T(n, u) : "";
154
- });
155
- U(() => {
156
- const s = k(l || []), O = B(n, s);
157
- h(O ? T(n, u) : "");
158
- }, [
159
- n,
160
- l,
161
- u
162
- ]);
163
- const g = x(() => K((s) => {
164
- const O = k(l || []), V = n.filter((D) => O.includes(D)), I = s ? `${u}: ${s}` : r, S = [
165
- ...V,
166
- I
167
- ];
168
- a(S);
169
- }, 500), [
170
- a,
171
- l,
172
- n,
173
- u,
174
- r
175
- ]), C = _((s) => {
176
- h(s), g(s);
177
- }, [
178
- g
179
- ]);
180
- return /* @__PURE__ */ d.createElement(z, {
181
- "aria-label": p,
182
- value: f,
183
- onChange: C,
184
- isDisabled: m,
185
- isReadOnly: b,
186
- isInvalid: c,
187
- className: e
188
- }, /* @__PURE__ */ d.createElement(J, {
189
- className: t,
190
- placeholder: i,
191
- maxLength: E,
192
- "aria-label": p
193
- }));
194
- };
195
- v.Label = ae;
196
- v.Options = $;
197
- $.Option = M;
198
- M.Checkbox = F;
199
- M.OtherInput = q;
200
- v.Description = ee;
201
- v.Error = te;
202
- export {
203
- v as C
204
- };
@@ -1,33 +0,0 @@
1
- import { RicosViewer as l } from "@wix/ricos/viewer";
2
- import r from "classnames";
3
- import e from "react";
4
- import { C as t } from "./checkbox-group-field-headless-Cvia4lL6.js";
5
- import { E as c } from "./error-icon-hZxQ6DEy.js";
6
- import { s as a } from "./field-rac.module-DtugsLiL.js";
7
- import { r as m, H as i, a as E, b as p, c as O, q as _, l as C, h as L } from "./form-element-classes-Bi-nNM8q.js";
8
- import { o } from "./options-rac.module-KM-VT_KY.js";
9
- const R = ({ content: s, locale: n }) => /* @__PURE__ */ e.createElement(l, {
10
- content: s,
11
- locale: n
12
- }), h = () => /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
13
- className: r(m, a.label)
14
- }, /* @__PURE__ */ e.createElement(t.Label.Required, {
15
- className: r(i, a.requiredMark)
16
- })), /* @__PURE__ */ e.createElement(t.Options, {
17
- className: r(E, o.options)
18
- }, /* @__PURE__ */ e.createElement(t.Options.Option, null, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox, {
19
- className: a.checkbox
20
- }, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Input, {
21
- className: r(p, a.checkboxInput)
22
- }), /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Label, {
23
- className: r(O, o.optionLabel)
24
- })), /* @__PURE__ */ e.createElement(t.Options.Option.OtherInput, {
25
- inputClassName: r(_, a.input)
26
- }))), /* @__PURE__ */ e.createElement(t.Error, {
27
- className: r(C, a.error)
28
- }, /* @__PURE__ */ e.createElement(c, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
29
- className: r(L, a.description)
30
- }, R));
31
- export {
32
- h as C
33
- };
@@ -1,305 +0,0 @@
1
- import n, { useMemo as w, useCallback as L, useRef as ae } from "react";
2
- import { RicosViewer as se } from "@wix/ricos/viewer";
3
- import _ from "classnames";
4
- import { RadioGroup as le, RadioField as j, RadioButton as Q, TextField as ce, Input as ie } from "react-aria-components";
5
- import { debounce as ue } from "ts-debounce";
6
- import { P as W, ah as P, ae as V, ar as me, ab as M, aj as pe } from "./form-DzjdnO7t.js";
7
- import { f as h, a as g } from "./find-child-C60k4CxG.js";
8
- import { a as J } from "./format-currency-BwShJ9vM.js";
9
- import { D as de, E as Ie } from "./field-error-headless-DTKnr5Zx.js";
10
- import { L as Ce } from "./field-label-headless-DV4aNd5Y.js";
11
- import { N as Ee } from "./options-layout-constants-DEfIEJWD.js";
12
- import { a as fe, b as he } from "./numeric-input-utils-CuBMi4-a.js";
13
- import { g as Oe } from "./payment-field-utils-DobiK5Xh.js";
14
- import { u as ye } from "./use-synced-display-value-DcAxdn3M.js";
15
- import { E as _e } from "./error-icon-hZxQ6DEy.js";
16
- import { s as v } from "./field-rac.module-DtugsLiL.js";
17
- import { r as be, H as ge, f as Y, t as B, l as Fe, h as Ne } from "./form-element-classes-Bi-nNM8q.js";
18
- import { o as De } from "./options-rac.module-KM-VT_KY.js";
19
- function Le(e, t) {
20
- return e.reduce((r, o) => (r[o[t]] = o, r), {});
21
- }
22
- function Re(e) {
23
- return Le(e, "id");
24
- }
25
- const ve = 0.01;
26
- function Se(e) {
27
- var t;
28
- return ((t = e == null ? void 0 : e.fixedPriceOptions) == null ? void 0 : t.price) || "0";
29
- }
30
- function K(e, t) {
31
- const r = Number(t || "0");
32
- return {
33
- productId: e.id,
34
- price: e.priceType === W.DYNAMIC_PRICE ? r : String(r),
35
- quantity: 1
36
- };
37
- }
38
- function Ae(e) {
39
- return e.find((t) => t.priceType === W.DYNAMIC_PRICE);
40
- }
41
- function Pe(e, t) {
42
- return (e == null ? void 0 : e.productId) === (t == null ? void 0 : t.id) ? String((e == null ? void 0 : e.price) ?? "") : "";
43
- }
44
- function Me(e, t, r) {
45
- const o = (t == null ? void 0 : t.productId) === e ? void 0 : e, s = o ? r[o] : void 0;
46
- return s ? [
47
- K(s, Se(s))
48
- ] : [];
49
- }
50
- const a = ({ children: e }) => {
51
- const { id: t, value: r, onChange: o, disabled: s, required: c, onBlur: i, onFocus: y, validation: u, addOther: m, addOtherPlaceholder: I, FieldLayout: O, hasError: E } = P(), { labelId: p } = V(), { t: d } = me(), { currency: b, regionalFormat: F } = M(), C = r == null ? void 0 : r[0], N = w(() => {
52
- var f, T;
53
- return ((T = (f = u == null ? void 0 : u.predefined) == null ? void 0 : f.paymentOptions) == null ? void 0 : T.products) || [];
54
- }, [
55
- u
56
- ]), R = w(() => Re(N), [
57
- N
58
- ]), l = w(() => m ? Ae(N) : void 0, [
59
- N,
60
- m
61
- ]), X = Pe(C, l), [q, x] = ye({
62
- sourceValue: X,
63
- format: (f) => he(String(f ?? ""), F),
64
- regionalFormat: F
65
- }), z = L((f) => {
66
- o(Me(f, C, R)), x("");
67
- }, [
68
- o,
69
- R,
70
- C,
71
- x
72
- ]), $ = L((f) => {
73
- l && o(typeof f == "number" ? [
74
- K(l, String(f))
75
- ] : []);
76
- }, [
77
- o,
78
- l
79
- ]), H = w(() => ue($, 500), [
80
- $
81
- ]), Z = L((f) => {
82
- (C == null ? void 0 : C.productId) !== (l == null ? void 0 : l.id) && o(void 0);
83
- const { validInput: T, validNumber: re } = fe(f.target.value, ve, q, F);
84
- x(T), H(re);
85
- }, [
86
- F,
87
- o,
88
- C,
89
- l,
90
- q,
91
- H,
92
- x
93
- ]), U = (C == null ? void 0 : C.productId) || null, ee = L(() => {
94
- l != null && l.id && U !== l.id && z(l.id);
95
- }, [
96
- l == null ? void 0 : l.id,
97
- U,
98
- z
99
- ]), te = h(e, a.Label), G = h(e, a.Control), ne = h(e, a.Description), oe = h(e, a.Error);
100
- return /* @__PURE__ */ n.createElement(O, {
101
- fieldId: t,
102
- renderLabel: () => te,
103
- renderInput: () => /* @__PURE__ */ n.createElement(le, {
104
- "aria-labelledby": p,
105
- value: U,
106
- onChange: z,
107
- isDisabled: s,
108
- isInvalid: E,
109
- isRequired: c,
110
- onBlur: i,
111
- onFocus: y
112
- }, G ? g(G, {
113
- productsById: R,
114
- addOther: m,
115
- customAmount: q,
116
- onCustomAmountInputChange: Z,
117
- currency: b,
118
- t: d,
119
- placeholder: I === void 0 ? d("donation.other-option.placeholder") : I,
120
- customAmountProductId: l == null ? void 0 : l.id,
121
- onFocusCustomInput: ee
122
- }) : null),
123
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, oe, ne)
124
- });
125
- }, xe = ({ children: e, className: t, ...r }) => {
126
- const { productsById: o, addOther: s, customAmount: c, onCustomAmountInputChange: i, currency: y, t: u, placeholder: m, customAmountProductId: I, onFocusCustomInput: O } = r, { hasError: E } = P(), p = h(e, a.Options), d = h(e, a.OtherInput);
127
- return /* @__PURE__ */ n.createElement("div", {
128
- className: t,
129
- "data-invalid": E
130
- }, p ? g(p, {
131
- productsById: o,
132
- addOther: s,
133
- customAmountProductId: I,
134
- t: u
135
- }) : null, d && s ? g(d, {
136
- customAmount: c,
137
- onCustomAmountInputChange: i,
138
- currency: y,
139
- t: u,
140
- placeholder: m,
141
- customAmountProductId: I,
142
- onFocusCustomInput: O
143
- }) : null);
144
- }, k = ({ children: e, className: t, ...r }) => {
145
- const { productsById: o, addOther: s, customAmountProductId: c, t: i } = r, { options: y, numberOfColumns: u } = P(), { isMobile: m } = M(), I = h(e, k.Option), O = m ? Ee.ONE : u;
146
- return /* @__PURE__ */ n.createElement("div", {
147
- className: t,
148
- "data-columns": O
149
- }, y.map((E) => {
150
- var b;
151
- const p = o[E.value], d = (b = p == null ? void 0 : p.fixedPriceOptions) == null ? void 0 : b.price;
152
- return g(I, {
153
- key: E.value,
154
- value: E.value,
155
- price: d || "0"
156
- });
157
- }), s && c && /* @__PURE__ */ n.createElement(j, {
158
- value: c,
159
- style: {
160
- position: "absolute",
161
- width: "1px",
162
- height: "1px",
163
- padding: "0",
164
- margin: "-1px",
165
- overflow: "hidden",
166
- clip: "rect(0, 0, 0, 0)",
167
- whiteSpace: "nowrap",
168
- border: "0"
169
- }
170
- }, /* @__PURE__ */ n.createElement(Q, {
171
- "aria-label": i("donation.other-option.label", "Custom amount")
172
- }, i("donation.other-option.label", "Custom amount"))));
173
- }, S = ({ children: e, className: t, ...r }) => {
174
- const { value: o, price: s } = r, { id: c } = P(), { currency: i, regionalFormat: y } = M(), u = h(e, S.Value), m = h(e, S.Currency), { isCurrencyPrefixed: I } = J({
175
- amount: s,
176
- currency: i == null ? void 0 : i.code,
177
- locale: y
178
- }), O = ae(null);
179
- pe(() => {
180
- var p, d;
181
- (d = (p = O.current) == null ? void 0 : p.querySelector("input")) == null || d.focus();
182
- }, c);
183
- const E = u ? g(u, {
184
- price: s
185
- }) : null;
186
- return /* @__PURE__ */ n.createElement(j, {
187
- value: o
188
- }, /* @__PURE__ */ n.createElement(Q, {
189
- className: t,
190
- ref: O
191
- }, /* @__PURE__ */ n.createElement(n.Fragment, null, I && m, E, !I && m)));
192
- }, Te = ({ className: e, ...t }) => {
193
- const { price: r } = t, { currency: o, regionalFormat: s } = M(), { value: c } = J({
194
- amount: r,
195
- currency: o == null ? void 0 : o.code,
196
- locale: s
197
- });
198
- return /* @__PURE__ */ n.createElement("span", {
199
- className: e
200
- }, c);
201
- }, we = ({ className: e }) => {
202
- const { currency: t } = M();
203
- return /* @__PURE__ */ n.createElement("span", {
204
- className: e
205
- }, (t == null ? void 0 : t.sign) || (t == null ? void 0 : t.code) || "");
206
- };
207
- S.Value = Te;
208
- S.Currency = we;
209
- const A = ({ children: e, className: t, ...r }) => {
210
- const { customAmount: o, onCustomAmountInputChange: s, currency: c, t: i, placeholder: y, customAmountProductId: u, onFocusCustomInput: m } = r, { disabled: I, hasError: O } = P(), { labelId: E, prefixId: p } = V(), d = h(e, A.Currency), b = h(e, A.Value), F = L((R) => {
211
- s({
212
- target: {
213
- value: R
214
- }
215
- });
216
- }, [
217
- s
218
- ]), C = L(() => {
219
- m();
220
- }, [
221
- m
222
- ]), N = o && o.trim() !== "";
223
- return /* @__PURE__ */ n.createElement(ce, {
224
- "aria-labelledby": `${E} ${p}`,
225
- value: o,
226
- onChange: F,
227
- onFocus: C,
228
- isDisabled: I,
229
- isInvalid: O,
230
- className: t,
231
- "data-selected": N ? "true" : void 0
232
- }, o && c && d ? g(d, {
233
- currency: c,
234
- t: i
235
- }) : null, b ? g(b, {
236
- placeholder: y,
237
- customAmountProductId: u
238
- }) : null);
239
- }, Be = ({ className: e, ...t }) => {
240
- const { currency: r, t: o } = t, { prefixId: s } = V();
241
- return /* @__PURE__ */ n.createElement("span", {
242
- id: s,
243
- "aria-hidden": !1,
244
- "aria-label": Oe(o, r),
245
- className: e
246
- }, (r == null ? void 0 : r.sign) || (r == null ? void 0 : r.code) || "");
247
- }, Ve = ({ className: e, ...t }) => {
248
- const { placeholder: r, customAmountProductId: o } = t, { ariaDescribedBy: s, labelId: c, prefixId: i } = V();
249
- return /* @__PURE__ */ n.createElement(ie, {
250
- id: o,
251
- "aria-labelledby": `${c} ${i}`,
252
- "aria-describedby": s,
253
- placeholder: r,
254
- inputMode: "decimal",
255
- autoComplete: "off",
256
- className: e
257
- });
258
- };
259
- A.Currency = Be;
260
- A.Value = Ve;
261
- k.Option = S;
262
- a.Label = Ce;
263
- a.Control = xe;
264
- a.Options = k;
265
- a.OtherInput = A;
266
- a.Description = de;
267
- a.Error = Ie;
268
- const qe = "_control_7gwzv_1", ze = "_option_7gwzv_7", Ue = "_optionCurrency_7gwzv_91", ke = "_otherInput_7gwzv_95", $e = "_otherInputValue_7gwzv_112", He = "_otherInputCurrency_7gwzv_165", D = {
269
- control: qe,
270
- option: ze,
271
- optionCurrency: Ue,
272
- otherInput: ke,
273
- otherInputValue: $e,
274
- otherInputCurrency: He
275
- }, Ge = ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(se, {
276
- content: e,
277
- locale: t
278
- }), Ye = () => /* @__PURE__ */ n.createElement(a, null, /* @__PURE__ */ n.createElement(a.Label, {
279
- className: _(be, v.label)
280
- }, /* @__PURE__ */ n.createElement(a.Label.Required, {
281
- className: _(ge, v.requiredMark)
282
- })), /* @__PURE__ */ n.createElement(a.Control, {
283
- className: D.control
284
- }, /* @__PURE__ */ n.createElement(a.Options, {
285
- className: De.options
286
- }, /* @__PURE__ */ n.createElement(a.Options.Option, {
287
- className: _(Y, D.option)
288
- }, /* @__PURE__ */ n.createElement(a.Options.Option.Value, {
289
- className: B
290
- }), /* @__PURE__ */ n.createElement(a.Options.Option.Currency, {
291
- className: _(B, D.optionCurrency)
292
- }))), /* @__PURE__ */ n.createElement(a.OtherInput, {
293
- className: _(Y, v.input, D.otherInput)
294
- }, /* @__PURE__ */ n.createElement(a.OtherInput.Currency, {
295
- className: _(B, D.otherInputCurrency)
296
- }), /* @__PURE__ */ n.createElement(a.OtherInput.Value, {
297
- className: _(B, D.otherInputValue)
298
- }))), /* @__PURE__ */ n.createElement(a.Error, {
299
- className: _(Fe, v.error)
300
- }, /* @__PURE__ */ n.createElement(_e, null), /* @__PURE__ */ n.createElement(a.Error.Text, null)), /* @__PURE__ */ n.createElement(a.Description, {
301
- className: _(Ne, v.description)
302
- }, Ge)), mt = () => /* @__PURE__ */ n.createElement(Ye, null);
303
- export {
304
- mt as DonationRAC
305
- };
@@ -1,21 +0,0 @@
1
- const o = "_label_11hck_1", c = "_requiredMark_11hck_11", n = "_input_11hck_16", t = "_inputGroup_11hck_17", e = "_innerInput_11hck_123", r = "_dropdownTrigger_11hck_166", _ = "_dropdownIcon_11hck_176", p = "_dropdownPopover_11hck_195", s = "_selectPopover_11hck_199", i = "_selectOption_11hck_226", u = "_selectOptionWithoutFocusRing_11hck_250", d = "_description_11hck_256", h = "_error_11hck_272", k = "_checkbox_11hck_291", l = "_checkboxInput_11hck_314", a = "_uploadButton_11hck_407", b = {
2
- label: o,
3
- requiredMark: c,
4
- input: n,
5
- inputGroup: t,
6
- innerInput: e,
7
- dropdownTrigger: r,
8
- dropdownIcon: _,
9
- dropdownPopover: p,
10
- selectPopover: s,
11
- selectOption: i,
12
- selectOptionWithoutFocusRing: u,
13
- description: d,
14
- error: h,
15
- checkbox: k,
16
- checkboxInput: l,
17
- uploadButton: a
18
- };
19
- export {
20
- b as s
21
- };
@@ -1,55 +0,0 @@
1
- const _ = "form-field-label", o = "form-field-required-indicator", s = "form-field-description", O = "form-field-error", S = "form-field-input", L = "form-field-upload-button", i = "form-field-popover", I = "form-field-suggestion", c = "form-field-option-label", C = "form-field-radio-group", t = "form-field-radio-group-option-label", r = "form-field-radio-group-radio-button", R = "form-field-quiz-radio-group", e = "form-field-quiz-radio-group-option-label", E = "form-field-quiz-radio-group-radio-button", f = "form-field-rsvp", F = "form-field-rsvp-option-label", n = "form-field-rsvp-radio-button", a = "form-field-checkbox-group", A = "form-field-checkbox-group-option-label", l = "form-field-checkbox-group-indicator", d = "form-field-services", D = "form-field-services-option-label", T = "form-field-services-indicator", m = "form-field-checkbox", M = "form-field-checkbox-label", b = "form-field-checkbox-indicator", B = "form-field-subscribe-checkbox", N = "form-field-subscribe-checkbox-label", u = "form-field-subscribe-checkbox-indicator", U = "form-field-ecom-subscription-checkbox", p = "form-field-ecom-subscription-checkbox-label", P = "form-field-ecom-subscription-checkbox-indicator", g = "form-field-guest-checkbox", G = "form-field-guest-checkbox-label", h = "form-field-guest-checkbox-indicator", x = "form-field-product-list", H = "form-field-product-list-product-name", k = "form-field-product-list-price", K = "form-field-product-list-indicator", X = "form-field-tags", v = "form-field-tags-option", V = "form-field-tags-option-selected", q = "form-field-choice-tag", Q = "form-field-info-banner", z = "form-field-day-option", Z = "form-field-rating-option", y = "form-field-link", Y = "form-rich-content", j = "form-submit-button", w = "form-next-button", J = "form-previous-button";
2
- export {
3
- e as A,
4
- E as B,
5
- C,
6
- t as D,
7
- r as E,
8
- m as F,
9
- Z as G,
10
- o as H,
11
- f as I,
12
- F as J,
13
- n as K,
14
- d as L,
15
- T as M,
16
- D as N,
17
- B as O,
18
- u as P,
19
- N as Q,
20
- I as R,
21
- X as S,
22
- v as T,
23
- V as U,
24
- L as V,
25
- w as W,
26
- J as X,
27
- Y,
28
- j as Z,
29
- a,
30
- l as b,
31
- A as c,
32
- b as d,
33
- M as e,
34
- q as f,
35
- z as g,
36
- s as h,
37
- U as i,
38
- P as j,
39
- p as k,
40
- O as l,
41
- g as m,
42
- h as n,
43
- G as o,
44
- Q as p,
45
- S as q,
46
- _ as r,
47
- y as s,
48
- c as t,
49
- i as u,
50
- x as v,
51
- K as w,
52
- k as x,
53
- H as y,
54
- R as z
55
- };