@wix/form-elements 1.74.0 → 1.76.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.
- package/dist/component/appointment-rac-BQsFMmBg.js +1016 -0
- package/dist/component/{bookings-address-rac-BcrkXf63.js → bookings-address-rac-AJNyTdok.js} +1 -1
- package/dist/component/{bookings-email-rac-DYq5RxOP.js → bookings-email-rac-BHZ0MFgI.js} +1 -1
- package/dist/component/{bookings-first-name-rac-ZJ_sQ-01.js → bookings-first-name-rac-Bw5FuWNX.js} +1 -1
- package/dist/component/{bookings-header-rac-Cv8kl01f.js → bookings-header-rac-C1M2Pg1f.js} +1 -1
- package/dist/component/{bookings-last-name-rac-BmnulSZ6.js → bookings-last-name-rac-DKkPY0CO.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-Bdi4xs9y.js → bookings-login-bar-rac-P6pziSl1.js} +2 -2
- package/dist/component/{bookings-phone-rac-C8DjSzUY.js → bookings-phone-rac-CiOZWKHz.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DYu011oy.js → bookings-rich-text-rac-D9ZComtY.js} +1 -1
- package/dist/component/{checkbox-field-rac-BH3yEE5j.js → checkbox-field-rac-4zG3Sf1c.js} +328 -320
- package/dist/component/checkbox-group-field-headless-DN2aNw9g.js +205 -0
- package/dist/component/checkbox-group-field-rac-B1qhet83.js +41 -0
- package/dist/component/{checkbox-group-rac-CgW0DnhX.js → checkbox-group-rac-DGsE7xGu.js} +1 -1
- package/dist/component/checkbox-indicator-module-classes-BcScu147.js +17 -0
- package/dist/component/{checkbox-rac-DOAYMMsi.js → checkbox-rac-CFWQW9_K.js} +1 -1
- package/dist/component/{contacts-address-rac-DXJa4J_k.js → contacts-address-rac-G5ZH3Odo.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CVsuRq3B.js → contacts-birthdate-rac-C7TDUfT0.js} +1 -1
- package/dist/component/{contacts-company-rac-b2bwHSNC.js → contacts-company-rac-8queUhWT.js} +1 -1
- package/dist/component/{contacts-email-rac-DMPcpQ1c.js → contacts-email-rac-CYOs5N_I.js} +1 -1
- package/dist/component/{contacts-first-name-rac-CL2BsHuJ.js → contacts-first-name-rac-D8Goc_Ym.js} +1 -1
- package/dist/component/{contacts-last-name-rac-hdBsWaqb.js → contacts-last-name-rac-lBmtuEnr.js} +1 -1
- package/dist/component/{contacts-phone-rac-DQF6aV9B.js → contacts-phone-rac-DSUWUNBX.js} +1 -1
- package/dist/component/{contacts-position-rac-CVX-WCfx.js → contacts-position-rac-wA-aw5Id.js} +1 -1
- package/dist/component/contacts-subscribe-rac-CAbBbFxZ.js +13 -0
- package/dist/component/{contacts-tax-id-rac-0KTXvF81.js → contacts-tax-id-rac-BpjVM1Ye.js} +1 -1
- package/dist/component/{date-availability-DBljhBgO.js → date-availability-CeiMjrtD.js} +1 -1
- package/dist/component/{date-input-field-rac-CfflD2Ar.js → date-input-field-rac-CVaajAFM.js} +30 -30
- package/dist/component/{date-input-rac-fQclCKoa.js → date-input-rac-DhEzawuM.js} +1 -1
- package/dist/component/{date-picker-field-rac-BSmFOaH-.js → date-picker-field-rac-1Q6yyNmK.js} +35 -35
- package/dist/component/{date-picker-rac-D7I3ramu.js → date-picker-rac-BCGtmXMJ.js} +1 -1
- package/dist/component/{date-time-input-field-rac-vjZDQ_Fp.js → date-time-input-field-rac-Dd-HNgKP.js} +35 -35
- package/dist/component/{date-time-input-rac-CDbS0VZR.js → date-time-input-rac-CsCWEsH5.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BBiPt6_a.js → dext-checkbox-group-rac-CauN5uuV.js} +2 -2
- package/dist/component/{dext-checkbox-rac-Cqp--0SO.js → dext-checkbox-rac-q-g9gDnw.js} +1 -1
- package/dist/component/{dext-date-picker-rac-5Wft0w9m.js → dext-date-picker-rac-CZT3dTLv.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-Bbs7bgtn.js → dext-date-time-input-rac-DVUoZZbX.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CSvhtqbc.js → dext-dropdown-rac-GRltutt5.js} +1 -1
- package/dist/component/{dext-email-rac-BoLeXqyI.js → dext-email-rac-74Y8S9GA.js} +1 -1
- package/dist/component/{dext-number-input-rac-DzaJYTSz.js → dext-number-input-rac-CF9d_GTl.js} +1 -1
- package/dist/component/{dext-phone-rac-BagPg_CT.js → dext-phone-rac-DObx_gOd.js} +1 -1
- package/dist/component/{dext-radio-group-rac-B5HSQt7a.js → dext-radio-group-rac-CzU9KX5_.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DrtaAf-E.js → dext-rating-input-rac-BjRwwgXr.js} +1 -1
- package/dist/component/{dext-tags-rac-Cg4jJ4jr.js → dext-tags-rac-Vif4x1yF.js} +2 -2
- package/dist/component/{dext-text-area-rac-C_t-W7lk.js → dext-text-area-rac-DmZwl_ax.js} +1 -1
- package/dist/component/{dext-text-input-rac-ChvV21Jf.js → dext-text-input-rac-B6FVbjUM.js} +1 -1
- package/dist/component/{dext-url-input-rac-DclbSYTr.js → dext-url-input-rac-17Dj3ICM.js} +1 -1
- package/dist/component/donation-rac-bgHep0Xi.js +307 -0
- package/dist/component/{dropdown-field-headless-CTZ-zGqZ.js → dropdown-field-headless-BGfJ1FyZ.js} +3 -3
- package/dist/component/{dropdown-field-rac-C1KVtxwv.js → dropdown-field-rac-DGiysJQY.js} +7 -7
- package/dist/component/{dropdown-rac-CkkDEDje.js → dropdown-rac-FHjz8fKp.js} +1 -1
- package/dist/component/{ecom-address-rac-BOuugSxX.js → ecom-address-rac-DSbpf4z8.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-IZeMlljb.js → ecom-subscription-checkbox-rac-DiZWNwnt.js} +6 -6
- package/dist/component/{email-input-field-rac-CNzmm1j7.js → email-input-field-rac-BQKK2O7L.js} +44 -44
- package/dist/component/events-repeater-rac-Dudnyhal.js +255 -0
- package/dist/component/{events-rsvp-rac-BmjboAco.js → events-rsvp-rac-008H5Ska.js} +3 -3
- package/dist/component/{field-error-headless-DQZ5XAdn.js → field-error-headless-C5ZsFUKv.js} +1 -1
- package/dist/component/{field-label-headless-DoxfHHaj.js → field-label-headless-CS5OYsiI.js} +1 -1
- package/dist/component/field-rac.module-DjmaTYkc.js +23 -0
- package/dist/component/{file-upload-rac-YEQ7uXhm.js → file-upload-rac-bQ2QOO8Q.js} +48 -48
- package/dist/component/{fixed-payment-rac-DDufIQBT.js → fixed-payment-rac-B6FvXoCU.js} +17 -17
- package/dist/component/{form-C6WwBcGP.js → form-BpHElSwH.js} +69 -69
- package/dist/component/form-element-classes-BXNs5k3q.js +119 -0
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DGfjrjQC.js → header-field-rac-D4UYcmok.js} +3 -3
- package/dist/component/{header-rac-C_JE2cTg.js → header-rac-KavPiBdn.js} +1 -1
- package/dist/component/{image-choice-rac-LDLPQwrN.js → image-choice-rac-BJQqBhBD.js} +35 -36
- package/dist/component/{index-CIOoaQ8Z.js → index-RSEYrQef.js} +2 -2
- package/dist/component/{index-C2srcuHD.js → index-Y8iTxLat.js} +4 -4
- package/dist/component/{isObjectLike-E5QfEa1u.js → isObjectLike-jwHec4Ap.js} +1 -1
- package/dist/component/{multiline-address-field-rac-Biyj2tIN.js → multiline-address-field-rac-D4Ibno80.js} +110 -110
- package/dist/component/{multiline-address-rac-BCqCvG7a.js → multiline-address-rac-CrTSjzBN.js} +1 -1
- package/dist/component/{number-input-field-rac-CwUoIbM8.js → number-input-field-rac-DW1SjB-Z.js} +16 -16
- package/dist/component/{number-input-rac-CdYdTDem.js → number-input-rac-CdE_hRbA.js} +1 -1
- package/dist/component/{password-rac-D62npVHY.js → password-rac-BCxl5mMQ.js} +20 -20
- package/dist/component/{payment-input-rac-D4u-3vcW.js → payment-input-rac-DmO4s4ue.js} +9 -9
- package/dist/component/{phone-input-field-rac-uHxR3ozd.js → phone-input-field-rac-BYAnwk5h.js} +25 -25
- package/dist/component/{phone-rac-Bf99_BGi.js → phone-rac-gS4k9Yn8.js} +1 -1
- package/dist/component/product-list-rac-CO0o3yOg.js +271 -0
- package/dist/component/{quiz-radio-group-rac-CPGS0LEb.js → quiz-radio-group-rac-Dhk7nkzb.js} +2 -2
- package/dist/component/{radio-group-field-rac-BWpTNAbO.js → radio-group-field-rac-DdlyQ3m6.js} +3 -3
- package/dist/component/{radio-group-field-rac.module-WxU5zxvM.js → radio-group-field-rac.module-emin6sSc.js} +3 -3
- package/dist/component/{radio-group-rac-dA4WZ1Vj.js → radio-group-rac-B-9q91fJ.js} +1 -1
- package/dist/component/{rating-input-field-rac-CJnFsBvH.js → rating-input-field-rac-VDaJKq-n.js} +27 -28
- package/dist/component/{rating-input-rac-DXVYozFV.js → rating-input-rac-BVO62LmE.js} +1 -1
- package/dist/component/{rich-content-rac.module-DkKwzJS7.js → rich-content-rac.module-CdiaAjxG.js} +1 -1
- package/dist/component/{rich-text-field-rac-8FWCRrpb.js → rich-text-field-rac-C4RrbyEX.js} +3 -3
- package/dist/component/{rich-text-rac-OeM_mPRy.js → rich-text-rac-BG376ww9.js} +1 -1
- package/dist/component/{service-dropdown-rac-mvUMpcS_.js → service-dropdown-rac-Dy6-OpVR.js} +18 -18
- package/dist/component/services-multi-choice-rac-BKW9MP_b.js +84 -0
- package/dist/component/{signature-rac-D44U9Uyp.js → signature-rac-Cxgixp4o.js} +56 -56
- package/dist/component/{submit-button-rac-BqtcgVAn.js → submit-button-rac-BqPJ7WPI.js} +2 -2
- package/dist/component/{tags-field-rac-CemsTKWz.js → tags-field-rac-wwqpztG7.js} +36 -37
- package/dist/component/{tags-rac-fVjCf6qo.js → tags-rac-DUxITYxU.js} +1 -1
- package/dist/component/{text-area-field-rac-BPciZlZb.js → text-area-field-rac-Cen6O33S.js} +16 -16
- package/dist/component/{text-area-rac-CRTORdZM.js → text-area-rac-CRlO56GA.js} +1 -1
- package/dist/component/{text-input-field-rac-CvFoWlRN.js → text-input-field-rac-CbnKn03g.js} +6 -6
- package/dist/component/{text-input-headless-BQ3TWU9G.js → text-input-headless-C_NTJmLe.js} +3 -3
- package/dist/component/{text-input-rac-DSFkEmob.js → text-input-rac-DvwV7Igm.js} +1 -1
- package/dist/component/{time-input-rac-CGgs7ncp.js → time-input-rac-TSEXiODs.js} +15 -15
- package/dist/component/{url-input-field-rac-CqvgTc-F.js → url-input-field-rac-Cxgh9T8s.js} +20 -20
- package/dist/component/{url-input-rac-C45KOwnr.js → url-input-rac-DNw-Jg1U.js} +1 -1
- package/dist/component/use-element-state-class-name-CC65g9mT.js +15 -0
- package/dist/component/{use-service-options-base-D4Zl-iGW.js → use-service-options-base-EFrxTpGm.js} +1 -1
- package/package.json +2 -2
- package/dist/component/appointment-rac-Bze1s2XD.js +0 -1005
- package/dist/component/checkbox-group-field-headless-D_GG5LHM.js +0 -210
- package/dist/component/checkbox-group-field-rac-Cj7Erubs.js +0 -41
- package/dist/component/contacts-subscribe-rac-Dl1ot9qw.js +0 -13
- package/dist/component/donation-rac-FYQIMm5m.js +0 -308
- package/dist/component/events-repeater-rac-CMV0Lmwz.js +0 -247
- package/dist/component/field-rac.module-Cac83bU5.js +0 -21
- package/dist/component/form-element-classes-DDKCTFQj.js +0 -65
- package/dist/component/form-element-keys-D0sEdpFo.js +0 -8
- package/dist/component/product-list-rac-iRf6Ra7i.js +0 -263
- package/dist/component/services-multi-choice-rac-DrgUrn_N.js +0 -76
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import i, { useMemo as k, useCallback as _, useRef as P, useState as w, useEffect as U } from "react";
|
|
2
|
+
import { CheckboxGroup as W, CheckboxField as A, CheckboxButton as j, TextField as z, Input as J } from "react-aria-components";
|
|
3
|
+
import { debounce as K } from "ts-debounce";
|
|
4
|
+
import { ai as N, af as Q, as as X, ab as Y, ak as Z } from "./form-BpHElSwH.js";
|
|
5
|
+
import { f as L, a as x } from "./find-child-C60k4CxG.js";
|
|
6
|
+
import { D as ee, E as te } from "./field-error-headless-C5ZsFUKv.js";
|
|
7
|
+
import { L as ae } from "./field-label-headless-CS5OYsiI.js";
|
|
8
|
+
import { F as se } from "./fieldset-headless-CD3fds9J.js";
|
|
9
|
+
import { N as ne } from "./options-layout-constants-DEfIEJWD.js";
|
|
10
|
+
import { a as le } from "./checkbox-indicator-module-classes-BcScu147.js";
|
|
11
|
+
const R = "Other", oe = (e, t) => e.some((o) => !t.includes(o)), B = (e, t) => e.length > 0 && oe(e, t), re = (e, t) => {
|
|
12
|
+
const o = t == null ? void 0 : t("add-other.default-other-option-label");
|
|
13
|
+
return e || o || R;
|
|
14
|
+
}, T = (e, t) => {
|
|
15
|
+
const s = t ? t.length + 2 : 0;
|
|
16
|
+
return (e.find((r) => r.startsWith(`${t}: `)) || "").slice(s);
|
|
17
|
+
}, D = (e) => e.map((t) => t.value ?? t.label), C = ({ children: e }) => {
|
|
18
|
+
const t = N(), { id: o, value: s, onChange: a, disabled: r, required: u, onBlur: I, onFocus: b, hasError: p, FieldLayout: c } = t, { inputId: f, labelId: d, ariaDescribedBy: l } = Q(), O = L(e, C.Label), h = L(e, C.Options), g = L(e, C.Description), v = L(e, C.Error), n = k(() => s || [], [
|
|
19
|
+
s
|
|
20
|
+
]), E = _((V) => {
|
|
21
|
+
a == null || a(V);
|
|
22
|
+
}, [
|
|
23
|
+
a
|
|
24
|
+
]);
|
|
25
|
+
return /* @__PURE__ */ i.createElement(c, {
|
|
26
|
+
fieldId: o,
|
|
27
|
+
renderLabel: () => O,
|
|
28
|
+
renderInput: () => /* @__PURE__ */ i.createElement(se, {
|
|
29
|
+
id: f,
|
|
30
|
+
ariaLabelledBy: d,
|
|
31
|
+
ariaDescribedBy: l,
|
|
32
|
+
required: u,
|
|
33
|
+
onBlur: I,
|
|
34
|
+
onFocus: b
|
|
35
|
+
}, /* @__PURE__ */ i.createElement(W, {
|
|
36
|
+
"aria-labelledby": d,
|
|
37
|
+
value: n,
|
|
38
|
+
onChange: E,
|
|
39
|
+
isDisabled: r,
|
|
40
|
+
isRequired: u,
|
|
41
|
+
isInvalid: p
|
|
42
|
+
}, h)),
|
|
43
|
+
renderDescription: () => /* @__PURE__ */ i.createElement(i.Fragment, null, v, g)
|
|
44
|
+
});
|
|
45
|
+
}, $ = ({ children: e, className: t }) => {
|
|
46
|
+
const o = N(), { id: s, options: a, addOther: r, addOtherLabel: u, numberOfColumns: I } = o, { t: b } = X(), { isMobile: p } = Y(), c = L(e, $.Option), f = re(u, b), d = p ? ne.ONE : I;
|
|
47
|
+
return /* @__PURE__ */ i.createElement("div", {
|
|
48
|
+
className: t,
|
|
49
|
+
"data-columns": d
|
|
50
|
+
}, a == null ? void 0 : a.map((l, O) => {
|
|
51
|
+
const h = l.value ?? l.label;
|
|
52
|
+
return x(c, {
|
|
53
|
+
key: l.id || l.label,
|
|
54
|
+
value: h,
|
|
55
|
+
label: l.label,
|
|
56
|
+
isFirst: O === 0,
|
|
57
|
+
fieldId: s
|
|
58
|
+
});
|
|
59
|
+
}), r && x(c, {
|
|
60
|
+
key: R,
|
|
61
|
+
value: R,
|
|
62
|
+
label: f,
|
|
63
|
+
isOther: !0
|
|
64
|
+
}));
|
|
65
|
+
}, ce = ({ className: e, ...t }) => {
|
|
66
|
+
const { label: o } = t;
|
|
67
|
+
return /* @__PURE__ */ i.createElement("span", {
|
|
68
|
+
className: e
|
|
69
|
+
}, o);
|
|
70
|
+
}, F = ({ children: e, className: t, ...o }) => {
|
|
71
|
+
const { value: s, label: a, isFirst: r = !1, isOther: u = !1, fieldId: I } = o, b = N(), { value: p, onChange: c, disabled: f, readOnly: d, hasError: l, options: O } = b, h = P(null);
|
|
72
|
+
Z(() => {
|
|
73
|
+
var m;
|
|
74
|
+
r && ((m = h.current) == null || m.focus({
|
|
75
|
+
preventScroll: !0
|
|
76
|
+
}));
|
|
77
|
+
}, I);
|
|
78
|
+
const g = L(e, F.Label), v = L(e, F.Input), n = k(() => p || [], [
|
|
79
|
+
p
|
|
80
|
+
]), E = k(() => u ? n.find((m) => m === a || m.startsWith(`${a}: `)) || a : s, [
|
|
81
|
+
u,
|
|
82
|
+
n,
|
|
83
|
+
a,
|
|
84
|
+
s
|
|
85
|
+
]), V = _((m) => {
|
|
86
|
+
if (!u)
|
|
87
|
+
return;
|
|
88
|
+
const y = D(O || []), S = n.filter((H) => y.includes(H)), G = m ? [
|
|
89
|
+
...S,
|
|
90
|
+
a
|
|
91
|
+
] : S;
|
|
92
|
+
c == null || c(G);
|
|
93
|
+
}, [
|
|
94
|
+
u,
|
|
95
|
+
a,
|
|
96
|
+
c,
|
|
97
|
+
O,
|
|
98
|
+
n
|
|
99
|
+
]);
|
|
100
|
+
return /* @__PURE__ */ i.createElement(A, {
|
|
101
|
+
value: E,
|
|
102
|
+
onChange: u ? V : void 0,
|
|
103
|
+
isDisabled: f,
|
|
104
|
+
isReadOnly: d,
|
|
105
|
+
isInvalid: l
|
|
106
|
+
}, /* @__PURE__ */ i.createElement(j, {
|
|
107
|
+
ref: h,
|
|
108
|
+
className: t,
|
|
109
|
+
"data-hook": `checkbox-${a}`
|
|
110
|
+
}, ({ isSelected: m, isHovered: y }) => /* @__PURE__ */ i.createElement(i.Fragment, null, x(v, {
|
|
111
|
+
isSelected: m,
|
|
112
|
+
isHovered: y
|
|
113
|
+
}), x(g, {
|
|
114
|
+
label: a
|
|
115
|
+
}))));
|
|
116
|
+
};
|
|
117
|
+
F.Label = ce;
|
|
118
|
+
F.Input = le;
|
|
119
|
+
const M = ({ children: e, ...t }) => {
|
|
120
|
+
const { value: o, label: s, isFirst: a = !1, isOther: r = !1, fieldId: u } = t, I = N(), { value: b, onChange: p, options: c, addOtherPlaceholder: f, otherInputCharacterLimit: d, disabled: l, readOnly: O, hasError: h } = I, g = L(e, F), v = L(e, q), n = k(() => b || [], [
|
|
121
|
+
b
|
|
122
|
+
]), E = k(() => {
|
|
123
|
+
if (!r)
|
|
124
|
+
return !1;
|
|
125
|
+
const V = D(c || []);
|
|
126
|
+
return B(n, V);
|
|
127
|
+
}, [
|
|
128
|
+
r,
|
|
129
|
+
n,
|
|
130
|
+
c
|
|
131
|
+
]);
|
|
132
|
+
return /* @__PURE__ */ i.createElement(i.Fragment, null, x(g, {
|
|
133
|
+
value: o,
|
|
134
|
+
label: s,
|
|
135
|
+
isFirst: a,
|
|
136
|
+
isOther: r,
|
|
137
|
+
fieldId: u
|
|
138
|
+
}), r && E && x(v, {
|
|
139
|
+
fieldValue: n,
|
|
140
|
+
onChange: p,
|
|
141
|
+
label: s,
|
|
142
|
+
placeholder: f,
|
|
143
|
+
maxLength: d,
|
|
144
|
+
disabled: l,
|
|
145
|
+
readOnly: O,
|
|
146
|
+
hasError: h,
|
|
147
|
+
ariaLabel: s,
|
|
148
|
+
addOtherLabel: s,
|
|
149
|
+
options: c
|
|
150
|
+
}));
|
|
151
|
+
}, q = ({ className: e, inputClassName: t, ...o }) => {
|
|
152
|
+
const { fieldValue: s, onChange: a, label: r, placeholder: u, maxLength: I, disabled: b, readOnly: p, hasError: c, ariaLabel: f, addOtherLabel: d, options: l } = o, [O, h] = w(() => {
|
|
153
|
+
const n = D(l || []);
|
|
154
|
+
return B(s, n) ? T(s, d) : "";
|
|
155
|
+
});
|
|
156
|
+
U(() => {
|
|
157
|
+
const n = D(l || []), E = B(s, n);
|
|
158
|
+
h(E ? T(s, d) : "");
|
|
159
|
+
}, [
|
|
160
|
+
s,
|
|
161
|
+
l,
|
|
162
|
+
d
|
|
163
|
+
]);
|
|
164
|
+
const g = k(() => K((n) => {
|
|
165
|
+
const E = D(l || []), V = s.filter((S) => E.includes(S)), m = n ? `${d}: ${n}` : r, y = [
|
|
166
|
+
...V,
|
|
167
|
+
m
|
|
168
|
+
];
|
|
169
|
+
a(y);
|
|
170
|
+
}, 500), [
|
|
171
|
+
a,
|
|
172
|
+
l,
|
|
173
|
+
s,
|
|
174
|
+
d,
|
|
175
|
+
r
|
|
176
|
+
]), v = _((n) => {
|
|
177
|
+
h(n), g(n);
|
|
178
|
+
}, [
|
|
179
|
+
g
|
|
180
|
+
]);
|
|
181
|
+
return /* @__PURE__ */ i.createElement(z, {
|
|
182
|
+
"aria-label": f,
|
|
183
|
+
value: O,
|
|
184
|
+
onChange: v,
|
|
185
|
+
isDisabled: b,
|
|
186
|
+
isReadOnly: p,
|
|
187
|
+
isInvalid: c,
|
|
188
|
+
className: e
|
|
189
|
+
}, /* @__PURE__ */ i.createElement(J, {
|
|
190
|
+
className: t,
|
|
191
|
+
placeholder: u,
|
|
192
|
+
maxLength: I,
|
|
193
|
+
"aria-label": f
|
|
194
|
+
}));
|
|
195
|
+
};
|
|
196
|
+
C.Label = ae;
|
|
197
|
+
C.Options = $;
|
|
198
|
+
$.Option = M;
|
|
199
|
+
M.Checkbox = F;
|
|
200
|
+
M.OtherInput = q;
|
|
201
|
+
C.Description = ee;
|
|
202
|
+
C.Error = te;
|
|
203
|
+
export {
|
|
204
|
+
C
|
|
205
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { RicosViewer as n } from "@wix/ricos/viewer";
|
|
2
|
+
import a from "classnames";
|
|
3
|
+
import e from "react";
|
|
4
|
+
import { C as t } from "./checkbox-group-field-headless-DN2aNw9g.js";
|
|
5
|
+
import { E as m } from "./error-icon-hZxQ6DEy.js";
|
|
6
|
+
import { C as c } from "./checkbox-indicator-module-classes-BcScu147.js";
|
|
7
|
+
import { s } from "./field-rac.module-DjmaTYkc.js";
|
|
8
|
+
import { z as i, Q as E, c as p, e as O, y as C, p as _, i as L, d as R } from "./form-element-classes-BXNs5k3q.js";
|
|
9
|
+
import { o as r } from "./options-rac.module-KM-VT_KY.js";
|
|
10
|
+
import { u as I } from "./use-element-state-class-name-CC65g9mT.js";
|
|
11
|
+
const S = ({ content: o, locale: l }) => /* @__PURE__ */ e.createElement(n, {
|
|
12
|
+
content: o,
|
|
13
|
+
locale: l
|
|
14
|
+
}), x = () => {
|
|
15
|
+
const o = I({
|
|
16
|
+
globalClasses: R,
|
|
17
|
+
moduleClasses: c
|
|
18
|
+
});
|
|
19
|
+
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
20
|
+
className: a(i, s.label)
|
|
21
|
+
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|
|
22
|
+
className: a(E, s.requiredMark)
|
|
23
|
+
})), /* @__PURE__ */ e.createElement(t.Options, {
|
|
24
|
+
className: a(p, r.options)
|
|
25
|
+
}, /* @__PURE__ */ e.createElement(t.Options.Option, null, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox, {
|
|
26
|
+
className: s.checkbox
|
|
27
|
+
}, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Input, {
|
|
28
|
+
className: o
|
|
29
|
+
}), /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Label, {
|
|
30
|
+
className: a(O, r.optionLabel)
|
|
31
|
+
})), /* @__PURE__ */ e.createElement(t.Options.Option.OtherInput, {
|
|
32
|
+
inputClassName: a(C, s.input)
|
|
33
|
+
}))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
34
|
+
className: a(_, s.error)
|
|
35
|
+
}, /* @__PURE__ */ e.createElement(m, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
36
|
+
className: a(L, s.description)
|
|
37
|
+
}, S));
|
|
38
|
+
};
|
|
39
|
+
export {
|
|
40
|
+
x as C
|
|
41
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import r from "react";
|
|
2
|
+
import { s as t } from "./field-rac.module-DjmaTYkc.js";
|
|
3
|
+
const a = ({ className: e, ...o }) => {
|
|
4
|
+
const c = o;
|
|
5
|
+
return /* @__PURE__ */ r.createElement("div", {
|
|
6
|
+
"aria-hidden": "true",
|
|
7
|
+
className: typeof e == "function" ? e(c) : e
|
|
8
|
+
});
|
|
9
|
+
}, p = {
|
|
10
|
+
base: t.checkboxInput,
|
|
11
|
+
selected: t.checkboxInputSelected,
|
|
12
|
+
hover: t.checkboxInputHover
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
p as C,
|
|
16
|
+
a
|
|
17
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import C from "react";
|
|
2
|
+
import { C as _ } from "./checkbox-field-rac-4zG3Sf1c.js";
|
|
3
|
+
import { Z as e, _ as r, Y as t } from "./form-element-classes-BXNs5k3q.js";
|
|
4
|
+
const S = () => /* @__PURE__ */ C.createElement(_, {
|
|
5
|
+
classes: {
|
|
6
|
+
container: t,
|
|
7
|
+
label: r,
|
|
8
|
+
indicator: e
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
S as ContactsSubscribeRAC
|
|
13
|
+
};
|
package/dist/component/{date-input-field-rac-CfflD2Ar.js → date-input-field-rac-CVaajAFM.js}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
2
2
|
import E from "classnames";
|
|
3
|
-
import t, { useMemo as g, useState as x, useCallback as
|
|
4
|
-
import { ai as D, af as k, ab as A, J as U, a1 as
|
|
3
|
+
import t, { useMemo as g, useState as x, useCallback as H, useRef as V } from "react";
|
|
4
|
+
import { ai as D, af as k, ab as A, J as U, a1 as $, r as i, as as P, x as Z, K as ee, a8 as te, ak as j } from "./form-BpHElSwH.js";
|
|
5
5
|
import { UNSAFE_PortalProvider as ae } from "react-aria";
|
|
6
|
-
import { ListBoxItem as ne, ListBox as re, Select as oe, TextField as
|
|
6
|
+
import { ListBoxItem as ne, ListBox as re, Select as oe, TextField as q, SelectValue as se, Input as z } from "react-aria-components";
|
|
7
7
|
import { f as p, a as K } from "./find-child-C60k4CxG.js";
|
|
8
8
|
import { g as le } from "./helpers-HmkkXrh2.js";
|
|
9
|
-
import { D as ce, E as ie } from "./field-error-headless-
|
|
10
|
-
import { L as me } from "./field-label-headless-
|
|
9
|
+
import { D as ce, E as ie } from "./field-error-headless-C5ZsFUKv.js";
|
|
10
|
+
import { L as me } from "./field-label-headless-CS5OYsiI.js";
|
|
11
11
|
import { F as de } from "./fieldset-headless-CD3fds9J.js";
|
|
12
12
|
import { N as ue, S as pe } from "./non-modal-popover-DtIMXHbe.js";
|
|
13
13
|
import { C as Ee } from "./chevron-down-icon-CcpVm6B-.js";
|
|
14
14
|
import { E as be } from "./error-icon-hZxQ6DEy.js";
|
|
15
15
|
import { H as fe } from "./custom-focus-class-_483Pkwp.js";
|
|
16
|
-
import { s as u } from "./field-rac.module-
|
|
17
|
-
import { z as R,
|
|
16
|
+
import { s as u } from "./field-rac.module-DjmaTYkc.js";
|
|
17
|
+
import { z as R, Q as he, y as B, B as Ie, p as De, i as ye } from "./form-element-classes-BXNs5k3q.js";
|
|
18
18
|
const n = ({ children: e, className: a }) => {
|
|
19
|
-
const { id: r, required: o, onBlur: s, onFocus: c, FieldLayout: l } = D(), { inputId: d, labelId: m, ariaDescribedBy: f } = k(), { regionalFormat: b } = A(), I = g(() => U(b).filter(
|
|
19
|
+
const { id: r, required: o, onBlur: s, onFocus: c, FieldLayout: l } = D(), { inputId: d, labelId: m, ariaDescribedBy: f } = k(), { regionalFormat: b } = A(), I = g(() => U(b).filter($).map((v) => v.toUpperCase()), [
|
|
20
20
|
b
|
|
21
21
|
]), O = p(e, n.Label), T = p(e, n.Description), Y = p(e, n.Error), N = {
|
|
22
22
|
[i.MONTH]: p(e, n.Month),
|
|
@@ -40,20 +40,20 @@ const n = ({ children: e, className: a }) => {
|
|
|
40
40
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, Y, T)
|
|
41
41
|
});
|
|
42
42
|
}, y = ({ children: e, className: a }) => {
|
|
43
|
-
const { disabled: r, readOnly: o, showDateLabels: s, hidePlaceholder: c } = D(), { labelId: l } = _(i.MONTH), { partValue: d, partError: m, onPartChange: f } = L(i.MONTH), { t: b } = P(), [I, O] = x(!1), [T, Y] = x(null), N = c ? void 0 : b("field.date.placeholder.month"), v =
|
|
43
|
+
const { disabled: r, readOnly: o, showDateLabels: s, hidePlaceholder: c } = D(), { labelId: l } = _(i.MONTH), { partValue: d, partError: m, onPartChange: f } = L(i.MONTH), { t: b } = P(), [I, O] = x(!1), [T, Y] = x(null), N = c ? void 0 : b("field.date.placeholder.month"), v = H((M) => {
|
|
44
44
|
o || f(typeof M == "string" ? M : "");
|
|
45
45
|
}, [
|
|
46
46
|
f,
|
|
47
47
|
o
|
|
48
|
-
]),
|
|
48
|
+
]), Q = H((M) => {
|
|
49
49
|
O(M && !o);
|
|
50
50
|
}, [
|
|
51
51
|
o
|
|
52
|
-
]),
|
|
52
|
+
]), J = p(e, y.Label), G = p(e, y.Trigger), W = p(e, y.Options);
|
|
53
53
|
return /* @__PURE__ */ t.createElement("div", {
|
|
54
54
|
className: a,
|
|
55
55
|
"data-date-field": !0
|
|
56
|
-
}, s ?
|
|
56
|
+
}, s ? J : null, /* @__PURE__ */ t.createElement("div", {
|
|
57
57
|
ref: Y,
|
|
58
58
|
style: {
|
|
59
59
|
display: "contents"
|
|
@@ -68,14 +68,14 @@ const n = ({ children: e, className: a }) => {
|
|
|
68
68
|
isInvalid: m,
|
|
69
69
|
placeholder: N,
|
|
70
70
|
isOpen: I,
|
|
71
|
-
onOpenChange:
|
|
71
|
+
onOpenChange: Q
|
|
72
72
|
}, G, W)));
|
|
73
73
|
}, _e = ({ className: e }) => /* @__PURE__ */ t.createElement(w, {
|
|
74
74
|
datePart: i.MONTH,
|
|
75
75
|
className: e
|
|
76
76
|
}), ge = ({ children: e, className: a }) => {
|
|
77
|
-
const { id: r, readOnly: o } = D(), { inputId: s } = _(i.MONTH), { partError: c, isFirstPart: l } = L(i.MONTH), d =
|
|
78
|
-
return
|
|
77
|
+
const { id: r, readOnly: o } = D(), { inputId: s } = _(i.MONTH), { partError: c, isFirstPart: l } = L(i.MONTH), d = V(null);
|
|
78
|
+
return j(() => {
|
|
79
79
|
var m;
|
|
80
80
|
l && ((m = d.current) == null || m.focus());
|
|
81
81
|
}, r), /* @__PURE__ */ t.createElement(pe, {
|
|
@@ -116,7 +116,7 @@ const F = ({ children: e, className: a }) => {
|
|
|
116
116
|
return /* @__PURE__ */ t.createElement("div", {
|
|
117
117
|
className: a,
|
|
118
118
|
"data-date-field": !0
|
|
119
|
-
}, s && f, /* @__PURE__ */ t.createElement(
|
|
119
|
+
}, s && f, /* @__PURE__ */ t.createElement(q, {
|
|
120
120
|
"aria-labelledby": s ? c : void 0,
|
|
121
121
|
value: l,
|
|
122
122
|
onChange: m,
|
|
@@ -128,8 +128,8 @@ const F = ({ children: e, className: a }) => {
|
|
|
128
128
|
datePart: i.DAY,
|
|
129
129
|
className: e
|
|
130
130
|
}), Ne = ({ className: e }) => {
|
|
131
|
-
const { id: a, hidePlaceholder: r } = D(), { inputId: o } = _(i.DAY), { isFirstPart: s } = L(i.DAY), { t: c } = P(), l =
|
|
132
|
-
return
|
|
131
|
+
const { id: a, hidePlaceholder: r } = D(), { inputId: o } = _(i.DAY), { isFirstPart: s } = L(i.DAY), { t: c } = P(), l = V(null), d = r ? void 0 : c("field.date.placeholder.day");
|
|
132
|
+
return j(() => {
|
|
133
133
|
var m;
|
|
134
134
|
s && ((m = l.current) == null || m.focus());
|
|
135
135
|
}, a), /* @__PURE__ */ t.createElement(z, {
|
|
@@ -149,7 +149,7 @@ const C = ({ children: e, className: a }) => {
|
|
|
149
149
|
return /* @__PURE__ */ t.createElement("div", {
|
|
150
150
|
className: a,
|
|
151
151
|
"data-date-field": !0
|
|
152
|
-
}, s && f, /* @__PURE__ */ t.createElement(
|
|
152
|
+
}, s && f, /* @__PURE__ */ t.createElement(q, {
|
|
153
153
|
"aria-labelledby": s ? c : void 0,
|
|
154
154
|
value: l,
|
|
155
155
|
onChange: m,
|
|
@@ -161,8 +161,8 @@ const C = ({ children: e, className: a }) => {
|
|
|
161
161
|
datePart: i.YEAR,
|
|
162
162
|
className: e
|
|
163
163
|
}), Ce = ({ className: e }) => {
|
|
164
|
-
const { id: a, hidePlaceholder: r } = D(), { inputId: o } = _(i.YEAR), { isFirstPart: s } = L(i.YEAR), { t: c } = P(), l =
|
|
165
|
-
return
|
|
164
|
+
const { id: a, hidePlaceholder: r } = D(), { inputId: o } = _(i.YEAR), { isFirstPart: s } = L(i.YEAR), { t: c } = P(), l = V(null), d = r ? void 0 : c("field.date.placeholder.year");
|
|
165
|
+
return j(() => {
|
|
166
166
|
var m;
|
|
167
167
|
s && ((m = l.current) == null || m.focus());
|
|
168
168
|
}, a), /* @__PURE__ */ t.createElement(z, {
|
|
@@ -202,14 +202,14 @@ function L(e) {
|
|
|
202
202
|
]), l = g(() => ee(o, a ?? ""), [
|
|
203
203
|
a,
|
|
204
204
|
o
|
|
205
|
-
]), d = c[e] || "", m =
|
|
205
|
+
]), d = c[e] || "", m = H((b) => {
|
|
206
206
|
const I = te(b, e, c);
|
|
207
207
|
r(I);
|
|
208
208
|
}, [
|
|
209
209
|
r,
|
|
210
210
|
c,
|
|
211
211
|
e
|
|
212
|
-
]), f = g(() => U(s).filter(
|
|
212
|
+
]), f = g(() => U(s).filter($).map((O) => O.toUpperCase())[0] === e, [
|
|
213
213
|
s,
|
|
214
214
|
e
|
|
215
215
|
]);
|
|
@@ -228,7 +228,7 @@ function w({ datePart: e, className: a }) {
|
|
|
228
228
|
className: a
|
|
229
229
|
}, l);
|
|
230
230
|
}
|
|
231
|
-
const Me = "_fields_12ojb_1", Re = "_month_12ojb_9", Se = "_day_12ojb_10", Ae = "_year_12ojb_11", Pe = "_mobile_12ojb_25", Te = "_dayInput_12ojb_37", Ye = "_yearInput_12ojb_38", ve = "_monthTrigger_12ojb_42",
|
|
231
|
+
const Me = "_fields_12ojb_1", Re = "_month_12ojb_9", Se = "_day_12ojb_10", Ae = "_year_12ojb_11", Pe = "_mobile_12ojb_25", Te = "_dayInput_12ojb_37", Ye = "_yearInput_12ojb_38", ve = "_monthTrigger_12ojb_42", Be = "_monthOption_12ojb_62", h = {
|
|
232
232
|
fields: Me,
|
|
233
233
|
month: Re,
|
|
234
234
|
day: Se,
|
|
@@ -237,8 +237,8 @@ const Me = "_fields_12ojb_1", Re = "_month_12ojb_9", Se = "_day_12ojb_10", Ae =
|
|
|
237
237
|
dayInput: Te,
|
|
238
238
|
yearInput: Ye,
|
|
239
239
|
monthTrigger: ve,
|
|
240
|
-
monthOption:
|
|
241
|
-
},
|
|
240
|
+
monthOption: Be
|
|
241
|
+
}, He = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(X, {
|
|
242
242
|
content: e,
|
|
243
243
|
locale: a
|
|
244
244
|
}), tt = () => {
|
|
@@ -256,7 +256,7 @@ const Me = "_fields_12ojb_1", Re = "_month_12ojb_9", Se = "_day_12ojb_10", Ae =
|
|
|
256
256
|
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
257
257
|
className: E(R, u.label)
|
|
258
258
|
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
259
|
-
className: E(
|
|
259
|
+
className: E(B, u.input, h.monthTrigger)
|
|
260
260
|
}, /* @__PURE__ */ t.createElement(Ee, {
|
|
261
261
|
className: u.dropdownIcon
|
|
262
262
|
})), /* @__PURE__ */ t.createElement(n.Month.Options, {
|
|
@@ -268,18 +268,18 @@ const Me = "_fields_12ojb_1", Re = "_month_12ojb_9", Se = "_day_12ojb_10", Ae =
|
|
|
268
268
|
}, /* @__PURE__ */ t.createElement(n.Day.Label, {
|
|
269
269
|
className: E(R, u.label)
|
|
270
270
|
}), /* @__PURE__ */ t.createElement(n.Day.Input, {
|
|
271
|
-
className: E(
|
|
271
|
+
className: E(B, u.input, h.dayInput)
|
|
272
272
|
})), /* @__PURE__ */ t.createElement(n.Year, {
|
|
273
273
|
className: h.year
|
|
274
274
|
}, /* @__PURE__ */ t.createElement(n.Year.Label, {
|
|
275
275
|
className: E(R, u.label)
|
|
276
276
|
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
277
|
-
className: E(
|
|
277
|
+
className: E(B, u.input, h.yearInput)
|
|
278
278
|
})), /* @__PURE__ */ t.createElement(n.Error, {
|
|
279
279
|
className: E(De, u.error)
|
|
280
280
|
}, /* @__PURE__ */ t.createElement(be, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
281
281
|
className: E(ye, u.description)
|
|
282
|
-
},
|
|
282
|
+
}, He));
|
|
283
283
|
};
|
|
284
284
|
export {
|
|
285
285
|
tt as D
|