@wix/form-elements 1.223.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
|
@@ -1,441 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as se } from "@wix/ricos/viewer";
|
|
2
|
-
import E from "classnames";
|
|
3
|
-
import t, { useMemo as L, useState as j, useCallback as U, useRef as z, useContext as le } from "react";
|
|
4
|
-
import { parseTime as ie } from "@internationalized/date";
|
|
5
|
-
import { UNSAFE_PortalProvider as ce } from "react-aria";
|
|
6
|
-
import { ListBoxItem as me, Select as de, TextField as Q, TimeField as ue, SelectValue as pe, Input as W, DateInput as Ee, DateSegment as x, TimeFieldStateContext as fe } from "react-aria-components";
|
|
7
|
-
import { bN as b, bK as J, bF as $, bh as Z, bu as ee, b4 as d, bY as y, by as K, bj as be, bb as he, bC as _e, bd as X, bP as q, u as Ie, X as ge, am as De, w as V, x as Ne, M as Te, I as Oe, v as Le, y as ye, z as k } from "./form-BmSV4tOz.js";
|
|
8
|
-
import { f as u, a as C } from "./find-child-C60k4CxG.js";
|
|
9
|
-
import { g as Fe } from "./helpers-HmkkXrh2.js";
|
|
10
|
-
import { D as Pe, E as Ce } from "./field-error-headless-B3U_Gymg.js";
|
|
11
|
-
import { L as Me } from "./field-label-headless-Cyy9_5qJ.js";
|
|
12
|
-
import { F as Se } from "./fieldset-headless-CD3fds9J.js";
|
|
13
|
-
import { N as Re, E as Ae, S as ve } from "./non-modal-popover-D-u13tmp.js";
|
|
14
|
-
import { u as we } from "./use-is-forced-open-dropdown-DPG1e5E9.js";
|
|
15
|
-
import { V as Ve, a as Ye } from "./use-dropdown-option-class-name-COGEk5d6.js";
|
|
16
|
-
import { C as He } from "./chevron-down-icon-CcpVm6B-.js";
|
|
17
|
-
import { E as Ue } from "./error-icon-hZxQ6DEy.js";
|
|
18
|
-
import { H as Y } from "./custom-focus-class-_483Pkwp.js";
|
|
19
|
-
import { s as _ } from "./field-rac.module-DcyJyi2B.js";
|
|
20
|
-
import { u as H } from "./use-hoverable-input-class-name-DGEpOAdi.js";
|
|
21
|
-
const l = ({ children: e, className: a }) => {
|
|
22
|
-
const { id: n, required: r, onBlur: o, onFocus: s, FieldLayout: i } = b(), { inputId: m, labelId: c, ariaDescribedBy: h } = J(), { regionalFormat: p } = $(), N = L(() => Z(p).filter(ee).map((S) => S.toUpperCase()), [
|
|
23
|
-
p
|
|
24
|
-
]), M = u(e, l.Label), v = u(e, l.Description), g = u(e, l.Error), D = {
|
|
25
|
-
[d.MONTH]: u(e, l.Month),
|
|
26
|
-
[d.DAY]: u(e, l.Day),
|
|
27
|
-
[d.YEAR]: u(e, l.Year)
|
|
28
|
-
}, T = u(e, l.Time);
|
|
29
|
-
return /* @__PURE__ */ t.createElement(i, {
|
|
30
|
-
fieldId: n,
|
|
31
|
-
renderLabel: () => C(M, {
|
|
32
|
-
as: "div"
|
|
33
|
-
}),
|
|
34
|
-
renderInput: () => /* @__PURE__ */ t.createElement(Se, {
|
|
35
|
-
id: m,
|
|
36
|
-
ariaLabelledBy: c,
|
|
37
|
-
ariaDescribedBy: h,
|
|
38
|
-
required: r,
|
|
39
|
-
onBlur: o,
|
|
40
|
-
onFocus: s,
|
|
41
|
-
className: a
|
|
42
|
-
}, D[N[0]], D[N[1]], D[N[2]], T),
|
|
43
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, g, v)
|
|
44
|
-
});
|
|
45
|
-
}, F = ({ children: e, className: a }) => {
|
|
46
|
-
const { id: n, disabled: r, readOnly: o, showDateLabels: s, hidePlaceholder: i } = b(), { labelId: m } = O(d.MONTH), { partValue: c, partError: h, onPartChange: p } = P(d.MONTH), { t: N } = y(), [M, v] = j(!1), g = we(n), [D, T] = j(null), S = i ? Ae : N("field.date.placeholder.month"), te = U((w) => {
|
|
47
|
-
o || p(typeof w == "string" ? w : "");
|
|
48
|
-
}, [
|
|
49
|
-
p,
|
|
50
|
-
o
|
|
51
|
-
]), ae = U((w) => {
|
|
52
|
-
v(w && !o);
|
|
53
|
-
}, [
|
|
54
|
-
o
|
|
55
|
-
]), ne = u(e, F.Label), re = u(e, F.Trigger), oe = u(e, F.Options);
|
|
56
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
57
|
-
className: a,
|
|
58
|
-
"data-date-field": !0
|
|
59
|
-
}, s ? ne : null, /* @__PURE__ */ t.createElement("div", {
|
|
60
|
-
ref: T,
|
|
61
|
-
style: {
|
|
62
|
-
display: "contents"
|
|
63
|
-
}
|
|
64
|
-
}), /* @__PURE__ */ t.createElement(ce, {
|
|
65
|
-
getContainer: () => D
|
|
66
|
-
}, /* @__PURE__ */ t.createElement(de, {
|
|
67
|
-
"aria-labelledby": s ? m : void 0,
|
|
68
|
-
value: c || null,
|
|
69
|
-
onChange: te,
|
|
70
|
-
isDisabled: r,
|
|
71
|
-
isInvalid: h,
|
|
72
|
-
placeholder: S,
|
|
73
|
-
isOpen: g || M,
|
|
74
|
-
onOpenChange: g ? void 0 : ae
|
|
75
|
-
}, re, C(oe, {
|
|
76
|
-
isForcedOpen: g
|
|
77
|
-
}))));
|
|
78
|
-
}, Be = ({ className: e }) => /* @__PURE__ */ t.createElement(G, {
|
|
79
|
-
datePart: d.MONTH,
|
|
80
|
-
className: e
|
|
81
|
-
}), xe = ({ children: e, className: a }) => {
|
|
82
|
-
const { id: n, readOnly: r } = b(), { inputId: o } = O(d.MONTH), { partError: s, isFirstPart: i } = P(d.MONTH), m = z(null);
|
|
83
|
-
return q(() => {
|
|
84
|
-
var c;
|
|
85
|
-
i && ((c = m.current) == null || c.focus({
|
|
86
|
-
preventScroll: !0
|
|
87
|
-
}));
|
|
88
|
-
}, n), /* @__PURE__ */ t.createElement(ve, {
|
|
89
|
-
ref: m,
|
|
90
|
-
id: o,
|
|
91
|
-
className: a,
|
|
92
|
-
"data-hook": d.MONTH,
|
|
93
|
-
"data-invalid": s || void 0,
|
|
94
|
-
"data-readonly": r || void 0
|
|
95
|
-
}, /* @__PURE__ */ t.createElement(pe, null), e);
|
|
96
|
-
}, B = ({ children: e, className: a, ...n }) => {
|
|
97
|
-
const { isForcedOpen: r } = n, { language: o } = $(), s = L(() => Fe(o), [
|
|
98
|
-
o
|
|
99
|
-
]), i = u(e, B.Option) ?? /* @__PURE__ */ t.createElement(B.Option, null);
|
|
100
|
-
return /* @__PURE__ */ t.createElement(Re, {
|
|
101
|
-
className: a,
|
|
102
|
-
containerPadding: 0,
|
|
103
|
-
offset: 0
|
|
104
|
-
}, /* @__PURE__ */ t.createElement(Ve, {
|
|
105
|
-
isForcedOpen: r,
|
|
106
|
-
autoFocus: r ? !1 : void 0
|
|
107
|
-
}, s.map((m, c) => C(i, {
|
|
108
|
-
key: String(c + 1),
|
|
109
|
-
value: String(c + 1),
|
|
110
|
-
label: m
|
|
111
|
-
}))));
|
|
112
|
-
}, ke = ({ className: e, ...a }) => {
|
|
113
|
-
const { value: n, label: r } = a;
|
|
114
|
-
return /* @__PURE__ */ t.createElement(me, {
|
|
115
|
-
className: e,
|
|
116
|
-
id: n,
|
|
117
|
-
textValue: r
|
|
118
|
-
}, r);
|
|
119
|
-
};
|
|
120
|
-
F.Label = Be;
|
|
121
|
-
F.Trigger = xe;
|
|
122
|
-
F.Options = B;
|
|
123
|
-
B.Option = ke;
|
|
124
|
-
const R = ({ children: e, className: a }) => {
|
|
125
|
-
const { disabled: n, readOnly: r, showDateLabels: o } = b(), { labelId: s } = O(d.DAY), { partValue: i, partError: m, onPartChange: c } = P(d.DAY), h = u(e, R.Label), p = u(e, R.Input);
|
|
126
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
127
|
-
className: a,
|
|
128
|
-
"data-date-field": !0
|
|
129
|
-
}, o && h, /* @__PURE__ */ t.createElement(Q, {
|
|
130
|
-
"aria-labelledby": o ? s : void 0,
|
|
131
|
-
value: i,
|
|
132
|
-
onChange: c,
|
|
133
|
-
isDisabled: n,
|
|
134
|
-
isReadOnly: r,
|
|
135
|
-
isInvalid: m
|
|
136
|
-
}, p));
|
|
137
|
-
}, ze = ({ className: e }) => /* @__PURE__ */ t.createElement(G, {
|
|
138
|
-
datePart: d.DAY,
|
|
139
|
-
className: e
|
|
140
|
-
}), $e = ({ className: e }) => {
|
|
141
|
-
const { id: a, hidePlaceholder: n } = b(), { inputId: r } = O(d.DAY), { isFirstPart: o } = P(d.DAY), { t: s } = y(), i = z(null), m = n ? void 0 : s("field.date.placeholder.day");
|
|
142
|
-
return q(() => {
|
|
143
|
-
var c;
|
|
144
|
-
o && ((c = i.current) == null || c.focus({
|
|
145
|
-
preventScroll: !0
|
|
146
|
-
}));
|
|
147
|
-
}, a), /* @__PURE__ */ t.createElement(W, {
|
|
148
|
-
ref: i,
|
|
149
|
-
id: r,
|
|
150
|
-
className: e,
|
|
151
|
-
placeholder: m,
|
|
152
|
-
maxLength: 2,
|
|
153
|
-
inputMode: "numeric",
|
|
154
|
-
"data-hook": d.DAY
|
|
155
|
-
});
|
|
156
|
-
};
|
|
157
|
-
R.Label = ze;
|
|
158
|
-
R.Input = $e;
|
|
159
|
-
const A = ({ children: e, className: a }) => {
|
|
160
|
-
const { disabled: n, readOnly: r, showDateLabels: o } = b(), { labelId: s } = O(d.YEAR), { partValue: i, partError: m, onPartChange: c } = P(d.YEAR), h = u(e, A.Label), p = u(e, A.Input);
|
|
161
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
162
|
-
className: a,
|
|
163
|
-
"data-date-field": !0
|
|
164
|
-
}, o && h, /* @__PURE__ */ t.createElement(Q, {
|
|
165
|
-
"aria-labelledby": o ? s : void 0,
|
|
166
|
-
value: i,
|
|
167
|
-
onChange: c,
|
|
168
|
-
isDisabled: n,
|
|
169
|
-
isReadOnly: r,
|
|
170
|
-
isInvalid: m
|
|
171
|
-
}, p));
|
|
172
|
-
}, qe = ({ className: e }) => /* @__PURE__ */ t.createElement(G, {
|
|
173
|
-
datePart: d.YEAR,
|
|
174
|
-
className: e
|
|
175
|
-
}), Ge = ({ className: e }) => {
|
|
176
|
-
const { id: a, hidePlaceholder: n } = b(), { inputId: r } = O(d.YEAR), { isFirstPart: o } = P(d.YEAR), { t: s } = y(), i = z(null), m = n ? void 0 : s("field.date.placeholder.year");
|
|
177
|
-
return q(() => {
|
|
178
|
-
var c;
|
|
179
|
-
o && ((c = i.current) == null || c.focus({
|
|
180
|
-
preventScroll: !0
|
|
181
|
-
}));
|
|
182
|
-
}, a), /* @__PURE__ */ t.createElement(W, {
|
|
183
|
-
ref: i,
|
|
184
|
-
id: r,
|
|
185
|
-
className: e,
|
|
186
|
-
placeholder: m,
|
|
187
|
-
maxLength: 4,
|
|
188
|
-
inputMode: "numeric",
|
|
189
|
-
"data-hook": d.YEAR
|
|
190
|
-
});
|
|
191
|
-
};
|
|
192
|
-
A.Label = qe;
|
|
193
|
-
A.Input = Ge;
|
|
194
|
-
const I = ({ children: e, className: a }) => {
|
|
195
|
-
const { disabled: n, readOnly: r, use24HourFormat: o, showDateLabels: s } = b(), { labelId: i } = O("time"), { partValue: m, partError: c, onPartChange: h } = P("time"), p = u(e, I.Label), N = u(e, I.Input);
|
|
196
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
197
|
-
className: a,
|
|
198
|
-
"data-date-field": !0
|
|
199
|
-
}, s && p, /* @__PURE__ */ t.createElement(ue, {
|
|
200
|
-
"aria-labelledby": s ? i : void 0,
|
|
201
|
-
value: m,
|
|
202
|
-
onChange: h,
|
|
203
|
-
isDisabled: n,
|
|
204
|
-
isReadOnly: r,
|
|
205
|
-
isInvalid: c,
|
|
206
|
-
hourCycle: o ? 24 : 12
|
|
207
|
-
}, N));
|
|
208
|
-
}, je = ({ className: e }) => {
|
|
209
|
-
const { inputId: a, labelId: n } = O("time"), { t: r } = y(), o = r("field.date.label.time");
|
|
210
|
-
return /* @__PURE__ */ t.createElement("label", {
|
|
211
|
-
id: n,
|
|
212
|
-
htmlFor: a,
|
|
213
|
-
className: e
|
|
214
|
-
}, o);
|
|
215
|
-
}, Ke = ({ children: e, className: a }) => {
|
|
216
|
-
const { hidePlaceholder: n } = b(), r = u(e, I.Hour), o = u(e, I.Minute), s = u(e, I.Period);
|
|
217
|
-
return /* @__PURE__ */ t.createElement(Ee, {
|
|
218
|
-
className: a,
|
|
219
|
-
"data-hook": "time",
|
|
220
|
-
"data-placeholder-hidden": n || void 0
|
|
221
|
-
}, (i) => {
|
|
222
|
-
switch (i.type) {
|
|
223
|
-
case "hour":
|
|
224
|
-
return C(r, {
|
|
225
|
-
segment: i
|
|
226
|
-
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
227
|
-
case "minute":
|
|
228
|
-
return C(o, {
|
|
229
|
-
segment: i
|
|
230
|
-
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
231
|
-
case "dayPeriod":
|
|
232
|
-
return C(s, {
|
|
233
|
-
segment: i
|
|
234
|
-
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
235
|
-
case "literal":
|
|
236
|
-
return /* @__PURE__ */ t.createElement(x, {
|
|
237
|
-
segment: i
|
|
238
|
-
});
|
|
239
|
-
default:
|
|
240
|
-
return /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
}, Xe = ({ className: e, ...a }) => {
|
|
244
|
-
const { hidePlaceholder: n } = b(), { segment: r } = a, { t: o } = y(), s = n ? void 0 : o("field.date.placeholder.hour");
|
|
245
|
-
return /* @__PURE__ */ t.createElement(x, {
|
|
246
|
-
segment: r,
|
|
247
|
-
className: e,
|
|
248
|
-
...s && {
|
|
249
|
-
placeholder: s
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
}, Qe = ({ className: e, ...a }) => {
|
|
253
|
-
const { hidePlaceholder: n } = b(), { segment: r } = a, { t: o } = y(), s = n ? void 0 : o("field.date.placeholder.minute");
|
|
254
|
-
return /* @__PURE__ */ t.createElement(x, {
|
|
255
|
-
segment: r,
|
|
256
|
-
className: e,
|
|
257
|
-
...s && {
|
|
258
|
-
placeholder: s
|
|
259
|
-
}
|
|
260
|
-
});
|
|
261
|
-
}, We = ({ className: e, ...a }) => {
|
|
262
|
-
const { hidePlaceholder: n } = b(), { segment: r } = a, { t: o } = y(), s = le(fe), i = n ? void 0 : o("field.date.placeholder.period"), m = () => s == null ? void 0 : s.increment("dayPeriod");
|
|
263
|
-
return /* @__PURE__ */ t.createElement(x, {
|
|
264
|
-
segment: r,
|
|
265
|
-
className: e,
|
|
266
|
-
onClick: m,
|
|
267
|
-
...i && {
|
|
268
|
-
placeholder: i
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
};
|
|
272
|
-
I.Label = je;
|
|
273
|
-
I.Input = Ke;
|
|
274
|
-
I.Hour = Xe;
|
|
275
|
-
I.Minute = Qe;
|
|
276
|
-
I.Period = We;
|
|
277
|
-
l.Label = Me;
|
|
278
|
-
l.Month = F;
|
|
279
|
-
l.Day = R;
|
|
280
|
-
l.Year = A;
|
|
281
|
-
l.Time = I;
|
|
282
|
-
l.Description = Pe;
|
|
283
|
-
l.Error = Ce;
|
|
284
|
-
function O(e) {
|
|
285
|
-
const { inputId: a } = J();
|
|
286
|
-
return L(() => {
|
|
287
|
-
const n = e.toLowerCase();
|
|
288
|
-
return {
|
|
289
|
-
inputId: `${a}-${n}-input`,
|
|
290
|
-
labelId: `${a}-${n}-label`
|
|
291
|
-
};
|
|
292
|
-
}, [
|
|
293
|
-
a,
|
|
294
|
-
e
|
|
295
|
-
]);
|
|
296
|
-
}
|
|
297
|
-
function P(e) {
|
|
298
|
-
const { value: a, onChange: n, hasError: r = !1 } = b(), { regionalFormat: o } = $(), [s, i] = L(() => K(a ?? ""), [
|
|
299
|
-
a
|
|
300
|
-
]), m = L(() => be(r, a ?? ""), [
|
|
301
|
-
a,
|
|
302
|
-
r
|
|
303
|
-
]), c = L(() => he(s), [
|
|
304
|
-
s
|
|
305
|
-
]), h = L(() => Je(i), [
|
|
306
|
-
i
|
|
307
|
-
]), p = U((g) => {
|
|
308
|
-
const D = Ze(g), T = X(s, D);
|
|
309
|
-
n(T);
|
|
310
|
-
}, [
|
|
311
|
-
n,
|
|
312
|
-
s
|
|
313
|
-
]), N = U((g) => {
|
|
314
|
-
const [, D] = K(a ?? ""), T = _e(g, e, c), S = X(T, D);
|
|
315
|
-
n(S);
|
|
316
|
-
}, [
|
|
317
|
-
n,
|
|
318
|
-
a,
|
|
319
|
-
c,
|
|
320
|
-
e
|
|
321
|
-
]), M = L(() => e === "time" ? !1 : Z(o).filter(ee).map((T) => T.toUpperCase())[0] === e, [
|
|
322
|
-
o,
|
|
323
|
-
e
|
|
324
|
-
]);
|
|
325
|
-
return e === "time" ? {
|
|
326
|
-
partValue: h,
|
|
327
|
-
partError: m.TIME,
|
|
328
|
-
onPartChange: p,
|
|
329
|
-
isFirstPart: !1
|
|
330
|
-
} : {
|
|
331
|
-
partValue: c[e] || "",
|
|
332
|
-
partError: m[e],
|
|
333
|
-
onPartChange: N,
|
|
334
|
-
isFirstPart: M
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
function G({ datePart: e, className: a }) {
|
|
338
|
-
const { inputId: n, labelId: r } = O(e), { t: o } = y(), s = `field.date.label.${e.toLowerCase()}`, i = o(s);
|
|
339
|
-
return /* @__PURE__ */ t.createElement("label", {
|
|
340
|
-
id: r,
|
|
341
|
-
htmlFor: n,
|
|
342
|
-
className: a
|
|
343
|
-
}, i);
|
|
344
|
-
}
|
|
345
|
-
function Je(e) {
|
|
346
|
-
if (!e)
|
|
347
|
-
return null;
|
|
348
|
-
try {
|
|
349
|
-
return ie(e);
|
|
350
|
-
} catch {
|
|
351
|
-
return null;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
function Ze(e) {
|
|
355
|
-
if (!e)
|
|
356
|
-
return null;
|
|
357
|
-
const a = String(e.hour).padStart(2, "0"), n = String(e.minute).padStart(2, "0"), r = String(e.second).padStart(2, "0");
|
|
358
|
-
return [
|
|
359
|
-
a,
|
|
360
|
-
n,
|
|
361
|
-
r
|
|
362
|
-
].join(":");
|
|
363
|
-
}
|
|
364
|
-
const et = "_fields_1ofw4_1", tt = "_month_1ofw4_10", at = "_day_1ofw4_11", nt = "_year_1ofw4_12", rt = "_timeGroup_1ofw4_13", ot = "_dayInput_1ofw4_34", st = "_yearInput_1ofw4_35", lt = "_monthTrigger_1ofw4_39", it = "_monthOption_1ofw4_59", ct = "_time_1ofw4_13", mt = "_hour_1ofw4_81", dt = "_minute_1ofw4_82", ut = "_period_1ofw4_83", f = {
|
|
365
|
-
fields: et,
|
|
366
|
-
month: tt,
|
|
367
|
-
day: at,
|
|
368
|
-
year: nt,
|
|
369
|
-
timeGroup: rt,
|
|
370
|
-
dayInput: ot,
|
|
371
|
-
yearInput: st,
|
|
372
|
-
monthTrigger: lt,
|
|
373
|
-
monthOption: it,
|
|
374
|
-
time: ct,
|
|
375
|
-
hour: mt,
|
|
376
|
-
minute: dt,
|
|
377
|
-
period: ut
|
|
378
|
-
}, pt = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(se, {
|
|
379
|
-
content: e,
|
|
380
|
-
locale: a
|
|
381
|
-
}), vt = () => {
|
|
382
|
-
const e = H(Le, [
|
|
383
|
-
f.monthTrigger
|
|
384
|
-
]), a = Ye(ye, f.monthOption, Y), n = H(k, [
|
|
385
|
-
f.dayInput
|
|
386
|
-
]), r = H(k, [
|
|
387
|
-
f.yearInput
|
|
388
|
-
]), o = H(k, [
|
|
389
|
-
f.time
|
|
390
|
-
]);
|
|
391
|
-
return /* @__PURE__ */ t.createElement(l, {
|
|
392
|
-
className: E(Ie, f.fields)
|
|
393
|
-
}, /* @__PURE__ */ t.createElement(l.Label, {
|
|
394
|
-
className: E(ge, _.label)
|
|
395
|
-
}, /* @__PURE__ */ t.createElement(l.Label.Required, {
|
|
396
|
-
className: E(De, _.requiredMark)
|
|
397
|
-
})), /* @__PURE__ */ t.createElement(l.Month, {
|
|
398
|
-
className: f.month
|
|
399
|
-
}, /* @__PURE__ */ t.createElement(l.Month.Label, {
|
|
400
|
-
className: E(V, _.label)
|
|
401
|
-
}), /* @__PURE__ */ t.createElement(l.Month.Trigger, {
|
|
402
|
-
className: e
|
|
403
|
-
}, /* @__PURE__ */ t.createElement(He, {
|
|
404
|
-
className: _.dropdownIcon
|
|
405
|
-
})), /* @__PURE__ */ t.createElement(l.Month.Options, {
|
|
406
|
-
className: E(Ne, _.selectPopover, _.dropdownPopover)
|
|
407
|
-
}, /* @__PURE__ */ t.createElement(l.Month.Options.Option, {
|
|
408
|
-
className: a
|
|
409
|
-
}))), /* @__PURE__ */ t.createElement(l.Day, {
|
|
410
|
-
className: f.day
|
|
411
|
-
}, /* @__PURE__ */ t.createElement(l.Day.Label, {
|
|
412
|
-
className: E(V, _.label)
|
|
413
|
-
}), /* @__PURE__ */ t.createElement(l.Day.Input, {
|
|
414
|
-
className: n
|
|
415
|
-
})), /* @__PURE__ */ t.createElement(l.Year, {
|
|
416
|
-
className: f.year
|
|
417
|
-
}, /* @__PURE__ */ t.createElement(l.Year.Label, {
|
|
418
|
-
className: E(V, _.label)
|
|
419
|
-
}), /* @__PURE__ */ t.createElement(l.Year.Input, {
|
|
420
|
-
className: r
|
|
421
|
-
})), /* @__PURE__ */ t.createElement(l.Time, {
|
|
422
|
-
className: f.timeGroup
|
|
423
|
-
}, /* @__PURE__ */ t.createElement(l.Time.Label, {
|
|
424
|
-
className: E(V, _.label)
|
|
425
|
-
}), /* @__PURE__ */ t.createElement(l.Time.Input, {
|
|
426
|
-
className: o
|
|
427
|
-
}, /* @__PURE__ */ t.createElement(l.Time.Hour, {
|
|
428
|
-
className: E(f.hour, Y)
|
|
429
|
-
}), /* @__PURE__ */ t.createElement(l.Time.Minute, {
|
|
430
|
-
className: E(f.minute, Y)
|
|
431
|
-
}), /* @__PURE__ */ t.createElement(l.Time.Period, {
|
|
432
|
-
className: E(f.period, Y)
|
|
433
|
-
}))), /* @__PURE__ */ t.createElement(l.Error, {
|
|
434
|
-
className: E(Te, _.error)
|
|
435
|
-
}, /* @__PURE__ */ t.createElement(Ue, null), /* @__PURE__ */ t.createElement(l.Error.Text, null)), /* @__PURE__ */ t.createElement(l.Description, {
|
|
436
|
-
className: E(Oe, _.description)
|
|
437
|
-
}, pt));
|
|
438
|
-
};
|
|
439
|
-
export {
|
|
440
|
-
vt as D
|
|
441
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as m } from "@wix/ricos/viewer";
|
|
2
|
-
import a from "classnames";
|
|
3
|
-
import e from "react";
|
|
4
|
-
import { u as n, D as r } from "./use-dropdown-trigger-class-name-D6c-3Lyw.js";
|
|
5
|
-
import { C as l } from "./chevron-down-icon-CcpVm6B-.js";
|
|
6
|
-
import { E as c } from "./error-icon-hZxQ6DEy.js";
|
|
7
|
-
import { H as i } from "./custom-focus-class-_483Pkwp.js";
|
|
8
|
-
import { s as o } from "./field-rac.module-DcyJyi2B.js";
|
|
9
|
-
import { X as p, am as E, J as D, M as _, I as O } from "./form-BmSV4tOz.js";
|
|
10
|
-
import { u as R } from "./use-dropdown-option-class-name-COGEk5d6.js";
|
|
11
|
-
const C = ({ content: t, locale: s }) => /* @__PURE__ */ e.createElement(m, {
|
|
12
|
-
content: t,
|
|
13
|
-
locale: s
|
|
14
|
-
}), w = () => {
|
|
15
|
-
const t = n(o.dropdownTrigger), s = R(i);
|
|
16
|
-
return /* @__PURE__ */ e.createElement(r, null, /* @__PURE__ */ e.createElement(r.Label, {
|
|
17
|
-
className: a(p, o.label)
|
|
18
|
-
}, /* @__PURE__ */ e.createElement(r.Label.Required, {
|
|
19
|
-
className: a(E, o.requiredMark)
|
|
20
|
-
})), /* @__PURE__ */ e.createElement(r.Trigger, {
|
|
21
|
-
className: t
|
|
22
|
-
}, /* @__PURE__ */ e.createElement(l, {
|
|
23
|
-
className: o.dropdownIcon
|
|
24
|
-
})), /* @__PURE__ */ e.createElement(r.Options, {
|
|
25
|
-
className: a(D, o.selectPopover, o.dropdownPopover)
|
|
26
|
-
}, /* @__PURE__ */ e.createElement(r.Options.Option, {
|
|
27
|
-
className: s
|
|
28
|
-
})), /* @__PURE__ */ e.createElement(r.Error, {
|
|
29
|
-
className: a(_, o.error)
|
|
30
|
-
}, /* @__PURE__ */ e.createElement(c, null), /* @__PURE__ */ e.createElement(r.Error.Text, null)), /* @__PURE__ */ e.createElement(r.Description, {
|
|
31
|
-
className: a(O, o.description)
|
|
32
|
-
}, C));
|
|
33
|
-
};
|
|
34
|
-
export {
|
|
35
|
-
w as D
|
|
36
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const e = "_label_1ce28_1", o = "_requiredMark_1ce28_11", c = "_input_1ce28_16", t = "_inputGroup_1ce28_17", n = "_inputHover_1ce28_70", _ = "_innerInput_1ce28_146", r = "_dropdownTrigger_1ce28_197", p = "_dropdownIcon_1ce28_207", s = "_dropdownPopover_1ce28_226", i = "_selectPopover_1ce28_232", u = "_selectOption_1ce28_259", d = "_selectOptionHover_1ce28_282", l = "_selectOptionSelected_1ce28_286", h = "_selectOptionWithoutFocusRing_1ce28_290", b = "_description_1ce28_296", k = "_error_1ce28_317", v = "_checkbox_1ce28_336", I = "_checkboxInput_1ce28_359", x = "_checkboxInputSelected_1ce28_398", O = "_checkboxInputHover_1ce28_402", g = {
|
|
2
|
-
label: e,
|
|
3
|
-
requiredMark: o,
|
|
4
|
-
input: c,
|
|
5
|
-
inputGroup: t,
|
|
6
|
-
inputHover: n,
|
|
7
|
-
innerInput: _,
|
|
8
|
-
dropdownTrigger: r,
|
|
9
|
-
dropdownIcon: p,
|
|
10
|
-
dropdownPopover: s,
|
|
11
|
-
selectPopover: i,
|
|
12
|
-
selectOption: u,
|
|
13
|
-
selectOptionHover: d,
|
|
14
|
-
selectOptionSelected: l,
|
|
15
|
-
selectOptionWithoutFocusRing: h,
|
|
16
|
-
description: b,
|
|
17
|
-
error: k,
|
|
18
|
-
checkbox: v,
|
|
19
|
-
checkboxInput: I,
|
|
20
|
-
checkboxInputSelected: x,
|
|
21
|
-
checkboxInputHover: O
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
g as s
|
|
25
|
-
};
|