@wix/form-elements 1.159.0 → 1.161.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-CpiyUOXo.js → appointment-rac-BubC8I9X.js} +388 -381
- package/dist/component/{bookings-address-rac-BBEUV1t7.js → bookings-address-rac-BbwvVs86.js} +1 -1
- package/dist/component/{bookings-email-rac-DdfoeLFV.js → bookings-email-rac-C2HCkcfa.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DH39yvQ-.js → bookings-first-name-rac-Uy7c5EBs.js} +1 -1
- package/dist/component/{bookings-header-rac-StLm7b4I.js → bookings-header-rac-nmwsWRjS.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DHZMPMOO.js → bookings-last-name-rac-BAioQLCg.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DrHp1ojM.js → bookings-login-bar-rac-CO6vOBjG.js} +5 -5
- package/dist/component/{bookings-phone-rac-6aGjbavK.js → bookings-phone-rac-Cr16h-_R.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DBlGZUM5.js → bookings-rich-text-rac-CHLH3jd7.js} +1 -1
- package/dist/component/{checkbox-field-rac-Cna1Va1X.js → checkbox-field-rac-CMwmwFMD.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-m_-10Mdx.js → checkbox-group-field-headless-BNs_S-nT.js} +50 -50
- package/dist/component/{checkbox-group-field-rac-BSCi5hmx.js → checkbox-group-field-rac-BA60EPAN.js} +12 -12
- package/dist/component/{checkbox-group-rac-BWYQZmAI.js → checkbox-group-rac-BJZ4Oer9.js} +1 -1
- package/dist/component/{checkbox-rac-BsUTfSUf.js → checkbox-rac-KsVlI6_V.js} +1 -1
- package/dist/component/{contacts-address-rac-DwCLW8rV.js → contacts-address-rac-CRYkz87z.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DnNgxbKb.js → contacts-birthdate-rac-BIz-1-ZX.js} +1 -1
- package/dist/component/{contacts-company-rac-BQqXzpNl.js → contacts-company-rac-B8G__j6I.js} +1 -1
- package/dist/component/{contacts-email-rac-BINnZzxp.js → contacts-email-rac-Dztkvp5i.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DBWKFkIU.js → contacts-first-name-rac-CVSEWpLU.js} +1 -1
- package/dist/component/{contacts-last-name-rac-D_-qrF7I.js → contacts-last-name-rac-Blz4M5bk.js} +1 -1
- package/dist/component/{contacts-phone-rac-7n7JkSDr.js → contacts-phone-rac-CPCE5soY.js} +1 -1
- package/dist/component/{contacts-position-rac-DvXP8nvT.js → contacts-position-rac-Dd_kBjqG.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DnLnV5Gm.js → contacts-subscribe-rac-C6AlsP10.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BJVWhvYW.js → contacts-tax-id-rac-CQ1n29zI.js} +1 -1
- package/dist/component/{date-availability-Df807-eN.js → date-availability-DDj1j0z5.js} +1 -1
- package/dist/component/date-input-field-rac-D5r1n_ah.js +309 -0
- package/dist/component/{date-input-rac-CSB3MWHW.js → date-input-rac-Cyi5mU_P.js} +1 -1
- package/dist/component/{date-picker-field-rac-CySThPfz.js → date-picker-field-rac-CeG391Zo.js} +79 -79
- package/dist/component/{date-picker-rac-Fp8_pxtf.js → date-picker-rac-Ci9aHgav.js} +1 -1
- package/dist/component/date-time-input-field-rac-CrbYEbJJ.js +441 -0
- package/dist/component/{date-time-input-rac-wctMR4uM.js → date-time-input-rac-DDJLkqs0.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-erMPfwFL.js → dext-checkbox-group-rac-C3ftVHBA.js} +4 -4
- package/dist/component/{dext-checkbox-rac-DQSq9Lqd.js → dext-checkbox-rac-BGLYWn68.js} +1 -1
- package/dist/component/{dext-date-picker-rac-RCLcd1VV.js → dext-date-picker-rac-Cy9RlDlt.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DMolWzvy.js → dext-date-time-input-rac-88ZoTd5e.js} +1 -1
- package/dist/component/{dext-dropdown-rac-wQ2GJL4V.js → dext-dropdown-rac-CPxDUuk9.js} +1 -1
- package/dist/component/{dext-email-rac-BtymBVTW.js → dext-email-rac-BAvQwDPA.js} +1 -1
- package/dist/component/{dext-number-input-rac-DHPiK0Z3.js → dext-number-input-rac-D7HYQVKq.js} +1 -1
- package/dist/component/{dext-phone-rac-C58vHEEe.js → dext-phone-rac--FhcplSI.js} +1 -1
- package/dist/component/dext-radio-group-rac-DBz8iCKW.js +18 -0
- package/dist/component/{dext-rating-input-rac-DI0k3tVa.js → dext-rating-input-rac-Cv7nThfe.js} +1 -1
- package/dist/component/{dext-tags-rac-DmF6ctvQ.js → dext-tags-rac-CRUUc5dr.js} +2 -2
- package/dist/component/{dext-text-area-rac-Bv6ridbR.js → dext-text-area-rac-DQBQXV1L.js} +1 -1
- package/dist/component/{dext-text-input-rac-DoTAdUgU.js → dext-text-input-rac-4CpM581y.js} +1 -1
- package/dist/component/{dext-url-input-rac-BuoMS6g2.js → dext-url-input-rac-0C1jTEr9.js} +1 -1
- package/dist/component/{donation-rac-CjZalSgn.js → donation-rac-Cgt0ZE50.js} +79 -79
- package/dist/component/{dropdown-field-rac-By_fpqhx.js → dropdown-field-rac-DlGKR7pZ.js} +14 -14
- package/dist/component/{dropdown-rac-BnIEC4RX.js → dropdown-rac-CYFW_3x_.js} +1 -1
- package/dist/component/{ecom-address-rac-B6Usk1Ty.js → ecom-address-rac-CQfQHpXC.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B4B0wzlC.js → ecom-subscription-checkbox-rac-D2v2Upvz.js} +2 -2
- package/dist/component/{email-input-field-rac-Df3KI3_v.js → email-input-field-rac-CVw25yRo.js} +39 -39
- package/dist/component/{events-repeater-rac-B2iBk8lV.js → events-repeater-rac-BCVUcmFj.js} +25 -25
- package/dist/component/{events-rsvp-rac-xl_qCIh3.js → events-rsvp-rac-DwbqEr8z.js} +18 -18
- package/dist/component/{field-error-headless-DWc76YmY.js → field-error-headless-XnVcMmsL.js} +3 -3
- package/dist/component/{field-label-headless-DKBKqI2X.js → field-label-headless-BRTLT2Yt.js} +16 -16
- package/dist/component/{file-upload-rac-BVj4cRqe.js → file-upload-rac-Dkwg9Jk4.js} +118 -118
- package/dist/component/{fixed-payment-rac-BS1Hb4hg.js → fixed-payment-rac-ST98xAa2.js} +13 -13
- package/dist/component/{form-BTUoOcqB.js → form-BUqSKOvc.js} +785 -727
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DTJ_Us6u.js → header-field-rac-CzNTGYWq.js} +6 -6
- package/dist/component/{header-rac-CvYp0Jjo.js → header-rac-DUt6AIAE.js} +1 -1
- package/dist/component/{image-choice-rac--qrYqKJl.js → image-choice-rac-DuBgrSt2.js} +23 -23
- package/dist/component/{index-DIl9BH2M.js → index-CDO22hht.js} +66 -66
- package/dist/component/{index-CoEV4QEy.js → index-cZZeAuuu.js} +2 -2
- package/dist/component/{isObjectLike-CLN09X5V.js → isObjectLike-cs4bARpC.js} +11 -11
- package/dist/component/multiline-address-field-rac-vcEWhUCV.js +1664 -0
- package/dist/component/{multiline-address-rac-DtaAJjbR.js → multiline-address-rac-WQaI2eUX.js} +1 -1
- package/dist/component/{number-input-field-rac-2gqDUlw9.js → number-input-field-rac-CBUMqATk.js} +23 -23
- package/dist/component/{number-input-rac-BlciEPLN.js → number-input-rac-B4j5hyzS.js} +1 -1
- package/dist/component/{password-rac-BvvQgafk.js → password-rac-DwLyf45N.js} +27 -27
- package/dist/component/{payment-input-rac-CSRyOPPr.js → payment-input-rac-D0Od---y.js} +31 -31
- package/dist/component/phone-input-field-rac-COlu9IeC.js +512 -0
- package/dist/component/{phone-rac-DMP1MoRs.js → phone-rac-Dh4RacOF.js} +1 -1
- package/dist/component/{product-list-rac-WQ9Qhzum.js → product-list-rac-D7zHDE2D.js} +39 -39
- package/dist/component/{quiz-radio-group-rac-DzrL3-gZ.js → quiz-radio-group-rac-1AaKphJt.js} +1 -1
- package/dist/component/{radio-button-module-classes-CJk18LzO.js → radio-button-module-classes-VqaP6vpA.js} +30 -30
- package/dist/component/{radio-group-field-rac-DGoMoSgo.js → radio-group-field-rac-Cp3LRN3C.js} +8 -8
- package/dist/component/{radio-group-rac-DhAELVNV.js → radio-group-rac-KhmhzYGf.js} +1 -1
- package/dist/component/{rating-input-field-rac-CFoesqmC.js → rating-input-field-rac-10n6ciCr.js} +39 -39
- package/dist/component/{rating-input-rac-CFMIxche.js → rating-input-rac-XZjjY2Gp.js} +1 -1
- package/dist/component/{rich-content-rac.module-xJ03MegT.js → rich-content-rac.module-kMwDoLBa.js} +8 -8
- package/dist/component/{rich-text-field-rac-CBMY4JOB.js → rich-text-field-rac-H5bd8fAt.js} +4 -4
- package/dist/component/{rich-text-rac-CvZ7s1Ct.js → rich-text-rac-88GSQR62.js} +1 -1
- package/dist/component/service-dropdown-rac-B1_Xr_X3.js +145 -0
- package/dist/component/{services-multi-choice-rac-fXOov4K7.js → services-multi-choice-rac-DWp_Llbi.js} +11 -11
- package/dist/component/{signature-rac-CG_Q9Oxr.js → signature-rac-zN_6KRDp.js} +82 -82
- package/dist/component/{submit-button-rac-DAsovEp2.js → submit-button-rac-Dv6UarYX.js} +12 -12
- package/dist/component/{tags-field-rac-9mpOMPLm.js → tags-field-rac-sVN6MHfJ.js} +43 -43
- package/dist/component/{tags-rac-CNBJ08wS.js → tags-rac-DhTHs_XN.js} +1 -1
- package/dist/component/{text-area-field-rac-D4aTm7CM.js → text-area-field-rac-DrWkww7W.js} +19 -19
- package/dist/component/{text-area-rac-DoKiH_Kv.js → text-area-rac-CXXh-ZdY.js} +1 -1
- package/dist/component/{text-input-field-rac-BbvPB26b.js → text-input-field-rac-C2YiMr-g.js} +5 -5
- package/dist/component/text-input-headless-BJMNbsMY.js +47 -0
- package/dist/component/{text-input-rac-1ac1EKad.js → text-input-rac-CpsPh7FH.js} +1 -1
- package/dist/component/{time-input-rac-BS0rR-89.js → time-input-rac-DG_1KxS4.js} +20 -20
- package/dist/component/{url-input-field-rac-DbO6ATng.js → url-input-field-rac-twxRREnl.js} +19 -19
- package/dist/component/{url-input-rac-DHuny3d-.js → url-input-rac-BTStO0NP.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-DbMMg1ws.js +116 -0
- package/dist/component/use-dropdown-trigger-class-name-Yes4kC_0.js +96 -0
- package/dist/component/{use-element-state-class-name-BUsFQfoW.js → use-element-state-class-name-DlncY4hk.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C2l3G8gb.js → use-hoverable-input-class-name-C__zqP5j.js} +2 -2
- package/dist/component/use-is-forced-open-dropdown-DnK_MQRO.js +53 -0
- package/dist/component/{use-service-options-base-D_enm38a.js → use-service-options-base-DKJe52Vk.js} +6 -6
- package/dist/component/use-text-input-class-name-D9tJTR-b.js +6 -0
- package/dist/form.d.ts +11 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-CEuPElMH.js +0 -303
- package/dist/component/date-time-input-field-rac-DG5KSBHe.js +0 -433
- package/dist/component/dext-radio-group-rac-Cp-I94HW.js +0 -18
- package/dist/component/dropdown-field-headless-BYEjiIUf.js +0 -93
- package/dist/component/multiline-address-field-rac-BjWzx-LH.js +0 -1659
- package/dist/component/phone-input-field-rac-BVWzH_TY.js +0 -508
- package/dist/component/service-dropdown-rac-B627AgPG.js +0 -145
- package/dist/component/text-input-headless-BGaBRrP1.js +0 -47
- package/dist/component/use-dropdown-trigger-class-name-rcGBzxI1.js +0 -117
- package/dist/component/use-is-forced-open-dropdown-CoOk4W4i.js +0 -48
- package/dist/component/use-text-input-class-name-BLtPQoYE.js +0 -6
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import d, { useContext as N, useRef as x, useState as f, Children as y, useLayoutEffect as p, useMemo as I } from "react";
|
|
2
|
-
import { CollectionRendererContext as g, DefaultCollectionRenderer as E, ListBox as L } from "react-aria-components";
|
|
3
|
-
import M from "classnames";
|
|
4
|
-
import { s as R } from "./field-rac.module-DP0lkkEv.js";
|
|
5
|
-
import { z as T, G as P } from "./form-BTUoOcqB.js";
|
|
6
|
-
import { u as H } from "./use-element-state-class-name-BUsFQfoW.js";
|
|
7
|
-
import { u as B } from "./use-hoverable-input-class-name-C2l3G8gb.js";
|
|
8
|
-
const h = 1 / 0, A = {
|
|
9
|
-
position: "absolute",
|
|
10
|
-
width: 0,
|
|
11
|
-
height: "var(--popoverMaxHeight, 240px)",
|
|
12
|
-
visibility: "hidden",
|
|
13
|
-
pointerEvents: "none"
|
|
14
|
-
}, G = (e, o) => Object.create(e, {
|
|
15
|
-
[Symbol.iterator]: {
|
|
16
|
-
value: function* () {
|
|
17
|
-
let s = 0;
|
|
18
|
-
for (const n of e) {
|
|
19
|
-
if (s >= o)
|
|
20
|
-
return;
|
|
21
|
-
s += 1, yield n;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}), S = (e) => e.querySelector('[role="option"]') !== null, V = (e, o) => {
|
|
26
|
-
const s = e.getBoundingClientRect().top - e.scrollTop;
|
|
27
|
-
let n = 0;
|
|
28
|
-
for (const r of e.querySelectorAll('[role="option"]')) {
|
|
29
|
-
const m = r.getBoundingClientRect().top - s;
|
|
30
|
-
if (n > 0 && m >= o)
|
|
31
|
-
break;
|
|
32
|
-
n += 1;
|
|
33
|
-
}
|
|
34
|
-
return n;
|
|
35
|
-
}, K = ({ isForcedOpen: e, ...o }) => {
|
|
36
|
-
const s = N(g), n = x(null), [r, m] = f(null), [c, O] = f(h), [b, _] = f(0), w = y.count(o.children);
|
|
37
|
-
p(() => {
|
|
38
|
-
O(h);
|
|
39
|
-
}, [
|
|
40
|
-
r,
|
|
41
|
-
w,
|
|
42
|
-
b
|
|
43
|
-
]), p(() => {
|
|
44
|
-
const t = n.current;
|
|
45
|
-
if (!r || !t || c !== h)
|
|
46
|
-
return;
|
|
47
|
-
const a = () => {
|
|
48
|
-
const l = r.getBoundingClientRect().height;
|
|
49
|
-
l > 0 && O(V(t, l));
|
|
50
|
-
};
|
|
51
|
-
if (S(t)) {
|
|
52
|
-
a();
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
const i = new MutationObserver(() => {
|
|
56
|
-
S(t) && (i.disconnect(), a());
|
|
57
|
-
});
|
|
58
|
-
return i.observe(t, {
|
|
59
|
-
childList: !0,
|
|
60
|
-
subtree: !0
|
|
61
|
-
}), () => i.disconnect();
|
|
62
|
-
}, [
|
|
63
|
-
r,
|
|
64
|
-
c,
|
|
65
|
-
b
|
|
66
|
-
]), p(() => {
|
|
67
|
-
const t = n.current;
|
|
68
|
-
if (!r || !t || typeof ResizeObserver > "u")
|
|
69
|
-
return;
|
|
70
|
-
const a = /* @__PURE__ */ new Map(), i = new ResizeObserver((l) => {
|
|
71
|
-
l.some(({ target: u, contentRect: v }) => {
|
|
72
|
-
const C = a.get(u);
|
|
73
|
-
return a.set(u, v.height), C !== void 0 && C !== v.height;
|
|
74
|
-
}) && _((u) => u + 1);
|
|
75
|
-
});
|
|
76
|
-
return i.observe(r), t.querySelectorAll('[role="option"]').forEach((l) => i.observe(l)), () => i.disconnect();
|
|
77
|
-
}, [
|
|
78
|
-
r,
|
|
79
|
-
c
|
|
80
|
-
]);
|
|
81
|
-
const D = I(() => ({
|
|
82
|
-
...E,
|
|
83
|
-
CollectionRoot: (t) => /* @__PURE__ */ d.createElement(E.CollectionRoot, {
|
|
84
|
-
...t,
|
|
85
|
-
collection: G(t.collection, c)
|
|
86
|
-
})
|
|
87
|
-
}), [
|
|
88
|
-
c
|
|
89
|
-
]);
|
|
90
|
-
return /* @__PURE__ */ d.createElement(g.Provider, {
|
|
91
|
-
value: e ? D : s
|
|
92
|
-
}, /* @__PURE__ */ d.createElement(L, {
|
|
93
|
-
ref: n,
|
|
94
|
-
...o
|
|
95
|
-
}), e && /* @__PURE__ */ d.createElement("div", {
|
|
96
|
-
ref: m,
|
|
97
|
-
style: A
|
|
98
|
-
}));
|
|
99
|
-
}, W = {
|
|
100
|
-
base: R.selectOption,
|
|
101
|
-
selected: R.selectOptionSelected,
|
|
102
|
-
hover: R.selectOptionHover
|
|
103
|
-
}, q = ({ isSelected: e, isHovered: o, isFocused: s }) => ({
|
|
104
|
-
isSelected: e,
|
|
105
|
-
isHovered: (o || s) && !e
|
|
106
|
-
}), Q = (...e) => {
|
|
107
|
-
const o = H({
|
|
108
|
-
globalClasses: T,
|
|
109
|
-
moduleClasses: W
|
|
110
|
-
});
|
|
111
|
-
return (s) => M(o(q(s)), e);
|
|
112
|
-
}, Z = (...e) => B(P, e);
|
|
113
|
-
export {
|
|
114
|
-
K as V,
|
|
115
|
-
Z as a,
|
|
116
|
-
Q as u
|
|
117
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { useContext as i, useMemo as c } from "react";
|
|
2
|
-
import { bi as E, au as T, bg as a, F as s } from "./form-BTUoOcqB.js";
|
|
3
|
-
const u = [
|
|
4
|
-
s.DROPDOWN,
|
|
5
|
-
s.DEXT_DROPDOWN,
|
|
6
|
-
s.SERVICES_DROPDOWN,
|
|
7
|
-
s.DATE_INPUT,
|
|
8
|
-
s.CONTACTS_BIRTHDATE,
|
|
9
|
-
s.DATE_TIME_INPUT,
|
|
10
|
-
s.DEXT_DATE_TIME_INPUT
|
|
11
|
-
], d = [
|
|
12
|
-
s.DATE_PICKER,
|
|
13
|
-
s.DEXT_DATE_PICKER
|
|
14
|
-
], O = [
|
|
15
|
-
s.PHONE,
|
|
16
|
-
s.CONTACTS_PHONE,
|
|
17
|
-
s.BOOKINGS_PHONE,
|
|
18
|
-
s.DEXT_PHONE
|
|
19
|
-
], _ = [
|
|
20
|
-
s.MULTILINE_ADDRESS,
|
|
21
|
-
s.BOOKINGS_ADDRESS,
|
|
22
|
-
s.ECOM_ADDRESS
|
|
23
|
-
], I = ({ properties: e }) => {
|
|
24
|
-
var n, o, t, r;
|
|
25
|
-
return ((r = (t = (o = (n = e.validation) == null ? void 0 : n.string) == null ? void 0 : o.phoneOptions) == null ? void 0 : t.allowedCountryCodes) == null ? void 0 : r.length) !== 1;
|
|
26
|
-
}, P = ({ properties: e }) => {
|
|
27
|
-
var n, o;
|
|
28
|
-
return ((o = (n = e.fieldSettings) == null ? void 0 : n.country) == null ? void 0 : o.show) !== !1;
|
|
29
|
-
}, l = (e, n) => O.includes(e.fieldType) ? !n && I(e) : _.includes(e.fieldType) ? P(e) : u.includes(e.fieldType), p = (e) => d.includes(e.fieldType), S = ({ properties: e }) => !e.disabled && !e.readOnly, D = (e) => {
|
|
30
|
-
const n = i(T), { isMobile: o = !1 } = a();
|
|
31
|
-
return c(() => !n || n.parentId ? [] : n.fields.filter((t) => e(t, o) && S(t)).map((t) => t.id), [
|
|
32
|
-
n,
|
|
33
|
-
o,
|
|
34
|
-
e
|
|
35
|
-
]);
|
|
36
|
-
}, A = (e) => {
|
|
37
|
-
var t;
|
|
38
|
-
const n = ((t = E().dropdown) == null ? void 0 : t.open) === !0, o = D(l);
|
|
39
|
-
return n && o.includes(e);
|
|
40
|
-
}, R = (e) => {
|
|
41
|
-
var t;
|
|
42
|
-
const n = ((t = E().datePicker) == null ? void 0 : t.open) === !0, o = D(p);
|
|
43
|
-
return n && o.includes(e);
|
|
44
|
-
};
|
|
45
|
-
export {
|
|
46
|
-
A as a,
|
|
47
|
-
R as u
|
|
48
|
-
};
|