@wix/form-elements 1.158.0 → 1.160.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-m5-FH9kU.js → appointment-rac-BmHu56e5.js} +63 -63
- package/dist/component/{bookings-address-rac-VtG7wH0l.js → bookings-address-rac-DY9l2g0h.js} +1 -1
- package/dist/component/{bookings-email-rac-C8T3aTQH.js → bookings-email-rac-B5vNSOsS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-BlhIWWNj.js → bookings-first-name-rac-CJiefCNz.js} +1 -1
- package/dist/component/{bookings-header-rac-adwR7PKJ.js → bookings-header-rac-BFu7Ko5w.js} +1 -1
- package/dist/component/{bookings-last-name-rac-z5z1GJQL.js → bookings-last-name-rac-DegMM13h.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DMgVxy8J.js → bookings-login-bar-rac-DrA-5tBH.js} +7 -7
- package/dist/component/{bookings-phone-rac-DS7ffO6T.js → bookings-phone-rac-DsaeqxCI.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BNWI0o60.js → bookings-rich-text-rac-jRHiwqi8.js} +1 -1
- package/dist/component/{checkbox-field-rac-CUKZ9NHF.js → checkbox-field-rac-CyoBb6Yf.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-Didam2ZD.js → checkbox-group-field-headless-Bv1gU3oL.js} +54 -54
- package/dist/component/{checkbox-group-field-rac-C3WCeVA8.js → checkbox-group-field-rac-DasArcdV.js} +6 -6
- package/dist/component/{checkbox-group-rac-Bkq-wm7_.js → checkbox-group-rac-CzmufV1U.js} +1 -1
- package/dist/component/{checkbox-rac-66ga9Lph.js → checkbox-rac-6C7XoUoZ.js} +1 -1
- package/dist/component/{contacts-address-rac-DSOk97te.js → contacts-address-rac-BZobbFtz.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-1qguKm9O.js → contacts-birthdate-rac-DIzf41DS.js} +1 -1
- package/dist/component/{contacts-company-rac-Chefzmw3.js → contacts-company-rac-BiBDO28r.js} +1 -1
- package/dist/component/{contacts-email-rac-DG6eAnz2.js → contacts-email-rac-5mqokCSD.js} +1 -1
- package/dist/component/{contacts-first-name-rac-tSGE0w5w.js → contacts-first-name-rac-BXe3_Nz5.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BjZWfbM5.js → contacts-last-name-rac-Cfqgh7u1.js} +1 -1
- package/dist/component/{contacts-phone-rac-jfGNKLoZ.js → contacts-phone-rac-cmLUWnAc.js} +1 -1
- package/dist/component/{contacts-position-rac-kv8I-m_Q.js → contacts-position-rac-DTyvklfN.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-BkUG0AMs.js → contacts-subscribe-rac-D-ZEX1A3.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BtFrK_Ci.js → contacts-tax-id-rac-B4NYJwWt.js} +1 -1
- package/dist/component/{date-availability-_A9DS6za.js → date-availability-Dach9aRC.js} +1 -1
- package/dist/component/date-input-field-rac-B72mHcya.js +309 -0
- package/dist/component/{date-input-rac-CpseQkV4.js → date-input-rac-CYix11gT.js} +1 -1
- package/dist/component/{date-picker-field-rac-B4gjhxG6.js → date-picker-field-rac-B8pvtPir.js} +86 -86
- package/dist/component/{date-picker-rac-DDJfUDCM.js → date-picker-rac-D6cR0zH9.js} +1 -1
- package/dist/component/date-time-input-field-rac-B7Y3Yf5l.js +441 -0
- package/dist/component/{date-time-input-rac-BkvcyU3H.js → date-time-input-rac-DMN-noQX.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-UWDhIjU-.js → dext-checkbox-group-rac-Kq0GnteP.js} +2 -2
- package/dist/component/{dext-checkbox-rac-q9UJnqsC.js → dext-checkbox-rac-BY9GZ4n1.js} +1 -1
- package/dist/component/{dext-date-picker-rac-C164FDSF.js → dext-date-picker-rac-CXArIddp.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BvbnfRYU.js → dext-date-time-input-rac-B39TtxGq.js} +1 -1
- package/dist/component/{dext-dropdown-rac-z0xU1mRO.js → dext-dropdown-rac-C3y0G8cS.js} +1 -1
- package/dist/component/{dext-email-rac-BkiWpfNw.js → dext-email-rac-BIg3cq7Q.js} +1 -1
- package/dist/component/{dext-number-input-rac-DeQWO-RK.js → dext-number-input-rac-27sHJ7yN.js} +1 -1
- package/dist/component/{dext-phone-rac-CGlVpadW.js → dext-phone-rac-CcohoFQp.js} +1 -1
- package/dist/component/dext-radio-group-rac-eead3Gve.js +18 -0
- package/dist/component/{dext-rating-input-rac-ibIctxU_.js → dext-rating-input-rac-B_E6OcBr.js} +1 -1
- package/dist/component/{dext-tags-rac-snCgM6u0.js → dext-tags-rac-Yd9aAtnF.js} +2 -2
- package/dist/component/{dext-text-area-rac-BHVs8ixR.js → dext-text-area-rac-CMACri2C.js} +1 -1
- package/dist/component/{dext-text-input-rac-DGI747Od.js → dext-text-input-rac-sNjSCfQ-.js} +1 -1
- package/dist/component/{dext-url-input-rac-CpO2VDPE.js → dext-url-input-rac-DwhbzJty.js} +1 -1
- package/dist/component/{donation-rac-Ck6HkRcW.js → donation-rac-BVAN3kMk.js} +90 -90
- package/dist/component/{dropdown-field-rac-e5MjWn5B.js → dropdown-field-rac-DdoGigWx.js} +14 -14
- package/dist/component/{dropdown-rac-B2jprC8G.js → dropdown-rac-CRkt5w47.js} +1 -1
- package/dist/component/{ecom-address-rac-D0stOqRv.js → ecom-address-rac-C36hFHW0.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BRzaQKx3.js → ecom-subscription-checkbox-rac-BKfQ348w.js} +2 -2
- package/dist/component/{email-input-field-rac-0UIjNipg.js → email-input-field-rac-MOaISYxa.js} +59 -59
- package/dist/component/{events-repeater-rac-BBQZzP7U.js → events-repeater-rac-D6p-NgE8.js} +20 -20
- package/dist/component/{events-rsvp-rac-Ck7BXGKy.js → events-rsvp-rac-DVpgN8gm.js} +18 -18
- package/dist/component/{field-error-headless-vApyo-y9.js → field-error-headless-XNWmDH3E.js} +4 -4
- package/dist/component/{field-label-headless-C8-ShLxy.js → field-label-headless-CORRAJGt.js} +4 -4
- package/dist/component/{file-upload-rac-BzWJOM6C.js → file-upload-rac-DRMr7E4b.js} +89 -89
- package/dist/component/{fixed-payment-rac-C4_xI103.js → fixed-payment-rac-BUXzNex9.js} +18 -18
- package/dist/component/{form-D7ulDPh1.js → form-DSpx-AO8.js} +785 -728
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BnBbhsOZ.js → header-field-rac-CiDXlNsa.js} +6 -6
- package/dist/component/{header-rac-CEWayr6b.js → header-rac-B5Rg-h8u.js} +1 -1
- package/dist/component/{image-choice-rac-DTZrz6oP.js → image-choice-rac-CtoA_KDp.js} +44 -44
- package/dist/component/{index-CKtw7kvn.js → index-Bz7ZhQsF.js} +53 -53
- package/dist/component/{index-DBbgIHYT.js → index-CwruESwc.js} +5 -5
- package/dist/component/{isObjectLike-BHfPE26c.js → isObjectLike-C5dHxHP0.js} +11 -11
- package/dist/component/multiline-address-field-rac-Z-qF366L.js +1664 -0
- package/dist/component/{multiline-address-rac-YQj_QROS.js → multiline-address-rac-CJIHTMw5.js} +1 -1
- package/dist/component/{number-input-field-rac-A7xM2c6F.js → number-input-field-rac-D4vf6I6N.js} +29 -29
- package/dist/component/{number-input-rac-DeDatLY5.js → number-input-rac-B2jW6JUQ.js} +1 -1
- package/dist/component/{password-rac-7Si7JHee.js → password-rac-DGRZ17Jl.js} +29 -29
- package/dist/component/{payment-input-rac-D4JKZl-5.js → payment-input-rac-BtD-tAKv.js} +27 -27
- package/dist/component/phone-input-field-rac-KD4-APhr.js +512 -0
- package/dist/component/{phone-rac-Y2mWnseb.js → phone-rac-Cw2yccgg.js} +1 -1
- package/dist/component/{product-list-rac-CYUcNqf3.js → product-list-rac-XbzTDdbp.js} +33 -33
- package/dist/component/{quiz-radio-group-rac-f3O7fksW.js → quiz-radio-group-rac-BDw_mAw5.js} +1 -1
- package/dist/component/{radio-button-module-classes-BgVUqcvD.js → radio-button-module-classes-CFGf0Hzh.js} +23 -23
- package/dist/component/{radio-group-field-rac-DrOiyk5C.js → radio-group-field-rac-CXN7tyVu.js} +6 -6
- package/dist/component/{radio-group-rac-Btt_bz_K.js → radio-group-rac-COHzqjBh.js} +1 -1
- package/dist/component/{rating-input-field-rac-CwN7wyaw.js → rating-input-field-rac-DCXNZgf1.js} +37 -37
- package/dist/component/{rating-input-rac-sTy0SV3L.js → rating-input-rac-DwQt9ML7.js} +1 -1
- package/dist/component/{rich-content-rac.module-C11w9mXa.js → rich-content-rac.module-B7rPwNns.js} +8 -8
- package/dist/component/{rich-text-field-rac-kGwuDtNs.js → rich-text-field-rac-DlER7NRD.js} +4 -4
- package/dist/component/{rich-text-rac-T4ic2hrA.js → rich-text-rac-CjicsHA7.js} +1 -1
- package/dist/component/service-dropdown-rac-B81LC_6_.js +145 -0
- package/dist/component/{services-multi-choice-rac-CLQ4dLxO.js → services-multi-choice-rac-BR6gZeHk.js} +16 -16
- package/dist/component/{signature-rac-DLiFeCNL.js → signature-rac-XFj7Ddtp.js} +69 -69
- package/dist/component/{submit-button-rac-CccO80E1.js → submit-button-rac-Bz7zs_3W.js} +12 -12
- package/dist/component/{tags-field-rac-DaghCGJU.js → tags-field-rac-DWWkNKqc.js} +79 -79
- package/dist/component/{tags-rac-3ly5shW2.js → tags-rac-BXyiQ9i1.js} +1 -1
- package/dist/component/{text-area-field-rac-2-TYC5Lb.js → text-area-field-rac-DsIRYi0d.js} +21 -21
- package/dist/component/{text-area-rac-Bx0pgw80.js → text-area-rac-CF9pDP9d.js} +1 -1
- package/dist/component/{text-input-field-rac-Dyur2Wby.js → text-input-field-rac-BwIDZACz.js} +5 -5
- package/dist/component/{text-input-headless-DZ-Pjpm4.js → text-input-headless-5kQs2_Xu.js} +14 -14
- package/dist/component/{text-input-rac-BuBtJDX_.js → text-input-rac-CRmSuw1k.js} +1 -1
- package/dist/component/{time-input-rac-AlDEpfXZ.js → time-input-rac-BRMNpe51.js} +20 -20
- package/dist/component/{url-input-field-rac-BzP4-8yP.js → url-input-field-rac-CKLS3QDk.js} +17 -17
- package/dist/component/{url-input-rac-DaBXuedf.js → url-input-rac-Dv-kp50D.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-BQi_qE_-.js +116 -0
- package/dist/component/use-dropdown-trigger-class-name-bAK8aHiG.js +96 -0
- package/dist/component/{use-element-state-class-name-DY0UyIQg.js → use-element-state-class-name-rXM_lHug.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C_Wh4Qfc.js → use-hoverable-input-class-name-BnV_uerV.js} +2 -2
- package/dist/component/use-is-forced-open-dropdown-Bp-5Xpmw.js +53 -0
- package/dist/component/{use-service-options-base-DgSaAuGy.js → use-service-options-base-CLeE9-Tx.js} +10 -10
- package/dist/component/use-text-input-class-name-DIKWvfkm.js +6 -0
- package/dist/form.d.ts +8 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-QZUxFX5e.js +0 -303
- package/dist/component/date-time-input-field-rac-DcwKQKHf.js +0 -433
- package/dist/component/dext-radio-group-rac-D8hMWNIQ.js +0 -18
- package/dist/component/dropdown-field-headless-Bv6LrkeA.js +0 -93
- package/dist/component/multiline-address-field-rac-jhcWn4wT.js +0 -1659
- package/dist/component/phone-input-field-rac-GxcQ_Pyl.js +0 -508
- package/dist/component/service-dropdown-rac-BfliE4hs.js +0 -145
- package/dist/component/use-dropdown-trigger-class-name-BKOFwNvc.js +0 -117
- package/dist/component/use-is-forced-open-dropdown-Bw_IFUKt.js +0 -48
- package/dist/component/use-text-input-class-name-DFMQAg_E.js +0 -6
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { CheckboxGroup as
|
|
1
|
+
import o, { useMemo as F, useCallback as $, useRef as P, useState as W, useEffect as z } from "react";
|
|
2
|
+
import { CheckboxGroup as A, CheckboxField as J, CheckboxButton as M, TextField as j, Input as K } from "react-aria-components";
|
|
3
3
|
import { debounce as Q } from "ts-debounce";
|
|
4
|
-
import {
|
|
5
|
-
import { f as I, a as
|
|
6
|
-
import { D as Z, E as ee } from "./field-error-headless-
|
|
7
|
-
import { L as te } from "./field-label-headless-
|
|
4
|
+
import { bz as B, bw as U, bJ as X, bB as Y } from "./form-DSpx-AO8.js";
|
|
5
|
+
import { f as I, a as k } from "./find-child-C60k4CxG.js";
|
|
6
|
+
import { D as Z, E as ee } from "./field-error-headless-XNWmDH3E.js";
|
|
7
|
+
import { L as te } from "./field-label-headless-CORRAJGt.js";
|
|
8
8
|
import { F as ae } from "./fieldset-headless-CD3fds9J.js";
|
|
9
9
|
import { S as ne } from "./selection-indicator-XQ8MYHUQ.js";
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
return e ||
|
|
13
|
-
},
|
|
10
|
+
const R = "Other", le = (e, t) => e.some((r) => !t.includes(r)), N = (e, t) => e.length > 0 && le(e, t), se = (e, t) => {
|
|
11
|
+
const r = t == null ? void 0 : t("add-other.default-other-option-label");
|
|
12
|
+
return e || r || R;
|
|
13
|
+
}, q = (e, t) => {
|
|
14
14
|
const a = t ? t.length + 2 : 0;
|
|
15
15
|
return (e.find((s) => s.startsWith(`${t}: `)) || "").slice(a);
|
|
16
16
|
}, S = (e) => e.map((t) => t.value ?? t.label), v = ({ children: e, className: t }) => {
|
|
17
|
-
const
|
|
17
|
+
const r = B(), { id: a, value: n, onChange: s, disabled: d, required: p, onBlur: f, onFocus: m, hasError: c, FieldLayout: i } = r, { inputId: h, labelId: u, ariaDescribedBy: L } = U(), E = I(e, v.Label), g = I(e, v.Options), C = I(e, v.Description), l = I(e, v.Error), O = F(() => n || [], [
|
|
18
18
|
n
|
|
19
19
|
]), V = $((b) => {
|
|
20
20
|
s == null || s(b);
|
|
21
21
|
}, [
|
|
22
22
|
s
|
|
23
23
|
]);
|
|
24
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ o.createElement(i, {
|
|
25
25
|
fieldId: a,
|
|
26
26
|
renderLabel: () => E,
|
|
27
|
-
renderInput: () => /* @__PURE__ */
|
|
27
|
+
renderInput: () => /* @__PURE__ */ o.createElement(ae, {
|
|
28
28
|
id: h,
|
|
29
29
|
ariaLabelledBy: u,
|
|
30
30
|
ariaDescribedBy: L,
|
|
31
31
|
required: p,
|
|
32
32
|
onBlur: f,
|
|
33
33
|
onFocus: m
|
|
34
|
-
}, /* @__PURE__ */
|
|
34
|
+
}, /* @__PURE__ */ o.createElement(A, {
|
|
35
35
|
className: t,
|
|
36
36
|
"aria-labelledby": u,
|
|
37
37
|
value: O,
|
|
@@ -40,44 +40,44 @@ const B = "Other", le = (e, t) => e.some((o) => !t.includes(o)), N = (e, t) => e
|
|
|
40
40
|
isRequired: p,
|
|
41
41
|
isInvalid: c
|
|
42
42
|
}, g)),
|
|
43
|
-
renderDescription: () => /* @__PURE__ */
|
|
43
|
+
renderDescription: () => /* @__PURE__ */ o.createElement(o.Fragment, null, l, C)
|
|
44
44
|
});
|
|
45
45
|
}, _ = ({ children: e, className: t }) => {
|
|
46
|
-
const
|
|
47
|
-
return /* @__PURE__ */
|
|
46
|
+
const r = B(), { id: a, options: n, addOther: s, addOtherLabel: d, numberOfColumns: p } = r, { t: f } = X(), m = I(e, _.Option), c = se(d, f);
|
|
47
|
+
return /* @__PURE__ */ o.createElement("div", {
|
|
48
48
|
className: t,
|
|
49
49
|
"data-columns": p
|
|
50
50
|
}, n == null ? void 0 : n.map((i, h) => {
|
|
51
51
|
const u = i.value ?? i.label;
|
|
52
|
-
return
|
|
52
|
+
return k(m, {
|
|
53
53
|
key: i.id || i.label,
|
|
54
54
|
value: u,
|
|
55
55
|
label: i.label,
|
|
56
56
|
isFirst: h === 0,
|
|
57
57
|
fieldId: a
|
|
58
58
|
});
|
|
59
|
-
}), s &&
|
|
60
|
-
key:
|
|
61
|
-
value:
|
|
59
|
+
}), s && k(m, {
|
|
60
|
+
key: R,
|
|
61
|
+
value: R,
|
|
62
62
|
label: c,
|
|
63
63
|
isOther: !0
|
|
64
64
|
}));
|
|
65
|
-
},
|
|
66
|
-
const { label:
|
|
67
|
-
return /* @__PURE__ */
|
|
65
|
+
}, re = ({ className: e, ...t }) => {
|
|
66
|
+
const { label: r } = t;
|
|
67
|
+
return /* @__PURE__ */ o.createElement("span", {
|
|
68
68
|
className: e
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
const { value: a, label: n, isFirst: s = !1, isOther: d = !1, fieldId: p } =
|
|
69
|
+
}, r);
|
|
70
|
+
}, y = ({ children: e, className: t, ...r }) => {
|
|
71
|
+
const { value: a, label: n, isFirst: s = !1, isOther: d = !1, fieldId: p } = r, f = B(), { value: m, onChange: c, disabled: i, readOnly: h, hasError: u, options: L } = f, E = P(null);
|
|
72
72
|
Y(() => {
|
|
73
73
|
var b;
|
|
74
74
|
s && ((b = E.current) == null || b.focus({
|
|
75
75
|
preventScroll: !0
|
|
76
76
|
}));
|
|
77
77
|
}, p);
|
|
78
|
-
const g = I(e,
|
|
78
|
+
const g = I(e, y.Label), C = I(e, y.Input), l = F(() => m || [], [
|
|
79
79
|
m
|
|
80
|
-
]), O =
|
|
80
|
+
]), O = F(() => d ? l.find((b) => b === n || b.startsWith(`${n}: `)) || n : a, [
|
|
81
81
|
d,
|
|
82
82
|
l,
|
|
83
83
|
n,
|
|
@@ -85,11 +85,11 @@ const B = "Other", le = (e, t) => e.some((o) => !t.includes(o)), N = (e, t) => e
|
|
|
85
85
|
]), V = $((b) => {
|
|
86
86
|
if (!d)
|
|
87
87
|
return;
|
|
88
|
-
const D = S(L || []), x = l.filter((
|
|
88
|
+
const D = S(L || []), x = l.filter((H) => D.includes(H)), G = b ? [
|
|
89
89
|
...x,
|
|
90
90
|
n
|
|
91
91
|
] : x;
|
|
92
|
-
c == null || c(
|
|
92
|
+
c == null || c(G);
|
|
93
93
|
}, [
|
|
94
94
|
d,
|
|
95
95
|
n,
|
|
@@ -97,30 +97,30 @@ const B = "Other", le = (e, t) => e.some((o) => !t.includes(o)), N = (e, t) => e
|
|
|
97
97
|
L,
|
|
98
98
|
l
|
|
99
99
|
]);
|
|
100
|
-
return /* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ o.createElement(J, {
|
|
101
101
|
value: O,
|
|
102
102
|
onChange: d ? V : void 0,
|
|
103
103
|
isDisabled: i,
|
|
104
104
|
isReadOnly: h,
|
|
105
105
|
isInvalid: u
|
|
106
|
-
}, /* @__PURE__ */
|
|
106
|
+
}, /* @__PURE__ */ o.createElement(M, {
|
|
107
107
|
ref: E,
|
|
108
108
|
className: t,
|
|
109
109
|
"data-hook": `checkbox-${n}`
|
|
110
|
-
}, ({ isSelected: b, isHovered: D, isFocused: x }) => /* @__PURE__ */
|
|
110
|
+
}, ({ isSelected: b, isHovered: D, isFocused: x }) => /* @__PURE__ */ o.createElement(o.Fragment, null, k(C, {
|
|
111
111
|
isSelected: b,
|
|
112
112
|
isHovered: D,
|
|
113
113
|
isFocused: x
|
|
114
|
-
}),
|
|
114
|
+
}), k(g, {
|
|
115
115
|
label: n
|
|
116
116
|
}))));
|
|
117
117
|
};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
const { value:
|
|
118
|
+
y.Label = re;
|
|
119
|
+
y.Input = ne;
|
|
120
|
+
const T = ({ children: e, ...t }) => {
|
|
121
|
+
const { value: r, label: a, isFirst: n = !1, isOther: s = !1, fieldId: d } = t, p = B(), { value: f, onChange: m, options: c, addOtherPlaceholder: i, otherInputCharacterLimit: h, disabled: u, readOnly: L, hasError: E } = p, g = I(e, y), C = I(e, w), l = F(() => f || [], [
|
|
122
122
|
f
|
|
123
|
-
]), O =
|
|
123
|
+
]), O = F(() => {
|
|
124
124
|
if (!s)
|
|
125
125
|
return !1;
|
|
126
126
|
const V = S(c || []);
|
|
@@ -130,13 +130,13 @@ const q = ({ children: e, ...t }) => {
|
|
|
130
130
|
l,
|
|
131
131
|
c
|
|
132
132
|
]);
|
|
133
|
-
return /* @__PURE__ */
|
|
134
|
-
value:
|
|
133
|
+
return /* @__PURE__ */ o.createElement(o.Fragment, null, k(g, {
|
|
134
|
+
value: r,
|
|
135
135
|
label: a,
|
|
136
136
|
isFirst: n,
|
|
137
137
|
isOther: s,
|
|
138
138
|
fieldId: d
|
|
139
|
-
}), s && O &&
|
|
139
|
+
}), s && O && k(C, {
|
|
140
140
|
fieldValue: l,
|
|
141
141
|
onChange: m,
|
|
142
142
|
label: a,
|
|
@@ -149,20 +149,20 @@ const q = ({ children: e, ...t }) => {
|
|
|
149
149
|
addOtherLabel: a,
|
|
150
150
|
options: c
|
|
151
151
|
}));
|
|
152
|
-
},
|
|
153
|
-
const { fieldValue: a, onChange: n, label: s, placeholder: d, maxLength: p, disabled: f, readOnly: m, hasError: c, ariaLabel: i, addOtherLabel: h, options: u } =
|
|
152
|
+
}, w = ({ className: e, inputClassName: t, ...r }) => {
|
|
153
|
+
const { fieldValue: a, onChange: n, label: s, placeholder: d, maxLength: p, disabled: f, readOnly: m, hasError: c, ariaLabel: i, addOtherLabel: h, options: u } = r, [L, E] = W(() => {
|
|
154
154
|
const l = S(u || []);
|
|
155
|
-
return N(a, l) ?
|
|
155
|
+
return N(a, l) ? q(a, h) : "";
|
|
156
156
|
});
|
|
157
|
-
|
|
157
|
+
z(() => {
|
|
158
158
|
const l = S(u || []), O = N(a, l);
|
|
159
|
-
E(O ?
|
|
159
|
+
E(O ? q(a, h) : "");
|
|
160
160
|
}, [
|
|
161
161
|
a,
|
|
162
162
|
u,
|
|
163
163
|
h
|
|
164
164
|
]);
|
|
165
|
-
const g =
|
|
165
|
+
const g = F(() => Q((l) => {
|
|
166
166
|
const O = S(u || []), V = a.filter((x) => O.includes(x)), b = l ? `${h}: ${l}` : s, D = [
|
|
167
167
|
...V,
|
|
168
168
|
b
|
|
@@ -179,7 +179,7 @@ const q = ({ children: e, ...t }) => {
|
|
|
179
179
|
}, [
|
|
180
180
|
g
|
|
181
181
|
]);
|
|
182
|
-
return /* @__PURE__ */
|
|
182
|
+
return /* @__PURE__ */ o.createElement(j, {
|
|
183
183
|
"aria-label": i,
|
|
184
184
|
value: L,
|
|
185
185
|
onChange: C,
|
|
@@ -187,7 +187,7 @@ const q = ({ children: e, ...t }) => {
|
|
|
187
187
|
isReadOnly: m,
|
|
188
188
|
isInvalid: c,
|
|
189
189
|
className: e
|
|
190
|
-
}, /* @__PURE__ */
|
|
190
|
+
}, /* @__PURE__ */ o.createElement(K, {
|
|
191
191
|
className: t,
|
|
192
192
|
placeholder: d,
|
|
193
193
|
maxLength: p,
|
|
@@ -196,9 +196,9 @@ const q = ({ children: e, ...t }) => {
|
|
|
196
196
|
};
|
|
197
197
|
v.Label = te;
|
|
198
198
|
v.Options = _;
|
|
199
|
-
_.Option =
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
_.Option = T;
|
|
200
|
+
T.Checkbox = y;
|
|
201
|
+
T.OtherInput = w;
|
|
202
202
|
v.Description = Z;
|
|
203
203
|
v.Error = ee;
|
|
204
204
|
export {
|
package/dist/component/{checkbox-group-field-rac-C3WCeVA8.js → checkbox-group-field-rac-DasArcdV.js}
RENAMED
|
@@ -1,22 +1,22 @@
|
|
|
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-Bv1gU3oL.js";
|
|
5
5
|
import { E as n } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { C as c } from "./checkbox-indicator-module-classes-akWZsZNn.js";
|
|
7
7
|
import { s } from "./field-rac.module-DP0lkkEv.js";
|
|
8
|
-
import {
|
|
8
|
+
import { V as i, ab as E, o as p, q as C, L as O, z as _, p as L } from "./form-DSpx-AO8.js";
|
|
9
9
|
import { o as l } from "./options-rac.module-_THNq6Qq.js";
|
|
10
|
-
import { u as I } from "./use-element-state-class-name-
|
|
11
|
-
import { u as
|
|
10
|
+
import { u as I } from "./use-element-state-class-name-rXM_lHug.js";
|
|
11
|
+
import { u as R } from "./use-text-input-class-name-DIKWvfkm.js";
|
|
12
12
|
const u = ({ content: o, locale: r }) => /* @__PURE__ */ e.createElement(m, {
|
|
13
13
|
content: o,
|
|
14
14
|
locale: r
|
|
15
15
|
}), k = () => {
|
|
16
16
|
const o = I({
|
|
17
|
-
globalClasses:
|
|
17
|
+
globalClasses: L,
|
|
18
18
|
moduleClasses: c
|
|
19
|
-
}), r =
|
|
19
|
+
}), r = R();
|
|
20
20
|
return /* @__PURE__ */ e.createElement(t, null, /* @__PURE__ */ e.createElement(t.Label, {
|
|
21
21
|
className: a(i, s.label)
|
|
22
22
|
}, /* @__PURE__ */ e.createElement(t.Label.Required, {
|