@wix/form-elements 1.224.0 → 1.226.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-UcRjJTHp.js → appointment-rac-C2ClvRys.js} +5 -5
- package/dist/component/{bookings-address-rac-DDjZGEhk.js → bookings-address-rac-CPQjosbZ.js} +1 -1
- package/dist/component/{bookings-email-rac-Dy2vh3dy.js → bookings-email-rac-DWvVUcBN.js} +1 -1
- package/dist/component/{bookings-first-name-rac-fDHMNznn.js → bookings-first-name-rac-_iG2xJiA.js} +1 -1
- package/dist/component/{bookings-header-rac-DLOeNNQf.js → bookings-header-rac-BbGm_Z8W.js} +1 -1
- package/dist/component/{bookings-last-name-rac-Bx19ROVT.js → bookings-last-name-rac-77Z29aHO.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-8FbvPiv1.js → bookings-login-bar-rac-DfqRpARE.js} +1 -1
- package/dist/component/{bookings-phone-rac-CvPQgtvq.js → bookings-phone-rac-BKoU7X0X.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-CO8bHRpD.js → bookings-rich-text-rac-DgSN4_f0.js} +1 -1
- package/dist/component/calendar-icon-DOeHn3jt.js +19 -0
- package/dist/component/{checkbox-field-rac-tzsGw10P.js → checkbox-field-rac-BLJ3Xb7C.js} +6 -6
- package/dist/component/{checkbox-group-field-headless-CL18dpkq.js → checkbox-group-field-headless-BeU8DG0A.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-BmbxaprJ.js → checkbox-group-field-rac-ClRi6Ljp.js} +6 -6
- package/dist/component/{checkbox-group-rac-shsbUvRc.js → checkbox-group-rac--cM57qqw.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-DOxE4UQg.js → checkbox-indicator-module-classes-Cozvs_kk.js} +1 -1
- package/dist/component/{checkbox-rac-CobYYayd.js → checkbox-rac-DnslW6as.js} +1 -1
- package/dist/component/{contacts-address-rac-BoDqJCi1.js → contacts-address-rac-Bpq_0vvi.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-GAujbm-z.js → contacts-birthdate-rac-CB1h6kRm.js} +1 -1
- package/dist/component/{contacts-company-rac-CLcEz04V.js → contacts-company-rac-DvYX4SLX.js} +1 -1
- package/dist/component/{contacts-email-rac-D9q7TJwy.js → contacts-email-rac-sxbgKBUR.js} +1 -1
- package/dist/component/{contacts-first-name-rac-BAecbeNQ.js → contacts-first-name-rac-C4_o2nwv.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Ccrw8BDa.js → contacts-last-name-rac-B3s96wWt.js} +1 -1
- package/dist/component/{contacts-phone-rac-DA2N033V.js → contacts-phone-rac-B5NZeYaI.js} +1 -1
- package/dist/component/{contacts-position-rac-0lAd-nCW.js → contacts-position-rac-CO4Bo4jG.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-DB2ssF-E.js → contacts-subscribe-rac-CWmo3C6c.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-B-Sn92Ho.js → contacts-tax-id-rac-pi_bJeA7.js} +1 -1
- package/dist/component/{date-availability-CtfWLvii.js → date-availability-DL8Xboob.js} +1 -1
- package/dist/component/date-input-field-rac-Di2pwVW7.js +365 -0
- package/dist/component/{date-input-rac-BnWwBe2i.js → date-input-rac-C5xC7fbz.js} +1 -1
- package/dist/component/date-picker-field-rac-DyPkuVVe.js +386 -0
- package/dist/component/{date-picker-rac-BhI6jOQE.js → date-picker-rac-CKNlOGZG.js} +1 -1
- package/dist/component/date-time-input-field-rac-Dk15pWyb.js +507 -0
- package/dist/component/{date-time-input-rac-DAbopLQt.js → date-time-input-rac-oOUelldq.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-D_HLv0tP.js → dext-checkbox-group-rac--jmNDOV2.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BnBTlqEI.js → dext-checkbox-rac-BOjbBRrg.js} +1 -1
- package/dist/component/{dext-date-picker-rac-Co_yfhuz.js → dext-date-picker-rac-CHi5TisB.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-BSpUehb2.js → dext-date-time-input-rac-CcF4ocHx.js} +1 -1
- package/dist/component/{dext-dropdown-rac-DPApx74L.js → dext-dropdown-rac-LLYhuGt_.js} +1 -1
- package/dist/component/{dext-email-rac-Dns6jFl4.js → dext-email-rac-CbC1crzT.js} +1 -1
- package/dist/component/{dext-number-input-rac-DfN-xRID.js → dext-number-input-rac-3-U9Hxre.js} +1 -1
- package/dist/component/{dext-phone-rac-b5Ix3aTQ.js → dext-phone-rac-CdMFXUNf.js} +1 -1
- package/dist/component/{dext-radio-group-rac-BAwIkDsJ.js → dext-radio-group-rac-Bg33r95T.js} +2 -2
- package/dist/component/{dext-rating-input-rac-mwQpCQUI.js → dext-rating-input-rac-DV8jA90b.js} +1 -1
- package/dist/component/{dext-tags-rac-BGmElgw8.js → dext-tags-rac-B-hpvZgE.js} +2 -2
- package/dist/component/{dext-text-area-rac-DN5HPqdg.js → dext-text-area-rac-kBBc0Xjo.js} +1 -1
- package/dist/component/{dext-text-input-rac-DEyDRhQ2.js → dext-text-input-rac-CImXblhX.js} +1 -1
- package/dist/component/{dext-url-input-rac-B1o3BAZE.js → dext-url-input-rac-J-7QABnD.js} +1 -1
- package/dist/component/dismiss-icon-Bw_zbdk_.js +69 -0
- package/dist/component/{donation-rac-Dp6PmATz.js → donation-rac-CvWwng6S.js} +6 -6
- package/dist/component/dropdown-field-rac-Dm9Qs8bh.js +40 -0
- package/dist/component/{dropdown-rac-eqQW-Z9k.js → dropdown-rac-BHqeUIje.js} +1 -1
- package/dist/component/{ecom-address-rac-Q02N1v6i.js → ecom-address-rac-NtuG7Q_T.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-CmqVje9n.js → ecom-subscription-checkbox-rac-DAJnX_RJ.js} +2 -2
- package/dist/component/{email-input-field-rac-HmrdF3g7.js → email-input-field-rac-ompvaCLM.js} +4 -4
- package/dist/component/{events-repeater-rac-BSML2My0.js → events-repeater-rac-kHEFBH7l.js} +6 -6
- package/dist/component/{events-rsvp-rac-0pI3cb2e.js → events-rsvp-rac-R4F9aw6y.js} +4 -4
- package/dist/component/{field-error-headless-B3U_Gymg.js → field-error-headless-o2u5ldAp.js} +1 -1
- package/dist/component/{field-label-headless-Cyy9_5qJ.js → field-label-headless-DvNWYzXc.js} +1 -1
- package/dist/component/field-rac.module-D0QzJXUv.js +32 -0
- package/dist/component/{file-upload-rac-hR9TZqk2.js → file-upload-rac-DlE4dp0D.js} +5 -5
- package/dist/component/{fixed-payment-rac-CghZp6bR.js → fixed-payment-rac-BxsFHhXP.js} +4 -4
- package/dist/component/{form-BmSV4tOz.js → form-Co7SkMqj.js} +1701 -1688
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-C7LDm89o.js → header-field-rac-D56CKAtM.js} +2 -2
- package/dist/component/{header-rac-BNNzF5wQ.js → header-rac-DdYSBcq1.js} +1 -1
- package/dist/component/{image-choice-rac-DLgxkKIZ.js → image-choice-rac-g23R5qLL.js} +5 -5
- package/dist/component/{index-Dg8Fefid.js → index-BmOwghzn.js} +2 -2
- package/dist/component/{index-B8ObIJtL.js → index-C0yPsVXz.js} +4 -4
- package/dist/component/{isObjectLike-oBQcCfqW.js → isObjectLike-mlNAmhLJ.js} +1 -1
- package/dist/component/multiline-address-field-rac-ApBLSWB_.js +1818 -0
- package/dist/component/{multiline-address-rac-8MZkKfqY.js → multiline-address-rac-tdENoXBT.js} +1 -1
- package/dist/component/native-select-BbxBpe3S.js +32 -0
- package/dist/component/{number-input-field-rac-Dmp8pNIq.js → number-input-field-rac-CCIuPPeP.js} +5 -5
- package/dist/component/{number-input-rac-2cN_bN_s.js → number-input-rac-DxodjaRb.js} +1 -1
- package/dist/component/{password-rac-CFdC1hoi.js → password-rac-h9U6siGg.js} +5 -5
- package/dist/component/{payment-input-rac-BWElGzuv.js → payment-input-rac-YFXgnLS6.js} +5 -5
- package/dist/component/phone-input-field-rac-B9PUQJUP.js +558 -0
- package/dist/component/{phone-rac-CE9-90C3.js → phone-rac-B1Q9HXAB.js} +1 -1
- package/dist/component/{product-list-rac-QU7Ocwvy.js → product-list-rac-D63k_IAW.js} +6 -6
- package/dist/component/{quiz-radio-group-rac-Hm7B7RlU.js → quiz-radio-group-rac-Bl6DYjmg.js} +1 -1
- package/dist/component/{radio-button-module-classes-CcGF7N_Y.js → radio-button-module-classes-BRHKk6XZ.js} +3 -3
- package/dist/component/{radio-group-field-rac-Bk1JBBts.js → radio-group-field-rac-B8yEmx79.js} +5 -5
- package/dist/component/{radio-group-rac-D_YZnpID.js → radio-group-rac-xX_sfxL0.js} +1 -1
- package/dist/component/{rating-input-field-rac-zvA6QBGo.js → rating-input-field-rac-_p1u5oCL.js} +5 -5
- package/dist/component/{rating-input-rac-CXVQUoi-.js → rating-input-rac-C_i6Nwdz.js} +1 -1
- package/dist/component/{rich-content-rac.module-CnZ4lMBG.js → rich-content-rac.module-BlHWoitq.js} +1 -1
- package/dist/component/{rich-text-field-rac-DYQgVXdV.js → rich-text-field-rac-EiH-NdJm.js} +2 -2
- package/dist/component/{rich-text-rac-Dk8396e-.js → rich-text-rac-eZvghmFV.js} +1 -1
- package/dist/component/service-dropdown-rac-bujnhWyl.js +150 -0
- package/dist/component/{services-multi-choice-rac-D1RiVaLW.js → services-multi-choice-rac-FXrJOBdY.js} +7 -7
- package/dist/component/{signature-rac-DcGKMX84.js → signature-rac-CoVHMOpK.js} +5 -5
- package/dist/component/{submit-button-rac-DbMxQlNH.js → submit-button-rac-B8w753Be.js} +36 -36
- package/dist/component/{tags-field-rac-Bi4lKutL.js → tags-field-rac-iitBlZ8l.js} +6 -6
- package/dist/component/{tags-rac-DDCPnT8M.js → tags-rac-DJSUQlkc.js} +1 -1
- package/dist/component/{text-area-field-rac-cre_K0MD.js → text-area-field-rac-CePWfCbx.js} +5 -5
- package/dist/component/{text-area-rac-61wsMj-j.js → text-area-rac-m18L6Zwk.js} +1 -1
- package/dist/component/{text-input-field-rac-CV5_ba0x.js → text-input-field-rac-BSo_dbkm.js} +4 -4
- package/dist/component/{text-input-headless-kRv3KpSL.js → text-input-headless-D-o9wyGb.js} +3 -3
- package/dist/component/{text-input-rac-CwqZ6NXO.js → text-input-rac-CcGgoWaF.js} +1 -1
- package/dist/component/time-input-rac-DRIFM107.js +212 -0
- package/dist/component/to-native-time-Co_gOLkc.js +9 -0
- package/dist/component/{url-input-field-rac-C1JL_m6D.js → url-input-field-rac-Dpn9-sDD.js} +5 -5
- package/dist/component/{url-input-rac-C1CiGrCn.js → url-input-rac-CDSl1LX1.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-COGEk5d6.js → use-dropdown-option-class-name-CHg44uaJ.js} +3 -3
- package/dist/component/use-dropdown-trigger-class-name-Dpwl6OCY.js +137 -0
- package/dist/component/{use-element-state-class-name-pSOX0Y0p.js → use-element-state-class-name-BUu6zq-d.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-DGEpOAdi.js → use-hoverable-input-class-name-B1V7zCNe.js} +3 -3
- package/dist/component/{use-is-forced-open-dropdown-DPG1e5E9.js → use-is-forced-open-dropdown-BbHOZTaj.js} +1 -1
- package/dist/component/use-native-mobile-input-Ct8ysLL3.js +31 -0
- package/dist/component/use-native-state-class-name-B0m2ghbS.js +18 -0
- package/dist/component/{use-service-options-base-BgIZ94V9.js → use-service-options-base-u-WCeJHQ.js} +1 -1
- package/dist/component/use-text-input-class-name-DfNU2oQf.js +6 -0
- package/package.json +3 -2
- package/dist/component/date-input-field-rac-CiAaOiYY.js +0 -309
- package/dist/component/date-picker-field-rac-Dg-chlTL.js +0 -320
- package/dist/component/date-time-input-field-rac-CbDvEPIp.js +0 -441
- package/dist/component/dropdown-field-rac-DY3GGJgP.js +0 -36
- package/dist/component/field-rac.module-DcyJyi2B.js +0 -25
- package/dist/component/multiline-address-field-rac-CgH7lDce.js +0 -1738
- package/dist/component/phone-input-field-rac-CsJGw_OE.js +0 -520
- package/dist/component/service-dropdown-rac-BSXYuBPJ.js +0 -145
- package/dist/component/time-input-rac-DuQar6zW.js +0 -161
- package/dist/component/use-dropdown-trigger-class-name-D6c-3Lyw.js +0 -98
- package/dist/component/use-text-input-class-name-BcbHdFV-.js +0 -6
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as ne } from "@wix/ricos/viewer";
|
|
2
|
-
import _ from "classnames";
|
|
3
|
-
import t, { useMemo as N, useState as $, useCallback as x, useRef as H } from "react";
|
|
4
|
-
import { UNSAFE_PortalProvider as re } from "react-aria";
|
|
5
|
-
import { ListBoxItem as se, Select as oe, TextField as z, SelectValue as le, Input as K } from "react-aria-components";
|
|
6
|
-
import { b4 as s, bN as D, bK as X, bF as U, bh as Q, bu as W, bY as P, bb as ce, bi as ie, bC as me, bP as V, u as de, X as ue, am as pe, w as Y, x as Ee, M as be, I as fe, v as _e, y as Ie, z as q } from "./form-BmSV4tOz.js";
|
|
7
|
-
import { f as p, a as B } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { g as De } from "./helpers-HmkkXrh2.js";
|
|
9
|
-
import { D as Oe, E as ge } from "./field-error-headless-B3U_Gymg.js";
|
|
10
|
-
import { L as he } from "./field-label-headless-Cyy9_5qJ.js";
|
|
11
|
-
import { F as Ne } from "./fieldset-headless-CD3fds9J.js";
|
|
12
|
-
import { N as Le, E as ye, S as Fe } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
-
import { u as Ce } from "./use-is-forced-open-dropdown-DPG1e5E9.js";
|
|
14
|
-
import { V as Te, a as Ae } from "./use-dropdown-option-class-name-COGEk5d6.js";
|
|
15
|
-
import { C as Pe } 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-DcyJyi2B.js";
|
|
19
|
-
import { u as v } from "./use-hoverable-input-class-name-DGEpOAdi.js";
|
|
20
|
-
const Se = {
|
|
21
|
-
[s.MONTH]: "bday-month",
|
|
22
|
-
[s.DAY]: "bday-day",
|
|
23
|
-
[s.YEAR]: "bday-year"
|
|
24
|
-
}, w = (e, a) => e === "bday" ? Se[a] : void 0, n = ({ children: e, className: a }) => {
|
|
25
|
-
const { id: r, required: o, onBlur: l, onFocus: c, FieldLayout: m } = D(), { inputId: i, labelId: d, ariaDescribedBy: u } = X(), { regionalFormat: E } = U(), f = N(() => Q(E).filter(W).map((S) => S.toUpperCase()), [
|
|
26
|
-
E
|
|
27
|
-
]), y = p(e, n.Label), R = p(e, n.Description), M = p(e, n.Error), O = {
|
|
28
|
-
[s.MONTH]: p(e, n.Month),
|
|
29
|
-
[s.DAY]: p(e, n.Day),
|
|
30
|
-
[s.YEAR]: p(e, n.Year)
|
|
31
|
-
};
|
|
32
|
-
return /* @__PURE__ */ t.createElement(m, {
|
|
33
|
-
fieldId: r,
|
|
34
|
-
renderLabel: () => B(y, {
|
|
35
|
-
as: "div"
|
|
36
|
-
}),
|
|
37
|
-
renderInput: () => /* @__PURE__ */ t.createElement(Ne, {
|
|
38
|
-
id: i,
|
|
39
|
-
ariaLabelledBy: d,
|
|
40
|
-
ariaDescribedBy: u,
|
|
41
|
-
required: o,
|
|
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, M, R)
|
|
47
|
-
});
|
|
48
|
-
}, g = ({ children: e, className: a }) => {
|
|
49
|
-
const { id: r, disabled: o, readOnly: l, showDateLabels: c, hidePlaceholder: m, autoComplete: i } = D(), { labelId: d } = h(s.MONTH), { partValue: u, partError: E, onPartChange: f } = L(s.MONTH), { t: y } = P(), [R, M] = $(!1), O = Ce(r), [S, j] = $(null), G = m ? ye : y("field.date.placeholder.month"), J = x((T) => {
|
|
50
|
-
l || f(typeof T == "string" ? T : "");
|
|
51
|
-
}, [
|
|
52
|
-
f,
|
|
53
|
-
l
|
|
54
|
-
]), Z = x((T) => {
|
|
55
|
-
M(T && !l);
|
|
56
|
-
}, [
|
|
57
|
-
l
|
|
58
|
-
]), ee = p(e, g.Label), te = p(e, g.Trigger), ae = p(e, g.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: j,
|
|
64
|
-
style: {
|
|
65
|
-
display: "contents"
|
|
66
|
-
}
|
|
67
|
-
}), /* @__PURE__ */ t.createElement(re, {
|
|
68
|
-
getContainer: () => S
|
|
69
|
-
}, /* @__PURE__ */ t.createElement(oe, {
|
|
70
|
-
autoComplete: w(i, s.MONTH),
|
|
71
|
-
"aria-labelledby": c ? d : void 0,
|
|
72
|
-
value: u || null,
|
|
73
|
-
onChange: J,
|
|
74
|
-
isDisabled: o,
|
|
75
|
-
isInvalid: E,
|
|
76
|
-
placeholder: G,
|
|
77
|
-
isOpen: O || R,
|
|
78
|
-
onOpenChange: O ? void 0 : Z
|
|
79
|
-
}, te, B(ae, {
|
|
80
|
-
isForcedOpen: O
|
|
81
|
-
}))));
|
|
82
|
-
}, Ye = ({ className: e }) => /* @__PURE__ */ t.createElement(k, {
|
|
83
|
-
datePart: s.MONTH,
|
|
84
|
-
className: e
|
|
85
|
-
}), ve = ({ children: e, className: a }) => {
|
|
86
|
-
const { id: r, readOnly: o } = D(), { inputId: l } = h(s.MONTH), { partError: c, isFirstPart: m } = L(s.MONTH), i = H(null);
|
|
87
|
-
return V(() => {
|
|
88
|
-
var d;
|
|
89
|
-
m && ((d = i.current) == null || d.focus({
|
|
90
|
-
preventScroll: !0
|
|
91
|
-
}));
|
|
92
|
-
}, r), /* @__PURE__ */ t.createElement(Fe, {
|
|
93
|
-
ref: i,
|
|
94
|
-
id: l,
|
|
95
|
-
className: a,
|
|
96
|
-
"data-hook": s.MONTH,
|
|
97
|
-
"data-invalid": c || void 0,
|
|
98
|
-
"data-readonly": o || void 0
|
|
99
|
-
}, /* @__PURE__ */ t.createElement(le, null), e);
|
|
100
|
-
}, A = ({ children: e, className: a, ...r }) => {
|
|
101
|
-
const { isForcedOpen: o } = r, { language: l } = U(), c = N(() => De(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(Te, {
|
|
109
|
-
isForcedOpen: o,
|
|
110
|
-
autoFocus: o ? !1 : void 0
|
|
111
|
-
}, c.map((i, d) => B(m, {
|
|
112
|
-
key: String(d + 1),
|
|
113
|
-
value: String(d + 1),
|
|
114
|
-
label: i
|
|
115
|
-
}))));
|
|
116
|
-
}, xe = ({ className: e, ...a }) => {
|
|
117
|
-
const { value: r, label: o } = a;
|
|
118
|
-
return /* @__PURE__ */ t.createElement(se, {
|
|
119
|
-
className: e,
|
|
120
|
-
id: r,
|
|
121
|
-
textValue: o
|
|
122
|
-
}, o);
|
|
123
|
-
};
|
|
124
|
-
g.Label = Ye;
|
|
125
|
-
g.Trigger = ve;
|
|
126
|
-
g.Options = A;
|
|
127
|
-
A.Option = xe;
|
|
128
|
-
const F = ({ children: e, className: a }) => {
|
|
129
|
-
const { disabled: r, readOnly: o, showDateLabels: l } = D(), { labelId: c } = h(s.DAY), { partValue: m, partError: i, onPartChange: d } = L(s.DAY), u = p(e, F.Label), E = p(e, F.Input);
|
|
130
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
131
|
-
className: a,
|
|
132
|
-
"data-date-field": !0
|
|
133
|
-
}, l && u, /* @__PURE__ */ t.createElement(z, {
|
|
134
|
-
"aria-labelledby": l ? c : void 0,
|
|
135
|
-
value: m,
|
|
136
|
-
onChange: d,
|
|
137
|
-
isDisabled: r,
|
|
138
|
-
isReadOnly: o,
|
|
139
|
-
isInvalid: i
|
|
140
|
-
}, E));
|
|
141
|
-
}, He = ({ className: e }) => /* @__PURE__ */ t.createElement(k, {
|
|
142
|
-
datePart: s.DAY,
|
|
143
|
-
className: e
|
|
144
|
-
}), Ue = ({ className: e }) => {
|
|
145
|
-
const { id: a, hidePlaceholder: r, autoComplete: o } = D(), { inputId: l } = h(s.DAY), { isFirstPart: c } = L(s.DAY), { t: m } = P(), i = H(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(K, {
|
|
152
|
-
ref: i,
|
|
153
|
-
id: l,
|
|
154
|
-
className: e,
|
|
155
|
-
placeholder: d,
|
|
156
|
-
autoComplete: w(o, s.DAY),
|
|
157
|
-
maxLength: 2,
|
|
158
|
-
inputMode: "numeric",
|
|
159
|
-
"data-hook": s.DAY
|
|
160
|
-
});
|
|
161
|
-
};
|
|
162
|
-
F.Label = He;
|
|
163
|
-
F.Input = Ue;
|
|
164
|
-
const C = ({ children: e, className: a }) => {
|
|
165
|
-
const { disabled: r, readOnly: o, showDateLabels: l } = D(), { labelId: c } = h(s.YEAR), { partValue: m, partError: i, onPartChange: d } = L(s.YEAR), u = p(e, C.Label), E = p(e, C.Input);
|
|
166
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
167
|
-
className: a,
|
|
168
|
-
"data-date-field": !0
|
|
169
|
-
}, l && u, /* @__PURE__ */ t.createElement(z, {
|
|
170
|
-
"aria-labelledby": l ? c : void 0,
|
|
171
|
-
value: m,
|
|
172
|
-
onChange: d,
|
|
173
|
-
isDisabled: r,
|
|
174
|
-
isReadOnly: o,
|
|
175
|
-
isInvalid: i
|
|
176
|
-
}, E));
|
|
177
|
-
}, Ve = ({ className: e }) => /* @__PURE__ */ t.createElement(k, {
|
|
178
|
-
datePart: s.YEAR,
|
|
179
|
-
className: e
|
|
180
|
-
}), Be = ({ className: e }) => {
|
|
181
|
-
const { id: a, hidePlaceholder: r, autoComplete: o } = D(), { inputId: l } = h(s.YEAR), { isFirstPart: c } = L(s.YEAR), { t: m } = P(), i = H(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(K, {
|
|
188
|
-
ref: i,
|
|
189
|
-
id: l,
|
|
190
|
-
className: e,
|
|
191
|
-
placeholder: d,
|
|
192
|
-
autoComplete: w(o, s.YEAR),
|
|
193
|
-
maxLength: 4,
|
|
194
|
-
inputMode: "numeric",
|
|
195
|
-
"data-hook": s.YEAR
|
|
196
|
-
});
|
|
197
|
-
};
|
|
198
|
-
C.Label = Ve;
|
|
199
|
-
C.Input = Be;
|
|
200
|
-
n.Label = he;
|
|
201
|
-
n.Month = g;
|
|
202
|
-
n.Day = F;
|
|
203
|
-
n.Year = C;
|
|
204
|
-
n.Description = Oe;
|
|
205
|
-
n.Error = ge;
|
|
206
|
-
function h(e) {
|
|
207
|
-
const { inputId: a } = X();
|
|
208
|
-
return N(() => {
|
|
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 L(e) {
|
|
220
|
-
const { value: a, onChange: r, hasError: o = !1 } = D(), { regionalFormat: l } = U(), c = N(() => ce(a ?? ""), [
|
|
221
|
-
a
|
|
222
|
-
]), m = N(() => ie(o, a ?? ""), [
|
|
223
|
-
a,
|
|
224
|
-
o
|
|
225
|
-
]), i = c[e] || "", d = x((E) => {
|
|
226
|
-
const f = me(E, e, c);
|
|
227
|
-
r(f);
|
|
228
|
-
}, [
|
|
229
|
-
r,
|
|
230
|
-
c,
|
|
231
|
-
e
|
|
232
|
-
]), u = N(() => Q(l).filter(W).map((y) => y.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: o } = h(e), { t: l } = P(), c = `field.date.label.${e.toLowerCase()}`, m = l(c);
|
|
245
|
-
return /* @__PURE__ */ t.createElement("label", {
|
|
246
|
-
id: o,
|
|
247
|
-
htmlFor: r,
|
|
248
|
-
className: a
|
|
249
|
-
}, m);
|
|
250
|
-
}
|
|
251
|
-
const we = "_fields_b2cgx_1", ke = "_month_b2cgx_10", $e = "_day_b2cgx_11", qe = "_year_b2cgx_12", ze = "_dayInput_b2cgx_28", Ke = "_yearInput_b2cgx_29", Xe = "_monthTrigger_b2cgx_33", Qe = "_monthOption_b2cgx_53", I = {
|
|
252
|
-
fields: we,
|
|
253
|
-
month: ke,
|
|
254
|
-
day: $e,
|
|
255
|
-
year: qe,
|
|
256
|
-
dayInput: ze,
|
|
257
|
-
yearInput: Ke,
|
|
258
|
-
monthTrigger: Xe,
|
|
259
|
-
monthOption: Qe
|
|
260
|
-
}, We = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ne, {
|
|
261
|
-
content: e,
|
|
262
|
-
locale: a
|
|
263
|
-
}), bt = () => {
|
|
264
|
-
const e = v(_e, [
|
|
265
|
-
I.monthTrigger
|
|
266
|
-
]), a = Ae(Ie, I.monthOption, Me), r = v(q, [
|
|
267
|
-
I.dayInput
|
|
268
|
-
]), o = v(q, [
|
|
269
|
-
I.yearInput
|
|
270
|
-
]);
|
|
271
|
-
return /* @__PURE__ */ t.createElement(n, {
|
|
272
|
-
className: _(de, I.fields)
|
|
273
|
-
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
274
|
-
className: _(ue, b.label)
|
|
275
|
-
}, /* @__PURE__ */ t.createElement(n.Label.Required, {
|
|
276
|
-
className: _(pe, b.requiredMark)
|
|
277
|
-
})), /* @__PURE__ */ t.createElement(n.Month, {
|
|
278
|
-
className: I.month
|
|
279
|
-
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
280
|
-
className: _(Y, b.label)
|
|
281
|
-
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
282
|
-
className: e
|
|
283
|
-
}, /* @__PURE__ */ t.createElement(Pe, {
|
|
284
|
-
className: b.dropdownIcon
|
|
285
|
-
})), /* @__PURE__ */ t.createElement(n.Month.Options, {
|
|
286
|
-
className: _(Ee, b.selectPopover, b.dropdownPopover)
|
|
287
|
-
}, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
|
|
288
|
-
className: a
|
|
289
|
-
}))), /* @__PURE__ */ t.createElement(n.Day, {
|
|
290
|
-
className: I.day
|
|
291
|
-
}, /* @__PURE__ */ t.createElement(n.Day.Label, {
|
|
292
|
-
className: _(Y, b.label)
|
|
293
|
-
}), /* @__PURE__ */ t.createElement(n.Day.Input, {
|
|
294
|
-
className: r
|
|
295
|
-
})), /* @__PURE__ */ t.createElement(n.Year, {
|
|
296
|
-
className: I.year
|
|
297
|
-
}, /* @__PURE__ */ t.createElement(n.Year.Label, {
|
|
298
|
-
className: _(Y, b.label)
|
|
299
|
-
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
300
|
-
className: o
|
|
301
|
-
})), /* @__PURE__ */ t.createElement(n.Error, {
|
|
302
|
-
className: _(be, b.error)
|
|
303
|
-
}, /* @__PURE__ */ t.createElement(Re, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
304
|
-
className: _(fe, b.description)
|
|
305
|
-
}, We));
|
|
306
|
-
};
|
|
307
|
-
export {
|
|
308
|
-
bt as D
|
|
309
|
-
};
|
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as J } from "@wix/ricos/viewer";
|
|
2
|
-
import p from "classnames";
|
|
3
|
-
import e, { useState as L, useCallback as k, useContext as ee, useRef as P, useMemo as v } from "react";
|
|
4
|
-
import { parseDate as te } from "@internationalized/date";
|
|
5
|
-
import { UNSAFE_PortalProvider as re } from "react-aria";
|
|
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 M, Select as x, SelectValue as Y, ListBox as w, ListBoxItem as B } from "react-aria-components";
|
|
7
|
-
import { D as f, bN as N, bK as U, bF as F, bP as pe, X as fe, am as De, H as Ce, M as ye, I as Se, G as _e } from "./form-BmSV4tOz.js";
|
|
8
|
-
import { g as Ne, c as A } from "./calendar.module-BMUyMVja.js";
|
|
9
|
-
import { f as E, a as _ } from "./find-child-C60k4CxG.js";
|
|
10
|
-
import { D as he, E as Te } from "./field-error-headless-B3U_Gymg.js";
|
|
11
|
-
import { L as be } from "./field-label-headless-Cyy9_5qJ.js";
|
|
12
|
-
import { D as ve, N as O, S as V } from "./non-modal-popover-D-u13tmp.js";
|
|
13
|
-
import { a as Ie } from "./use-is-forced-open-dropdown-DPG1e5E9.js";
|
|
14
|
-
import { i as Fe } from "./date-availability-CtfWLvii.js";
|
|
15
|
-
import { C as I } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
|
-
import { E as Oe } from "./error-icon-hZxQ6DEy.js";
|
|
17
|
-
import { H as Le } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
-
import { s as D } from "./field-rac.module-DcyJyi2B.js";
|
|
19
|
-
import { u as Pe } from "./use-hoverable-input-class-name-DGEpOAdi.js";
|
|
20
|
-
const Ae = [
|
|
21
|
-
f.SUNDAY,
|
|
22
|
-
f.MONDAY,
|
|
23
|
-
f.TUESDAY,
|
|
24
|
-
f.WEDNESDAY,
|
|
25
|
-
f.THURSDAY,
|
|
26
|
-
f.FRIDAY,
|
|
27
|
-
f.SATURDAY
|
|
28
|
-
], Re = {
|
|
29
|
-
availableDays: Ae
|
|
30
|
-
}, a = ({ children: t }) => {
|
|
31
|
-
const { id: r, value: l, onChange: n, disabled: i, required: c, onBlur: u, onFocus: o, FieldLayout: m, hasError: d, readOnly: C } = N(), { labelId: y } = U(), { regionalFormat: h } = F(), [s, T] = L(null), [K, H] = L(!1), b = Ie(r), W = k((Z) => {
|
|
32
|
-
const z = We(Z);
|
|
33
|
-
n(z);
|
|
34
|
-
}, [
|
|
35
|
-
n
|
|
36
|
-
]), $ = E(t, a.Label), q = E(t, a.Control), G = E(t, a.Calendar), j = E(t, a.Description), Q = E(t, a.Error), X = He(l);
|
|
37
|
-
return /* @__PURE__ */ e.createElement(m, {
|
|
38
|
-
fieldId: r,
|
|
39
|
-
renderLabel: () => $,
|
|
40
|
-
renderInput: () => /* @__PURE__ */ e.createElement(ae, {
|
|
41
|
-
locale: h
|
|
42
|
-
}, /* @__PURE__ */ e.createElement("div", {
|
|
43
|
-
ref: T,
|
|
44
|
-
style: {
|
|
45
|
-
display: "contents"
|
|
46
|
-
}
|
|
47
|
-
}), /* @__PURE__ */ e.createElement(re, {
|
|
48
|
-
getContainer: () => s
|
|
49
|
-
}, /* @__PURE__ */ e.createElement(ne, {
|
|
50
|
-
"aria-labelledby": y,
|
|
51
|
-
value: X,
|
|
52
|
-
onChange: W,
|
|
53
|
-
isDisabled: i,
|
|
54
|
-
isInvalid: d,
|
|
55
|
-
isReadOnly: C,
|
|
56
|
-
isRequired: c,
|
|
57
|
-
onBlur: u,
|
|
58
|
-
onFocus: o,
|
|
59
|
-
isOpen: b || K,
|
|
60
|
-
onOpenChange: b ? void 0 : H
|
|
61
|
-
}, q, _(G, {
|
|
62
|
-
isForcedOpen: b
|
|
63
|
-
})))),
|
|
64
|
-
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, Q, j)
|
|
65
|
-
});
|
|
66
|
-
}, ke = ({ children: t, className: r }) => {
|
|
67
|
-
const { inputId: l, ariaDescribedBy: n } = U(), { hasError: i, disabled: c, readOnly: u } = N(), o = ee(le), m = k((d) => {
|
|
68
|
-
if (!o || o.isOpen || c || u)
|
|
69
|
-
return;
|
|
70
|
-
const C = d.target;
|
|
71
|
-
if (C.closest("button"))
|
|
72
|
-
return;
|
|
73
|
-
const y = C.closest("[data-type]");
|
|
74
|
-
y && y.getAttribute("data-type") !== "literal" || o.setOpen(!0);
|
|
75
|
-
}, [
|
|
76
|
-
o,
|
|
77
|
-
c,
|
|
78
|
-
u
|
|
79
|
-
]);
|
|
80
|
-
return /* @__PURE__ */ e.createElement(oe, {
|
|
81
|
-
id: l,
|
|
82
|
-
"aria-describedby": n,
|
|
83
|
-
className: r,
|
|
84
|
-
"data-invalid": i,
|
|
85
|
-
onClick: m
|
|
86
|
-
}, t);
|
|
87
|
-
}, Me = ({ className: t }) => {
|
|
88
|
-
const { id: r, placeholder: l } = N(), { regionalFormat: n } = F(), i = P(null), c = P(!1);
|
|
89
|
-
pe(() => {
|
|
90
|
-
var o;
|
|
91
|
-
(o = i.current) == null || o.focus({
|
|
92
|
-
preventScroll: !0
|
|
93
|
-
});
|
|
94
|
-
}, r);
|
|
95
|
-
const u = v(() => $e(n), [
|
|
96
|
-
n
|
|
97
|
-
]);
|
|
98
|
-
return /* @__PURE__ */ e.createElement(se, {
|
|
99
|
-
className: t,
|
|
100
|
-
"data-placeholder-hidden": !l || void 0
|
|
101
|
-
}, (o) => {
|
|
102
|
-
const m = o.type === u && o.isPlaceholder && !!l;
|
|
103
|
-
return /* @__PURE__ */ e.createElement(ce, {
|
|
104
|
-
segment: o,
|
|
105
|
-
"data-first-segment": m || void 0,
|
|
106
|
-
ref: (d) => {
|
|
107
|
-
if (!d && c.current) {
|
|
108
|
-
i.current = null, c.current = !1;
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
if (d && !c.current) {
|
|
112
|
-
i.current = d, c.current = !0;
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}, (d) => !d.isPlaceholder || !l ? d.text : m ? l : d.text);
|
|
117
|
-
});
|
|
118
|
-
}, xe = ({ children: t, className: r }) => /* @__PURE__ */ e.createElement(ve, {
|
|
119
|
-
className: r
|
|
120
|
-
}, t), g = ({ children: t, className: r, ...l }) => {
|
|
121
|
-
const { isForcedOpen: n } = l, { regionalFormat: i } = F(), { availability: c } = N(), u = v(() => Ne(i), [
|
|
122
|
-
i
|
|
123
|
-
]), o = v(() => (s) => {
|
|
124
|
-
const T = new Date(s.year, s.month - 1, s.day);
|
|
125
|
-
return !Fe(T, c || Re);
|
|
126
|
-
}, [
|
|
127
|
-
c
|
|
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), h = E(t, g.YearTrigger);
|
|
129
|
-
return /* @__PURE__ */ e.createElement(O, {
|
|
130
|
-
className: r,
|
|
131
|
-
containerPadding: 0
|
|
132
|
-
}, /* @__PURE__ */ e.createElement(Ye, {
|
|
133
|
-
isForcedOpen: n
|
|
134
|
-
}, /* @__PURE__ */ e.createElement(ie, {
|
|
135
|
-
autoFocus: n ? !1 : void 0,
|
|
136
|
-
firstDayOfWeek: qe(u),
|
|
137
|
-
isDateUnavailable: o
|
|
138
|
-
}, /* @__PURE__ */ e.createElement("header", null, d, /* @__PURE__ */ e.createElement(me, null, (s) => _(y, {
|
|
139
|
-
ariaLabel: s["aria-label"],
|
|
140
|
-
selectedKey: s.value,
|
|
141
|
-
onSelectionChange: s.onChange,
|
|
142
|
-
items: s.items,
|
|
143
|
-
popoverClassName: r
|
|
144
|
-
})), /* @__PURE__ */ e.createElement(de, {
|
|
145
|
-
visibleYears: 100
|
|
146
|
-
}, (s) => _(h, {
|
|
147
|
-
ariaLabel: s["aria-label"],
|
|
148
|
-
selectedKey: s.value,
|
|
149
|
-
onSelectionChange: s.onChange,
|
|
150
|
-
items: s.items,
|
|
151
|
-
popoverClassName: r
|
|
152
|
-
})), C), /* @__PURE__ */ e.createElement(ue, {
|
|
153
|
-
weekdayStyle: "short"
|
|
154
|
-
}, (s) => _(m, {
|
|
155
|
-
date: s
|
|
156
|
-
})))));
|
|
157
|
-
}, Ye = ({ isForcedOpen: t, children: r }) => t ? /* @__PURE__ */ e.createElement("div", {
|
|
158
|
-
role: "dialog"
|
|
159
|
-
}, r) : /* @__PURE__ */ e.createElement(ge, null, r), we = ({ children: t, className: r, ...l }) => {
|
|
160
|
-
const { date: n } = l;
|
|
161
|
-
return /* @__PURE__ */ e.createElement(Ee, {
|
|
162
|
-
className: r,
|
|
163
|
-
date: n
|
|
164
|
-
}, t);
|
|
165
|
-
}, Be = ({ children: t, className: r }) => /* @__PURE__ */ e.createElement(M, {
|
|
166
|
-
slot: "previous",
|
|
167
|
-
className: r
|
|
168
|
-
}, t), Ue = ({ children: t, className: r }) => /* @__PURE__ */ e.createElement(M, {
|
|
169
|
-
slot: "next",
|
|
170
|
-
className: r
|
|
171
|
-
}, t), Ve = ({ children: t, className: r, ...l }) => {
|
|
172
|
-
const { ariaLabel: n, selectedKey: i, onSelectionChange: c, items: u, popoverClassName: o } = l;
|
|
173
|
-
return /* @__PURE__ */ e.createElement(x, {
|
|
174
|
-
"aria-label": n,
|
|
175
|
-
selectedKey: i,
|
|
176
|
-
onSelectionChange: c
|
|
177
|
-
}, /* @__PURE__ */ e.createElement(V, {
|
|
178
|
-
className: r
|
|
179
|
-
}, /* @__PURE__ */ e.createElement(Y, null), t), /* @__PURE__ */ e.createElement(O, {
|
|
180
|
-
className: o,
|
|
181
|
-
containerPadding: 0
|
|
182
|
-
}, /* @__PURE__ */ e.createElement(w, {
|
|
183
|
-
items: u
|
|
184
|
-
}, (m) => /* @__PURE__ */ e.createElement(B, {
|
|
185
|
-
id: m.id
|
|
186
|
-
}, m.formatted))));
|
|
187
|
-
}, Ke = ({ children: t, className: r, ...l }) => {
|
|
188
|
-
const { ariaLabel: n, selectedKey: i, onSelectionChange: c, items: u, popoverClassName: o } = l;
|
|
189
|
-
return /* @__PURE__ */ e.createElement(x, {
|
|
190
|
-
"aria-label": n,
|
|
191
|
-
selectedKey: i,
|
|
192
|
-
onSelectionChange: c
|
|
193
|
-
}, /* @__PURE__ */ e.createElement(V, {
|
|
194
|
-
className: r
|
|
195
|
-
}, /* @__PURE__ */ e.createElement(Y, null), t), /* @__PURE__ */ e.createElement(O, {
|
|
196
|
-
className: o,
|
|
197
|
-
containerPadding: 0
|
|
198
|
-
}, /* @__PURE__ */ e.createElement(w, {
|
|
199
|
-
items: u
|
|
200
|
-
}, (m) => /* @__PURE__ */ e.createElement(B, {
|
|
201
|
-
id: m.id
|
|
202
|
-
}, m.formatted))));
|
|
203
|
-
};
|
|
204
|
-
g.Day = we;
|
|
205
|
-
g.PreviousTrigger = Be;
|
|
206
|
-
g.NextTrigger = Ue;
|
|
207
|
-
g.MonthTrigger = Ve;
|
|
208
|
-
g.YearTrigger = Ke;
|
|
209
|
-
a.Label = be;
|
|
210
|
-
a.Control = ke;
|
|
211
|
-
a.Input = Me;
|
|
212
|
-
a.Trigger = xe;
|
|
213
|
-
a.Calendar = g;
|
|
214
|
-
a.Description = he;
|
|
215
|
-
a.Error = Te;
|
|
216
|
-
function He(t) {
|
|
217
|
-
if (!t)
|
|
218
|
-
return null;
|
|
219
|
-
try {
|
|
220
|
-
return te(t);
|
|
221
|
-
} catch {
|
|
222
|
-
return null;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
function We(t) {
|
|
226
|
-
if (!t)
|
|
227
|
-
return null;
|
|
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
|
-
}
|
|
231
|
-
function $e(t) {
|
|
232
|
-
var r;
|
|
233
|
-
try {
|
|
234
|
-
return ((r = new Intl.DateTimeFormat(t, {
|
|
235
|
-
year: "numeric",
|
|
236
|
-
month: "2-digit",
|
|
237
|
-
day: "2-digit"
|
|
238
|
-
}).formatToParts(/* @__PURE__ */ new Date()).find((n) => n.type !== "literal")) == null ? void 0 : r.type) ?? "month";
|
|
239
|
-
} catch {
|
|
240
|
-
return "month";
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
function qe(t) {
|
|
244
|
-
return [
|
|
245
|
-
"sun",
|
|
246
|
-
"mon",
|
|
247
|
-
"tue",
|
|
248
|
-
"wed",
|
|
249
|
-
"thu",
|
|
250
|
-
"fri",
|
|
251
|
-
"sat"
|
|
252
|
-
][t] || "mon";
|
|
253
|
-
}
|
|
254
|
-
const Ge = (t) => /* @__PURE__ */ e.createElement("svg", {
|
|
255
|
-
viewBox: "0 0 24 24",
|
|
256
|
-
fill: "none",
|
|
257
|
-
width: 14,
|
|
258
|
-
height: 14,
|
|
259
|
-
"aria-hidden": "true",
|
|
260
|
-
...t
|
|
261
|
-
}, /* @__PURE__ */ e.createElement("path", {
|
|
262
|
-
d: "M7 2v2M17 2v2M3 8h18M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2Z",
|
|
263
|
-
stroke: "currentColor",
|
|
264
|
-
strokeWidth: "1.5",
|
|
265
|
-
strokeLinecap: "round",
|
|
266
|
-
strokeLinejoin: "round"
|
|
267
|
-
})), je = "_control_1le52_1", Qe = "_segments_1le52_14", Xe = "_trigger_1le52_72", Ze = "_calendarPopover_1le52_103 _textOnFillOptions_vf5u1_8", ze = "_calendarDay_1le52_246", Je = "_dayNumber_1le52_253", S = {
|
|
268
|
-
control: je,
|
|
269
|
-
segments: Qe,
|
|
270
|
-
trigger: Xe,
|
|
271
|
-
calendarPopover: Ze,
|
|
272
|
-
calendarDay: ze,
|
|
273
|
-
dayNumber: Je
|
|
274
|
-
}, et = ({ content: t, locale: r }) => /* @__PURE__ */ e.createElement(J, {
|
|
275
|
-
content: t,
|
|
276
|
-
locale: r
|
|
277
|
-
}), tt = {
|
|
278
|
-
left: 90,
|
|
279
|
-
right: -90
|
|
280
|
-
}, R = ({ direction: t }) => /* @__PURE__ */ e.createElement(I, {
|
|
281
|
-
style: {
|
|
282
|
-
transform: `rotate(${tt[t]}deg)`
|
|
283
|
-
}
|
|
284
|
-
}), _t = () => {
|
|
285
|
-
const t = Pe(_e, [
|
|
286
|
-
S.control
|
|
287
|
-
]);
|
|
288
|
-
return /* @__PURE__ */ e.createElement(a, null, /* @__PURE__ */ e.createElement(a.Label, {
|
|
289
|
-
className: p(fe, D.label)
|
|
290
|
-
}, /* @__PURE__ */ e.createElement(a.Label.Required, {
|
|
291
|
-
className: p(De, D.requiredMark)
|
|
292
|
-
})), /* @__PURE__ */ e.createElement(a.Control, {
|
|
293
|
-
className: t
|
|
294
|
-
}, /* @__PURE__ */ e.createElement(a.Trigger, {
|
|
295
|
-
className: S.trigger
|
|
296
|
-
}, /* @__PURE__ */ e.createElement(Ge, null)), /* @__PURE__ */ e.createElement(a.Input, {
|
|
297
|
-
className: S.segments
|
|
298
|
-
})), /* @__PURE__ */ e.createElement(a.Calendar, {
|
|
299
|
-
className: p(Ce, D.selectPopover, S.calendarPopover)
|
|
300
|
-
}, /* @__PURE__ */ e.createElement(a.Calendar.PreviousTrigger, null, /* @__PURE__ */ e.createElement(R, {
|
|
301
|
-
direction: "left"
|
|
302
|
-
})), /* @__PURE__ */ e.createElement(a.Calendar.MonthTrigger, null, /* @__PURE__ */ e.createElement(I, {
|
|
303
|
-
className: D.dropdownIcon
|
|
304
|
-
})), /* @__PURE__ */ e.createElement(a.Calendar.YearTrigger, null, /* @__PURE__ */ e.createElement(I, {
|
|
305
|
-
className: D.dropdownIcon
|
|
306
|
-
})), /* @__PURE__ */ e.createElement(a.Calendar.NextTrigger, null, /* @__PURE__ */ e.createElement(R, {
|
|
307
|
-
direction: "right"
|
|
308
|
-
})), /* @__PURE__ */ e.createElement(a.Calendar.Day, {
|
|
309
|
-
className: p(Le, A.day, S.calendarDay)
|
|
310
|
-
}, ({ formattedDate: r }) => /* @__PURE__ */ e.createElement("span", {
|
|
311
|
-
className: p(A.dayNumber, S.dayNumber)
|
|
312
|
-
}, r))), /* @__PURE__ */ e.createElement(a.Error, {
|
|
313
|
-
className: p(ye, D.error)
|
|
314
|
-
}, /* @__PURE__ */ e.createElement(Oe, null), /* @__PURE__ */ e.createElement(a.Error.Text, null)), /* @__PURE__ */ e.createElement(a.Description, {
|
|
315
|
-
className: p(Se, D.description)
|
|
316
|
-
}, et));
|
|
317
|
-
};
|
|
318
|
-
export {
|
|
319
|
-
_t as D
|
|
320
|
-
};
|