@wix/form-elements 1.89.0 → 1.91.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-DG8GUJpn.js → appointment-rac-CDZ0Gdin.js} +6 -6
- package/dist/component/{bookings-address-rac-cNBSx-Pr.js → bookings-address-rac-pmQyMw-1.js} +1 -1
- package/dist/component/{bookings-email-rac-CYdSoVWP.js → bookings-email-rac-CzDEYpBV.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CQB2o8ww.js → bookings-first-name-rac-qg7T37FZ.js} +1 -1
- package/dist/component/{bookings-header-rac-CzKvQond.js → bookings-header-rac-Dmwmt_Cp.js} +1 -1
- package/dist/component/{bookings-last-name-rac-oK1BC5Am.js → bookings-last-name-rac-CXTtlnYI.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-CZNEy748.js → bookings-login-bar-rac-DTs9s6hU.js} +21 -21
- package/dist/component/{bookings-phone-rac-D_4WfolC.js → bookings-phone-rac-C7AEVZA-.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CrEfeL4P.js → bookings-rich-text-rac-CBGVMqOn.js} +1 -1
- package/dist/component/{checkbox-field-rac-CGqshW45.js → checkbox-field-rac-BggtF6cZ.js} +49 -49
- package/dist/component/{checkbox-group-field-headless-C3_5IR-E.js → checkbox-group-field-headless-O2ZsF7An.js} +30 -30
- package/dist/component/{checkbox-group-field-rac-DIzdgyAw.js → checkbox-group-field-rac-OC3W4Taz.js} +9 -9
- package/dist/component/{checkbox-group-rac-EvWVfusV.js → checkbox-group-rac-CZuEXWgx.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-Bb3xB1ve.js → checkbox-indicator-module-classes-mJ7hl_8K.js} +1 -1
- package/dist/component/{checkbox-rac-CT_69Jei.js → checkbox-rac-W-a8Z0ht.js} +1 -1
- package/dist/component/{contacts-address-rac-M8MZd777.js → contacts-address-rac-DtG9NDgw.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-BS-8HeRD.js → contacts-birthdate-rac-DS7uNjKO.js} +1 -1
- package/dist/component/{contacts-company-rac-gmgKLvic.js → contacts-company-rac-CQX5azvs.js} +1 -1
- package/dist/component/{contacts-email-rac-QQ6E9VzX.js → contacts-email-rac-QgYLfH6e.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DR7XheRo.js → contacts-first-name-rac-BrlHl2Uj.js} +1 -1
- package/dist/component/{contacts-last-name-rac-CBJgTkj5.js → contacts-last-name-rac-ieDtRIbl.js} +1 -1
- package/dist/component/{contacts-phone-rac-CTl25HdK.js → contacts-phone-rac-LTjC8k7e.js} +1 -1
- package/dist/component/{contacts-position-rac-DBDOW7QR.js → contacts-position-rac-CxbAUzIc.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C0-uJ7fU.js → contacts-subscribe-rac-H0dNjYV8.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-BtXc0V1S.js → contacts-tax-id-rac-uhTEMEwl.js} +1 -1
- package/dist/component/{date-availability-IQtwk-aX.js → date-availability-eRjWauCz.js} +1 -1
- package/dist/component/{date-input-field-rac-2rbZiSgo.js → date-input-field-rac-BKb019gB.js} +99 -98
- package/dist/component/{date-input-rac-j4--xZ8s.js → date-input-rac-BBllT9pM.js} +1 -1
- package/dist/component/{date-picker-field-rac-Cl7ueVVn.js → date-picker-field-rac-CSXVWmGL.js} +43 -43
- package/dist/component/{date-picker-rac-BrObkuYv.js → date-picker-rac-CwEFOSSe.js} +1 -1
- package/dist/component/date-time-input-field-rac-C4yIIebr.js +424 -0
- package/dist/component/{date-time-input-rac-BShquR72.js → date-time-input-rac-DsGlyO8x.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-DNXYnHDM.js → dext-checkbox-group-rac-Bs9tVVXo.js} +2 -2
- package/dist/component/{dext-checkbox-rac-RBMWmgyT.js → dext-checkbox-rac-FEjZejl7.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Dph_kV11.js → dext-date-picker-rac-Mdbuq1mu.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-C3_gQkBT.js → dext-date-time-input-rac-B4dRBObU.js} +1 -1
- package/dist/component/{dext-dropdown-rac-D34vhtST.js → dext-dropdown-rac-QVngfb7K.js} +1 -1
- package/dist/component/{dext-email-rac-Yzf4-vSg.js → dext-email-rac-cURI3VuR.js} +1 -1
- package/dist/component/{dext-number-input-rac-D0jZXKaI.js → dext-number-input-rac-CovkZ8Ey.js} +1 -1
- package/dist/component/{dext-phone-rac-bqTpmTa0.js → dext-phone-rac-C8GjKZnH.js} +1 -1
- package/dist/component/{dext-radio-group-rac-AYPAzpqZ.js → dext-radio-group-rac-BlrJmIH3.js} +2 -2
- package/dist/component/{dext-rating-input-rac-DOSq-xVQ.js → dext-rating-input-rac-jIJisfdp.js} +1 -1
- package/dist/component/{dext-tags-rac-BXtFTlL0.js → dext-tags-rac-BXjCLX6y.js} +2 -2
- package/dist/component/{dext-text-area-rac-46wwBQg_.js → dext-text-area-rac-CD_x4meg.js} +1 -1
- package/dist/component/{dext-text-input-rac-DVj6V1VG.js → dext-text-input-rac-Du51Nj6q.js} +1 -1
- package/dist/component/{dext-url-input-rac-B5zu9R5K.js → dext-url-input-rac-_W6CW5hp.js} +1 -1
- package/dist/component/{donation-rac-DeBMssGg.js → donation-rac-9njvq8HE.js} +51 -51
- package/dist/component/dropdown-field-headless-BBc5oicg.js +101 -0
- package/dist/component/dropdown-field-rac-BYRb3VEI.js +36 -0
- package/dist/component/{dropdown-rac-bUNYh49x.js → dropdown-rac-BBrPWiSg.js} +1 -1
- package/dist/component/{ecom-address-rac-CtrERV3f.js → ecom-address-rac-CDJ46mdt.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BrpwOSYM.js → ecom-subscription-checkbox-rac-DItvmxzX.js} +6 -6
- package/dist/component/{email-input-field-rac-4yYxYc1a.js → email-input-field-rac-aeRdkPOh.js} +63 -63
- package/dist/component/{events-repeater-rac-B308C1JK.js → events-repeater-rac-CzVycetd.js} +35 -35
- package/dist/component/{events-rsvp-rac-C4_LJ3Wz.js → events-rsvp-rac-BhLYlH1V.js} +6 -6
- package/dist/component/{field-error-headless-PMBWtb3Z.js → field-error-headless-T9JfqiMS.js} +12 -12
- package/dist/component/{field-label-headless-0racVfdo.js → field-label-headless-bDWQszAb.js} +12 -12
- package/dist/component/field-rac.module-BUvPquav.js +26 -0
- package/dist/component/{file-upload-rac-CZIHV2OL.js → file-upload-rac-Dk-delp2.js} +116 -116
- package/dist/component/{fixed-payment-rac-COhRKeun.js → fixed-payment-rac-Bj8RMj1w.js} +15 -15
- package/dist/component/{form-UCnayEKT.js → form-C7cB75mm.js} +1130 -1128
- package/dist/component/{form-element-classes--p2vz_Bm.js → form-element-classes-CLZXu-91.js} +79 -69
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CpXa-NlC.js → header-field-rac-RzI5owwx.js} +3 -3
- package/dist/component/{header-rac-CCsguMlZ.js → header-rac-DQgyaMDA.js} +1 -1
- package/dist/component/{image-choice-rac-j2UH4Q4I.js → image-choice-rac-DOs1eI0_.js} +20 -20
- package/dist/component/{index-jg8dn8po.js → index-C90Q2rfK.js} +2 -2
- package/dist/component/{index-Bxa3IDHm.js → index-DlPclNOa.js} +4 -4
- package/dist/component/{isObjectLike-Zw6J9g91.js → isObjectLike-DLz0WtlZ.js} +1 -1
- package/dist/component/{multiline-address-field-rac-BeFAYL7V.js → multiline-address-field-rac-DHYRZxtJ.js} +575 -574
- package/dist/component/{multiline-address-rac-BYr5_DQd.js → multiline-address-rac-7sUhPDFM.js} +1 -1
- package/dist/component/{number-input-field-rac-BNdJecUL.js → number-input-field-rac-DMHSUbYN.js} +24 -24
- package/dist/component/{number-input-rac-Cqkj4JAF.js → number-input-rac-CF5271QD.js} +1 -1
- package/dist/component/{password-rac-D4iSs1ds.js → password-rac-CxQRcSEb.js} +21 -21
- package/dist/component/{payment-input-rac-BvBP47HP.js → payment-input-rac-C20HS9QN.js} +25 -25
- package/dist/component/{phone-input-field-rac-Cggx8IlY.js → phone-input-field-rac-BDF_4RJE.js} +185 -184
- package/dist/component/{phone-rac-BISmYt_n.js → phone-rac-pGbG3Cu0.js} +1 -1
- package/dist/component/{product-list-rac-C1bm-U2G.js → product-list-rac-CxyJaRQ6.js} +43 -43
- package/dist/component/quiz-radio-group-rac-CCddKnuf.js +13 -0
- package/dist/component/{radio-button-module-classes-blfiatlc.js → radio-button-module-classes-uyJAJMZn.js} +7 -7
- package/dist/component/{radio-group-field-rac-BiiPUxbQ.js → radio-group-field-rac-VwR2FlNg.js} +5 -5
- package/dist/component/{radio-group-rac-Bn_W-3xz.js → radio-group-rac-D8pzwSCS.js} +1 -1
- package/dist/component/{rating-input-field-rac-CjXIoNMc.js → rating-input-field-rac-C4ohOgX0.js} +24 -24
- package/dist/component/{rating-input-rac-Ci4uPo22.js → rating-input-rac-NpCggSGK.js} +1 -1
- package/dist/component/{rich-content-rac.module-CDZniyrZ.js → rich-content-rac.module-B9HHqJL4.js} +4 -4
- package/dist/component/{rich-text-field-rac-BBRE9_Kr.js → rich-text-field-rac-C3qKHitl.js} +5 -5
- package/dist/component/{rich-text-rac-C3MfJK-H.js → rich-text-rac-BJkS9CGE.js} +1 -1
- package/dist/component/service-dropdown-rac-BTdBTfeg.js +146 -0
- package/dist/component/{services-multi-choice-rac-FDHRjDLS.js → services-multi-choice-rac-Nl74A8jo.js} +18 -18
- package/dist/component/{signature-rac-DfGPV0Mw.js → signature-rac-BAVXA-5Q.js} +53 -53
- package/dist/component/{submit-button-rac-DRsqyJcl.js → submit-button-rac-DlmeZjy_.js} +7 -7
- package/dist/component/{tags-field-rac-CZ4FBGG9.js → tags-field-rac-BFBSf5mt.js} +56 -56
- package/dist/component/{tags-rac-CMHMsiwv.js → tags-rac-S_GJQpwJ.js} +1 -1
- package/dist/component/text-area-field-rac-D1qLXh4K.js +73 -0
- package/dist/component/{text-area-rac-BKGDa4E3.js → text-area-rac-DejqDYR0.js} +1 -1
- package/dist/component/{text-input-field-rac-CU8eBRM4.js → text-input-field-rac-DwPTWyiR.js} +6 -6
- package/dist/component/{text-input-headless-C1eFy2gl.js → text-input-headless-BUljrxVJ.js} +6 -6
- package/dist/component/{text-input-rac-DO0eI3ty.js → text-input-rac-CCWkAOVG.js} +1 -1
- package/dist/component/{time-input-rac-BJ0AL2Be.js → time-input-rac-b09-o8Uw.js} +23 -23
- package/dist/component/{url-input-field-rac-BtpAuKfp.js → url-input-field-rac-DYGAFldc.js} +22 -22
- package/dist/component/{url-input-rac-CjnPbcHt.js → url-input-rac-CsAWnWt5.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-CruN_y12.js +28 -0
- package/dist/component/{use-element-state-class-name-X08kIFhd.js → use-element-state-class-name-DZhlOoWK.js} +1 -1
- package/dist/component/{use-service-options-base-DfHhMveM.js → use-service-options-base-JNSCsxxz.js} +3 -3
- package/dist/component/{use-text-input-class-name-BAuokapo.js → use-text-input-class-name-CgCYHOMw.js} +4 -4
- package/dist/form.d.ts +18 -7
- package/package.json +23 -22
- package/dist/component/date-time-input-field-rac-mqea6CtW.js +0 -423
- package/dist/component/dropdown-field-headless-ShcoDfPa.js +0 -84
- package/dist/component/dropdown-field-rac-DruF_YdZ.js +0 -32
- package/dist/component/field-rac.module-D06m9T9x.js +0 -24
- package/dist/component/quiz-radio-group-rac-BhNhoOSI.js +0 -13
- package/dist/component/service-dropdown-rac-DQkk3SlS.js +0 -142
- package/dist/component/text-area-field-rac-BnRuG5y8.js +0 -73
package/dist/component/{contacts-subscribe-rac-C0-uJ7fU.js → contacts-subscribe-rac-H0dNjYV8.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import C from "react";
|
|
2
|
-
import { C as e } from "./checkbox-field-rac-
|
|
3
|
-
import {
|
|
2
|
+
import { C as e } from "./checkbox-field-rac-BggtF6cZ.js";
|
|
3
|
+
import { X as r, Y as t, W as _ } from "./form-element-classes-CLZXu-91.js";
|
|
4
4
|
const S = () => /* @__PURE__ */ C.createElement(e, {
|
|
5
5
|
classes: {
|
|
6
6
|
container: _,
|
package/dist/component/{date-input-field-rac-2rbZiSgo.js → date-input-field-rac-BKb019gB.js}
RENAMED
|
@@ -1,60 +1,61 @@
|
|
|
1
1
|
import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
2
|
-
import
|
|
3
|
-
import t, { useMemo as
|
|
4
|
-
import {
|
|
2
|
+
import f from "classnames";
|
|
3
|
+
import t, { useMemo as N, useState as w, useCallback as B, useRef as H } from "react";
|
|
4
|
+
import { ak as D, ah as k, ac as A, K as U, a2 as q, s as i, au as P, y as Z, O as ee, a9 as te, am as V } from "./form-C7cB75mm.js";
|
|
5
5
|
import { UNSAFE_PortalProvider as ae } from "react-aria";
|
|
6
|
-
import { ListBoxItem as ne, ListBox as re, Select as oe, TextField as
|
|
6
|
+
import { ListBoxItem as ne, ListBox as re, Select as oe, TextField as $, SelectValue as se, Input as z } from "react-aria-components";
|
|
7
7
|
import { f as u, a as K } from "./find-child-C60k4CxG.js";
|
|
8
8
|
import { g as le } from "./helpers-HmkkXrh2.js";
|
|
9
|
-
import { D as ce, E as ie } from "./field-error-headless-
|
|
10
|
-
import { L as me } from "./field-label-headless-
|
|
9
|
+
import { D as ce, E as ie } from "./field-error-headless-T9JfqiMS.js";
|
|
10
|
+
import { L as me } from "./field-label-headless-bDWQszAb.js";
|
|
11
11
|
import { F as de } from "./fieldset-headless-CD3fds9J.js";
|
|
12
12
|
import { N as ue, S as pe } from "./non-modal-popover-DtIMXHbe.js";
|
|
13
13
|
import { C as Ee } from "./chevron-down-icon-CcpVm6B-.js";
|
|
14
14
|
import { E as be } from "./error-icon-hZxQ6DEy.js";
|
|
15
15
|
import { H as fe } from "./custom-focus-class-_483Pkwp.js";
|
|
16
|
-
import { s as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
16
|
+
import { s as E } from "./field-rac.module-BUvPquav.js";
|
|
17
|
+
import { B as R, R as he, z as Ie, D as De, q as ge, i as ye } from "./form-element-classes-CLZXu-91.js";
|
|
18
|
+
import { g as Ne } from "./use-dropdown-option-class-name-CruN_y12.js";
|
|
19
|
+
import { u as x } from "./use-text-input-class-name-CgCYHOMw.js";
|
|
19
20
|
const n = ({ children: e, className: a }) => {
|
|
20
|
-
const { id: r, required: o, onBlur: s, onFocus: c, FieldLayout: l } = D(), { inputId: d, labelId: m, ariaDescribedBy:
|
|
21
|
-
|
|
22
|
-
]),
|
|
21
|
+
const { id: r, required: o, onBlur: s, onFocus: c, FieldLayout: l } = D(), { inputId: d, labelId: m, ariaDescribedBy: b } = k(), { regionalFormat: p } = A(), I = N(() => U(p).filter(q).map((v) => v.toUpperCase()), [
|
|
22
|
+
p
|
|
23
|
+
]), O = u(e, n.Label), T = u(e, n.Description), Y = u(e, n.Error), L = {
|
|
23
24
|
[i.MONTH]: u(e, n.Month),
|
|
24
25
|
[i.DAY]: u(e, n.Day),
|
|
25
26
|
[i.YEAR]: u(e, n.Year)
|
|
26
27
|
};
|
|
27
28
|
return /* @__PURE__ */ t.createElement(l, {
|
|
28
29
|
fieldId: r,
|
|
29
|
-
renderLabel: () => K(
|
|
30
|
+
renderLabel: () => K(O, {
|
|
30
31
|
as: "div"
|
|
31
32
|
}),
|
|
32
33
|
renderInput: () => /* @__PURE__ */ t.createElement(de, {
|
|
33
34
|
id: d,
|
|
34
35
|
ariaLabelledBy: m,
|
|
35
|
-
ariaDescribedBy:
|
|
36
|
+
ariaDescribedBy: b,
|
|
36
37
|
required: o,
|
|
37
38
|
onBlur: s,
|
|
38
39
|
onFocus: c,
|
|
39
40
|
className: a
|
|
40
|
-
},
|
|
41
|
+
}, L[I[0]], L[I[1]], L[I[2]]),
|
|
41
42
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, Y, T)
|
|
42
43
|
});
|
|
43
|
-
},
|
|
44
|
-
const { disabled: r, readOnly: o, showDateLabels: s, hidePlaceholder: c } = D(), { labelId: l } =
|
|
45
|
-
o ||
|
|
44
|
+
}, g = ({ children: e, className: a }) => {
|
|
45
|
+
const { disabled: r, readOnly: o, showDateLabels: s, hidePlaceholder: c } = D(), { labelId: l } = y(i.MONTH), { partValue: d, partError: m, onPartChange: b } = _(i.MONTH), { t: p } = P(), [I, O] = w(!1), [T, Y] = w(null), L = c ? void 0 : p("field.date.placeholder.month"), v = B((M) => {
|
|
46
|
+
o || b(typeof M == "string" ? M : "");
|
|
46
47
|
}, [
|
|
47
|
-
|
|
48
|
+
b,
|
|
48
49
|
o
|
|
49
|
-
]),
|
|
50
|
-
|
|
50
|
+
]), Q = B((M) => {
|
|
51
|
+
O(M && !o);
|
|
51
52
|
}, [
|
|
52
53
|
o
|
|
53
|
-
]),
|
|
54
|
+
]), G = u(e, g.Label), J = u(e, g.Trigger), W = u(e, g.Options);
|
|
54
55
|
return /* @__PURE__ */ t.createElement("div", {
|
|
55
56
|
className: a,
|
|
56
57
|
"data-date-field": !0
|
|
57
|
-
}, s ?
|
|
58
|
+
}, s ? G : null, /* @__PURE__ */ t.createElement("div", {
|
|
58
59
|
ref: Y,
|
|
59
60
|
style: {
|
|
60
61
|
display: "contents"
|
|
@@ -67,16 +68,16 @@ const n = ({ children: e, className: a }) => {
|
|
|
67
68
|
onChange: v,
|
|
68
69
|
isDisabled: r,
|
|
69
70
|
isInvalid: m,
|
|
70
|
-
placeholder:
|
|
71
|
+
placeholder: L,
|
|
71
72
|
isOpen: I,
|
|
72
|
-
onOpenChange:
|
|
73
|
-
},
|
|
74
|
-
}, _e = ({ className: e }) => /* @__PURE__ */ t.createElement(
|
|
73
|
+
onOpenChange: Q
|
|
74
|
+
}, J, W)));
|
|
75
|
+
}, _e = ({ className: e }) => /* @__PURE__ */ t.createElement(j, {
|
|
75
76
|
datePart: i.MONTH,
|
|
76
77
|
className: e
|
|
77
|
-
}),
|
|
78
|
-
const { id: r, readOnly: o } = D(), { inputId: s } =
|
|
79
|
-
return
|
|
78
|
+
}), Oe = ({ children: e, className: a }) => {
|
|
79
|
+
const { id: r, readOnly: o } = D(), { inputId: s } = y(i.MONTH), { partError: c, isFirstPart: l } = _(i.MONTH), d = H(null);
|
|
80
|
+
return V(() => {
|
|
80
81
|
var m;
|
|
81
82
|
l && ((m = d.current) == null || m.focus());
|
|
82
83
|
}, r), /* @__PURE__ */ t.createElement(pe, {
|
|
@@ -88,7 +89,7 @@ const n = ({ children: e, className: a }) => {
|
|
|
88
89
|
"data-readonly": o || void 0
|
|
89
90
|
}, /* @__PURE__ */ t.createElement(se, null), e);
|
|
90
91
|
}, S = ({ children: e, className: a }) => {
|
|
91
|
-
const { language: r } = A(), o =
|
|
92
|
+
const { language: r } = A(), o = N(() => le(r), [
|
|
92
93
|
r
|
|
93
94
|
]), s = u(e, S.Option) ?? /* @__PURE__ */ t.createElement(S.Option, null);
|
|
94
95
|
return /* @__PURE__ */ t.createElement(ue, {
|
|
@@ -108,29 +109,29 @@ const n = ({ children: e, className: a }) => {
|
|
|
108
109
|
textValue: o
|
|
109
110
|
}, o);
|
|
110
111
|
};
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
g.Label = _e;
|
|
113
|
+
g.Trigger = Oe;
|
|
114
|
+
g.Options = S;
|
|
114
115
|
S.Option = Le;
|
|
115
|
-
const
|
|
116
|
-
const { disabled: r, readOnly: o, showDateLabels: s } = D(), { labelId: c } =
|
|
116
|
+
const C = ({ children: e, className: a }) => {
|
|
117
|
+
const { disabled: r, readOnly: o, showDateLabels: s } = D(), { labelId: c } = y(i.DAY), { partValue: l, partError: d, onPartChange: m } = _(i.DAY), b = u(e, C.Label), p = u(e, C.Input);
|
|
117
118
|
return /* @__PURE__ */ t.createElement("div", {
|
|
118
119
|
className: a,
|
|
119
120
|
"data-date-field": !0
|
|
120
|
-
}, s &&
|
|
121
|
+
}, s && b, /* @__PURE__ */ t.createElement($, {
|
|
121
122
|
"aria-labelledby": s ? c : void 0,
|
|
122
123
|
value: l,
|
|
123
124
|
onChange: m,
|
|
124
125
|
isDisabled: r,
|
|
125
126
|
isReadOnly: o,
|
|
126
127
|
isInvalid: d
|
|
127
|
-
},
|
|
128
|
-
},
|
|
128
|
+
}, p));
|
|
129
|
+
}, Ce = ({ className: e }) => /* @__PURE__ */ t.createElement(j, {
|
|
129
130
|
datePart: i.DAY,
|
|
130
131
|
className: e
|
|
131
132
|
}), Fe = ({ className: e }) => {
|
|
132
|
-
const { id: a, hidePlaceholder: r } = D(), { inputId: o } =
|
|
133
|
-
return
|
|
133
|
+
const { id: a, hidePlaceholder: r } = D(), { inputId: o } = y(i.DAY), { isFirstPart: s } = _(i.DAY), { t: c } = P(), l = H(null), d = r ? void 0 : c("field.date.placeholder.day");
|
|
134
|
+
return V(() => {
|
|
134
135
|
var m;
|
|
135
136
|
s && ((m = l.current) == null || m.focus());
|
|
136
137
|
}, a), /* @__PURE__ */ t.createElement(z, {
|
|
@@ -143,27 +144,27 @@ const F = ({ children: e, className: a }) => {
|
|
|
143
144
|
"data-hook": i.DAY
|
|
144
145
|
});
|
|
145
146
|
};
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
const
|
|
149
|
-
const { disabled: r, readOnly: o, showDateLabels: s } = D(), { labelId: c } =
|
|
147
|
+
C.Label = Ce;
|
|
148
|
+
C.Input = Fe;
|
|
149
|
+
const F = ({ children: e, className: a }) => {
|
|
150
|
+
const { disabled: r, readOnly: o, showDateLabels: s } = D(), { labelId: c } = y(i.YEAR), { partValue: l, partError: d, onPartChange: m } = _(i.YEAR), b = u(e, F.Label), p = u(e, F.Input);
|
|
150
151
|
return /* @__PURE__ */ t.createElement("div", {
|
|
151
152
|
className: a,
|
|
152
153
|
"data-date-field": !0
|
|
153
|
-
}, s &&
|
|
154
|
+
}, s && b, /* @__PURE__ */ t.createElement($, {
|
|
154
155
|
"aria-labelledby": s ? c : void 0,
|
|
155
156
|
value: l,
|
|
156
157
|
onChange: m,
|
|
157
158
|
isDisabled: r,
|
|
158
159
|
isReadOnly: o,
|
|
159
160
|
isInvalid: d
|
|
160
|
-
},
|
|
161
|
-
},
|
|
161
|
+
}, p));
|
|
162
|
+
}, Me = ({ className: e }) => /* @__PURE__ */ t.createElement(j, {
|
|
162
163
|
datePart: i.YEAR,
|
|
163
164
|
className: e
|
|
164
|
-
}),
|
|
165
|
-
const { id: a, hidePlaceholder: r } = D(), { inputId: o } =
|
|
166
|
-
return
|
|
165
|
+
}), Re = ({ className: e }) => {
|
|
166
|
+
const { id: a, hidePlaceholder: r } = D(), { inputId: o } = y(i.YEAR), { isFirstPart: s } = _(i.YEAR), { t: c } = P(), l = H(null), d = r ? void 0 : c("field.date.placeholder.year");
|
|
167
|
+
return V(() => {
|
|
167
168
|
var m;
|
|
168
169
|
s && ((m = l.current) == null || m.focus());
|
|
169
170
|
}, a), /* @__PURE__ */ t.createElement(z, {
|
|
@@ -176,17 +177,17 @@ const C = ({ children: e, className: a }) => {
|
|
|
176
177
|
"data-hook": i.YEAR
|
|
177
178
|
});
|
|
178
179
|
};
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
F.Label = Me;
|
|
181
|
+
F.Input = Re;
|
|
181
182
|
n.Label = me;
|
|
182
|
-
n.Month =
|
|
183
|
-
n.Day =
|
|
184
|
-
n.Year =
|
|
183
|
+
n.Month = g;
|
|
184
|
+
n.Day = C;
|
|
185
|
+
n.Year = F;
|
|
185
186
|
n.Description = ce;
|
|
186
187
|
n.Error = ie;
|
|
187
|
-
function
|
|
188
|
-
const { inputId: a } =
|
|
189
|
-
return
|
|
188
|
+
function y(e) {
|
|
189
|
+
const { inputId: a } = k();
|
|
190
|
+
return N(() => {
|
|
190
191
|
const r = e.toLowerCase();
|
|
191
192
|
return {
|
|
192
193
|
inputId: `${a}-${r}-input`,
|
|
@@ -197,20 +198,20 @@ function g(e) {
|
|
|
197
198
|
e
|
|
198
199
|
]);
|
|
199
200
|
}
|
|
200
|
-
function
|
|
201
|
-
const { value: a, onChange: r, hasError: o = !1 } = D(), { regionalFormat: s } = A(), c =
|
|
201
|
+
function _(e) {
|
|
202
|
+
const { value: a, onChange: r, hasError: o = !1 } = D(), { regionalFormat: s } = A(), c = N(() => Z(a ?? ""), [
|
|
202
203
|
a
|
|
203
|
-
]), l =
|
|
204
|
+
]), l = N(() => ee(o, a ?? ""), [
|
|
204
205
|
a,
|
|
205
206
|
o
|
|
206
|
-
]), d = c[e] || "", m = B((
|
|
207
|
-
const I = te(
|
|
207
|
+
]), d = c[e] || "", m = B((p) => {
|
|
208
|
+
const I = te(p, e, c);
|
|
208
209
|
r(I);
|
|
209
210
|
}, [
|
|
210
211
|
r,
|
|
211
212
|
c,
|
|
212
213
|
e
|
|
213
|
-
]),
|
|
214
|
+
]), b = N(() => U(s).filter(q).map((O) => O.toUpperCase())[0] === e, [
|
|
214
215
|
s,
|
|
215
216
|
e
|
|
216
217
|
]);
|
|
@@ -218,70 +219,70 @@ function N(e) {
|
|
|
218
219
|
partValue: d,
|
|
219
220
|
partError: l[e],
|
|
220
221
|
onPartChange: m,
|
|
221
|
-
isFirstPart:
|
|
222
|
+
isFirstPart: b
|
|
222
223
|
};
|
|
223
224
|
}
|
|
224
|
-
function
|
|
225
|
-
const { inputId: r, labelId: o } =
|
|
225
|
+
function j({ datePart: e, className: a }) {
|
|
226
|
+
const { inputId: r, labelId: o } = y(e), { t: s } = P(), c = `field.date.label.${e.toLowerCase()}`, l = s(c);
|
|
226
227
|
return /* @__PURE__ */ t.createElement("label", {
|
|
227
228
|
id: o,
|
|
228
229
|
htmlFor: r,
|
|
229
230
|
className: a
|
|
230
231
|
}, l);
|
|
231
232
|
}
|
|
232
|
-
const
|
|
233
|
-
fields:
|
|
234
|
-
month:
|
|
235
|
-
day:
|
|
236
|
-
year:
|
|
237
|
-
mobile:
|
|
238
|
-
dayInput:
|
|
239
|
-
yearInput:
|
|
240
|
-
monthTrigger:
|
|
241
|
-
monthOption:
|
|
242
|
-
},
|
|
233
|
+
const Se = "_fields_12ojb_1", Ae = "_month_12ojb_9", Pe = "_day_12ojb_10", Te = "_year_12ojb_11", Ye = "_mobile_12ojb_25", ve = "_dayInput_12ojb_37", Be = "_yearInput_12ojb_38", He = "_monthTrigger_12ojb_42", Ve = "_monthOption_12ojb_62", h = {
|
|
234
|
+
fields: Se,
|
|
235
|
+
month: Ae,
|
|
236
|
+
day: Pe,
|
|
237
|
+
year: Te,
|
|
238
|
+
mobile: Ye,
|
|
239
|
+
dayInput: ve,
|
|
240
|
+
yearInput: Be,
|
|
241
|
+
monthTrigger: He,
|
|
242
|
+
monthOption: Ve
|
|
243
|
+
}, je = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(X, {
|
|
243
244
|
content: e,
|
|
244
245
|
locale: a
|
|
245
|
-
}),
|
|
246
|
-
const { isMobile:
|
|
246
|
+
}), ot = () => {
|
|
247
|
+
const e = Ne(h.monthOption, fe), { isMobile: a } = A(), r = x(h.dayInput), o = x(h.yearInput);
|
|
247
248
|
return /* @__PURE__ */ t.createElement(n, {
|
|
248
|
-
className:
|
|
249
|
-
[h.mobile]:
|
|
249
|
+
className: f(h.fields, {
|
|
250
|
+
[h.mobile]: a
|
|
250
251
|
})
|
|
251
252
|
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
252
|
-
className:
|
|
253
|
+
className: f(R, E.label)
|
|
253
254
|
}, /* @__PURE__ */ t.createElement(n.Label.Required, {
|
|
254
|
-
className:
|
|
255
|
+
className: f(he, E.requiredMark)
|
|
255
256
|
})), /* @__PURE__ */ t.createElement(n.Month, {
|
|
256
257
|
className: h.month
|
|
257
258
|
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
258
|
-
className:
|
|
259
|
+
className: f(R, E.label)
|
|
259
260
|
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
260
|
-
className:
|
|
261
|
+
className: f(Ie, E.input, h.monthTrigger)
|
|
261
262
|
}, /* @__PURE__ */ t.createElement(Ee, {
|
|
262
|
-
className:
|
|
263
|
+
className: E.dropdownIcon
|
|
263
264
|
})), /* @__PURE__ */ t.createElement(n.Month.Options, {
|
|
264
|
-
className:
|
|
265
|
+
className: f(De, E.selectPopover, E.dropdownPopover)
|
|
265
266
|
}, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
|
|
266
|
-
className:
|
|
267
|
+
className: e
|
|
267
268
|
}))), /* @__PURE__ */ t.createElement(n.Day, {
|
|
268
269
|
className: h.day
|
|
269
270
|
}, /* @__PURE__ */ t.createElement(n.Day.Label, {
|
|
270
|
-
className:
|
|
271
|
+
className: f(R, E.label)
|
|
271
272
|
}), /* @__PURE__ */ t.createElement(n.Day.Input, {
|
|
272
|
-
className:
|
|
273
|
+
className: r
|
|
273
274
|
})), /* @__PURE__ */ t.createElement(n.Year, {
|
|
274
275
|
className: h.year
|
|
275
276
|
}, /* @__PURE__ */ t.createElement(n.Year.Label, {
|
|
276
|
-
className:
|
|
277
|
+
className: f(R, E.label)
|
|
277
278
|
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
278
|
-
className:
|
|
279
|
+
className: o
|
|
279
280
|
})), /* @__PURE__ */ t.createElement(n.Error, {
|
|
280
|
-
className:
|
|
281
|
+
className: f(ge, E.error)
|
|
281
282
|
}, /* @__PURE__ */ t.createElement(be, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
282
|
-
className:
|
|
283
|
-
},
|
|
283
|
+
className: f(ye, E.description)
|
|
284
|
+
}, je));
|
|
284
285
|
};
|
|
285
286
|
export {
|
|
286
|
-
|
|
287
|
+
ot as D
|
|
287
288
|
};
|