@wix/form-elements 1.144.0 → 1.146.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-BxrHjvGM.js → appointment-rac-scUix9QX.js} +4 -4
- package/dist/component/{bookings-address-rac-CLWQa4ND.js → bookings-address-rac-CKemkJOO.js} +1 -1
- package/dist/component/{bookings-email-rac-DZemUnFy.js → bookings-email-rac-CDqdhPAB.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DyGMqRWi.js → bookings-first-name-rac-DEy_7Hjb.js} +1 -1
- package/dist/component/{bookings-header-rac-DmUeRhWl.js → bookings-header-rac-Bl4xy9lB.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DOuCYe0Q.js → bookings-last-name-rac-CsL9xQ1W.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BnmS1sak.js → bookings-login-bar-rac-DkHYQ4No.js} +1 -1
- package/dist/component/{bookings-phone-rac-F5YJaXHy.js → bookings-phone-rac-BoBiFwbV.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DAuqLM8j.js → bookings-rich-text-rac-DZZnPKWA.js} +1 -1
- package/dist/component/{checkbox-field-rac-DsQrwgzd.js → checkbox-field-rac-UgLmJxB-.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-oPw2miey.js → checkbox-group-field-headless-C809nB0Q.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-hPscGPkW.js → checkbox-group-field-rac-u4i4wG21.js} +4 -4
- package/dist/component/{checkbox-group-rac-DuIn-RKl.js → checkbox-group-rac-DBAQhSo3.js} +1 -1
- package/dist/component/{checkbox-rac-C_-b9_8s.js → checkbox-rac-FDQVsI5-.js} +1 -1
- package/dist/component/{contacts-address-rac-CbIN1ubI.js → contacts-address-rac-DnArylPa.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-B-ek4Puf.js → contacts-birthdate-rac-C19jhGEO.js} +1 -1
- package/dist/component/{contacts-company-rac-D2xGgOC0.js → contacts-company-rac-Dxs0hs_i.js} +1 -1
- package/dist/component/{contacts-email-rac-CpbAyHUl.js → contacts-email-rac-D-H43L8r.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DM0Uki6x.js → contacts-first-name-rac-DwV5NESk.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DV9wrigX.js → contacts-last-name-rac-C5v2xurf.js} +1 -1
- package/dist/component/{contacts-phone-rac-mIYYC0y2.js → contacts-phone-rac-D9a5x-xl.js} +1 -1
- package/dist/component/{contacts-position-rac-fYTx4IXC.js → contacts-position-rac-DfsgOv-k.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-nm5CFJHt.js → contacts-subscribe-rac-B-Hho0Kb.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-D4RFJf-S.js → contacts-tax-id-rac-q6TQkB4b.js} +1 -1
- package/dist/component/{date-availability-DKQ4Swlg.js → date-availability-CMDvf5VU.js} +1 -1
- package/dist/component/date-input-field-rac-C1WLUct3.js +297 -0
- package/dist/component/{date-input-rac-BbpWo9w0.js → date-input-rac-cNQ-nr4D.js} +1 -1
- package/dist/component/{date-picker-field-rac-Bza70SYg.js → date-picker-field-rac-mx11z-MO.js} +5 -5
- package/dist/component/{date-picker-rac-Ck7bd17y.js → date-picker-rac-DeTz17zC.js} +1 -1
- package/dist/component/{date-time-input-field-rac-DpAx183s.js → date-time-input-field-rac-feQ2E1eU.js} +6 -6
- package/dist/component/{date-time-input-rac-CAL-qDqR.js → date-time-input-rac-G0s0xP4v.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DLk1zE8Z.js → dext-checkbox-group-rac-BcTN1nJb.js} +2 -2
- package/dist/component/{dext-checkbox-rac-K0JY8ypt.js → dext-checkbox-rac-DX0TOrCO.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BIkqhNQ0.js → dext-date-picker-rac-CpDp11oa.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-heYLj9qT.js → dext-date-time-input-rac-BRvO8izU.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CE-hsE0g.js → dext-dropdown-rac-DGZ4Yi_X.js} +1 -1
- package/dist/component/{dext-email-rac-Djui3aGr.js → dext-email-rac-B9YCFHB4.js} +1 -1
- package/dist/component/{dext-number-input-rac-Up-zsZwY.js → dext-number-input-rac-D890dBZf.js} +1 -1
- package/dist/component/{dext-phone-rac-BnBq1KKf.js → dext-phone-rac-BAQftbXo.js} +1 -1
- package/dist/component/{dext-radio-group-rac-D8EsvhLV.js → dext-radio-group-rac-CtEjnu_X.js} +2 -2
- package/dist/component/{dext-rating-input-rac-BW6NPU1S.js → dext-rating-input-rac-BqQKVaHo.js} +1 -1
- package/dist/component/{dext-tags-rac--c_tiq-o.js → dext-tags-rac-zxxKcNUe.js} +2 -2
- package/dist/component/{dext-text-area-rac-CKFhfgDq.js → dext-text-area-rac-Ctp9SwPg.js} +1 -1
- package/dist/component/{dext-text-input-rac-CEcBfKSe.js → dext-text-input-rac-c_QMlyjr.js} +1 -1
- package/dist/component/{dext-url-input-rac-C4tT1NeS.js → dext-url-input-rac-96pv15aC.js} +1 -1
- package/dist/component/{donation-rac-Bqo7AUci.js → donation-rac-GEWKSLJY.js} +5 -5
- package/dist/component/{dropdown-field-headless-DMQSalL1.js → dropdown-field-headless-C3OxMhLE.js} +5 -5
- package/dist/component/{dropdown-field-rac-C31YjVhV.js → dropdown-field-rac-CCXfBmSc.js} +4 -4
- package/dist/component/{dropdown-rac-B6AZlzZ8.js → dropdown-rac-CR7hswXE.js} +1 -1
- package/dist/component/{ecom-address-rac-3pW-jse0.js → ecom-address-rac-khMuxEFD.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-Ms4JDivZ.js → ecom-subscription-checkbox-rac-CAi_AHpb.js} +2 -2
- package/dist/component/{email-input-field-rac-UJOSd8si.js → email-input-field-rac-B83mY2lg.js} +5 -3
- package/dist/component/{events-repeater-rac-fs9cQREp.js → events-repeater-rac-ClEwXgmb.js} +4 -4
- package/dist/component/{events-rsvp-rac-DRLspNfK.js → events-rsvp-rac-BJ5q2SVR.js} +3 -3
- package/dist/component/{field-error-headless-CyoNrDMA.js → field-error-headless-CsYQCsiT.js} +1 -1
- package/dist/component/{field-label-headless-vs578Vt6.js → field-label-headless-Yg_1PMSg.js} +1 -1
- package/dist/component/{file-upload-rac-DDAMgm1b.js → file-upload-rac-DJsuI_lR.js} +4 -4
- package/dist/component/{fixed-payment-rac-DRs5yPZ8.js → fixed-payment-rac-BMFe9wxU.js} +3 -3
- package/dist/component/{form-D-pcluMZ.js → form-Bed4Kfz8.js} +4033 -4059
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-BtLFBccj.js → header-field-rac-DPQTrOSZ.js} +2 -2
- package/dist/component/{header-rac-CNx4qpAR.js → header-rac-CzXsuLmE.js} +1 -1
- package/dist/component/{image-choice-rac-D-PsWyfU.js → image-choice-rac-R_4pbOSr.js} +4 -4
- package/dist/component/{index-B7rRv0cm.js → index-DZxHlvzt.js} +4 -4
- package/dist/component/{index-D4Jdw7jg.js → index-qSZCe_WC.js} +2 -2
- package/dist/component/{isObjectLike-DyNk-Hsj.js → isObjectLike-B-a5uaU-.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CowUg4Dk.js → multiline-address-field-rac-rv4IZZy_.js} +15 -7
- package/dist/component/{multiline-address-rac-CHLN9iqR.js → multiline-address-rac-DZ7cYtgn.js} +1 -1
- package/dist/component/{number-input-field-rac-Clow9sWB.js → number-input-field-rac-CL9iXKIf.js} +4 -4
- package/dist/component/{number-input-rac-CeUW4WGL.js → number-input-rac-BeGn6qJR.js} +1 -1
- package/dist/component/{password-rac-_FBw3XON.js → password-rac-DfvhdsKG.js} +51 -50
- package/dist/component/{payment-input-rac-CmeiCGKm.js → payment-input-rac-BmMfi5rf.js} +18 -17
- package/dist/component/{phone-input-field-rac-PIpEcS6h.js → phone-input-field-rac-DW0a1pXs.js} +7 -6
- package/dist/component/{phone-rac-D-RF_Dc1.js → phone-rac-quZjJ08H.js} +1 -1
- package/dist/component/{product-list-rac-CveI0FCQ.js → product-list-rac-Ci0KB7sN.js} +4 -4
- package/dist/component/{quiz-radio-group-rac-DmL5sv4m.js → quiz-radio-group-rac--UUtGx2t.js} +1 -1
- package/dist/component/{radio-button-module-classes-D6eJdPov.js → radio-button-module-classes-CqdBGknT.js} +3 -3
- package/dist/component/{radio-group-field-rac-CuTxslBP.js → radio-group-field-rac-w8fHpFKJ.js} +4 -4
- package/dist/component/{radio-group-rac-D1N9mKdI.js → radio-group-rac-jO8aghii.js} +1 -1
- package/dist/component/{rating-input-field-rac-tPHYwerw.js → rating-input-field-rac-BRc2PtqE.js} +4 -4
- package/dist/component/{rating-input-rac-BoYlGaYG.js → rating-input-rac-D9zs06xR.js} +1 -1
- package/dist/component/{rich-content-rac.module-BEpM1wGw.js → rich-content-rac.module-Cv3ZmD00.js} +1 -1
- package/dist/component/{rich-text-field-rac-DIBDp9fN.js → rich-text-field-rac-BmWuIfA8.js} +2 -2
- package/dist/component/{rich-text-rac-QNvqlXOl.js → rich-text-rac-BnqnrvB1.js} +1 -1
- package/dist/component/{service-dropdown-rac-BUka_sF2.js → service-dropdown-rac-Cl81KfJU.js} +5 -5
- package/dist/component/{services-multi-choice-rac-Dsy5tWby.js → services-multi-choice-rac-sQ1NF9hY.js} +5 -5
- package/dist/component/{signature-rac-K1d_jHlU.js → signature-rac-Huairu7V.js} +4 -4
- package/dist/component/{submit-button-rac-BRJtuej2.js → submit-button-rac-Dpg7N0TG.js} +2 -2
- package/dist/component/{tags-field-rac-BaBbtHcw.js → tags-field-rac-BQ8TEqXH.js} +5 -5
- package/dist/component/{tags-rac-DDg6W18e.js → tags-rac-CFOmyCCc.js} +1 -1
- package/dist/component/{text-area-field-rac-CB97Y6o1.js → text-area-field-rac-DNiMa7d3.js} +4 -4
- package/dist/component/{text-area-rac-E091fvmB.js → text-area-rac-kLFe-KbZ.js} +1 -1
- package/dist/component/{text-input-field-rac-BiSQ4pDp.js → text-input-field-rac-CqENSUUX.js} +3 -3
- package/dist/component/text-input-headless-BdPkEeK2.js +45 -0
- package/dist/component/{text-input-rac-N2D8bqU4.js → text-input-rac-uYQEfOtE.js} +1 -1
- package/dist/component/{time-input-rac-CMVYeoxi.js → time-input-rac-BYoojlJ9.js} +4 -4
- package/dist/component/{url-input-field-rac-BWpn4TfK.js → url-input-field-rac-BioH7kuz.js} +20 -19
- package/dist/component/{url-input-rac-U19lGKwd.js → url-input-rac-D2VSSyqW.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-DK1HCEOC.js → use-dropdown-option-class-name-BEmvU-Gg.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-XS469pt3.js → use-dropdown-trigger-class-name-qj9skLWZ.js} +2 -2
- package/dist/component/{use-element-state-class-name-BdjEjAk1.js → use-element-state-class-name-oiKCauK-.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-7nSuBlNd.js → use-hoverable-input-class-name-BW3nCyhG.js} +2 -2
- package/dist/component/{use-service-options-base-Bxw3_pyC.js → use-service-options-base-DXG60hA5.js} +1 -1
- package/dist/component/use-text-input-class-name-BhQFcXYH.js +6 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-DKZ-7UN1.js +0 -290
- package/dist/component/text-input-headless-BKxooAsH.js +0 -44
- package/dist/component/use-text-input-class-name-BB5fT5S6.js +0 -6
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as ee } from "@wix/ricos/viewer";
|
|
2
|
-
import h from "classnames";
|
|
3
|
-
import t, { useMemo as O, useState as k, useCallback as v, useRef as w } from "react";
|
|
4
|
-
import { UNSAFE_PortalProvider as te } from "react-aria";
|
|
5
|
-
import { ListBoxItem as ae, Select as ne, TextField as $, SelectValue as re, Input as q } from "react-aria-components";
|
|
6
|
-
import { bn as D, bk as z, bf as V, aU as G, b5 as K, aH as m, bx as S, aO as se, aV as oe, bc as le, bp as H, R as P, $ as ce, x as ie, G as me, u as de } from "./form-D-pcluMZ.js";
|
|
7
|
-
import { f as u, a as x } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { g as ue } from "./helpers-HmkkXrh2.js";
|
|
9
|
-
import { D as pe, E as Ee } from "./field-error-headless-CyoNrDMA.js";
|
|
10
|
-
import { L as fe } from "./field-label-headless-vs578Vt6.js";
|
|
11
|
-
import { F as be } from "./fieldset-headless-CD3fds9J.js";
|
|
12
|
-
import { N as he, E as ye, S as De } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
-
import { a as Ie, u as ge } from "./use-dropdown-trigger-class-name-XS469pt3.js";
|
|
14
|
-
import { V as Oe, u as Ne } from "./use-dropdown-option-class-name-DK1HCEOC.js";
|
|
15
|
-
import { C as Le } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
|
-
import { E as _e } from "./error-icon-hZxQ6DEy.js";
|
|
17
|
-
import { H as Ce } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
-
import { s as E } from "./field-rac.module-DfEb7pBp.js";
|
|
19
|
-
import { u as U } from "./use-text-input-class-name-BB5fT5S6.js";
|
|
20
|
-
const n = ({ children: e, className: a }) => {
|
|
21
|
-
const { id: r, required: s, onBlur: o, onFocus: l, FieldLayout: c } = D(), { inputId: d, labelId: i, ariaDescribedBy: f } = z(), { regionalFormat: p } = V(), b = O(() => G(p).filter(K).map((Y) => Y.toUpperCase()), [
|
|
22
|
-
p
|
|
23
|
-
]), L = u(e, n.Label), T = u(e, n.Description), _ = u(e, n.Error), C = {
|
|
24
|
-
[m.MONTH]: u(e, n.Month),
|
|
25
|
-
[m.DAY]: u(e, n.Day),
|
|
26
|
-
[m.YEAR]: u(e, n.Year)
|
|
27
|
-
};
|
|
28
|
-
return /* @__PURE__ */ t.createElement(c, {
|
|
29
|
-
fieldId: r,
|
|
30
|
-
renderLabel: () => x(L, {
|
|
31
|
-
as: "div"
|
|
32
|
-
}),
|
|
33
|
-
renderInput: () => /* @__PURE__ */ t.createElement(be, {
|
|
34
|
-
id: d,
|
|
35
|
-
ariaLabelledBy: i,
|
|
36
|
-
ariaDescribedBy: f,
|
|
37
|
-
required: s,
|
|
38
|
-
onBlur: o,
|
|
39
|
-
onFocus: l,
|
|
40
|
-
className: a
|
|
41
|
-
}, C[b[0]], C[b[1]], C[b[2]]),
|
|
42
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, _, T)
|
|
43
|
-
});
|
|
44
|
-
}, I = ({ children: e, className: a }) => {
|
|
45
|
-
const { id: r, disabled: s, readOnly: o, showDateLabels: l, hidePlaceholder: c } = D(), { labelId: d } = g(m.MONTH), { partValue: i, partError: f, onPartChange: p } = N(m.MONTH), { t: b } = S(), [L, T] = k(!1), _ = Ie(r), [C, Y] = k(null), Q = c ? ye : b("field.date.placeholder.month"), W = v((M) => {
|
|
46
|
-
o || p(typeof M == "string" ? M : "");
|
|
47
|
-
}, [
|
|
48
|
-
p,
|
|
49
|
-
o
|
|
50
|
-
]), j = v((M) => {
|
|
51
|
-
T(M && !o);
|
|
52
|
-
}, [
|
|
53
|
-
o
|
|
54
|
-
]), J = u(e, I.Label), X = u(e, I.Trigger), Z = u(e, I.Options);
|
|
55
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
56
|
-
className: a,
|
|
57
|
-
"data-date-field": !0
|
|
58
|
-
}, l ? J : null, /* @__PURE__ */ t.createElement("div", {
|
|
59
|
-
ref: Y,
|
|
60
|
-
style: {
|
|
61
|
-
display: "contents"
|
|
62
|
-
}
|
|
63
|
-
}), /* @__PURE__ */ t.createElement(te, {
|
|
64
|
-
getContainer: () => C
|
|
65
|
-
}, /* @__PURE__ */ t.createElement(ne, {
|
|
66
|
-
"aria-labelledby": l ? d : void 0,
|
|
67
|
-
value: i || null,
|
|
68
|
-
onChange: W,
|
|
69
|
-
isDisabled: s,
|
|
70
|
-
isInvalid: f,
|
|
71
|
-
placeholder: Q,
|
|
72
|
-
isOpen: _ || L,
|
|
73
|
-
onOpenChange: _ ? void 0 : j
|
|
74
|
-
}, X, x(Z, {
|
|
75
|
-
isForcedOpen: _
|
|
76
|
-
}))));
|
|
77
|
-
}, Fe = ({ className: e }) => /* @__PURE__ */ t.createElement(B, {
|
|
78
|
-
datePart: m.MONTH,
|
|
79
|
-
className: e
|
|
80
|
-
}), Re = ({ children: e, className: a }) => {
|
|
81
|
-
const { id: r, readOnly: s } = D(), { inputId: o } = g(m.MONTH), { partError: l, isFirstPart: c } = N(m.MONTH), d = w(null);
|
|
82
|
-
return H(() => {
|
|
83
|
-
var i;
|
|
84
|
-
c && ((i = d.current) == null || i.focus());
|
|
85
|
-
}, r), /* @__PURE__ */ t.createElement(De, {
|
|
86
|
-
ref: d,
|
|
87
|
-
id: o,
|
|
88
|
-
className: a,
|
|
89
|
-
"data-hook": m.MONTH,
|
|
90
|
-
"data-invalid": l || void 0,
|
|
91
|
-
"data-readonly": s || void 0
|
|
92
|
-
}, /* @__PURE__ */ t.createElement(re, null), e);
|
|
93
|
-
}, A = ({ children: e, className: a, ...r }) => {
|
|
94
|
-
const { isForcedOpen: s } = r, { language: o } = V(), l = O(() => ue(o), [
|
|
95
|
-
o
|
|
96
|
-
]), c = u(e, A.Option) ?? /* @__PURE__ */ t.createElement(A.Option, null);
|
|
97
|
-
return /* @__PURE__ */ t.createElement(he, {
|
|
98
|
-
className: a,
|
|
99
|
-
containerPadding: 0,
|
|
100
|
-
offset: 0
|
|
101
|
-
}, /* @__PURE__ */ t.createElement(Oe, {
|
|
102
|
-
isForcedOpen: s,
|
|
103
|
-
autoFocus: s ? !1 : void 0
|
|
104
|
-
}, l.map((d, i) => x(c, {
|
|
105
|
-
key: String(i + 1),
|
|
106
|
-
value: String(i + 1),
|
|
107
|
-
label: d
|
|
108
|
-
}))));
|
|
109
|
-
}, Me = ({ className: e, ...a }) => {
|
|
110
|
-
const { value: r, label: s } = a;
|
|
111
|
-
return /* @__PURE__ */ t.createElement(ae, {
|
|
112
|
-
className: e,
|
|
113
|
-
id: r,
|
|
114
|
-
textValue: s
|
|
115
|
-
}, s);
|
|
116
|
-
};
|
|
117
|
-
I.Label = Fe;
|
|
118
|
-
I.Trigger = Re;
|
|
119
|
-
I.Options = A;
|
|
120
|
-
A.Option = Me;
|
|
121
|
-
const F = ({ children: e, className: a }) => {
|
|
122
|
-
const { disabled: r, readOnly: s, showDateLabels: o } = D(), { labelId: l } = g(m.DAY), { partValue: c, partError: d, onPartChange: i } = N(m.DAY), f = u(e, F.Label), p = u(e, F.Input);
|
|
123
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
124
|
-
className: a,
|
|
125
|
-
"data-date-field": !0
|
|
126
|
-
}, o && f, /* @__PURE__ */ t.createElement($, {
|
|
127
|
-
"aria-labelledby": o ? l : void 0,
|
|
128
|
-
value: c,
|
|
129
|
-
onChange: i,
|
|
130
|
-
isDisabled: r,
|
|
131
|
-
isReadOnly: s,
|
|
132
|
-
isInvalid: d
|
|
133
|
-
}, p));
|
|
134
|
-
}, Pe = ({ className: e }) => /* @__PURE__ */ t.createElement(B, {
|
|
135
|
-
datePart: m.DAY,
|
|
136
|
-
className: e
|
|
137
|
-
}), Ae = ({ className: e }) => {
|
|
138
|
-
const { id: a, hidePlaceholder: r } = D(), { inputId: s } = g(m.DAY), { isFirstPart: o } = N(m.DAY), { t: l } = S(), c = w(null), d = r ? void 0 : l("field.date.placeholder.day");
|
|
139
|
-
return H(() => {
|
|
140
|
-
var i;
|
|
141
|
-
o && ((i = c.current) == null || i.focus());
|
|
142
|
-
}, a), /* @__PURE__ */ t.createElement(q, {
|
|
143
|
-
ref: c,
|
|
144
|
-
id: s,
|
|
145
|
-
className: e,
|
|
146
|
-
placeholder: d,
|
|
147
|
-
maxLength: 2,
|
|
148
|
-
inputMode: "numeric",
|
|
149
|
-
"data-hook": m.DAY
|
|
150
|
-
});
|
|
151
|
-
};
|
|
152
|
-
F.Label = Pe;
|
|
153
|
-
F.Input = Ae;
|
|
154
|
-
const R = ({ children: e, className: a }) => {
|
|
155
|
-
const { disabled: r, readOnly: s, showDateLabels: o } = D(), { labelId: l } = g(m.YEAR), { partValue: c, partError: d, onPartChange: i } = N(m.YEAR), f = u(e, R.Label), p = u(e, R.Input);
|
|
156
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
157
|
-
className: a,
|
|
158
|
-
"data-date-field": !0
|
|
159
|
-
}, o && f, /* @__PURE__ */ t.createElement($, {
|
|
160
|
-
"aria-labelledby": o ? l : void 0,
|
|
161
|
-
value: c,
|
|
162
|
-
onChange: i,
|
|
163
|
-
isDisabled: r,
|
|
164
|
-
isReadOnly: s,
|
|
165
|
-
isInvalid: d
|
|
166
|
-
}, p));
|
|
167
|
-
}, Se = ({ className: e }) => /* @__PURE__ */ t.createElement(B, {
|
|
168
|
-
datePart: m.YEAR,
|
|
169
|
-
className: e
|
|
170
|
-
}), Te = ({ className: e }) => {
|
|
171
|
-
const { id: a, hidePlaceholder: r } = D(), { inputId: s } = g(m.YEAR), { isFirstPart: o } = N(m.YEAR), { t: l } = S(), c = w(null), d = r ? void 0 : l("field.date.placeholder.year");
|
|
172
|
-
return H(() => {
|
|
173
|
-
var i;
|
|
174
|
-
o && ((i = c.current) == null || i.focus());
|
|
175
|
-
}, a), /* @__PURE__ */ t.createElement(q, {
|
|
176
|
-
ref: c,
|
|
177
|
-
id: s,
|
|
178
|
-
className: e,
|
|
179
|
-
placeholder: d,
|
|
180
|
-
maxLength: 4,
|
|
181
|
-
inputMode: "numeric",
|
|
182
|
-
"data-hook": m.YEAR
|
|
183
|
-
});
|
|
184
|
-
};
|
|
185
|
-
R.Label = Se;
|
|
186
|
-
R.Input = Te;
|
|
187
|
-
n.Label = fe;
|
|
188
|
-
n.Month = I;
|
|
189
|
-
n.Day = F;
|
|
190
|
-
n.Year = R;
|
|
191
|
-
n.Description = pe;
|
|
192
|
-
n.Error = Ee;
|
|
193
|
-
function g(e) {
|
|
194
|
-
const { inputId: a } = z();
|
|
195
|
-
return O(() => {
|
|
196
|
-
const r = e.toLowerCase();
|
|
197
|
-
return {
|
|
198
|
-
inputId: `${a}-${r}-input`,
|
|
199
|
-
labelId: `${a}-${r}-label`
|
|
200
|
-
};
|
|
201
|
-
}, [
|
|
202
|
-
a,
|
|
203
|
-
e
|
|
204
|
-
]);
|
|
205
|
-
}
|
|
206
|
-
function N(e) {
|
|
207
|
-
const { value: a, onChange: r, hasError: s = !1 } = D(), { regionalFormat: o } = V(), l = O(() => se(a ?? ""), [
|
|
208
|
-
a
|
|
209
|
-
]), c = O(() => oe(s, a ?? ""), [
|
|
210
|
-
a,
|
|
211
|
-
s
|
|
212
|
-
]), d = l[e] || "", i = v((p) => {
|
|
213
|
-
const b = le(p, e, l);
|
|
214
|
-
r(b);
|
|
215
|
-
}, [
|
|
216
|
-
r,
|
|
217
|
-
l,
|
|
218
|
-
e
|
|
219
|
-
]), f = O(() => G(o).filter(K).map((L) => L.toUpperCase())[0] === e, [
|
|
220
|
-
o,
|
|
221
|
-
e
|
|
222
|
-
]);
|
|
223
|
-
return {
|
|
224
|
-
partValue: d,
|
|
225
|
-
partError: c[e],
|
|
226
|
-
onPartChange: i,
|
|
227
|
-
isFirstPart: f
|
|
228
|
-
};
|
|
229
|
-
}
|
|
230
|
-
function B({ datePart: e, className: a }) {
|
|
231
|
-
const { inputId: r, labelId: s } = g(e), { t: o } = S(), l = `field.date.label.${e.toLowerCase()}`, c = o(l);
|
|
232
|
-
return /* @__PURE__ */ t.createElement("label", {
|
|
233
|
-
id: s,
|
|
234
|
-
htmlFor: r,
|
|
235
|
-
className: a
|
|
236
|
-
}, c);
|
|
237
|
-
}
|
|
238
|
-
const Ye = "_fields_fw9my_1", ve = "_month_fw9my_10", we = "_day_fw9my_11", Ve = "_year_fw9my_12", He = "_dayInput_fw9my_28", xe = "_yearInput_fw9my_29", Be = "_monthTrigger_fw9my_33", ke = "_monthOption_fw9my_53", y = {
|
|
239
|
-
fields: Ye,
|
|
240
|
-
month: ve,
|
|
241
|
-
day: we,
|
|
242
|
-
year: Ve,
|
|
243
|
-
dayInput: He,
|
|
244
|
-
yearInput: xe,
|
|
245
|
-
monthTrigger: Be,
|
|
246
|
-
monthOption: ke
|
|
247
|
-
}, Ue = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ee, {
|
|
248
|
-
content: e,
|
|
249
|
-
locale: a
|
|
250
|
-
}), ct = () => {
|
|
251
|
-
const e = ge(y.monthTrigger), a = Ne(y.monthOption, Ce), r = U(y.dayInput), s = U(y.yearInput);
|
|
252
|
-
return /* @__PURE__ */ t.createElement(n, {
|
|
253
|
-
className: y.fields
|
|
254
|
-
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
255
|
-
className: h(P, E.label)
|
|
256
|
-
}, /* @__PURE__ */ t.createElement(n.Label.Required, {
|
|
257
|
-
className: h(ce, E.requiredMark)
|
|
258
|
-
})), /* @__PURE__ */ t.createElement(n.Month, {
|
|
259
|
-
className: y.month
|
|
260
|
-
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
261
|
-
className: h(P, E.label)
|
|
262
|
-
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
263
|
-
className: e
|
|
264
|
-
}, /* @__PURE__ */ t.createElement(Le, {
|
|
265
|
-
className: E.dropdownIcon
|
|
266
|
-
})), /* @__PURE__ */ t.createElement(n.Month.Options, {
|
|
267
|
-
className: h(ie, E.selectPopover, E.dropdownPopover)
|
|
268
|
-
}, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
|
|
269
|
-
className: a
|
|
270
|
-
}))), /* @__PURE__ */ t.createElement(n.Day, {
|
|
271
|
-
className: y.day
|
|
272
|
-
}, /* @__PURE__ */ t.createElement(n.Day.Label, {
|
|
273
|
-
className: h(P, E.label)
|
|
274
|
-
}), /* @__PURE__ */ t.createElement(n.Day.Input, {
|
|
275
|
-
className: r
|
|
276
|
-
})), /* @__PURE__ */ t.createElement(n.Year, {
|
|
277
|
-
className: y.year
|
|
278
|
-
}, /* @__PURE__ */ t.createElement(n.Year.Label, {
|
|
279
|
-
className: h(P, E.label)
|
|
280
|
-
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
281
|
-
className: s
|
|
282
|
-
})), /* @__PURE__ */ t.createElement(n.Error, {
|
|
283
|
-
className: h(me, E.error)
|
|
284
|
-
}, /* @__PURE__ */ t.createElement(_e, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
285
|
-
className: h(de, E.description)
|
|
286
|
-
}, Ue));
|
|
287
|
-
};
|
|
288
|
-
export {
|
|
289
|
-
ct as D
|
|
290
|
-
};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import t, { useRef as L } from "react";
|
|
2
|
-
import { TextField as R, Input as v } from "react-aria-components";
|
|
3
|
-
import { bn as d, bk as c, bp as T } from "./form-D-pcluMZ.js";
|
|
4
|
-
import { f as s } from "./find-child-C60k4CxG.js";
|
|
5
|
-
import { D as g, E as h } from "./field-error-headless-CyoNrDMA.js";
|
|
6
|
-
import { L as x } from "./field-label-headless-vs578Vt6.js";
|
|
7
|
-
const e = ({ children: r }) => {
|
|
8
|
-
const { id: a, value: i, onChange: l, disabled: u, readOnly: n, required: o, hasError: p, onBlur: m, onFocus: b, FieldLayout: f } = d(), { labelId: E } = c(), I = s(r, e.Label), F = s(r, e.Input), y = s(r, e.Description), D = s(r, e.Error);
|
|
9
|
-
return /* @__PURE__ */ t.createElement(f, {
|
|
10
|
-
fieldId: a,
|
|
11
|
-
renderLabel: () => I,
|
|
12
|
-
renderInput: () => /* @__PURE__ */ t.createElement(R, {
|
|
13
|
-
"aria-labelledby": E,
|
|
14
|
-
value: i ?? "",
|
|
15
|
-
onChange: l,
|
|
16
|
-
isDisabled: u,
|
|
17
|
-
isReadOnly: n,
|
|
18
|
-
isRequired: o,
|
|
19
|
-
isInvalid: p,
|
|
20
|
-
onBlur: m,
|
|
21
|
-
onFocus: b
|
|
22
|
-
}, F),
|
|
23
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, D, y)
|
|
24
|
-
});
|
|
25
|
-
}, B = ({ className: r }) => {
|
|
26
|
-
const { id: a, placeholder: i } = d(), { inputId: l, ariaDescribedBy: u } = c(), n = L(null);
|
|
27
|
-
return T(() => {
|
|
28
|
-
var o;
|
|
29
|
-
(o = n.current) == null || o.focus();
|
|
30
|
-
}, a), /* @__PURE__ */ t.createElement(v, {
|
|
31
|
-
ref: n,
|
|
32
|
-
id: l,
|
|
33
|
-
"aria-describedby": u,
|
|
34
|
-
className: r,
|
|
35
|
-
placeholder: i
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
e.Label = x;
|
|
39
|
-
e.Input = B;
|
|
40
|
-
e.Description = g;
|
|
41
|
-
e.Error = h;
|
|
42
|
-
export {
|
|
43
|
-
e as T
|
|
44
|
-
};
|