@wix/form-elements 1.90.0 → 1.92.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-DtPa-JZ9.js → appointment-rac-bw0pvoxP.js} +4 -4
- package/dist/component/{bookings-address-rac-4l8kqoLi.js → bookings-address-rac-DECq7eWR.js} +1 -1
- package/dist/component/{bookings-email-rac-76vUcGtU.js → bookings-email-rac-DTLjh6Zw.js} +1 -1
- package/dist/component/{bookings-first-name-rac-IS7LUMxg.js → bookings-first-name-rac-DObRe-Gq.js} +1 -1
- package/dist/component/{bookings-header-rac-2wTzY64_.js → bookings-header-rac-DjpmYRJG.js} +1 -1
- package/dist/component/{bookings-last-name-rac-nxA75igv.js → bookings-last-name-rac-Ds3o0ABM.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CRi1nntD.js → bookings-login-bar-rac-DPUL2jWj.js} +1 -1
- package/dist/component/{bookings-phone-rac-DZjvHly0.js → bookings-phone-rac-DIIHPxEP.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CYn1wwYQ.js → bookings-rich-text-rac-BrcQO9xx.js} +1 -1
- package/dist/component/{checkbox-field-rac-DAcFLQNT.js → checkbox-field-rac-CD1MP1LT.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-BJmS0Ce5.js → checkbox-group-field-headless-C0V6zq0u.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CeFUt2Nr.js → checkbox-group-field-rac-B-MYpz53.js} +3 -3
- package/dist/component/{checkbox-group-rac-eDChVoVP.js → checkbox-group-rac-BejQjiO2.js} +1 -1
- package/dist/component/{checkbox-rac-DGmZdPnl.js → checkbox-rac-B0YgCj29.js} +1 -1
- package/dist/component/{contacts-address-rac-CGS83PMu.js → contacts-address-rac-B1QNl3Lb.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DkP-7tZ9.js → contacts-birthdate-rac-Cp-gh3P-.js} +1 -1
- package/dist/component/{contacts-company-rac-D_KYvkYe.js → contacts-company-rac-CSCU7JGm.js} +1 -1
- package/dist/component/{contacts-email-rac-4lGD56E8.js → contacts-email-rac-B1Oov6-3.js} +1 -1
- package/dist/component/{contacts-first-name-rac-C5L3U9QV.js → contacts-first-name-rac-rsHIOcjr.js} +1 -1
- package/dist/component/{contacts-last-name-rac-SL3FSAhE.js → contacts-last-name-rac-Csgq53Wm.js} +1 -1
- package/dist/component/{contacts-phone-rac-DkUwJ56_.js → contacts-phone-rac-r9SwjDZ4.js} +1 -1
- package/dist/component/{contacts-position-rac-CeKJ5oJh.js → contacts-position-rac-D7VcCM7v.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-Bjldz7ed.js → contacts-subscribe-rac-8Nu9ncZW.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-D8QxyDiU.js → contacts-tax-id-rac-CL_JSl_W.js} +1 -1
- package/dist/component/{date-availability-DdMI-zNj.js → date-availability-DLOKY9C4.js} +1 -1
- package/dist/component/date-input-field-rac-D23Al-Mr.js +292 -0
- package/dist/component/{date-input-rac-tlmhXr4A.js → date-input-rac-B6zgkw-L.js} +1 -1
- package/dist/component/{date-picker-field-rac-ClNfMoR1.js → date-picker-field-rac-BqdzPPzK.js} +4 -4
- package/dist/component/{date-picker-rac-BV3TGjsx.js → date-picker-rac-C7g6aceb.js} +1 -1
- package/dist/component/date-time-input-field-rac-BENzf6gc.js +428 -0
- package/dist/component/{date-time-input-rac-DQk2ylbE.js → date-time-input-rac-CVpK3mgw.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-CBj9Y7Tp.js → dext-checkbox-group-rac-CbEFDD3H.js} +2 -2
- package/dist/component/{dext-checkbox-rac-C1KI5I2J.js → dext-checkbox-rac-BdtZvn6I.js} +1 -1
- package/dist/component/{dext-date-picker-rac-D-8Ss0bx.js → dext-date-picker-rac-BAhFvUEx.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-CRnwLBSZ.js → dext-date-time-input-rac-iXMKMwQY.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BVTEMS0W.js → dext-dropdown-rac-D-NPziZS.js} +1 -1
- package/dist/component/{dext-email-rac-CXeM4iQj.js → dext-email-rac-DYSwyB80.js} +1 -1
- package/dist/component/{dext-number-input-rac-DMh08cy5.js → dext-number-input-rac-DXx8hgFg.js} +1 -1
- package/dist/component/{dext-phone-rac-E1fFjkVW.js → dext-phone-rac-BtuLROzm.js} +1 -1
- package/dist/component/{dext-radio-group-rac-_BhRzFAr.js → dext-radio-group-rac-MdKNiJ2i.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BRYVQOYw.js → dext-rating-input-rac-d998xond.js} +1 -1
- package/dist/component/{dext-tags-rac-C4iwtRcw.js → dext-tags-rac-DnSpOM9T.js} +2 -2
- package/dist/component/{dext-text-area-rac-CQ1KAhkU.js → dext-text-area-rac-KqjeDDWe.js} +1 -1
- package/dist/component/{dext-text-input-rac-xCoKhEt3.js → dext-text-input-rac-CtCnClfX.js} +1 -1
- package/dist/component/{dext-url-input-rac-DyoEEa_v.js → dext-url-input-rac-DSJQcLLr.js} +1 -1
- package/dist/component/{donation-rac-CSDVxWUj.js → donation-rac-B_KGkBgo.js} +5 -5
- package/dist/component/dropdown-field-headless-BUilB8wZ.js +89 -0
- package/dist/component/{dropdown-field-rac-D1Z_Jbzd.js → dropdown-field-rac-COupYC1a.js} +2 -2
- package/dist/component/{dropdown-rac-BEi7CMKT.js → dropdown-rac-Dj0UZrE0.js} +1 -1
- package/dist/component/{ecom-address-rac-DGl7rlwa.js → ecom-address-rac-C0xnn86e.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-D5HzzRQk.js → ecom-subscription-checkbox-rac-D-ekxwUE.js} +2 -2
- package/dist/component/{email-input-field-rac-DHAK2K8E.js → email-input-field-rac-DVj1qz_R.js} +3 -3
- package/dist/component/{events-repeater-rac-N1mGqD4R.js → events-repeater-rac-U0aq9Z4Q.js} +3 -3
- package/dist/component/{events-rsvp-rac-Ds9PnqHG.js → events-rsvp-rac-C7J58_5q.js} +2 -2
- package/dist/component/{field-error-headless-9MKScovg.js → field-error-headless-2nYJ2792.js} +1 -1
- package/dist/component/{field-label-headless-BaoLrUWJ.js → field-label-headless-D97ACnmc.js} +1 -1
- package/dist/component/{file-upload-rac-CNbLRxUz.js → file-upload-rac-BR7QpuPW.js} +3 -3
- package/dist/component/{fixed-payment-rac-BFnvUksR.js → fixed-payment-rac-COl18wW1.js} +3 -3
- package/dist/component/{form-B3YjGh0T.js → form-DKKTSAj1.js} +1110 -1109
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-64pYqszP.js → header-field-rac-B6DyMG3U.js} +2 -2
- package/dist/component/{header-rac-BtPQVL59.js → header-rac-x4H2qMky.js} +1 -1
- package/dist/component/{image-choice-rac-BsojUR1h.js → image-choice-rac-BVgmKTKk.js} +4 -4
- package/dist/component/{index-CtiBRBqZ.js → index-C47UMGhd.js} +4 -4
- package/dist/component/{index-f2JBxCTd.js → index-DnpqBcg5.js} +2 -2
- package/dist/component/{isObjectLike-BgqHLNgn.js → isObjectLike-BrrFBP4f.js} +1 -1
- package/dist/component/multiline-address-field-rac-B6ka-2Wy.js +1630 -0
- package/dist/component/{multiline-address-rac-CkOPWXfI.js → multiline-address-rac-Bh58qUEe.js} +1 -1
- package/dist/component/{number-input-field-rac-B7U_08UK.js → number-input-field-rac-pAmxvk3A.js} +4 -4
- package/dist/component/{number-input-rac-1jcchySg.js → number-input-rac-mKA2njIU.js} +1 -1
- package/dist/component/{password-rac-CAaV8OrL.js → password-rac-BbD7PQXO.js} +4 -4
- package/dist/component/{payment-input-rac-B3Knhzrz.js → payment-input-rac-UdkwC1ek.js} +4 -4
- package/dist/component/phone-input-field-rac-BVLVVDTq.js +487 -0
- package/dist/component/{phone-rac-BUAW-44w.js → phone-rac-LixcB9WV.js} +1 -1
- package/dist/component/{product-list-rac-C7Nq3ZG4.js → product-list-rac-B_dL1Ov-.js} +4 -4
- package/dist/component/{quiz-radio-group-rac-CRa3I_NR.js → quiz-radio-group-rac-Bj5XfqNf.js} +1 -1
- package/dist/component/{radio-button-module-classes-BEvf741q.js → radio-button-module-classes-y_PtsZPP.js} +3 -3
- package/dist/component/{radio-group-field-rac-BYTXrpnE.js → radio-group-field-rac-C8OElNAQ.js} +3 -3
- package/dist/component/{radio-group-rac-138JrIhm.js → radio-group-rac-BqJFboHE.js} +1 -1
- package/dist/component/{rating-input-field-rac-D5pOVdFJ.js → rating-input-field-rac-C9_ITvEh.js} +4 -4
- package/dist/component/{rating-input-rac-DuK1q9JB.js → rating-input-rac-CvTpEUoU.js} +1 -1
- package/dist/component/{rich-content-rac.module-H3hPgDtD.js → rich-content-rac.module-D4pEN-TY.js} +1 -1
- package/dist/component/{rich-text-field-rac-Btwqm4wb.js → rich-text-field-rac-B8cqCmaf.js} +2 -2
- package/dist/component/{rich-text-rac-DIu8StCg.js → rich-text-rac-C1o-tfXG.js} +1 -1
- package/dist/component/{service-dropdown-rac-N8jqoUC_.js → service-dropdown-rac-BOXqB2aq.js} +4 -4
- package/dist/component/{services-multi-choice-rac-DlP0tB9d.js → services-multi-choice-rac-Dk4rz-fw.js} +5 -5
- package/dist/component/{signature-rac-DuRzxIkO.js → signature-rac-h9GWVdez.js} +3 -3
- package/dist/component/{submit-button-rac-DFmPp4jT.js → submit-button-rac-qNaTyCxd.js} +1 -1
- package/dist/component/{tags-field-rac-DIgyn5P9.js → tags-field-rac-NMRn0YnW.js} +5 -5
- package/dist/component/{tags-rac-C6R6RHl2.js → tags-rac-DGx4KxEn.js} +1 -1
- package/dist/component/{text-area-field-rac-opBEx_8s.js → text-area-field-rac-C7u0D4l3.js} +4 -4
- package/dist/component/{text-area-rac-D4iKhAqc.js → text-area-rac-Yo-RIyLm.js} +1 -1
- package/dist/component/{text-input-field-rac-Ckp8Ierz.js → text-input-field-rac-CvU-1clq.js} +2 -2
- package/dist/component/{text-input-headless-D-LXpqS3.js → text-input-headless-DLRwVmwf.js} +3 -3
- package/dist/component/{text-input-rac-ChxuJj-q.js → text-input-rac-CWh5xjZA.js} +1 -1
- package/dist/component/{time-input-rac-C5_rEy7W.js → time-input-rac-BZlso9qK.js} +4 -4
- package/dist/component/{url-input-field-rac-CBOnhquz.js → url-input-field-rac-Bax0TB4Q.js} +4 -4
- package/dist/component/{url-input-rac-BY-BVg6r.js → url-input-rac-Bw2nfybR.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-vKSagp3b.js +57 -0
- package/dist/component/{use-element-state-class-name--YLulmsU.js → use-element-state-class-name-C0zLrsDR.js} +1 -1
- package/dist/component/{use-service-options-base-BNLFmnHJ.js → use-service-options-base-Bkj6BSQL.js} +1 -1
- package/dist/component/{use-text-input-class-name-3Xp-hNDT.js → use-text-input-class-name-Biu89Ma7.js} +2 -2
- package/dist/form.d.ts +15 -7
- package/package.json +23 -22
- package/dist/component/date-input-field-rac-Da6j7OP2.js +0 -288
- package/dist/component/date-time-input-field-rac-5eHyKry0.js +0 -424
- package/dist/component/dropdown-field-headless-BXyP9KYi.js +0 -101
- package/dist/component/multiline-address-field-rac-CH1hCUTf.js +0 -1618
- package/dist/component/phone-input-field-rac-BGsvxtXz.js +0 -474
- package/dist/component/use-dropdown-option-class-name-C1iEE28P.js +0 -28
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import o, { useContext as q, useMemo as A, useState as b, useCallback as D, useRef as M } from "react";
|
|
2
|
-
import { UNSAFE_PortalProvider as Y } from "react-aria";
|
|
3
|
-
import { Select as U, SelectValue as X, ListBox as j, ListBoxItem as z } from "react-aria-components";
|
|
4
|
-
import { ae as G, l as H, F as E, ak as f, ah as g, am as J } from "./form-B3YjGh0T.js";
|
|
5
|
-
import { f as u, a as y } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { D as K, E as Q } from "./field-error-headless-9MKScovg.js";
|
|
7
|
-
import { L as Z } from "./field-label-headless-BaoLrUWJ.js";
|
|
8
|
-
import { S as $, N as ee } from "./non-modal-popover-DtIMXHbe.js";
|
|
9
|
-
const ne = [
|
|
10
|
-
E.DROPDOWN,
|
|
11
|
-
E.DEXT_DROPDOWN,
|
|
12
|
-
E.SERVICES_DROPDOWN
|
|
13
|
-
], te = ({ fieldType: e, properties: n }) => ne.includes(e) && !n.hidden && !n.disabled && !n.readOnly, oe = (e, n) => e.layout.row - n.layout.row || e.layout.column - n.layout.column, re = (e) => {
|
|
14
|
-
var i;
|
|
15
|
-
const n = ((i = G().dropdown) == null ? void 0 : i.open) === !0, t = q(H), a = A(() => {
|
|
16
|
-
var r;
|
|
17
|
-
return t && !t.parentId ? (r = t.fields.filter(te).sort(oe)[0]) == null ? void 0 : r.id : void 0;
|
|
18
|
-
}, [
|
|
19
|
-
t
|
|
20
|
-
]);
|
|
21
|
-
return n && a === e;
|
|
22
|
-
}, l = ({ children: e }) => {
|
|
23
|
-
const { id: n, value: t, defaultValue: a, options: i = [], readOnly: r, onChange: s, placeholder: m, disabled: c, required: F, onBlur: I, onFocus: P, FieldLayout: v, hasError: C } = f(), [L, S] = b(!1), p = re(n), [h, N] = b(null), w = t && i.some((d) => (d.value ?? d.label) === t) ? t : a || null, { labelId: R } = g(), T = D((d) => {
|
|
24
|
-
r || s(typeof d == "string" ? d : null);
|
|
25
|
-
}, [
|
|
26
|
-
s,
|
|
27
|
-
r
|
|
28
|
-
]), V = D((d) => S(d && !c && !r), [
|
|
29
|
-
c,
|
|
30
|
-
r
|
|
31
|
-
]), x = u(e, l.Label), B = u(e, l.Trigger), _ = u(e, l.Options), W = u(e, l.Description), k = u(e, l.Error);
|
|
32
|
-
return /* @__PURE__ */ o.createElement(v, {
|
|
33
|
-
fieldId: n,
|
|
34
|
-
renderLabel: () => x,
|
|
35
|
-
renderInput: () => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("div", {
|
|
36
|
-
ref: N,
|
|
37
|
-
style: {
|
|
38
|
-
display: "contents"
|
|
39
|
-
}
|
|
40
|
-
}), /* @__PURE__ */ o.createElement(Y, {
|
|
41
|
-
getContainer: () => h
|
|
42
|
-
}, /* @__PURE__ */ o.createElement(U, {
|
|
43
|
-
"aria-labelledby": R,
|
|
44
|
-
value: w,
|
|
45
|
-
isOpen: p || L && !c && !r,
|
|
46
|
-
onOpenChange: p ? void 0 : V,
|
|
47
|
-
onChange: T,
|
|
48
|
-
isDisabled: c,
|
|
49
|
-
isInvalid: C,
|
|
50
|
-
isRequired: F,
|
|
51
|
-
placeholder: m,
|
|
52
|
-
onBlur: I,
|
|
53
|
-
onFocus: P
|
|
54
|
-
}, B, y(_, {
|
|
55
|
-
isForcedOpen: p
|
|
56
|
-
})))),
|
|
57
|
-
renderDescription: () => /* @__PURE__ */ o.createElement(o.Fragment, null, k, W)
|
|
58
|
-
});
|
|
59
|
-
}, ae = ({ children: e, className: n }) => {
|
|
60
|
-
const { inputId: t, ariaDescribedBy: a } = g(), { id: i, hasError: r, isLoading: s } = f(), m = M(null);
|
|
61
|
-
return J(() => {
|
|
62
|
-
var c;
|
|
63
|
-
(c = m.current) == null || c.focus();
|
|
64
|
-
}, i), /* @__PURE__ */ o.createElement($, {
|
|
65
|
-
ref: m,
|
|
66
|
-
id: t,
|
|
67
|
-
"aria-describedby": a,
|
|
68
|
-
className: n,
|
|
69
|
-
"data-invalid": r || void 0,
|
|
70
|
-
"data-loading": s || void 0
|
|
71
|
-
}, /* @__PURE__ */ o.createElement(X, null), e);
|
|
72
|
-
}, O = ({ children: e, className: n, ...t }) => {
|
|
73
|
-
const { isForcedOpen: a } = t, { options: i = [] } = f(), r = u(e, O.Option);
|
|
74
|
-
return /* @__PURE__ */ o.createElement(ee, {
|
|
75
|
-
className: n,
|
|
76
|
-
containerPadding: 0,
|
|
77
|
-
offset: 0
|
|
78
|
-
}, /* @__PURE__ */ o.createElement(j, {
|
|
79
|
-
autoFocus: a ? !1 : void 0
|
|
80
|
-
}, i.map((s) => y(r, {
|
|
81
|
-
key: s.value ?? s.label,
|
|
82
|
-
value: s.value ?? s.label,
|
|
83
|
-
label: s.label
|
|
84
|
-
}))));
|
|
85
|
-
}, se = ({ className: e, ...n }) => {
|
|
86
|
-
const { value: t, label: a } = n;
|
|
87
|
-
return /* @__PURE__ */ o.createElement(z, {
|
|
88
|
-
className: e,
|
|
89
|
-
id: t,
|
|
90
|
-
textValue: a
|
|
91
|
-
}, a);
|
|
92
|
-
};
|
|
93
|
-
O.Option = se;
|
|
94
|
-
l.Label = Z;
|
|
95
|
-
l.Trigger = ae;
|
|
96
|
-
l.Options = O;
|
|
97
|
-
l.Description = K;
|
|
98
|
-
l.Error = Q;
|
|
99
|
-
export {
|
|
100
|
-
l as D
|
|
101
|
-
};
|