@wix/form-elements 1.159.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-CpiyUOXo.js → appointment-rac-BmHu56e5.js} +63 -63
- package/dist/component/{bookings-address-rac-BBEUV1t7.js → bookings-address-rac-DY9l2g0h.js} +1 -1
- package/dist/component/{bookings-email-rac-DdfoeLFV.js → bookings-email-rac-B5vNSOsS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DH39yvQ-.js → bookings-first-name-rac-CJiefCNz.js} +1 -1
- package/dist/component/{bookings-header-rac-StLm7b4I.js → bookings-header-rac-BFu7Ko5w.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DHZMPMOO.js → bookings-last-name-rac-DegMM13h.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DrHp1ojM.js → bookings-login-bar-rac-DrA-5tBH.js} +7 -7
- package/dist/component/{bookings-phone-rac-6aGjbavK.js → bookings-phone-rac-DsaeqxCI.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DBlGZUM5.js → bookings-rich-text-rac-jRHiwqi8.js} +1 -1
- package/dist/component/{checkbox-field-rac-Cna1Va1X.js → checkbox-field-rac-CyoBb6Yf.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-m_-10Mdx.js → checkbox-group-field-headless-Bv1gU3oL.js} +54 -54
- package/dist/component/{checkbox-group-field-rac-BSCi5hmx.js → checkbox-group-field-rac-DasArcdV.js} +6 -6
- package/dist/component/{checkbox-group-rac-BWYQZmAI.js → checkbox-group-rac-CzmufV1U.js} +1 -1
- package/dist/component/{checkbox-rac-BsUTfSUf.js → checkbox-rac-6C7XoUoZ.js} +1 -1
- package/dist/component/{contacts-address-rac-DwCLW8rV.js → contacts-address-rac-BZobbFtz.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DnNgxbKb.js → contacts-birthdate-rac-DIzf41DS.js} +1 -1
- package/dist/component/{contacts-company-rac-BQqXzpNl.js → contacts-company-rac-BiBDO28r.js} +1 -1
- package/dist/component/{contacts-email-rac-BINnZzxp.js → contacts-email-rac-5mqokCSD.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DBWKFkIU.js → contacts-first-name-rac-BXe3_Nz5.js} +1 -1
- package/dist/component/{contacts-last-name-rac-D_-qrF7I.js → contacts-last-name-rac-Cfqgh7u1.js} +1 -1
- package/dist/component/{contacts-phone-rac-7n7JkSDr.js → contacts-phone-rac-cmLUWnAc.js} +1 -1
- package/dist/component/{contacts-position-rac-DvXP8nvT.js → contacts-position-rac-DTyvklfN.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DnLnV5Gm.js → contacts-subscribe-rac-D-ZEX1A3.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BJVWhvYW.js → contacts-tax-id-rac-B4NYJwWt.js} +1 -1
- package/dist/component/{date-availability-Df807-eN.js → date-availability-Dach9aRC.js} +1 -1
- package/dist/component/date-input-field-rac-B72mHcya.js +309 -0
- package/dist/component/{date-input-rac-CSB3MWHW.js → date-input-rac-CYix11gT.js} +1 -1
- package/dist/component/{date-picker-field-rac-CySThPfz.js → date-picker-field-rac-B8pvtPir.js} +86 -86
- package/dist/component/{date-picker-rac-Fp8_pxtf.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-wctMR4uM.js → date-time-input-rac-DMN-noQX.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-erMPfwFL.js → dext-checkbox-group-rac-Kq0GnteP.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DQSq9Lqd.js → dext-checkbox-rac-BY9GZ4n1.js} +1 -1
- package/dist/component/{dext-date-picker-rac-RCLcd1VV.js → dext-date-picker-rac-CXArIddp.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DMolWzvy.js → dext-date-time-input-rac-B39TtxGq.js} +1 -1
- package/dist/component/{dext-dropdown-rac-wQ2GJL4V.js → dext-dropdown-rac-C3y0G8cS.js} +1 -1
- package/dist/component/{dext-email-rac-BtymBVTW.js → dext-email-rac-BIg3cq7Q.js} +1 -1
- package/dist/component/{dext-number-input-rac-DHPiK0Z3.js → dext-number-input-rac-27sHJ7yN.js} +1 -1
- package/dist/component/{dext-phone-rac-C58vHEEe.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-DI0k3tVa.js → dext-rating-input-rac-B_E6OcBr.js} +1 -1
- package/dist/component/{dext-tags-rac-DmF6ctvQ.js → dext-tags-rac-Yd9aAtnF.js} +2 -2
- package/dist/component/{dext-text-area-rac-Bv6ridbR.js → dext-text-area-rac-CMACri2C.js} +1 -1
- package/dist/component/{dext-text-input-rac-DoTAdUgU.js → dext-text-input-rac-sNjSCfQ-.js} +1 -1
- package/dist/component/{dext-url-input-rac-BuoMS6g2.js → dext-url-input-rac-DwhbzJty.js} +1 -1
- package/dist/component/{donation-rac-CjZalSgn.js → donation-rac-BVAN3kMk.js} +77 -77
- package/dist/component/{dropdown-field-rac-By_fpqhx.js → dropdown-field-rac-DdoGigWx.js} +14 -14
- package/dist/component/{dropdown-rac-BnIEC4RX.js → dropdown-rac-CRkt5w47.js} +1 -1
- package/dist/component/{ecom-address-rac-B6Usk1Ty.js → ecom-address-rac-C36hFHW0.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B4B0wzlC.js → ecom-subscription-checkbox-rac-BKfQ348w.js} +2 -2
- package/dist/component/{email-input-field-rac-Df3KI3_v.js → email-input-field-rac-MOaISYxa.js} +59 -59
- package/dist/component/{events-repeater-rac-B2iBk8lV.js → events-repeater-rac-D6p-NgE8.js} +20 -20
- package/dist/component/{events-rsvp-rac-xl_qCIh3.js → events-rsvp-rac-DVpgN8gm.js} +18 -18
- package/dist/component/{field-error-headless-DWc76YmY.js → field-error-headless-XNWmDH3E.js} +4 -4
- package/dist/component/{field-label-headless-DKBKqI2X.js → field-label-headless-CORRAJGt.js} +4 -4
- package/dist/component/{file-upload-rac-BVj4cRqe.js → file-upload-rac-DRMr7E4b.js} +89 -89
- package/dist/component/{fixed-payment-rac-BS1Hb4hg.js → fixed-payment-rac-BUXzNex9.js} +18 -18
- package/dist/component/{form-BTUoOcqB.js → form-DSpx-AO8.js} +785 -728
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DTJ_Us6u.js → header-field-rac-CiDXlNsa.js} +6 -6
- package/dist/component/{header-rac-CvYp0Jjo.js → header-rac-B5Rg-h8u.js} +1 -1
- package/dist/component/{image-choice-rac--qrYqKJl.js → image-choice-rac-CtoA_KDp.js} +22 -22
- package/dist/component/{index-DIl9BH2M.js → index-Bz7ZhQsF.js} +53 -53
- package/dist/component/{index-CoEV4QEy.js → index-CwruESwc.js} +5 -5
- package/dist/component/{isObjectLike-CLN09X5V.js → isObjectLike-C5dHxHP0.js} +11 -11
- package/dist/component/multiline-address-field-rac-Z-qF366L.js +1664 -0
- package/dist/component/{multiline-address-rac-DtaAJjbR.js → multiline-address-rac-CJIHTMw5.js} +1 -1
- package/dist/component/{number-input-field-rac-2gqDUlw9.js → number-input-field-rac-D4vf6I6N.js} +29 -29
- package/dist/component/{number-input-rac-BlciEPLN.js → number-input-rac-B2jW6JUQ.js} +1 -1
- package/dist/component/{password-rac-BvvQgafk.js → password-rac-DGRZ17Jl.js} +29 -29
- package/dist/component/{payment-input-rac-CSRyOPPr.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-DMP1MoRs.js → phone-rac-Cw2yccgg.js} +1 -1
- package/dist/component/{product-list-rac-WQ9Qhzum.js → product-list-rac-XbzTDdbp.js} +33 -33
- package/dist/component/{quiz-radio-group-rac-DzrL3-gZ.js → quiz-radio-group-rac-BDw_mAw5.js} +1 -1
- package/dist/component/{radio-button-module-classes-CJk18LzO.js → radio-button-module-classes-CFGf0Hzh.js} +23 -23
- package/dist/component/{radio-group-field-rac-DGoMoSgo.js → radio-group-field-rac-CXN7tyVu.js} +6 -6
- package/dist/component/{radio-group-rac-DhAELVNV.js → radio-group-rac-COHzqjBh.js} +1 -1
- package/dist/component/{rating-input-field-rac-CFoesqmC.js → rating-input-field-rac-DCXNZgf1.js} +37 -37
- package/dist/component/{rating-input-rac-CFMIxche.js → rating-input-rac-DwQt9ML7.js} +1 -1
- package/dist/component/{rich-content-rac.module-xJ03MegT.js → rich-content-rac.module-B7rPwNns.js} +8 -8
- package/dist/component/{rich-text-field-rac-CBMY4JOB.js → rich-text-field-rac-DlER7NRD.js} +4 -4
- package/dist/component/{rich-text-rac-CvZ7s1Ct.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-fXOov4K7.js → services-multi-choice-rac-BR6gZeHk.js} +16 -16
- package/dist/component/{signature-rac-CG_Q9Oxr.js → signature-rac-XFj7Ddtp.js} +69 -69
- package/dist/component/{submit-button-rac-DAsovEp2.js → submit-button-rac-Bz7zs_3W.js} +12 -12
- package/dist/component/{tags-field-rac-9mpOMPLm.js → tags-field-rac-DWWkNKqc.js} +22 -22
- package/dist/component/{tags-rac-CNBJ08wS.js → tags-rac-BXyiQ9i1.js} +1 -1
- package/dist/component/{text-area-field-rac-D4aTm7CM.js → text-area-field-rac-DsIRYi0d.js} +21 -21
- package/dist/component/{text-area-rac-DoKiH_Kv.js → text-area-rac-CF9pDP9d.js} +1 -1
- package/dist/component/{text-input-field-rac-BbvPB26b.js → text-input-field-rac-BwIDZACz.js} +5 -5
- package/dist/component/{text-input-headless-BGaBRrP1.js → text-input-headless-5kQs2_Xu.js} +14 -14
- package/dist/component/{text-input-rac-1ac1EKad.js → text-input-rac-CRmSuw1k.js} +1 -1
- package/dist/component/{time-input-rac-BS0rR-89.js → time-input-rac-BRMNpe51.js} +20 -20
- package/dist/component/{url-input-field-rac-DbO6ATng.js → url-input-field-rac-CKLS3QDk.js} +17 -17
- package/dist/component/{url-input-rac-DHuny3d-.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-BUsFQfoW.js → use-element-state-class-name-rXM_lHug.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C2l3G8gb.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-D_enm38a.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-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/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
|
-
};
|