@wix/form-elements 1.84.0 → 1.85.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-BSy3u0GK.js → appointment-rac-CCaJ6P5r.js} +78 -78
- package/dist/component/{bookings-address-rac-CL7Bh1yH.js → bookings-address-rac-DEt9SGPG.js} +1 -1
- package/dist/component/{bookings-email-rac-Bw9tj_tv.js → bookings-email-rac-BydOvOUZ.js} +1 -1
- package/dist/component/{bookings-first-name-rac-BOOu_AXM.js → bookings-first-name-rac-BoQki0Pb.js} +1 -1
- package/dist/component/{bookings-header-rac-3kBei7GF.js → bookings-header-rac-DK-EcXrk.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CUKbu22q.js → bookings-last-name-rac-BuGIyd43.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CLrUhdX2.js → bookings-login-bar-rac-Cr500ehb.js} +6 -6
- package/dist/component/{bookings-phone-rac-7DViellg.js → bookings-phone-rac-Bq2zdMxo.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CIUZX--G.js → bookings-rich-text-rac-DRmfusX9.js} +1 -1
- package/dist/component/{checkbox-field-rac-C_jth3RK.js → checkbox-field-rac-b9mcZlMP.js} +5 -5
- package/dist/component/{checkbox-group-field-headless-D-c9Kyj8.js → checkbox-group-field-headless-BSNhdCfs.js} +30 -30
- package/dist/component/{checkbox-group-field-rac-MgGUuYII.js → checkbox-group-field-rac-BObfui8r.js} +6 -6
- package/dist/component/{checkbox-group-rac-rr1mN2EJ.js → checkbox-group-rac-CBNMgBHU.js} +1 -1
- package/dist/component/{checkbox-rac-CRsLQKhN.js → checkbox-rac-DXh-i6Ot.js} +1 -1
- package/dist/component/{contacts-address-rac-BFlNbQKh.js → contacts-address-rac-BDQLFakc.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-D7Ww3iAz.js → contacts-birthdate-rac-BUMVVVfb.js} +1 -1
- package/dist/component/{contacts-company-rac-DLl4nqH-.js → contacts-company-rac-CidGcaA3.js} +1 -1
- package/dist/component/{contacts-email-rac-K8fCs8qS.js → contacts-email-rac-GePAhKDQ.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BOTxHl3m.js → contacts-first-name-rac-kw5sIBEE.js} +1 -1
- package/dist/component/{contacts-last-name-rac-bFnG-7Hm.js → contacts-last-name-rac-DzoZKs1n.js} +1 -1
- package/dist/component/{contacts-phone-rac-B4teqDIV.js → contacts-phone-rac-CxVW4Zp0.js} +1 -1
- package/dist/component/{contacts-position-rac-CnWoXO5h.js → contacts-position-rac-CXFxlSty.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-Bco722BU.js → contacts-subscribe-rac-kpRGeELB.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-QQsKhAx3.js → contacts-tax-id-rac-B5qw-rtP.js} +1 -1
- package/dist/component/{date-availability-DMbyb1GZ.js → date-availability-BCDMem-_.js} +1 -1
- package/dist/component/{date-input-field-rac-CVRjO19U.js → date-input-field-rac-BLDZ4_Mw.js} +43 -43
- package/dist/component/{date-input-rac-zi7AQ8Ai.js → date-input-rac-B1WGYKOp.js} +1 -1
- package/dist/component/{date-picker-field-rac-5H10gH9D.js → date-picker-field-rac-BNd8aZ0c.js} +20 -20
- package/dist/component/{date-picker-rac-CxWNDsyJ.js → date-picker-rac-ItWxSngw.js} +1 -1
- package/dist/component/{date-time-input-field-rac-CDa-nyf8.js → date-time-input-field-rac-Ch8z0NRT.js} +5 -5
- package/dist/component/{date-time-input-rac-DglwFYb0.js → date-time-input-rac-FebIovNN.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BBB652Uy.js → dext-checkbox-group-rac-BXYHMQ3R.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BVtiGV3w.js → dext-checkbox-rac-C78ScIGY.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Di4x6sI_.js → dext-date-picker-rac-BptT4fhe.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-agWHwUo7.js → dext-date-time-input-rac-RWJ51IjA.js} +1 -1
- package/dist/component/{dext-dropdown-rac-U3FZTA2-.js → dext-dropdown-rac-DZDOtSIG.js} +1 -1
- package/dist/component/{dext-email-rac-CZ9AQw_k.js → dext-email-rac-CJceqZsw.js} +1 -1
- package/dist/component/{dext-number-input-rac-DFr_9ZX5.js → dext-number-input-rac-buSXk49E.js} +1 -1
- package/dist/component/{dext-phone-rac-BYsfNwXn.js → dext-phone-rac-CeHUOWck.js} +1 -1
- package/dist/component/{dext-radio-group-rac-B_jm5YAT.js → dext-radio-group-rac-CNyNSfeP.js} +2 -2
- package/dist/component/{dext-rating-input-rac-CNlhMKt-.js → dext-rating-input-rac-mmdh9tYT.js} +1 -1
- package/dist/component/{dext-tags-rac-y9x8Fg54.js → dext-tags-rac-CqJ4iv-V.js} +2 -2
- package/dist/component/{dext-text-area-rac-BgRxIpn9.js → dext-text-area-rac-P1EzLNDE.js} +1 -1
- package/dist/component/{dext-text-input-rac-CdzgUZ38.js → dext-text-input-rac-Dtz4ZLj7.js} +1 -1
- package/dist/component/{dext-url-input-rac-Cg1TYyNV.js → dext-url-input-rac-DUVbW2yl.js} +1 -1
- package/dist/component/{donation-rac-Deiw7Tl9.js → donation-rac-Nn7z8_to.js} +43 -43
- package/dist/component/{dropdown-field-headless-BKj2rdy9.js → dropdown-field-headless-CT4uSCPR.js} +11 -11
- package/dist/component/{dropdown-field-rac-CIdC2_O3.js → dropdown-field-rac-CUiyFJi_.js} +5 -5
- package/dist/component/{dropdown-rac-CYxaJrXP.js → dropdown-rac-Bs_PVy1q.js} +1 -1
- package/dist/component/{ecom-address-rac-Crr3A_iU.js → ecom-address-rac-BTXwDlMM.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DdXAex4c.js → ecom-subscription-checkbox-rac-CGI84A37.js} +3 -3
- package/dist/component/{email-input-field-rac-C516Fm0v.js → email-input-field-rac-DKD7FsQX.js} +54 -54
- package/dist/component/{events-repeater-rac-DL49KaIU.js → events-repeater-rac-B7yIRlyt.js} +30 -30
- package/dist/component/{events-rsvp-rac-B5EvAP8x.js → events-rsvp-rac-C7FOuFmH.js} +3 -3
- package/dist/component/{field-error-headless-D2CJ4Qk7.js → field-error-headless-BHTkMu35.js} +1 -1
- package/dist/component/{field-label-headless-D2-WvVKT.js → field-label-headless-D3DwX65k.js} +7 -7
- package/dist/component/{file-upload-rac-BG3msdbn.js → file-upload-rac-B3n_LYYK.js} +85 -85
- package/dist/component/{fixed-payment-rac-3bI_h_W0.js → fixed-payment-rac-C6jsiS4-.js} +12 -12
- package/dist/component/{form-B3KiRFhB.js → form-BkmOXzqo.js} +2510 -2487
- package/dist/component/{form-element-classes-Ct1UaxuQ.js → form-element-classes-BsXkFtp2.js} +90 -57
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-Bp7hStrt.js → header-field-rac-FG9EP9--.js} +5 -5
- package/dist/component/{header-rac-yVYId2B_.js → header-rac-DZZgqFjW.js} +1 -1
- package/dist/component/{image-choice-rac-D1mqJfcn.js → image-choice-rac-CXgE6z_f.js} +42 -42
- package/dist/component/{index-LrdDmlej.js → index-CSwTHDCX.js} +2 -2
- package/dist/component/{index-B0PANcv8.js → index-DKV2sNhD.js} +4 -4
- package/dist/component/{isObjectLike-DH7T0Txd.js → isObjectLike-DYfHbEQ3.js} +1 -1
- package/dist/component/{multiline-address-field-rac-C-gtuNCU.js → multiline-address-field-rac-DnCOKW8F.js} +128 -128
- package/dist/component/{multiline-address-rac-B3ixmNqi.js → multiline-address-rac-BZRlzLZq.js} +1 -1
- package/dist/component/{number-input-field-rac-BNPMYFay.js → number-input-field-rac-BOJNJ50c.js} +30 -30
- package/dist/component/{number-input-rac-BaEBt2uf.js → number-input-rac-D8ZcIPwq.js} +1 -1
- package/dist/component/{password-rac-B0H_ILkt.js → password-rac-T9PR5j2v.js} +19 -19
- package/dist/component/{payment-input-rac-LIk9MP5a.js → payment-input-rac-C9N3LZOZ.js} +17 -17
- package/dist/component/{phone-input-field-rac-CUUAacDK.js → phone-input-field-rac-BxUiCV5Z.js} +40 -40
- package/dist/component/{phone-rac-BYqYOw60.js → phone-rac-BjKFrr86.js} +1 -1
- package/dist/component/{product-list-rac-CvoI6ajr.js → product-list-rac-BG-VK_Hz.js} +41 -41
- package/dist/component/{quiz-radio-group-rac-D0IJGSh0.js → quiz-radio-group-rac-B1x7Yatu.js} +2 -2
- package/dist/component/{radio-button-module-classes-CWfSY9kQ.js → radio-button-module-classes-BXWANbga.js} +7 -7
- package/dist/component/{radio-group-field-rac-DisEhh0b.js → radio-group-field-rac-DmEOydAr.js} +4 -4
- package/dist/component/{radio-group-rac-DrwjFNWh.js → radio-group-rac-DAcU_lkj.js} +1 -1
- package/dist/component/{rating-input-field-rac-BLMQWT7z.js → rating-input-field-rac-Cazqeqzw.js} +16 -16
- package/dist/component/{rating-input-rac-CGJY2HSO.js → rating-input-rac-KJ8FnJTj.js} +1 -1
- package/dist/component/{rich-content-rac.module-C9cKdumu.js → rich-content-rac.module-PZgMV2M7.js} +1 -1
- package/dist/component/{rich-text-field-rac-DTSRvaTK.js → rich-text-field-rac-DNEeY_m8.js} +3 -3
- package/dist/component/{rich-text-rac-Blk3neHN.js → rich-text-rac-g9upYD25.js} +1 -1
- package/dist/component/{service-dropdown-rac-C9P5IWrV.js → service-dropdown-rac-CmmWetDa.js} +20 -20
- package/dist/component/{services-multi-choice-rac-Cnhwy1a9.js → services-multi-choice-rac-D0PJNlq2.js} +7 -7
- package/dist/component/{signature-rac-Benar-ci.js → signature-rac-Q4G3uEhw.js} +41 -41
- package/dist/component/submit-button-rac-DdLPGJ6v.js +141 -0
- package/dist/component/{tags-field-rac-wA_0ZinI.js → tags-field-rac-PZ8Vfmsn.js} +72 -72
- package/dist/component/{tags-rac-BcVGekA6.js → tags-rac-DLjeR5G1.js} +1 -1
- package/dist/component/{text-area-field-rac-VpuojNac.js → text-area-field-rac-BNVK0R0Z.js} +25 -25
- package/dist/component/{text-area-rac-DDvi8u5M.js → text-area-rac-CNOLe3Vx.js} +1 -1
- package/dist/component/{text-input-field-rac-C6LohBtn.js → text-input-field-rac-DjdW6TCf.js} +3 -3
- package/dist/component/{text-input-headless-5yKhWpLD.js → text-input-headless-DFWQwZAN.js} +10 -10
- package/dist/component/{text-input-rac-C8hsNUp6.js → text-input-rac-GXPtQEjT.js} +1 -1
- package/dist/component/{time-input-rac-fOT-pjju.js → time-input-rac-B_g-erqu.js} +19 -19
- package/dist/component/{url-input-field-rac-DxR6Hymf.js → url-input-field-rac-CXWYeQLf.js} +19 -19
- package/dist/component/{url-input-rac-B928R10o.js → url-input-rac-DX-vjyXj.js} +1 -1
- package/dist/component/use-element-state-class-name-lZnP6sE6.js +22 -0
- package/dist/component/{use-service-options-base-UyJmT2P6.js → use-service-options-base-BJE86Rzo.js} +5 -5
- package/dist/component/{use-text-input-class-name-Qk2v8a6-.js → use-text-input-class-name-B-GYaltW.js} +5 -5
- package/dist/form.d.ts +58 -2
- package/package.json +5 -3
- package/dist/component/submit-button-rac-BDJQsZC3.js +0 -116
- package/dist/component/use-element-state-class-name-CBjBYCW5.js +0 -20
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import i, { useMemo as F, useCallback as _, useRef as P, useState as w, useEffect as U } from "react";
|
|
2
|
-
import { CheckboxGroup as W, CheckboxField as
|
|
2
|
+
import { CheckboxGroup as W, CheckboxField as j, CheckboxButton as A, TextField as z, Input as J } from "react-aria-components";
|
|
3
3
|
import { debounce as K } from "ts-debounce";
|
|
4
|
-
import {
|
|
5
|
-
import { f as
|
|
6
|
-
import { D as ee, E as te } from "./field-error-headless-
|
|
7
|
-
import { L as ae } from "./field-label-headless-
|
|
4
|
+
import { aj as N, ag as Q, at as X, ab as Y, al as Z } from "./form-BkmOXzqo.js";
|
|
5
|
+
import { f as I, a as x } from "./find-child-C60k4CxG.js";
|
|
6
|
+
import { D as ee, E as te } from "./field-error-headless-BHTkMu35.js";
|
|
7
|
+
import { L as ae } from "./field-label-headless-D3DwX65k.js";
|
|
8
8
|
import { F as ne } from "./fieldset-headless-CD3fds9J.js";
|
|
9
9
|
import { N as se } from "./options-layout-constants-DEfIEJWD.js";
|
|
10
10
|
import { S as le } from "./selection-indicator-XQ8MYHUQ.js";
|
|
@@ -15,7 +15,7 @@ const R = "Other", oe = (e, t) => e.some((o) => !t.includes(o)), B = (e, t) => e
|
|
|
15
15
|
const n = t ? t.length + 2 : 0;
|
|
16
16
|
return (e.find((r) => r.startsWith(`${t}: `)) || "").slice(n);
|
|
17
17
|
}, D = (e) => e.map((t) => t.value ?? t.label), C = ({ children: e }) => {
|
|
18
|
-
const t = N(), { id: o, value: n, onChange: a, disabled: r, required: u, onBlur:
|
|
18
|
+
const t = N(), { id: o, value: n, onChange: a, disabled: r, required: u, onBlur: g, onFocus: b, hasError: p, FieldLayout: c } = t, { inputId: f, labelId: d, ariaDescribedBy: l } = Q(), O = I(e, C.Label), h = I(e, C.Options), L = I(e, C.Description), v = I(e, C.Error), s = F(() => n || [], [
|
|
19
19
|
n
|
|
20
20
|
]), E = _((V) => {
|
|
21
21
|
a == null || a(V);
|
|
@@ -30,7 +30,7 @@ const R = "Other", oe = (e, t) => e.some((o) => !t.includes(o)), B = (e, t) => e
|
|
|
30
30
|
ariaLabelledBy: d,
|
|
31
31
|
ariaDescribedBy: l,
|
|
32
32
|
required: u,
|
|
33
|
-
onBlur:
|
|
33
|
+
onBlur: g,
|
|
34
34
|
onFocus: b
|
|
35
35
|
}, /* @__PURE__ */ i.createElement(W, {
|
|
36
36
|
"aria-labelledby": d,
|
|
@@ -40,23 +40,23 @@ const R = "Other", oe = (e, t) => e.some((o) => !t.includes(o)), B = (e, t) => e
|
|
|
40
40
|
isRequired: u,
|
|
41
41
|
isInvalid: p
|
|
42
42
|
}, h)),
|
|
43
|
-
renderDescription: () => /* @__PURE__ */ i.createElement(i.Fragment, null, v,
|
|
43
|
+
renderDescription: () => /* @__PURE__ */ i.createElement(i.Fragment, null, v, L)
|
|
44
44
|
});
|
|
45
45
|
}, $ = ({ children: e, className: t }) => {
|
|
46
|
-
const o = N(), { id: n, options: a, addOther: r, addOtherLabel: u, numberOfColumns:
|
|
46
|
+
const o = N(), { id: n, options: a, addOther: r, addOtherLabel: u, numberOfColumns: g } = o, { t: b } = X(), { isMobile: p } = Y(), c = I(e, $.Option), f = re(u, b), d = p ? se.ONE : g;
|
|
47
47
|
return /* @__PURE__ */ i.createElement("div", {
|
|
48
48
|
className: t,
|
|
49
49
|
"data-columns": d
|
|
50
50
|
}, a == null ? void 0 : a.map((l, O) => {
|
|
51
51
|
const h = l.value ?? l.label;
|
|
52
|
-
return
|
|
52
|
+
return x(c, {
|
|
53
53
|
key: l.id || l.label,
|
|
54
54
|
value: h,
|
|
55
55
|
label: l.label,
|
|
56
56
|
isFirst: O === 0,
|
|
57
57
|
fieldId: n
|
|
58
58
|
});
|
|
59
|
-
}), r &&
|
|
59
|
+
}), r && x(c, {
|
|
60
60
|
key: R,
|
|
61
61
|
value: R,
|
|
62
62
|
label: f,
|
|
@@ -67,15 +67,15 @@ const R = "Other", oe = (e, t) => e.some((o) => !t.includes(o)), B = (e, t) => e
|
|
|
67
67
|
return /* @__PURE__ */ i.createElement("span", {
|
|
68
68
|
className: e
|
|
69
69
|
}, o);
|
|
70
|
-
},
|
|
71
|
-
const { value: n, label: a, isFirst: r = !1, isOther: u = !1, fieldId:
|
|
70
|
+
}, k = ({ children: e, className: t, ...o }) => {
|
|
71
|
+
const { value: n, label: a, isFirst: r = !1, isOther: u = !1, fieldId: g } = o, b = N(), { value: p, onChange: c, disabled: f, readOnly: d, hasError: l, options: O } = b, h = P(null);
|
|
72
72
|
Z(() => {
|
|
73
73
|
var m;
|
|
74
74
|
r && ((m = h.current) == null || m.focus({
|
|
75
75
|
preventScroll: !0
|
|
76
76
|
}));
|
|
77
|
-
},
|
|
78
|
-
const
|
|
77
|
+
}, g);
|
|
78
|
+
const L = I(e, k.Label), v = I(e, k.Input), s = F(() => p || [], [
|
|
79
79
|
p
|
|
80
80
|
]), E = F(() => u ? s.find((m) => m === a || m.startsWith(`${a}: `)) || a : n, [
|
|
81
81
|
u,
|
|
@@ -97,27 +97,27 @@ const R = "Other", oe = (e, t) => e.some((o) => !t.includes(o)), B = (e, t) => e
|
|
|
97
97
|
O,
|
|
98
98
|
s
|
|
99
99
|
]);
|
|
100
|
-
return /* @__PURE__ */ i.createElement(
|
|
100
|
+
return /* @__PURE__ */ i.createElement(j, {
|
|
101
101
|
value: E,
|
|
102
102
|
onChange: u ? V : void 0,
|
|
103
103
|
isDisabled: f,
|
|
104
104
|
isReadOnly: d,
|
|
105
105
|
isInvalid: l
|
|
106
|
-
}, /* @__PURE__ */ i.createElement(
|
|
106
|
+
}, /* @__PURE__ */ i.createElement(A, {
|
|
107
107
|
ref: h,
|
|
108
108
|
className: t,
|
|
109
109
|
"data-hook": `checkbox-${a}`
|
|
110
|
-
}, ({ isSelected: m, isHovered: y }) => /* @__PURE__ */ i.createElement(i.Fragment, null,
|
|
110
|
+
}, ({ isSelected: m, isHovered: y }) => /* @__PURE__ */ i.createElement(i.Fragment, null, x(v, {
|
|
111
111
|
isSelected: m,
|
|
112
112
|
isHovered: y
|
|
113
|
-
}),
|
|
113
|
+
}), x(L, {
|
|
114
114
|
label: a
|
|
115
115
|
}))));
|
|
116
116
|
};
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
k.Label = ce;
|
|
118
|
+
k.Input = le;
|
|
119
119
|
const M = ({ children: e, ...t }) => {
|
|
120
|
-
const { value: o, label: n, isFirst: a = !1, isOther: r = !1, fieldId: u } = t,
|
|
120
|
+
const { value: o, label: n, isFirst: a = !1, isOther: r = !1, fieldId: u } = t, g = N(), { value: b, onChange: p, options: c, addOtherPlaceholder: f, otherInputCharacterLimit: d, disabled: l, readOnly: O, hasError: h } = g, L = I(e, k), v = I(e, q), s = F(() => b || [], [
|
|
121
121
|
b
|
|
122
122
|
]), E = F(() => {
|
|
123
123
|
if (!r)
|
|
@@ -129,13 +129,13 @@ const M = ({ children: e, ...t }) => {
|
|
|
129
129
|
s,
|
|
130
130
|
c
|
|
131
131
|
]);
|
|
132
|
-
return /* @__PURE__ */ i.createElement(i.Fragment, null,
|
|
132
|
+
return /* @__PURE__ */ i.createElement(i.Fragment, null, x(L, {
|
|
133
133
|
value: o,
|
|
134
134
|
label: n,
|
|
135
135
|
isFirst: a,
|
|
136
136
|
isOther: r,
|
|
137
137
|
fieldId: u
|
|
138
|
-
}), r && E &&
|
|
138
|
+
}), r && E && x(v, {
|
|
139
139
|
fieldValue: s,
|
|
140
140
|
onChange: p,
|
|
141
141
|
label: n,
|
|
@@ -149,7 +149,7 @@ const M = ({ children: e, ...t }) => {
|
|
|
149
149
|
options: c
|
|
150
150
|
}));
|
|
151
151
|
}, q = ({ className: e, inputClassName: t, ...o }) => {
|
|
152
|
-
const { fieldValue: n, onChange: a, label: r, placeholder: u, maxLength:
|
|
152
|
+
const { fieldValue: n, onChange: a, label: r, placeholder: u, maxLength: g, disabled: b, readOnly: p, hasError: c, ariaLabel: f, addOtherLabel: d, options: l } = o, [O, h] = w(() => {
|
|
153
153
|
const s = D(l || []);
|
|
154
154
|
return B(n, s) ? T(n, d) : "";
|
|
155
155
|
});
|
|
@@ -161,7 +161,7 @@ const M = ({ children: e, ...t }) => {
|
|
|
161
161
|
l,
|
|
162
162
|
d
|
|
163
163
|
]);
|
|
164
|
-
const
|
|
164
|
+
const L = F(() => K((s) => {
|
|
165
165
|
const E = D(l || []), V = n.filter((S) => E.includes(S)), m = s ? `${d}: ${s}` : r, y = [
|
|
166
166
|
...V,
|
|
167
167
|
m
|
|
@@ -174,9 +174,9 @@ const M = ({ children: e, ...t }) => {
|
|
|
174
174
|
d,
|
|
175
175
|
r
|
|
176
176
|
]), v = _((s) => {
|
|
177
|
-
h(s),
|
|
177
|
+
h(s), L(s);
|
|
178
178
|
}, [
|
|
179
|
-
|
|
179
|
+
L
|
|
180
180
|
]);
|
|
181
181
|
return /* @__PURE__ */ i.createElement(z, {
|
|
182
182
|
"aria-label": f,
|
|
@@ -189,14 +189,14 @@ const M = ({ children: e, ...t }) => {
|
|
|
189
189
|
}, /* @__PURE__ */ i.createElement(J, {
|
|
190
190
|
className: t,
|
|
191
191
|
placeholder: u,
|
|
192
|
-
maxLength:
|
|
192
|
+
maxLength: g,
|
|
193
193
|
"aria-label": f
|
|
194
194
|
}));
|
|
195
195
|
};
|
|
196
196
|
C.Label = ae;
|
|
197
197
|
C.Options = $;
|
|
198
198
|
$.Option = M;
|
|
199
|
-
M.Checkbox =
|
|
199
|
+
M.Checkbox = k;
|
|
200
200
|
M.OtherInput = q;
|
|
201
201
|
C.Description = ee;
|
|
202
202
|
C.Error = te;
|
package/dist/component/{checkbox-group-field-rac-MgGUuYII.js → checkbox-group-field-rac-BObfui8r.js}
RENAMED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
2
|
import a from "classnames";
|
|
3
3
|
import e from "react";
|
|
4
|
-
import { C as t } from "./checkbox-group-field-headless-
|
|
4
|
+
import { C as t } from "./checkbox-group-field-headless-BSNhdCfs.js";
|
|
5
5
|
import { E as n } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { C as c } from "./checkbox-indicator-module-classes-Bb3xB1ve.js";
|
|
7
7
|
import { s } from "./field-rac.module-D06m9T9x.js";
|
|
8
|
-
import { y as i,
|
|
8
|
+
import { y as i, P as E, c as p, e as C, o as O, i as _, d as I } from "./form-element-classes-BsXkFtp2.js";
|
|
9
9
|
import { o as l } from "./options-rac.module-KM-VT_KY.js";
|
|
10
|
-
import { u as L } from "./use-element-state-class-name-
|
|
11
|
-
import { u as R } from "./use-text-input-class-name-
|
|
10
|
+
import { u as L } from "./use-element-state-class-name-lZnP6sE6.js";
|
|
11
|
+
import { u as R } from "./use-text-input-class-name-B-GYaltW.js";
|
|
12
12
|
const u = ({ content: o, locale: r }) => /* @__PURE__ */ e.createElement(m, {
|
|
13
13
|
content: o,
|
|
14
14
|
locale: r
|
|
@@ -28,11 +28,11 @@ const u = ({ content: o, locale: r }) => /* @__PURE__ */ e.createElement(m, {
|
|
|
28
28
|
}, /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Input, {
|
|
29
29
|
className: o
|
|
30
30
|
}), /* @__PURE__ */ e.createElement(t.Options.Option.Checkbox.Label, {
|
|
31
|
-
className: a(
|
|
31
|
+
className: a(C, l.optionLabel)
|
|
32
32
|
})), /* @__PURE__ */ e.createElement(t.Options.Option.OtherInput, {
|
|
33
33
|
inputClassName: r
|
|
34
34
|
}))), /* @__PURE__ */ e.createElement(t.Error, {
|
|
35
|
-
className: a(
|
|
35
|
+
className: a(O, s.error)
|
|
36
36
|
}, /* @__PURE__ */ e.createElement(n, null), /* @__PURE__ */ e.createElement(t.Error.Text, null)), /* @__PURE__ */ e.createElement(t.Description, {
|
|
37
37
|
className: a(_, s.description)
|
|
38
38
|
}, u));
|
package/dist/component/{contacts-subscribe-rac-Bco722BU.js → contacts-subscribe-rac-kpRGeELB.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import C from "react";
|
|
2
|
-
import { C as e } from "./checkbox-field-rac-
|
|
3
|
-
import {
|
|
2
|
+
import { C as e } from "./checkbox-field-rac-b9mcZlMP.js";
|
|
3
|
+
import { Y as r, Z as t, X as _ } from "./form-element-classes-BsXkFtp2.js";
|
|
4
4
|
const S = () => /* @__PURE__ */ C.createElement(e, {
|
|
5
5
|
classes: {
|
|
6
6
|
container: _,
|
package/dist/component/{date-input-field-rac-CVRjO19U.js → date-input-field-rac-BLDZ4_Mw.js}
RENAMED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
2
2
|
import b from "classnames";
|
|
3
|
-
import t, { useMemo as _, useState as
|
|
4
|
-
import {
|
|
3
|
+
import t, { useMemo as _, useState as V, useCallback as B, useRef as j } from "react";
|
|
4
|
+
import { aj as D, ag as U, ab as A, J as k, a1 as $, r as i, at as P, x as Z, K as ee, a8 as te, al as x } from "./form-BkmOXzqo.js";
|
|
5
5
|
import { UNSAFE_PortalProvider as ae } from "react-aria";
|
|
6
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 u, 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-BHTkMu35.js";
|
|
10
|
+
import { L as me } from "./field-label-headless-D3DwX65k.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
16
|
import { s as p } from "./field-rac.module-D06m9T9x.js";
|
|
17
|
-
import { y as R,
|
|
18
|
-
import { u as w } from "./use-text-input-class-name-
|
|
17
|
+
import { y as R, P as he, x as Ie, B as De, o as ye, i as ge } from "./form-element-classes-BsXkFtp2.js";
|
|
18
|
+
import { u as w } from "./use-text-input-class-name-B-GYaltW.js";
|
|
19
19
|
const n = ({ children: e, className: a }) => {
|
|
20
|
-
const { id: r, required: o, onBlur: s, onFocus: c, FieldLayout: l } = D(), { inputId: d, labelId: m, ariaDescribedBy: f } =
|
|
20
|
+
const { id: r, required: o, onBlur: s, onFocus: c, FieldLayout: l } = D(), { inputId: d, labelId: m, ariaDescribedBy: f } = U(), { regionalFormat: E } = A(), I = _(() => k(E).filter($).map((v) => v.toUpperCase()), [
|
|
21
21
|
E
|
|
22
|
-
]),
|
|
22
|
+
]), L = u(e, n.Label), T = u(e, n.Description), Y = u(e, n.Error), O = {
|
|
23
23
|
[i.MONTH]: u(e, n.Month),
|
|
24
24
|
[i.DAY]: u(e, n.Day),
|
|
25
25
|
[i.YEAR]: u(e, n.Year)
|
|
26
26
|
};
|
|
27
27
|
return /* @__PURE__ */ t.createElement(l, {
|
|
28
28
|
fieldId: r,
|
|
29
|
-
renderLabel: () => K(
|
|
29
|
+
renderLabel: () => K(L, {
|
|
30
30
|
as: "div"
|
|
31
31
|
}),
|
|
32
32
|
renderInput: () => /* @__PURE__ */ t.createElement(de, {
|
|
@@ -37,17 +37,17 @@ const n = ({ children: e, className: a }) => {
|
|
|
37
37
|
onBlur: s,
|
|
38
38
|
onFocus: c,
|
|
39
39
|
className: a
|
|
40
|
-
},
|
|
40
|
+
}, O[I[0]], O[I[1]], O[I[2]]),
|
|
41
41
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, Y, T)
|
|
42
42
|
});
|
|
43
43
|
}, y = ({ children: e, className: a }) => {
|
|
44
|
-
const { disabled: r, readOnly: o, showDateLabels: s, hidePlaceholder: c } = D(), { labelId: l } = g(i.MONTH), { partValue: d, partError: m, onPartChange: f } = N(i.MONTH), { t: E } = P(), [I,
|
|
44
|
+
const { disabled: r, readOnly: o, showDateLabels: s, hidePlaceholder: c } = D(), { labelId: l } = g(i.MONTH), { partValue: d, partError: m, onPartChange: f } = N(i.MONTH), { t: E } = P(), [I, L] = V(!1), [T, Y] = V(null), O = c ? void 0 : E("field.date.placeholder.month"), v = B((M) => {
|
|
45
45
|
o || f(typeof M == "string" ? M : "");
|
|
46
46
|
}, [
|
|
47
47
|
f,
|
|
48
48
|
o
|
|
49
|
-
]), J =
|
|
50
|
-
|
|
49
|
+
]), J = B((M) => {
|
|
50
|
+
L(M && !o);
|
|
51
51
|
}, [
|
|
52
52
|
o
|
|
53
53
|
]), Q = u(e, y.Label), G = u(e, y.Trigger), W = u(e, y.Options);
|
|
@@ -67,16 +67,16 @@ const n = ({ children: e, className: a }) => {
|
|
|
67
67
|
onChange: v,
|
|
68
68
|
isDisabled: r,
|
|
69
69
|
isInvalid: m,
|
|
70
|
-
placeholder:
|
|
70
|
+
placeholder: O,
|
|
71
71
|
isOpen: I,
|
|
72
72
|
onOpenChange: J
|
|
73
73
|
}, G, W)));
|
|
74
|
-
}, _e = ({ className: e }) => /* @__PURE__ */ t.createElement(
|
|
74
|
+
}, _e = ({ className: e }) => /* @__PURE__ */ t.createElement(H, {
|
|
75
75
|
datePart: i.MONTH,
|
|
76
76
|
className: e
|
|
77
77
|
}), Ne = ({ children: e, className: a }) => {
|
|
78
|
-
const { id: r, readOnly: o } = D(), { inputId: s } = g(i.MONTH), { partError: c, isFirstPart: l } = N(i.MONTH), d =
|
|
79
|
-
return
|
|
78
|
+
const { id: r, readOnly: o } = D(), { inputId: s } = g(i.MONTH), { partError: c, isFirstPart: l } = N(i.MONTH), d = j(null);
|
|
79
|
+
return x(() => {
|
|
80
80
|
var m;
|
|
81
81
|
l && ((m = d.current) == null || m.focus());
|
|
82
82
|
}, r), /* @__PURE__ */ t.createElement(pe, {
|
|
@@ -87,10 +87,10 @@ const n = ({ children: e, className: a }) => {
|
|
|
87
87
|
"data-invalid": c || void 0,
|
|
88
88
|
"data-readonly": o || void 0
|
|
89
89
|
}, /* @__PURE__ */ t.createElement(se, null), e);
|
|
90
|
-
},
|
|
91
|
-
const { language: r } =
|
|
90
|
+
}, S = ({ children: e, className: a }) => {
|
|
91
|
+
const { language: r } = A(), o = _(() => le(r), [
|
|
92
92
|
r
|
|
93
|
-
]), s = u(e,
|
|
93
|
+
]), s = u(e, S.Option) ?? /* @__PURE__ */ t.createElement(S.Option, null);
|
|
94
94
|
return /* @__PURE__ */ t.createElement(ue, {
|
|
95
95
|
className: a,
|
|
96
96
|
containerPadding: 0,
|
|
@@ -100,7 +100,7 @@ const n = ({ children: e, className: a }) => {
|
|
|
100
100
|
value: String(l + 1),
|
|
101
101
|
label: c
|
|
102
102
|
}))));
|
|
103
|
-
},
|
|
103
|
+
}, Le = ({ className: e, ...a }) => {
|
|
104
104
|
const { value: r, label: o } = a;
|
|
105
105
|
return /* @__PURE__ */ t.createElement(ne, {
|
|
106
106
|
className: e,
|
|
@@ -110,8 +110,8 @@ const n = ({ children: e, className: a }) => {
|
|
|
110
110
|
};
|
|
111
111
|
y.Label = _e;
|
|
112
112
|
y.Trigger = Ne;
|
|
113
|
-
y.Options =
|
|
114
|
-
|
|
113
|
+
y.Options = S;
|
|
114
|
+
S.Option = Le;
|
|
115
115
|
const F = ({ children: e, className: a }) => {
|
|
116
116
|
const { disabled: r, readOnly: o, showDateLabels: s } = D(), { labelId: c } = g(i.DAY), { partValue: l, partError: d, onPartChange: m } = N(i.DAY), f = u(e, F.Label), E = u(e, F.Input);
|
|
117
117
|
return /* @__PURE__ */ t.createElement("div", {
|
|
@@ -125,12 +125,12 @@ const F = ({ children: e, className: a }) => {
|
|
|
125
125
|
isReadOnly: o,
|
|
126
126
|
isInvalid: d
|
|
127
127
|
}, E));
|
|
128
|
-
},
|
|
128
|
+
}, Oe = ({ className: e }) => /* @__PURE__ */ t.createElement(H, {
|
|
129
129
|
datePart: i.DAY,
|
|
130
130
|
className: e
|
|
131
131
|
}), Fe = ({ className: e }) => {
|
|
132
|
-
const { id: a, hidePlaceholder: r } = D(), { inputId: o } = g(i.DAY), { isFirstPart: s } = N(i.DAY), { t: c } = P(), l =
|
|
133
|
-
return
|
|
132
|
+
const { id: a, hidePlaceholder: r } = D(), { inputId: o } = g(i.DAY), { isFirstPart: s } = N(i.DAY), { t: c } = P(), l = j(null), d = r ? void 0 : c("field.date.placeholder.day");
|
|
133
|
+
return x(() => {
|
|
134
134
|
var m;
|
|
135
135
|
s && ((m = l.current) == null || m.focus());
|
|
136
136
|
}, a), /* @__PURE__ */ t.createElement(z, {
|
|
@@ -143,7 +143,7 @@ const F = ({ children: e, className: a }) => {
|
|
|
143
143
|
"data-hook": i.DAY
|
|
144
144
|
});
|
|
145
145
|
};
|
|
146
|
-
F.Label =
|
|
146
|
+
F.Label = Oe;
|
|
147
147
|
F.Input = Fe;
|
|
148
148
|
const C = ({ children: e, className: a }) => {
|
|
149
149
|
const { disabled: r, readOnly: o, showDateLabels: s } = D(), { labelId: c } = g(i.YEAR), { partValue: l, partError: d, onPartChange: m } = N(i.YEAR), f = u(e, C.Label), E = u(e, C.Input);
|
|
@@ -158,12 +158,12 @@ const C = ({ children: e, className: a }) => {
|
|
|
158
158
|
isReadOnly: o,
|
|
159
159
|
isInvalid: d
|
|
160
160
|
}, E));
|
|
161
|
-
}, Ce = ({ className: e }) => /* @__PURE__ */ t.createElement(
|
|
161
|
+
}, Ce = ({ className: e }) => /* @__PURE__ */ t.createElement(H, {
|
|
162
162
|
datePart: i.YEAR,
|
|
163
163
|
className: e
|
|
164
164
|
}), Me = ({ className: e }) => {
|
|
165
|
-
const { id: a, hidePlaceholder: r } = D(), { inputId: o } = g(i.YEAR), { isFirstPart: s } = N(i.YEAR), { t: c } = P(), l =
|
|
166
|
-
return
|
|
165
|
+
const { id: a, hidePlaceholder: r } = D(), { inputId: o } = g(i.YEAR), { isFirstPart: s } = N(i.YEAR), { t: c } = P(), l = j(null), d = r ? void 0 : c("field.date.placeholder.year");
|
|
166
|
+
return x(() => {
|
|
167
167
|
var m;
|
|
168
168
|
s && ((m = l.current) == null || m.focus());
|
|
169
169
|
}, a), /* @__PURE__ */ t.createElement(z, {
|
|
@@ -185,7 +185,7 @@ n.Year = C;
|
|
|
185
185
|
n.Description = ce;
|
|
186
186
|
n.Error = ie;
|
|
187
187
|
function g(e) {
|
|
188
|
-
const { inputId: a } =
|
|
188
|
+
const { inputId: a } = U();
|
|
189
189
|
return _(() => {
|
|
190
190
|
const r = e.toLowerCase();
|
|
191
191
|
return {
|
|
@@ -198,19 +198,19 @@ function g(e) {
|
|
|
198
198
|
]);
|
|
199
199
|
}
|
|
200
200
|
function N(e) {
|
|
201
|
-
const { value: a, onChange: r, hasError: o = !1 } = D(), { regionalFormat: s } =
|
|
201
|
+
const { value: a, onChange: r, hasError: o = !1 } = D(), { regionalFormat: s } = A(), c = _(() => Z(a ?? ""), [
|
|
202
202
|
a
|
|
203
203
|
]), l = _(() => ee(o, a ?? ""), [
|
|
204
204
|
a,
|
|
205
205
|
o
|
|
206
|
-
]), d = c[e] || "", m =
|
|
206
|
+
]), d = c[e] || "", m = B((E) => {
|
|
207
207
|
const I = te(E, e, c);
|
|
208
208
|
r(I);
|
|
209
209
|
}, [
|
|
210
210
|
r,
|
|
211
211
|
c,
|
|
212
212
|
e
|
|
213
|
-
]), f = _(() =>
|
|
213
|
+
]), f = _(() => k(s).filter($).map((L) => L.toUpperCase())[0] === e, [
|
|
214
214
|
s,
|
|
215
215
|
e
|
|
216
216
|
]);
|
|
@@ -221,7 +221,7 @@ function N(e) {
|
|
|
221
221
|
isFirstPart: f
|
|
222
222
|
};
|
|
223
223
|
}
|
|
224
|
-
function
|
|
224
|
+
function H({ datePart: e, className: a }) {
|
|
225
225
|
const { inputId: r, labelId: o } = g(e), { t: s } = P(), c = `field.date.label.${e.toLowerCase()}`, l = s(c);
|
|
226
226
|
return /* @__PURE__ */ t.createElement("label", {
|
|
227
227
|
id: o,
|
|
@@ -229,21 +229,21 @@ function V({ datePart: e, className: a }) {
|
|
|
229
229
|
className: a
|
|
230
230
|
}, l);
|
|
231
231
|
}
|
|
232
|
-
const Re = "_fields_12ojb_1",
|
|
232
|
+
const Re = "_fields_12ojb_1", Se = "_month_12ojb_9", Ae = "_day_12ojb_10", Pe = "_year_12ojb_11", Te = "_mobile_12ojb_25", Ye = "_dayInput_12ojb_37", ve = "_yearInput_12ojb_38", Be = "_monthTrigger_12ojb_42", je = "_monthOption_12ojb_62", h = {
|
|
233
233
|
fields: Re,
|
|
234
|
-
month:
|
|
235
|
-
day:
|
|
234
|
+
month: Se,
|
|
235
|
+
day: Ae,
|
|
236
236
|
year: Pe,
|
|
237
237
|
mobile: Te,
|
|
238
238
|
dayInput: Ye,
|
|
239
239
|
yearInput: ve,
|
|
240
|
-
monthTrigger:
|
|
241
|
-
monthOption:
|
|
242
|
-
},
|
|
240
|
+
monthTrigger: Be,
|
|
241
|
+
monthOption: je
|
|
242
|
+
}, xe = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(X, {
|
|
243
243
|
content: e,
|
|
244
244
|
locale: a
|
|
245
245
|
}), nt = () => {
|
|
246
|
-
const { isMobile: e } =
|
|
246
|
+
const { isMobile: e } = A(), a = w(h.dayInput), r = w(h.yearInput);
|
|
247
247
|
return /* @__PURE__ */ t.createElement(n, {
|
|
248
248
|
className: b(h.fields, {
|
|
249
249
|
[h.mobile]: e
|
|
@@ -280,7 +280,7 @@ const Re = "_fields_12ojb_1", Ae = "_month_12ojb_9", Se = "_day_12ojb_10", Pe =
|
|
|
280
280
|
className: b(ye, p.error)
|
|
281
281
|
}, /* @__PURE__ */ t.createElement(be, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
282
282
|
className: b(ge, p.description)
|
|
283
|
-
},
|
|
283
|
+
}, xe));
|
|
284
284
|
};
|
|
285
285
|
export {
|
|
286
286
|
nt as D
|