@wix/form-elements 1.147.0 → 1.148.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-BG5-bIZU.js → appointment-rac-BNqXl3dq.js} +93 -89
- package/dist/component/{bookings-address-rac-8e8PqKsp.js → bookings-address-rac-DzLf588z.js} +1 -1
- package/dist/component/{bookings-email-rac-CtlnU8ws.js → bookings-email-rac-BCNWH7ss.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CrivNlXM.js → bookings-first-name-rac-D36aHUOJ.js} +1 -1
- package/dist/component/{bookings-header-rac-DWDAjfqq.js → bookings-header-rac-CNr2y2ES.js} +1 -1
- package/dist/component/{bookings-last-name-rac-qAthWem2.js → bookings-last-name-rac-yHE6ZIxr.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BNyUDqlM.js → bookings-login-bar-rac-C3weOc1i.js} +1 -1
- package/dist/component/{bookings-phone-rac-Tc39XLr7.js → bookings-phone-rac-CIo_ApRf.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CPNaPtFK.js → bookings-rich-text-rac-rgKnvt57.js} +1 -1
- package/dist/component/{checkbox-field-rac-DEa78Tpf.js → checkbox-field-rac-CMaVxLNe.js} +9 -7
- package/dist/component/{checkbox-group-field-headless-BxBaMg29.js → checkbox-group-field-headless-XPtqS8Km.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-CRRP03Qk.js → checkbox-group-field-rac-C_58XfQt.js} +6 -6
- package/dist/component/{checkbox-group-rac-TOofMGl3.js → checkbox-group-rac-FQrWViSh.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-6173wvuW.js → checkbox-indicator-module-classes-akWZsZNn.js} +1 -1
- package/dist/component/{checkbox-rac-CHMHr8Ry.js → checkbox-rac-C5Lj2b1N.js} +1 -1
- package/dist/component/{contacts-address-rac-Bc5yDvTL.js → contacts-address-rac-OhpLzD0X.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-Ubtg5ncv.js → contacts-birthdate-rac-Dnqq84ct.js} +1 -1
- package/dist/component/{contacts-company-rac-BksH9IoV.js → contacts-company-rac-DMnTF55t.js} +1 -1
- package/dist/component/{contacts-email-rac-DDPEtMAm.js → contacts-email-rac-DmZhScW2.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DUlCvEdx.js → contacts-first-name-rac-B6A4fuzK.js} +1 -1
- package/dist/component/{contacts-last-name-rac-BikqNgUr.js → contacts-last-name-rac-DVz97lew.js} +1 -1
- package/dist/component/{contacts-phone-rac-B4OEgM_8.js → contacts-phone-rac-DV8aO0uS.js} +1 -1
- package/dist/component/{contacts-position-rac-BfybzySV.js → contacts-position-rac-BP_yBIE4.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-CMHb33v1.js → contacts-subscribe-rac-wmTprtLf.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-C-qEqwO5.js → contacts-tax-id-rac-CUEPBQye.js} +1 -1
- package/dist/component/{date-availability-DZ3J3LLm.js → date-availability-BK_0gLRv.js} +1 -1
- package/dist/component/{date-input-field-rac-DeL5vuE7.js → date-input-field-rac-BfWPvRnd.js} +75 -69
- package/dist/component/{date-input-rac-Di6TQvFf.js → date-input-rac-B7vAMRBX.js} +1 -1
- package/dist/component/{date-picker-field-rac-BcdpTkjV.js → date-picker-field-rac-CpDY4EkU.js} +10 -8
- package/dist/component/{date-picker-rac-Brne65gr.js → date-picker-rac-BCswaZB1.js} +1 -1
- package/dist/component/{date-time-input-field-rac-BtQfAxRp.js → date-time-input-field-rac-D9w4eEa0.js} +115 -109
- package/dist/component/{date-time-input-rac-DM_HXiqV.js → date-time-input-rac-_im8-JRC.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-WTVwhGG0.js → dext-checkbox-group-rac-Di7B1Wzv.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BR5YwmLQ.js → dext-checkbox-rac-BPendOsP.js} +1 -1
- package/dist/component/{dext-date-picker-rac-DvDuRGYi.js → dext-date-picker-rac-_-Ig9Qn6.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-C6RgbaVv.js → dext-date-time-input-rac-dKFW87yu.js} +1 -1
- package/dist/component/{dext-dropdown-rac-CWjSdcZx.js → dext-dropdown-rac-Cpdpps7P.js} +1 -1
- package/dist/component/{dext-email-rac-D-C1gVTq.js → dext-email-rac-D4UmYH5m.js} +1 -1
- package/dist/component/{dext-number-input-rac-YKzZS2ZG.js → dext-number-input-rac-DUetGnYJ.js} +1 -1
- package/dist/component/{dext-phone-rac-CFZlEH2a.js → dext-phone-rac-Bsz_DAT9.js} +1 -1
- package/dist/component/{dext-radio-group-rac-DiH0wIIl.js → dext-radio-group-rac-B_soj2FD.js} +2 -2
- package/dist/component/{dext-rating-input-rac-D0s-i0qO.js → dext-rating-input-rac-cm40qt4O.js} +1 -1
- package/dist/component/{dext-tags-rac-Br48OQQ5.js → dext-tags-rac-D1ULx6t1.js} +2 -2
- package/dist/component/{dext-text-area-rac-6jG8gJ7i.js → dext-text-area-rac-IkL67rHB.js} +1 -1
- package/dist/component/{dext-text-input-rac-FAJTCXuf.js → dext-text-input-rac-DsYSTEL2.js} +1 -1
- package/dist/component/{dext-url-input-rac-BoMP8sQB.js → dext-url-input-rac-BKvEkpYu.js} +1 -1
- package/dist/component/{donation-rac-DNi4p-v5.js → donation-rac-CaCXMa-H.js} +60 -58
- package/dist/component/{dropdown-field-headless-7SCC-xOC.js → dropdown-field-headless-DcrQK8mL.js} +29 -27
- package/dist/component/{dropdown-field-rac-CMzZh6J6.js → dropdown-field-rac-CuGoz_6I.js} +4 -4
- package/dist/component/{dropdown-rac-qeugpHXY.js → dropdown-rac-rIe6ZqaZ.js} +1 -1
- package/dist/component/{ecom-address-rac-D8b_L5md.js → ecom-address-rac-DT0rzvvp.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-BnAuR9La.js → ecom-subscription-checkbox-rac-ZfbiME6e.js} +2 -2
- package/dist/component/{email-input-field-rac-CunXRyc5.js → email-input-field-rac-8Qn3yskh.js} +4 -4
- package/dist/component/{events-repeater-rac-DMjyIOkB.js → events-repeater-rac-DyHrMd3y.js} +12 -8
- package/dist/component/{events-rsvp-rac-BsuDPq2K.js → events-rsvp-rac-CoL-euuc.js} +4 -4
- package/dist/component/{field-error-headless-E8WjFr_n.js → field-error-headless-RylIeqXr.js} +1 -1
- package/dist/component/{field-label-headless-BakLOu5E.js → field-label-headless-d3hZxIEc.js} +1 -1
- package/dist/component/field-rac.module-DP0lkkEv.js +25 -0
- package/dist/component/{file-upload-rac-Clu_c--0.js → file-upload-rac-rXbabrgc.js} +148 -144
- package/dist/component/{fixed-payment-rac-CzAXxsb-.js → fixed-payment-rac-CaR7pXXA.js} +4 -4
- package/dist/component/{form-DHAKwnLt.js → form-DhIEC3nB.js} +2251 -2256
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CwmVpz3r.js → header-field-rac-nELbyGjP.js} +2 -2
- package/dist/component/{header-rac-ahkGRjSy.js → header-rac-q80EQNmM.js} +1 -1
- package/dist/component/{image-choice-rac-BwxkkdUu.js → image-choice-rac-CLMiTQK0.js} +32 -32
- package/dist/component/{index-BQf23zZi.js → index-C-jVrv9Y.js} +4 -4
- package/dist/component/{index-BFi_n6B7.js → index-DnLJzPM-.js} +2 -2
- package/dist/component/{isObjectLike-DHcMRYYH.js → isObjectLike-Bf577MHV.js} +1 -1
- package/dist/component/{multiline-address-field-rac-C6xaqNOk.js → multiline-address-field-rac-BVAv1w9F.js} +106 -88
- package/dist/component/{multiline-address-rac-DF4TFuDx.js → multiline-address-rac-qMuUHA9U.js} +1 -1
- package/dist/component/{number-input-field-rac-uVJ3SBv2.js → number-input-field-rac-B_vnBWFG.js} +16 -14
- package/dist/component/{number-input-rac-D6ERhrSM.js → number-input-rac-BPCIW8Fz.js} +1 -1
- package/dist/component/{password-rac-CAiC0ZKl.js → password-rac-D72HG72u.js} +13 -11
- package/dist/component/{payment-input-rac-Bu25xvby.js → payment-input-rac-DthVgsAi.js} +13 -11
- package/dist/component/{phone-input-field-rac-32qUvCsC.js → phone-input-field-rac-XIPkH8Fb.js} +7 -7
- package/dist/component/{phone-rac-mNrpj30q.js → phone-rac-U94fCfer.js} +1 -1
- package/dist/component/{product-list-rac-zHdM9rHw.js → product-list-rac-BRMGPyhr.js} +49 -49
- package/dist/component/{quiz-radio-group-rac-BaSlT8w3.js → quiz-radio-group-rac-DafNzzgX.js} +1 -1
- package/dist/component/radio-button-module-classes-DtFlHID_.js +134 -0
- package/dist/component/{radio-group-field-rac-DI0UgTBr.js → radio-group-field-rac-BXrYWjew.js} +5 -5
- package/dist/component/{radio-group-rac-D2ESG8J4.js → radio-group-rac-BNyFfQYV.js} +1 -1
- package/dist/component/{rating-input-field-rac-BYT2XqOK.js → rating-input-field-rac-KbkiVCZ7.js} +5 -5
- package/dist/component/{rating-input-rac-D-5CmVAX.js → rating-input-rac-zT4vPkwP.js} +1 -1
- package/dist/component/{rich-content-rac.module-Dp9Advo9.js → rich-content-rac.module-C0OQetct.js} +1 -1
- package/dist/component/{rich-text-field-rac-COEUwoXQ.js → rich-text-field-rac-T4NoShC0.js} +2 -2
- package/dist/component/{rich-text-rac-CQZLjBQ0.js → rich-text-rac-m6VRCRZu.js} +1 -1
- package/dist/component/{service-dropdown-rac-BTtJVFv8.js → service-dropdown-rac-BFwKhL1l.js} +5 -5
- package/dist/component/{services-multi-choice-rac-hbY3g0Kb.js → services-multi-choice-rac-DjzcuRWv.js} +7 -7
- package/dist/component/{signature-rac-CTCNclwL.js → signature-rac-B1LPKnIw.js} +271 -269
- package/dist/component/{submit-button-rac-kKGeVgsG.js → submit-button-rac-Cz3PVtW4.js} +2 -2
- package/dist/component/{tags-field-rac-CVf7oQr_.js → tags-field-rac-DzSoL__s.js} +75 -75
- package/dist/component/{tags-rac-DiX1_nTT.js → tags-rac-DMYJDrm-.js} +1 -1
- package/dist/component/{text-area-field-rac-IhBNXiDl.js → text-area-field-rac-SuMzBm-Q.js} +15 -13
- package/dist/component/{text-area-rac-DHevCtFF.js → text-area-rac-C-zmnJgt.js} +1 -1
- package/dist/component/{text-input-field-rac-Da3_wTdh.js → text-input-field-rac-BmQlXTK9.js} +4 -4
- package/dist/component/text-input-headless-BsrjGTK4.js +47 -0
- package/dist/component/{text-input-rac-564LIZ1_.js → text-input-rac-DhQFKG4h.js} +1 -1
- package/dist/component/{time-input-rac-p-Nnsxp_.js → time-input-rac-CRZZdbTI.js} +29 -27
- package/dist/component/{url-input-field-rac-DjrcpRtm.js → url-input-field-rac-D617Pvsf.js} +20 -18
- package/dist/component/{url-input-rac-B3brpyop.js → url-input-rac-CLvxaWZz.js} +1 -1
- package/dist/component/{use-dropdown-trigger-class-name-BWTT7ltv.js → use-dropdown-trigger-class-name-C4uqTKFP.js} +4 -4
- package/dist/component/{use-element-state-class-name-CUZuhFvZ.js → use-element-state-class-name-DJx-T0zf.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-ugX8-g4E.js → use-hoverable-input-class-name-pwVZXwrY.js} +3 -3
- package/dist/component/{use-is-forced-open-dropdown-DUZMvWpk.js → use-is-forced-open-dropdown-DBpm1D-o.js} +1 -1
- package/dist/component/{use-service-options-base-hqO9Ev38.js → use-service-options-base-xHeVTve3.js} +1 -1
- package/dist/component/use-text-input-class-name-CrEjJ2Z8.js +6 -0
- package/package.json +2 -2
- package/dist/component/field-rac.module-DfEb7pBp.js +0 -25
- package/dist/component/radio-button-module-classes-BdWjkBlX.js +0 -132
- package/dist/component/text-input-headless-DcZRRXCp.js +0 -45
- package/dist/component/use-text-input-class-name-wp9dzpEy.js +0 -6
package/dist/component/{date-input-field-rac-DeL5vuE7.js → date-input-field-rac-BfWPvRnd.js}
RENAMED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
import { RicosViewer as ae } from "@wix/ricos/viewer";
|
|
2
|
-
import
|
|
3
|
-
import t, { useMemo as N, useState as
|
|
2
|
+
import g from "classnames";
|
|
3
|
+
import t, { useMemo as N, useState as U, useCallback as v, useRef as H } from "react";
|
|
4
4
|
import { UNSAFE_PortalProvider as ne } from "react-aria";
|
|
5
5
|
import { ListBoxItem as re, Select as oe, TextField as $, SelectValue as se, Input as z } from "react-aria-components";
|
|
6
|
-
import { bo as h, bl as W, bg as
|
|
7
|
-
import { f as p, a as
|
|
6
|
+
import { bo as h, bl as W, bg as k, aV as K, b6 as Q, aI as o, by as T, aP as le, aW as ce, bd as ie, bq as w, S as M, a0 as me, y as de, H as ue, v as pe } from "./form-DhIEC3nB.js";
|
|
7
|
+
import { f as p, a as V } from "./find-child-C60k4CxG.js";
|
|
8
8
|
import { g as Ee } from "./helpers-HmkkXrh2.js";
|
|
9
|
-
import { D as fe, E as be } from "./field-error-headless-
|
|
10
|
-
import { L as
|
|
9
|
+
import { D as fe, E as be } from "./field-error-headless-RylIeqXr.js";
|
|
10
|
+
import { L as ge } from "./field-label-headless-d3hZxIEc.js";
|
|
11
11
|
import { F as De } from "./fieldset-headless-CD3fds9J.js";
|
|
12
|
-
import { N as he, E as
|
|
13
|
-
import { a as
|
|
14
|
-
import { V as Ne, a as Ce, u as _e } from "./use-dropdown-trigger-class-name-
|
|
12
|
+
import { N as he, E as ye, S as Ie } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
+
import { a as Oe } from "./use-is-forced-open-dropdown-DBpm1D-o.js";
|
|
14
|
+
import { V as Ne, a as Ce, u as _e } from "./use-dropdown-trigger-class-name-C4uqTKFP.js";
|
|
15
15
|
import { C as Le } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as Fe } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as Re } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
-
import { s as f } from "./field-rac.module-
|
|
19
|
-
import { u as q } from "./use-text-input-class-name-
|
|
18
|
+
import { s as f } from "./field-rac.module-DP0lkkEv.js";
|
|
19
|
+
import { u as q } from "./use-text-input-class-name-CrEjJ2Z8.js";
|
|
20
20
|
const Me = {
|
|
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 } = h(), { inputId: i, labelId: d, ariaDescribedBy: u } = W(), { regionalFormat: E } =
|
|
24
|
+
}, B = (e, a) => e === "bday" ? Me[a] : void 0, n = ({ children: e, className: a }) => {
|
|
25
|
+
const { id: r, required: s, onBlur: l, onFocus: c, FieldLayout: m } = h(), { inputId: i, labelId: d, ariaDescribedBy: u } = W(), { regionalFormat: E } = k(), b = N(() => K(E).filter(Q).map((Y) => Y.toUpperCase()), [
|
|
26
26
|
E
|
|
27
|
-
]), _ = p(e, n.Label), P = p(e, n.Description), S = p(e, n.Error),
|
|
27
|
+
]), _ = p(e, n.Label), P = p(e, n.Description), S = p(e, n.Error), y = {
|
|
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: () => V(_, {
|
|
35
35
|
as: "div"
|
|
36
36
|
}),
|
|
37
37
|
renderInput: () => /* @__PURE__ */ t.createElement(De, {
|
|
@@ -42,11 +42,11 @@ const Me = {
|
|
|
42
42
|
onBlur: l,
|
|
43
43
|
onFocus: c,
|
|
44
44
|
className: a
|
|
45
|
-
},
|
|
45
|
+
}, y[b[0]], y[b[1]], y[b[2]]),
|
|
46
46
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, S, P)
|
|
47
47
|
});
|
|
48
|
-
},
|
|
49
|
-
const { id: r, disabled: s, readOnly: l, showDateLabels: c, hidePlaceholder: m, autoComplete: i } = h(), { labelId: d } =
|
|
48
|
+
}, I = ({ children: e, className: a }) => {
|
|
49
|
+
const { id: r, disabled: s, readOnly: l, showDateLabels: c, hidePlaceholder: m, autoComplete: i } = h(), { labelId: d } = O(o.MONTH), { partValue: u, partError: E, onPartChange: b } = C(o.MONTH), { t: _ } = T(), [P, S] = U(!1), y = Oe(r), [Y, j] = U(null), G = m ? ye : _("field.date.placeholder.month"), J = v((R) => {
|
|
50
50
|
l || b(typeof R == "string" ? R : "");
|
|
51
51
|
}, [
|
|
52
52
|
b,
|
|
@@ -55,7 +55,7 @@ const Me = {
|
|
|
55
55
|
S(R && !l);
|
|
56
56
|
}, [
|
|
57
57
|
l
|
|
58
|
-
]), Z = p(e,
|
|
58
|
+
]), Z = p(e, I.Label), ee = p(e, I.Trigger), te = p(e, I.Options);
|
|
59
59
|
return /* @__PURE__ */ t.createElement("div", {
|
|
60
60
|
className: a,
|
|
61
61
|
"data-date-field": !0
|
|
@@ -67,27 +67,29 @@ const Me = {
|
|
|
67
67
|
}), /* @__PURE__ */ t.createElement(ne, {
|
|
68
68
|
getContainer: () => Y
|
|
69
69
|
}, /* @__PURE__ */ t.createElement(oe, {
|
|
70
|
-
autoComplete:
|
|
70
|
+
autoComplete: B(i, o.MONTH),
|
|
71
71
|
"aria-labelledby": c ? d : void 0,
|
|
72
72
|
value: u || null,
|
|
73
73
|
onChange: J,
|
|
74
74
|
isDisabled: s,
|
|
75
75
|
isInvalid: E,
|
|
76
76
|
placeholder: G,
|
|
77
|
-
isOpen:
|
|
78
|
-
onOpenChange:
|
|
79
|
-
}, ee,
|
|
80
|
-
isForcedOpen:
|
|
77
|
+
isOpen: y || P,
|
|
78
|
+
onOpenChange: y ? void 0 : X
|
|
79
|
+
}, ee, V(te, {
|
|
80
|
+
isForcedOpen: y
|
|
81
81
|
}))));
|
|
82
|
-
}, Ae = ({ className: e }) => /* @__PURE__ */ t.createElement(
|
|
82
|
+
}, Ae = ({ className: e }) => /* @__PURE__ */ t.createElement(x, {
|
|
83
83
|
datePart: o.MONTH,
|
|
84
84
|
className: e
|
|
85
85
|
}), Te = ({ children: e, className: a }) => {
|
|
86
|
-
const { id: r, readOnly: s } = h(), { inputId: l } =
|
|
87
|
-
return
|
|
86
|
+
const { id: r, readOnly: s } = h(), { inputId: l } = O(o.MONTH), { partError: c, isFirstPart: m } = C(o.MONTH), i = H(null);
|
|
87
|
+
return w(() => {
|
|
88
88
|
var d;
|
|
89
|
-
m && ((d = i.current) == null || d.focus(
|
|
90
|
-
|
|
89
|
+
m && ((d = i.current) == null || d.focus({
|
|
90
|
+
preventScroll: !0
|
|
91
|
+
}));
|
|
92
|
+
}, r), /* @__PURE__ */ t.createElement(Ie, {
|
|
91
93
|
ref: i,
|
|
92
94
|
id: l,
|
|
93
95
|
className: a,
|
|
@@ -96,7 +98,7 @@ const Me = {
|
|
|
96
98
|
"data-readonly": s || void 0
|
|
97
99
|
}, /* @__PURE__ */ t.createElement(se, null), e);
|
|
98
100
|
}, A = ({ children: e, className: a, ...r }) => {
|
|
99
|
-
const { isForcedOpen: s } = r, { language: l } =
|
|
101
|
+
const { isForcedOpen: s } = r, { language: l } = k(), c = N(() => Ee(l), [
|
|
100
102
|
l
|
|
101
103
|
]), m = p(e, A.Option) ?? /* @__PURE__ */ t.createElement(A.Option, null);
|
|
102
104
|
return /* @__PURE__ */ t.createElement(he, {
|
|
@@ -106,7 +108,7 @@ const Me = {
|
|
|
106
108
|
}, /* @__PURE__ */ t.createElement(Ne, {
|
|
107
109
|
isForcedOpen: s,
|
|
108
110
|
autoFocus: s ? !1 : void 0
|
|
109
|
-
}, c.map((i, d) =>
|
|
111
|
+
}, c.map((i, d) => V(m, {
|
|
110
112
|
key: String(d + 1),
|
|
111
113
|
value: String(d + 1),
|
|
112
114
|
label: i
|
|
@@ -119,12 +121,12 @@ const Me = {
|
|
|
119
121
|
textValue: s
|
|
120
122
|
}, s);
|
|
121
123
|
};
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
I.Label = Ae;
|
|
125
|
+
I.Trigger = Te;
|
|
126
|
+
I.Options = A;
|
|
125
127
|
A.Option = Pe;
|
|
126
128
|
const L = ({ children: e, className: a }) => {
|
|
127
|
-
const { disabled: r, readOnly: s, showDateLabels: l } = h(), { labelId: c } =
|
|
129
|
+
const { disabled: r, readOnly: s, showDateLabels: l } = h(), { labelId: c } = O(o.DAY), { partValue: m, partError: i, onPartChange: d } = C(o.DAY), u = p(e, L.Label), E = p(e, L.Input);
|
|
128
130
|
return /* @__PURE__ */ t.createElement("div", {
|
|
129
131
|
className: a,
|
|
130
132
|
"data-date-field": !0
|
|
@@ -136,20 +138,22 @@ const L = ({ children: e, className: a }) => {
|
|
|
136
138
|
isReadOnly: s,
|
|
137
139
|
isInvalid: i
|
|
138
140
|
}, E));
|
|
139
|
-
}, Se = ({ className: e }) => /* @__PURE__ */ t.createElement(
|
|
141
|
+
}, Se = ({ className: e }) => /* @__PURE__ */ t.createElement(x, {
|
|
140
142
|
datePart: o.DAY,
|
|
141
143
|
className: e
|
|
142
144
|
}), Ye = ({ className: e }) => {
|
|
143
|
-
const { id: a, hidePlaceholder: r, autoComplete: s } = h(), { inputId: l } =
|
|
144
|
-
return
|
|
145
|
+
const { id: a, hidePlaceholder: r, autoComplete: s } = h(), { inputId: l } = O(o.DAY), { isFirstPart: c } = C(o.DAY), { t: m } = T(), i = H(null), d = r ? void 0 : m("field.date.placeholder.day");
|
|
146
|
+
return w(() => {
|
|
145
147
|
var u;
|
|
146
|
-
c && ((u = i.current) == null || u.focus(
|
|
148
|
+
c && ((u = i.current) == null || u.focus({
|
|
149
|
+
preventScroll: !0
|
|
150
|
+
}));
|
|
147
151
|
}, a), /* @__PURE__ */ t.createElement(z, {
|
|
148
152
|
ref: i,
|
|
149
153
|
id: l,
|
|
150
154
|
className: e,
|
|
151
155
|
placeholder: d,
|
|
152
|
-
autoComplete:
|
|
156
|
+
autoComplete: B(s, o.DAY),
|
|
153
157
|
maxLength: 2,
|
|
154
158
|
inputMode: "numeric",
|
|
155
159
|
"data-hook": o.DAY
|
|
@@ -158,7 +162,7 @@ const L = ({ children: e, className: a }) => {
|
|
|
158
162
|
L.Label = Se;
|
|
159
163
|
L.Input = Ye;
|
|
160
164
|
const F = ({ children: e, className: a }) => {
|
|
161
|
-
const { disabled: r, readOnly: s, showDateLabels: l } = h(), { labelId: c } =
|
|
165
|
+
const { disabled: r, readOnly: s, showDateLabels: l } = h(), { labelId: c } = O(o.YEAR), { partValue: m, partError: i, onPartChange: d } = C(o.YEAR), u = p(e, F.Label), E = p(e, F.Input);
|
|
162
166
|
return /* @__PURE__ */ t.createElement("div", {
|
|
163
167
|
className: a,
|
|
164
168
|
"data-date-field": !0
|
|
@@ -170,34 +174,36 @@ const F = ({ children: e, className: a }) => {
|
|
|
170
174
|
isReadOnly: s,
|
|
171
175
|
isInvalid: i
|
|
172
176
|
}, E));
|
|
173
|
-
}, ve = ({ className: e }) => /* @__PURE__ */ t.createElement(
|
|
177
|
+
}, ve = ({ className: e }) => /* @__PURE__ */ t.createElement(x, {
|
|
174
178
|
datePart: o.YEAR,
|
|
175
179
|
className: e
|
|
176
|
-
}),
|
|
177
|
-
const { id: a, hidePlaceholder: r, autoComplete: s } = h(), { inputId: l } =
|
|
178
|
-
return
|
|
180
|
+
}), He = ({ className: e }) => {
|
|
181
|
+
const { id: a, hidePlaceholder: r, autoComplete: s } = h(), { inputId: l } = O(o.YEAR), { isFirstPart: c } = C(o.YEAR), { t: m } = T(), i = H(null), d = r ? void 0 : m("field.date.placeholder.year");
|
|
182
|
+
return w(() => {
|
|
179
183
|
var u;
|
|
180
|
-
c && ((u = i.current) == null || u.focus(
|
|
184
|
+
c && ((u = i.current) == null || u.focus({
|
|
185
|
+
preventScroll: !0
|
|
186
|
+
}));
|
|
181
187
|
}, a), /* @__PURE__ */ t.createElement(z, {
|
|
182
188
|
ref: i,
|
|
183
189
|
id: l,
|
|
184
190
|
className: e,
|
|
185
191
|
placeholder: d,
|
|
186
|
-
autoComplete:
|
|
192
|
+
autoComplete: B(s, o.YEAR),
|
|
187
193
|
maxLength: 4,
|
|
188
194
|
inputMode: "numeric",
|
|
189
195
|
"data-hook": o.YEAR
|
|
190
196
|
});
|
|
191
197
|
};
|
|
192
198
|
F.Label = ve;
|
|
193
|
-
F.Input =
|
|
194
|
-
n.Label =
|
|
195
|
-
n.Month =
|
|
199
|
+
F.Input = He;
|
|
200
|
+
n.Label = ge;
|
|
201
|
+
n.Month = I;
|
|
196
202
|
n.Day = L;
|
|
197
203
|
n.Year = F;
|
|
198
204
|
n.Description = fe;
|
|
199
205
|
n.Error = be;
|
|
200
|
-
function
|
|
206
|
+
function O(e) {
|
|
201
207
|
const { inputId: a } = W();
|
|
202
208
|
return N(() => {
|
|
203
209
|
const r = e.toLowerCase();
|
|
@@ -211,7 +217,7 @@ function g(e) {
|
|
|
211
217
|
]);
|
|
212
218
|
}
|
|
213
219
|
function C(e) {
|
|
214
|
-
const { value: a, onChange: r, hasError: s = !1 } = h(), { regionalFormat: l } =
|
|
220
|
+
const { value: a, onChange: r, hasError: s = !1 } = h(), { regionalFormat: l } = k(), c = N(() => le(a ?? ""), [
|
|
215
221
|
a
|
|
216
222
|
]), m = N(() => ce(s, a ?? ""), [
|
|
217
223
|
a,
|
|
@@ -234,21 +240,21 @@ function C(e) {
|
|
|
234
240
|
isFirstPart: u
|
|
235
241
|
};
|
|
236
242
|
}
|
|
237
|
-
function
|
|
238
|
-
const { inputId: r, labelId: s } =
|
|
243
|
+
function x({ datePart: e, className: a }) {
|
|
244
|
+
const { inputId: r, labelId: s } = O(e), { t: l } = T(), c = `field.date.label.${e.toLowerCase()}`, m = l(c);
|
|
239
245
|
return /* @__PURE__ */ t.createElement("label", {
|
|
240
246
|
id: s,
|
|
241
247
|
htmlFor: r,
|
|
242
248
|
className: a
|
|
243
249
|
}, m);
|
|
244
250
|
}
|
|
245
|
-
const
|
|
246
|
-
fields:
|
|
247
|
-
month:
|
|
248
|
-
day:
|
|
249
|
-
year:
|
|
250
|
-
dayInput:
|
|
251
|
-
yearInput:
|
|
251
|
+
const ke = "_fields_kg9md_1", we = "_month_kg9md_10", Ve = "_day_kg9md_11", Be = "_year_kg9md_12", xe = "_dayInput_kg9md_28", Ue = "_yearInput_kg9md_29", qe = "_monthTrigger_kg9md_33", $e = "_monthOption_kg9md_53", D = {
|
|
252
|
+
fields: ke,
|
|
253
|
+
month: we,
|
|
254
|
+
day: Ve,
|
|
255
|
+
year: Be,
|
|
256
|
+
dayInput: xe,
|
|
257
|
+
yearInput: Ue,
|
|
252
258
|
monthTrigger: qe,
|
|
253
259
|
monthOption: $e
|
|
254
260
|
}, ze = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ae, {
|
|
@@ -259,37 +265,37 @@ const He = "_fields_fw9my_1", Ve = "_month_fw9my_10", Be = "_day_fw9my_11", xe =
|
|
|
259
265
|
return /* @__PURE__ */ t.createElement(n, {
|
|
260
266
|
className: D.fields
|
|
261
267
|
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
262
|
-
className:
|
|
268
|
+
className: g(M, f.label)
|
|
263
269
|
}, /* @__PURE__ */ t.createElement(n.Label.Required, {
|
|
264
|
-
className:
|
|
270
|
+
className: g(me, f.requiredMark)
|
|
265
271
|
})), /* @__PURE__ */ t.createElement(n.Month, {
|
|
266
272
|
className: D.month
|
|
267
273
|
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
268
|
-
className:
|
|
274
|
+
className: g(M, f.label)
|
|
269
275
|
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
270
276
|
className: e
|
|
271
277
|
}, /* @__PURE__ */ t.createElement(Le, {
|
|
272
278
|
className: f.dropdownIcon
|
|
273
279
|
})), /* @__PURE__ */ t.createElement(n.Month.Options, {
|
|
274
|
-
className:
|
|
280
|
+
className: g(de, f.selectPopover, f.dropdownPopover)
|
|
275
281
|
}, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
|
|
276
282
|
className: a
|
|
277
283
|
}))), /* @__PURE__ */ t.createElement(n.Day, {
|
|
278
284
|
className: D.day
|
|
279
285
|
}, /* @__PURE__ */ t.createElement(n.Day.Label, {
|
|
280
|
-
className:
|
|
286
|
+
className: g(M, f.label)
|
|
281
287
|
}), /* @__PURE__ */ t.createElement(n.Day.Input, {
|
|
282
288
|
className: r
|
|
283
289
|
})), /* @__PURE__ */ t.createElement(n.Year, {
|
|
284
290
|
className: D.year
|
|
285
291
|
}, /* @__PURE__ */ t.createElement(n.Year.Label, {
|
|
286
|
-
className:
|
|
292
|
+
className: g(M, f.label)
|
|
287
293
|
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
288
294
|
className: s
|
|
289
295
|
})), /* @__PURE__ */ t.createElement(n.Error, {
|
|
290
|
-
className:
|
|
296
|
+
className: g(ue, f.error)
|
|
291
297
|
}, /* @__PURE__ */ t.createElement(Fe, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
292
|
-
className:
|
|
298
|
+
className: g(pe, f.description)
|
|
293
299
|
}, ze));
|
|
294
300
|
};
|
|
295
301
|
export {
|
package/dist/component/{date-picker-field-rac-BcdpTkjV.js → date-picker-field-rac-CpDY4EkU.js}
RENAMED
|
@@ -4,19 +4,19 @@ import e, { useState as L, useCallback as x, useContext as ee, useRef as P, useM
|
|
|
4
4
|
import { parseDate as te } from "@internationalized/date";
|
|
5
5
|
import { UNSAFE_PortalProvider as re } from "react-aria";
|
|
6
6
|
import { I18nProvider as ae, DatePicker as ne, DatePickerStateContext as oe, Group as le, DateInput as se, DateSegment as ce, Calendar as ie, CalendarMonthPicker as me, CalendarYearPicker as de, CalendarGrid as ue, Dialog as ge, CalendarCell as Ee, Button as k, Select as M, SelectValue as Y, ListBox as w, ListBoxItem as B } from "react-aria-components";
|
|
7
|
-
import { D, bo as h, bl as U, bg as F, bq as pe, S as De, a0 as fe, u as Ce, H as ye, v as be, t as Se } from "./form-
|
|
7
|
+
import { D, bo as h, bl as U, bg as F, bq as pe, S as De, a0 as fe, u as Ce, H as ye, v as be, t as Se } from "./form-DhIEC3nB.js";
|
|
8
8
|
import { g as he, c as A } from "./calendar.module-CKCBG_Pg.js";
|
|
9
9
|
import { f as E, a as S } from "./find-child-C60k4CxG.js";
|
|
10
|
-
import { D as Ne, E as Te } from "./field-error-headless-
|
|
11
|
-
import { L as _e } from "./field-label-headless-
|
|
10
|
+
import { D as Ne, E as Te } from "./field-error-headless-RylIeqXr.js";
|
|
11
|
+
import { L as _e } from "./field-label-headless-d3hZxIEc.js";
|
|
12
12
|
import { D as ve, N as O, S as V } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
-
import { u as Ie } from "./use-is-forced-open-dropdown-
|
|
14
|
-
import { i as Fe } from "./date-availability-
|
|
13
|
+
import { u as Ie } from "./use-is-forced-open-dropdown-DBpm1D-o.js";
|
|
14
|
+
import { i as Fe } from "./date-availability-BK_0gLRv.js";
|
|
15
15
|
import { C as I } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
16
|
import { E as Oe } from "./error-icon-hZxQ6DEy.js";
|
|
17
17
|
import { H as Le } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
-
import { s as f } from "./field-rac.module-
|
|
19
|
-
import { u as Pe } from "./use-hoverable-input-class-name-
|
|
18
|
+
import { s as f } from "./field-rac.module-DP0lkkEv.js";
|
|
19
|
+
import { u as Pe } from "./use-hoverable-input-class-name-pwVZXwrY.js";
|
|
20
20
|
const Ae = [
|
|
21
21
|
D.SUNDAY,
|
|
22
22
|
D.MONDAY,
|
|
@@ -88,7 +88,9 @@ const Ae = [
|
|
|
88
88
|
const { id: r, placeholder: o } = h(), { regionalFormat: n } = F(), i = P(null), c = P(!1);
|
|
89
89
|
pe(() => {
|
|
90
90
|
var l;
|
|
91
|
-
(l = i.current) == null || l.focus(
|
|
91
|
+
(l = i.current) == null || l.focus({
|
|
92
|
+
preventScroll: !0
|
|
93
|
+
});
|
|
92
94
|
}, r);
|
|
93
95
|
const u = v(() => We(n), [
|
|
94
96
|
n
|