@wix/form-elements 1.166.0 → 1.167.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-BXpWILhi.js → appointment-rac-BbXyKTd7.js} +72 -72
- package/dist/component/{bookings-address-rac-Cf--TgsR.js → bookings-address-rac-VJkR_U9L.js} +1 -1
- package/dist/component/{bookings-email-rac-BtB8owOl.js → bookings-email-rac-_EupwXpQ.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CBFDjB_k.js → bookings-first-name-rac-DTZixHYj.js} +1 -1
- package/dist/component/{bookings-header-rac-CrJORcuL.js → bookings-header-rac-BKbKTv5g.js} +1 -1
- package/dist/component/{bookings-last-name-rac-erG4ldFt.js → bookings-last-name-rac-BDy860-C.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-Di4qLQUH.js → bookings-login-bar-rac-DgNP-YNZ.js} +5 -5
- package/dist/component/{bookings-phone-rac-DdM48Obh.js → bookings-phone-rac-B_I6n96b.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-Cl8zOiU1.js → bookings-rich-text-rac-prYPbIiz.js} +1 -1
- package/dist/component/{checkbox-field-rac-CzIDF6aj.js → checkbox-field-rac-C-4PXuxG.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-B8tsQCwV.js → checkbox-group-field-headless-D16bAcaq.js} +35 -35
- package/dist/component/{checkbox-group-field-rac-h02K8CPA.js → checkbox-group-field-rac-GUQ5dO_s.js} +4 -4
- package/dist/component/{checkbox-group-rac-GfebLnuS.js → checkbox-group-rac-Bl6xL5-H.js} +1 -1
- package/dist/component/{checkbox-rac-Dn24U4oG.js → checkbox-rac-Blg0KVyP.js} +1 -1
- package/dist/component/{contacts-address-rac-CtVtIwOV.js → contacts-address-rac-BfOhCAj8.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-CK2odpbJ.js → contacts-birthdate-rac-DYBvDh62.js} +1 -1
- package/dist/component/{contacts-company-rac-ue8vAn9A.js → contacts-company-rac-DIJr7zjA.js} +1 -1
- package/dist/component/{contacts-email-rac-lleErjYl.js → contacts-email-rac-DjmqELhC.js} +1 -1
- package/dist/component/{contacts-first-name-rac-D5wtz4Z1.js → contacts-first-name-rac-DGNll7gw.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Cj9GKWBY.js → contacts-last-name-rac-BJ8AZYQN.js} +1 -1
- package/dist/component/{contacts-phone-rac-BP6unckw.js → contacts-phone-rac-BC-QtpEN.js} +1 -1
- package/dist/component/{contacts-position-rac-XjUdZglr.js → contacts-position-rac-BQia__74.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-Dnpbgw5C.js → contacts-subscribe-rac-CTFptz01.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-pNFMOZl6.js → contacts-tax-id-rac-Cy72Jouc.js} +1 -1
- package/dist/component/{date-availability-BRA7k6ep.js → date-availability-BC6updcS.js} +1 -1
- package/dist/component/{date-input-field-rac-B15XH-D_.js → date-input-field-rac-b_T1yf8D.js} +38 -38
- package/dist/component/{date-input-rac-B7XvsFeB.js → date-input-rac-KkRyWRP_.js} +1 -1
- package/dist/component/{date-picker-field-rac-BNgKcgVi.js → date-picker-field-rac-BLWVJbTJ.js} +6 -6
- package/dist/component/{date-picker-rac-P54cHP86.js → date-picker-rac-DKCQza7v.js} +1 -1
- package/dist/component/{date-time-input-field-rac-Dt-jUznP.js → date-time-input-field-rac-CZxZW6fz.js} +45 -45
- package/dist/component/{date-time-input-rac-DHmOLCvg.js → date-time-input-rac-DQ-iBwmr.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-Bo2ZRcJc.js → dext-checkbox-group-rac-kp1Jbwt-.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BdA2i9PR.js → dext-checkbox-rac-CBm9cRUz.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BME9ZDFy.js → dext-date-picker-rac-DsVKWsRy.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-owEU8r5-.js → dext-date-time-input-rac-CO26-8Qo.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BAeN43fo.js → dext-dropdown-rac-eRzu2C-y.js} +1 -1
- package/dist/component/{dext-email-rac-D7HBfCis.js → dext-email-rac-DDrZzE_G.js} +1 -1
- package/dist/component/{dext-number-input-rac-DEB2ji5S.js → dext-number-input-rac-Dj7sInLk.js} +1 -1
- package/dist/component/{dext-phone-rac-TOfFCmhD.js → dext-phone-rac-g8M77F7m.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DGsQLres.js → dext-radio-group-rac-BjhygC0R.js} +2 -2
- package/dist/component/{dext-rating-input-rac-CFcRQeE7.js → dext-rating-input-rac-BraNjvyA.js} +1 -1
- package/dist/component/{dext-tags-rac-CGsaKVfb.js → dext-tags-rac-B5mAIuDi.js} +2 -2
- package/dist/component/{dext-text-area-rac-BqbLXOdt.js → dext-text-area-rac-D_YBnaWi.js} +1 -1
- package/dist/component/{dext-text-input-rac-CpXfQV53.js → dext-text-input-rac-BzeWH1jv.js} +1 -1
- package/dist/component/{dext-url-input-rac-Bbm3_OG9.js → dext-url-input-rac-Cn0h_vx3.js} +1 -1
- package/dist/component/{donation-rac-DvBAOz6H.js → donation-rac-CQRdHxWh.js} +46 -46
- package/dist/component/{dropdown-field-rac-BW0UDoBO.js → dropdown-field-rac-C7LL0W5Z.js} +3 -3
- package/dist/component/{dropdown-rac-B6ZD6Qgb.js → dropdown-rac-Nb2VyJ0x.js} +1 -1
- package/dist/component/{ecom-address-rac-Dnv9Yswd.js → ecom-address-rac-_c2YIIwg.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BVqvUwn4.js → ecom-subscription-checkbox-rac-Bma7TAVj.js} +2 -2
- package/dist/component/{email-input-field-rac-CuaMcfZR.js → email-input-field-rac-2E2tEaS5.js} +47 -47
- package/dist/component/events-repeater-rac-COWHYBFD.js +280 -0
- package/dist/component/{events-rsvp-rac-D4hSrIsE.js → events-rsvp-rac-CXp8j19Y.js} +3 -3
- package/dist/component/{field-error-headless-NGaTm3dF.js → field-error-headless-S-ugOQQX.js} +7 -7
- package/dist/component/{field-label-headless-Bx1UjEcp.js → field-label-headless-_n4I0_tX.js} +14 -14
- package/dist/component/{file-upload-rac-oOnemmUg.js → file-upload-rac-DCH_iwDg.js} +79 -79
- package/dist/component/{fixed-payment-rac-C9YkIvQO.js → fixed-payment-rac-CYkKJUfM.js} +14 -14
- package/dist/component/{form-sH9m0ReT.js → form-jK8ezTss.js} +1110 -1109
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-N5Oclne_.js → header-field-rac-DnbjI6W5.js} +6 -6
- package/dist/component/{header-rac-CTmSJdoY.js → header-rac-DKUICrni.js} +1 -1
- package/dist/component/{image-choice-rac-BYZ61yof.js → image-choice-rac-B_9ponST.js} +4 -4
- package/dist/component/{index-B56GTN_5.js → index-BxdMzOvN.js} +68 -68
- package/dist/component/{index-SHZx7XzS.js → index-ZYnsxY-a.js} +2 -2
- package/dist/component/{isObjectLike-BFpR7Q-o.js → isObjectLike-BW-9QEQl.js} +9 -9
- package/dist/component/{multiline-address-field-rac-DvMyN2gF.js → multiline-address-field-rac-k-P0ijWG.js} +40 -40
- package/dist/component/{multiline-address-rac-Cfv0QzzV.js → multiline-address-rac-Bbn9mNDa.js} +1 -1
- package/dist/component/{number-input-field-rac-CWQw7p2k.js → number-input-field-rac--lom-B_X.js} +7 -7
- package/dist/component/{number-input-rac-DJ2Nh9Vm.js → number-input-rac-Bhbd6T9S.js} +1 -1
- package/dist/component/{password-rac-ayoa5FQV.js → password-rac-BV_uTHb3.js} +14 -14
- package/dist/component/{payment-input-rac-CBjP_xjz.js → payment-input-rac-cawyGN_t.js} +28 -28
- package/dist/component/{phone-input-field-rac-BWOEiUK7.js → phone-input-field-rac-CsElHRto.js} +67 -67
- package/dist/component/{phone-rac-Dp7FouV3.js → phone-rac-XrHN5Nko.js} +1 -1
- package/dist/component/{product-list-rac-D_EoPXl-.js → product-list-rac-cxv_xz7K.js} +30 -30
- package/dist/component/{quiz-radio-group-rac-RWM0riuU.js → quiz-radio-group-rac-DGaxOPE1.js} +1 -1
- package/dist/component/{radio-button-module-classes-nK-xhmxh.js → radio-button-module-classes-Xv2Jn01x.js} +21 -21
- package/dist/component/{radio-group-field-rac-Cc-pvwZn.js → radio-group-field-rac-DgGqgTql.js} +4 -4
- package/dist/component/{radio-group-rac-xvesuLSn.js → radio-group-rac-Bh0E-oe1.js} +1 -1
- package/dist/component/{rating-input-field-rac-BgMRUXQy.js → rating-input-field-rac-C3YLV971.js} +10 -10
- package/dist/component/{rating-input-rac-CeZtJR2S.js → rating-input-rac-CfcC5EUh.js} +1 -1
- package/dist/component/{rich-content-rac.module-Cv7PIbmM.js → rich-content-rac.module-DUjzLGtX.js} +5 -5
- package/dist/component/{rich-text-field-rac-CmbNBe2u.js → rich-text-field-rac-BmguoJhk.js} +5 -5
- package/dist/component/{rich-text-rac-9hwPCQXl.js → rich-text-rac-BWhHcq25.js} +1 -1
- package/dist/component/{service-dropdown-rac-2Wjgmo75.js → service-dropdown-rac-C5oX-ql7.js} +30 -30
- package/dist/component/{services-multi-choice-rac-cZ7elBhc.js → services-multi-choice-rac-C1fem9NB.js} +12 -12
- package/dist/component/{signature-rac-BfE2328G.js → signature-rac-BtHqiWj1.js} +62 -62
- package/dist/component/{submit-button-rac-oYO7pska.js → submit-button-rac-OYeKJFF8.js} +39 -39
- package/dist/component/{tags-field-rac-B-_LzCFU.js → tags-field-rac-kA2RSijL.js} +37 -37
- package/dist/component/{tags-rac-D5bRM462.js → tags-rac-B_2qCZGu.js} +1 -1
- package/dist/component/{text-area-field-rac-fwtICvjX.js → text-area-field-rac-DeO609Mv.js} +17 -17
- package/dist/component/{text-area-rac-C4EkhfB5.js → text-area-rac-BAQFBOZd.js} +1 -1
- package/dist/component/{text-input-field-rac-CxZYUtxX.js → text-input-field-rac-CCcKwuLZ.js} +3 -3
- package/dist/component/{text-input-headless-DK5wBGBb.js → text-input-headless-D8-jkaYm.js} +8 -8
- package/dist/component/{text-input-rac-FS49SxCK.js → text-input-rac-BVcgjj8g.js} +1 -1
- package/dist/component/{time-input-rac-CDUVS7kp.js → time-input-rac-BYctyHgU.js} +11 -11
- package/dist/component/{url-input-field-rac-B2ypvh7T.js → url-input-field-rac-COC9qgcs.js} +23 -23
- package/dist/component/{url-input-rac-DbJx2T1R.js → url-input-rac-BZXLh0Ej.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-0ZlT4g7h.js → use-dropdown-option-class-name-BTltqRl1.js} +2 -2
- package/dist/component/use-dropdown-trigger-class-name-BjJZfl3i.js +98 -0
- package/dist/component/{use-element-state-class-name-DCAoZgWT.js → use-element-state-class-name-CkT6Ga8t.js} +3 -3
- package/dist/component/{use-hoverable-input-class-name-BvP8fzTQ.js → use-hoverable-input-class-name-BkoSr6tr.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-B-eR29aQ.js → use-is-forced-open-dropdown-fo_NCnSk.js} +1 -1
- package/dist/component/{use-service-options-base-BF_peAsS.js → use-service-options-base-Wp8RZ4Z8.js} +1 -1
- package/dist/component/use-text-input-class-name-DS7i03Gk.js +6 -0
- package/package.json +2 -2
- package/dist/component/events-repeater-rac-CNsh8NRh.js +0 -271
- package/dist/component/use-dropdown-trigger-class-name-PItHRYWo.js +0 -96
- package/dist/component/use-text-input-class-name-CQf8yep5.js +0 -6
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import o, { useMemo as
|
|
1
|
+
import o, { useMemo as x, useCallback as $, useRef as w, useState as A, useEffect as W } 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 {
|
|
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 { bD as N, bA as U, bN as X, bF as Y } from "./form-jK8ezTss.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-S-ugOQQX.js";
|
|
7
|
+
import { L as te } from "./field-label-headless-_n4I0_tX.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
|
|
10
|
+
const R = "Other", le = (e, t) => e.some((r) => !t.includes(r)), B = (e, t) => e.length > 0 && le(e, t), se = (e, t) => {
|
|
11
11
|
const r = t == null ? void 0 : t("add-other.default-other-option-label");
|
|
12
|
-
return e || r ||
|
|
12
|
+
return e || r || R;
|
|
13
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 r =
|
|
17
|
+
const r = N(), { 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 = x(() => n || [], [
|
|
18
18
|
n
|
|
19
19
|
]), V = $((b) => {
|
|
20
20
|
s == null || s(b);
|
|
@@ -43,22 +43,22 @@ const B = "Other", le = (e, t) => e.some((r) => !t.includes(r)), N = (e, t) => e
|
|
|
43
43
|
renderDescription: () => /* @__PURE__ */ o.createElement(o.Fragment, null, l, C)
|
|
44
44
|
});
|
|
45
45
|
}, _ = ({ children: e, className: t }) => {
|
|
46
|
-
const r =
|
|
46
|
+
const r = N(), { id: a, options: n, addOther: s, addOtherLabel: d, numberOfColumns: p } = r, { t: f } = X(), m = I(e, _.Option), c = se(d, f);
|
|
47
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
|
}));
|
|
@@ -67,17 +67,17 @@ const B = "Other", le = (e, t) => e.some((r) => !t.includes(r)), N = (e, t) => e
|
|
|
67
67
|
return /* @__PURE__ */ o.createElement("span", {
|
|
68
68
|
className: e
|
|
69
69
|
}, r);
|
|
70
|
-
},
|
|
71
|
-
const { value: a, label: n, isFirst: s = !1, isOther: d = !1, fieldId: p } = r, f =
|
|
70
|
+
}, y = ({ children: e, className: t, ...r }) => {
|
|
71
|
+
const { value: a, label: n, isFirst: s = !1, isOther: d = !1, fieldId: p } = r, f = N(), { 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, y.Label), C = I(e, y.Input), l = x(() => m || [], [
|
|
79
79
|
m
|
|
80
|
-
]), O =
|
|
80
|
+
]), O = x(() => d ? l.find((b) => b === n || b.startsWith(`${n}: `)) || n : a, [
|
|
81
81
|
d,
|
|
82
82
|
l,
|
|
83
83
|
n,
|
|
@@ -85,10 +85,10 @@ const B = "Other", le = (e, t) => e.some((r) => !t.includes(r)), N = (e, t) => e
|
|
|
85
85
|
]), V = $((b) => {
|
|
86
86
|
if (!d)
|
|
87
87
|
return;
|
|
88
|
-
const D = S(L || []),
|
|
89
|
-
...
|
|
88
|
+
const D = S(L || []), F = l.filter((P) => D.includes(P)), H = b ? [
|
|
89
|
+
...F,
|
|
90
90
|
n
|
|
91
|
-
] :
|
|
91
|
+
] : F;
|
|
92
92
|
c == null || c(H);
|
|
93
93
|
}, [
|
|
94
94
|
d,
|
|
@@ -107,36 +107,36 @@ const B = "Other", le = (e, t) => e.some((r) => !t.includes(r)), N = (e, t) => e
|
|
|
107
107
|
ref: E,
|
|
108
108
|
className: t,
|
|
109
109
|
"data-hook": `checkbox-${n}`
|
|
110
|
-
}, ({ isSelected: b, isHovered: D, isFocused:
|
|
110
|
+
}, ({ isSelected: b, isHovered: D, isFocused: F }) => /* @__PURE__ */ o.createElement(o.Fragment, null, k(C, {
|
|
111
111
|
isSelected: b,
|
|
112
112
|
isHovered: D,
|
|
113
|
-
isFocused:
|
|
114
|
-
}),
|
|
113
|
+
isFocused: F
|
|
114
|
+
}), k(g, {
|
|
115
115
|
label: n
|
|
116
116
|
}))));
|
|
117
117
|
};
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
y.Label = re;
|
|
119
|
+
y.Input = ne;
|
|
120
120
|
const T = ({ children: e, ...t }) => {
|
|
121
|
-
const { value: r, label: a, isFirst: n = !1, isOther: s = !1, fieldId: d } = t, p =
|
|
121
|
+
const { value: r, label: a, isFirst: n = !1, isOther: s = !1, fieldId: d } = t, p = N(), { value: f, onChange: m, options: c, addOtherPlaceholder: i, otherInputCharacterLimit: h, disabled: u, readOnly: L, hasError: E } = p, g = I(e, y), C = I(e, G), l = x(() => f || [], [
|
|
122
122
|
f
|
|
123
|
-
]), O =
|
|
123
|
+
]), O = x(() => {
|
|
124
124
|
if (!s)
|
|
125
125
|
return !1;
|
|
126
126
|
const V = S(c || []);
|
|
127
|
-
return
|
|
127
|
+
return B(l, V);
|
|
128
128
|
}, [
|
|
129
129
|
s,
|
|
130
130
|
l,
|
|
131
131
|
c
|
|
132
132
|
]);
|
|
133
|
-
return /* @__PURE__ */ o.createElement(o.Fragment, null,
|
|
133
|
+
return /* @__PURE__ */ o.createElement(o.Fragment, null, k(g, {
|
|
134
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,
|
|
@@ -152,18 +152,18 @@ const T = ({ children: e, ...t }) => {
|
|
|
152
152
|
}, G = ({ className: e, inputClassName: t, ...r }) => {
|
|
153
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] = A(() => {
|
|
154
154
|
const l = S(u || []);
|
|
155
|
-
return
|
|
155
|
+
return B(a, l) ? q(a, h) : "";
|
|
156
156
|
});
|
|
157
157
|
W(() => {
|
|
158
|
-
const l = S(u || []), O =
|
|
158
|
+
const l = S(u || []), O = B(a, l);
|
|
159
159
|
E(O ? q(a, h) : "");
|
|
160
160
|
}, [
|
|
161
161
|
a,
|
|
162
162
|
u,
|
|
163
163
|
h
|
|
164
164
|
]);
|
|
165
|
-
const g =
|
|
166
|
-
const O = S(u || []), V = a.filter((
|
|
165
|
+
const g = x(() => Q((l) => {
|
|
166
|
+
const O = S(u || []), V = a.filter((F) => O.includes(F)), b = l ? `${h}: ${l}` : s, D = [
|
|
167
167
|
...V,
|
|
168
168
|
b
|
|
169
169
|
];
|
|
@@ -197,7 +197,7 @@ const T = ({ children: e, ...t }) => {
|
|
|
197
197
|
v.Label = te;
|
|
198
198
|
v.Options = _;
|
|
199
199
|
_.Option = T;
|
|
200
|
-
T.Checkbox =
|
|
200
|
+
T.Checkbox = y;
|
|
201
201
|
T.OtherInput = G;
|
|
202
202
|
v.Description = Z;
|
|
203
203
|
v.Error = ee;
|
package/dist/component/{checkbox-group-field-rac-h02K8CPA.js → checkbox-group-field-rac-GUQ5dO_s.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-D16bAcaq.js";
|
|
5
5
|
import { E as n } from "./error-icon-hZxQ6DEy.js";
|
|
6
6
|
import { C as c } from "./checkbox-indicator-module-classes-DUTR4mcg.js";
|
|
7
7
|
import { s } from "./field-rac.module-ts2t4WUO.js";
|
|
8
|
-
import { U as i,
|
|
8
|
+
import { U as i, af as E, p, r as C, K as O, G as _, q as I } from "./form-jK8ezTss.js";
|
|
9
9
|
import { o as l } from "./options-rac.module-_THNq6Qq.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-CkT6Ga8t.js";
|
|
11
|
+
import { u as R } from "./use-text-input-class-name-DS7i03Gk.js";
|
|
12
12
|
const u = ({ content: r, locale: o }) => /* @__PURE__ */ e.createElement(m, {
|
|
13
13
|
content: r,
|
|
14
14
|
locale: o
|
package/dist/component/{date-input-field-rac-B15XH-D_.js → date-input-field-rac-b_T1yf8D.js}
RENAMED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { RicosViewer as ne } from "@wix/ricos/viewer";
|
|
2
2
|
import D from "classnames";
|
|
3
|
-
import t, { useMemo as N, useState as
|
|
3
|
+
import t, { useMemo as N, useState as $, useCallback as x, useRef as H } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as re } from "react-aria";
|
|
5
5
|
import { ListBoxItem as oe, Select as se, TextField as z, SelectValue as le, Input as K } from "react-aria-components";
|
|
6
|
-
import {
|
|
6
|
+
import { bD as I, bA as W, bv as w, b8 as X, bl as G, aX as o, bN as R, b2 as ce, b9 as ie, bs as me, bF as U, u as de, U as ue, af as pe, w as Y, H as Ee, K as be, G as fe, v as De, x as q } from "./form-jK8ezTss.js";
|
|
7
7
|
import { f as p, a as B } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { g as
|
|
9
|
-
import { D as
|
|
10
|
-
import { L as ge } from "./field-label-headless-
|
|
8
|
+
import { g as _e } from "./helpers-HmkkXrh2.js";
|
|
9
|
+
import { D as Ie, E as Oe } from "./field-error-headless-S-ugOQQX.js";
|
|
10
|
+
import { L as ge } from "./field-label-headless-_n4I0_tX.js";
|
|
11
11
|
import { F as he } from "./fieldset-headless-CD3fds9J.js";
|
|
12
12
|
import { N as Ne, E as ye, S as Le } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
-
import { a as Ce } from "./use-is-forced-open-dropdown-
|
|
14
|
-
import { V as Fe, u as Ae } from "./use-dropdown-option-class-name-
|
|
13
|
+
import { a as Ce } from "./use-is-forced-open-dropdown-fo_NCnSk.js";
|
|
14
|
+
import { V as Fe, u as Ae } from "./use-dropdown-option-class-name-BTltqRl1.js";
|
|
15
15
|
import { C as Te } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as Re } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as Me } from "./custom-focus-class-_483Pkwp.js";
|
|
18
18
|
import { s as b } from "./field-rac.module-ts2t4WUO.js";
|
|
19
|
-
import { u as v } from "./use-hoverable-input-class-name-
|
|
19
|
+
import { u as v } from "./use-hoverable-input-class-name-BkoSr6tr.js";
|
|
20
20
|
const Pe = {
|
|
21
21
|
[o.MONTH]: "bday-month",
|
|
22
22
|
[o.DAY]: "bday-day",
|
|
23
23
|
[o.YEAR]: "bday-year"
|
|
24
24
|
}, V = (e, a) => e === "bday" ? Pe[a] : void 0, n = ({ children: e, className: a }) => {
|
|
25
|
-
const { id: r, required: s, onBlur: l, onFocus: c, FieldLayout: m } =
|
|
25
|
+
const { id: r, required: s, onBlur: l, onFocus: c, FieldLayout: m } = I(), { inputId: i, labelId: d, ariaDescribedBy: u } = W(), { regionalFormat: E } = w(), f = N(() => X(E).filter(G).map((S) => S.toUpperCase()), [
|
|
26
26
|
E
|
|
27
27
|
]), L = p(e, n.Label), M = p(e, n.Description), P = p(e, n.Error), O = {
|
|
28
28
|
[o.MONTH]: p(e, n.Month),
|
|
@@ -46,12 +46,12 @@ const Pe = {
|
|
|
46
46
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, P, M)
|
|
47
47
|
});
|
|
48
48
|
}, g = ({ children: e, className: a }) => {
|
|
49
|
-
const { id: r, disabled: s, readOnly: l, showDateLabels: c, hidePlaceholder: m, autoComplete: i } =
|
|
49
|
+
const { id: r, disabled: s, readOnly: l, showDateLabels: c, hidePlaceholder: m, autoComplete: i } = I(), { labelId: d } = h(o.MONTH), { partValue: u, partError: E, onPartChange: f } = y(o.MONTH), { t: L } = R(), [M, P] = $(!1), O = Ce(r), [S, Q] = $(null), j = m ? ye : L("field.date.placeholder.month"), J = x((A) => {
|
|
50
50
|
l || f(typeof A == "string" ? A : "");
|
|
51
51
|
}, [
|
|
52
52
|
f,
|
|
53
53
|
l
|
|
54
|
-
]),
|
|
54
|
+
]), Z = x((A) => {
|
|
55
55
|
P(A && !l);
|
|
56
56
|
}, [
|
|
57
57
|
l
|
|
@@ -60,7 +60,7 @@ const Pe = {
|
|
|
60
60
|
className: a,
|
|
61
61
|
"data-date-field": !0
|
|
62
62
|
}, c ? ee : null, /* @__PURE__ */ t.createElement("div", {
|
|
63
|
-
ref:
|
|
63
|
+
ref: Q,
|
|
64
64
|
style: {
|
|
65
65
|
display: "contents"
|
|
66
66
|
}
|
|
@@ -70,12 +70,12 @@ const Pe = {
|
|
|
70
70
|
autoComplete: V(i, o.MONTH),
|
|
71
71
|
"aria-labelledby": c ? d : void 0,
|
|
72
72
|
value: u || null,
|
|
73
|
-
onChange:
|
|
73
|
+
onChange: J,
|
|
74
74
|
isDisabled: s,
|
|
75
75
|
isInvalid: E,
|
|
76
|
-
placeholder:
|
|
76
|
+
placeholder: j,
|
|
77
77
|
isOpen: O || M,
|
|
78
|
-
onOpenChange: O ? void 0 :
|
|
78
|
+
onOpenChange: O ? void 0 : Z
|
|
79
79
|
}, te, B(ae, {
|
|
80
80
|
isForcedOpen: O
|
|
81
81
|
}))));
|
|
@@ -83,7 +83,7 @@ const Pe = {
|
|
|
83
83
|
datePart: o.MONTH,
|
|
84
84
|
className: e
|
|
85
85
|
}), Ye = ({ children: e, className: a }) => {
|
|
86
|
-
const { id: r, readOnly: s } =
|
|
86
|
+
const { id: r, readOnly: s } = I(), { inputId: l } = h(o.MONTH), { partError: c, isFirstPart: m } = y(o.MONTH), i = H(null);
|
|
87
87
|
return U(() => {
|
|
88
88
|
var d;
|
|
89
89
|
m && ((d = i.current) == null || d.focus({
|
|
@@ -98,7 +98,7 @@ const Pe = {
|
|
|
98
98
|
"data-readonly": s || void 0
|
|
99
99
|
}, /* @__PURE__ */ t.createElement(le, null), e);
|
|
100
100
|
}, T = ({ children: e, className: a, ...r }) => {
|
|
101
|
-
const { isForcedOpen: s } = r, { language: l } = w(), c = N(() =>
|
|
101
|
+
const { isForcedOpen: s } = r, { language: l } = w(), c = N(() => _e(l), [
|
|
102
102
|
l
|
|
103
103
|
]), m = p(e, T.Option) ?? /* @__PURE__ */ t.createElement(T.Option, null);
|
|
104
104
|
return /* @__PURE__ */ t.createElement(Ne, {
|
|
@@ -126,7 +126,7 @@ g.Trigger = Ye;
|
|
|
126
126
|
g.Options = T;
|
|
127
127
|
T.Option = ve;
|
|
128
128
|
const C = ({ children: e, className: a }) => {
|
|
129
|
-
const { disabled: r, readOnly: s, showDateLabels: l } =
|
|
129
|
+
const { disabled: r, readOnly: s, showDateLabels: l } = I(), { labelId: c } = h(o.DAY), { partValue: m, partError: i, onPartChange: d } = y(o.DAY), u = p(e, C.Label), E = p(e, C.Input);
|
|
130
130
|
return /* @__PURE__ */ t.createElement("div", {
|
|
131
131
|
className: a,
|
|
132
132
|
"data-date-field": !0
|
|
@@ -142,7 +142,7 @@ const C = ({ children: e, className: a }) => {
|
|
|
142
142
|
datePart: o.DAY,
|
|
143
143
|
className: e
|
|
144
144
|
}), He = ({ className: e }) => {
|
|
145
|
-
const { id: a, hidePlaceholder: r, autoComplete: s } =
|
|
145
|
+
const { id: a, hidePlaceholder: r, autoComplete: s } = I(), { inputId: l } = h(o.DAY), { isFirstPart: c } = y(o.DAY), { t: m } = R(), i = H(null), d = r ? void 0 : m("field.date.placeholder.day");
|
|
146
146
|
return U(() => {
|
|
147
147
|
var u;
|
|
148
148
|
c && ((u = i.current) == null || u.focus({
|
|
@@ -162,7 +162,7 @@ const C = ({ children: e, className: a }) => {
|
|
|
162
162
|
C.Label = xe;
|
|
163
163
|
C.Input = He;
|
|
164
164
|
const F = ({ children: e, className: a }) => {
|
|
165
|
-
const { disabled: r, readOnly: s, showDateLabels: l } =
|
|
165
|
+
const { disabled: r, readOnly: s, showDateLabels: l } = I(), { labelId: c } = h(o.YEAR), { partValue: m, partError: i, onPartChange: d } = y(o.YEAR), u = p(e, F.Label), E = p(e, F.Input);
|
|
166
166
|
return /* @__PURE__ */ t.createElement("div", {
|
|
167
167
|
className: a,
|
|
168
168
|
"data-date-field": !0
|
|
@@ -178,7 +178,7 @@ const F = ({ children: e, className: a }) => {
|
|
|
178
178
|
datePart: o.YEAR,
|
|
179
179
|
className: e
|
|
180
180
|
}), Ue = ({ className: e }) => {
|
|
181
|
-
const { id: a, hidePlaceholder: r, autoComplete: s } =
|
|
181
|
+
const { id: a, hidePlaceholder: r, autoComplete: s } = I(), { inputId: l } = h(o.YEAR), { isFirstPart: c } = y(o.YEAR), { t: m } = R(), i = H(null), d = r ? void 0 : m("field.date.placeholder.year");
|
|
182
182
|
return U(() => {
|
|
183
183
|
var u;
|
|
184
184
|
c && ((u = i.current) == null || u.focus({
|
|
@@ -201,7 +201,7 @@ n.Label = ge;
|
|
|
201
201
|
n.Month = g;
|
|
202
202
|
n.Day = C;
|
|
203
203
|
n.Year = F;
|
|
204
|
-
n.Description =
|
|
204
|
+
n.Description = Ie;
|
|
205
205
|
n.Error = Oe;
|
|
206
206
|
function h(e) {
|
|
207
207
|
const { inputId: a } = W();
|
|
@@ -217,7 +217,7 @@ function h(e) {
|
|
|
217
217
|
]);
|
|
218
218
|
}
|
|
219
219
|
function y(e) {
|
|
220
|
-
const { value: a, onChange: r, hasError: s = !1 } =
|
|
220
|
+
const { value: a, onChange: r, hasError: s = !1 } = I(), { regionalFormat: l } = w(), c = N(() => ce(a ?? ""), [
|
|
221
221
|
a
|
|
222
222
|
]), m = N(() => ie(s, a ?? ""), [
|
|
223
223
|
a,
|
|
@@ -229,7 +229,7 @@ function y(e) {
|
|
|
229
229
|
r,
|
|
230
230
|
c,
|
|
231
231
|
e
|
|
232
|
-
]), u = N(() =>
|
|
232
|
+
]), u = N(() => X(l).filter(G).map((L) => L.toUpperCase())[0] === e, [
|
|
233
233
|
l,
|
|
234
234
|
e
|
|
235
235
|
]);
|
|
@@ -248,34 +248,34 @@ function k({ datePart: e, className: a }) {
|
|
|
248
248
|
className: a
|
|
249
249
|
}, m);
|
|
250
250
|
}
|
|
251
|
-
const Be = "_fields_b2cgx_1", Ve = "_month_b2cgx_10", ke = "_day_b2cgx_11",
|
|
251
|
+
const Be = "_fields_b2cgx_1", Ve = "_month_b2cgx_10", ke = "_day_b2cgx_11", $e = "_year_b2cgx_12", qe = "_dayInput_b2cgx_28", ze = "_yearInput_b2cgx_29", Ke = "_monthTrigger_b2cgx_33", We = "_monthOption_b2cgx_53", _ = {
|
|
252
252
|
fields: Be,
|
|
253
253
|
month: Ve,
|
|
254
254
|
day: ke,
|
|
255
|
-
year:
|
|
256
|
-
dayInput:
|
|
255
|
+
year: $e,
|
|
256
|
+
dayInput: qe,
|
|
257
257
|
yearInput: ze,
|
|
258
258
|
monthTrigger: Ke,
|
|
259
259
|
monthOption: We
|
|
260
|
-
},
|
|
260
|
+
}, Xe = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ne, {
|
|
261
261
|
content: e,
|
|
262
262
|
locale: a
|
|
263
263
|
}), Et = () => {
|
|
264
264
|
const e = v(De, [
|
|
265
|
-
|
|
266
|
-
]), a = Ae(
|
|
267
|
-
|
|
268
|
-
]), s = v(
|
|
269
|
-
|
|
265
|
+
_.monthTrigger
|
|
266
|
+
]), a = Ae(_.monthOption, Me), r = v(q, [
|
|
267
|
+
_.dayInput
|
|
268
|
+
]), s = v(q, [
|
|
269
|
+
_.yearInput
|
|
270
270
|
]);
|
|
271
271
|
return /* @__PURE__ */ t.createElement(n, {
|
|
272
|
-
className: D(de,
|
|
272
|
+
className: D(de, _.fields)
|
|
273
273
|
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
274
274
|
className: D(ue, b.label)
|
|
275
275
|
}, /* @__PURE__ */ t.createElement(n.Label.Required, {
|
|
276
276
|
className: D(pe, b.requiredMark)
|
|
277
277
|
})), /* @__PURE__ */ t.createElement(n.Month, {
|
|
278
|
-
className:
|
|
278
|
+
className: _.month
|
|
279
279
|
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
280
280
|
className: D(Y, b.label)
|
|
281
281
|
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
@@ -287,13 +287,13 @@ const Be = "_fields_b2cgx_1", Ve = "_month_b2cgx_10", ke = "_day_b2cgx_11", qe =
|
|
|
287
287
|
}, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
|
|
288
288
|
className: a
|
|
289
289
|
}))), /* @__PURE__ */ t.createElement(n.Day, {
|
|
290
|
-
className:
|
|
290
|
+
className: _.day
|
|
291
291
|
}, /* @__PURE__ */ t.createElement(n.Day.Label, {
|
|
292
292
|
className: D(Y, b.label)
|
|
293
293
|
}), /* @__PURE__ */ t.createElement(n.Day.Input, {
|
|
294
294
|
className: r
|
|
295
295
|
})), /* @__PURE__ */ t.createElement(n.Year, {
|
|
296
|
-
className:
|
|
296
|
+
className: _.year
|
|
297
297
|
}, /* @__PURE__ */ t.createElement(n.Year.Label, {
|
|
298
298
|
className: D(Y, b.label)
|
|
299
299
|
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
@@ -302,7 +302,7 @@ const Be = "_fields_b2cgx_1", Ve = "_month_b2cgx_10", ke = "_day_b2cgx_11", qe =
|
|
|
302
302
|
className: D(be, b.error)
|
|
303
303
|
}, /* @__PURE__ */ t.createElement(Re, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
304
304
|
className: D(fe, b.description)
|
|
305
|
-
},
|
|
305
|
+
}, Xe));
|
|
306
306
|
};
|
|
307
307
|
export {
|
|
308
308
|
Et as D
|
package/dist/component/{date-picker-field-rac-BNgKcgVi.js → date-picker-field-rac-BLWVJbTJ.js}
RENAMED
|
@@ -4,19 +4,19 @@ import e, { useState as L, useCallback as k, useContext as ee, useRef as A, useM
|
|
|
4
4
|
import { parseDate as te } from "@internationalized/date";
|
|
5
5
|
import { UNSAFE_PortalProvider as re } from "react-aria";
|
|
6
6
|
import { I18nProvider as ae, DatePicker as ne, DatePickerStateContext as le, Group as oe, DateInput as se, DateSegment as ce, Calendar as ie, CalendarMonthPicker as me, CalendarYearPicker as de, CalendarGrid as ue, Dialog as ge, CalendarCell as Ee, Button as M, Select as x, SelectValue as Y, ListBox as w, ListBoxItem as B } from "react-aria-components";
|
|
7
|
-
import { D as f,
|
|
7
|
+
import { D as f, bD as h, bA as U, bv as F, bF as pe, U as fe, af as De, z as Ce, K as ye, G as Se, y as _e } from "./form-jK8ezTss.js";
|
|
8
8
|
import { g as he, c as P } from "./calendar.module-BMUyMVja.js";
|
|
9
9
|
import { f as E, a as _ } from "./find-child-C60k4CxG.js";
|
|
10
|
-
import { D as Ne, E as Te } from "./field-error-headless-
|
|
11
|
-
import { L as be } from "./field-label-headless-
|
|
10
|
+
import { D as Ne, E as Te } from "./field-error-headless-S-ugOQQX.js";
|
|
11
|
+
import { L as be } from "./field-label-headless-_n4I0_tX.js";
|
|
12
12
|
import { D as ve, N as O, S as V } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
-
import { u as Ie } from "./use-is-forced-open-dropdown-
|
|
14
|
-
import { i as Fe } from "./date-availability-
|
|
13
|
+
import { u as Ie } from "./use-is-forced-open-dropdown-fo_NCnSk.js";
|
|
14
|
+
import { i as Fe } from "./date-availability-BC6updcS.js";
|
|
15
15
|
import { C as I } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as Oe } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as Le } from "./custom-focus-class-_483Pkwp.js";
|
|
18
18
|
import { s as D } from "./field-rac.module-ts2t4WUO.js";
|
|
19
|
-
import { u as Ae } from "./use-hoverable-input-class-name-
|
|
19
|
+
import { u as Ae } from "./use-hoverable-input-class-name-BkoSr6tr.js";
|
|
20
20
|
const Pe = [
|
|
21
21
|
f.SUNDAY,
|
|
22
22
|
f.MONDAY,
|