@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,433 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as oe } from "@wix/ricos/viewer";
|
|
2
|
-
import h from "classnames";
|
|
3
|
-
import t, { useMemo as T, useState as G, useCallback as H, useRef as U, useContext as se } from "react";
|
|
4
|
-
import { parseTime as le } from "@internationalized/date";
|
|
5
|
-
import { UNSAFE_PortalProvider as ie } from "react-aria";
|
|
6
|
-
import { ListBoxItem as ce, Select as me, TextField as Q, TimeField as de, SelectValue as ue, Input as W, DateInput as pe, DateSegment as B, TimeFieldStateContext as Ee } from "react-aria-components";
|
|
7
|
-
import { bo as f, bl as X, bg as q, aV as J, b6 as Z, aI as d, by as L, ba as j, aX as fe, aP as he, bd as be, aR as K, bq as z, R, a0 as ge, y as Ie, H as De, v as Ne } from "./form-D7ulDPh1.js";
|
|
8
|
-
import { f as u, a as P } from "./find-child-C60k4CxG.js";
|
|
9
|
-
import { g as _e } from "./helpers-HmkkXrh2.js";
|
|
10
|
-
import { D as ye, E as Oe } from "./field-error-headless-vApyo-y9.js";
|
|
11
|
-
import { L as Te } from "./field-label-headless-C8-ShLxy.js";
|
|
12
|
-
import { F as Le } from "./fieldset-headless-CD3fds9J.js";
|
|
13
|
-
import { N as Ce, E as Fe, S as Pe } from "./non-modal-popover-D-u13tmp.js";
|
|
14
|
-
import { a as Se } from "./use-is-forced-open-dropdown-Bw_IFUKt.js";
|
|
15
|
-
import { V as Me, a as Re, u as Ae } from "./use-dropdown-trigger-class-name-BKOFwNvc.js";
|
|
16
|
-
import { C as we } from "./chevron-down-icon-CcpVm6B-.js";
|
|
17
|
-
import { E as ve } from "./error-icon-hZxQ6DEy.js";
|
|
18
|
-
import { H as Y } from "./custom-focus-class-_483Pkwp.js";
|
|
19
|
-
import { s as g } from "./field-rac.module-DP0lkkEv.js";
|
|
20
|
-
import { u as k } from "./use-text-input-class-name-DFMQAg_E.js";
|
|
21
|
-
const l = ({ children: e, className: a }) => {
|
|
22
|
-
const { id: n, required: r, onBlur: o, onFocus: s, FieldLayout: i } = f(), { inputId: m, labelId: c, ariaDescribedBy: b } = X(), { regionalFormat: p } = q(), _ = T(() => J(p).filter(Z).map((M) => M.toUpperCase()), [
|
|
23
|
-
p
|
|
24
|
-
]), S = u(e, l.Label), v = u(e, l.Description), D = u(e, l.Error), N = {
|
|
25
|
-
[d.MONTH]: u(e, l.Month),
|
|
26
|
-
[d.DAY]: u(e, l.Day),
|
|
27
|
-
[d.YEAR]: u(e, l.Year)
|
|
28
|
-
}, y = u(e, l.Time);
|
|
29
|
-
return /* @__PURE__ */ t.createElement(i, {
|
|
30
|
-
fieldId: n,
|
|
31
|
-
renderLabel: () => P(S, {
|
|
32
|
-
as: "div"
|
|
33
|
-
}),
|
|
34
|
-
renderInput: () => /* @__PURE__ */ t.createElement(Le, {
|
|
35
|
-
id: m,
|
|
36
|
-
ariaLabelledBy: c,
|
|
37
|
-
ariaDescribedBy: b,
|
|
38
|
-
required: r,
|
|
39
|
-
onBlur: o,
|
|
40
|
-
onFocus: s,
|
|
41
|
-
className: a
|
|
42
|
-
}, N[_[0]], N[_[1]], N[_[2]], y),
|
|
43
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, D, v)
|
|
44
|
-
});
|
|
45
|
-
}, C = ({ children: e, className: a }) => {
|
|
46
|
-
const { id: n, disabled: r, readOnly: o, showDateLabels: s, hidePlaceholder: i } = f(), { labelId: m } = O(d.MONTH), { partValue: c, partError: b, onPartChange: p } = F(d.MONTH), { t: _ } = L(), [S, v] = G(!1), D = Se(n), [N, y] = G(null), M = i ? Fe : _("field.date.placeholder.month"), ee = H((V) => {
|
|
47
|
-
o || p(typeof V == "string" ? V : "");
|
|
48
|
-
}, [
|
|
49
|
-
p,
|
|
50
|
-
o
|
|
51
|
-
]), te = H((V) => {
|
|
52
|
-
v(V && !o);
|
|
53
|
-
}, [
|
|
54
|
-
o
|
|
55
|
-
]), ae = u(e, C.Label), ne = u(e, C.Trigger), re = u(e, C.Options);
|
|
56
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
57
|
-
className: a,
|
|
58
|
-
"data-date-field": !0
|
|
59
|
-
}, s ? ae : null, /* @__PURE__ */ t.createElement("div", {
|
|
60
|
-
ref: y,
|
|
61
|
-
style: {
|
|
62
|
-
display: "contents"
|
|
63
|
-
}
|
|
64
|
-
}), /* @__PURE__ */ t.createElement(ie, {
|
|
65
|
-
getContainer: () => N
|
|
66
|
-
}, /* @__PURE__ */ t.createElement(me, {
|
|
67
|
-
"aria-labelledby": s ? m : void 0,
|
|
68
|
-
value: c || null,
|
|
69
|
-
onChange: ee,
|
|
70
|
-
isDisabled: r,
|
|
71
|
-
isInvalid: b,
|
|
72
|
-
placeholder: M,
|
|
73
|
-
isOpen: D || S,
|
|
74
|
-
onOpenChange: D ? void 0 : te
|
|
75
|
-
}, ne, P(re, {
|
|
76
|
-
isForcedOpen: D
|
|
77
|
-
}))));
|
|
78
|
-
}, Ve = ({ className: e }) => /* @__PURE__ */ t.createElement($, {
|
|
79
|
-
datePart: d.MONTH,
|
|
80
|
-
className: e
|
|
81
|
-
}), Ye = ({ children: e, className: a }) => {
|
|
82
|
-
const { id: n, readOnly: r } = f(), { inputId: o } = O(d.MONTH), { partError: s, isFirstPart: i } = F(d.MONTH), m = U(null);
|
|
83
|
-
return z(() => {
|
|
84
|
-
var c;
|
|
85
|
-
i && ((c = m.current) == null || c.focus({
|
|
86
|
-
preventScroll: !0
|
|
87
|
-
}));
|
|
88
|
-
}, n), /* @__PURE__ */ t.createElement(Pe, {
|
|
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(ue, null), e);
|
|
96
|
-
}, x = ({ children: e, className: a, ...n }) => {
|
|
97
|
-
const { isForcedOpen: r } = n, { language: o } = q(), s = T(() => _e(o), [
|
|
98
|
-
o
|
|
99
|
-
]), i = u(e, x.Option) ?? /* @__PURE__ */ t.createElement(x.Option, null);
|
|
100
|
-
return /* @__PURE__ */ t.createElement(Ce, {
|
|
101
|
-
className: a,
|
|
102
|
-
containerPadding: 0,
|
|
103
|
-
offset: 0
|
|
104
|
-
}, /* @__PURE__ */ t.createElement(Me, {
|
|
105
|
-
isForcedOpen: r,
|
|
106
|
-
autoFocus: r ? !1 : void 0
|
|
107
|
-
}, s.map((m, c) => P(i, {
|
|
108
|
-
key: String(c + 1),
|
|
109
|
-
value: String(c + 1),
|
|
110
|
-
label: m
|
|
111
|
-
}))));
|
|
112
|
-
}, He = ({ className: e, ...a }) => {
|
|
113
|
-
const { value: n, label: r } = a;
|
|
114
|
-
return /* @__PURE__ */ t.createElement(ce, {
|
|
115
|
-
className: e,
|
|
116
|
-
id: n,
|
|
117
|
-
textValue: r
|
|
118
|
-
}, r);
|
|
119
|
-
};
|
|
120
|
-
C.Label = Ve;
|
|
121
|
-
C.Trigger = Ye;
|
|
122
|
-
C.Options = x;
|
|
123
|
-
x.Option = He;
|
|
124
|
-
const A = ({ children: e, className: a }) => {
|
|
125
|
-
const { disabled: n, readOnly: r, showDateLabels: o } = f(), { labelId: s } = O(d.DAY), { partValue: i, partError: m, onPartChange: c } = F(d.DAY), b = u(e, A.Label), p = u(e, A.Input);
|
|
126
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
127
|
-
className: a,
|
|
128
|
-
"data-date-field": !0
|
|
129
|
-
}, o && b, /* @__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
|
-
}, xe = ({ className: e }) => /* @__PURE__ */ t.createElement($, {
|
|
138
|
-
datePart: d.DAY,
|
|
139
|
-
className: e
|
|
140
|
-
}), Be = ({ className: e }) => {
|
|
141
|
-
const { id: a, hidePlaceholder: n } = f(), { inputId: r } = O(d.DAY), { isFirstPart: o } = F(d.DAY), { t: s } = L(), i = U(null), m = n ? void 0 : s("field.date.placeholder.day");
|
|
142
|
-
return z(() => {
|
|
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
|
-
A.Label = xe;
|
|
158
|
-
A.Input = Be;
|
|
159
|
-
const w = ({ children: e, className: a }) => {
|
|
160
|
-
const { disabled: n, readOnly: r, showDateLabels: o } = f(), { labelId: s } = O(d.YEAR), { partValue: i, partError: m, onPartChange: c } = F(d.YEAR), b = u(e, w.Label), p = u(e, w.Input);
|
|
161
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
162
|
-
className: a,
|
|
163
|
-
"data-date-field": !0
|
|
164
|
-
}, o && b, /* @__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
|
-
}, ke = ({ className: e }) => /* @__PURE__ */ t.createElement($, {
|
|
173
|
-
datePart: d.YEAR,
|
|
174
|
-
className: e
|
|
175
|
-
}), Ue = ({ className: e }) => {
|
|
176
|
-
const { id: a, hidePlaceholder: n } = f(), { inputId: r } = O(d.YEAR), { isFirstPart: o } = F(d.YEAR), { t: s } = L(), i = U(null), m = n ? void 0 : s("field.date.placeholder.year");
|
|
177
|
-
return z(() => {
|
|
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
|
-
w.Label = ke;
|
|
193
|
-
w.Input = Ue;
|
|
194
|
-
const I = ({ children: e, className: a }) => {
|
|
195
|
-
const { disabled: n, readOnly: r, use24HourFormat: o, showDateLabels: s } = f(), { labelId: i } = O("time"), { partValue: m, partError: c, onPartChange: b } = F("time"), p = u(e, I.Label), _ = u(e, I.Input);
|
|
196
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
197
|
-
className: a,
|
|
198
|
-
"data-date-field": !0
|
|
199
|
-
}, s && p, /* @__PURE__ */ t.createElement(de, {
|
|
200
|
-
"aria-labelledby": s ? i : void 0,
|
|
201
|
-
value: m,
|
|
202
|
-
onChange: b,
|
|
203
|
-
isDisabled: n,
|
|
204
|
-
isReadOnly: r,
|
|
205
|
-
isInvalid: c,
|
|
206
|
-
hourCycle: o ? 24 : 12
|
|
207
|
-
}, _));
|
|
208
|
-
}, qe = ({ className: e }) => {
|
|
209
|
-
const { inputId: a, labelId: n } = O("time"), { t: r } = L(), o = r("field.date.label.time");
|
|
210
|
-
return /* @__PURE__ */ t.createElement("label", {
|
|
211
|
-
id: n,
|
|
212
|
-
htmlFor: a,
|
|
213
|
-
className: e
|
|
214
|
-
}, o);
|
|
215
|
-
}, ze = ({ children: e, className: a }) => {
|
|
216
|
-
const { hidePlaceholder: n } = f(), r = u(e, I.Hour), o = u(e, I.Minute), s = u(e, I.Period);
|
|
217
|
-
return /* @__PURE__ */ t.createElement(pe, {
|
|
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 P(r, {
|
|
225
|
-
segment: i
|
|
226
|
-
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
227
|
-
case "minute":
|
|
228
|
-
return P(o, {
|
|
229
|
-
segment: i
|
|
230
|
-
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
231
|
-
case "dayPeriod":
|
|
232
|
-
return P(s, {
|
|
233
|
-
segment: i
|
|
234
|
-
}) || /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
235
|
-
case "literal":
|
|
236
|
-
return /* @__PURE__ */ t.createElement(B, {
|
|
237
|
-
segment: i
|
|
238
|
-
});
|
|
239
|
-
default:
|
|
240
|
-
return /* @__PURE__ */ t.createElement(t.Fragment, null);
|
|
241
|
-
}
|
|
242
|
-
});
|
|
243
|
-
}, $e = ({ className: e, ...a }) => {
|
|
244
|
-
const { hidePlaceholder: n } = f(), { segment: r } = a, { t: o } = L(), s = n ? void 0 : o("field.date.placeholder.hour");
|
|
245
|
-
return /* @__PURE__ */ t.createElement(B, {
|
|
246
|
-
segment: r,
|
|
247
|
-
className: e,
|
|
248
|
-
...s && {
|
|
249
|
-
placeholder: s
|
|
250
|
-
}
|
|
251
|
-
});
|
|
252
|
-
}, Ge = ({ className: e, ...a }) => {
|
|
253
|
-
const { hidePlaceholder: n } = f(), { segment: r } = a, { t: o } = L(), s = n ? void 0 : o("field.date.placeholder.minute");
|
|
254
|
-
return /* @__PURE__ */ t.createElement(B, {
|
|
255
|
-
segment: r,
|
|
256
|
-
className: e,
|
|
257
|
-
...s && {
|
|
258
|
-
placeholder: s
|
|
259
|
-
}
|
|
260
|
-
});
|
|
261
|
-
}, je = ({ className: e, ...a }) => {
|
|
262
|
-
const { hidePlaceholder: n } = f(), { segment: r } = a, { t: o } = L(), s = se(Ee), i = n ? void 0 : o("field.date.placeholder.period"), m = () => s == null ? void 0 : s.increment("dayPeriod");
|
|
263
|
-
return /* @__PURE__ */ t.createElement(B, {
|
|
264
|
-
segment: r,
|
|
265
|
-
className: e,
|
|
266
|
-
onClick: m,
|
|
267
|
-
...i && {
|
|
268
|
-
placeholder: i
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
};
|
|
272
|
-
I.Label = qe;
|
|
273
|
-
I.Input = ze;
|
|
274
|
-
I.Hour = $e;
|
|
275
|
-
I.Minute = Ge;
|
|
276
|
-
I.Period = je;
|
|
277
|
-
l.Label = Te;
|
|
278
|
-
l.Month = C;
|
|
279
|
-
l.Day = A;
|
|
280
|
-
l.Year = w;
|
|
281
|
-
l.Time = I;
|
|
282
|
-
l.Description = ye;
|
|
283
|
-
l.Error = Oe;
|
|
284
|
-
function O(e) {
|
|
285
|
-
const { inputId: a } = X();
|
|
286
|
-
return T(() => {
|
|
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 F(e) {
|
|
298
|
-
const { value: a, onChange: n, hasError: r = !1 } = f(), { regionalFormat: o } = q(), [s, i] = T(() => j(a ?? ""), [
|
|
299
|
-
a
|
|
300
|
-
]), m = T(() => fe(r, a ?? ""), [
|
|
301
|
-
a,
|
|
302
|
-
r
|
|
303
|
-
]), c = T(() => he(s), [
|
|
304
|
-
s
|
|
305
|
-
]), b = T(() => Ke(i), [
|
|
306
|
-
i
|
|
307
|
-
]), p = H((D) => {
|
|
308
|
-
const N = Qe(D), y = K(s, N);
|
|
309
|
-
n(y);
|
|
310
|
-
}, [
|
|
311
|
-
n,
|
|
312
|
-
s
|
|
313
|
-
]), _ = H((D) => {
|
|
314
|
-
const [, N] = j(a ?? ""), y = be(D, e, c), M = K(y, N);
|
|
315
|
-
n(M);
|
|
316
|
-
}, [
|
|
317
|
-
n,
|
|
318
|
-
a,
|
|
319
|
-
c,
|
|
320
|
-
e
|
|
321
|
-
]), S = T(() => e === "time" ? !1 : J(o).filter(Z).map((y) => y.toUpperCase())[0] === e, [
|
|
322
|
-
o,
|
|
323
|
-
e
|
|
324
|
-
]);
|
|
325
|
-
return e === "time" ? {
|
|
326
|
-
partValue: b,
|
|
327
|
-
partError: m.TIME,
|
|
328
|
-
onPartChange: p,
|
|
329
|
-
isFirstPart: !1
|
|
330
|
-
} : {
|
|
331
|
-
partValue: c[e] || "",
|
|
332
|
-
partError: m[e],
|
|
333
|
-
onPartChange: _,
|
|
334
|
-
isFirstPart: S
|
|
335
|
-
};
|
|
336
|
-
}
|
|
337
|
-
function $({ datePart: e, className: a }) {
|
|
338
|
-
const { inputId: n, labelId: r } = O(e), { t: o } = L(), 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 Ke(e) {
|
|
346
|
-
if (!e)
|
|
347
|
-
return null;
|
|
348
|
-
try {
|
|
349
|
-
return le(e);
|
|
350
|
-
} catch {
|
|
351
|
-
return null;
|
|
352
|
-
}
|
|
353
|
-
}
|
|
354
|
-
function Qe(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 We = "_fields_1ofw4_1", Xe = "_month_1ofw4_10", Je = "_day_1ofw4_11", Ze = "_year_1ofw4_12", et = "_timeGroup_1ofw4_13", tt = "_dayInput_1ofw4_34", at = "_yearInput_1ofw4_35", nt = "_monthTrigger_1ofw4_39", rt = "_monthOption_1ofw4_59", ot = "_time_1ofw4_13", st = "_hour_1ofw4_81", lt = "_minute_1ofw4_82", it = "_period_1ofw4_83", E = {
|
|
365
|
-
fields: We,
|
|
366
|
-
month: Xe,
|
|
367
|
-
day: Je,
|
|
368
|
-
year: Ze,
|
|
369
|
-
timeGroup: et,
|
|
370
|
-
dayInput: tt,
|
|
371
|
-
yearInput: at,
|
|
372
|
-
monthTrigger: nt,
|
|
373
|
-
monthOption: rt,
|
|
374
|
-
time: ot,
|
|
375
|
-
hour: st,
|
|
376
|
-
minute: lt,
|
|
377
|
-
period: it
|
|
378
|
-
}, ct = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(oe, {
|
|
379
|
-
content: e,
|
|
380
|
-
locale: a
|
|
381
|
-
}), St = () => {
|
|
382
|
-
const e = Re(E.monthTrigger), a = Ae(E.monthOption, Y), n = k(E.dayInput), r = k(E.yearInput), o = k(E.time);
|
|
383
|
-
return /* @__PURE__ */ t.createElement(l, {
|
|
384
|
-
className: E.fields
|
|
385
|
-
}, /* @__PURE__ */ t.createElement(l.Label, {
|
|
386
|
-
className: h(R, g.label)
|
|
387
|
-
}, /* @__PURE__ */ t.createElement(l.Label.Required, {
|
|
388
|
-
className: h(ge, g.requiredMark)
|
|
389
|
-
})), /* @__PURE__ */ t.createElement(l.Month, {
|
|
390
|
-
className: E.month
|
|
391
|
-
}, /* @__PURE__ */ t.createElement(l.Month.Label, {
|
|
392
|
-
className: h(R, g.label)
|
|
393
|
-
}), /* @__PURE__ */ t.createElement(l.Month.Trigger, {
|
|
394
|
-
className: e
|
|
395
|
-
}, /* @__PURE__ */ t.createElement(we, {
|
|
396
|
-
className: g.dropdownIcon
|
|
397
|
-
})), /* @__PURE__ */ t.createElement(l.Month.Options, {
|
|
398
|
-
className: h(Ie, g.selectPopover, g.dropdownPopover)
|
|
399
|
-
}, /* @__PURE__ */ t.createElement(l.Month.Options.Option, {
|
|
400
|
-
className: a
|
|
401
|
-
}))), /* @__PURE__ */ t.createElement(l.Day, {
|
|
402
|
-
className: E.day
|
|
403
|
-
}, /* @__PURE__ */ t.createElement(l.Day.Label, {
|
|
404
|
-
className: h(R, g.label)
|
|
405
|
-
}), /* @__PURE__ */ t.createElement(l.Day.Input, {
|
|
406
|
-
className: n
|
|
407
|
-
})), /* @__PURE__ */ t.createElement(l.Year, {
|
|
408
|
-
className: E.year
|
|
409
|
-
}, /* @__PURE__ */ t.createElement(l.Year.Label, {
|
|
410
|
-
className: h(R, g.label)
|
|
411
|
-
}), /* @__PURE__ */ t.createElement(l.Year.Input, {
|
|
412
|
-
className: r
|
|
413
|
-
})), /* @__PURE__ */ t.createElement(l.Time, {
|
|
414
|
-
className: E.timeGroup
|
|
415
|
-
}, /* @__PURE__ */ t.createElement(l.Time.Label, {
|
|
416
|
-
className: h(R, g.label)
|
|
417
|
-
}), /* @__PURE__ */ t.createElement(l.Time.Input, {
|
|
418
|
-
className: o
|
|
419
|
-
}, /* @__PURE__ */ t.createElement(l.Time.Hour, {
|
|
420
|
-
className: h(E.hour, Y)
|
|
421
|
-
}), /* @__PURE__ */ t.createElement(l.Time.Minute, {
|
|
422
|
-
className: h(E.minute, Y)
|
|
423
|
-
}), /* @__PURE__ */ t.createElement(l.Time.Period, {
|
|
424
|
-
className: h(E.period, Y)
|
|
425
|
-
}))), /* @__PURE__ */ t.createElement(l.Error, {
|
|
426
|
-
className: h(De, g.error)
|
|
427
|
-
}, /* @__PURE__ */ t.createElement(ve, null), /* @__PURE__ */ t.createElement(l.Error.Text, null)), /* @__PURE__ */ t.createElement(l.Description, {
|
|
428
|
-
className: h(Ne, g.description)
|
|
429
|
-
}, ct));
|
|
430
|
-
};
|
|
431
|
-
export {
|
|
432
|
-
St as D
|
|
433
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import o from "react";
|
|
2
|
-
import { bo as e, aq as t } from "./form-D7ulDPh1.js";
|
|
3
|
-
import { R as p } from "./radio-group-field-rac-DrOiyk5C.js";
|
|
4
|
-
import { a } from "./default-limits-D7qVv_Hv.js";
|
|
5
|
-
const l = () => {
|
|
6
|
-
const r = {
|
|
7
|
-
...e(),
|
|
8
|
-
otherInputCharacterLimit: a
|
|
9
|
-
};
|
|
10
|
-
return /* @__PURE__ */ o.createElement(t.Provider, {
|
|
11
|
-
value: {
|
|
12
|
-
v2: r
|
|
13
|
-
}
|
|
14
|
-
}, /* @__PURE__ */ o.createElement(p, null));
|
|
15
|
-
};
|
|
16
|
-
export {
|
|
17
|
-
l as DextRadioGroupRAC
|
|
18
|
-
};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import e, { useState as b, useCallback as g, useRef as _ } from "react";
|
|
2
|
-
import { UNSAFE_PortalProvider as k } from "react-aria";
|
|
3
|
-
import { Select as M, SelectValue as H, ListBoxItem as U } from "react-aria-components";
|
|
4
|
-
import { bo as E, bl as O, bq as Y } from "./form-D7ulDPh1.js";
|
|
5
|
-
import { f as d, a as F } from "./find-child-C60k4CxG.js";
|
|
6
|
-
import { D as j, E as z } from "./field-error-headless-vApyo-y9.js";
|
|
7
|
-
import { L as G } from "./field-label-headless-C8-ShLxy.js";
|
|
8
|
-
import { E as J, S as K, N as Q } from "./non-modal-popover-D-u13tmp.js";
|
|
9
|
-
import { a as W } from "./use-is-forced-open-dropdown-Bw_IFUKt.js";
|
|
10
|
-
import { V as X } from "./use-dropdown-trigger-class-name-BKOFwNvc.js";
|
|
11
|
-
const r = ({ children: n }) => {
|
|
12
|
-
const { id: s, value: o, defaultValue: a, options: u = [], readOnly: l, onChange: t, placeholder: p, disabled: i, required: v, onBlur: L, onFocus: y, FieldLayout: C, hasError: D } = E(), [I, h] = b(!1), m = W(s), [P, S] = b(null), T = o && u.some((c) => (c.value ?? c.label) === o) ? o : a || null, { labelId: B } = O(), N = g((c) => {
|
|
13
|
-
l || t(typeof c == "string" ? c : null);
|
|
14
|
-
}, [
|
|
15
|
-
t,
|
|
16
|
-
l
|
|
17
|
-
]), V = g((c) => h(c && !i && !l), [
|
|
18
|
-
i,
|
|
19
|
-
l
|
|
20
|
-
]), R = d(n, r.Label), x = d(n, r.Trigger), q = d(n, r.Options), w = d(n, r.Description), A = d(n, r.Error);
|
|
21
|
-
return /* @__PURE__ */ e.createElement(C, {
|
|
22
|
-
fieldId: s,
|
|
23
|
-
renderLabel: () => R,
|
|
24
|
-
renderInput: () => /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", {
|
|
25
|
-
ref: S,
|
|
26
|
-
style: {
|
|
27
|
-
display: "contents"
|
|
28
|
-
}
|
|
29
|
-
}), /* @__PURE__ */ e.createElement(k, {
|
|
30
|
-
getContainer: () => P
|
|
31
|
-
}, /* @__PURE__ */ e.createElement(M, {
|
|
32
|
-
"aria-labelledby": B,
|
|
33
|
-
value: T,
|
|
34
|
-
isOpen: m || I && !i && !l,
|
|
35
|
-
onOpenChange: m ? void 0 : V,
|
|
36
|
-
onChange: N,
|
|
37
|
-
isDisabled: i,
|
|
38
|
-
isInvalid: D,
|
|
39
|
-
isRequired: v,
|
|
40
|
-
placeholder: p || J,
|
|
41
|
-
onBlur: L,
|
|
42
|
-
onFocus: y
|
|
43
|
-
}, x, F(q, {
|
|
44
|
-
isForcedOpen: m
|
|
45
|
-
})))),
|
|
46
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, A, w)
|
|
47
|
-
});
|
|
48
|
-
}, Z = ({ children: n, className: s }) => {
|
|
49
|
-
const { inputId: o, ariaDescribedBy: a } = O(), { id: u, hasError: l, isLoading: t } = E(), p = _(null);
|
|
50
|
-
return Y(() => {
|
|
51
|
-
var i;
|
|
52
|
-
(i = p.current) == null || i.focus({
|
|
53
|
-
preventScroll: !0
|
|
54
|
-
});
|
|
55
|
-
}, u), /* @__PURE__ */ e.createElement(K, {
|
|
56
|
-
ref: p,
|
|
57
|
-
id: o,
|
|
58
|
-
"aria-describedby": a,
|
|
59
|
-
className: s,
|
|
60
|
-
"data-invalid": l || void 0,
|
|
61
|
-
"data-loading": t || void 0
|
|
62
|
-
}, /* @__PURE__ */ e.createElement(H, null), n);
|
|
63
|
-
}, f = ({ children: n, className: s, ...o }) => {
|
|
64
|
-
const { isForcedOpen: a } = o, { options: u = [] } = E(), l = d(n, f.Option);
|
|
65
|
-
return /* @__PURE__ */ e.createElement(Q, {
|
|
66
|
-
className: s,
|
|
67
|
-
containerPadding: 0,
|
|
68
|
-
offset: 0
|
|
69
|
-
}, /* @__PURE__ */ e.createElement(X, {
|
|
70
|
-
isForcedOpen: a,
|
|
71
|
-
autoFocus: a ? !1 : void 0
|
|
72
|
-
}, u.map((t) => F(l, {
|
|
73
|
-
key: t.value ?? t.label,
|
|
74
|
-
value: t.value ?? t.label,
|
|
75
|
-
label: t.label
|
|
76
|
-
}))));
|
|
77
|
-
}, $ = ({ className: n, ...s }) => {
|
|
78
|
-
const { value: o, label: a } = s;
|
|
79
|
-
return /* @__PURE__ */ e.createElement(U, {
|
|
80
|
-
className: n,
|
|
81
|
-
id: o,
|
|
82
|
-
textValue: a
|
|
83
|
-
}, a);
|
|
84
|
-
};
|
|
85
|
-
f.Option = $;
|
|
86
|
-
r.Label = G;
|
|
87
|
-
r.Trigger = Z;
|
|
88
|
-
r.Options = f;
|
|
89
|
-
r.Description = j;
|
|
90
|
-
r.Error = z;
|
|
91
|
-
export {
|
|
92
|
-
r as D
|
|
93
|
-
};
|