@wix/form-elements 1.160.0 → 1.162.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-BmHu56e5.js → appointment-rac-3Z1wiBX6.js} +366 -359
- package/dist/component/{bookings-address-rac-DY9l2g0h.js → bookings-address-rac-2zV-a8SW.js} +1 -1
- package/dist/component/{bookings-email-rac-B5vNSOsS.js → bookings-email-rac-C1WakVnh.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CJiefCNz.js → bookings-first-name-rac-6f18uXA0.js} +1 -1
- package/dist/component/{bookings-header-rac-BFu7Ko5w.js → bookings-header-rac-BeaxlPQl.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DegMM13h.js → bookings-last-name-rac-CsLZaKfO.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DrA-5tBH.js → bookings-login-bar-rac-B3TRivWU.js} +5 -5
- package/dist/component/{bookings-phone-rac-DsaeqxCI.js → bookings-phone-rac-BnFEknvv.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-jRHiwqi8.js → bookings-rich-text-rac-CFPqDZay.js} +1 -1
- package/dist/component/{calendar.module-CKCBG_Pg.js → calendar.module-BMUyMVja.js} +19 -19
- package/dist/component/{checkbox-field-rac-CyoBb6Yf.js → checkbox-field-rac-DqGbxAd0.js} +45 -45
- package/dist/component/{checkbox-group-field-headless-Bv1gU3oL.js → checkbox-group-field-headless-CiobdaVa.js} +38 -38
- package/dist/component/{checkbox-group-field-rac-DasArcdV.js → checkbox-group-field-rac-Dxrc2F4x.js} +14 -14
- package/dist/component/{checkbox-group-rac-CzmufV1U.js → checkbox-group-rac-C3tL4YSr.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-akWZsZNn.js → checkbox-indicator-module-classes-DUTR4mcg.js} +1 -1
- package/dist/component/{checkbox-rac-6C7XoUoZ.js → checkbox-rac-DhZsIMuk.js} +1 -1
- package/dist/component/{contacts-address-rac-BZobbFtz.js → contacts-address-rac--GiWpa6C.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DIzf41DS.js → contacts-birthdate-rac-CmI2nPpr.js} +1 -1
- package/dist/component/{contacts-company-rac-BiBDO28r.js → contacts-company-rac-DcSLvPnR.js} +1 -1
- package/dist/component/{contacts-email-rac-5mqokCSD.js → contacts-email-rac-BLOIHGP9.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BXe3_Nz5.js → contacts-first-name-rac-DgMCKLeE.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Cfqgh7u1.js → contacts-last-name-rac-tcEQP1Db.js} +1 -1
- package/dist/component/{contacts-phone-rac-cmLUWnAc.js → contacts-phone-rac-CK664cfW.js} +1 -1
- package/dist/component/{contacts-position-rac-DTyvklfN.js → contacts-position-rac-B8skwXy6.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-D-ZEX1A3.js → contacts-subscribe-rac-DQZYJjMo.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-B4NYJwWt.js → contacts-tax-id-rac-Ci24ixLu.js} +1 -1
- package/dist/component/{date-availability-Dach9aRC.js → date-availability-Va6_2NAZ.js} +1 -1
- package/dist/component/{date-input-field-rac-B72mHcya.js → date-input-field-rac-lAKyuHOI.js} +98 -98
- package/dist/component/{date-input-rac-CYix11gT.js → date-input-rac-ClEesupR.js} +1 -1
- package/dist/component/{date-picker-field-rac-B8pvtPir.js → date-picker-field-rac-h45jfoso.js} +72 -72
- package/dist/component/{date-picker-rac-D6cR0zH9.js → date-picker-rac-B-pvqBn0.js} +1 -1
- package/dist/component/{date-time-input-field-rac-B7Y3Yf5l.js → date-time-input-field-rac-41QpurJp.js} +72 -72
- package/dist/component/{date-time-input-rac-DMN-noQX.js → date-time-input-rac-BQOUl7It.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-Kq0GnteP.js → dext-checkbox-group-rac-C4Q6tfBD.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BY9GZ4n1.js → dext-checkbox-rac-Yo2PHNDA.js} +1 -1
- package/dist/component/{dext-date-picker-rac-CXArIddp.js → dext-date-picker-rac-jM9x8W6a.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-B39TtxGq.js → dext-date-time-input-rac-BgW_4WIg.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C3y0G8cS.js → dext-dropdown-rac-DCL7D6-G.js} +1 -1
- package/dist/component/{dext-email-rac-BIg3cq7Q.js → dext-email-rac-Dz7yBqkd.js} +1 -1
- package/dist/component/{dext-number-input-rac-27sHJ7yN.js → dext-number-input-rac-BdMjBpH9.js} +1 -1
- package/dist/component/{dext-phone-rac-CcohoFQp.js → dext-phone-rac-D2i9fXL3.js} +1 -1
- package/dist/component/{dext-radio-group-rac-eead3Gve.js → dext-radio-group-rac-Br2f1Ahx.js} +2 -2
- package/dist/component/{dext-rating-input-rac-B_E6OcBr.js → dext-rating-input-rac-OkfJ7Eb0.js} +1 -1
- package/dist/component/{dext-tags-rac-Yd9aAtnF.js → dext-tags-rac-43vDoDdM.js} +2 -2
- package/dist/component/{dext-text-area-rac-CMACri2C.js → dext-text-area-rac-C072pWO9.js} +1 -1
- package/dist/component/{dext-text-input-rac-sNjSCfQ-.js → dext-text-input-rac-BiHJpJCt.js} +1 -1
- package/dist/component/{dext-url-input-rac-DwhbzJty.js → dext-url-input-rac-YOGYMj5C.js} +1 -1
- package/dist/component/{donation-rac-BVAN3kMk.js → donation-rac-fCt3mddA.js} +106 -106
- package/dist/component/{dropdown-field-rac-DdoGigWx.js → dropdown-field-rac-EQrQJ2-C.js} +4 -4
- package/dist/component/{dropdown-rac-CRkt5w47.js → dropdown-rac-MPCcjrFd.js} +1 -1
- package/dist/component/{ecom-address-rac-C36hFHW0.js → ecom-address-rac-DSgpHqzV.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BKfQ348w.js → ecom-subscription-checkbox-rac-Dw6Ke0Fb.js} +2 -2
- package/dist/component/{email-input-field-rac-MOaISYxa.js → email-input-field-rac-DVmvH4u4.js} +80 -80
- package/dist/component/{events-repeater-rac-D6p-NgE8.js → events-repeater-rac-Uwpo7XF4.js} +25 -25
- package/dist/component/{events-rsvp-rac-DVpgN8gm.js → events-rsvp-rac-D2DJAkep.js} +4 -4
- package/dist/component/{field-error-headless-XNWmDH3E.js → field-error-headless-DAc8FpKI.js} +7 -7
- package/dist/component/{field-label-headless-CORRAJGt.js → field-label-headless-DxxwJtjh.js} +17 -17
- package/dist/component/field-rac.module-ts2t4WUO.js +25 -0
- package/dist/component/{file-upload-rac-DRMr7E4b.js → file-upload-rac-CBKIeaxX.js} +194 -194
- package/dist/component/{fixed-payment-rac-BUXzNex9.js → fixed-payment-rac-BsCDoc1p.js} +20 -20
- package/dist/component/{form-DSpx-AO8.js → form-GAuLAdjq.js} +338 -347
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CiDXlNsa.js → header-field-rac-DtZCjzLJ.js} +6 -6
- package/dist/component/{header-rac-B5Rg-h8u.js → header-rac-B1hlVDf8.js} +1 -1
- package/dist/component/image-choice-rac-DQaCg_Xk.js +155 -0
- package/dist/component/{index-CwruESwc.js → index-BaVjVNYj.js} +5 -5
- package/dist/component/{index-Bz7ZhQsF.js → index-C1EXd9jU.js} +50 -50
- package/dist/component/{isObjectLike-C5dHxHP0.js → isObjectLike-m2dqIREj.js} +3 -3
- package/dist/component/{multiline-address-field-rac-Z-qF366L.js → multiline-address-field-rac-CMMdLb-J.js} +41 -41
- package/dist/component/{multiline-address-rac-CJIHTMw5.js → multiline-address-rac-VUQNp-Tz.js} +1 -1
- package/dist/component/{number-input-field-rac-D4vf6I6N.js → number-input-field-rac-B5bsGDKm.js} +24 -24
- package/dist/component/{number-input-rac-B2jW6JUQ.js → number-input-rac-BzzW0p9R.js} +1 -1
- package/dist/component/{password-rac-DGRZ17Jl.js → password-rac-2Rr7lvNO.js} +25 -25
- package/dist/component/{payment-input-rac-BtD-tAKv.js → payment-input-rac-CEUzIrJA.js} +31 -31
- package/dist/component/{phone-input-field-rac-KD4-APhr.js → phone-input-field-rac-BDBaqAzE.js} +59 -59
- package/dist/component/{phone-rac-Cw2yccgg.js → phone-rac-BTK8-tkq.js} +1 -1
- package/dist/component/{product-list-rac-XbzTDdbp.js → product-list-rac-1QbeT5RH.js} +43 -43
- package/dist/component/{quiz-radio-group-rac-BDw_mAw5.js → quiz-radio-group-rac-tn2CzdCu.js} +1 -1
- package/dist/component/{radio-button-module-classes-CFGf0Hzh.js → radio-button-module-classes-aK1SQcLG.js} +30 -30
- package/dist/component/{radio-group-field-rac-CXN7tyVu.js → radio-group-field-rac-DlMXhW_S.js} +7 -7
- package/dist/component/{radio-group-rac-COHzqjBh.js → radio-group-rac-BmU_5tBK.js} +1 -1
- package/dist/component/{rating-input-field-rac-DCXNZgf1.js → rating-input-field-rac-DUPJUAX2.js} +27 -27
- package/dist/component/{rating-input-rac-DwQt9ML7.js → rating-input-rac-BLhkZdj8.js} +1 -1
- package/dist/component/{rich-content-rac.module-B7rPwNns.js → rich-content-rac.module-C9bGXB69.js} +5 -5
- package/dist/component/{rich-text-field-rac-DlER7NRD.js → rich-text-field-rac-CVqmsZzZ.js} +6 -6
- package/dist/component/{rich-text-rac-CjicsHA7.js → rich-text-rac-D8K6445F.js} +1 -1
- package/dist/component/{service-dropdown-rac-B81LC_6_.js → service-dropdown-rac-PR_iLdmo.js} +31 -31
- package/dist/component/{services-multi-choice-rac-BR6gZeHk.js → services-multi-choice-rac-BvMadJCf.js} +19 -19
- package/dist/component/{signature-rac-XFj7Ddtp.js → signature-rac-Cpjv6kcl.js} +235 -235
- package/dist/component/{submit-button-rac-Bz7zs_3W.js → submit-button-rac-DpDk7cMb.js} +7 -7
- package/dist/component/{tags-field-rac-DWWkNKqc.js → tags-field-rac-DnyWNHXT.js} +67 -67
- package/dist/component/{tags-rac-BXyiQ9i1.js → tags-rac-D5Do7BNm.js} +1 -1
- package/dist/component/{text-area-field-rac-DsIRYi0d.js → text-area-field-rac-DLBgla0L.js} +27 -27
- package/dist/component/{text-area-rac-CF9pDP9d.js → text-area-rac-Bfsl2gSn.js} +1 -1
- package/dist/component/{text-input-field-rac-BwIDZACz.js → text-input-field-rac-hLsUcQNw.js} +4 -4
- package/dist/component/{text-input-headless-5kQs2_Xu.js → text-input-headless-Otd7Uy7V.js} +13 -13
- package/dist/component/{text-input-rac-CRmSuw1k.js → text-input-rac-jpnc-v91.js} +1 -1
- package/dist/component/{time-input-rac-BRMNpe51.js → time-input-rac-DnjrmZZw.js} +26 -26
- package/dist/component/url-input-field-rac-C90NYHb8.js +77 -0
- package/dist/component/{url-input-rac-Dv-kp50D.js → url-input-rac-C3wfEnqs.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-BQi_qE_-.js → use-dropdown-option-class-name-CYkLlKBs.js} +12 -12
- package/dist/component/{use-dropdown-trigger-class-name-bAK8aHiG.js → use-dropdown-trigger-class-name-CTt4Z67m.js} +17 -17
- package/dist/component/{use-element-state-class-name-rXM_lHug.js → use-element-state-class-name-ByDw6j7c.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-BnV_uerV.js → use-hoverable-input-class-name-Duhgtn2I.js} +3 -3
- package/dist/component/use-is-forced-open-dropdown-B5gNY4Zm.js +53 -0
- package/dist/component/{use-service-options-base-CLeE9-Tx.js → use-service-options-base-DE-QaNDw.js} +8 -8
- package/dist/component/use-text-input-class-name-CmxSw6bY.js +6 -0
- package/dist/form.d.ts +3 -0
- package/package.json +2 -2
- package/dist/component/field-rac.module-DP0lkkEv.js +0 -25
- package/dist/component/image-choice-rac-CtoA_KDp.js +0 -155
- package/dist/component/url-input-field-rac-CKLS3QDk.js +0 -77
- package/dist/component/use-is-forced-open-dropdown-Bp-5Xpmw.js +0 -53
- package/dist/component/use-text-input-class-name-DIKWvfkm.js +0 -6
package/dist/component/{date-input-field-rac-B72mHcya.js → date-input-field-rac-lAKyuHOI.js}
RENAMED
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import { RicosViewer as ne } from "@wix/ricos/viewer";
|
|
2
2
|
import D from "classnames";
|
|
3
|
-
import t, { useMemo as
|
|
3
|
+
import t, { useMemo as N, useState as q, useCallback as x, useRef as H } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as re } from "react-aria";
|
|
5
|
-
import { ListBoxItem as oe, Select as se, TextField as
|
|
6
|
-
import {
|
|
7
|
-
import { f as p, a as
|
|
8
|
-
import { g as
|
|
9
|
-
import { D as
|
|
10
|
-
import { L as
|
|
11
|
-
import { F as
|
|
12
|
-
import { N as
|
|
13
|
-
import { a as Ce } from "./use-is-forced-open-dropdown-
|
|
14
|
-
import { V as Fe, u as
|
|
15
|
-
import { C as
|
|
5
|
+
import { ListBoxItem as oe, Select as se, TextField as z, SelectValue as le, Input as K } from "react-aria-components";
|
|
6
|
+
import { by as _, bv as W, bq as w, b3 as G, bg as Q, aS as o, bI as R, aZ as ce, b4 as ie, bn as me, bA as U, u as de, U as ue, aa as pe, w as Y, H as Ee, K as be, G as fe, v as De, x as $ } from "./form-GAuLAdjq.js";
|
|
7
|
+
import { f as p, a as B } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { g as Ie } from "./helpers-HmkkXrh2.js";
|
|
9
|
+
import { D as _e, E as Oe } from "./field-error-headless-DAc8FpKI.js";
|
|
10
|
+
import { L as ge } from "./field-label-headless-DxxwJtjh.js";
|
|
11
|
+
import { F as he } from "./fieldset-headless-CD3fds9J.js";
|
|
12
|
+
import { N as Ne, E as ye, S as Le } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
+
import { a as Ce } from "./use-is-forced-open-dropdown-B5gNY4Zm.js";
|
|
14
|
+
import { V as Fe, u as Ae } from "./use-dropdown-option-class-name-CYkLlKBs.js";
|
|
15
|
+
import { C as Te } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as Re } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as Me } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
-
import { s as b } from "./field-rac.module-
|
|
19
|
-
import { u as
|
|
18
|
+
import { s as b } from "./field-rac.module-ts2t4WUO.js";
|
|
19
|
+
import { u as v } from "./use-hoverable-input-class-name-Duhgtn2I.js";
|
|
20
20
|
const Pe = {
|
|
21
21
|
[o.MONTH]: "bday-month",
|
|
22
22
|
[o.DAY]: "bday-day",
|
|
23
23
|
[o.YEAR]: "bday-year"
|
|
24
|
-
},
|
|
25
|
-
const { id: r, required: s, onBlur: l, onFocus: c, FieldLayout: m } =
|
|
24
|
+
}, V = (e, a) => e === "bday" ? Pe[a] : void 0, n = ({ children: e, className: a }) => {
|
|
25
|
+
const { id: r, required: s, onBlur: l, onFocus: c, FieldLayout: m } = _(), { inputId: i, labelId: d, ariaDescribedBy: u } = W(), { regionalFormat: E } = w(), f = N(() => G(E).filter(Q).map((S) => S.toUpperCase()), [
|
|
26
26
|
E
|
|
27
|
-
]),
|
|
27
|
+
]), L = p(e, n.Label), M = p(e, n.Description), P = p(e, n.Error), O = {
|
|
28
28
|
[o.MONTH]: p(e, n.Month),
|
|
29
29
|
[o.DAY]: p(e, n.Day),
|
|
30
30
|
[o.YEAR]: p(e, n.Year)
|
|
31
31
|
};
|
|
32
32
|
return /* @__PURE__ */ t.createElement(m, {
|
|
33
33
|
fieldId: r,
|
|
34
|
-
renderLabel: () =>
|
|
34
|
+
renderLabel: () => B(L, {
|
|
35
35
|
as: "div"
|
|
36
36
|
}),
|
|
37
|
-
renderInput: () => /* @__PURE__ */ t.createElement(
|
|
37
|
+
renderInput: () => /* @__PURE__ */ t.createElement(he, {
|
|
38
38
|
id: i,
|
|
39
39
|
ariaLabelledBy: d,
|
|
40
40
|
ariaDescribedBy: u,
|
|
@@ -45,17 +45,17 @@ const Pe = {
|
|
|
45
45
|
}, O[f[0]], O[f[1]], O[f[2]]),
|
|
46
46
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, P, M)
|
|
47
47
|
});
|
|
48
|
-
},
|
|
49
|
-
const { id: r, disabled: s, readOnly: l, showDateLabels: c, hidePlaceholder: m, autoComplete: i } =
|
|
50
|
-
l || f(typeof
|
|
48
|
+
}, g = ({ children: e, className: a }) => {
|
|
49
|
+
const { id: r, disabled: s, readOnly: l, showDateLabels: c, hidePlaceholder: m, autoComplete: i } = _(), { labelId: d } = h(o.MONTH), { partValue: u, partError: E, onPartChange: f } = y(o.MONTH), { t: L } = R(), [M, P] = q(!1), O = Ce(r), [S, X] = q(null), Z = m ? ye : L("field.date.placeholder.month"), j = x((A) => {
|
|
50
|
+
l || f(typeof A == "string" ? A : "");
|
|
51
51
|
}, [
|
|
52
52
|
f,
|
|
53
53
|
l
|
|
54
|
-
]),
|
|
55
|
-
P(
|
|
54
|
+
]), J = x((A) => {
|
|
55
|
+
P(A && !l);
|
|
56
56
|
}, [
|
|
57
57
|
l
|
|
58
|
-
]), ee = p(e,
|
|
58
|
+
]), ee = p(e, g.Label), te = p(e, g.Trigger), ae = p(e, g.Options);
|
|
59
59
|
return /* @__PURE__ */ t.createElement("div", {
|
|
60
60
|
className: a,
|
|
61
61
|
"data-date-field": !0
|
|
@@ -67,29 +67,29 @@ const Pe = {
|
|
|
67
67
|
}), /* @__PURE__ */ t.createElement(re, {
|
|
68
68
|
getContainer: () => S
|
|
69
69
|
}, /* @__PURE__ */ t.createElement(se, {
|
|
70
|
-
autoComplete:
|
|
70
|
+
autoComplete: V(i, o.MONTH),
|
|
71
71
|
"aria-labelledby": c ? d : void 0,
|
|
72
72
|
value: u || null,
|
|
73
|
-
onChange:
|
|
73
|
+
onChange: j,
|
|
74
74
|
isDisabled: s,
|
|
75
75
|
isInvalid: E,
|
|
76
|
-
placeholder:
|
|
76
|
+
placeholder: Z,
|
|
77
77
|
isOpen: O || M,
|
|
78
|
-
onOpenChange: O ? void 0 :
|
|
79
|
-
}, te,
|
|
78
|
+
onOpenChange: O ? void 0 : J
|
|
79
|
+
}, te, B(ae, {
|
|
80
80
|
isForcedOpen: O
|
|
81
81
|
}))));
|
|
82
82
|
}, Se = ({ className: e }) => /* @__PURE__ */ t.createElement(k, {
|
|
83
83
|
datePart: o.MONTH,
|
|
84
84
|
className: e
|
|
85
|
-
}),
|
|
86
|
-
const { id: r, readOnly: s } =
|
|
87
|
-
return
|
|
85
|
+
}), Ye = ({ children: e, className: a }) => {
|
|
86
|
+
const { id: r, readOnly: s } = _(), { inputId: l } = h(o.MONTH), { partError: c, isFirstPart: m } = y(o.MONTH), i = H(null);
|
|
87
|
+
return U(() => {
|
|
88
88
|
var d;
|
|
89
89
|
m && ((d = i.current) == null || d.focus({
|
|
90
90
|
preventScroll: !0
|
|
91
91
|
}));
|
|
92
|
-
}, r), /* @__PURE__ */ t.createElement(
|
|
92
|
+
}, r), /* @__PURE__ */ t.createElement(Le, {
|
|
93
93
|
ref: i,
|
|
94
94
|
id: l,
|
|
95
95
|
className: a,
|
|
@@ -97,23 +97,23 @@ const Pe = {
|
|
|
97
97
|
"data-invalid": c || void 0,
|
|
98
98
|
"data-readonly": s || void 0
|
|
99
99
|
}, /* @__PURE__ */ t.createElement(le, null), e);
|
|
100
|
-
},
|
|
101
|
-
const { isForcedOpen: s } = r, { language: l } =
|
|
100
|
+
}, T = ({ children: e, className: a, ...r }) => {
|
|
101
|
+
const { isForcedOpen: s } = r, { language: l } = w(), c = N(() => Ie(l), [
|
|
102
102
|
l
|
|
103
|
-
]), m = p(e,
|
|
104
|
-
return /* @__PURE__ */ t.createElement(
|
|
103
|
+
]), m = p(e, T.Option) ?? /* @__PURE__ */ t.createElement(T.Option, null);
|
|
104
|
+
return /* @__PURE__ */ t.createElement(Ne, {
|
|
105
105
|
className: a,
|
|
106
106
|
containerPadding: 0,
|
|
107
107
|
offset: 0
|
|
108
108
|
}, /* @__PURE__ */ t.createElement(Fe, {
|
|
109
109
|
isForcedOpen: s,
|
|
110
110
|
autoFocus: s ? !1 : void 0
|
|
111
|
-
}, c.map((i, d) =>
|
|
111
|
+
}, c.map((i, d) => B(m, {
|
|
112
112
|
key: String(d + 1),
|
|
113
113
|
value: String(d + 1),
|
|
114
114
|
label: i
|
|
115
115
|
}))));
|
|
116
|
-
},
|
|
116
|
+
}, ve = ({ className: e, ...a }) => {
|
|
117
117
|
const { value: r, label: s } = a;
|
|
118
118
|
return /* @__PURE__ */ t.createElement(oe, {
|
|
119
119
|
className: e,
|
|
@@ -121,16 +121,16 @@ const Pe = {
|
|
|
121
121
|
textValue: s
|
|
122
122
|
}, s);
|
|
123
123
|
};
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
g.Label = Se;
|
|
125
|
+
g.Trigger = Ye;
|
|
126
|
+
g.Options = T;
|
|
127
|
+
T.Option = ve;
|
|
128
128
|
const C = ({ children: e, className: a }) => {
|
|
129
|
-
const { disabled: r, readOnly: s, showDateLabels: l } =
|
|
129
|
+
const { disabled: r, readOnly: s, showDateLabels: l } = _(), { labelId: c } = h(o.DAY), { partValue: m, partError: i, onPartChange: d } = y(o.DAY), u = p(e, C.Label), E = p(e, C.Input);
|
|
130
130
|
return /* @__PURE__ */ t.createElement("div", {
|
|
131
131
|
className: a,
|
|
132
132
|
"data-date-field": !0
|
|
133
|
-
}, l && u, /* @__PURE__ */ t.createElement(
|
|
133
|
+
}, l && u, /* @__PURE__ */ t.createElement(z, {
|
|
134
134
|
"aria-labelledby": l ? c : void 0,
|
|
135
135
|
value: m,
|
|
136
136
|
onChange: d,
|
|
@@ -138,35 +138,35 @@ const C = ({ children: e, className: a }) => {
|
|
|
138
138
|
isReadOnly: s,
|
|
139
139
|
isInvalid: i
|
|
140
140
|
}, E));
|
|
141
|
-
},
|
|
141
|
+
}, xe = ({ className: e }) => /* @__PURE__ */ t.createElement(k, {
|
|
142
142
|
datePart: o.DAY,
|
|
143
143
|
className: e
|
|
144
|
-
}),
|
|
145
|
-
const { id: a, hidePlaceholder: r, autoComplete: s } =
|
|
146
|
-
return
|
|
144
|
+
}), He = ({ className: e }) => {
|
|
145
|
+
const { id: a, hidePlaceholder: r, autoComplete: s } = _(), { inputId: l } = h(o.DAY), { isFirstPart: c } = y(o.DAY), { t: m } = R(), i = H(null), d = r ? void 0 : m("field.date.placeholder.day");
|
|
146
|
+
return U(() => {
|
|
147
147
|
var u;
|
|
148
148
|
c && ((u = i.current) == null || u.focus({
|
|
149
149
|
preventScroll: !0
|
|
150
150
|
}));
|
|
151
|
-
}, a), /* @__PURE__ */ t.createElement(
|
|
151
|
+
}, a), /* @__PURE__ */ t.createElement(K, {
|
|
152
152
|
ref: i,
|
|
153
153
|
id: l,
|
|
154
154
|
className: e,
|
|
155
155
|
placeholder: d,
|
|
156
|
-
autoComplete:
|
|
156
|
+
autoComplete: V(s, o.DAY),
|
|
157
157
|
maxLength: 2,
|
|
158
158
|
inputMode: "numeric",
|
|
159
159
|
"data-hook": o.DAY
|
|
160
160
|
});
|
|
161
161
|
};
|
|
162
|
-
C.Label =
|
|
163
|
-
C.Input =
|
|
162
|
+
C.Label = xe;
|
|
163
|
+
C.Input = He;
|
|
164
164
|
const F = ({ children: e, className: a }) => {
|
|
165
|
-
const { disabled: r, readOnly: s, showDateLabels: l } =
|
|
165
|
+
const { disabled: r, readOnly: s, showDateLabels: l } = _(), { labelId: c } = h(o.YEAR), { partValue: m, partError: i, onPartChange: d } = y(o.YEAR), u = p(e, F.Label), E = p(e, F.Input);
|
|
166
166
|
return /* @__PURE__ */ t.createElement("div", {
|
|
167
167
|
className: a,
|
|
168
168
|
"data-date-field": !0
|
|
169
|
-
}, l && u, /* @__PURE__ */ t.createElement(
|
|
169
|
+
}, l && u, /* @__PURE__ */ t.createElement(z, {
|
|
170
170
|
"aria-labelledby": l ? c : void 0,
|
|
171
171
|
value: m,
|
|
172
172
|
onChange: d,
|
|
@@ -174,38 +174,38 @@ const F = ({ children: e, className: a }) => {
|
|
|
174
174
|
isReadOnly: s,
|
|
175
175
|
isInvalid: i
|
|
176
176
|
}, E));
|
|
177
|
-
},
|
|
177
|
+
}, we = ({ className: e }) => /* @__PURE__ */ t.createElement(k, {
|
|
178
178
|
datePart: o.YEAR,
|
|
179
179
|
className: e
|
|
180
|
-
}),
|
|
181
|
-
const { id: a, hidePlaceholder: r, autoComplete: s } =
|
|
182
|
-
return
|
|
180
|
+
}), Ue = ({ className: e }) => {
|
|
181
|
+
const { id: a, hidePlaceholder: r, autoComplete: s } = _(), { inputId: l } = h(o.YEAR), { isFirstPart: c } = y(o.YEAR), { t: m } = R(), i = H(null), d = r ? void 0 : m("field.date.placeholder.year");
|
|
182
|
+
return U(() => {
|
|
183
183
|
var u;
|
|
184
184
|
c && ((u = i.current) == null || u.focus({
|
|
185
185
|
preventScroll: !0
|
|
186
186
|
}));
|
|
187
|
-
}, a), /* @__PURE__ */ t.createElement(
|
|
187
|
+
}, a), /* @__PURE__ */ t.createElement(K, {
|
|
188
188
|
ref: i,
|
|
189
189
|
id: l,
|
|
190
190
|
className: e,
|
|
191
191
|
placeholder: d,
|
|
192
|
-
autoComplete:
|
|
192
|
+
autoComplete: V(s, o.YEAR),
|
|
193
193
|
maxLength: 4,
|
|
194
194
|
inputMode: "numeric",
|
|
195
195
|
"data-hook": o.YEAR
|
|
196
196
|
});
|
|
197
197
|
};
|
|
198
|
-
F.Label =
|
|
199
|
-
F.Input =
|
|
200
|
-
n.Label =
|
|
201
|
-
n.Month =
|
|
198
|
+
F.Label = we;
|
|
199
|
+
F.Input = Ue;
|
|
200
|
+
n.Label = ge;
|
|
201
|
+
n.Month = g;
|
|
202
202
|
n.Day = C;
|
|
203
203
|
n.Year = F;
|
|
204
|
-
n.Description =
|
|
204
|
+
n.Description = _e;
|
|
205
205
|
n.Error = Oe;
|
|
206
|
-
function
|
|
207
|
-
const { inputId: a } =
|
|
208
|
-
return
|
|
206
|
+
function h(e) {
|
|
207
|
+
const { inputId: a } = W();
|
|
208
|
+
return N(() => {
|
|
209
209
|
const r = e.toLowerCase();
|
|
210
210
|
return {
|
|
211
211
|
inputId: `${a}-${r}-input`,
|
|
@@ -217,19 +217,19 @@ function N(e) {
|
|
|
217
217
|
]);
|
|
218
218
|
}
|
|
219
219
|
function y(e) {
|
|
220
|
-
const { value: a, onChange: r, hasError: s = !1 } =
|
|
220
|
+
const { value: a, onChange: r, hasError: s = !1 } = _(), { regionalFormat: l } = w(), c = N(() => ce(a ?? ""), [
|
|
221
221
|
a
|
|
222
|
-
]), m =
|
|
222
|
+
]), m = N(() => ie(s, a ?? ""), [
|
|
223
223
|
a,
|
|
224
224
|
s
|
|
225
|
-
]), i = c[e] || "", d =
|
|
225
|
+
]), i = c[e] || "", d = x((E) => {
|
|
226
226
|
const f = me(E, e, c);
|
|
227
227
|
r(f);
|
|
228
228
|
}, [
|
|
229
229
|
r,
|
|
230
230
|
c,
|
|
231
231
|
e
|
|
232
|
-
]), u =
|
|
232
|
+
]), u = N(() => G(l).filter(Q).map((L) => L.toUpperCase())[0] === e, [
|
|
233
233
|
l,
|
|
234
234
|
e
|
|
235
235
|
]);
|
|
@@ -241,68 +241,68 @@ function y(e) {
|
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
243
|
function k({ datePart: e, className: a }) {
|
|
244
|
-
const { inputId: r, labelId: s } =
|
|
244
|
+
const { inputId: r, labelId: s } = h(e), { t: l } = R(), c = `field.date.label.${e.toLowerCase()}`, m = l(c);
|
|
245
245
|
return /* @__PURE__ */ t.createElement("label", {
|
|
246
246
|
id: s,
|
|
247
247
|
htmlFor: r,
|
|
248
248
|
className: a
|
|
249
249
|
}, m);
|
|
250
250
|
}
|
|
251
|
-
const
|
|
252
|
-
fields:
|
|
253
|
-
month:
|
|
251
|
+
const Be = "_fields_b2cgx_1", Ve = "_month_b2cgx_10", ke = "_day_b2cgx_11", qe = "_year_b2cgx_12", $e = "_dayInput_b2cgx_28", ze = "_yearInput_b2cgx_29", Ke = "_monthTrigger_b2cgx_33", We = "_monthOption_b2cgx_53", I = {
|
|
252
|
+
fields: Be,
|
|
253
|
+
month: Ve,
|
|
254
254
|
day: ke,
|
|
255
|
-
year:
|
|
255
|
+
year: qe,
|
|
256
256
|
dayInput: $e,
|
|
257
|
-
yearInput:
|
|
258
|
-
monthTrigger:
|
|
259
|
-
monthOption:
|
|
260
|
-
},
|
|
257
|
+
yearInput: ze,
|
|
258
|
+
monthTrigger: Ke,
|
|
259
|
+
monthOption: We
|
|
260
|
+
}, Ge = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ne, {
|
|
261
261
|
content: e,
|
|
262
262
|
locale: a
|
|
263
263
|
}), Et = () => {
|
|
264
|
-
const e =
|
|
265
|
-
|
|
266
|
-
]), a =
|
|
267
|
-
|
|
268
|
-
]), s =
|
|
269
|
-
|
|
264
|
+
const e = v(De, [
|
|
265
|
+
I.monthTrigger
|
|
266
|
+
]), a = Ae(I.monthOption, Me), r = v($, [
|
|
267
|
+
I.dayInput
|
|
268
|
+
]), s = v($, [
|
|
269
|
+
I.yearInput
|
|
270
270
|
]);
|
|
271
271
|
return /* @__PURE__ */ t.createElement(n, {
|
|
272
|
-
className: D(de,
|
|
272
|
+
className: D(de, I.fields)
|
|
273
273
|
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
274
274
|
className: D(ue, b.label)
|
|
275
275
|
}, /* @__PURE__ */ t.createElement(n.Label.Required, {
|
|
276
276
|
className: D(pe, b.requiredMark)
|
|
277
277
|
})), /* @__PURE__ */ t.createElement(n.Month, {
|
|
278
|
-
className:
|
|
278
|
+
className: I.month
|
|
279
279
|
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
280
|
-
className: D(
|
|
280
|
+
className: D(Y, b.label)
|
|
281
281
|
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
282
282
|
className: e
|
|
283
|
-
}, /* @__PURE__ */ t.createElement(
|
|
283
|
+
}, /* @__PURE__ */ t.createElement(Te, {
|
|
284
284
|
className: b.dropdownIcon
|
|
285
285
|
})), /* @__PURE__ */ t.createElement(n.Month.Options, {
|
|
286
286
|
className: D(Ee, b.selectPopover, b.dropdownPopover)
|
|
287
287
|
}, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
|
|
288
288
|
className: a
|
|
289
289
|
}))), /* @__PURE__ */ t.createElement(n.Day, {
|
|
290
|
-
className:
|
|
290
|
+
className: I.day
|
|
291
291
|
}, /* @__PURE__ */ t.createElement(n.Day.Label, {
|
|
292
|
-
className: D(
|
|
292
|
+
className: D(Y, b.label)
|
|
293
293
|
}), /* @__PURE__ */ t.createElement(n.Day.Input, {
|
|
294
294
|
className: r
|
|
295
295
|
})), /* @__PURE__ */ t.createElement(n.Year, {
|
|
296
|
-
className:
|
|
296
|
+
className: I.year
|
|
297
297
|
}, /* @__PURE__ */ t.createElement(n.Year.Label, {
|
|
298
|
-
className: D(
|
|
298
|
+
className: D(Y, b.label)
|
|
299
299
|
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
300
300
|
className: s
|
|
301
301
|
})), /* @__PURE__ */ t.createElement(n.Error, {
|
|
302
302
|
className: D(be, b.error)
|
|
303
303
|
}, /* @__PURE__ */ t.createElement(Re, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
304
304
|
className: D(fe, b.description)
|
|
305
|
-
},
|
|
305
|
+
}, Ge));
|
|
306
306
|
};
|
|
307
307
|
export {
|
|
308
308
|
Et as D
|