@wix/form-elements 1.159.0 → 1.160.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/component/{appointment-rac-CpiyUOXo.js → appointment-rac-BmHu56e5.js} +63 -63
- package/dist/component/{bookings-address-rac-BBEUV1t7.js → bookings-address-rac-DY9l2g0h.js} +1 -1
- package/dist/component/{bookings-email-rac-DdfoeLFV.js → bookings-email-rac-B5vNSOsS.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DH39yvQ-.js → bookings-first-name-rac-CJiefCNz.js} +1 -1
- package/dist/component/{bookings-header-rac-StLm7b4I.js → bookings-header-rac-BFu7Ko5w.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DHZMPMOO.js → bookings-last-name-rac-DegMM13h.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DrHp1ojM.js → bookings-login-bar-rac-DrA-5tBH.js} +7 -7
- package/dist/component/{bookings-phone-rac-6aGjbavK.js → bookings-phone-rac-DsaeqxCI.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DBlGZUM5.js → bookings-rich-text-rac-jRHiwqi8.js} +1 -1
- package/dist/component/{checkbox-field-rac-Cna1Va1X.js → checkbox-field-rac-CyoBb6Yf.js} +43 -43
- package/dist/component/{checkbox-group-field-headless-m_-10Mdx.js → checkbox-group-field-headless-Bv1gU3oL.js} +54 -54
- package/dist/component/{checkbox-group-field-rac-BSCi5hmx.js → checkbox-group-field-rac-DasArcdV.js} +6 -6
- package/dist/component/{checkbox-group-rac-BWYQZmAI.js → checkbox-group-rac-CzmufV1U.js} +1 -1
- package/dist/component/{checkbox-rac-BsUTfSUf.js → checkbox-rac-6C7XoUoZ.js} +1 -1
- package/dist/component/{contacts-address-rac-DwCLW8rV.js → contacts-address-rac-BZobbFtz.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-DnNgxbKb.js → contacts-birthdate-rac-DIzf41DS.js} +1 -1
- package/dist/component/{contacts-company-rac-BQqXzpNl.js → contacts-company-rac-BiBDO28r.js} +1 -1
- package/dist/component/{contacts-email-rac-BINnZzxp.js → contacts-email-rac-5mqokCSD.js} +1 -1
- package/dist/component/{contacts-first-name-rac-DBWKFkIU.js → contacts-first-name-rac-BXe3_Nz5.js} +1 -1
- package/dist/component/{contacts-last-name-rac-D_-qrF7I.js → contacts-last-name-rac-Cfqgh7u1.js} +1 -1
- package/dist/component/{contacts-phone-rac-7n7JkSDr.js → contacts-phone-rac-cmLUWnAc.js} +1 -1
- package/dist/component/{contacts-position-rac-DvXP8nvT.js → contacts-position-rac-DTyvklfN.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DnLnV5Gm.js → contacts-subscribe-rac-D-ZEX1A3.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BJVWhvYW.js → contacts-tax-id-rac-B4NYJwWt.js} +1 -1
- package/dist/component/{date-availability-Df807-eN.js → date-availability-Dach9aRC.js} +1 -1
- package/dist/component/date-input-field-rac-B72mHcya.js +309 -0
- package/dist/component/{date-input-rac-CSB3MWHW.js → date-input-rac-CYix11gT.js} +1 -1
- package/dist/component/{date-picker-field-rac-CySThPfz.js → date-picker-field-rac-B8pvtPir.js} +86 -86
- package/dist/component/{date-picker-rac-Fp8_pxtf.js → date-picker-rac-D6cR0zH9.js} +1 -1
- package/dist/component/date-time-input-field-rac-B7Y3Yf5l.js +441 -0
- package/dist/component/{date-time-input-rac-wctMR4uM.js → date-time-input-rac-DMN-noQX.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-erMPfwFL.js → dext-checkbox-group-rac-Kq0GnteP.js} +2 -2
- package/dist/component/{dext-checkbox-rac-DQSq9Lqd.js → dext-checkbox-rac-BY9GZ4n1.js} +1 -1
- package/dist/component/{dext-date-picker-rac-RCLcd1VV.js → dext-date-picker-rac-CXArIddp.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-DMolWzvy.js → dext-date-time-input-rac-B39TtxGq.js} +1 -1
- package/dist/component/{dext-dropdown-rac-wQ2GJL4V.js → dext-dropdown-rac-C3y0G8cS.js} +1 -1
- package/dist/component/{dext-email-rac-BtymBVTW.js → dext-email-rac-BIg3cq7Q.js} +1 -1
- package/dist/component/{dext-number-input-rac-DHPiK0Z3.js → dext-number-input-rac-27sHJ7yN.js} +1 -1
- package/dist/component/{dext-phone-rac-C58vHEEe.js → dext-phone-rac-CcohoFQp.js} +1 -1
- package/dist/component/dext-radio-group-rac-eead3Gve.js +18 -0
- package/dist/component/{dext-rating-input-rac-DI0k3tVa.js → dext-rating-input-rac-B_E6OcBr.js} +1 -1
- package/dist/component/{dext-tags-rac-DmF6ctvQ.js → dext-tags-rac-Yd9aAtnF.js} +2 -2
- package/dist/component/{dext-text-area-rac-Bv6ridbR.js → dext-text-area-rac-CMACri2C.js} +1 -1
- package/dist/component/{dext-text-input-rac-DoTAdUgU.js → dext-text-input-rac-sNjSCfQ-.js} +1 -1
- package/dist/component/{dext-url-input-rac-BuoMS6g2.js → dext-url-input-rac-DwhbzJty.js} +1 -1
- package/dist/component/{donation-rac-CjZalSgn.js → donation-rac-BVAN3kMk.js} +77 -77
- package/dist/component/{dropdown-field-rac-By_fpqhx.js → dropdown-field-rac-DdoGigWx.js} +14 -14
- package/dist/component/{dropdown-rac-BnIEC4RX.js → dropdown-rac-CRkt5w47.js} +1 -1
- package/dist/component/{ecom-address-rac-B6Usk1Ty.js → ecom-address-rac-C36hFHW0.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-B4B0wzlC.js → ecom-subscription-checkbox-rac-BKfQ348w.js} +2 -2
- package/dist/component/{email-input-field-rac-Df3KI3_v.js → email-input-field-rac-MOaISYxa.js} +59 -59
- package/dist/component/{events-repeater-rac-B2iBk8lV.js → events-repeater-rac-D6p-NgE8.js} +20 -20
- package/dist/component/{events-rsvp-rac-xl_qCIh3.js → events-rsvp-rac-DVpgN8gm.js} +18 -18
- package/dist/component/{field-error-headless-DWc76YmY.js → field-error-headless-XNWmDH3E.js} +4 -4
- package/dist/component/{field-label-headless-DKBKqI2X.js → field-label-headless-CORRAJGt.js} +4 -4
- package/dist/component/{file-upload-rac-BVj4cRqe.js → file-upload-rac-DRMr7E4b.js} +89 -89
- package/dist/component/{fixed-payment-rac-BS1Hb4hg.js → fixed-payment-rac-BUXzNex9.js} +18 -18
- package/dist/component/{form-BTUoOcqB.js → form-DSpx-AO8.js} +785 -728
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-DTJ_Us6u.js → header-field-rac-CiDXlNsa.js} +6 -6
- package/dist/component/{header-rac-CvYp0Jjo.js → header-rac-B5Rg-h8u.js} +1 -1
- package/dist/component/{image-choice-rac--qrYqKJl.js → image-choice-rac-CtoA_KDp.js} +22 -22
- package/dist/component/{index-DIl9BH2M.js → index-Bz7ZhQsF.js} +53 -53
- package/dist/component/{index-CoEV4QEy.js → index-CwruESwc.js} +5 -5
- package/dist/component/{isObjectLike-CLN09X5V.js → isObjectLike-C5dHxHP0.js} +11 -11
- package/dist/component/multiline-address-field-rac-Z-qF366L.js +1664 -0
- package/dist/component/{multiline-address-rac-DtaAJjbR.js → multiline-address-rac-CJIHTMw5.js} +1 -1
- package/dist/component/{number-input-field-rac-2gqDUlw9.js → number-input-field-rac-D4vf6I6N.js} +29 -29
- package/dist/component/{number-input-rac-BlciEPLN.js → number-input-rac-B2jW6JUQ.js} +1 -1
- package/dist/component/{password-rac-BvvQgafk.js → password-rac-DGRZ17Jl.js} +29 -29
- package/dist/component/{payment-input-rac-CSRyOPPr.js → payment-input-rac-BtD-tAKv.js} +27 -27
- package/dist/component/phone-input-field-rac-KD4-APhr.js +512 -0
- package/dist/component/{phone-rac-DMP1MoRs.js → phone-rac-Cw2yccgg.js} +1 -1
- package/dist/component/{product-list-rac-WQ9Qhzum.js → product-list-rac-XbzTDdbp.js} +33 -33
- package/dist/component/{quiz-radio-group-rac-DzrL3-gZ.js → quiz-radio-group-rac-BDw_mAw5.js} +1 -1
- package/dist/component/{radio-button-module-classes-CJk18LzO.js → radio-button-module-classes-CFGf0Hzh.js} +23 -23
- package/dist/component/{radio-group-field-rac-DGoMoSgo.js → radio-group-field-rac-CXN7tyVu.js} +6 -6
- package/dist/component/{radio-group-rac-DhAELVNV.js → radio-group-rac-COHzqjBh.js} +1 -1
- package/dist/component/{rating-input-field-rac-CFoesqmC.js → rating-input-field-rac-DCXNZgf1.js} +37 -37
- package/dist/component/{rating-input-rac-CFMIxche.js → rating-input-rac-DwQt9ML7.js} +1 -1
- package/dist/component/{rich-content-rac.module-xJ03MegT.js → rich-content-rac.module-B7rPwNns.js} +8 -8
- package/dist/component/{rich-text-field-rac-CBMY4JOB.js → rich-text-field-rac-DlER7NRD.js} +4 -4
- package/dist/component/{rich-text-rac-CvZ7s1Ct.js → rich-text-rac-CjicsHA7.js} +1 -1
- package/dist/component/service-dropdown-rac-B81LC_6_.js +145 -0
- package/dist/component/{services-multi-choice-rac-fXOov4K7.js → services-multi-choice-rac-BR6gZeHk.js} +16 -16
- package/dist/component/{signature-rac-CG_Q9Oxr.js → signature-rac-XFj7Ddtp.js} +69 -69
- package/dist/component/{submit-button-rac-DAsovEp2.js → submit-button-rac-Bz7zs_3W.js} +12 -12
- package/dist/component/{tags-field-rac-9mpOMPLm.js → tags-field-rac-DWWkNKqc.js} +22 -22
- package/dist/component/{tags-rac-CNBJ08wS.js → tags-rac-BXyiQ9i1.js} +1 -1
- package/dist/component/{text-area-field-rac-D4aTm7CM.js → text-area-field-rac-DsIRYi0d.js} +21 -21
- package/dist/component/{text-area-rac-DoKiH_Kv.js → text-area-rac-CF9pDP9d.js} +1 -1
- package/dist/component/{text-input-field-rac-BbvPB26b.js → text-input-field-rac-BwIDZACz.js} +5 -5
- package/dist/component/{text-input-headless-BGaBRrP1.js → text-input-headless-5kQs2_Xu.js} +14 -14
- package/dist/component/{text-input-rac-1ac1EKad.js → text-input-rac-CRmSuw1k.js} +1 -1
- package/dist/component/{time-input-rac-BS0rR-89.js → time-input-rac-BRMNpe51.js} +20 -20
- package/dist/component/{url-input-field-rac-DbO6ATng.js → url-input-field-rac-CKLS3QDk.js} +17 -17
- package/dist/component/{url-input-rac-DHuny3d-.js → url-input-rac-Dv-kp50D.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-BQi_qE_-.js +116 -0
- package/dist/component/use-dropdown-trigger-class-name-bAK8aHiG.js +96 -0
- package/dist/component/{use-element-state-class-name-BUsFQfoW.js → use-element-state-class-name-rXM_lHug.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-C2l3G8gb.js → use-hoverable-input-class-name-BnV_uerV.js} +2 -2
- package/dist/component/use-is-forced-open-dropdown-Bp-5Xpmw.js +53 -0
- package/dist/component/{use-service-options-base-D_enm38a.js → use-service-options-base-CLeE9-Tx.js} +10 -10
- package/dist/component/use-text-input-class-name-DIKWvfkm.js +6 -0
- package/dist/form.d.ts +8 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-CEuPElMH.js +0 -303
- package/dist/component/date-time-input-field-rac-DG5KSBHe.js +0 -433
- package/dist/component/dext-radio-group-rac-Cp-I94HW.js +0 -18
- package/dist/component/dropdown-field-headless-BYEjiIUf.js +0 -93
- package/dist/component/multiline-address-field-rac-BjWzx-LH.js +0 -1659
- package/dist/component/phone-input-field-rac-BVWzH_TY.js +0 -508
- package/dist/component/service-dropdown-rac-B627AgPG.js +0 -145
- package/dist/component/use-dropdown-trigger-class-name-rcGBzxI1.js +0 -117
- package/dist/component/use-is-forced-open-dropdown-CoOk4W4i.js +0 -48
- package/dist/component/use-text-input-class-name-BLtPQoYE.js +0 -6
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { RicosViewer as ne } from "@wix/ricos/viewer";
|
|
2
|
+
import D from "classnames";
|
|
3
|
+
import t, { useMemo as L, useState as z, useCallback as H, useRef as w } from "react";
|
|
4
|
+
import { UNSAFE_PortalProvider as re } from "react-aria";
|
|
5
|
+
import { ListBoxItem as oe, Select as se, TextField as q, SelectValue as le, Input as W } from "react-aria-components";
|
|
6
|
+
import { bz as I, bw as J, br as B, b4 as K, bh as Q, aT as o, bJ as R, a_ as ce, b5 as ie, bo as me, bB as V, t as de, V as ue, ab as pe, v, I as Ee, L as be, z as fe, u as De, w as $ } from "./form-DSpx-AO8.js";
|
|
7
|
+
import { f as p, a as U } from "./find-child-C60k4CxG.js";
|
|
8
|
+
import { g as _e } from "./helpers-HmkkXrh2.js";
|
|
9
|
+
import { D as Ie, E as Oe } from "./field-error-headless-XNWmDH3E.js";
|
|
10
|
+
import { L as he } from "./field-label-headless-CORRAJGt.js";
|
|
11
|
+
import { F as Ne } from "./fieldset-headless-CD3fds9J.js";
|
|
12
|
+
import { N as Le, E as ye, S as ge } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
+
import { a as Ce } from "./use-is-forced-open-dropdown-Bp-5Xpmw.js";
|
|
14
|
+
import { V as Fe, u as Te } from "./use-dropdown-option-class-name-BQi_qE_-.js";
|
|
15
|
+
import { C as Ae } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
|
+
import { E as Re } from "./error-icon-hZxQ6DEy.js";
|
|
17
|
+
import { H as Me } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
+
import { s as b } from "./field-rac.module-DP0lkkEv.js";
|
|
19
|
+
import { u as Y } from "./use-hoverable-input-class-name-BnV_uerV.js";
|
|
20
|
+
const Pe = {
|
|
21
|
+
[o.MONTH]: "bday-month",
|
|
22
|
+
[o.DAY]: "bday-day",
|
|
23
|
+
[o.YEAR]: "bday-year"
|
|
24
|
+
}, x = (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 } = I(), { inputId: i, labelId: d, ariaDescribedBy: u } = J(), { regionalFormat: E } = B(), f = L(() => K(E).filter(Q).map((S) => S.toUpperCase()), [
|
|
26
|
+
E
|
|
27
|
+
]), g = p(e, n.Label), M = p(e, n.Description), P = p(e, n.Error), O = {
|
|
28
|
+
[o.MONTH]: p(e, n.Month),
|
|
29
|
+
[o.DAY]: p(e, n.Day),
|
|
30
|
+
[o.YEAR]: p(e, n.Year)
|
|
31
|
+
};
|
|
32
|
+
return /* @__PURE__ */ t.createElement(m, {
|
|
33
|
+
fieldId: r,
|
|
34
|
+
renderLabel: () => U(g, {
|
|
35
|
+
as: "div"
|
|
36
|
+
}),
|
|
37
|
+
renderInput: () => /* @__PURE__ */ t.createElement(Ne, {
|
|
38
|
+
id: i,
|
|
39
|
+
ariaLabelledBy: d,
|
|
40
|
+
ariaDescribedBy: u,
|
|
41
|
+
required: s,
|
|
42
|
+
onBlur: l,
|
|
43
|
+
onFocus: c,
|
|
44
|
+
className: a
|
|
45
|
+
}, O[f[0]], O[f[1]], O[f[2]]),
|
|
46
|
+
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, P, M)
|
|
47
|
+
});
|
|
48
|
+
}, h = ({ children: e, className: a }) => {
|
|
49
|
+
const { id: r, disabled: s, readOnly: l, showDateLabels: c, hidePlaceholder: m, autoComplete: i } = I(), { labelId: d } = N(o.MONTH), { partValue: u, partError: E, onPartChange: f } = y(o.MONTH), { t: g } = R(), [M, P] = z(!1), O = Ce(r), [S, X] = z(null), j = m ? ye : g("field.date.placeholder.month"), G = H((T) => {
|
|
50
|
+
l || f(typeof T == "string" ? T : "");
|
|
51
|
+
}, [
|
|
52
|
+
f,
|
|
53
|
+
l
|
|
54
|
+
]), Z = H((T) => {
|
|
55
|
+
P(T && !l);
|
|
56
|
+
}, [
|
|
57
|
+
l
|
|
58
|
+
]), ee = p(e, h.Label), te = p(e, h.Trigger), ae = p(e, h.Options);
|
|
59
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
60
|
+
className: a,
|
|
61
|
+
"data-date-field": !0
|
|
62
|
+
}, c ? ee : null, /* @__PURE__ */ t.createElement("div", {
|
|
63
|
+
ref: X,
|
|
64
|
+
style: {
|
|
65
|
+
display: "contents"
|
|
66
|
+
}
|
|
67
|
+
}), /* @__PURE__ */ t.createElement(re, {
|
|
68
|
+
getContainer: () => S
|
|
69
|
+
}, /* @__PURE__ */ t.createElement(se, {
|
|
70
|
+
autoComplete: x(i, o.MONTH),
|
|
71
|
+
"aria-labelledby": c ? d : void 0,
|
|
72
|
+
value: u || null,
|
|
73
|
+
onChange: G,
|
|
74
|
+
isDisabled: s,
|
|
75
|
+
isInvalid: E,
|
|
76
|
+
placeholder: j,
|
|
77
|
+
isOpen: O || M,
|
|
78
|
+
onOpenChange: O ? void 0 : Z
|
|
79
|
+
}, te, U(ae, {
|
|
80
|
+
isForcedOpen: O
|
|
81
|
+
}))));
|
|
82
|
+
}, Se = ({ className: e }) => /* @__PURE__ */ t.createElement(k, {
|
|
83
|
+
datePart: o.MONTH,
|
|
84
|
+
className: e
|
|
85
|
+
}), ve = ({ children: e, className: a }) => {
|
|
86
|
+
const { id: r, readOnly: s } = I(), { inputId: l } = N(o.MONTH), { partError: c, isFirstPart: m } = y(o.MONTH), i = w(null);
|
|
87
|
+
return V(() => {
|
|
88
|
+
var d;
|
|
89
|
+
m && ((d = i.current) == null || d.focus({
|
|
90
|
+
preventScroll: !0
|
|
91
|
+
}));
|
|
92
|
+
}, r), /* @__PURE__ */ t.createElement(ge, {
|
|
93
|
+
ref: i,
|
|
94
|
+
id: l,
|
|
95
|
+
className: a,
|
|
96
|
+
"data-hook": o.MONTH,
|
|
97
|
+
"data-invalid": c || void 0,
|
|
98
|
+
"data-readonly": s || void 0
|
|
99
|
+
}, /* @__PURE__ */ t.createElement(le, null), e);
|
|
100
|
+
}, A = ({ children: e, className: a, ...r }) => {
|
|
101
|
+
const { isForcedOpen: s } = r, { language: l } = B(), c = L(() => _e(l), [
|
|
102
|
+
l
|
|
103
|
+
]), m = p(e, A.Option) ?? /* @__PURE__ */ t.createElement(A.Option, null);
|
|
104
|
+
return /* @__PURE__ */ t.createElement(Le, {
|
|
105
|
+
className: a,
|
|
106
|
+
containerPadding: 0,
|
|
107
|
+
offset: 0
|
|
108
|
+
}, /* @__PURE__ */ t.createElement(Fe, {
|
|
109
|
+
isForcedOpen: s,
|
|
110
|
+
autoFocus: s ? !1 : void 0
|
|
111
|
+
}, c.map((i, d) => U(m, {
|
|
112
|
+
key: String(d + 1),
|
|
113
|
+
value: String(d + 1),
|
|
114
|
+
label: i
|
|
115
|
+
}))));
|
|
116
|
+
}, Ye = ({ className: e, ...a }) => {
|
|
117
|
+
const { value: r, label: s } = a;
|
|
118
|
+
return /* @__PURE__ */ t.createElement(oe, {
|
|
119
|
+
className: e,
|
|
120
|
+
id: r,
|
|
121
|
+
textValue: s
|
|
122
|
+
}, s);
|
|
123
|
+
};
|
|
124
|
+
h.Label = Se;
|
|
125
|
+
h.Trigger = ve;
|
|
126
|
+
h.Options = A;
|
|
127
|
+
A.Option = Ye;
|
|
128
|
+
const C = ({ children: e, className: a }) => {
|
|
129
|
+
const { disabled: r, readOnly: s, showDateLabels: l } = I(), { labelId: c } = N(o.DAY), { partValue: m, partError: i, onPartChange: d } = y(o.DAY), u = p(e, C.Label), E = p(e, C.Input);
|
|
130
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
131
|
+
className: a,
|
|
132
|
+
"data-date-field": !0
|
|
133
|
+
}, l && u, /* @__PURE__ */ t.createElement(q, {
|
|
134
|
+
"aria-labelledby": l ? c : void 0,
|
|
135
|
+
value: m,
|
|
136
|
+
onChange: d,
|
|
137
|
+
isDisabled: r,
|
|
138
|
+
isReadOnly: s,
|
|
139
|
+
isInvalid: i
|
|
140
|
+
}, E));
|
|
141
|
+
}, He = ({ className: e }) => /* @__PURE__ */ t.createElement(k, {
|
|
142
|
+
datePart: o.DAY,
|
|
143
|
+
className: e
|
|
144
|
+
}), we = ({ className: e }) => {
|
|
145
|
+
const { id: a, hidePlaceholder: r, autoComplete: s } = I(), { inputId: l } = N(o.DAY), { isFirstPart: c } = y(o.DAY), { t: m } = R(), i = w(null), d = r ? void 0 : m("field.date.placeholder.day");
|
|
146
|
+
return V(() => {
|
|
147
|
+
var u;
|
|
148
|
+
c && ((u = i.current) == null || u.focus({
|
|
149
|
+
preventScroll: !0
|
|
150
|
+
}));
|
|
151
|
+
}, a), /* @__PURE__ */ t.createElement(W, {
|
|
152
|
+
ref: i,
|
|
153
|
+
id: l,
|
|
154
|
+
className: e,
|
|
155
|
+
placeholder: d,
|
|
156
|
+
autoComplete: x(s, o.DAY),
|
|
157
|
+
maxLength: 2,
|
|
158
|
+
inputMode: "numeric",
|
|
159
|
+
"data-hook": o.DAY
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
C.Label = He;
|
|
163
|
+
C.Input = we;
|
|
164
|
+
const F = ({ children: e, className: a }) => {
|
|
165
|
+
const { disabled: r, readOnly: s, showDateLabels: l } = I(), { labelId: c } = N(o.YEAR), { partValue: m, partError: i, onPartChange: d } = y(o.YEAR), u = p(e, F.Label), E = p(e, F.Input);
|
|
166
|
+
return /* @__PURE__ */ t.createElement("div", {
|
|
167
|
+
className: a,
|
|
168
|
+
"data-date-field": !0
|
|
169
|
+
}, l && u, /* @__PURE__ */ t.createElement(q, {
|
|
170
|
+
"aria-labelledby": l ? c : void 0,
|
|
171
|
+
value: m,
|
|
172
|
+
onChange: d,
|
|
173
|
+
isDisabled: r,
|
|
174
|
+
isReadOnly: s,
|
|
175
|
+
isInvalid: i
|
|
176
|
+
}, E));
|
|
177
|
+
}, Be = ({ className: e }) => /* @__PURE__ */ t.createElement(k, {
|
|
178
|
+
datePart: o.YEAR,
|
|
179
|
+
className: e
|
|
180
|
+
}), Ve = ({ className: e }) => {
|
|
181
|
+
const { id: a, hidePlaceholder: r, autoComplete: s } = I(), { inputId: l } = N(o.YEAR), { isFirstPart: c } = y(o.YEAR), { t: m } = R(), i = w(null), d = r ? void 0 : m("field.date.placeholder.year");
|
|
182
|
+
return V(() => {
|
|
183
|
+
var u;
|
|
184
|
+
c && ((u = i.current) == null || u.focus({
|
|
185
|
+
preventScroll: !0
|
|
186
|
+
}));
|
|
187
|
+
}, a), /* @__PURE__ */ t.createElement(W, {
|
|
188
|
+
ref: i,
|
|
189
|
+
id: l,
|
|
190
|
+
className: e,
|
|
191
|
+
placeholder: d,
|
|
192
|
+
autoComplete: x(s, o.YEAR),
|
|
193
|
+
maxLength: 4,
|
|
194
|
+
inputMode: "numeric",
|
|
195
|
+
"data-hook": o.YEAR
|
|
196
|
+
});
|
|
197
|
+
};
|
|
198
|
+
F.Label = Be;
|
|
199
|
+
F.Input = Ve;
|
|
200
|
+
n.Label = he;
|
|
201
|
+
n.Month = h;
|
|
202
|
+
n.Day = C;
|
|
203
|
+
n.Year = F;
|
|
204
|
+
n.Description = Ie;
|
|
205
|
+
n.Error = Oe;
|
|
206
|
+
function N(e) {
|
|
207
|
+
const { inputId: a } = J();
|
|
208
|
+
return L(() => {
|
|
209
|
+
const r = e.toLowerCase();
|
|
210
|
+
return {
|
|
211
|
+
inputId: `${a}-${r}-input`,
|
|
212
|
+
labelId: `${a}-${r}-label`
|
|
213
|
+
};
|
|
214
|
+
}, [
|
|
215
|
+
a,
|
|
216
|
+
e
|
|
217
|
+
]);
|
|
218
|
+
}
|
|
219
|
+
function y(e) {
|
|
220
|
+
const { value: a, onChange: r, hasError: s = !1 } = I(), { regionalFormat: l } = B(), c = L(() => ce(a ?? ""), [
|
|
221
|
+
a
|
|
222
|
+
]), m = L(() => ie(s, a ?? ""), [
|
|
223
|
+
a,
|
|
224
|
+
s
|
|
225
|
+
]), i = c[e] || "", d = H((E) => {
|
|
226
|
+
const f = me(E, e, c);
|
|
227
|
+
r(f);
|
|
228
|
+
}, [
|
|
229
|
+
r,
|
|
230
|
+
c,
|
|
231
|
+
e
|
|
232
|
+
]), u = L(() => K(l).filter(Q).map((g) => g.toUpperCase())[0] === e, [
|
|
233
|
+
l,
|
|
234
|
+
e
|
|
235
|
+
]);
|
|
236
|
+
return {
|
|
237
|
+
partValue: i,
|
|
238
|
+
partError: m[e],
|
|
239
|
+
onPartChange: d,
|
|
240
|
+
isFirstPart: u
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
function k({ datePart: e, className: a }) {
|
|
244
|
+
const { inputId: r, labelId: s } = N(e), { t: l } = R(), c = `field.date.label.${e.toLowerCase()}`, m = l(c);
|
|
245
|
+
return /* @__PURE__ */ t.createElement("label", {
|
|
246
|
+
id: s,
|
|
247
|
+
htmlFor: r,
|
|
248
|
+
className: a
|
|
249
|
+
}, m);
|
|
250
|
+
}
|
|
251
|
+
const Ue = "_fields_1mv4t_1", xe = "_month_1mv4t_10", ke = "_day_1mv4t_11", ze = "_year_1mv4t_12", $e = "_dayInput_1mv4t_28", qe = "_yearInput_1mv4t_29", We = "_monthTrigger_1mv4t_33", Je = "_monthOption_1mv4t_53", _ = {
|
|
252
|
+
fields: Ue,
|
|
253
|
+
month: xe,
|
|
254
|
+
day: ke,
|
|
255
|
+
year: ze,
|
|
256
|
+
dayInput: $e,
|
|
257
|
+
yearInput: qe,
|
|
258
|
+
monthTrigger: We,
|
|
259
|
+
monthOption: Je
|
|
260
|
+
}, Ke = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ne, {
|
|
261
|
+
content: e,
|
|
262
|
+
locale: a
|
|
263
|
+
}), Et = () => {
|
|
264
|
+
const e = Y(De, [
|
|
265
|
+
_.monthTrigger
|
|
266
|
+
]), a = Te(_.monthOption, Me), r = Y($, [
|
|
267
|
+
_.dayInput
|
|
268
|
+
]), s = Y($, [
|
|
269
|
+
_.yearInput
|
|
270
|
+
]);
|
|
271
|
+
return /* @__PURE__ */ t.createElement(n, {
|
|
272
|
+
className: D(de, _.fields)
|
|
273
|
+
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
274
|
+
className: D(ue, b.label)
|
|
275
|
+
}, /* @__PURE__ */ t.createElement(n.Label.Required, {
|
|
276
|
+
className: D(pe, b.requiredMark)
|
|
277
|
+
})), /* @__PURE__ */ t.createElement(n.Month, {
|
|
278
|
+
className: _.month
|
|
279
|
+
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
280
|
+
className: D(v, b.label)
|
|
281
|
+
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
282
|
+
className: e
|
|
283
|
+
}, /* @__PURE__ */ t.createElement(Ae, {
|
|
284
|
+
className: b.dropdownIcon
|
|
285
|
+
})), /* @__PURE__ */ t.createElement(n.Month.Options, {
|
|
286
|
+
className: D(Ee, b.selectPopover, b.dropdownPopover)
|
|
287
|
+
}, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
|
|
288
|
+
className: a
|
|
289
|
+
}))), /* @__PURE__ */ t.createElement(n.Day, {
|
|
290
|
+
className: _.day
|
|
291
|
+
}, /* @__PURE__ */ t.createElement(n.Day.Label, {
|
|
292
|
+
className: D(v, b.label)
|
|
293
|
+
}), /* @__PURE__ */ t.createElement(n.Day.Input, {
|
|
294
|
+
className: r
|
|
295
|
+
})), /* @__PURE__ */ t.createElement(n.Year, {
|
|
296
|
+
className: _.year
|
|
297
|
+
}, /* @__PURE__ */ t.createElement(n.Year.Label, {
|
|
298
|
+
className: D(v, b.label)
|
|
299
|
+
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
300
|
+
className: s
|
|
301
|
+
})), /* @__PURE__ */ t.createElement(n.Error, {
|
|
302
|
+
className: D(be, b.error)
|
|
303
|
+
}, /* @__PURE__ */ t.createElement(Re, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
304
|
+
className: D(fe, b.description)
|
|
305
|
+
}, Ke));
|
|
306
|
+
};
|
|
307
|
+
export {
|
|
308
|
+
Et as D
|
|
309
|
+
};
|
package/dist/component/{date-picker-field-rac-CySThPfz.js → date-picker-field-rac-B8pvtPir.js}
RENAMED
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
2
2
|
import p from "classnames";
|
|
3
|
-
import e, { useState as
|
|
3
|
+
import e, { useState as O, useCallback as k, useContext as ee, useRef as P, useMemo as v } from "react";
|
|
4
4
|
import { parseDate as te } from "@internationalized/date";
|
|
5
5
|
import { UNSAFE_PortalProvider as re } from "react-aria";
|
|
6
|
-
import { I18nProvider as ae, DatePicker as ne, DatePickerStateContext as
|
|
7
|
-
import { D,
|
|
6
|
+
import { I18nProvider as ae, DatePicker as ne, DatePickerStateContext as le, Group as oe, 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 x, Select as M, SelectValue as Y, ListBox as w, ListBoxItem as B } from "react-aria-components";
|
|
7
|
+
import { D as f, bz as h, bw as V, br as F, bB as pe, V as fe, ab as De, y as Ce, L as ye, z as be, x as Se } from "./form-DSpx-AO8.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-
|
|
12
|
-
import { D as ve, N as
|
|
13
|
-
import { u as Ie } from "./use-is-forced-open-dropdown-
|
|
14
|
-
import { i as Fe } from "./date-availability-
|
|
10
|
+
import { D as Ne, E as Te } from "./field-error-headless-XNWmDH3E.js";
|
|
11
|
+
import { L as _e } from "./field-label-headless-CORRAJGt.js";
|
|
12
|
+
import { D as ve, N as L, S as U } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
+
import { u as Ie } from "./use-is-forced-open-dropdown-Bp-5Xpmw.js";
|
|
14
|
+
import { i as Fe } from "./date-availability-Dach9aRC.js";
|
|
15
15
|
import { C as I } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
|
-
import { E as
|
|
17
|
-
import { H as
|
|
18
|
-
import { s as
|
|
19
|
-
import { u as Pe } from "./use-hoverable-input-class-name-
|
|
16
|
+
import { E as Le } from "./error-icon-hZxQ6DEy.js";
|
|
17
|
+
import { H as Oe } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
+
import { s as D } from "./field-rac.module-DP0lkkEv.js";
|
|
19
|
+
import { u as Pe } from "./use-hoverable-input-class-name-BnV_uerV.js";
|
|
20
20
|
const Ae = [
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
f.SUNDAY,
|
|
22
|
+
f.MONDAY,
|
|
23
|
+
f.TUESDAY,
|
|
24
|
+
f.WEDNESDAY,
|
|
25
|
+
f.THURSDAY,
|
|
26
|
+
f.FRIDAY,
|
|
27
|
+
f.SATURDAY
|
|
28
28
|
], Re = {
|
|
29
29
|
availableDays: Ae
|
|
30
30
|
}, a = ({ children: t }) => {
|
|
31
|
-
const { id: r, value:
|
|
32
|
-
const J =
|
|
31
|
+
const { id: r, value: l, onChange: n, disabled: i, required: c, onBlur: u, onFocus: o, FieldLayout: m, hasError: d, readOnly: C } = h(), { labelId: y } = V(), { regionalFormat: N } = F(), [s, T] = O(null), [j, K] = O(!1), _ = Ie(r), W = k((Z) => {
|
|
32
|
+
const J = We(Z);
|
|
33
33
|
n(J);
|
|
34
34
|
}, [
|
|
35
35
|
n
|
|
36
|
-
]),
|
|
36
|
+
]), H = E(t, a.Label), $ = E(t, a.Control), q = E(t, a.Calendar), z = E(t, a.Description), G = E(t, a.Error), Q = Ke(l);
|
|
37
37
|
return /* @__PURE__ */ e.createElement(m, {
|
|
38
38
|
fieldId: r,
|
|
39
|
-
renderLabel: () =>
|
|
39
|
+
renderLabel: () => H,
|
|
40
40
|
renderInput: () => /* @__PURE__ */ e.createElement(ae, {
|
|
41
41
|
locale: N
|
|
42
42
|
}, /* @__PURE__ */ e.createElement("div", {
|
|
@@ -48,60 +48,60 @@ const Ae = [
|
|
|
48
48
|
getContainer: () => s
|
|
49
49
|
}, /* @__PURE__ */ e.createElement(ne, {
|
|
50
50
|
"aria-labelledby": y,
|
|
51
|
-
value:
|
|
52
|
-
onChange:
|
|
51
|
+
value: Q,
|
|
52
|
+
onChange: W,
|
|
53
53
|
isDisabled: i,
|
|
54
54
|
isInvalid: d,
|
|
55
55
|
isReadOnly: C,
|
|
56
56
|
isRequired: c,
|
|
57
57
|
onBlur: u,
|
|
58
|
-
onFocus:
|
|
58
|
+
onFocus: o,
|
|
59
59
|
isOpen: _ || j,
|
|
60
60
|
onOpenChange: _ ? void 0 : K
|
|
61
61
|
}, $, S(q, {
|
|
62
62
|
isForcedOpen: _
|
|
63
63
|
})))),
|
|
64
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null,
|
|
64
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, G, z)
|
|
65
65
|
});
|
|
66
|
-
},
|
|
67
|
-
const { inputId:
|
|
68
|
-
if (!
|
|
66
|
+
}, ke = ({ children: t, className: r }) => {
|
|
67
|
+
const { inputId: l, ariaDescribedBy: n } = V(), { hasError: i, disabled: c, readOnly: u } = h(), o = ee(le), m = k((d) => {
|
|
68
|
+
if (!o || o.isOpen || c || u)
|
|
69
69
|
return;
|
|
70
70
|
const C = d.target;
|
|
71
71
|
if (C.closest("button"))
|
|
72
72
|
return;
|
|
73
73
|
const y = C.closest("[data-type]");
|
|
74
|
-
y && y.getAttribute("data-type") !== "literal" ||
|
|
74
|
+
y && y.getAttribute("data-type") !== "literal" || o.setOpen(!0);
|
|
75
75
|
}, [
|
|
76
|
-
|
|
76
|
+
o,
|
|
77
77
|
c,
|
|
78
78
|
u
|
|
79
79
|
]);
|
|
80
|
-
return /* @__PURE__ */ e.createElement(
|
|
81
|
-
id:
|
|
80
|
+
return /* @__PURE__ */ e.createElement(oe, {
|
|
81
|
+
id: l,
|
|
82
82
|
"aria-describedby": n,
|
|
83
83
|
className: r,
|
|
84
84
|
"data-invalid": i,
|
|
85
|
-
|
|
85
|
+
onClick: m
|
|
86
86
|
}, t);
|
|
87
|
-
},
|
|
88
|
-
const { id: r, placeholder:
|
|
87
|
+
}, xe = ({ className: t }) => {
|
|
88
|
+
const { id: r, placeholder: l } = h(), { regionalFormat: n } = F(), i = P(null), c = P(!1);
|
|
89
89
|
pe(() => {
|
|
90
|
-
var
|
|
91
|
-
(
|
|
90
|
+
var o;
|
|
91
|
+
(o = i.current) == null || o.focus({
|
|
92
92
|
preventScroll: !0
|
|
93
93
|
});
|
|
94
94
|
}, r);
|
|
95
|
-
const u = v(() =>
|
|
95
|
+
const u = v(() => He(n), [
|
|
96
96
|
n
|
|
97
97
|
]);
|
|
98
98
|
return /* @__PURE__ */ e.createElement(se, {
|
|
99
99
|
className: t,
|
|
100
|
-
"data-placeholder-hidden": !
|
|
101
|
-
}, (
|
|
102
|
-
const m =
|
|
100
|
+
"data-placeholder-hidden": !l || void 0
|
|
101
|
+
}, (o) => {
|
|
102
|
+
const m = o.type === u && o.isPlaceholder && !!l;
|
|
103
103
|
return /* @__PURE__ */ e.createElement(ce, {
|
|
104
|
-
segment:
|
|
104
|
+
segment: o,
|
|
105
105
|
"data-first-segment": m || void 0,
|
|
106
106
|
ref: (d) => {
|
|
107
107
|
if (!d && c.current) {
|
|
@@ -113,20 +113,20 @@ const Ae = [
|
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
}, (d) => !d.isPlaceholder || !
|
|
116
|
+
}, (d) => !d.isPlaceholder || !l ? d.text : m ? l : d.text);
|
|
117
117
|
});
|
|
118
118
|
}, Me = ({ children: t, className: r }) => /* @__PURE__ */ e.createElement(ve, {
|
|
119
119
|
className: r
|
|
120
|
-
}, t), g = ({ children: t, className: r, ...
|
|
121
|
-
const { isForcedOpen: n } =
|
|
120
|
+
}, t), g = ({ children: t, className: r, ...l }) => {
|
|
121
|
+
const { isForcedOpen: n } = l, { regionalFormat: i } = F(), { availability: c } = h(), u = v(() => he(i), [
|
|
122
122
|
i
|
|
123
|
-
]),
|
|
123
|
+
]), o = v(() => (s) => {
|
|
124
124
|
const T = new Date(s.year, s.month - 1, s.day);
|
|
125
125
|
return !Fe(T, c || Re);
|
|
126
126
|
}, [
|
|
127
127
|
c
|
|
128
128
|
]), m = E(t, g.Day) ?? /* @__PURE__ */ e.createElement(g.Day, null), d = E(t, g.PreviousTrigger), C = E(t, g.NextTrigger), y = E(t, g.MonthTrigger), N = E(t, g.YearTrigger);
|
|
129
|
-
return /* @__PURE__ */ e.createElement(
|
|
129
|
+
return /* @__PURE__ */ e.createElement(L, {
|
|
130
130
|
className: r,
|
|
131
131
|
containerPadding: 0
|
|
132
132
|
}, /* @__PURE__ */ e.createElement(Ye, {
|
|
@@ -134,7 +134,7 @@ const Ae = [
|
|
|
134
134
|
}, /* @__PURE__ */ e.createElement(ie, {
|
|
135
135
|
autoFocus: n ? !1 : void 0,
|
|
136
136
|
firstDayOfWeek: $e(u),
|
|
137
|
-
isDateUnavailable:
|
|
137
|
+
isDateUnavailable: o
|
|
138
138
|
}, /* @__PURE__ */ e.createElement("header", null, d, /* @__PURE__ */ e.createElement(me, null, (s) => S(y, {
|
|
139
139
|
ariaLabel: s["aria-label"],
|
|
140
140
|
selectedKey: s.value,
|
|
@@ -156,44 +156,44 @@ const Ae = [
|
|
|
156
156
|
})))));
|
|
157
157
|
}, Ye = ({ isForcedOpen: t, children: r }) => t ? /* @__PURE__ */ e.createElement("div", {
|
|
158
158
|
role: "dialog"
|
|
159
|
-
}, r) : /* @__PURE__ */ e.createElement(ge, null, r), we = ({ children: t, className: r, ...
|
|
160
|
-
const { date: n } =
|
|
159
|
+
}, r) : /* @__PURE__ */ e.createElement(ge, null, r), we = ({ children: t, className: r, ...l }) => {
|
|
160
|
+
const { date: n } = l;
|
|
161
161
|
return /* @__PURE__ */ e.createElement(Ee, {
|
|
162
162
|
className: r,
|
|
163
163
|
date: n
|
|
164
164
|
}, t);
|
|
165
|
-
}, Be = ({ children: t, className: r }) => /* @__PURE__ */ e.createElement(
|
|
165
|
+
}, Be = ({ children: t, className: r }) => /* @__PURE__ */ e.createElement(x, {
|
|
166
166
|
slot: "previous",
|
|
167
167
|
className: r
|
|
168
|
-
}, t),
|
|
168
|
+
}, t), Ve = ({ children: t, className: r }) => /* @__PURE__ */ e.createElement(x, {
|
|
169
169
|
slot: "next",
|
|
170
170
|
className: r
|
|
171
|
-
}, t),
|
|
172
|
-
const { ariaLabel: n, selectedKey: i, onSelectionChange: c, items: u, popoverClassName:
|
|
171
|
+
}, t), Ue = ({ children: t, className: r, ...l }) => {
|
|
172
|
+
const { ariaLabel: n, selectedKey: i, onSelectionChange: c, items: u, popoverClassName: o } = l;
|
|
173
173
|
return /* @__PURE__ */ e.createElement(M, {
|
|
174
174
|
"aria-label": n,
|
|
175
175
|
selectedKey: i,
|
|
176
176
|
onSelectionChange: c
|
|
177
|
-
}, /* @__PURE__ */ e.createElement(
|
|
177
|
+
}, /* @__PURE__ */ e.createElement(U, {
|
|
178
178
|
className: r
|
|
179
|
-
}, /* @__PURE__ */ e.createElement(Y, null), t), /* @__PURE__ */ e.createElement(
|
|
180
|
-
className:
|
|
179
|
+
}, /* @__PURE__ */ e.createElement(Y, null), t), /* @__PURE__ */ e.createElement(L, {
|
|
180
|
+
className: o,
|
|
181
181
|
containerPadding: 0
|
|
182
182
|
}, /* @__PURE__ */ e.createElement(w, {
|
|
183
183
|
items: u
|
|
184
184
|
}, (m) => /* @__PURE__ */ e.createElement(B, {
|
|
185
185
|
id: m.id
|
|
186
186
|
}, m.formatted))));
|
|
187
|
-
}, je = ({ children: t, className: r, ...
|
|
188
|
-
const { ariaLabel: n, selectedKey: i, onSelectionChange: c, items: u, popoverClassName:
|
|
187
|
+
}, je = ({ children: t, className: r, ...l }) => {
|
|
188
|
+
const { ariaLabel: n, selectedKey: i, onSelectionChange: c, items: u, popoverClassName: o } = l;
|
|
189
189
|
return /* @__PURE__ */ e.createElement(M, {
|
|
190
190
|
"aria-label": n,
|
|
191
191
|
selectedKey: i,
|
|
192
192
|
onSelectionChange: c
|
|
193
|
-
}, /* @__PURE__ */ e.createElement(
|
|
193
|
+
}, /* @__PURE__ */ e.createElement(U, {
|
|
194
194
|
className: r
|
|
195
|
-
}, /* @__PURE__ */ e.createElement(Y, null), t), /* @__PURE__ */ e.createElement(
|
|
196
|
-
className:
|
|
195
|
+
}, /* @__PURE__ */ e.createElement(Y, null), t), /* @__PURE__ */ e.createElement(L, {
|
|
196
|
+
className: o,
|
|
197
197
|
containerPadding: 0
|
|
198
198
|
}, /* @__PURE__ */ e.createElement(w, {
|
|
199
199
|
items: u
|
|
@@ -203,12 +203,12 @@ const Ae = [
|
|
|
203
203
|
};
|
|
204
204
|
g.Day = we;
|
|
205
205
|
g.PreviousTrigger = Be;
|
|
206
|
-
g.NextTrigger =
|
|
207
|
-
g.MonthTrigger =
|
|
206
|
+
g.NextTrigger = Ve;
|
|
207
|
+
g.MonthTrigger = Ue;
|
|
208
208
|
g.YearTrigger = je;
|
|
209
209
|
a.Label = _e;
|
|
210
|
-
a.Control =
|
|
211
|
-
a.Input =
|
|
210
|
+
a.Control = ke;
|
|
211
|
+
a.Input = xe;
|
|
212
212
|
a.Trigger = Me;
|
|
213
213
|
a.Calendar = g;
|
|
214
214
|
a.Description = Ne;
|
|
@@ -222,13 +222,13 @@ function Ke(t) {
|
|
|
222
222
|
return null;
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function We(t) {
|
|
226
226
|
if (!t)
|
|
227
227
|
return null;
|
|
228
|
-
const r = String(t.year).padStart(4, "0"),
|
|
229
|
-
return `${r}-${
|
|
228
|
+
const r = String(t.year).padStart(4, "0"), l = String(t.month).padStart(2, "0"), n = String(t.day).padStart(2, "0");
|
|
229
|
+
return `${r}-${l}-${n}`;
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function He(t) {
|
|
232
232
|
var r;
|
|
233
233
|
try {
|
|
234
234
|
return ((r = new Intl.DateTimeFormat(t, {
|
|
@@ -264,11 +264,11 @@ const qe = (t) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
264
264
|
strokeWidth: "1.5",
|
|
265
265
|
strokeLinecap: "round",
|
|
266
266
|
strokeLinejoin: "round"
|
|
267
|
-
})),
|
|
268
|
-
control:
|
|
269
|
-
segments:
|
|
270
|
-
trigger:
|
|
271
|
-
calendarPopover:
|
|
267
|
+
})), ze = "_control_anbxj_1", Ge = "_segments_anbxj_14", Qe = "_trigger_anbxj_72", Ze = "_calendarPopover_anbxj_103", Je = "_calendarDay_anbxj_253", Xe = "_dayNumber_anbxj_260", b = {
|
|
268
|
+
control: ze,
|
|
269
|
+
segments: Ge,
|
|
270
|
+
trigger: Qe,
|
|
271
|
+
calendarPopover: Ze,
|
|
272
272
|
calendarDay: Je,
|
|
273
273
|
dayNumber: Xe
|
|
274
274
|
}, et = ({ content: t, locale: r }) => /* @__PURE__ */ e.createElement(X, {
|
|
@@ -286,9 +286,9 @@ const qe = (t) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
286
286
|
b.control
|
|
287
287
|
]);
|
|
288
288
|
return /* @__PURE__ */ e.createElement(a, null, /* @__PURE__ */ e.createElement(a.Label, {
|
|
289
|
-
className: p(
|
|
289
|
+
className: p(fe, D.label)
|
|
290
290
|
}, /* @__PURE__ */ e.createElement(a.Label.Required, {
|
|
291
|
-
className: p(
|
|
291
|
+
className: p(De, D.requiredMark)
|
|
292
292
|
})), /* @__PURE__ */ e.createElement(a.Control, {
|
|
293
293
|
className: t
|
|
294
294
|
}, /* @__PURE__ */ e.createElement(a.Trigger, {
|
|
@@ -296,23 +296,23 @@ const qe = (t) => /* @__PURE__ */ e.createElement("svg", {
|
|
|
296
296
|
}, /* @__PURE__ */ e.createElement(qe, null)), /* @__PURE__ */ e.createElement(a.Input, {
|
|
297
297
|
className: b.segments
|
|
298
298
|
})), /* @__PURE__ */ e.createElement(a.Calendar, {
|
|
299
|
-
className: p(Ce,
|
|
299
|
+
className: p(Ce, D.selectPopover, b.calendarPopover)
|
|
300
300
|
}, /* @__PURE__ */ e.createElement(a.Calendar.PreviousTrigger, null, /* @__PURE__ */ e.createElement(R, {
|
|
301
301
|
direction: "left"
|
|
302
302
|
})), /* @__PURE__ */ e.createElement(a.Calendar.MonthTrigger, null, /* @__PURE__ */ e.createElement(I, {
|
|
303
|
-
className:
|
|
303
|
+
className: D.dropdownIcon
|
|
304
304
|
})), /* @__PURE__ */ e.createElement(a.Calendar.YearTrigger, null, /* @__PURE__ */ e.createElement(I, {
|
|
305
|
-
className:
|
|
305
|
+
className: D.dropdownIcon
|
|
306
306
|
})), /* @__PURE__ */ e.createElement(a.Calendar.NextTrigger, null, /* @__PURE__ */ e.createElement(R, {
|
|
307
307
|
direction: "right"
|
|
308
308
|
})), /* @__PURE__ */ e.createElement(a.Calendar.Day, {
|
|
309
|
-
className: p(
|
|
309
|
+
className: p(Oe, A.day, b.calendarDay)
|
|
310
310
|
}, ({ formattedDate: r }) => /* @__PURE__ */ e.createElement("span", {
|
|
311
311
|
className: p(A.dayNumber, b.dayNumber)
|
|
312
312
|
}, r))), /* @__PURE__ */ e.createElement(a.Error, {
|
|
313
|
-
className: p(ye,
|
|
314
|
-
}, /* @__PURE__ */ e.createElement(
|
|
315
|
-
className: p(be,
|
|
313
|
+
className: p(ye, D.error)
|
|
314
|
+
}, /* @__PURE__ */ e.createElement(Le, null), /* @__PURE__ */ e.createElement(a.Error.Text, null)), /* @__PURE__ */ e.createElement(a.Description, {
|
|
315
|
+
className: p(be, D.description)
|
|
316
316
|
}, et));
|
|
317
317
|
};
|
|
318
318
|
export {
|