@wix/form-elements 1.158.0 → 1.160.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/{appointment-rac-m5-FH9kU.js → appointment-rac-BmHu56e5.js} +63 -63
- package/dist/component/{bookings-address-rac-VtG7wH0l.js → bookings-address-rac-DY9l2g0h.js} +1 -1
- package/dist/component/{bookings-email-rac-C8T3aTQH.js → bookings-email-rac-B5vNSOsS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-BlhIWWNj.js → bookings-first-name-rac-CJiefCNz.js} +1 -1
- package/dist/component/{bookings-header-rac-adwR7PKJ.js → bookings-header-rac-BFu7Ko5w.js} +1 -1
- package/dist/component/{bookings-last-name-rac-z5z1GJQL.js → bookings-last-name-rac-DegMM13h.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DMgVxy8J.js → bookings-login-bar-rac-DrA-5tBH.js} +7 -7
- package/dist/component/{bookings-phone-rac-DS7ffO6T.js → bookings-phone-rac-DsaeqxCI.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BNWI0o60.js → bookings-rich-text-rac-jRHiwqi8.js} +1 -1
- package/dist/component/{checkbox-field-rac-CUKZ9NHF.js → checkbox-field-rac-CyoBb6Yf.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-Didam2ZD.js → checkbox-group-field-headless-Bv1gU3oL.js} +54 -54
- package/dist/component/{checkbox-group-field-rac-C3WCeVA8.js → checkbox-group-field-rac-DasArcdV.js} +6 -6
- package/dist/component/{checkbox-group-rac-Bkq-wm7_.js → checkbox-group-rac-CzmufV1U.js} +1 -1
- package/dist/component/{checkbox-rac-66ga9Lph.js → checkbox-rac-6C7XoUoZ.js} +1 -1
- package/dist/component/{contacts-address-rac-DSOk97te.js → contacts-address-rac-BZobbFtz.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-1qguKm9O.js → contacts-birthdate-rac-DIzf41DS.js} +1 -1
- package/dist/component/{contacts-company-rac-Chefzmw3.js → contacts-company-rac-BiBDO28r.js} +1 -1
- package/dist/component/{contacts-email-rac-DG6eAnz2.js → contacts-email-rac-5mqokCSD.js} +1 -1
- package/dist/component/{contacts-first-name-rac-tSGE0w5w.js → contacts-first-name-rac-BXe3_Nz5.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BjZWfbM5.js → contacts-last-name-rac-Cfqgh7u1.js} +1 -1
- package/dist/component/{contacts-phone-rac-jfGNKLoZ.js → contacts-phone-rac-cmLUWnAc.js} +1 -1
- package/dist/component/{contacts-position-rac-kv8I-m_Q.js → contacts-position-rac-DTyvklfN.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-BkUG0AMs.js → contacts-subscribe-rac-D-ZEX1A3.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BtFrK_Ci.js → contacts-tax-id-rac-B4NYJwWt.js} +1 -1
- package/dist/component/{date-availability-_A9DS6za.js → date-availability-Dach9aRC.js} +1 -1
- package/dist/component/date-input-field-rac-B72mHcya.js +309 -0
- package/dist/component/{date-input-rac-CpseQkV4.js → date-input-rac-CYix11gT.js} +1 -1
- package/dist/component/{date-picker-field-rac-B4gjhxG6.js → date-picker-field-rac-B8pvtPir.js} +86 -86
- package/dist/component/{date-picker-rac-DDJfUDCM.js → date-picker-rac-D6cR0zH9.js} +1 -1
- package/dist/component/date-time-input-field-rac-B7Y3Yf5l.js +441 -0
- package/dist/component/{date-time-input-rac-BkvcyU3H.js → date-time-input-rac-DMN-noQX.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-UWDhIjU-.js → dext-checkbox-group-rac-Kq0GnteP.js} +2 -2
- package/dist/component/{dext-checkbox-rac-q9UJnqsC.js → dext-checkbox-rac-BY9GZ4n1.js} +1 -1
- package/dist/component/{dext-date-picker-rac-C164FDSF.js → dext-date-picker-rac-CXArIddp.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BvbnfRYU.js → dext-date-time-input-rac-B39TtxGq.js} +1 -1
- package/dist/component/{dext-dropdown-rac-z0xU1mRO.js → dext-dropdown-rac-C3y0G8cS.js} +1 -1
- package/dist/component/{dext-email-rac-BkiWpfNw.js → dext-email-rac-BIg3cq7Q.js} +1 -1
- package/dist/component/{dext-number-input-rac-DeQWO-RK.js → dext-number-input-rac-27sHJ7yN.js} +1 -1
- package/dist/component/{dext-phone-rac-CGlVpadW.js → dext-phone-rac-CcohoFQp.js} +1 -1
- package/dist/component/dext-radio-group-rac-eead3Gve.js +18 -0
- package/dist/component/{dext-rating-input-rac-ibIctxU_.js → dext-rating-input-rac-B_E6OcBr.js} +1 -1
- package/dist/component/{dext-tags-rac-snCgM6u0.js → dext-tags-rac-Yd9aAtnF.js} +2 -2
- package/dist/component/{dext-text-area-rac-BHVs8ixR.js → dext-text-area-rac-CMACri2C.js} +1 -1
- package/dist/component/{dext-text-input-rac-DGI747Od.js → dext-text-input-rac-sNjSCfQ-.js} +1 -1
- package/dist/component/{dext-url-input-rac-CpO2VDPE.js → dext-url-input-rac-DwhbzJty.js} +1 -1
- package/dist/component/{donation-rac-Ck6HkRcW.js → donation-rac-BVAN3kMk.js} +90 -90
- package/dist/component/{dropdown-field-rac-e5MjWn5B.js → dropdown-field-rac-DdoGigWx.js} +14 -14
- package/dist/component/{dropdown-rac-B2jprC8G.js → dropdown-rac-CRkt5w47.js} +1 -1
- package/dist/component/{ecom-address-rac-D0stOqRv.js → ecom-address-rac-C36hFHW0.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BRzaQKx3.js → ecom-subscription-checkbox-rac-BKfQ348w.js} +2 -2
- package/dist/component/{email-input-field-rac-0UIjNipg.js → email-input-field-rac-MOaISYxa.js} +59 -59
- package/dist/component/{events-repeater-rac-BBQZzP7U.js → events-repeater-rac-D6p-NgE8.js} +20 -20
- package/dist/component/{events-rsvp-rac-Ck7BXGKy.js → events-rsvp-rac-DVpgN8gm.js} +18 -18
- package/dist/component/{field-error-headless-vApyo-y9.js → field-error-headless-XNWmDH3E.js} +4 -4
- package/dist/component/{field-label-headless-C8-ShLxy.js → field-label-headless-CORRAJGt.js} +4 -4
- package/dist/component/{file-upload-rac-BzWJOM6C.js → file-upload-rac-DRMr7E4b.js} +89 -89
- package/dist/component/{fixed-payment-rac-C4_xI103.js → fixed-payment-rac-BUXzNex9.js} +18 -18
- package/dist/component/{form-D7ulDPh1.js → form-DSpx-AO8.js} +785 -728
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BnBbhsOZ.js → header-field-rac-CiDXlNsa.js} +6 -6
- package/dist/component/{header-rac-CEWayr6b.js → header-rac-B5Rg-h8u.js} +1 -1
- package/dist/component/{image-choice-rac-DTZrz6oP.js → image-choice-rac-CtoA_KDp.js} +44 -44
- package/dist/component/{index-CKtw7kvn.js → index-Bz7ZhQsF.js} +53 -53
- package/dist/component/{index-DBbgIHYT.js → index-CwruESwc.js} +5 -5
- package/dist/component/{isObjectLike-BHfPE26c.js → isObjectLike-C5dHxHP0.js} +11 -11
- package/dist/component/multiline-address-field-rac-Z-qF366L.js +1664 -0
- package/dist/component/{multiline-address-rac-YQj_QROS.js → multiline-address-rac-CJIHTMw5.js} +1 -1
- package/dist/component/{number-input-field-rac-A7xM2c6F.js → number-input-field-rac-D4vf6I6N.js} +29 -29
- package/dist/component/{number-input-rac-DeDatLY5.js → number-input-rac-B2jW6JUQ.js} +1 -1
- package/dist/component/{password-rac-7Si7JHee.js → password-rac-DGRZ17Jl.js} +29 -29
- package/dist/component/{payment-input-rac-D4JKZl-5.js → payment-input-rac-BtD-tAKv.js} +27 -27
- package/dist/component/phone-input-field-rac-KD4-APhr.js +512 -0
- package/dist/component/{phone-rac-Y2mWnseb.js → phone-rac-Cw2yccgg.js} +1 -1
- package/dist/component/{product-list-rac-CYUcNqf3.js → product-list-rac-XbzTDdbp.js} +33 -33
- package/dist/component/{quiz-radio-group-rac-f3O7fksW.js → quiz-radio-group-rac-BDw_mAw5.js} +1 -1
- package/dist/component/{radio-button-module-classes-BgVUqcvD.js → radio-button-module-classes-CFGf0Hzh.js} +23 -23
- package/dist/component/{radio-group-field-rac-DrOiyk5C.js → radio-group-field-rac-CXN7tyVu.js} +6 -6
- package/dist/component/{radio-group-rac-Btt_bz_K.js → radio-group-rac-COHzqjBh.js} +1 -1
- package/dist/component/{rating-input-field-rac-CwN7wyaw.js → rating-input-field-rac-DCXNZgf1.js} +37 -37
- package/dist/component/{rating-input-rac-sTy0SV3L.js → rating-input-rac-DwQt9ML7.js} +1 -1
- package/dist/component/{rich-content-rac.module-C11w9mXa.js → rich-content-rac.module-B7rPwNns.js} +8 -8
- package/dist/component/{rich-text-field-rac-kGwuDtNs.js → rich-text-field-rac-DlER7NRD.js} +4 -4
- package/dist/component/{rich-text-rac-T4ic2hrA.js → rich-text-rac-CjicsHA7.js} +1 -1
- package/dist/component/service-dropdown-rac-B81LC_6_.js +145 -0
- package/dist/component/{services-multi-choice-rac-CLQ4dLxO.js → services-multi-choice-rac-BR6gZeHk.js} +16 -16
- package/dist/component/{signature-rac-DLiFeCNL.js → signature-rac-XFj7Ddtp.js} +69 -69
- package/dist/component/{submit-button-rac-CccO80E1.js → submit-button-rac-Bz7zs_3W.js} +12 -12
- package/dist/component/{tags-field-rac-DaghCGJU.js → tags-field-rac-DWWkNKqc.js} +79 -79
- package/dist/component/{tags-rac-3ly5shW2.js → tags-rac-BXyiQ9i1.js} +1 -1
- package/dist/component/{text-area-field-rac-2-TYC5Lb.js → text-area-field-rac-DsIRYi0d.js} +21 -21
- package/dist/component/{text-area-rac-Bx0pgw80.js → text-area-rac-CF9pDP9d.js} +1 -1
- package/dist/component/{text-input-field-rac-Dyur2Wby.js → text-input-field-rac-BwIDZACz.js} +5 -5
- package/dist/component/{text-input-headless-DZ-Pjpm4.js → text-input-headless-5kQs2_Xu.js} +14 -14
- package/dist/component/{text-input-rac-BuBtJDX_.js → text-input-rac-CRmSuw1k.js} +1 -1
- package/dist/component/{time-input-rac-AlDEpfXZ.js → time-input-rac-BRMNpe51.js} +20 -20
- package/dist/component/{url-input-field-rac-BzP4-8yP.js → url-input-field-rac-CKLS3QDk.js} +17 -17
- package/dist/component/{url-input-rac-DaBXuedf.js → url-input-rac-Dv-kp50D.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-BQi_qE_-.js +116 -0
- package/dist/component/use-dropdown-trigger-class-name-bAK8aHiG.js +96 -0
- package/dist/component/{use-element-state-class-name-DY0UyIQg.js → use-element-state-class-name-rXM_lHug.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C_Wh4Qfc.js → use-hoverable-input-class-name-BnV_uerV.js} +2 -2
- package/dist/component/use-is-forced-open-dropdown-Bp-5Xpmw.js +53 -0
- package/dist/component/{use-service-options-base-DgSaAuGy.js → use-service-options-base-CLeE9-Tx.js} +10 -10
- package/dist/component/use-text-input-class-name-DIKWvfkm.js +6 -0
- package/dist/form.d.ts +8 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-QZUxFX5e.js +0 -303
- package/dist/component/date-time-input-field-rac-DcwKQKHf.js +0 -433
- package/dist/component/dext-radio-group-rac-D8hMWNIQ.js +0 -18
- package/dist/component/dropdown-field-headless-Bv6LrkeA.js +0 -93
- package/dist/component/multiline-address-field-rac-jhcWn4wT.js +0 -1659
- package/dist/component/phone-input-field-rac-GxcQ_Pyl.js +0 -508
- package/dist/component/service-dropdown-rac-BfliE4hs.js +0 -145
- package/dist/component/use-dropdown-trigger-class-name-BKOFwNvc.js +0 -117
- package/dist/component/use-is-forced-open-dropdown-Bw_IFUKt.js +0 -48
- package/dist/component/use-text-input-class-name-DFMQAg_E.js +0 -6
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as ae } from "@wix/ricos/viewer";
|
|
2
|
-
import D from "classnames";
|
|
3
|
-
import t, { useMemo as N, useState as k, useCallback as Y, useRef as H } from "react";
|
|
4
|
-
import { UNSAFE_PortalProvider as ne } from "react-aria";
|
|
5
|
-
import { ListBoxItem as re, Select as oe, TextField as $, SelectValue as se, Input as z } from "react-aria-components";
|
|
6
|
-
import { bo as y, bl as W, bg as w, aV as K, b6 as Q, aI as o, by as T, aP as le, aW as ce, bd as ie, bq as V, R as M, a0 as me, y as de, H as ue, v as pe } from "./form-D7ulDPh1.js";
|
|
7
|
-
import { f as p, a as B } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { g as Ee } from "./helpers-HmkkXrh2.js";
|
|
9
|
-
import { D as fe, E as be } from "./field-error-headless-vApyo-y9.js";
|
|
10
|
-
import { L as De } from "./field-label-headless-C8-ShLxy.js";
|
|
11
|
-
import { F as he } from "./fieldset-headless-CD3fds9J.js";
|
|
12
|
-
import { N as ye, E as Ie, S as Oe } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
-
import { a as ge } from "./use-is-forced-open-dropdown-Bw_IFUKt.js";
|
|
14
|
-
import { V as Ne, a as Ce, u as _e } from "./use-dropdown-trigger-class-name-BKOFwNvc.js";
|
|
15
|
-
import { C as Le } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
|
-
import { E as Fe } from "./error-icon-hZxQ6DEy.js";
|
|
17
|
-
import { H as Re } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
-
import { s as f } from "./field-rac.module-DP0lkkEv.js";
|
|
19
|
-
import { u as q } from "./use-text-input-class-name-DFMQAg_E.js";
|
|
20
|
-
const Me = {
|
|
21
|
-
[o.MONTH]: "bday-month",
|
|
22
|
-
[o.DAY]: "bday-day",
|
|
23
|
-
[o.YEAR]: "bday-year"
|
|
24
|
-
}, x = (e, a) => e === "bday" ? Me[a] : void 0, n = ({ children: e, className: a }) => {
|
|
25
|
-
const { id: r, required: s, onBlur: l, onFocus: c, FieldLayout: m } = y(), { inputId: i, labelId: d, ariaDescribedBy: u } = W(), { regionalFormat: E } = w(), b = N(() => K(E).filter(Q).map((S) => S.toUpperCase()), [
|
|
26
|
-
E
|
|
27
|
-
]), _ = p(e, n.Label), v = p(e, n.Description), P = p(e, n.Error), I = {
|
|
28
|
-
[o.MONTH]: p(e, n.Month),
|
|
29
|
-
[o.DAY]: p(e, n.Day),
|
|
30
|
-
[o.YEAR]: p(e, n.Year)
|
|
31
|
-
};
|
|
32
|
-
return /* @__PURE__ */ t.createElement(m, {
|
|
33
|
-
fieldId: r,
|
|
34
|
-
renderLabel: () => B(_, {
|
|
35
|
-
as: "div"
|
|
36
|
-
}),
|
|
37
|
-
renderInput: () => /* @__PURE__ */ t.createElement(he, {
|
|
38
|
-
id: i,
|
|
39
|
-
ariaLabelledBy: d,
|
|
40
|
-
ariaDescribedBy: u,
|
|
41
|
-
required: s,
|
|
42
|
-
onBlur: l,
|
|
43
|
-
onFocus: c,
|
|
44
|
-
className: a
|
|
45
|
-
}, I[b[0]], I[b[1]], I[b[2]]),
|
|
46
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, P, v)
|
|
47
|
-
});
|
|
48
|
-
}, O = ({ children: e, className: a }) => {
|
|
49
|
-
const { id: r, disabled: s, readOnly: l, showDateLabels: c, hidePlaceholder: m, autoComplete: i } = y(), { labelId: d } = g(o.MONTH), { partValue: u, partError: E, onPartChange: b } = C(o.MONTH), { t: _ } = T(), [v, P] = k(!1), I = ge(r), [S, j] = k(null), G = m ? Ie : _("field.date.placeholder.month"), J = Y((R) => {
|
|
50
|
-
l || b(typeof R == "string" ? R : "");
|
|
51
|
-
}, [
|
|
52
|
-
b,
|
|
53
|
-
l
|
|
54
|
-
]), X = Y((R) => {
|
|
55
|
-
P(R && !l);
|
|
56
|
-
}, [
|
|
57
|
-
l
|
|
58
|
-
]), Z = p(e, O.Label), ee = p(e, O.Trigger), te = p(e, O.Options);
|
|
59
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
60
|
-
className: a,
|
|
61
|
-
"data-date-field": !0
|
|
62
|
-
}, c ? Z : null, /* @__PURE__ */ t.createElement("div", {
|
|
63
|
-
ref: j,
|
|
64
|
-
style: {
|
|
65
|
-
display: "contents"
|
|
66
|
-
}
|
|
67
|
-
}), /* @__PURE__ */ t.createElement(ne, {
|
|
68
|
-
getContainer: () => S
|
|
69
|
-
}, /* @__PURE__ */ t.createElement(oe, {
|
|
70
|
-
autoComplete: x(i, o.MONTH),
|
|
71
|
-
"aria-labelledby": c ? d : void 0,
|
|
72
|
-
value: u || null,
|
|
73
|
-
onChange: J,
|
|
74
|
-
isDisabled: s,
|
|
75
|
-
isInvalid: E,
|
|
76
|
-
placeholder: G,
|
|
77
|
-
isOpen: I || v,
|
|
78
|
-
onOpenChange: I ? void 0 : X
|
|
79
|
-
}, ee, B(te, {
|
|
80
|
-
isForcedOpen: I
|
|
81
|
-
}))));
|
|
82
|
-
}, Ae = ({ className: e }) => /* @__PURE__ */ t.createElement(U, {
|
|
83
|
-
datePart: o.MONTH,
|
|
84
|
-
className: e
|
|
85
|
-
}), Te = ({ children: e, className: a }) => {
|
|
86
|
-
const { id: r, readOnly: s } = y(), { inputId: l } = g(o.MONTH), { partError: c, isFirstPart: m } = C(o.MONTH), i = H(null);
|
|
87
|
-
return V(() => {
|
|
88
|
-
var d;
|
|
89
|
-
m && ((d = i.current) == null || d.focus({
|
|
90
|
-
preventScroll: !0
|
|
91
|
-
}));
|
|
92
|
-
}, r), /* @__PURE__ */ t.createElement(Oe, {
|
|
93
|
-
ref: i,
|
|
94
|
-
id: l,
|
|
95
|
-
className: a,
|
|
96
|
-
"data-hook": o.MONTH,
|
|
97
|
-
"data-invalid": c || void 0,
|
|
98
|
-
"data-readonly": s || void 0
|
|
99
|
-
}, /* @__PURE__ */ t.createElement(se, null), e);
|
|
100
|
-
}, A = ({ children: e, className: a, ...r }) => {
|
|
101
|
-
const { isForcedOpen: s } = r, { language: l } = w(), c = N(() => Ee(l), [
|
|
102
|
-
l
|
|
103
|
-
]), m = p(e, A.Option) ?? /* @__PURE__ */ t.createElement(A.Option, null);
|
|
104
|
-
return /* @__PURE__ */ t.createElement(ye, {
|
|
105
|
-
className: a,
|
|
106
|
-
containerPadding: 0,
|
|
107
|
-
offset: 0
|
|
108
|
-
}, /* @__PURE__ */ t.createElement(Ne, {
|
|
109
|
-
isForcedOpen: s,
|
|
110
|
-
autoFocus: s ? !1 : void 0
|
|
111
|
-
}, c.map((i, d) => B(m, {
|
|
112
|
-
key: String(d + 1),
|
|
113
|
-
value: String(d + 1),
|
|
114
|
-
label: i
|
|
115
|
-
}))));
|
|
116
|
-
}, ve = ({ className: e, ...a }) => {
|
|
117
|
-
const { value: r, label: s } = a;
|
|
118
|
-
return /* @__PURE__ */ t.createElement(re, {
|
|
119
|
-
className: e,
|
|
120
|
-
id: r,
|
|
121
|
-
textValue: s
|
|
122
|
-
}, s);
|
|
123
|
-
};
|
|
124
|
-
O.Label = Ae;
|
|
125
|
-
O.Trigger = Te;
|
|
126
|
-
O.Options = A;
|
|
127
|
-
A.Option = ve;
|
|
128
|
-
const L = ({ children: e, className: a }) => {
|
|
129
|
-
const { disabled: r, readOnly: s, showDateLabels: l } = y(), { labelId: c } = g(o.DAY), { partValue: m, partError: i, onPartChange: d } = C(o.DAY), u = p(e, L.Label), E = p(e, L.Input);
|
|
130
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
131
|
-
className: a,
|
|
132
|
-
"data-date-field": !0
|
|
133
|
-
}, l && u, /* @__PURE__ */ t.createElement($, {
|
|
134
|
-
"aria-labelledby": l ? c : void 0,
|
|
135
|
-
value: m,
|
|
136
|
-
onChange: d,
|
|
137
|
-
isDisabled: r,
|
|
138
|
-
isReadOnly: s,
|
|
139
|
-
isInvalid: i
|
|
140
|
-
}, E));
|
|
141
|
-
}, Pe = ({ className: e }) => /* @__PURE__ */ t.createElement(U, {
|
|
142
|
-
datePart: o.DAY,
|
|
143
|
-
className: e
|
|
144
|
-
}), Se = ({ className: e }) => {
|
|
145
|
-
const { id: a, hidePlaceholder: r, autoComplete: s } = y(), { inputId: l } = g(o.DAY), { isFirstPart: c } = C(o.DAY), { t: m } = T(), i = H(null), d = r ? void 0 : m("field.date.placeholder.day");
|
|
146
|
-
return V(() => {
|
|
147
|
-
var u;
|
|
148
|
-
c && ((u = i.current) == null || u.focus({
|
|
149
|
-
preventScroll: !0
|
|
150
|
-
}));
|
|
151
|
-
}, a), /* @__PURE__ */ t.createElement(z, {
|
|
152
|
-
ref: i,
|
|
153
|
-
id: l,
|
|
154
|
-
className: e,
|
|
155
|
-
placeholder: d,
|
|
156
|
-
autoComplete: x(s, o.DAY),
|
|
157
|
-
maxLength: 2,
|
|
158
|
-
inputMode: "numeric",
|
|
159
|
-
"data-hook": o.DAY
|
|
160
|
-
});
|
|
161
|
-
};
|
|
162
|
-
L.Label = Pe;
|
|
163
|
-
L.Input = Se;
|
|
164
|
-
const F = ({ children: e, className: a }) => {
|
|
165
|
-
const { disabled: r, readOnly: s, showDateLabels: l } = y(), { labelId: c } = g(o.YEAR), { partValue: m, partError: i, onPartChange: d } = C(o.YEAR), u = p(e, F.Label), E = p(e, F.Input);
|
|
166
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
167
|
-
className: a,
|
|
168
|
-
"data-date-field": !0
|
|
169
|
-
}, l && u, /* @__PURE__ */ t.createElement($, {
|
|
170
|
-
"aria-labelledby": l ? c : void 0,
|
|
171
|
-
value: m,
|
|
172
|
-
onChange: d,
|
|
173
|
-
isDisabled: r,
|
|
174
|
-
isReadOnly: s,
|
|
175
|
-
isInvalid: i
|
|
176
|
-
}, E));
|
|
177
|
-
}, Ye = ({ className: e }) => /* @__PURE__ */ t.createElement(U, {
|
|
178
|
-
datePart: o.YEAR,
|
|
179
|
-
className: e
|
|
180
|
-
}), He = ({ className: e }) => {
|
|
181
|
-
const { id: a, hidePlaceholder: r, autoComplete: s } = y(), { inputId: l } = g(o.YEAR), { isFirstPart: c } = C(o.YEAR), { t: m } = T(), i = H(null), d = r ? void 0 : m("field.date.placeholder.year");
|
|
182
|
-
return V(() => {
|
|
183
|
-
var u;
|
|
184
|
-
c && ((u = i.current) == null || u.focus({
|
|
185
|
-
preventScroll: !0
|
|
186
|
-
}));
|
|
187
|
-
}, a), /* @__PURE__ */ t.createElement(z, {
|
|
188
|
-
ref: i,
|
|
189
|
-
id: l,
|
|
190
|
-
className: e,
|
|
191
|
-
placeholder: d,
|
|
192
|
-
autoComplete: x(s, o.YEAR),
|
|
193
|
-
maxLength: 4,
|
|
194
|
-
inputMode: "numeric",
|
|
195
|
-
"data-hook": o.YEAR
|
|
196
|
-
});
|
|
197
|
-
};
|
|
198
|
-
F.Label = Ye;
|
|
199
|
-
F.Input = He;
|
|
200
|
-
n.Label = De;
|
|
201
|
-
n.Month = O;
|
|
202
|
-
n.Day = L;
|
|
203
|
-
n.Year = F;
|
|
204
|
-
n.Description = fe;
|
|
205
|
-
n.Error = be;
|
|
206
|
-
function g(e) {
|
|
207
|
-
const { inputId: a } = W();
|
|
208
|
-
return N(() => {
|
|
209
|
-
const r = e.toLowerCase();
|
|
210
|
-
return {
|
|
211
|
-
inputId: `${a}-${r}-input`,
|
|
212
|
-
labelId: `${a}-${r}-label`
|
|
213
|
-
};
|
|
214
|
-
}, [
|
|
215
|
-
a,
|
|
216
|
-
e
|
|
217
|
-
]);
|
|
218
|
-
}
|
|
219
|
-
function C(e) {
|
|
220
|
-
const { value: a, onChange: r, hasError: s = !1 } = y(), { regionalFormat: l } = w(), c = N(() => le(a ?? ""), [
|
|
221
|
-
a
|
|
222
|
-
]), m = N(() => ce(s, a ?? ""), [
|
|
223
|
-
a,
|
|
224
|
-
s
|
|
225
|
-
]), i = c[e] || "", d = Y((E) => {
|
|
226
|
-
const b = ie(E, e, c);
|
|
227
|
-
r(b);
|
|
228
|
-
}, [
|
|
229
|
-
r,
|
|
230
|
-
c,
|
|
231
|
-
e
|
|
232
|
-
]), u = N(() => K(l).filter(Q).map((_) => _.toUpperCase())[0] === e, [
|
|
233
|
-
l,
|
|
234
|
-
e
|
|
235
|
-
]);
|
|
236
|
-
return {
|
|
237
|
-
partValue: i,
|
|
238
|
-
partError: m[e],
|
|
239
|
-
onPartChange: d,
|
|
240
|
-
isFirstPart: u
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
function U({ datePart: e, className: a }) {
|
|
244
|
-
const { inputId: r, labelId: s } = g(e), { t: l } = T(), c = `field.date.label.${e.toLowerCase()}`, m = l(c);
|
|
245
|
-
return /* @__PURE__ */ t.createElement("label", {
|
|
246
|
-
id: s,
|
|
247
|
-
htmlFor: r,
|
|
248
|
-
className: a
|
|
249
|
-
}, m);
|
|
250
|
-
}
|
|
251
|
-
const we = "_fields_1mv4t_1", Ve = "_month_1mv4t_10", Be = "_day_1mv4t_11", xe = "_year_1mv4t_12", Ue = "_dayInput_1mv4t_28", ke = "_yearInput_1mv4t_29", qe = "_monthTrigger_1mv4t_33", $e = "_monthOption_1mv4t_53", h = {
|
|
252
|
-
fields: we,
|
|
253
|
-
month: Ve,
|
|
254
|
-
day: Be,
|
|
255
|
-
year: xe,
|
|
256
|
-
dayInput: Ue,
|
|
257
|
-
yearInput: ke,
|
|
258
|
-
monthTrigger: qe,
|
|
259
|
-
monthOption: $e
|
|
260
|
-
}, ze = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ae, {
|
|
261
|
-
content: e,
|
|
262
|
-
locale: a
|
|
263
|
-
}), dt = () => {
|
|
264
|
-
const e = Ce(h.monthTrigger), a = _e(h.monthOption, Re), r = q(h.dayInput), s = q(h.yearInput);
|
|
265
|
-
return /* @__PURE__ */ t.createElement(n, {
|
|
266
|
-
className: h.fields
|
|
267
|
-
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
268
|
-
className: D(M, f.label)
|
|
269
|
-
}, /* @__PURE__ */ t.createElement(n.Label.Required, {
|
|
270
|
-
className: D(me, f.requiredMark)
|
|
271
|
-
})), /* @__PURE__ */ t.createElement(n.Month, {
|
|
272
|
-
className: h.month
|
|
273
|
-
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
274
|
-
className: D(M, f.label)
|
|
275
|
-
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
276
|
-
className: e
|
|
277
|
-
}, /* @__PURE__ */ t.createElement(Le, {
|
|
278
|
-
className: f.dropdownIcon
|
|
279
|
-
})), /* @__PURE__ */ t.createElement(n.Month.Options, {
|
|
280
|
-
className: D(de, f.selectPopover, f.dropdownPopover)
|
|
281
|
-
}, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
|
|
282
|
-
className: a
|
|
283
|
-
}))), /* @__PURE__ */ t.createElement(n.Day, {
|
|
284
|
-
className: h.day
|
|
285
|
-
}, /* @__PURE__ */ t.createElement(n.Day.Label, {
|
|
286
|
-
className: D(M, f.label)
|
|
287
|
-
}), /* @__PURE__ */ t.createElement(n.Day.Input, {
|
|
288
|
-
className: r
|
|
289
|
-
})), /* @__PURE__ */ t.createElement(n.Year, {
|
|
290
|
-
className: h.year
|
|
291
|
-
}, /* @__PURE__ */ t.createElement(n.Year.Label, {
|
|
292
|
-
className: D(M, f.label)
|
|
293
|
-
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
294
|
-
className: s
|
|
295
|
-
})), /* @__PURE__ */ t.createElement(n.Error, {
|
|
296
|
-
className: D(ue, f.error)
|
|
297
|
-
}, /* @__PURE__ */ t.createElement(Fe, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
298
|
-
className: D(pe, f.description)
|
|
299
|
-
}, ze));
|
|
300
|
-
};
|
|
301
|
-
export {
|
|
302
|
-
dt as D
|
|
303
|
-
};
|