@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,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-D7ulDPh1.js";
|
|
6
|
-
import { u as H } from "./use-element-state-class-name-DY0UyIQg.js";
|
|
7
|
-
import { u as B } from "./use-hoverable-input-class-name-C_Wh4Qfc.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-D7ulDPh1.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
|
-
};
|