@wix/form-elements 1.224.0 → 1.225.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-UcRjJTHp.js → appointment-rac-DfglpMHC.js} +5 -5
- package/dist/component/{bookings-address-rac-DDjZGEhk.js → bookings-address-rac-BsAUAgUH.js} +1 -1
- package/dist/component/{bookings-email-rac-Dy2vh3dy.js → bookings-email-rac-DL0Q3omz.js} +1 -1
- package/dist/component/{bookings-first-name-rac-fDHMNznn.js → bookings-first-name-rac-C3eHsd6U.js} +1 -1
- package/dist/component/{bookings-header-rac-DLOeNNQf.js → bookings-header-rac-YVCqWtfu.js} +1 -1
- package/dist/component/{bookings-last-name-rac-Bx19ROVT.js → bookings-last-name-rac-BzBQBIMy.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-8FbvPiv1.js → bookings-login-bar-rac-MJvhVfsH.js} +1 -1
- package/dist/component/{bookings-phone-rac-CvPQgtvq.js → bookings-phone-rac-BTEB2Mzf.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CO8bHRpD.js → bookings-rich-text-rac-BopQG6gV.js} +1 -1
- package/dist/component/calendar-icon-DOeHn3jt.js +19 -0
- package/dist/component/{checkbox-field-rac-tzsGw10P.js → checkbox-field-rac-NvQt_qcN.js} +6 -6
- package/dist/component/{checkbox-group-field-headless-CL18dpkq.js → checkbox-group-field-headless-CwLaBukh.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-BmbxaprJ.js → checkbox-group-field-rac-BKQhos1K.js} +6 -6
- package/dist/component/{checkbox-group-rac-shsbUvRc.js → checkbox-group-rac-DMeC2rsZ.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-DOxE4UQg.js → checkbox-indicator-module-classes-Cozvs_kk.js} +1 -1
- package/dist/component/{checkbox-rac-CobYYayd.js → checkbox-rac-Dea1HbEL.js} +1 -1
- package/dist/component/{contacts-address-rac-BoDqJCi1.js → contacts-address-rac-B64jiofc.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-GAujbm-z.js → contacts-birthdate-rac-CM4GjTBV.js} +1 -1
- package/dist/component/{contacts-company-rac-CLcEz04V.js → contacts-company-rac-DTf9dwuR.js} +1 -1
- package/dist/component/{contacts-email-rac-D9q7TJwy.js → contacts-email-rac-B2vhNF_y.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BAecbeNQ.js → contacts-first-name-rac-C5ywHnnX.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Ccrw8BDa.js → contacts-last-name-rac-C2JbeG_J.js} +1 -1
- package/dist/component/{contacts-phone-rac-DA2N033V.js → contacts-phone-rac-Dm0PS175.js} +1 -1
- package/dist/component/{contacts-position-rac-0lAd-nCW.js → contacts-position-rac-t6bWP1Yh.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DB2ssF-E.js → contacts-subscribe-rac-D5EWQfGj.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-B-Sn92Ho.js → contacts-tax-id-rac-CXqezyXg.js} +1 -1
- package/dist/component/{date-availability-CtfWLvii.js → date-availability-CtrbZvl3.js} +1 -1
- package/dist/component/date-input-field-rac-CPLAqaMS.js +365 -0
- package/dist/component/{date-input-rac-BnWwBe2i.js → date-input-rac-DjQc-F8G.js} +1 -1
- package/dist/component/date-picker-field-rac-pA2HwauY.js +386 -0
- package/dist/component/{date-picker-rac-BhI6jOQE.js → date-picker-rac-B6M3C8dN.js} +1 -1
- package/dist/component/date-time-input-field-rac-Qz6g31Eu.js +507 -0
- package/dist/component/{date-time-input-rac-DAbopLQt.js → date-time-input-rac-D7bS3bUX.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-D_HLv0tP.js → dext-checkbox-group-rac-caVwDBtB.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BnBTlqEI.js → dext-checkbox-rac-CMxPnPT3.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Co_yfhuz.js → dext-date-picker-rac-5WBCluMk.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BSpUehb2.js → dext-date-time-input-rac-C5d1PKMu.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DPApx74L.js → dext-dropdown-rac-BPeVs1gI.js} +1 -1
- package/dist/component/{dext-email-rac-Dns6jFl4.js → dext-email-rac-BTXfUaaY.js} +1 -1
- package/dist/component/{dext-number-input-rac-DfN-xRID.js → dext-number-input-rac-DJt_dDVj.js} +1 -1
- package/dist/component/{dext-phone-rac-b5Ix3aTQ.js → dext-phone-rac-DDtneNPi.js} +1 -1
- package/dist/component/{dext-radio-group-rac-BAwIkDsJ.js → dext-radio-group-rac-DzLW_As4.js} +2 -2
- package/dist/component/{dext-rating-input-rac-mwQpCQUI.js → dext-rating-input-rac-0wwq1TR3.js} +1 -1
- package/dist/component/{dext-tags-rac-BGmElgw8.js → dext-tags-rac-Cj7nIZWu.js} +2 -2
- package/dist/component/{dext-text-area-rac-DN5HPqdg.js → dext-text-area-rac-D4Ej9MYY.js} +1 -1
- package/dist/component/{dext-text-input-rac-DEyDRhQ2.js → dext-text-input-rac-DgqBl2cb.js} +1 -1
- package/dist/component/{dext-url-input-rac-B1o3BAZE.js → dext-url-input-rac-CH-5gGxA.js} +1 -1
- package/dist/component/dismiss-icon-ejA47noY.js +69 -0
- package/dist/component/{donation-rac-Dp6PmATz.js → donation-rac-BwpE1YTR.js} +6 -6
- package/dist/component/dropdown-field-rac-CeywMN1E.js +40 -0
- package/dist/component/{dropdown-rac-eqQW-Z9k.js → dropdown-rac-DiXJLvXK.js} +1 -1
- package/dist/component/{ecom-address-rac-Q02N1v6i.js → ecom-address-rac-MD0hbW1w.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CmqVje9n.js → ecom-subscription-checkbox-rac-BssVeeXB.js} +2 -2
- package/dist/component/{email-input-field-rac-HmrdF3g7.js → email-input-field-rac-BXoueQNf.js} +4 -4
- package/dist/component/{events-repeater-rac-BSML2My0.js → events-repeater-rac-fm6lHaJ2.js} +6 -6
- package/dist/component/{events-rsvp-rac-0pI3cb2e.js → events-rsvp-rac-QV9f5chX.js} +4 -4
- package/dist/component/{field-error-headless-B3U_Gymg.js → field-error-headless-BIzDViIC.js} +1 -1
- package/dist/component/{field-label-headless-Cyy9_5qJ.js → field-label-headless-D_ubs4wp.js} +1 -1
- package/dist/component/field-rac.module-D0QzJXUv.js +32 -0
- package/dist/component/{file-upload-rac-hR9TZqk2.js → file-upload-rac-Csmt20hK.js} +5 -5
- package/dist/component/{fixed-payment-rac-CghZp6bR.js → fixed-payment-rac-BXr53Q8H.js} +4 -4
- package/dist/component/{form-BmSV4tOz.js → form-Dnq7LxSl.js} +1701 -1688
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-C7LDm89o.js → header-field-rac-9750XSxD.js} +2 -2
- package/dist/component/{header-rac-BNNzF5wQ.js → header-rac-DGSENeOk.js} +1 -1
- package/dist/component/{image-choice-rac-DLgxkKIZ.js → image-choice-rac-HX8H18Z3.js} +5 -5
- package/dist/component/{index-Dg8Fefid.js → index-pgW3uSoZ.js} +2 -2
- package/dist/component/{index-B8ObIJtL.js → index-vs-qkVQt.js} +4 -4
- package/dist/component/{isObjectLike-oBQcCfqW.js → isObjectLike-DoUrU0Hj.js} +1 -1
- package/dist/component/multiline-address-field-rac-B3gKz3u_.js +1818 -0
- package/dist/component/{multiline-address-rac-8MZkKfqY.js → multiline-address-rac-BBign7ot.js} +1 -1
- package/dist/component/native-select-BbxBpe3S.js +32 -0
- package/dist/component/{number-input-field-rac-Dmp8pNIq.js → number-input-field-rac-CO6DG443.js} +5 -5
- package/dist/component/{number-input-rac-2cN_bN_s.js → number-input-rac-C_Ndaqs4.js} +1 -1
- package/dist/component/{password-rac-CFdC1hoi.js → password-rac-pq-CaSkt.js} +5 -5
- package/dist/component/{payment-input-rac-BWElGzuv.js → payment-input-rac-Dco8O86k.js} +5 -5
- package/dist/component/phone-input-field-rac-BmcADPkC.js +558 -0
- package/dist/component/{phone-rac-CE9-90C3.js → phone-rac-B3aFMUMq.js} +1 -1
- package/dist/component/{product-list-rac-QU7Ocwvy.js → product-list-rac-Cw21coVk.js} +6 -6
- package/dist/component/{quiz-radio-group-rac-Hm7B7RlU.js → quiz-radio-group-rac-ChkNtxix.js} +1 -1
- package/dist/component/{radio-button-module-classes-CcGF7N_Y.js → radio-button-module-classes-BtiG6yqb.js} +3 -3
- package/dist/component/{radio-group-field-rac-Bk1JBBts.js → radio-group-field-rac-6SefZCE6.js} +5 -5
- package/dist/component/{radio-group-rac-D_YZnpID.js → radio-group-rac-BRhOFR2j.js} +1 -1
- package/dist/component/{rating-input-field-rac-zvA6QBGo.js → rating-input-field-rac-DaVnkb6k.js} +5 -5
- package/dist/component/{rating-input-rac-CXVQUoi-.js → rating-input-rac-B-2pZ61H.js} +1 -1
- package/dist/component/{rich-content-rac.module-CnZ4lMBG.js → rich-content-rac.module-C6LD--Ql.js} +1 -1
- package/dist/component/{rich-text-field-rac-DYQgVXdV.js → rich-text-field-rac-C-rfA6pQ.js} +2 -2
- package/dist/component/{rich-text-rac-Dk8396e-.js → rich-text-rac-1s5CGO8u.js} +1 -1
- package/dist/component/service-dropdown-rac-Bcr83doj.js +150 -0
- package/dist/component/{services-multi-choice-rac-D1RiVaLW.js → services-multi-choice-rac-C9nSuz9x.js} +7 -7
- package/dist/component/{signature-rac-DcGKMX84.js → signature-rac-pgob6vV_.js} +5 -5
- package/dist/component/{submit-button-rac-DbMxQlNH.js → submit-button-rac-CzcFB8hM.js} +2 -2
- package/dist/component/{tags-field-rac-Bi4lKutL.js → tags-field-rac-BBFxSNch.js} +6 -6
- package/dist/component/{tags-rac-DDCPnT8M.js → tags-rac-DkwugVvK.js} +1 -1
- package/dist/component/{text-area-field-rac-cre_K0MD.js → text-area-field-rac-DHT-fc0i.js} +5 -5
- package/dist/component/{text-area-rac-61wsMj-j.js → text-area-rac-cTq-i-bf.js} +1 -1
- package/dist/component/{text-input-field-rac-CV5_ba0x.js → text-input-field-rac-D3v-e_5R.js} +4 -4
- package/dist/component/{text-input-headless-kRv3KpSL.js → text-input-headless-B-DwvpWg.js} +3 -3
- package/dist/component/{text-input-rac-CwqZ6NXO.js → text-input-rac-CpG9qt33.js} +1 -1
- package/dist/component/time-input-rac-iL1G8Uwo.js +212 -0
- package/dist/component/to-native-time-Co_gOLkc.js +9 -0
- package/dist/component/{url-input-field-rac-C1JL_m6D.js → url-input-field-rac-1P81rK_4.js} +5 -5
- package/dist/component/{url-input-rac-C1CiGrCn.js → url-input-rac-D9c0BJKG.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-COGEk5d6.js → use-dropdown-option-class-name-CyC7rDCE.js} +3 -3
- package/dist/component/use-dropdown-trigger-class-name-BvRCjLXG.js +137 -0
- package/dist/component/{use-element-state-class-name-pSOX0Y0p.js → use-element-state-class-name-Cpdx_lRm.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-DGEpOAdi.js → use-hoverable-input-class-name-zEk2Vnct.js} +3 -3
- package/dist/component/{use-is-forced-open-dropdown-DPG1e5E9.js → use-is-forced-open-dropdown-_YI6RNG3.js} +1 -1
- package/dist/component/use-native-mobile-input-Czyhb-0V.js +31 -0
- package/dist/component/use-native-state-class-name-B0m2ghbS.js +18 -0
- package/dist/component/{use-service-options-base-BgIZ94V9.js → use-service-options-base-CbFG_r1u.js} +1 -1
- package/dist/component/use-text-input-class-name-CL-b4_Ph.js +6 -0
- package/package.json +3 -2
- package/dist/component/date-input-field-rac-CiAaOiYY.js +0 -309
- package/dist/component/date-picker-field-rac-Dg-chlTL.js +0 -320
- package/dist/component/date-time-input-field-rac-CbDvEPIp.js +0 -441
- package/dist/component/dropdown-field-rac-DY3GGJgP.js +0 -36
- package/dist/component/field-rac.module-DcyJyi2B.js +0 -25
- package/dist/component/multiline-address-field-rac-CgH7lDce.js +0 -1738
- package/dist/component/phone-input-field-rac-CsJGw_OE.js +0 -520
- package/dist/component/service-dropdown-rac-BSXYuBPJ.js +0 -145
- package/dist/component/time-input-rac-DuQar6zW.js +0 -161
- package/dist/component/use-dropdown-trigger-class-name-D6c-3Lyw.js +0 -98
- package/dist/component/use-text-input-class-name-BcbHdFV-.js +0 -6
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import e, { useCallback as Q, useRef as H, useContext as X } from "react";
|
|
2
|
+
import { RicosViewer as Y } from "@wix/ricos/viewer";
|
|
3
|
+
import u from "classnames";
|
|
4
|
+
import { bN as N, bK as k, bP as U, bY as g, X as z, am as G, M as J, I as W } from "./form-Dnq7LxSl.js";
|
|
5
|
+
import { parseTime as Z } from "@internationalized/date";
|
|
6
|
+
import { mergeProps as $ } from "react-aria";
|
|
7
|
+
import { TimeField as ee, DateInput as te, DateSegment as v, TimeFieldStateContext as ne } from "react-aria-components";
|
|
8
|
+
import { f as m, a as _ } from "./find-child-C60k4CxG.js";
|
|
9
|
+
import { D as re, E as ae } from "./field-error-headless-BIzDViIC.js";
|
|
10
|
+
import { L as oe } from "./field-label-headless-D_ubs4wp.js";
|
|
11
|
+
import { u as le, a as se, N as ie, D as ce } from "./dismiss-icon-ejA47noY.js";
|
|
12
|
+
import { u as me, N as ue } from "./use-native-mobile-input-Czyhb-0V.js";
|
|
13
|
+
import { t as de } from "./to-native-time-Co_gOLkc.js";
|
|
14
|
+
import { u as pe } from "./use-native-state-class-name-B0m2ghbS.js";
|
|
15
|
+
import { E as Ee } from "./error-icon-hZxQ6DEy.js";
|
|
16
|
+
import { H as B } from "./custom-focus-class-_483Pkwp.js";
|
|
17
|
+
import { s as f } from "./field-rac.module-D0QzJXUv.js";
|
|
18
|
+
import { u as x } from "./use-text-input-class-name-CL-b4_Ph.js";
|
|
19
|
+
const n = ({ children: t }) => {
|
|
20
|
+
const { id: r, value: a, onChange: s, disabled: i, readOnly: o, required: c, onBlur: l, onFocus: p, use24HourFormat: S, FieldLayout: F, hasError: y } = N(), { inputId: C, ariaDescribedBy: D, labelId: b } = k(), T = me(), h = Q((j) => {
|
|
21
|
+
const K = w(j);
|
|
22
|
+
s(K);
|
|
23
|
+
}, [
|
|
24
|
+
s
|
|
25
|
+
]), R = m(t, n.Label), L = m(t, n.Time), P = m(t, n.Description), O = m(t, n.Error), A = m(t, n.NativeTime), M = V(a), E = T ? A : /* @__PURE__ */ e.createElement(ee, {
|
|
26
|
+
"aria-labelledby": b,
|
|
27
|
+
id: C,
|
|
28
|
+
"aria-describedby": D,
|
|
29
|
+
value: M,
|
|
30
|
+
onChange: h,
|
|
31
|
+
isDisabled: i,
|
|
32
|
+
isReadOnly: o,
|
|
33
|
+
isInvalid: y,
|
|
34
|
+
isRequired: c,
|
|
35
|
+
onBlur: l,
|
|
36
|
+
onFocus: p,
|
|
37
|
+
hourCycle: S ? 24 : 12
|
|
38
|
+
}, L);
|
|
39
|
+
return /* @__PURE__ */ e.createElement(F, {
|
|
40
|
+
fieldId: r,
|
|
41
|
+
renderLabel: () => R,
|
|
42
|
+
renderInput: () => E,
|
|
43
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, O, P)
|
|
44
|
+
});
|
|
45
|
+
}, d = ({ children: t, className: r }) => {
|
|
46
|
+
const { hasError: a, hidePlaceholder: s } = N(), i = m(t, d.Hour), o = m(t, d.Minute), c = m(t, d.Period);
|
|
47
|
+
return /* @__PURE__ */ e.createElement(te, {
|
|
48
|
+
className: r,
|
|
49
|
+
"data-invalid": a || void 0,
|
|
50
|
+
"data-placeholder-hidden": s || void 0
|
|
51
|
+
}, (l) => {
|
|
52
|
+
switch (l.type) {
|
|
53
|
+
case "hour":
|
|
54
|
+
return _(i, {
|
|
55
|
+
segment: l
|
|
56
|
+
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
57
|
+
case "minute":
|
|
58
|
+
return _(o, {
|
|
59
|
+
segment: l
|
|
60
|
+
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
61
|
+
case "dayPeriod":
|
|
62
|
+
return _(c, {
|
|
63
|
+
segment: l
|
|
64
|
+
}) || /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
65
|
+
case "literal":
|
|
66
|
+
return /* @__PURE__ */ e.createElement(v, {
|
|
67
|
+
segment: l
|
|
68
|
+
});
|
|
69
|
+
default:
|
|
70
|
+
return /* @__PURE__ */ e.createElement(e.Fragment, null);
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}, fe = ({ className: t, ...r }) => {
|
|
74
|
+
const { id: a, hidePlaceholder: s } = N(), { segment: i } = r, { t: o } = g(), c = H(null);
|
|
75
|
+
U(() => {
|
|
76
|
+
var p;
|
|
77
|
+
(p = c.current) == null || p.focus({
|
|
78
|
+
preventScroll: !0
|
|
79
|
+
});
|
|
80
|
+
}, a);
|
|
81
|
+
const l = s ? void 0 : o("field.date.placeholder.hour");
|
|
82
|
+
return /* @__PURE__ */ e.createElement(v, {
|
|
83
|
+
ref: c,
|
|
84
|
+
segment: i,
|
|
85
|
+
className: t,
|
|
86
|
+
...l && {
|
|
87
|
+
placeholder: l
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}, Ne = ({ className: t, ...r }) => {
|
|
91
|
+
const { hidePlaceholder: a } = N(), { segment: s } = r, { t: i } = g(), o = a ? void 0 : i("field.date.placeholder.minute");
|
|
92
|
+
return /* @__PURE__ */ e.createElement(v, {
|
|
93
|
+
segment: s,
|
|
94
|
+
className: t,
|
|
95
|
+
...o && {
|
|
96
|
+
placeholder: o
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}, Ce = ({ className: t, ...r }) => {
|
|
100
|
+
const { hidePlaceholder: a } = N(), { segment: s } = r, { t: i } = g(), o = X(ne), c = a ? void 0 : i("field.date.placeholder.period"), l = () => o == null ? void 0 : o.increment("dayPeriod");
|
|
101
|
+
return /* @__PURE__ */ e.createElement(v, {
|
|
102
|
+
segment: s,
|
|
103
|
+
className: t,
|
|
104
|
+
onClick: l,
|
|
105
|
+
...c && {
|
|
106
|
+
placeholder: c
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
d.Hour = fe;
|
|
111
|
+
d.Minute = Ne;
|
|
112
|
+
d.Period = Ce;
|
|
113
|
+
const q = ({ className: t, children: r }) => {
|
|
114
|
+
const { id: a, value: s, onChange: i, required: o, disabled: c, readOnly: l, hasError: p, onBlur: S, onFocus: F } = N(), { inputId: y, labelId: C, ariaDescribedBy: D } = k(), b = H(null), T = H(null);
|
|
115
|
+
U(() => {
|
|
116
|
+
var E;
|
|
117
|
+
(E = b.current) == null || E.focus({
|
|
118
|
+
preventScroll: !0
|
|
119
|
+
});
|
|
120
|
+
}, a);
|
|
121
|
+
const h = de(V(s)), { announcement: R, announceCleared: L } = le(!!h), P = !!h && !o && !c && !l, O = m(r, q.Clear), { className: A, stateProps: M } = pe(t);
|
|
122
|
+
return /* @__PURE__ */ e.createElement(ue, {
|
|
123
|
+
ref: T,
|
|
124
|
+
groupLabelId: C,
|
|
125
|
+
announcement: R
|
|
126
|
+
}, /* @__PURE__ */ e.createElement(se, {
|
|
127
|
+
ref: b,
|
|
128
|
+
type: "time",
|
|
129
|
+
id: y,
|
|
130
|
+
className: A,
|
|
131
|
+
...$(M, {
|
|
132
|
+
onFocus: F,
|
|
133
|
+
onBlur: S
|
|
134
|
+
}),
|
|
135
|
+
"aria-labelledby": C,
|
|
136
|
+
"aria-describedby": D,
|
|
137
|
+
"aria-invalid": p || void 0,
|
|
138
|
+
value: h,
|
|
139
|
+
onChange: (E) => i(w(V(E))),
|
|
140
|
+
disabled: c,
|
|
141
|
+
readOnly: l,
|
|
142
|
+
required: o
|
|
143
|
+
}), P ? _(O, {
|
|
144
|
+
input: b,
|
|
145
|
+
control: T,
|
|
146
|
+
labelId: C,
|
|
147
|
+
onClear: () => {
|
|
148
|
+
i(null), L();
|
|
149
|
+
}
|
|
150
|
+
}) : null);
|
|
151
|
+
};
|
|
152
|
+
q.Clear = ie;
|
|
153
|
+
n.Label = oe;
|
|
154
|
+
n.NativeTime = q;
|
|
155
|
+
n.Time = d;
|
|
156
|
+
n.Description = re;
|
|
157
|
+
n.Error = ae;
|
|
158
|
+
function V(t) {
|
|
159
|
+
if (!t)
|
|
160
|
+
return null;
|
|
161
|
+
try {
|
|
162
|
+
return Z(t);
|
|
163
|
+
} catch {
|
|
164
|
+
return null;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
function w(t) {
|
|
168
|
+
if (!t)
|
|
169
|
+
return null;
|
|
170
|
+
const r = String(t.hour).padStart(2, "0"), a = String(t.minute).padStart(2, "0"), s = String(t.second).padStart(2, "0");
|
|
171
|
+
return [
|
|
172
|
+
r,
|
|
173
|
+
a,
|
|
174
|
+
s
|
|
175
|
+
].join(":");
|
|
176
|
+
}
|
|
177
|
+
const be = "_time_5p151_1", he = "_hour_5p151_17", Te = "_minute_5p151_18", Ie = "_period_5p151_19", I = {
|
|
178
|
+
time: be,
|
|
179
|
+
hour: he,
|
|
180
|
+
minute: Te,
|
|
181
|
+
period: Ie
|
|
182
|
+
}, _e = ({ content: t, locale: r }) => /* @__PURE__ */ e.createElement(Y, {
|
|
183
|
+
content: t,
|
|
184
|
+
locale: r
|
|
185
|
+
}), ge = () => {
|
|
186
|
+
const t = x(I.time), r = x(f.nativeInput), { t: a } = g();
|
|
187
|
+
return /* @__PURE__ */ e.createElement(n, null, /* @__PURE__ */ e.createElement(n.Label, {
|
|
188
|
+
className: u(z, f.label)
|
|
189
|
+
}, /* @__PURE__ */ e.createElement(n.Label.Required, {
|
|
190
|
+
className: u(G, f.requiredMark)
|
|
191
|
+
})), /* @__PURE__ */ e.createElement(n.Time, {
|
|
192
|
+
className: t
|
|
193
|
+
}, /* @__PURE__ */ e.createElement(n.Time.Hour, {
|
|
194
|
+
className: u(I.hour, B)
|
|
195
|
+
}), /* @__PURE__ */ e.createElement(n.Time.Minute, {
|
|
196
|
+
className: u(I.minute, B)
|
|
197
|
+
}), /* @__PURE__ */ e.createElement(n.Time.Period, {
|
|
198
|
+
className: u(I.period, B)
|
|
199
|
+
})), /* @__PURE__ */ e.createElement(n.NativeTime, {
|
|
200
|
+
className: r
|
|
201
|
+
}, /* @__PURE__ */ e.createElement(n.NativeTime.Clear, {
|
|
202
|
+
className: f.nativeClearButton,
|
|
203
|
+
"aria-label": a("date-picker.a11y.clear-button")
|
|
204
|
+
}, /* @__PURE__ */ e.createElement(ce, null))), /* @__PURE__ */ e.createElement(n.Error, {
|
|
205
|
+
className: u(J, f.error)
|
|
206
|
+
}, /* @__PURE__ */ e.createElement(Ee, null), /* @__PURE__ */ e.createElement(n.Error.Text, null)), /* @__PURE__ */ e.createElement(n.Description, {
|
|
207
|
+
className: u(W, f.description)
|
|
208
|
+
}, _e));
|
|
209
|
+
}, we = () => /* @__PURE__ */ e.createElement(ge, null);
|
|
210
|
+
export {
|
|
211
|
+
we as TimeInputRAC
|
|
212
|
+
};
|
|
@@ -2,14 +2,14 @@ import { RicosViewer as S } from "@wix/ricos/viewer";
|
|
|
2
2
|
import i from "classnames";
|
|
3
3
|
import r, { useCallback as h, useRef as y } from "react";
|
|
4
4
|
import { TextField as O, Input as A } from "react-aria-components";
|
|
5
|
-
import { bN as d, bK as E, bP as P, bW as v, X as B, am as M, M as T, I as g } from "./form-
|
|
5
|
+
import { bN as d, bK as E, bP as P, bW as v, X as B, am as M, M as T, I as g } from "./form-Dnq7LxSl.js";
|
|
6
6
|
import { f as c } from "./find-child-C60k4CxG.js";
|
|
7
|
-
import { D as k, E as q } from "./field-error-headless-
|
|
8
|
-
import { L as x } from "./field-label-headless-
|
|
7
|
+
import { D as k, E as q } from "./field-error-headless-BIzDViIC.js";
|
|
8
|
+
import { L as x } from "./field-label-headless-D_ubs4wp.js";
|
|
9
9
|
import { u as U } from "./use-invoke-callback-UH73A_J3.js";
|
|
10
10
|
import { E as V } from "./error-icon-hZxQ6DEy.js";
|
|
11
|
-
import { s as u } from "./field-rac.module-
|
|
12
|
-
import { u as W } from "./use-text-input-class-name-
|
|
11
|
+
import { s as u } from "./field-rac.module-D0QzJXUv.js";
|
|
12
|
+
import { u as W } from "./use-text-input-class-name-CL-b4_Ph.js";
|
|
13
13
|
const w = (t) => t ? `https://${String(t).replace(/^https?:\/\//, "")}` : "", e = ({ children: t }) => {
|
|
14
14
|
const { id: o, value: a, onChange: l, disabled: m, readOnly: s, required: n, hasError: I, onBlur: b, onFocus: f, FieldLayout: R } = d(), { labelId: F } = E(), p = U(b), L = c(t, e.Label), D = c(t, e.Input), C = c(t, e.Description), _ = c(t, e.Error), N = h(() => {
|
|
15
15
|
l(w(a)), p();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import d, { useContext as _, useRef as L, useState as m, Children as N, useLayoutEffect as p, useMemo as D } from "react";
|
|
2
2
|
import { CollectionRendererContext as g, DefaultCollectionRenderer as E, ListBox as M } from "react-aria-components";
|
|
3
3
|
import P from "classnames";
|
|
4
|
-
import { s as h } from "./field-rac.module-
|
|
5
|
-
import { K as T } from "./form-
|
|
6
|
-
import { u as H } from "./use-element-state-class-name-
|
|
4
|
+
import { s as h } from "./field-rac.module-D0QzJXUv.js";
|
|
5
|
+
import { K as T } from "./form-Dnq7LxSl.js";
|
|
6
|
+
import { u as H } from "./use-element-state-class-name-Cpdx_lRm.js";
|
|
7
7
|
const R = 1 / 0, I = {
|
|
8
8
|
position: "absolute",
|
|
9
9
|
width: 0,
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import t, { useState as T, useCallback as R, useRef as V } from "react";
|
|
2
|
+
import { UNSAFE_PortalProvider as U, mergeProps as W } from "react-aria";
|
|
3
|
+
import { VisuallyHidden as j, Select as z, SelectValue as J, ListBoxItem as Q } from "react-aria-components";
|
|
4
|
+
import { bN as g, bK as L, bY as X, bP as B, L as Z } from "./form-Dnq7LxSl.js";
|
|
5
|
+
import { f as u, a as q } from "./find-child-C60k4CxG.js";
|
|
6
|
+
import { D as ee, E as te } from "./field-error-headless-BIzDViIC.js";
|
|
7
|
+
import { L as ae } from "./field-label-headless-D_ubs4wp.js";
|
|
8
|
+
import { u as re, N as ne } from "./use-native-mobile-input-Czyhb-0V.js";
|
|
9
|
+
import { N as le } from "./native-select-BbxBpe3S.js";
|
|
10
|
+
import { E as se, S as oe, N as ie } from "./non-modal-popover-D-u13tmp.js";
|
|
11
|
+
import { b as ce } from "./use-is-forced-open-dropdown-_YI6RNG3.js";
|
|
12
|
+
import { u as de } from "./use-native-state-class-name-B0m2ghbS.js";
|
|
13
|
+
import { V as ue } from "./use-dropdown-option-class-name-CyC7rDCE.js";
|
|
14
|
+
import { u as me } from "./use-hoverable-input-class-name-zEk2Vnct.js";
|
|
15
|
+
const s = ({ children: e }) => {
|
|
16
|
+
const { id: r, value: o, defaultValue: a, options: d = [], readOnly: n, onChange: l, placeholder: m, disabled: c, required: p, onBlur: v, onFocus: N, FieldLayout: O, hasError: C } = g(), [F, y] = T(!1), b = ce(r), [f, D] = T(null), I = re(), i = _(o, a, d), { labelId: S } = L(), { t: w } = X(), P = `${S}-required`, x = R((E) => {
|
|
17
|
+
n || l(typeof E == "string" ? E : null);
|
|
18
|
+
}, [
|
|
19
|
+
l,
|
|
20
|
+
n
|
|
21
|
+
]), M = R((E) => y(E && !c && !n), [
|
|
22
|
+
c,
|
|
23
|
+
n
|
|
24
|
+
]), A = u(e, s.Label), H = u(e, s.Trigger), $ = u(e, s.Options), k = u(e, s.Description), G = u(e, s.Error), Y = u(e, s.NativeSelect), K = I ? Y : /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement("div", {
|
|
25
|
+
ref: D,
|
|
26
|
+
style: {
|
|
27
|
+
display: "contents"
|
|
28
|
+
}
|
|
29
|
+
}), p ? /* @__PURE__ */ t.createElement(j, {
|
|
30
|
+
id: P
|
|
31
|
+
}, w("settings.required-indicator-text")) : null, /* @__PURE__ */ t.createElement(U, {
|
|
32
|
+
getContainer: () => f
|
|
33
|
+
}, /* @__PURE__ */ t.createElement(z, {
|
|
34
|
+
"aria-labelledby": p ? `${S} ${P}` : S,
|
|
35
|
+
value: i,
|
|
36
|
+
isOpen: b || F && !c && !n,
|
|
37
|
+
onOpenChange: b ? void 0 : M,
|
|
38
|
+
onChange: x,
|
|
39
|
+
isDisabled: c,
|
|
40
|
+
isInvalid: C,
|
|
41
|
+
isRequired: p,
|
|
42
|
+
placeholder: m || se,
|
|
43
|
+
onBlur: v,
|
|
44
|
+
onFocus: N
|
|
45
|
+
}, H, q($, {
|
|
46
|
+
isForcedOpen: b
|
|
47
|
+
}))));
|
|
48
|
+
return /* @__PURE__ */ t.createElement(O, {
|
|
49
|
+
fieldId: r,
|
|
50
|
+
renderLabel: () => A,
|
|
51
|
+
renderInput: () => K,
|
|
52
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, G, k)
|
|
53
|
+
});
|
|
54
|
+
}, pe = ({ children: e, className: r }) => {
|
|
55
|
+
const { inputId: o, ariaDescribedBy: a } = L(), { id: d, hasError: n, isLoading: l } = g(), m = V(null);
|
|
56
|
+
return B(() => {
|
|
57
|
+
var c;
|
|
58
|
+
(c = m.current) == null || c.focus({
|
|
59
|
+
preventScroll: !0
|
|
60
|
+
});
|
|
61
|
+
}, d), /* @__PURE__ */ t.createElement(oe, {
|
|
62
|
+
ref: m,
|
|
63
|
+
id: o,
|
|
64
|
+
"aria-describedby": a,
|
|
65
|
+
className: r,
|
|
66
|
+
"data-invalid": n || void 0,
|
|
67
|
+
"data-loading": l || void 0
|
|
68
|
+
}, /* @__PURE__ */ t.createElement(J, null), e);
|
|
69
|
+
}, h = ({ children: e, className: r, ...o }) => {
|
|
70
|
+
const { isForcedOpen: a } = o, { options: d = [] } = g(), n = u(e, h.Option);
|
|
71
|
+
return /* @__PURE__ */ t.createElement(ie, {
|
|
72
|
+
className: r,
|
|
73
|
+
containerPadding: 0,
|
|
74
|
+
offset: 0
|
|
75
|
+
}, /* @__PURE__ */ t.createElement(ue, {
|
|
76
|
+
isForcedOpen: a,
|
|
77
|
+
autoFocus: a ? !1 : void 0
|
|
78
|
+
}, d.map((l) => q(n, {
|
|
79
|
+
key: l.value ?? l.label,
|
|
80
|
+
value: l.value ?? l.label,
|
|
81
|
+
label: l.label
|
|
82
|
+
}))));
|
|
83
|
+
}, be = ({ className: e, ...r }) => {
|
|
84
|
+
const { value: o, label: a } = r;
|
|
85
|
+
return /* @__PURE__ */ t.createElement(Q, {
|
|
86
|
+
className: e,
|
|
87
|
+
id: o,
|
|
88
|
+
textValue: a
|
|
89
|
+
}, a);
|
|
90
|
+
};
|
|
91
|
+
h.Option = be;
|
|
92
|
+
const fe = ({ className: e, children: r }) => {
|
|
93
|
+
const { id: o, value: a, defaultValue: d, options: n = [], readOnly: l, onChange: m, placeholder: c, disabled: p, required: v, onBlur: N, onFocus: O, hasError: C } = g(), { inputId: F, labelId: y, ariaDescribedBy: b } = L(), f = V(null);
|
|
94
|
+
B(() => {
|
|
95
|
+
var i;
|
|
96
|
+
(i = f.current) == null || i.focus({
|
|
97
|
+
preventScroll: !0
|
|
98
|
+
});
|
|
99
|
+
}, o);
|
|
100
|
+
const { className: D, stateProps: I } = de(e);
|
|
101
|
+
return /* @__PURE__ */ t.createElement(ne, null, /* @__PURE__ */ t.createElement(le, {
|
|
102
|
+
ref: f,
|
|
103
|
+
id: F,
|
|
104
|
+
className: D,
|
|
105
|
+
...W(I, {
|
|
106
|
+
onFocus: O,
|
|
107
|
+
onBlur: N
|
|
108
|
+
}),
|
|
109
|
+
"aria-labelledby": y,
|
|
110
|
+
"aria-describedby": b,
|
|
111
|
+
"aria-invalid": C || void 0,
|
|
112
|
+
value: _(a, d, n),
|
|
113
|
+
options: n.map((i) => ({
|
|
114
|
+
value: i.value ?? i.label,
|
|
115
|
+
label: i.label
|
|
116
|
+
})),
|
|
117
|
+
placeholder: c,
|
|
118
|
+
onChange: (i) => m(i || null),
|
|
119
|
+
disabled: p,
|
|
120
|
+
readOnly: l,
|
|
121
|
+
required: v
|
|
122
|
+
}), r);
|
|
123
|
+
};
|
|
124
|
+
s.Label = ae;
|
|
125
|
+
s.NativeSelect = fe;
|
|
126
|
+
s.Trigger = pe;
|
|
127
|
+
s.Options = h;
|
|
128
|
+
s.Description = ee;
|
|
129
|
+
s.Error = te;
|
|
130
|
+
function _(e, r, o) {
|
|
131
|
+
return e && o.some((a) => (a.value ?? a.label) === e) ? e : r || null;
|
|
132
|
+
}
|
|
133
|
+
const Te = (...e) => me(Z, e);
|
|
134
|
+
export {
|
|
135
|
+
s as D,
|
|
136
|
+
Te as u
|
|
137
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import i from "classnames";
|
|
2
|
-
import { bG as s, bc as v } from "./form-
|
|
2
|
+
import { bG as s, bc as v } from "./form-Dnq7LxSl.js";
|
|
3
3
|
const x = ({ globalClasses: e, moduleClasses: r }) => {
|
|
4
4
|
var d;
|
|
5
5
|
const c = ((d = s(...v(e))) == null ? void 0 : d.split(/\s+/)) ?? [], o = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { bN as n } from "./form-
|
|
2
|
-
import { s as e } from "./field-rac.module-
|
|
3
|
-
import { u } from "./use-element-state-class-name-
|
|
1
|
+
import { bN as n } from "./form-Dnq7LxSl.js";
|
|
2
|
+
import { s as e } from "./field-rac.module-D0QzJXUv.js";
|
|
3
|
+
import { u } from "./use-element-state-class-name-Cpdx_lRm.js";
|
|
4
4
|
const b = (s, a) => {
|
|
5
5
|
const { disabled: t, readOnly: o } = n(), r = u({
|
|
6
6
|
globalClasses: s,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import o, { forwardRef as r, useSyncExternalStore as a } from "react";
|
|
2
|
+
import { VisuallyHidden as c } from "react-aria-components";
|
|
3
|
+
import { bI as d, d as l } from "./form-Dnq7LxSl.js";
|
|
4
|
+
const E = {
|
|
5
|
+
position: "relative"
|
|
6
|
+
}, p = /* @__PURE__ */ r(({ groupLabelId: t, announcement: e, children: s }, i) => /* @__PURE__ */ o.createElement("div", {
|
|
7
|
+
ref: i,
|
|
8
|
+
style: E,
|
|
9
|
+
...t && {
|
|
10
|
+
role: "group",
|
|
11
|
+
"aria-labelledby": t,
|
|
12
|
+
tabIndex: -1
|
|
13
|
+
}
|
|
14
|
+
}, s, e !== void 0 && /* @__PURE__ */ o.createElement(c, {
|
|
15
|
+
role: "status"
|
|
16
|
+
}, e)));
|
|
17
|
+
p.displayName = "NativeControl";
|
|
18
|
+
const f = "(max-width: 750px)", n = () => typeof window < "u" && typeof window.matchMedia == "function" ? window.matchMedia(f) : void 0, m = (t) => {
|
|
19
|
+
const e = n();
|
|
20
|
+
return e == null || e.addEventListener("change", t), () => e == null ? void 0 : e.removeEventListener("change", t);
|
|
21
|
+
}, u = () => {
|
|
22
|
+
var t;
|
|
23
|
+
return ((t = n()) == null ? void 0 : t.matches) ?? !1;
|
|
24
|
+
}, w = () => !1, I = () => a(m, u, w), M = () => {
|
|
25
|
+
const { isExperimentEnabled: t } = d(), e = I();
|
|
26
|
+
return t(l.ERC_NATIVE_MOBILE_INPUTS) && e;
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
p as N,
|
|
30
|
+
M as u
|
|
31
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useState as c } from "react";
|
|
2
|
+
import { useHover as n, useFocus as i, mergeProps as a } from "react-aria";
|
|
3
|
+
const m = (s) => {
|
|
4
|
+
const { hoverProps: o, isHovered: e } = n({}), [t, r] = c(!1), { focusProps: u } = i({
|
|
5
|
+
onFocusChange: r
|
|
6
|
+
});
|
|
7
|
+
return {
|
|
8
|
+
className: typeof s == "function" ? s({
|
|
9
|
+
isHovered: e,
|
|
10
|
+
isFocused: t,
|
|
11
|
+
isFocusWithin: !1
|
|
12
|
+
}) : s,
|
|
13
|
+
stateProps: a(o, u)
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
m as u
|
|
18
|
+
};
|
package/dist/component/{use-service-options-base-BgIZ94V9.js → use-service-options-base-CbFG_r1u.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState as o, useCallback as y, useEffect as m, useMemo as D } from "react";
|
|
2
|
-
import { bM as v } from "./form-
|
|
2
|
+
import { bM as v } from "./form-Dnq7LxSl.js";
|
|
3
3
|
const S = (I) => {
|
|
4
4
|
const { fieldType: L, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = I, [O, h] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(L), r = y((e) => {
|
|
5
5
|
let d = e.map((l) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/form-elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.225.0",
|
|
4
4
|
"description": "The Wix Forms rendering element for Builder apps, loaded at runtime as @wix/form-elements/Form",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"@wix/services-definitions": "^1.0.5",
|
|
59
59
|
"@wix/site-service-captcha": "^1.0.1",
|
|
60
60
|
"@wix/site-service-editor-context": "^1.0.7",
|
|
61
|
+
"@wix/site-service-experiments": "^1.0.8",
|
|
61
62
|
"@wix/site-service-lightbox": "^3.0.0",
|
|
62
63
|
"@wix/site-service-locale": "^1.0.10",
|
|
63
64
|
"@wix/site-service-pages": "^1.10.0",
|
|
@@ -156,5 +157,5 @@
|
|
|
156
157
|
]
|
|
157
158
|
}
|
|
158
159
|
},
|
|
159
|
-
"falconPackageHash": "
|
|
160
|
+
"falconPackageHash": "f895a613e601afae90697936a030baeb697fea27cada75c58acdd14a"
|
|
160
161
|
}
|