@wix/form-elements 1.146.0 → 1.147.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-scUix9QX.js → appointment-rac-BG5-bIZU.js} +98 -98
- package/dist/component/{bookings-address-rac-CKemkJOO.js → bookings-address-rac-8e8PqKsp.js} +1 -1
- package/dist/component/{bookings-email-rac-CDqdhPAB.js → bookings-email-rac-CtlnU8ws.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DEy_7Hjb.js → bookings-first-name-rac-CrivNlXM.js} +1 -1
- package/dist/component/{bookings-header-rac-Bl4xy9lB.js → bookings-header-rac-DWDAjfqq.js} +1 -1
- package/dist/component/{bookings-last-name-rac-CsL9xQ1W.js → bookings-last-name-rac-qAthWem2.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DkHYQ4No.js → bookings-login-bar-rac-BNyUDqlM.js} +6 -6
- package/dist/component/{bookings-phone-rac-BoBiFwbV.js → bookings-phone-rac-Tc39XLr7.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DZZnPKWA.js → bookings-rich-text-rac-CPNaPtFK.js} +1 -1
- package/dist/component/{checkbox-field-rac-UgLmJxB-.js → checkbox-field-rac-DEa78Tpf.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-C809nB0Q.js → checkbox-group-field-headless-BxBaMg29.js} +68 -68
- package/dist/component/{checkbox-group-field-rac-u4i4wG21.js → checkbox-group-field-rac-CRRP03Qk.js} +7 -7
- package/dist/component/{checkbox-group-rac-DBAQhSo3.js → checkbox-group-rac-TOofMGl3.js} +1 -1
- package/dist/component/{checkbox-rac-FDQVsI5-.js → checkbox-rac-CHMHr8Ry.js} +1 -1
- package/dist/component/{contacts-address-rac-DnArylPa.js → contacts-address-rac-Bc5yDvTL.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-C19jhGEO.js → contacts-birthdate-rac-Ubtg5ncv.js} +1 -1
- package/dist/component/{contacts-company-rac-Dxs0hs_i.js → contacts-company-rac-BksH9IoV.js} +1 -1
- package/dist/component/{contacts-email-rac-D-H43L8r.js → contacts-email-rac-DDPEtMAm.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DwV5NESk.js → contacts-first-name-rac-DUlCvEdx.js} +1 -1
- package/dist/component/{contacts-last-name-rac-C5v2xurf.js → contacts-last-name-rac-BikqNgUr.js} +1 -1
- package/dist/component/{contacts-phone-rac-D9a5x-xl.js → contacts-phone-rac-B4OEgM_8.js} +1 -1
- package/dist/component/{contacts-position-rac-DfsgOv-k.js → contacts-position-rac-BfybzySV.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-B-Hho0Kb.js → contacts-subscribe-rac-CMHb33v1.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-q6TQkB4b.js → contacts-tax-id-rac-C-qEqwO5.js} +1 -1
- package/dist/component/{date-availability-CMDvf5VU.js → date-availability-DZ3J3LLm.js} +1 -1
- package/dist/component/{date-input-field-rac-C1WLUct3.js → date-input-field-rac-DeL5vuE7.js} +39 -39
- package/dist/component/{date-input-rac-cNQ-nr4D.js → date-input-rac-Di6TQvFf.js} +1 -1
- package/dist/component/{date-picker-field-rac-mx11z-MO.js → date-picker-field-rac-BcdpTkjV.js} +107 -103
- package/dist/component/{date-picker-rac-DeTz17zC.js → date-picker-rac-Brne65gr.js} +1 -1
- package/dist/component/{date-time-input-field-rac-feQ2E1eU.js → date-time-input-field-rac-BtQfAxRp.js} +49 -49
- package/dist/component/{date-time-input-rac-G0s0xP4v.js → date-time-input-rac-DM_HXiqV.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BcTN1nJb.js → dext-checkbox-group-rac-WTVwhGG0.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DX0TOrCO.js → dext-checkbox-rac-BR5YwmLQ.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CpDp11oa.js → dext-date-picker-rac-DvDuRGYi.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BRvO8izU.js → dext-date-time-input-rac-C6RgbaVv.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DGZ4Yi_X.js → dext-dropdown-rac-CWjSdcZx.js} +1 -1
- package/dist/component/{dext-email-rac-B9YCFHB4.js → dext-email-rac-D-C1gVTq.js} +1 -1
- package/dist/component/{dext-number-input-rac-D890dBZf.js → dext-number-input-rac-YKzZS2ZG.js} +1 -1
- package/dist/component/{dext-phone-rac-BAQftbXo.js → dext-phone-rac-CFZlEH2a.js} +1 -1
- package/dist/component/dext-radio-group-rac-DiH0wIIl.js +18 -0
- package/dist/component/{dext-rating-input-rac-BqQKVaHo.js → dext-rating-input-rac-D0s-i0qO.js} +1 -1
- package/dist/component/{dext-tags-rac-zxxKcNUe.js → dext-tags-rac-Br48OQQ5.js} +2 -2
- package/dist/component/{dext-text-area-rac-Ctp9SwPg.js → dext-text-area-rac-6jG8gJ7i.js} +1 -1
- package/dist/component/{dext-text-input-rac-c_QMlyjr.js → dext-text-input-rac-FAJTCXuf.js} +1 -1
- package/dist/component/{dext-url-input-rac-96pv15aC.js → dext-url-input-rac-BoMP8sQB.js} +1 -1
- package/dist/component/{donation-rac-GEWKSLJY.js → donation-rac-DNi4p-v5.js} +69 -69
- package/dist/component/{dropdown-field-headless-C3OxMhLE.js → dropdown-field-headless-7SCC-xOC.js} +27 -27
- package/dist/component/{dropdown-field-rac-CCXfBmSc.js → dropdown-field-rac-CMzZh6J6.js} +8 -9
- package/dist/component/{dropdown-rac-CR7hswXE.js → dropdown-rac-qeugpHXY.js} +1 -1
- package/dist/component/{ecom-address-rac-khMuxEFD.js → ecom-address-rac-D8b_L5md.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CAi_AHpb.js → ecom-subscription-checkbox-rac-BnAuR9La.js} +5 -5
- package/dist/component/{email-input-field-rac-B83mY2lg.js → email-input-field-rac-CunXRyc5.js} +62 -62
- package/dist/component/{events-repeater-rac-ClEwXgmb.js → events-repeater-rac-DMjyIOkB.js} +17 -17
- package/dist/component/{events-rsvp-rac-BJ5q2SVR.js → events-rsvp-rac-BsuDPq2K.js} +8 -8
- package/dist/component/{field-error-headless-CsYQCsiT.js → field-error-headless-E8WjFr_n.js} +6 -6
- package/dist/component/{field-label-headless-Yg_1PMSg.js → field-label-headless-BakLOu5E.js} +15 -15
- package/dist/component/{file-upload-rac-DJsuI_lR.js → file-upload-rac-Clu_c--0.js} +43 -43
- package/dist/component/{fixed-payment-rac-BMFe9wxU.js → fixed-payment-rac-CzAXxsb-.js} +12 -12
- package/dist/component/{form-Bed4Kfz8.js → form-DHAKwnLt.js} +311 -305
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +2 -2
- package/dist/component/{header-field-rac-DPQTrOSZ.js → header-field-rac-CwmVpz3r.js} +4 -4
- package/dist/component/{header-rac-CzXsuLmE.js → header-rac-ahkGRjSy.js} +1 -1
- package/dist/component/{image-choice-rac-R_4pbOSr.js → image-choice-rac-BwxkkdUu.js} +17 -17
- package/dist/component/{index-qSZCe_WC.js → index-BFi_n6B7.js} +2 -2
- package/dist/component/{index-DZxHlvzt.js → index-BQf23zZi.js} +91 -91
- package/dist/component/{isObjectLike-B-a5uaU-.js → isObjectLike-DHcMRYYH.js} +15 -15
- package/dist/component/{multiline-address-field-rac-rv4IZZy_.js → multiline-address-field-rac-C6xaqNOk.js} +60 -60
- package/dist/component/{multiline-address-rac-DZ7cYtgn.js → multiline-address-rac-DF4TFuDx.js} +1 -1
- package/dist/component/{number-input-field-rac-CL9iXKIf.js → number-input-field-rac-uVJ3SBv2.js} +27 -27
- package/dist/component/{number-input-rac-BeGn6qJR.js → number-input-rac-D6ERhrSM.js} +1 -1
- package/dist/component/{password-rac-DfvhdsKG.js → password-rac-CAiC0ZKl.js} +23 -23
- package/dist/component/{payment-input-rac-BmMfi5rf.js → payment-input-rac-Bu25xvby.js} +26 -26
- package/dist/component/{phone-input-field-rac-DW0a1pXs.js → phone-input-field-rac-32qUvCsC.js} +45 -45
- package/dist/component/{phone-rac-quZjJ08H.js → phone-rac-mNrpj30q.js} +1 -1
- package/dist/component/{product-list-rac-Ci0KB7sN.js → product-list-rac-zHdM9rHw.js} +53 -53
- package/dist/component/{quiz-radio-group-rac--UUtGx2t.js → quiz-radio-group-rac-BaSlT8w3.js} +1 -1
- package/dist/component/{radio-button-module-classes-CqdBGknT.js → radio-button-module-classes-BdWjkBlX.js} +9 -9
- package/dist/component/{radio-group-field-rac-w8fHpFKJ.js → radio-group-field-rac-DI0UgTBr.js} +12 -12
- package/dist/component/{radio-group-rac-jO8aghii.js → radio-group-rac-D2ESG8J4.js} +1 -1
- package/dist/component/{rating-input-field-rac-BRc2PtqE.js → rating-input-field-rac-BYT2XqOK.js} +26 -26
- package/dist/component/{rating-input-rac-D9zs06xR.js → rating-input-rac-D-5CmVAX.js} +1 -1
- package/dist/component/{rich-content-rac.module-Cv3ZmD00.js → rich-content-rac.module-Dp9Advo9.js} +8 -8
- package/dist/component/{rich-text-field-rac-BmWuIfA8.js → rich-text-field-rac-COEUwoXQ.js} +4 -4
- package/dist/component/{rich-text-rac-BnqnrvB1.js → rich-text-rac-CQZLjBQ0.js} +1 -1
- package/dist/component/{service-dropdown-rac-Cl81KfJU.js → service-dropdown-rac-BTtJVFv8.js} +44 -45
- package/dist/component/{services-multi-choice-rac-sQ1NF9hY.js → services-multi-choice-rac-hbY3g0Kb.js} +11 -11
- package/dist/component/{signature-rac-Huairu7V.js → signature-rac-CTCNclwL.js} +67 -67
- package/dist/component/{submit-button-rac-Dpg7N0TG.js → submit-button-rac-kKGeVgsG.js} +25 -25
- package/dist/component/{tags-field-rac-BQ8TEqXH.js → tags-field-rac-CVf7oQr_.js} +35 -35
- package/dist/component/{tags-rac-CFOmyCCc.js → tags-rac-DiX1_nTT.js} +1 -1
- package/dist/component/{text-area-field-rac-DNiMa7d3.js → text-area-field-rac-IhBNXiDl.js} +22 -22
- package/dist/component/{text-area-rac-kLFe-KbZ.js → text-area-rac-DHevCtFF.js} +1 -1
- package/dist/component/{text-input-field-rac-CqENSUUX.js → text-input-field-rac-Da3_wTdh.js} +5 -5
- package/dist/component/{text-input-headless-BdPkEeK2.js → text-input-headless-DcZRRXCp.js} +9 -9
- package/dist/component/{text-input-rac-uYQEfOtE.js → text-input-rac-564LIZ1_.js} +1 -1
- package/dist/component/{time-input-rac-BYoojlJ9.js → time-input-rac-p-Nnsxp_.js} +54 -54
- package/dist/component/{url-input-field-rac-BioH7kuz.js → url-input-field-rac-DjrcpRtm.js} +25 -25
- package/dist/component/{url-input-rac-D2VSSyqW.js → url-input-rac-B3brpyop.js} +1 -1
- package/dist/component/use-dropdown-trigger-class-name-BWTT7ltv.js +117 -0
- package/dist/component/{use-element-state-class-name-oiKCauK-.js → use-element-state-class-name-CUZuhFvZ.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-BW3nCyhG.js → use-hoverable-input-class-name-ugX8-g4E.js} +6 -6
- package/dist/component/use-is-forced-open-dropdown-DUZMvWpk.js +48 -0
- package/dist/component/{use-service-options-base-DXG60hA5.js → use-service-options-base-hqO9Ev38.js} +6 -6
- package/dist/component/use-text-input-class-name-wp9dzpEy.js +6 -0
- package/dist/form.d.ts +5 -0
- package/package.json +2 -2
- package/dist/component/dext-radio-group-rac-CtEjnu_X.js +0 -18
- package/dist/component/use-dropdown-option-class-name-BEmvU-Gg.js +0 -115
- package/dist/component/use-dropdown-trigger-class-name-qj9skLWZ.js +0 -40
- package/dist/component/use-text-input-class-name-BhQFcXYH.js +0 -6
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r, { useMemo as y, useCallback as $, useRef as w, useState as W, useEffect as A } from "react";
|
|
2
2
|
import { CheckboxGroup as M, CheckboxField as j, CheckboxButton as z, TextField as J, Input as K } from "react-aria-components";
|
|
3
3
|
import { debounce as Q } from "ts-debounce";
|
|
4
|
-
import {
|
|
4
|
+
import { bo as R, bl as U, by as X, bq as Y } from "./form-DHAKwnLt.js";
|
|
5
5
|
import { f as I, a as F } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { D as Z, E as ee } from "./field-error-headless-
|
|
7
|
-
import { L as te } from "./field-label-headless-
|
|
8
|
-
import { F as
|
|
9
|
-
import { S as
|
|
10
|
-
const B = "Other", le = (e, t) => e.some((
|
|
11
|
-
const
|
|
12
|
-
return e ||
|
|
13
|
-
},
|
|
14
|
-
const
|
|
15
|
-
return (e.find((s) => s.startsWith(`${t}: `)) || "").slice(
|
|
6
|
+
import { D as Z, E as ee } from "./field-error-headless-E8WjFr_n.js";
|
|
7
|
+
import { L as te } from "./field-label-headless-BakLOu5E.js";
|
|
8
|
+
import { F as ae } from "./fieldset-headless-CD3fds9J.js";
|
|
9
|
+
import { S as ne } from "./selection-indicator-XQ8MYHUQ.js";
|
|
10
|
+
const B = "Other", le = (e, t) => e.some((o) => !t.includes(o)), N = (e, t) => e.length > 0 && le(e, t), se = (e, t) => {
|
|
11
|
+
const o = t == null ? void 0 : t("add-other.default-other-option-label");
|
|
12
|
+
return e || o || B;
|
|
13
|
+
}, T = (e, t) => {
|
|
14
|
+
const a = t ? t.length + 2 : 0;
|
|
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
|
|
18
|
-
|
|
17
|
+
const o = R(), { id: a, value: n, onChange: s, disabled: d, required: p, onBlur: f, onFocus: m, hasError: c, FieldLayout: i } = o, { 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 = y(() => n || [], [
|
|
18
|
+
n
|
|
19
19
|
]), V = $((b) => {
|
|
20
20
|
s == null || s(b);
|
|
21
21
|
}, [
|
|
22
22
|
s
|
|
23
23
|
]);
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
fieldId:
|
|
24
|
+
return /* @__PURE__ */ r.createElement(i, {
|
|
25
|
+
fieldId: a,
|
|
26
26
|
renderLabel: () => E,
|
|
27
|
-
renderInput: () => /* @__PURE__ */
|
|
27
|
+
renderInput: () => /* @__PURE__ */ r.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__ */ r.createElement(M, {
|
|
35
35
|
className: t,
|
|
36
36
|
"aria-labelledby": u,
|
|
37
37
|
value: O,
|
|
@@ -40,21 +40,21 @@ const B = "Other", le = (e, t) => e.some((r) => !t.includes(r)), N = (e, t) => e
|
|
|
40
40
|
isRequired: p,
|
|
41
41
|
isInvalid: c
|
|
42
42
|
}, g)),
|
|
43
|
-
renderDescription: () => /* @__PURE__ */
|
|
43
|
+
renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, l, C)
|
|
44
44
|
});
|
|
45
45
|
}, _ = ({ children: e, className: t }) => {
|
|
46
|
-
const
|
|
47
|
-
return /* @__PURE__ */
|
|
46
|
+
const o = R(), { id: a, options: n, addOther: s, addOtherLabel: d, numberOfColumns: p } = o, { t: f } = X(), m = I(e, _.Option), c = se(d, f);
|
|
47
|
+
return /* @__PURE__ */ r.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
52
|
return F(m, {
|
|
53
53
|
key: i.id || i.label,
|
|
54
54
|
value: u,
|
|
55
55
|
label: i.label,
|
|
56
56
|
isFirst: h === 0,
|
|
57
|
-
fieldId:
|
|
57
|
+
fieldId: a
|
|
58
58
|
});
|
|
59
59
|
}), s && F(m, {
|
|
60
60
|
key: B,
|
|
@@ -62,65 +62,65 @@ const B = "Other", le = (e, t) => e.some((r) => !t.includes(r)), N = (e, t) => e
|
|
|
62
62
|
label: c,
|
|
63
63
|
isOther: !0
|
|
64
64
|
}));
|
|
65
|
-
},
|
|
66
|
-
const { label:
|
|
67
|
-
return /* @__PURE__ */
|
|
65
|
+
}, oe = ({ className: e, ...t }) => {
|
|
66
|
+
const { label: o } = t;
|
|
67
|
+
return /* @__PURE__ */ r.createElement("span", {
|
|
68
68
|
className: e
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
const { value:
|
|
69
|
+
}, o);
|
|
70
|
+
}, k = ({ children: e, className: t, ...o }) => {
|
|
71
|
+
const { value: a, label: n, isFirst: s = !1, isOther: d = !1, fieldId: p } = o, f = R(), { value: m, onChange: c, disabled: i, readOnly: h, hasError: u, options: L } = f, E = w(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, k.Label), C = I(e, k.Input), l = y(() => m || [], [
|
|
79
79
|
m
|
|
80
|
-
]), O =
|
|
80
|
+
]), O = y(() => d ? l.find((b) => b === n || b.startsWith(`${n}: `)) || n : a, [
|
|
81
81
|
d,
|
|
82
82
|
l,
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
n,
|
|
84
|
+
a
|
|
85
85
|
]), V = $((b) => {
|
|
86
86
|
if (!d)
|
|
87
87
|
return;
|
|
88
88
|
const D = S(L || []), x = l.filter((P) => D.includes(P)), H = b ? [
|
|
89
89
|
...x,
|
|
90
|
-
|
|
90
|
+
n
|
|
91
91
|
] : x;
|
|
92
92
|
c == null || c(H);
|
|
93
93
|
}, [
|
|
94
94
|
d,
|
|
95
|
-
|
|
95
|
+
n,
|
|
96
96
|
c,
|
|
97
97
|
L,
|
|
98
98
|
l
|
|
99
99
|
]);
|
|
100
|
-
return /* @__PURE__ */
|
|
100
|
+
return /* @__PURE__ */ r.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__ */ r.createElement(z, {
|
|
107
107
|
ref: E,
|
|
108
108
|
className: t,
|
|
109
|
-
"data-hook": `checkbox-${
|
|
110
|
-
}, ({ isSelected: b, isHovered: D, isFocused: x }) => /* @__PURE__ */
|
|
109
|
+
"data-hook": `checkbox-${n}`
|
|
110
|
+
}, ({ isSelected: b, isHovered: D, isFocused: x }) => /* @__PURE__ */ r.createElement(r.Fragment, null, F(C, {
|
|
111
111
|
isSelected: b,
|
|
112
112
|
isHovered: D,
|
|
113
113
|
isFocused: x
|
|
114
114
|
}), F(g, {
|
|
115
|
-
label:
|
|
115
|
+
label: n
|
|
116
116
|
}))));
|
|
117
117
|
};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
const
|
|
121
|
-
const { value:
|
|
118
|
+
k.Label = oe;
|
|
119
|
+
k.Input = ne;
|
|
120
|
+
const q = ({ children: e, ...t }) => {
|
|
121
|
+
const { value: o, label: a, isFirst: n = !1, isOther: s = !1, fieldId: d } = t, p = R(), { value: f, onChange: m, options: c, addOtherPlaceholder: i, otherInputCharacterLimit: h, disabled: u, readOnly: L, hasError: E } = p, g = I(e, k), C = I(e, G), l = y(() => f || [], [
|
|
122
122
|
f
|
|
123
|
-
]), O =
|
|
123
|
+
]), O = y(() => {
|
|
124
124
|
if (!s)
|
|
125
125
|
return !1;
|
|
126
126
|
const V = S(c || []);
|
|
@@ -130,48 +130,48 @@ const T = ({ children: e, ...t }) => {
|
|
|
130
130
|
l,
|
|
131
131
|
c
|
|
132
132
|
]);
|
|
133
|
-
return /* @__PURE__ */
|
|
134
|
-
value:
|
|
135
|
-
label:
|
|
136
|
-
isFirst:
|
|
133
|
+
return /* @__PURE__ */ r.createElement(r.Fragment, null, F(g, {
|
|
134
|
+
value: o,
|
|
135
|
+
label: a,
|
|
136
|
+
isFirst: n,
|
|
137
137
|
isOther: s,
|
|
138
138
|
fieldId: d
|
|
139
139
|
}), s && O && F(C, {
|
|
140
140
|
fieldValue: l,
|
|
141
141
|
onChange: m,
|
|
142
|
-
label:
|
|
142
|
+
label: a,
|
|
143
143
|
placeholder: i,
|
|
144
144
|
maxLength: h,
|
|
145
145
|
disabled: u,
|
|
146
146
|
readOnly: L,
|
|
147
147
|
hasError: E,
|
|
148
|
-
ariaLabel:
|
|
149
|
-
addOtherLabel:
|
|
148
|
+
ariaLabel: a,
|
|
149
|
+
addOtherLabel: a,
|
|
150
150
|
options: c
|
|
151
151
|
}));
|
|
152
|
-
}, G = ({ className: e, inputClassName: t, ...
|
|
153
|
-
const { fieldValue:
|
|
152
|
+
}, G = ({ className: e, inputClassName: t, ...o }) => {
|
|
153
|
+
const { fieldValue: a, onChange: n, label: s, placeholder: d, maxLength: p, disabled: f, readOnly: m, hasError: c, ariaLabel: i, addOtherLabel: h, options: u } = o, [L, E] = W(() => {
|
|
154
154
|
const l = S(u || []);
|
|
155
|
-
return N(
|
|
155
|
+
return N(a, l) ? T(a, h) : "";
|
|
156
156
|
});
|
|
157
157
|
A(() => {
|
|
158
|
-
const l = S(u || []), O = N(
|
|
159
|
-
E(O ?
|
|
158
|
+
const l = S(u || []), O = N(a, l);
|
|
159
|
+
E(O ? T(a, h) : "");
|
|
160
160
|
}, [
|
|
161
|
-
|
|
161
|
+
a,
|
|
162
162
|
u,
|
|
163
163
|
h
|
|
164
164
|
]);
|
|
165
|
-
const g =
|
|
166
|
-
const O = S(u || []), V =
|
|
165
|
+
const g = y(() => Q((l) => {
|
|
166
|
+
const O = S(u || []), V = a.filter((x) => O.includes(x)), b = l ? `${h}: ${l}` : s, D = [
|
|
167
167
|
...V,
|
|
168
168
|
b
|
|
169
169
|
];
|
|
170
|
-
|
|
170
|
+
n(D);
|
|
171
171
|
}, 500), [
|
|
172
|
-
a,
|
|
173
|
-
u,
|
|
174
172
|
n,
|
|
173
|
+
u,
|
|
174
|
+
a,
|
|
175
175
|
h,
|
|
176
176
|
s
|
|
177
177
|
]), C = $((l) => {
|
|
@@ -179,7 +179,7 @@ const T = ({ children: e, ...t }) => {
|
|
|
179
179
|
}, [
|
|
180
180
|
g
|
|
181
181
|
]);
|
|
182
|
-
return /* @__PURE__ */
|
|
182
|
+
return /* @__PURE__ */ r.createElement(J, {
|
|
183
183
|
"aria-label": i,
|
|
184
184
|
value: L,
|
|
185
185
|
onChange: C,
|
|
@@ -187,7 +187,7 @@ const T = ({ children: e, ...t }) => {
|
|
|
187
187
|
isReadOnly: m,
|
|
188
188
|
isInvalid: c,
|
|
189
189
|
className: e
|
|
190
|
-
}, /* @__PURE__ */
|
|
190
|
+
}, /* @__PURE__ */ r.createElement(K, {
|
|
191
191
|
className: t,
|
|
192
192
|
placeholder: d,
|
|
193
193
|
maxLength: p,
|
|
@@ -196,9 +196,9 @@ const T = ({ children: e, ...t }) => {
|
|
|
196
196
|
};
|
|
197
197
|
v.Label = te;
|
|
198
198
|
v.Options = _;
|
|
199
|
-
_.Option =
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
_.Option = q;
|
|
200
|
+
q.Checkbox = k;
|
|
201
|
+
q.OtherInput = G;
|
|
202
202
|
v.Description = Z;
|
|
203
203
|
v.Error = ee;
|
|
204
204
|
export {
|
package/dist/component/{checkbox-group-field-rac-u4i4wG21.js → checkbox-group-field-rac-CRRP03Qk.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-BxBaMg29.js";
|
|
5
5
|
import { E as n } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { C as c } from "./checkbox-indicator-module-classes-6173wvuW.js";
|
|
7
7
|
import { s } from "./field-rac.module-DfEb7pBp.js";
|
|
8
|
-
import {
|
|
8
|
+
import { S as i, a0 as E, o as p, q as C, H as O, v as _, p as I } from "./form-DHAKwnLt.js";
|
|
9
9
|
import { o as l } from "./options-rac.module-_THNq6Qq.js";
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
10
|
+
import { u as L } from "./use-element-state-class-name-CUZuhFvZ.js";
|
|
11
|
+
import { u as R } from "./use-text-input-class-name-wp9dzpEy.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
|
-
const o =
|
|
17
|
-
globalClasses:
|
|
16
|
+
const o = L({
|
|
17
|
+
globalClasses: I,
|
|
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, {
|
package/dist/component/{date-input-field-rac-C1WLUct3.js → date-input-field-rac-DeL5vuE7.js}
RENAMED
|
@@ -2,29 +2,29 @@ import { RicosViewer as ae } from "@wix/ricos/viewer";
|
|
|
2
2
|
import y from "classnames";
|
|
3
3
|
import t, { useMemo as N, useState as k, useCallback as v, useRef as w } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as ne } from "react-aria";
|
|
5
|
-
import { ListBoxItem as re, Select as oe, TextField as
|
|
6
|
-
import {
|
|
5
|
+
import { ListBoxItem as re, Select as oe, TextField as $, SelectValue as se, Input as z } from "react-aria-components";
|
|
6
|
+
import { bo as h, bl as W, bg as H, aV as K, b6 as Q, aI as o, by as T, aP as le, aW as ce, bd as ie, bq as V, S as M, a0 as me, y as de, H as ue, v as pe } from "./form-DHAKwnLt.js";
|
|
7
7
|
import { f as p, a as B } from "./find-child-C60k4CxG.js";
|
|
8
8
|
import { g as Ee } from "./helpers-HmkkXrh2.js";
|
|
9
|
-
import { D as fe, E as be } from "./field-error-headless-
|
|
10
|
-
import { L as ye } from "./field-label-headless-
|
|
9
|
+
import { D as fe, E as be } from "./field-error-headless-E8WjFr_n.js";
|
|
10
|
+
import { L as ye } from "./field-label-headless-BakLOu5E.js";
|
|
11
11
|
import { F as De } from "./fieldset-headless-CD3fds9J.js";
|
|
12
|
-
import { N as he, E as
|
|
13
|
-
import { a as ge
|
|
14
|
-
import { V as Ce, u as _e } from "./use-dropdown-
|
|
12
|
+
import { N as he, E as Ie, S as Oe } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
+
import { a as ge } from "./use-is-forced-open-dropdown-DUZMvWpk.js";
|
|
14
|
+
import { V as Ne, a as Ce, u as _e } from "./use-dropdown-trigger-class-name-BWTT7ltv.js";
|
|
15
15
|
import { C as Le } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as Fe } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as Re } from "./custom-focus-class-_483Pkwp.js";
|
|
18
18
|
import { s as f } from "./field-rac.module-DfEb7pBp.js";
|
|
19
|
-
import { u as
|
|
19
|
+
import { u as q } from "./use-text-input-class-name-wp9dzpEy.js";
|
|
20
20
|
const Me = {
|
|
21
21
|
[o.MONTH]: "bday-month",
|
|
22
22
|
[o.DAY]: "bday-day",
|
|
23
23
|
[o.YEAR]: "bday-year"
|
|
24
24
|
}, x = (e, a) => e === "bday" ? Me[a] : void 0, n = ({ children: e, className: a }) => {
|
|
25
|
-
const { id: r, required: s, onBlur: l, onFocus: c, FieldLayout: m } = h(), { inputId: i, labelId: d, ariaDescribedBy: u } =
|
|
25
|
+
const { id: r, required: s, onBlur: l, onFocus: c, FieldLayout: m } = h(), { inputId: i, labelId: d, ariaDescribedBy: u } = W(), { regionalFormat: E } = H(), b = N(() => K(E).filter(Q).map((Y) => Y.toUpperCase()), [
|
|
26
26
|
E
|
|
27
|
-
]), _ = p(e, n.Label), P = p(e, n.Description),
|
|
27
|
+
]), _ = p(e, n.Label), P = p(e, n.Description), S = p(e, n.Error), I = {
|
|
28
28
|
[o.MONTH]: p(e, n.Month),
|
|
29
29
|
[o.DAY]: p(e, n.Day),
|
|
30
30
|
[o.YEAR]: p(e, n.Year)
|
|
@@ -42,30 +42,30 @@ const Me = {
|
|
|
42
42
|
onBlur: l,
|
|
43
43
|
onFocus: c,
|
|
44
44
|
className: a
|
|
45
|
-
},
|
|
46
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null,
|
|
45
|
+
}, I[b[0]], I[b[1]], I[b[2]]),
|
|
46
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, S, P)
|
|
47
47
|
});
|
|
48
|
-
},
|
|
49
|
-
const { id: r, disabled: s, readOnly: l, showDateLabels: c, hidePlaceholder: m, autoComplete: i } = h(), { labelId: d } = g(o.MONTH), { partValue: u, partError: E, onPartChange: b } = C(o.MONTH), { t: _ } = T(), [P,
|
|
48
|
+
}, O = ({ children: e, className: a }) => {
|
|
49
|
+
const { id: r, disabled: s, readOnly: l, showDateLabels: c, hidePlaceholder: m, autoComplete: i } = h(), { labelId: d } = g(o.MONTH), { partValue: u, partError: E, onPartChange: b } = C(o.MONTH), { t: _ } = T(), [P, S] = k(!1), I = ge(r), [Y, j] = k(null), G = m ? Ie : _("field.date.placeholder.month"), J = v((R) => {
|
|
50
50
|
l || b(typeof R == "string" ? R : "");
|
|
51
51
|
}, [
|
|
52
52
|
b,
|
|
53
53
|
l
|
|
54
54
|
]), X = v((R) => {
|
|
55
|
-
|
|
55
|
+
S(R && !l);
|
|
56
56
|
}, [
|
|
57
57
|
l
|
|
58
|
-
]), Z = p(e,
|
|
58
|
+
]), Z = p(e, O.Label), ee = p(e, O.Trigger), te = p(e, O.Options);
|
|
59
59
|
return /* @__PURE__ */ t.createElement("div", {
|
|
60
60
|
className: a,
|
|
61
61
|
"data-date-field": !0
|
|
62
62
|
}, c ? Z : null, /* @__PURE__ */ t.createElement("div", {
|
|
63
|
-
ref:
|
|
63
|
+
ref: j,
|
|
64
64
|
style: {
|
|
65
65
|
display: "contents"
|
|
66
66
|
}
|
|
67
67
|
}), /* @__PURE__ */ t.createElement(ne, {
|
|
68
|
-
getContainer: () =>
|
|
68
|
+
getContainer: () => Y
|
|
69
69
|
}, /* @__PURE__ */ t.createElement(oe, {
|
|
70
70
|
autoComplete: x(i, o.MONTH),
|
|
71
71
|
"aria-labelledby": c ? d : void 0,
|
|
@@ -73,11 +73,11 @@ const Me = {
|
|
|
73
73
|
onChange: J,
|
|
74
74
|
isDisabled: s,
|
|
75
75
|
isInvalid: E,
|
|
76
|
-
placeholder:
|
|
77
|
-
isOpen:
|
|
78
|
-
onOpenChange:
|
|
76
|
+
placeholder: G,
|
|
77
|
+
isOpen: I || P,
|
|
78
|
+
onOpenChange: I ? void 0 : X
|
|
79
79
|
}, ee, B(te, {
|
|
80
|
-
isForcedOpen:
|
|
80
|
+
isForcedOpen: I
|
|
81
81
|
}))));
|
|
82
82
|
}, Ae = ({ className: e }) => /* @__PURE__ */ t.createElement(U, {
|
|
83
83
|
datePart: o.MONTH,
|
|
@@ -87,7 +87,7 @@ const Me = {
|
|
|
87
87
|
return V(() => {
|
|
88
88
|
var d;
|
|
89
89
|
m && ((d = i.current) == null || d.focus());
|
|
90
|
-
}, r), /* @__PURE__ */ t.createElement(
|
|
90
|
+
}, r), /* @__PURE__ */ t.createElement(Oe, {
|
|
91
91
|
ref: i,
|
|
92
92
|
id: l,
|
|
93
93
|
className: a,
|
|
@@ -103,7 +103,7 @@ const Me = {
|
|
|
103
103
|
className: a,
|
|
104
104
|
containerPadding: 0,
|
|
105
105
|
offset: 0
|
|
106
|
-
}, /* @__PURE__ */ t.createElement(
|
|
106
|
+
}, /* @__PURE__ */ t.createElement(Ne, {
|
|
107
107
|
isForcedOpen: s,
|
|
108
108
|
autoFocus: s ? !1 : void 0
|
|
109
109
|
}, c.map((i, d) => B(m, {
|
|
@@ -119,16 +119,16 @@ const Me = {
|
|
|
119
119
|
textValue: s
|
|
120
120
|
}, s);
|
|
121
121
|
};
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
122
|
+
O.Label = Ae;
|
|
123
|
+
O.Trigger = Te;
|
|
124
|
+
O.Options = A;
|
|
125
125
|
A.Option = Pe;
|
|
126
126
|
const L = ({ children: e, className: a }) => {
|
|
127
127
|
const { disabled: r, readOnly: s, showDateLabels: l } = h(), { labelId: c } = g(o.DAY), { partValue: m, partError: i, onPartChange: d } = C(o.DAY), u = p(e, L.Label), E = p(e, L.Input);
|
|
128
128
|
return /* @__PURE__ */ t.createElement("div", {
|
|
129
129
|
className: a,
|
|
130
130
|
"data-date-field": !0
|
|
131
|
-
}, l && u, /* @__PURE__ */ t.createElement(
|
|
131
|
+
}, l && u, /* @__PURE__ */ t.createElement($, {
|
|
132
132
|
"aria-labelledby": l ? c : void 0,
|
|
133
133
|
value: m,
|
|
134
134
|
onChange: d,
|
|
@@ -136,10 +136,10 @@ const L = ({ children: e, className: a }) => {
|
|
|
136
136
|
isReadOnly: s,
|
|
137
137
|
isInvalid: i
|
|
138
138
|
}, E));
|
|
139
|
-
},
|
|
139
|
+
}, Se = ({ className: e }) => /* @__PURE__ */ t.createElement(U, {
|
|
140
140
|
datePart: o.DAY,
|
|
141
141
|
className: e
|
|
142
|
-
}),
|
|
142
|
+
}), Ye = ({ className: e }) => {
|
|
143
143
|
const { id: a, hidePlaceholder: r, autoComplete: s } = h(), { inputId: l } = g(o.DAY), { isFirstPart: c } = C(o.DAY), { t: m } = T(), i = w(null), d = r ? void 0 : m("field.date.placeholder.day");
|
|
144
144
|
return V(() => {
|
|
145
145
|
var u;
|
|
@@ -155,14 +155,14 @@ const L = ({ children: e, className: a }) => {
|
|
|
155
155
|
"data-hook": o.DAY
|
|
156
156
|
});
|
|
157
157
|
};
|
|
158
|
-
L.Label =
|
|
159
|
-
L.Input =
|
|
158
|
+
L.Label = Se;
|
|
159
|
+
L.Input = Ye;
|
|
160
160
|
const F = ({ children: e, className: a }) => {
|
|
161
161
|
const { disabled: r, readOnly: s, showDateLabels: l } = h(), { labelId: c } = g(o.YEAR), { partValue: m, partError: i, onPartChange: d } = C(o.YEAR), u = p(e, F.Label), E = p(e, F.Input);
|
|
162
162
|
return /* @__PURE__ */ t.createElement("div", {
|
|
163
163
|
className: a,
|
|
164
164
|
"data-date-field": !0
|
|
165
|
-
}, l && u, /* @__PURE__ */ t.createElement(
|
|
165
|
+
}, l && u, /* @__PURE__ */ t.createElement($, {
|
|
166
166
|
"aria-labelledby": l ? c : void 0,
|
|
167
167
|
value: m,
|
|
168
168
|
onChange: d,
|
|
@@ -192,13 +192,13 @@ const F = ({ children: e, className: a }) => {
|
|
|
192
192
|
F.Label = ve;
|
|
193
193
|
F.Input = we;
|
|
194
194
|
n.Label = ye;
|
|
195
|
-
n.Month =
|
|
195
|
+
n.Month = O;
|
|
196
196
|
n.Day = L;
|
|
197
197
|
n.Year = F;
|
|
198
198
|
n.Description = fe;
|
|
199
199
|
n.Error = be;
|
|
200
200
|
function g(e) {
|
|
201
|
-
const { inputId: a } =
|
|
201
|
+
const { inputId: a } = W();
|
|
202
202
|
return N(() => {
|
|
203
203
|
const r = e.toLowerCase();
|
|
204
204
|
return {
|
|
@@ -242,20 +242,20 @@ function U({ datePart: e, className: a }) {
|
|
|
242
242
|
className: a
|
|
243
243
|
}, m);
|
|
244
244
|
}
|
|
245
|
-
const He = "_fields_fw9my_1", Ve = "_month_fw9my_10", Be = "_day_fw9my_11", xe = "_year_fw9my_12", Ue = "_dayInput_fw9my_28", ke = "_yearInput_fw9my_29",
|
|
245
|
+
const He = "_fields_fw9my_1", Ve = "_month_fw9my_10", Be = "_day_fw9my_11", xe = "_year_fw9my_12", Ue = "_dayInput_fw9my_28", ke = "_yearInput_fw9my_29", qe = "_monthTrigger_fw9my_33", $e = "_monthOption_fw9my_53", D = {
|
|
246
246
|
fields: He,
|
|
247
247
|
month: Ve,
|
|
248
248
|
day: Be,
|
|
249
249
|
year: xe,
|
|
250
250
|
dayInput: Ue,
|
|
251
251
|
yearInput: ke,
|
|
252
|
-
monthTrigger:
|
|
253
|
-
monthOption:
|
|
252
|
+
monthTrigger: qe,
|
|
253
|
+
monthOption: $e
|
|
254
254
|
}, ze = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ae, {
|
|
255
255
|
content: e,
|
|
256
256
|
locale: a
|
|
257
257
|
}), dt = () => {
|
|
258
|
-
const e =
|
|
258
|
+
const e = Ce(D.monthTrigger), a = _e(D.monthOption, Re), r = q(D.dayInput), s = q(D.yearInput);
|
|
259
259
|
return /* @__PURE__ */ t.createElement(n, {
|
|
260
260
|
className: D.fields
|
|
261
261
|
}, /* @__PURE__ */ t.createElement(n.Label, {
|