@wix/form-elements 1.73.0 → 1.75.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/component/{appointment-rac-Bze1s2XD.js → appointment-rac-7xVKSm2N.js} +27 -27
  2. package/dist/component/{bookings-address-rac-BcrkXf63.js → bookings-address-rac-VXnUSx8U.js} +1 -1
  3. package/dist/component/{bookings-email-rac-DYq5RxOP.js → bookings-email-rac-B2_ad7Y2.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-ZJ_sQ-01.js → bookings-first-name-rac-9BAY5vLx.js} +1 -1
  5. package/dist/component/{bookings-header-rac-Cv8kl01f.js → bookings-header-rac-B6IgiMOA.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-BmnulSZ6.js → bookings-last-name-rac-DoXEDO8K.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-Bdi4xs9y.js → bookings-login-bar-rac-DprQIFyj.js} +2 -2
  8. package/dist/component/{bookings-phone-rac-C8DjSzUY.js → bookings-phone-rac-VMoXtejZ.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-DYu011oy.js → bookings-rich-text-rac-DSzD2jBy.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-BH3yEE5j.js → checkbox-field-rac-BLihwz3C.js} +327 -320
  11. package/dist/component/checkbox-group-field-headless-BItyo_iD.js +205 -0
  12. package/dist/component/checkbox-group-field-rac-Bov3yFC6.js +40 -0
  13. package/dist/component/{checkbox-group-rac-CgW0DnhX.js → checkbox-group-rac-Fit-qssk.js} +1 -1
  14. package/dist/component/{checkbox-rac-DOAYMMsi.js → checkbox-rac-CSsY83Nx.js} +1 -1
  15. package/dist/component/{contacts-address-rac-DXJa4J_k.js → contacts-address-rac-iJuzUQe4.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-CVsuRq3B.js → contacts-birthdate-rac-0g2e8cQP.js} +1 -1
  17. package/dist/component/{contacts-company-rac-b2bwHSNC.js → contacts-company-rac-BC0tK4WQ.js} +1 -1
  18. package/dist/component/{contacts-email-rac-DMPcpQ1c.js → contacts-email-rac-dkuclkiH.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-CL2BsHuJ.js → contacts-first-name-rac-BSUkCuht.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-hdBsWaqb.js → contacts-last-name-rac-08bjVdN2.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-DQF6aV9B.js → contacts-phone-rac-DVb0Z_0M.js} +1 -1
  22. package/dist/component/{contacts-position-rac-CVX-WCfx.js → contacts-position-rac-AGUDkv7U.js} +1 -1
  23. package/dist/component/contacts-subscribe-rac-6jAQHibT.js +13 -0
  24. package/dist/component/{contacts-tax-id-rac-0KTXvF81.js → contacts-tax-id-rac-C7moEz5b.js} +1 -1
  25. package/dist/component/{date-availability-DBljhBgO.js → date-availability-DagbE0C8.js} +1 -1
  26. package/dist/component/{date-input-field-rac-CfflD2Ar.js → date-input-field-rac-BWHKsJGy.js} +30 -30
  27. package/dist/component/{date-input-rac-fQclCKoa.js → date-input-rac-BlZlmf-s.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-BSmFOaH-.js → date-picker-field-rac-BSNbYirD.js} +36 -36
  29. package/dist/component/{date-picker-rac-D7I3ramu.js → date-picker-rac-D3IWMst5.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-vjZDQ_Fp.js → date-time-input-field-rac-YKTwuIUs.js} +25 -25
  31. package/dist/component/{date-time-input-rac-CDbS0VZR.js → date-time-input-rac-CZRsKm1P.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-BBiPt6_a.js → dext-checkbox-group-rac-BE7ILz-f.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-Cqp--0SO.js → dext-checkbox-rac-B6-94A1N.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-5Wft0w9m.js → dext-date-picker-rac-Bx2hUFNm.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-Bbs7bgtn.js → dext-date-time-input-rac-DPKD6quz.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-CSvhtqbc.js → dext-dropdown-rac-WrSfNRa5.js} +1 -1
  37. package/dist/component/{dext-email-rac-BoLeXqyI.js → dext-email-rac-8PSMKNYG.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-DzaJYTSz.js → dext-number-input-rac-b9YSzEkN.js} +1 -1
  39. package/dist/component/{dext-phone-rac-BagPg_CT.js → dext-phone-rac-CkapN3c1.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-B5HSQt7a.js → dext-radio-group-rac-CfNMkwUa.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-DrtaAf-E.js → dext-rating-input-rac-Cun_t7HQ.js} +1 -1
  42. package/dist/component/{dext-tags-rac-Cg4jJ4jr.js → dext-tags-rac-DLZ91c3w.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-C_t-W7lk.js → dext-text-area-rac-N9A7QfYw.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-ChvV21Jf.js → dext-text-input-rac-XbVzAPHH.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-DclbSYTr.js → dext-url-input-rac-BiaWZ49r.js} +1 -1
  46. package/dist/component/{donation-rac-FYQIMm5m.js → donation-rac-BEIBjLHK.js} +46 -47
  47. package/dist/component/{dropdown-field-headless-CTZ-zGqZ.js → dropdown-field-headless-CQfZ3zPD.js} +3 -3
  48. package/dist/component/{dropdown-field-rac-C1KVtxwv.js → dropdown-field-rac-ubZN_Abg.js} +7 -7
  49. package/dist/component/{dropdown-rac-CkkDEDje.js → dropdown-rac-CHYFrEjY.js} +1 -1
  50. package/dist/component/{ecom-address-rac-BOuugSxX.js → ecom-address-rac-C7qJlrsv.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-IZeMlljb.js → ecom-subscription-checkbox-rac-CONIZsTy.js} +6 -6
  52. package/dist/component/{email-input-field-rac-CNzmm1j7.js → email-input-field-rac-Dg0p6WZe.js} +63 -63
  53. package/dist/component/events-repeater-rac-BoxNl7gn.js +254 -0
  54. package/dist/component/{events-rsvp-rac-BmjboAco.js → events-rsvp-rac-BU5d2n4k.js} +3 -3
  55. package/dist/component/{field-error-headless-DQZ5XAdn.js → field-error-headless-uQOcm2Ak.js} +1 -1
  56. package/dist/component/{field-label-headless-DoxfHHaj.js → field-label-headless-Bzh7f2Ji.js} +1 -1
  57. package/dist/component/field-rac.module-DjmaTYkc.js +23 -0
  58. package/dist/component/{file-upload-rac-YEQ7uXhm.js → file-upload-rac-BTt-rJE5.js} +74 -74
  59. package/dist/component/{fixed-payment-rac-DDufIQBT.js → fixed-payment-rac-1NOx3D-U.js} +17 -17
  60. package/dist/component/{form-C6WwBcGP.js → form-DCmjj8mZ.js} +69 -69
  61. package/dist/component/form-element-classes-Dn33C01k.js +111 -0
  62. package/dist/component/form.css +1 -1
  63. package/dist/component/form.js +1 -1
  64. package/dist/component/{header-field-rac-DGfjrjQC.js → header-field-rac-lyvjy6h2.js} +3 -3
  65. package/dist/component/{header-rac-C_JE2cTg.js → header-rac-B4iPEbNj.js} +1 -1
  66. package/dist/component/{image-choice-rac-LDLPQwrN.js → image-choice-rac-CmEG-waj.js} +29 -30
  67. package/dist/component/{index-C2srcuHD.js → index-D-CKLZBh.js} +4 -4
  68. package/dist/component/{index-CIOoaQ8Z.js → index-UZsDOe8e.js} +2 -2
  69. package/dist/component/{isObjectLike-E5QfEa1u.js → isObjectLike-BSGOU4jF.js} +1 -1
  70. package/dist/component/{multiline-address-field-rac-Biyj2tIN.js → multiline-address-field-rac-Dz0NEjSO.js} +125 -125
  71. package/dist/component/{multiline-address-rac-BCqCvG7a.js → multiline-address-rac-D_MAanxb.js} +1 -1
  72. package/dist/component/{number-input-field-rac-CwUoIbM8.js → number-input-field-rac-CvjeAm-W.js} +13 -13
  73. package/dist/component/{number-input-rac-CdYdTDem.js → number-input-rac-oKo2Wx_c.js} +1 -1
  74. package/dist/component/{password-rac-D62npVHY.js → password-rac-CrnkKtfp.js} +21 -21
  75. package/dist/component/{payment-input-rac-D4u-3vcW.js → payment-input-rac-BoVdGyvV.js} +18 -18
  76. package/dist/component/{phone-input-field-rac-uHxR3ozd.js → phone-input-field-rac-DksXoAnr.js} +54 -54
  77. package/dist/component/{phone-rac-Bf99_BGi.js → phone-rac-BR0iX5TL.js} +1 -1
  78. package/dist/component/product-list-rac-C4rvv5k-.js +270 -0
  79. package/dist/component/{quiz-radio-group-rac-CPGS0LEb.js → quiz-radio-group-rac-BxKmUUf8.js} +2 -2
  80. package/dist/component/{radio-group-field-rac-BWpTNAbO.js → radio-group-field-rac-Dj4rkkKF.js} +3 -3
  81. package/dist/component/{radio-group-field-rac.module-WxU5zxvM.js → radio-group-field-rac.module-CeBLm9QF.js} +3 -3
  82. package/dist/component/{radio-group-rac-dA4WZ1Vj.js → radio-group-rac-BpnfptSZ.js} +1 -1
  83. package/dist/component/{rating-input-field-rac-CJnFsBvH.js → rating-input-field-rac-BP0928qI.js} +30 -31
  84. package/dist/component/{rating-input-rac-DXVYozFV.js → rating-input-rac-DaEgvjIS.js} +1 -1
  85. package/dist/component/{rich-content-rac.module-DkKwzJS7.js → rich-content-rac.module-zvvH-tWq.js} +1 -1
  86. package/dist/component/{rich-text-field-rac-8FWCRrpb.js → rich-text-field-rac-CFCRiMl_.js} +3 -3
  87. package/dist/component/{rich-text-rac-OeM_mPRy.js → rich-text-rac-BRuLnyN4.js} +1 -1
  88. package/dist/component/{service-dropdown-rac-mvUMpcS_.js → service-dropdown-rac-C82l5y0C.js} +21 -21
  89. package/dist/component/services-multi-choice-rac-BAHBSgAT.js +83 -0
  90. package/dist/component/{signature-rac-D44U9Uyp.js → signature-rac-CIkm3SCW.js} +56 -56
  91. package/dist/component/{submit-button-rac-BqtcgVAn.js → submit-button-rac-Bz-X9Tbo.js} +2 -2
  92. package/dist/component/{tags-field-rac-CemsTKWz.js → tags-field-rac-Dn8VyPzT.js} +29 -30
  93. package/dist/component/{tags-rac-fVjCf6qo.js → tags-rac-BJpVdunR.js} +1 -1
  94. package/dist/component/{text-area-field-rac-BPciZlZb.js → text-area-field-rac-Pp9HnCS5.js} +18 -18
  95. package/dist/component/{text-area-rac-CRTORdZM.js → text-area-rac-DbwAFdel.js} +1 -1
  96. package/dist/component/{text-input-field-rac-CvFoWlRN.js → text-input-field-rac-x4ByKmBv.js} +6 -6
  97. package/dist/component/{text-input-headless-BQ3TWU9G.js → text-input-headless-fbiKci5q.js} +3 -3
  98. package/dist/component/{text-input-rac-DSFkEmob.js → text-input-rac-jyCKxyCt.js} +1 -1
  99. package/dist/component/{time-input-rac-CGgs7ncp.js → time-input-rac-C5Cvmxtt.js} +17 -17
  100. package/dist/component/{url-input-field-rac-CqvgTc-F.js → url-input-field-rac-CGpCEn2A.js} +20 -20
  101. package/dist/component/{url-input-rac-C45KOwnr.js → url-input-rac-DhFL8fGq.js} +1 -1
  102. package/dist/component/use-element-state-class-name-Bnw7sY9P.js +29 -0
  103. package/dist/component/{use-service-options-base-D4Zl-iGW.js → use-service-options-base-CgT1IKB3.js} +1 -1
  104. package/package.json +3 -3
  105. package/dist/component/checkbox-group-field-headless-D_GG5LHM.js +0 -210
  106. package/dist/component/checkbox-group-field-rac-Cj7Erubs.js +0 -41
  107. package/dist/component/contacts-subscribe-rac-Dl1ot9qw.js +0 -13
  108. package/dist/component/events-repeater-rac-CMV0Lmwz.js +0 -247
  109. package/dist/component/field-rac.module-Cac83bU5.js +0 -21
  110. package/dist/component/form-element-classes-DDKCTFQj.js +0 -65
  111. package/dist/component/form-element-keys-D0sEdpFo.js +0 -8
  112. package/dist/component/product-list-rac-iRf6Ra7i.js +0 -263
  113. package/dist/component/services-multi-choice-rac-DrgUrn_N.js +0 -76
@@ -1,247 +0,0 @@
1
- import t, { useState as z, useMemo as B, useCallback as V, useRef as M } from "react";
2
- import v from "classnames";
3
- import { NumberField as q, Input as J, CheckboxField as Q, CheckboxButton as W, Button as w } from "react-aria-components";
4
- import { ao as P, ap as U, ae as j, aj as H, u as Y, ai as D, af as K, ak as X, j as Z } from "./form-C6WwBcGP.js";
5
- import { f as F, a as R } from "./find-child-C60k4CxG.js";
6
- import { L as ee } from "./field-label-headless-DoxfHHaj.js";
7
- import { u as te } from "./use-invoke-callback-UH73A_J3.js";
8
- import { C as x } from "./chevron-down-icon-CcpVm6B-.js";
9
- import { s as L } from "./field-rac.module-Cac83bU5.js";
10
- import { z as se, y as ne, r as oe, s as re, t as ae } from "./form-element-classes-DDKCTFQj.js";
11
- const le = [], ce = ({ id: e, fields: n, layout: l, value: r, onChange: s, errors: m = le, validation: c }) => {
12
- const [i, E] = z((r == null ? void 0 : r.length) || 0), a = B(() => r ?? [], [
13
- r
14
- ]), g = P(), f = U(), d = j(), { validateFields: u } = H(), C = c.predefined.objectArrayOptions.maxItems, _ = B(() => Y({
15
- form: {
16
- fields: n,
17
- steps: [
18
- {
19
- layout: l
20
- }
21
- ]
22
- },
23
- parentId: e,
24
- recursive: !1
25
- }), [
26
- n,
27
- l,
28
- e
29
- ]), G = B(() => m.reduce((p, I) => {
30
- const [h, N] = I.errorPath.split("/"), A = parseInt(h, 10);
31
- return p[A] || (p[A] = []), p[A].push({
32
- ...I,
33
- errorPath: N
34
- }), p;
35
- }, []), [
36
- m
37
- ]), b = V((p) => {
38
- const I = Number.isNaN(p) ? 0 : Math.min(Math.max(p, 0), C);
39
- E(I), s == null || s(Array.from({
40
- length: I
41
- }, (h, N) => a[N] ?? {}));
42
- }, [
43
- C,
44
- a,
45
- s
46
- ]), T = V((p) => (I, h) => {
47
- const N = Array.from({
48
- length: i
49
- }, (A, $) => a[$] ?? {});
50
- N[p] = {
51
- ...N[p],
52
- [I]: h
53
- }, s == null || s(N);
54
- }, [
55
- i,
56
- a,
57
- s
58
- ]);
59
- return {
60
- guestLimit: C,
61
- guestCount: i,
62
- guests: a,
63
- errorsByIndex: G,
64
- formView: _,
65
- formSchema: g,
66
- formFields: f,
67
- fieldActions: d,
68
- validateFields: u,
69
- changeGuestCount: b,
70
- changeGuestField: T
71
- };
72
- }, ue = [], me = {}, o = ({ children: e, className: n }) => {
73
- const l = D(), { id: r, FieldLayout: s } = l, { guestLimit: m, guestCount: c, guests: i, errorsByIndex: E, formView: a, changeGuestCount: g, changeGuestField: f } = ce(l), d = F(e, o.Label), u = F(e, o.GuestCount), C = F(e, o.GuestToggle), _ = F(e, o.Guests), G = m > 1;
74
- return /* @__PURE__ */ t.createElement(s, {
75
- fieldId: r,
76
- renderLabel: () => G ? d : null,
77
- renderInput: () => /* @__PURE__ */ t.createElement("div", {
78
- className: n
79
- }, G ? R(u, {
80
- guestLimit: m,
81
- guestCount: c,
82
- onGuestCountChange: g
83
- }) : R(C, {
84
- guestCount: c,
85
- onGuestCountChange: g
86
- }), R(_, {
87
- guestCount: c,
88
- guests: i,
89
- errorsByIndex: E,
90
- formView: a,
91
- onGuestFieldChange: f
92
- })),
93
- renderDescription: () => null
94
- });
95
- }, ie = ({ className: e }) => /* @__PURE__ */ t.createElement(ee, {
96
- className: e
97
- }, null), O = ({ children: e, className: n, groupClassName: l, ...r }) => {
98
- const { guestLimit: s, guestCount: m, onGuestCountChange: c } = r, { id: i, label: E, disabled: a, readOnly: g, onBlur: f, onFocus: d } = D(), { inputId: u, ariaDescribedBy: C } = K(), _ = te(f), G = M(null);
99
- X(() => {
100
- var p;
101
- (p = G.current) == null || p.focus();
102
- }, i);
103
- const b = F(e, O.Decrement), T = F(e, O.Increment);
104
- return /* @__PURE__ */ t.createElement(q, {
105
- className: l,
106
- "aria-label": E,
107
- value: m,
108
- onChange: c,
109
- minValue: 0,
110
- maxValue: s,
111
- step: 1,
112
- isDisabled: a,
113
- isReadOnly: g,
114
- onBlur: _,
115
- onFocus: d
116
- }, /* @__PURE__ */ t.createElement(J, {
117
- ref: G,
118
- id: u,
119
- "aria-describedby": C,
120
- className: n,
121
- inputMode: "numeric"
122
- }), T, b);
123
- }, de = ({ children: e, className: n }) => /* @__PURE__ */ t.createElement(w, {
124
- slot: "decrement",
125
- className: n
126
- }, e), pe = ({ children: e, className: n }) => /* @__PURE__ */ t.createElement(w, {
127
- slot: "increment",
128
- className: n
129
- }, e), S = ({ children: e, className: n, ...l }) => {
130
- const { guestCount: r, onGuestCountChange: s } = l, { id: m, label: c, disabled: i, readOnly: E, onBlur: a, onFocus: g } = D(), { inputId: f, ariaDescribedBy: d } = K(), u = M(null);
131
- X(() => {
132
- var b;
133
- (b = u.current) == null || b.focus();
134
- }, m);
135
- const C = F(e, S.Input), _ = F(e, S.Label), G = V((b) => {
136
- s(b ? 1 : 0);
137
- }, [
138
- s
139
- ]);
140
- return /* @__PURE__ */ t.createElement(Q, {
141
- inputRef: u,
142
- id: f,
143
- "aria-describedby": d,
144
- isSelected: r > 0,
145
- onChange: G,
146
- isDisabled: i,
147
- isReadOnly: E,
148
- onBlur: a,
149
- onFocus: g
150
- }, /* @__PURE__ */ t.createElement(W, {
151
- className: n
152
- }, C, R(_, {
153
- label: c
154
- })));
155
- }, Ee = ({ className: e }) => /* @__PURE__ */ t.createElement("div", {
156
- "aria-hidden": "true",
157
- className: e
158
- }), ge = ({ className: e, ...n }) => {
159
- const { label: l } = n;
160
- return /* @__PURE__ */ t.createElement("span", {
161
- className: e
162
- }, l);
163
- }, k = ({ children: e, className: n, ...l }) => {
164
- const { guestCount: r, guests: s, errorsByIndex: m, formView: c, onGuestFieldChange: i } = l, { disabled: E, readOnly: a } = D(), g = B(() => ({
165
- ...c,
166
- fields: c.fields.map((d) => ({
167
- ...d,
168
- properties: {
169
- ...d.properties,
170
- disabled: !!(E || d.properties.disabled),
171
- readOnly: !!(a || d.properties.readOnly)
172
- }
173
- }))
174
- }), [
175
- c,
176
- E,
177
- a
178
- ]), f = F(e, k.Guest);
179
- return r ? /* @__PURE__ */ t.createElement("div", {
180
- className: n
181
- }, Array.from({
182
- length: r
183
- }, (d, u) => R(f, {
184
- key: u,
185
- index: u,
186
- formView: g,
187
- values: s[u] ?? me,
188
- errors: m[u] ?? ue,
189
- onFieldChange: i(u)
190
- }))) : null;
191
- }, fe = ({ className: e, ...n }) => {
192
- const { index: l, formView: r, values: s, errors: m, onFieldChange: c } = n, i = P(), E = U(), a = j(), { validateFields: g } = H();
193
- return /* @__PURE__ */ t.createElement("div", {
194
- className: e,
195
- "data-hook": `guest-${l}`
196
- }, /* @__PURE__ */ t.createElement(Z, {
197
- form: r,
198
- formSchema: i,
199
- values: s,
200
- errors: m,
201
- validateFields: g,
202
- onFieldChange: c,
203
- fields: E,
204
- fieldActions: a
205
- }));
206
- };
207
- O.Decrement = de;
208
- O.Increment = pe;
209
- S.Input = Ee;
210
- S.Label = ge;
211
- k.Guest = fe;
212
- o.Label = ie;
213
- o.GuestCount = O;
214
- o.GuestToggle = S;
215
- o.Guests = k;
216
- const Ce = "_container_11veo_1", Ge = "_countGroup_11veo_8", Fe = "_increment_11veo_28", be = "_decrement_11veo_29", y = {
217
- container: Ce,
218
- countGroup: Ge,
219
- increment: Fe,
220
- decrement: be
221
- }, _e = () => /* @__PURE__ */ t.createElement(o, {
222
- className: y.container
223
- }, /* @__PURE__ */ t.createElement(o.Label, {
224
- className: v(se, L.label)
225
- }), /* @__PURE__ */ t.createElement(o.GuestCount, {
226
- className: L.innerInput,
227
- groupClassName: v(ne, L.input, y.countGroup)
228
- }, /* @__PURE__ */ t.createElement(o.GuestCount.Increment, {
229
- className: y.increment
230
- }, /* @__PURE__ */ t.createElement(x, {
231
- style: {
232
- transform: "rotate(180deg)"
233
- }
234
- })), /* @__PURE__ */ t.createElement(o.GuestCount.Decrement, {
235
- className: y.decrement
236
- }, /* @__PURE__ */ t.createElement(x, null))), /* @__PURE__ */ t.createElement(o.GuestToggle, {
237
- className: v(oe, L.checkbox)
238
- }, /* @__PURE__ */ t.createElement(o.GuestToggle.Input, {
239
- className: v(re, L.checkboxInput)
240
- }), /* @__PURE__ */ t.createElement(o.GuestToggle.Label, {
241
- className: ae
242
- })), /* @__PURE__ */ t.createElement(o.Guests, {
243
- className: y.container
244
- }, /* @__PURE__ */ t.createElement(o.Guests.Guest, null))), Be = () => /* @__PURE__ */ t.createElement(_e, null);
245
- export {
246
- Be as EventsRepeaterRAC
247
- };
@@ -1,21 +0,0 @@
1
- const o = "_label_16ev3_1", e = "_requiredMark_16ev3_11", n = "_input_16ev3_16", t = "_inputGroup_16ev3_17", r = "_innerInput_16ev3_129", _ = "_dropdownTrigger_16ev3_177", c = "_dropdownIcon_16ev3_187", p = "_dropdownPopover_16ev3_206", s = "_selectPopover_16ev3_210", i = "_selectOption_16ev3_237", u = "_selectOptionWithoutFocusRing_16ev3_261", d = "_description_16ev3_267", v = "_error_16ev3_283", l = "_checkbox_16ev3_302", a = "_checkboxInput_16ev3_325", h = "_uploadButton_16ev3_420", b = {
2
- label: o,
3
- requiredMark: e,
4
- input: n,
5
- inputGroup: t,
6
- innerInput: r,
7
- dropdownTrigger: _,
8
- dropdownIcon: c,
9
- dropdownPopover: p,
10
- selectPopover: s,
11
- selectOption: i,
12
- selectOptionWithoutFocusRing: u,
13
- description: d,
14
- error: v,
15
- checkbox: l,
16
- checkboxInput: a,
17
- uploadButton: h
18
- };
19
- export {
20
- b as s
21
- };
@@ -1,65 +0,0 @@
1
- const _ = "form-field-label", o = "form-field-required-indicator", O = "form-field-description", s = "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", e = "form-field-radio-group-radio-button", E = "form-field-quiz-radio-group", r = "form-field-quiz-radio-group-option-label", R = "form-field-quiz-radio-group-radio-button", f = "form-field-rsvp", F = "form-field-rsvp-option-label", a = "form-field-rsvp-radio-button", n = "form-field-checkbox-group", A = "form-field-checkbox-group-option-label", d = "form-field-checkbox-group-indicator", D = "form-field-checkbox-group-indicator--selected", l = "form-field-checkbox-group-indicator--hover", T = "form-field-services", m = "form-field-services-option-label", M = "form-field-services-indicator", N = "form-field-checkbox", b = "form-field-checkbox-label", B = "form-field-checkbox-indicator", p = "form-field-subscribe-checkbox", P = "form-field-subscribe-checkbox-label", u = "form-field-subscribe-checkbox-indicator", U = "form-field-ecom-subscription-checkbox", g = "form-field-ecom-subscription-checkbox-label", G = "form-field-ecom-subscription-checkbox-indicator", h = "form-field-guest-checkbox", H = "form-field-guest-checkbox-label", x = "form-field-guest-checkbox-indicator", k = "form-field-product-list", K = "form-field-product-list-product-name", X = "form-field-product-list-price", v = "form-field-product-list-indicator", V = "form-field-tags", q = "form-field-tags-option", Q = "form-field-tags-option-selected", z = "form-field-donation", Z = "form-field-donation-option", y = "form-field-donation-option-selected", Y = "form-field-image-choice", j = "form-field-image-choice-option", w = "form-field-image-choice-option-selected", J = "form-field-choice-tag", W = "form-field-info-banner", $ = "form-field-day-option", __ = "form-field-ratings", o_ = "form-field-rating-option", O_ = "form-field-rating-option-selected", s_ = "form-field-link", S_ = "form-rich-content", L_ = "form-submit-button", i_ = "form-next-button", I_ = "form-previous-button";
2
- export {
3
- I as $,
4
- s_ as A,
5
- c as B,
6
- i as C,
7
- k as D,
8
- v as E,
9
- N as F,
10
- X as G,
11
- K as H,
12
- E as I,
13
- r as J,
14
- R as K,
15
- C as L,
16
- t as M,
17
- e as N,
18
- __ as O,
19
- o_ as P,
20
- O_ as Q,
21
- o as R,
22
- f as S,
23
- F as T,
24
- a as U,
25
- T as V,
26
- M as W,
27
- m as X,
28
- p as Y,
29
- u as Z,
30
- P as _,
31
- n as a,
32
- V as a0,
33
- q as a1,
34
- Q as a2,
35
- L as a3,
36
- i_ as a4,
37
- I_ as a5,
38
- S_ as a6,
39
- L_ as a7,
40
- d as b,
41
- l as c,
42
- D as d,
43
- A as e,
44
- B as f,
45
- b as g,
46
- J as h,
47
- $ as i,
48
- O as j,
49
- z as k,
50
- Z as l,
51
- y as m,
52
- U as n,
53
- G as o,
54
- g as p,
55
- s as q,
56
- h as r,
57
- x as s,
58
- H as t,
59
- Y as u,
60
- j as v,
61
- w,
62
- W as x,
63
- S as y,
64
- _ as z
65
- };
@@ -1,8 +0,0 @@
1
- const E = "checkboxGroupIndicator", O = "tagsOption", _ = "donationOption", o = "imageChoiceOption", t = "ratingOption";
2
- export {
3
- E as C,
4
- _ as D,
5
- o as I,
6
- t as R,
7
- O as T
8
- };
@@ -1,263 +0,0 @@
1
- import t, { useMemo as H, useCallback as x, useRef as B } from "react";
2
- import { RicosViewer as $ } from "@wix/ricos/viewer";
3
- import _ from "classnames";
4
- import { CheckboxField as K, CheckboxButton as j, NumberField as J, Group as W, Button as U, Input as X } from "react-aria-components";
5
- import { ai as M, af as Y, ab as w, as as Z, ak as ee } from "./form-C6WwBcGP.js";
6
- import { f as b, a as L } from "./find-child-C60k4CxG.js";
7
- import { L as te, g as ne } from "./field-label-headless-DoxfHHaj.js";
8
- import { f as ae } from "./format-currency-BwShJ9vM.js";
9
- import { D as oe, E as re } from "./field-error-headless-DQZ5XAdn.js";
10
- import { F as ie } from "./fieldset-headless-CD3fds9J.js";
11
- import { g as le } from "./payment-field-utils-DobiK5Xh.js";
12
- import { E as se } from "./error-icon-hZxQ6DEy.js";
13
- import { s as S } from "./field-rac.module-Cac83bU5.js";
14
- import { z as ce, R as ue, D as me, H as pe, G as de, E as Ee, y as ye, q as fe, j as _e } from "./form-element-classes-DDKCTFQj.js";
15
- import { o as Q } from "./options-rac.module-KM-VT_KY.js";
16
- var be = /* @__PURE__ */ (function(e) {
17
- return e.crop = "CROP", e.fit = "FIT", e;
18
- })({}), k = /* @__PURE__ */ (function(e) {
19
- return e.oneByOne = "one-by-one", e.onlyOne = "only-one", e.many = "many", e;
20
- })({});
21
- function Ie({ maxItems: e, products: o } = {}) {
22
- return e === 1 ? k.onlyOne : o != null && o.length && o.every((i) => {
23
- var n;
24
- return typeof ((n = i.quantityLimit) == null ? void 0 : n.maximum) > "u";
25
- }) ? k.many : k.oneByOne;
26
- }
27
- const a = ({ children: e }) => {
28
- var D;
29
- const { id: o, value: i, onChange: n, disabled: r, readOnly: c, required: E, onBlur: I, onFocus: l, hasError: u, validation: m, FieldLayout: p } = M(), { inputId: T, labelId: v, ariaDescribedBy: N } = Y(), y = b(e, a.Label), g = b(e, a.Options), A = b(e, a.Description), O = b(e, a.Error), s = H(() => i || [], [
30
- i
31
- ]), q = Ie((D = m == null ? void 0 : m.predefined) == null ? void 0 : D.paymentOptions) === k.many, F = x((P, C) => {
32
- const f = s.filter((G) => G.productId !== P.productId), z = C ? [
33
- ...f,
34
- P
35
- ] : f;
36
- n == null || n(z);
37
- }, [
38
- s,
39
- n
40
- ]);
41
- return /* @__PURE__ */ t.createElement(p, {
42
- fieldId: o,
43
- renderLabel: () => y,
44
- renderInput: () => /* @__PURE__ */ t.createElement(ie, {
45
- id: T,
46
- ariaLabelledBy: v,
47
- ariaDescribedBy: N,
48
- required: E,
49
- onBlur: I,
50
- onFocus: l
51
- }, g ? L(g, {
52
- allowMany: q,
53
- productValues: s,
54
- onProductChange: F,
55
- disabled: r,
56
- readOnly: c,
57
- hasError: u
58
- }) : null),
59
- renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, O, A)
60
- });
61
- }, V = ({ children: e, className: o, ...i }) => {
62
- const { allowMany: n, productValues: r, onProductChange: c, disabled: E, readOnly: I, hasError: l } = i, { options: u, validation: m, imageResize: p } = M(), { currency: T } = w(), { t: v } = Z(), N = b(e, a.Option);
63
- return /* @__PURE__ */ t.createElement("div", {
64
- className: o
65
- }, u == null ? void 0 : u.map((y, g) => {
66
- var R, q, F, D, P;
67
- const A = ((P = (D = (F = (q = (R = m == null ? void 0 : m.predefined) == null ? void 0 : R.paymentOptions) == null ? void 0 : q.products) == null ? void 0 : F.find((C) => C.id === y.value)) == null ? void 0 : D.fixedPriceOptions) == null ? void 0 : P.price) || "0", O = le(v, T), s = r.find((C) => C.productId === y.value);
68
- return L(N, {
69
- key: y.id || y.value || y.label,
70
- option: y,
71
- price: A,
72
- quantity: s == null ? void 0 : s.quantity,
73
- isSelected: !!s,
74
- allowMany: n,
75
- onProductChange: c,
76
- disabled: E,
77
- readOnly: I,
78
- hasError: l,
79
- currencyAriaLabel: O,
80
- imageResize: p,
81
- isFirst: g === 0
82
- });
83
- }));
84
- }, d = ({ children: e, className: o, ...i }) => {
85
- const { option: n, price: r, quantity: c = 0, isSelected: E, allowMany: I, onProductChange: l, disabled: u, readOnly: m, hasError: p, currencyAriaLabel: T, imageResize: v, isFirst: N } = i, { id: y } = M(), g = B(null), A = B(null), O = b(e, d.Image), s = b(e, d.Label), R = b(e, d.Price), q = b(e, d.Input), F = b(e, d.Quantity);
86
- ee(() => {
87
- var f;
88
- N && ((f = g.current ?? A.current) == null || f.focus({
89
- preventScroll: !0
90
- }));
91
- }, y);
92
- const D = x((f) => {
93
- l({
94
- productId: n.value,
95
- price: r,
96
- quantity: 1
97
- }, f);
98
- }, [
99
- l,
100
- n.value,
101
- r
102
- ]), P = x((f) => {
103
- l({
104
- productId: n.value,
105
- price: r,
106
- quantity: f
107
- }, f > 0);
108
- }, [
109
- l,
110
- n.value,
111
- r
112
- ]), C = `${n.label} ${T} ${r}`;
113
- return I ? /* @__PURE__ */ t.createElement("div", {
114
- className: o,
115
- "data-hook": "product"
116
- }, O ? L(O, {
117
- option: n,
118
- imageResize: v
119
- }) : null, s ? L(s, {
120
- label: n.label
121
- }) : null, R ? L(R, {
122
- price: r
123
- }) : null, F ? L(F, {
124
- quantity: c,
125
- onQuantityChange: P,
126
- disabled: u,
127
- readOnly: m,
128
- hasError: p,
129
- ariaLabel: C,
130
- inputRef: N ? A : void 0
131
- }) : null) : /* @__PURE__ */ t.createElement(K, {
132
- isSelected: E,
133
- onChange: D,
134
- isDisabled: u,
135
- isReadOnly: m,
136
- isInvalid: p,
137
- "aria-label": C
138
- }, /* @__PURE__ */ t.createElement(j, {
139
- ref: g,
140
- className: o,
141
- "data-hook": "product"
142
- }, O ? L(O, {
143
- option: n,
144
- imageResize: v
145
- }) : null, s ? L(s, {
146
- label: n.label
147
- }) : null, R ? L(R, {
148
- price: r
149
- }) : null, q));
150
- }, Le = ({ className: e, ...o }) => {
151
- var l;
152
- const { option: i, imageResize: n } = o, r = (l = i.media) == null ? void 0 : l.image;
153
- if (!r)
154
- return null;
155
- const c = n === be.fit, E = ne(r, 96, 96, c ? "fit" : "fill");
156
- if (!E)
157
- return null;
158
- const I = r.altText || i.label || "";
159
- return /* @__PURE__ */ t.createElement("img", {
160
- className: e,
161
- src: E,
162
- alt: I,
163
- "data-fit": c ? "contain" : "cover",
164
- "data-hook": "product-image"
165
- });
166
- }, Oe = ({ className: e, ...o }) => {
167
- const { label: i } = o;
168
- return /* @__PURE__ */ t.createElement("span", {
169
- className: e,
170
- "data-hook": "product-label"
171
- }, i || "");
172
- }, Re = ({ className: e, ...o }) => {
173
- const { price: i } = o, { currency: n, regionalFormat: r } = w(), c = ae({
174
- amount: i,
175
- currency: n == null ? void 0 : n.code,
176
- locale: r
177
- });
178
- return /* @__PURE__ */ t.createElement("span", {
179
- className: e,
180
- "data-hook": "product-price"
181
- }, c);
182
- }, Ce = ({ className: e }) => /* @__PURE__ */ t.createElement("div", {
183
- "aria-hidden": "true",
184
- className: e
185
- }), ge = ({ className: e, ...o }) => {
186
- const { quantity: i, onQuantityChange: n, disabled: r, readOnly: c, hasError: E, ariaLabel: I, inputRef: l } = o, u = x((p) => {
187
- n(p < 0 ? 0 : p);
188
- }, [
189
- n
190
- ]), m = x((p) => {
191
- p.key === "Home" && (p.preventDefault(), u(0));
192
- }, [
193
- u
194
- ]);
195
- return /* @__PURE__ */ t.createElement(J, {
196
- value: i,
197
- onChange: u,
198
- minValue: 0,
199
- step: 1,
200
- isDisabled: r,
201
- isReadOnly: c,
202
- isInvalid: E,
203
- "aria-label": I,
204
- className: e,
205
- "data-hook": "product-quantity"
206
- }, /* @__PURE__ */ t.createElement(W, {
207
- onKeyDown: m
208
- }, /* @__PURE__ */ t.createElement(U, {
209
- slot: "decrement"
210
- }, "-"), /* @__PURE__ */ t.createElement(X, {
211
- ref: l
212
- }), /* @__PURE__ */ t.createElement(U, {
213
- slot: "increment"
214
- }, "+")));
215
- };
216
- d.Image = Le;
217
- d.Label = Oe;
218
- d.Price = Re;
219
- d.Input = Ce;
220
- d.Quantity = ge;
221
- V.Option = d;
222
- a.Label = te;
223
- a.Options = V;
224
- a.Option = d;
225
- a.Description = oe;
226
- a.Error = re;
227
- const Fe = "_options_11x4v_1", De = "_option_11x4v_1", Pe = "_optionInput_11x4v_21", Se = "_optionImage_11x4v_32", he = "_optionLabel_11x4v_66", ve = "_optionPrice_11x4v_73", Ne = "_quantity_11x4v_87", h = {
228
- options: Fe,
229
- option: De,
230
- optionInput: Pe,
231
- optionImage: Se,
232
- optionLabel: he,
233
- optionPrice: ve,
234
- quantity: Ne
235
- }, Ae = ({ content: e, locale: o }) => /* @__PURE__ */ t.createElement($, {
236
- content: e,
237
- locale: o
238
- }), qe = () => /* @__PURE__ */ t.createElement(a, null, /* @__PURE__ */ t.createElement(a.Label, {
239
- className: _(ce, S.label)
240
- }, /* @__PURE__ */ t.createElement(a.Label.Required, {
241
- className: _(ue, S.requiredMark)
242
- })), /* @__PURE__ */ t.createElement(a.Options, {
243
- className: _(me, Q.options, h.options)
244
- }, /* @__PURE__ */ t.createElement(a.Option, {
245
- className: _(S.checkbox, h.option)
246
- }, /* @__PURE__ */ t.createElement(a.Option.Image, {
247
- className: h.optionImage
248
- }), /* @__PURE__ */ t.createElement(a.Option.Label, {
249
- className: _(pe, Q.optionLabel, h.optionLabel)
250
- }), /* @__PURE__ */ t.createElement(a.Option.Price, {
251
- className: _(de, h.optionPrice)
252
- }), /* @__PURE__ */ t.createElement(a.Option.Input, {
253
- className: _(Ee, S.checkboxInput, h.optionInput)
254
- }), /* @__PURE__ */ t.createElement(a.Option.Quantity, {
255
- className: _(ye, S.inputGroup, h.quantity)
256
- }))), /* @__PURE__ */ t.createElement(a.Error, {
257
- className: _(fe, S.error)
258
- }, /* @__PURE__ */ t.createElement(se, null), /* @__PURE__ */ t.createElement(a.Error.Text, null)), /* @__PURE__ */ t.createElement(a.Description, {
259
- className: _(_e, S.description)
260
- }, Ae)), Je = () => /* @__PURE__ */ t.createElement(qe, null);
261
- export {
262
- Je as ProductListRAC
263
- };
@@ -1,76 +0,0 @@
1
- import e, { useEffect as C, useMemo as I } from "react";
2
- import { RicosViewer as L } from "@wix/ricos/viewer";
3
- import s from "classnames";
4
- import { F as R, ai as F, h as d } from "./form-C6WwBcGP.js";
5
- import { u as D } from "./use-service-options-base-D4Zl-iGW.js";
6
- import { C as n } from "./checkbox-group-field-headless-D_GG5LHM.js";
7
- import { E as h } from "./error-icon-hZxQ6DEy.js";
8
- import { s as i } from "./field-rac.module-Cac83bU5.js";
9
- import { z as f, R as b, V as M, W as N, X as A, y as v, q as x, j as T } from "./form-element-classes-DDKCTFQj.js";
10
- import { o as _ } from "./options-rac.module-KM-VT_KY.js";
11
- const k = (o) => {
12
- var S;
13
- const { isLoading: r, options: a, isEmpty: c, shouldRender: E, setOptions: l, setIsEmpty: m, setHasInitialDataLoaded: p } = D({
14
- fieldType: R.SERVICES_MULTI_CHOICE,
15
- isEditor: o.isEditor
16
- }), u = (S = o.options) == null ? void 0 : S.every((O) => O.label && O.id);
17
- return C(() => {
18
- if (u && o.options) {
19
- l(o.options), m(o.options.length === 0), p(!0);
20
- return;
21
- }
22
- }, [
23
- u,
24
- o.options,
25
- l,
26
- m,
27
- p
28
- ]), {
29
- isLoading: r,
30
- options: a,
31
- isEmpty: c,
32
- shouldRender: E
33
- };
34
- }, t = ({ children: o }) => {
35
- const r = F(), { options: a, isEmpty: c, shouldRender: E } = k(r), l = I(() => ({
36
- ...r,
37
- options: a
38
- }), [
39
- r,
40
- a
41
- ]);
42
- return !r.isEditor && c || !E ? null : /* @__PURE__ */ e.createElement(d.Provider, {
43
- value: {
44
- v2: l
45
- }
46
- }, /* @__PURE__ */ e.createElement(n, null, o));
47
- };
48
- t.Label = n.Label;
49
- t.Options = n.Options;
50
- t.Description = n.Description;
51
- t.Error = n.Error;
52
- const y = ({ content: o, locale: r }) => /* @__PURE__ */ e.createElement(L, {
53
- content: o,
54
- locale: r
55
- }), P = () => /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
56
- className: s(f, i.label)
57
- }, /* @__PURE__ */ e.createElement(t.Label.Required, {
58
- className: s(b, i.requiredMark)
59
- })), /* @__PURE__ */ e.createElement(t.Options, {
60
- className: s(M, _.options)
61
- }, /* @__PURE__ */ e.createElement(t.Options.Option, null, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox, {
62
- className: i.checkbox
63
- }, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Input, {
64
- className: s(N, i.checkboxInput)
65
- }), /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Label, {
66
- className: s(A, _.optionLabel)
67
- })), /* @__PURE__ */ e.createElement(t.Options.Option.OtherInput, {
68
- inputClassName: s(v, i.input)
69
- }))), /* @__PURE__ */ e.createElement(t.Error, {
70
- className: s(x, i.error)
71
- }, /* @__PURE__ */ e.createElement(h, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
72
- className: s(T, i.description)
73
- }, y)), Q = () => /* @__PURE__ */ e.createElement(P, null);
74
- export {
75
- Q as ServicesMultiChoiceRAC
76
- };