@wix/form-elements 1.93.0 → 1.95.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-bw0pvoxP.js → appointment-rac-mhQIjy3A.js} +310 -311
- package/dist/component/{bookings-address-rac-DECq7eWR.js → bookings-address-rac-pcZeAN2d.js} +1 -1
- package/dist/component/{bookings-email-rac-DTLjh6Zw.js → bookings-email-rac-BHdvWhcv.js} +1 -1
- package/dist/component/{bookings-first-name-rac-DObRe-Gq.js → bookings-first-name-rac-mPNuMBGo.js} +1 -1
- package/dist/component/{bookings-header-rac-DjpmYRJG.js → bookings-header-rac-CUzR91gM.js} +1 -1
- package/dist/component/{bookings-last-name-rac-Ds3o0ABM.js → bookings-last-name-rac-q2bsOPke.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-DPUL2jWj.js → bookings-login-bar-rac-BpwVjQwz.js} +4 -4
- package/dist/component/{bookings-phone-rac-DIIHPxEP.js → bookings-phone-rac-DWdDpi-n.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-BrcQO9xx.js → bookings-rich-text-rac-CZnGLPwv.js} +1 -1
- package/dist/component/{get-first-day-of-the-week-DvnsxYhQ.js → calendar.module-DnhTT4QT.js} +23 -18
- package/dist/component/{checkbox-field-rac-CD1MP1LT.js → checkbox-field-rac-DRVjITJ_.js} +7 -7
- package/dist/component/{checkbox-group-field-headless-C0V6zq0u.js → checkbox-group-field-headless-CKXgbUdv.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-B-MYpz53.js → checkbox-group-field-rac-Dt3yWmua.js} +14 -14
- package/dist/component/{checkbox-group-rac-BejQjiO2.js → checkbox-group-rac-BTFoDjxn.js} +1 -1
- package/dist/component/{checkbox-indicator-module-classes-mJ7hl_8K.js → checkbox-indicator-module-classes-DhbNznSB.js} +1 -1
- package/dist/component/{checkbox-rac-B0YgCj29.js → checkbox-rac-Crn5HP7E.js} +1 -1
- package/dist/component/{contacts-address-rac-B1QNl3Lb.js → contacts-address-rac-c1zfBJgx.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-Cp-gh3P-.js → contacts-birthdate-rac-BaaSPZgO.js} +1 -1
- package/dist/component/{contacts-company-rac-CSCU7JGm.js → contacts-company-rac-CzuRjr1D.js} +1 -1
- package/dist/component/{contacts-email-rac-B1Oov6-3.js → contacts-email-rac-hL98o3x4.js} +1 -1
- package/dist/component/{contacts-first-name-rac-rsHIOcjr.js → contacts-first-name-rac-BXTnd1aU.js} +1 -1
- package/dist/component/{contacts-last-name-rac-Csgq53Wm.js → contacts-last-name-rac-DYjmWO4_.js} +1 -1
- package/dist/component/{contacts-phone-rac-r9SwjDZ4.js → contacts-phone-rac-KMnorQhu.js} +1 -1
- package/dist/component/{contacts-position-rac-D7VcCM7v.js → contacts-position-rac-ylzvuGhD.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-8Nu9ncZW.js → contacts-subscribe-rac-Bi3ZazuW.js} +2 -2
- package/dist/component/{contacts-tax-id-rac-CL_JSl_W.js → contacts-tax-id-rac-C01LkO1D.js} +1 -1
- package/dist/component/{date-availability-DLOKY9C4.js → date-availability-BXwnYCBt.js} +1 -1
- package/dist/component/{date-input-field-rac-D23Al-Mr.js → date-input-field-rac-BMdPQoFk.js} +58 -57
- package/dist/component/{date-input-rac-B6zgkw-L.js → date-input-rac-D2mDdJ_4.js} +1 -1
- package/dist/component/date-picker-field-rac-7gyRMkPp.js +317 -0
- package/dist/component/{date-picker-rac-C7g6aceb.js → date-picker-rac-FyNcNbTc.js} +1 -1
- package/dist/component/{date-time-input-field-rac-BENzf6gc.js → date-time-input-field-rac-BTjqn_g-.js} +54 -53
- package/dist/component/{date-time-input-rac-CVpK3mgw.js → date-time-input-rac-C81cN7rJ.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-CbEFDD3H.js → dext-checkbox-group-rac-DAjQPdi_.js} +2 -2
- package/dist/component/{dext-checkbox-rac-BdtZvn6I.js → dext-checkbox-rac-DVt9mAXM.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BAhFvUEx.js → dext-date-picker-rac-BnaExh1i.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-iXMKMwQY.js → dext-date-time-input-rac-DPAW4eBA.js} +1 -1
- package/dist/component/{dext-dropdown-rac-D-NPziZS.js → dext-dropdown-rac-P9T1vh24.js} +1 -1
- package/dist/component/{dext-email-rac-DYSwyB80.js → dext-email-rac-BfEuFGaV.js} +1 -1
- package/dist/component/{dext-number-input-rac-DXx8hgFg.js → dext-number-input-rac-B5eN2rLP.js} +1 -1
- package/dist/component/{dext-phone-rac-BtuLROzm.js → dext-phone-rac-DA-h_tpZ.js} +1 -1
- package/dist/component/{dext-radio-group-rac-MdKNiJ2i.js → dext-radio-group-rac-BjpkApRr.js} +2 -2
- package/dist/component/{dext-rating-input-rac-d998xond.js → dext-rating-input-rac-DUMRW9uI.js} +1 -1
- package/dist/component/{dext-tags-rac-DnSpOM9T.js → dext-tags-rac-s0WchM4X.js} +2 -2
- package/dist/component/{dext-text-area-rac-KqjeDDWe.js → dext-text-area-rac-BRMsiGEH.js} +1 -1
- package/dist/component/{dext-text-input-rac-CtCnClfX.js → dext-text-input-rac-BBZi3D8V.js} +1 -1
- package/dist/component/{dext-url-input-rac-DSJQcLLr.js → dext-url-input-rac-jKMWbCGB.js} +1 -1
- package/dist/component/{donation-rac-B_KGkBgo.js → donation-rac-DyeKbodo.js} +30 -30
- package/dist/component/{dropdown-field-headless-BUilB8wZ.js → dropdown-field-headless-BK8BN3u4.js} +4 -4
- package/dist/component/{dropdown-field-rac-COupYC1a.js → dropdown-field-rac-B6yzL_R0.js} +6 -6
- package/dist/component/{dropdown-rac-Dj0UZrE0.js → dropdown-rac-CQaMpex2.js} +1 -1
- package/dist/component/{ecom-address-rac-C0xnn86e.js → ecom-address-rac-DQr3-QeV.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-D-ekxwUE.js → ecom-subscription-checkbox-rac-CZ-pj21A.js} +3 -3
- package/dist/component/{email-input-field-rac-DVj1qz_R.js → email-input-field-rac-Vp0YfQOe.js} +41 -41
- package/dist/component/{events-repeater-rac-U0aq9Z4Q.js → events-repeater-rac-BPE4Hn_G.js} +6 -6
- package/dist/component/{events-rsvp-rac-C7J58_5q.js → events-rsvp-rac-u_BDmDJ2.js} +21 -21
- package/dist/component/{field-error-headless-2nYJ2792.js → field-error-headless-BOlFtckJ.js} +1 -1
- package/dist/component/{field-label-headless-D97ACnmc.js → field-label-headless-Dx3VrM-U.js} +1 -1
- package/dist/component/field-rac.module-DobpyqOd.js +26 -0
- package/dist/component/{file-upload-rac-BR7QpuPW.js → file-upload-rac-DaFuvO-g.js} +44 -44
- package/dist/component/{fixed-payment-rac-COl18wW1.js → fixed-payment-rac-DpBwOtOf.js} +11 -11
- package/dist/component/{form-DKKTSAj1.js → form-Wsx4lguO.js} +69 -69
- package/dist/component/{form-element-classes-CLZXu-91.js → form-element-classes-BtKlobUX.js} +60 -59
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-B6DyMG3U.js → header-field-rac-C8FlksmH.js} +3 -3
- package/dist/component/{header-rac-x4H2qMky.js → header-rac-C2J-pLq-.js} +1 -1
- package/dist/component/{image-choice-rac-BVgmKTKk.js → image-choice-rac-i4C_OXyb.js} +16 -16
- package/dist/component/{index-C47UMGhd.js → index-C34urqyX.js} +4 -4
- package/dist/component/{index-DnpqBcg5.js → index-CRI82pG6.js} +2 -2
- package/dist/component/{isObjectLike-BrrFBP4f.js → isObjectLike-D-9JnXmU.js} +1 -1
- package/dist/component/{multiline-address-field-rac-B6ka-2Wy.js → multiline-address-field-rac-Dkfso46f.js} +87 -86
- package/dist/component/{multiline-address-rac-Bh58qUEe.js → multiline-address-rac-BjrwDwOk.js} +1 -1
- package/dist/component/{number-input-field-rac-pAmxvk3A.js → number-input-field-rac-CgHi83Q1.js} +19 -19
- package/dist/component/{number-input-rac-mKA2njIU.js → number-input-rac-BinBxOCS.js} +1 -1
- package/dist/component/{password-rac-BbD7PQXO.js → password-rac-CDGqIRW5.js} +38 -38
- package/dist/component/{payment-input-rac-UdkwC1ek.js → payment-input-rac-f4uuGeJF.js} +23 -23
- package/dist/component/{phone-input-field-rac-BVLVVDTq.js → phone-input-field-rac-IdBqjM9Q.js} +33 -32
- package/dist/component/{phone-rac-LixcB9WV.js → phone-rac-VHPMrSpw.js} +1 -1
- package/dist/component/{product-list-rac-B_dL1Ov-.js → product-list-rac-Bk8q5y5L.js} +17 -17
- package/dist/component/{quiz-radio-group-rac-Bj5XfqNf.js → quiz-radio-group-rac-kTWqvAoW.js} +2 -2
- package/dist/component/{radio-button-module-classes-y_PtsZPP.js → radio-button-module-classes-D77Nc48M.js} +3 -3
- package/dist/component/{radio-group-field-rac-C8OElNAQ.js → radio-group-field-rac-DC-AYSOH.js} +5 -5
- package/dist/component/{radio-group-rac-BqJFboHE.js → radio-group-rac-BkswH1Py.js} +1 -1
- package/dist/component/{rating-input-field-rac-C9_ITvEh.js → rating-input-field-rac-Cqgw6PjV.js} +32 -32
- package/dist/component/{rating-input-rac-CvTpEUoU.js → rating-input-rac-CbZhlK3h.js} +1 -1
- package/dist/component/{rich-content-rac.module-D4pEN-TY.js → rich-content-rac.module-j_9YbXMI.js} +1 -1
- package/dist/component/{rich-text-field-rac-B8cqCmaf.js → rich-text-field-rac-Da1EIb3b.js} +3 -3
- package/dist/component/{rich-text-rac-C1o-tfXG.js → rich-text-rac-BarNBtgP.js} +1 -1
- package/dist/component/{service-dropdown-rac-BOXqB2aq.js → service-dropdown-rac-DLIC_csj.js} +36 -36
- package/dist/component/{services-multi-choice-rac-Dk4rz-fw.js → services-multi-choice-rac-vyxtwSM2.js} +14 -14
- package/dist/component/{signature-rac-h9GWVdez.js → signature-rac-DIM2Uwsg.js} +102 -102
- package/dist/component/{submit-button-rac-qNaTyCxd.js → submit-button-rac-DgxjomCu.js} +2 -2
- package/dist/component/{tags-field-rac-NMRn0YnW.js → tags-field-rac-BFlkxifd.js} +67 -67
- package/dist/component/{tags-rac-DGx4KxEn.js → tags-rac-D4TwrAWc.js} +1 -1
- package/dist/component/{text-area-field-rac-C7u0D4l3.js → text-area-field-rac-Dcz7VUQ5.js} +28 -28
- package/dist/component/{text-area-rac-Yo-RIyLm.js → text-area-rac-DhloXdO2.js} +1 -1
- package/dist/component/{text-input-field-rac-CvU-1clq.js → text-input-field-rac-C8e3TMxI.js} +8 -8
- package/dist/component/{text-input-headless-DLRwVmwf.js → text-input-headless-fl7qoZzR.js} +3 -3
- package/dist/component/{text-input-rac-CWh5xjZA.js → text-input-rac-CBn6bHtP.js} +1 -1
- package/dist/component/{time-input-rac-BZlso9qK.js → time-input-rac-Dsm7_vrf.js} +26 -26
- package/dist/component/{url-input-field-rac-Bax0TB4Q.js → url-input-field-rac-9Hfx1xzO.js} +20 -20
- package/dist/component/{url-input-rac-Bw2nfybR.js → url-input-rac-CVlE4pcg.js} +1 -1
- package/dist/component/use-dropdown-option-class-name-Dsxto42_.js +21 -0
- package/dist/component/{use-element-state-class-name-C0zLrsDR.js → use-element-state-class-name-BIqDbVvI.js} +1 -1
- package/dist/component/use-is-forced-open-dropdown-BMPqRDVW.js +41 -0
- package/dist/component/{use-service-options-base-Bkj6BSQL.js → use-service-options-base-07_rqXcG.js} +1 -1
- package/dist/component/{use-text-input-class-name-Biu89Ma7.js → use-text-input-class-name-DqFt59gd.js} +4 -4
- package/package.json +2 -2
- package/dist/component/date-picker-field-rac-BqdzPPzK.js +0 -304
- package/dist/component/field-rac.module-BUvPquav.js +0 -26
- package/dist/component/use-dropdown-option-class-name-vKSagp3b.js +0 -57
package/dist/component/{date-input-field-rac-D23Al-Mr.js → date-input-field-rac-BMdPQoFk.js}
RENAMED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { RicosViewer as ee } from "@wix/ricos/viewer";
|
|
2
2
|
import b from "classnames";
|
|
3
|
-
import t, { useMemo as g, useState as x, useCallback as w, useRef as
|
|
4
|
-
import { ak as
|
|
3
|
+
import t, { useMemo as g, useState as x, useCallback as w, useRef as j } from "react";
|
|
4
|
+
import { ak as D, ah as U, ac as P, K as $, a2 as q, s as m, au as T, y as te, O as ae, a9 as ne, am as B } from "./form-Wsx4lguO.js";
|
|
5
5
|
import { UNSAFE_PortalProvider as re } from "react-aria";
|
|
6
6
|
import { ListBoxItem as oe, ListBox as se, Select as le, TextField as z, SelectValue as ce, Input as G } from "react-aria-components";
|
|
7
|
-
import { f as u, a as
|
|
7
|
+
import { f as u, a as H } from "./find-child-C60k4CxG.js";
|
|
8
8
|
import { g as ie } from "./helpers-HmkkXrh2.js";
|
|
9
|
-
import { D as me, E as de } from "./field-error-headless-
|
|
10
|
-
import { L as ue } from "./field-label-headless-
|
|
9
|
+
import { D as me, E as de } from "./field-error-headless-BOlFtckJ.js";
|
|
10
|
+
import { L as ue } from "./field-label-headless-Dx3VrM-U.js";
|
|
11
11
|
import { F as pe } from "./fieldset-headless-CD3fds9J.js";
|
|
12
12
|
import { N as Ee, S as be } from "./non-modal-popover-DtIMXHbe.js";
|
|
13
|
-
import {
|
|
14
|
-
import { C as
|
|
13
|
+
import { u as fe } from "./use-is-forced-open-dropdown-BMPqRDVW.js";
|
|
14
|
+
import { C as he } from "./chevron-down-icon-CcpVm6B-.js";
|
|
15
15
|
import { E as Ie } from "./error-icon-hZxQ6DEy.js";
|
|
16
|
-
import { H as
|
|
17
|
-
import { s as E } from "./field-rac.module-
|
|
18
|
-
import {
|
|
19
|
-
import { u as
|
|
16
|
+
import { H as De } from "./custom-focus-class-_483Pkwp.js";
|
|
17
|
+
import { s as E } from "./field-rac.module-DobpyqOd.js";
|
|
18
|
+
import { C as S, S as Oe, n as ye, E as ge, r as _e, j as Ne } from "./form-element-classes-BtKlobUX.js";
|
|
19
|
+
import { u as Le } from "./use-dropdown-option-class-name-Dsxto42_.js";
|
|
20
|
+
import { u as k } from "./use-text-input-class-name-DqFt59gd.js";
|
|
20
21
|
const n = ({ children: e, className: a }) => {
|
|
21
|
-
const { id: r, required: s, onBlur: o, onFocus: l, FieldLayout: c } =
|
|
22
|
+
const { id: r, required: s, onBlur: o, onFocus: l, FieldLayout: c } = D(), { inputId: d, labelId: i, ariaDescribedBy: f } = U(), { regionalFormat: p } = P(), I = g(() => $(p).filter(q).map((v) => v.toUpperCase()), [
|
|
22
23
|
p
|
|
23
24
|
]), N = u(e, n.Label), Y = u(e, n.Description), L = u(e, n.Error), F = {
|
|
24
25
|
[m.MONTH]: u(e, n.Month),
|
|
@@ -27,7 +28,7 @@ const n = ({ children: e, className: a }) => {
|
|
|
27
28
|
};
|
|
28
29
|
return /* @__PURE__ */ t.createElement(c, {
|
|
29
30
|
fieldId: r,
|
|
30
|
-
renderLabel: () =>
|
|
31
|
+
renderLabel: () => H(N, {
|
|
31
32
|
as: "div"
|
|
32
33
|
}),
|
|
33
34
|
renderInput: () => /* @__PURE__ */ t.createElement(pe, {
|
|
@@ -38,17 +39,17 @@ const n = ({ children: e, className: a }) => {
|
|
|
38
39
|
onBlur: o,
|
|
39
40
|
onFocus: l,
|
|
40
41
|
className: a
|
|
41
|
-
}, F[
|
|
42
|
+
}, F[I[0]], F[I[1]], F[I[2]]),
|
|
42
43
|
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, L, Y)
|
|
43
44
|
});
|
|
44
45
|
}, O = ({ children: e, className: a }) => {
|
|
45
|
-
const { id: r, disabled: s, readOnly: o, showDateLabels: l, hidePlaceholder: c } =
|
|
46
|
-
o || p(typeof
|
|
46
|
+
const { id: r, disabled: s, readOnly: o, showDateLabels: l, hidePlaceholder: c } = D(), { labelId: d } = y(m.MONTH), { partValue: i, partError: f, onPartChange: p } = _(m.MONTH), { t: I } = T(), [N, Y] = x(!1), L = fe(r), [F, v] = x(null), K = c ? void 0 : I("field.date.placeholder.month"), Q = w((R) => {
|
|
47
|
+
o || p(typeof R == "string" ? R : "");
|
|
47
48
|
}, [
|
|
48
49
|
p,
|
|
49
50
|
o
|
|
50
|
-
]), W = w((
|
|
51
|
-
Y(
|
|
51
|
+
]), W = w((R) => {
|
|
52
|
+
Y(R && !o);
|
|
52
53
|
}, [
|
|
53
54
|
o
|
|
54
55
|
]), J = u(e, O.Label), X = u(e, O.Trigger), Z = u(e, O.Options);
|
|
@@ -71,15 +72,15 @@ const n = ({ children: e, className: a }) => {
|
|
|
71
72
|
placeholder: K,
|
|
72
73
|
isOpen: L || N,
|
|
73
74
|
onOpenChange: L ? void 0 : W
|
|
74
|
-
}, X,
|
|
75
|
+
}, X, H(Z, {
|
|
75
76
|
isForcedOpen: L
|
|
76
77
|
}))));
|
|
77
|
-
}, Fe = ({ className: e }) => /* @__PURE__ */ t.createElement(
|
|
78
|
+
}, Fe = ({ className: e }) => /* @__PURE__ */ t.createElement(V, {
|
|
78
79
|
datePart: m.MONTH,
|
|
79
80
|
className: e
|
|
80
81
|
}), Ce = ({ children: e, className: a }) => {
|
|
81
|
-
const { id: r, readOnly: s } =
|
|
82
|
-
return
|
|
82
|
+
const { id: r, readOnly: s } = D(), { inputId: o } = y(m.MONTH), { partError: l, isFirstPart: c } = _(m.MONTH), d = j(null);
|
|
83
|
+
return B(() => {
|
|
83
84
|
var i;
|
|
84
85
|
c && ((i = d.current) == null || i.focus());
|
|
85
86
|
}, r), /* @__PURE__ */ t.createElement(be, {
|
|
@@ -100,12 +101,12 @@ const n = ({ children: e, className: a }) => {
|
|
|
100
101
|
offset: 0
|
|
101
102
|
}, /* @__PURE__ */ t.createElement(se, {
|
|
102
103
|
autoFocus: s ? !1 : void 0
|
|
103
|
-
}, l.map((d, i) =>
|
|
104
|
+
}, l.map((d, i) => H(c, {
|
|
104
105
|
key: String(i + 1),
|
|
105
106
|
value: String(i + 1),
|
|
106
107
|
label: d
|
|
107
108
|
}))));
|
|
108
|
-
},
|
|
109
|
+
}, Me = ({ className: e, ...a }) => {
|
|
109
110
|
const { value: r, label: s } = a;
|
|
110
111
|
return /* @__PURE__ */ t.createElement(oe, {
|
|
111
112
|
className: e,
|
|
@@ -116,9 +117,9 @@ const n = ({ children: e, className: a }) => {
|
|
|
116
117
|
O.Label = Fe;
|
|
117
118
|
O.Trigger = Ce;
|
|
118
119
|
O.Options = A;
|
|
119
|
-
A.Option =
|
|
120
|
+
A.Option = Me;
|
|
120
121
|
const C = ({ children: e, className: a }) => {
|
|
121
|
-
const { disabled: r, readOnly: s, showDateLabels: o } =
|
|
122
|
+
const { disabled: r, readOnly: s, showDateLabels: o } = D(), { labelId: l } = y(m.DAY), { partValue: c, partError: d, onPartChange: i } = _(m.DAY), f = u(e, C.Label), p = u(e, C.Input);
|
|
122
123
|
return /* @__PURE__ */ t.createElement("div", {
|
|
123
124
|
className: a,
|
|
124
125
|
"data-date-field": !0
|
|
@@ -130,12 +131,12 @@ const C = ({ children: e, className: a }) => {
|
|
|
130
131
|
isReadOnly: s,
|
|
131
132
|
isInvalid: d
|
|
132
133
|
}, p));
|
|
133
|
-
},
|
|
134
|
+
}, Re = ({ className: e }) => /* @__PURE__ */ t.createElement(V, {
|
|
134
135
|
datePart: m.DAY,
|
|
135
136
|
className: e
|
|
136
137
|
}), Se = ({ className: e }) => {
|
|
137
|
-
const { id: a, hidePlaceholder: r } =
|
|
138
|
-
return
|
|
138
|
+
const { id: a, hidePlaceholder: r } = D(), { inputId: s } = y(m.DAY), { isFirstPart: o } = _(m.DAY), { t: l } = T(), c = j(null), d = r ? void 0 : l("field.date.placeholder.day");
|
|
139
|
+
return B(() => {
|
|
139
140
|
var i;
|
|
140
141
|
o && ((i = c.current) == null || i.focus());
|
|
141
142
|
}, a), /* @__PURE__ */ t.createElement(G, {
|
|
@@ -148,10 +149,10 @@ const C = ({ children: e, className: a }) => {
|
|
|
148
149
|
"data-hook": m.DAY
|
|
149
150
|
});
|
|
150
151
|
};
|
|
151
|
-
C.Label =
|
|
152
|
+
C.Label = Re;
|
|
152
153
|
C.Input = Se;
|
|
153
|
-
const
|
|
154
|
-
const { disabled: r, readOnly: s, showDateLabels: o } =
|
|
154
|
+
const M = ({ children: e, className: a }) => {
|
|
155
|
+
const { disabled: r, readOnly: s, showDateLabels: o } = D(), { labelId: l } = y(m.YEAR), { partValue: c, partError: d, onPartChange: i } = _(m.YEAR), f = u(e, M.Label), p = u(e, M.Input);
|
|
155
156
|
return /* @__PURE__ */ t.createElement("div", {
|
|
156
157
|
className: a,
|
|
157
158
|
"data-date-field": !0
|
|
@@ -163,12 +164,12 @@ const R = ({ children: e, className: a }) => {
|
|
|
163
164
|
isReadOnly: s,
|
|
164
165
|
isInvalid: d
|
|
165
166
|
}, p));
|
|
166
|
-
}, Ae = ({ className: e }) => /* @__PURE__ */ t.createElement(
|
|
167
|
+
}, Ae = ({ className: e }) => /* @__PURE__ */ t.createElement(V, {
|
|
167
168
|
datePart: m.YEAR,
|
|
168
169
|
className: e
|
|
169
170
|
}), Pe = ({ className: e }) => {
|
|
170
|
-
const { id: a, hidePlaceholder: r } =
|
|
171
|
-
return
|
|
171
|
+
const { id: a, hidePlaceholder: r } = D(), { inputId: s } = y(m.YEAR), { isFirstPart: o } = _(m.YEAR), { t: l } = T(), c = j(null), d = r ? void 0 : l("field.date.placeholder.year");
|
|
172
|
+
return B(() => {
|
|
172
173
|
var i;
|
|
173
174
|
o && ((i = c.current) == null || i.focus());
|
|
174
175
|
}, a), /* @__PURE__ */ t.createElement(G, {
|
|
@@ -181,12 +182,12 @@ const R = ({ children: e, className: a }) => {
|
|
|
181
182
|
"data-hook": m.YEAR
|
|
182
183
|
});
|
|
183
184
|
};
|
|
184
|
-
|
|
185
|
-
|
|
185
|
+
M.Label = Ae;
|
|
186
|
+
M.Input = Pe;
|
|
186
187
|
n.Label = ue;
|
|
187
188
|
n.Month = O;
|
|
188
189
|
n.Day = C;
|
|
189
|
-
n.Year =
|
|
190
|
+
n.Year = M;
|
|
190
191
|
n.Description = me;
|
|
191
192
|
n.Error = de;
|
|
192
193
|
function y(e) {
|
|
@@ -203,19 +204,19 @@ function y(e) {
|
|
|
203
204
|
]);
|
|
204
205
|
}
|
|
205
206
|
function _(e) {
|
|
206
|
-
const { value: a, onChange: r, hasError: s = !1 } =
|
|
207
|
+
const { value: a, onChange: r, hasError: s = !1 } = D(), { regionalFormat: o } = P(), l = g(() => te(a ?? ""), [
|
|
207
208
|
a
|
|
208
209
|
]), c = g(() => ae(s, a ?? ""), [
|
|
209
210
|
a,
|
|
210
211
|
s
|
|
211
212
|
]), d = l[e] || "", i = w((p) => {
|
|
212
|
-
const
|
|
213
|
-
r(
|
|
213
|
+
const I = ne(p, e, l);
|
|
214
|
+
r(I);
|
|
214
215
|
}, [
|
|
215
216
|
r,
|
|
216
217
|
l,
|
|
217
218
|
e
|
|
218
|
-
]), f = g(() =>
|
|
219
|
+
]), f = g(() => $(o).filter(q).map((N) => N.toUpperCase())[0] === e, [
|
|
219
220
|
o,
|
|
220
221
|
e
|
|
221
222
|
]);
|
|
@@ -226,7 +227,7 @@ function _(e) {
|
|
|
226
227
|
isFirstPart: f
|
|
227
228
|
};
|
|
228
229
|
}
|
|
229
|
-
function
|
|
230
|
+
function V({ datePart: e, className: a }) {
|
|
230
231
|
const { inputId: r, labelId: s } = y(e), { t: o } = T(), l = `field.date.label.${e.toLowerCase()}`, c = o(l);
|
|
231
232
|
return /* @__PURE__ */ t.createElement("label", {
|
|
232
233
|
id: s,
|
|
@@ -234,21 +235,21 @@ function j({ datePart: e, className: a }) {
|
|
|
234
235
|
className: a
|
|
235
236
|
}, c);
|
|
236
237
|
}
|
|
237
|
-
const Te = "_fields_12ojb_1", Ye = "_month_12ojb_9", ve = "_day_12ojb_10", we = "_year_12ojb_11",
|
|
238
|
+
const Te = "_fields_12ojb_1", Ye = "_month_12ojb_9", ve = "_day_12ojb_10", we = "_year_12ojb_11", je = "_mobile_12ojb_25", Be = "_dayInput_12ojb_37", He = "_yearInput_12ojb_38", Ve = "_monthTrigger_12ojb_42", xe = "_monthOption_12ojb_62", h = {
|
|
238
239
|
fields: Te,
|
|
239
240
|
month: Ye,
|
|
240
241
|
day: ve,
|
|
241
242
|
year: we,
|
|
242
|
-
mobile:
|
|
243
|
-
dayInput:
|
|
244
|
-
yearInput:
|
|
245
|
-
monthTrigger:
|
|
243
|
+
mobile: je,
|
|
244
|
+
dayInput: Be,
|
|
245
|
+
yearInput: He,
|
|
246
|
+
monthTrigger: Ve,
|
|
246
247
|
monthOption: xe
|
|
247
248
|
}, ke = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(ee, {
|
|
248
249
|
content: e,
|
|
249
250
|
locale: a
|
|
250
|
-
}),
|
|
251
|
-
const e =
|
|
251
|
+
}), it = () => {
|
|
252
|
+
const e = Le(h.monthOption, De), { isMobile: a } = P(), r = k(h.dayInput), s = k(h.yearInput);
|
|
252
253
|
return /* @__PURE__ */ t.createElement(n, {
|
|
253
254
|
className: b(h.fields, {
|
|
254
255
|
[h.mobile]: a
|
|
@@ -256,17 +257,17 @@ const Te = "_fields_12ojb_1", Ye = "_month_12ojb_9", ve = "_day_12ojb_10", we =
|
|
|
256
257
|
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
257
258
|
className: b(S, E.label)
|
|
258
259
|
}, /* @__PURE__ */ t.createElement(n.Label.Required, {
|
|
259
|
-
className: b(
|
|
260
|
+
className: b(Oe, E.requiredMark)
|
|
260
261
|
})), /* @__PURE__ */ t.createElement(n.Month, {
|
|
261
262
|
className: h.month
|
|
262
263
|
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
263
264
|
className: b(S, E.label)
|
|
264
265
|
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
265
|
-
className: b(
|
|
266
|
-
}, /* @__PURE__ */ t.createElement(
|
|
266
|
+
className: b(ye, E.input, h.monthTrigger)
|
|
267
|
+
}, /* @__PURE__ */ t.createElement(he, {
|
|
267
268
|
className: E.dropdownIcon
|
|
268
269
|
})), /* @__PURE__ */ t.createElement(n.Month.Options, {
|
|
269
|
-
className: b(
|
|
270
|
+
className: b(ge, E.selectPopover, E.dropdownPopover)
|
|
270
271
|
}, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
|
|
271
272
|
className: e
|
|
272
273
|
}))), /* @__PURE__ */ t.createElement(n.Day, {
|
|
@@ -282,11 +283,11 @@ const Te = "_fields_12ojb_1", Ye = "_month_12ojb_9", ve = "_day_12ojb_10", we =
|
|
|
282
283
|
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
283
284
|
className: s
|
|
284
285
|
})), /* @__PURE__ */ t.createElement(n.Error, {
|
|
285
|
-
className: b(
|
|
286
|
+
className: b(_e, E.error)
|
|
286
287
|
}, /* @__PURE__ */ t.createElement(Ie, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
287
|
-
className: b(
|
|
288
|
+
className: b(Ne, E.description)
|
|
288
289
|
}, ke));
|
|
289
290
|
};
|
|
290
291
|
export {
|
|
291
|
-
|
|
292
|
+
it as D
|
|
292
293
|
};
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { RicosViewer as X } from "@wix/ricos/viewer";
|
|
2
|
+
import D from "classnames";
|
|
3
|
+
import e, { useState as A, useCallback as k, useContext as ee, useRef as P, useMemo as F } from "react";
|
|
4
|
+
import { D as f, ak as _, ah as w, ac as T, am as te } from "./form-Wsx4lguO.js";
|
|
5
|
+
import { parseDate as re } from "@internationalized/date";
|
|
6
|
+
import { UNSAFE_PortalProvider as ae } from "react-aria";
|
|
7
|
+
import { I18nProvider as ne, DatePicker as oe, DatePickerStateContext as le, Group as se, DateInput as ce, DateSegment as ie, Calendar as me, CalendarMonthPicker as de, CalendarYearPicker as ue, CalendarGrid as ge, Dialog as Ee, CalendarCell as pe, Button as x, Select as Y, SelectValue as B, ListBox as U, ListBoxItem as V } from "react-aria-components";
|
|
8
|
+
import { g as De, c as R } from "./calendar.module-DnhTT4QT.js";
|
|
9
|
+
import { f as E, a as h } from "./find-child-C60k4CxG.js";
|
|
10
|
+
import { D as fe, E as Ce } from "./field-error-headless-BOlFtckJ.js";
|
|
11
|
+
import { L as ye } from "./field-label-headless-Dx3VrM-U.js";
|
|
12
|
+
import { D as Se, N as O, S as W } from "./non-modal-popover-DtIMXHbe.js";
|
|
13
|
+
import { u as he } from "./use-is-forced-open-dropdown-BMPqRDVW.js";
|
|
14
|
+
import { i as _e } from "./date-availability-BXwnYCBt.js";
|
|
15
|
+
import { C as L } from "./chevron-down-icon-CcpVm6B-.js";
|
|
16
|
+
import { E as Te } from "./error-icon-hZxQ6DEy.js";
|
|
17
|
+
import { H as Ne } from "./custom-focus-class-_483Pkwp.js";
|
|
18
|
+
import { s as p } from "./field-rac.module-DobpyqOd.js";
|
|
19
|
+
import { C as be, S as ve, n as Ie, h as Fe, r as Le, j as Oe } from "./form-element-classes-BtKlobUX.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
|
+
], Pe = {
|
|
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 } = _(), { labelId: y } = w(), { regionalFormat: N } = T(), [b, s] = A(null), [v, K] = A(!1), I = he(r), z = k((Z) => {
|
|
32
|
+
const J = Ke(Z);
|
|
33
|
+
n(J);
|
|
34
|
+
}, [
|
|
35
|
+
n
|
|
36
|
+
]), $ = E(t, a.Label), H = E(t, a.Control), q = E(t, a.Calendar), G = E(t, a.Description), j = E(t, a.Error), Q = We(l);
|
|
37
|
+
return /* @__PURE__ */ e.createElement(m, {
|
|
38
|
+
fieldId: r,
|
|
39
|
+
renderLabel: () => $,
|
|
40
|
+
renderInput: () => /* @__PURE__ */ e.createElement(ne, {
|
|
41
|
+
locale: N
|
|
42
|
+
}, /* @__PURE__ */ e.createElement("div", {
|
|
43
|
+
ref: s,
|
|
44
|
+
style: {
|
|
45
|
+
display: "contents"
|
|
46
|
+
}
|
|
47
|
+
}), /* @__PURE__ */ e.createElement(ae, {
|
|
48
|
+
getContainer: () => b
|
|
49
|
+
}, /* @__PURE__ */ e.createElement(oe, {
|
|
50
|
+
"aria-labelledby": y,
|
|
51
|
+
value: Q,
|
|
52
|
+
onChange: z,
|
|
53
|
+
isDisabled: i,
|
|
54
|
+
isInvalid: d,
|
|
55
|
+
isReadOnly: C,
|
|
56
|
+
isRequired: c,
|
|
57
|
+
onBlur: u,
|
|
58
|
+
onFocus: o,
|
|
59
|
+
isOpen: I || v,
|
|
60
|
+
onOpenChange: I ? void 0 : K
|
|
61
|
+
}, H, h(q, {
|
|
62
|
+
isForcedOpen: I
|
|
63
|
+
})))),
|
|
64
|
+
renderDescription: () => /* @__PURE__ */ e.createElement(e.Fragment, null, j, G)
|
|
65
|
+
});
|
|
66
|
+
}, Re = ({ children: t, className: r }) => {
|
|
67
|
+
const { inputId: l, ariaDescribedBy: n } = w(), { hasError: i, disabled: c, readOnly: u } = _(), 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(se, {
|
|
81
|
+
id: l,
|
|
82
|
+
"aria-describedby": n,
|
|
83
|
+
className: r,
|
|
84
|
+
"data-invalid": i,
|
|
85
|
+
onPointerDownCapture: m
|
|
86
|
+
}, t);
|
|
87
|
+
}, Me = ({ className: t }) => {
|
|
88
|
+
const { id: r, placeholder: l } = _(), { regionalFormat: n } = T(), i = P(null), c = P(!1);
|
|
89
|
+
te(() => {
|
|
90
|
+
var o;
|
|
91
|
+
(o = i.current) == null || o.focus();
|
|
92
|
+
}, r);
|
|
93
|
+
const u = F(() => ze(n), [
|
|
94
|
+
n
|
|
95
|
+
]);
|
|
96
|
+
return /* @__PURE__ */ e.createElement(ce, {
|
|
97
|
+
className: t
|
|
98
|
+
}, (o) => {
|
|
99
|
+
const m = o.type === u && o.isPlaceholder && !!l;
|
|
100
|
+
return /* @__PURE__ */ e.createElement(ie, {
|
|
101
|
+
segment: o,
|
|
102
|
+
"data-first-segment": m || void 0,
|
|
103
|
+
ref: (d) => {
|
|
104
|
+
if (!d && c.current) {
|
|
105
|
+
i.current = null, c.current = !1;
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (d && !c.current) {
|
|
109
|
+
i.current = d, c.current = !0;
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}, (d) => !d.isPlaceholder || !l ? d.text : m ? l : d.text);
|
|
114
|
+
});
|
|
115
|
+
}, ke = ({ children: t, className: r }) => /* @__PURE__ */ e.createElement(Se, {
|
|
116
|
+
className: r
|
|
117
|
+
}, t), g = ({ children: t, className: r, ...l }) => {
|
|
118
|
+
const { isForcedOpen: n } = l, { regionalFormat: i, isMobile: c } = T(), { availability: u } = _(), o = F(() => De(i), [
|
|
119
|
+
i
|
|
120
|
+
]), m = F(() => (s) => {
|
|
121
|
+
const v = new Date(s.year, s.month - 1, s.day);
|
|
122
|
+
return !_e(v, u || Pe);
|
|
123
|
+
}, [
|
|
124
|
+
u
|
|
125
|
+
]), d = E(t, g.Day) ?? /* @__PURE__ */ e.createElement(g.Day, null), C = E(t, g.PreviousTrigger), y = E(t, g.NextTrigger), N = E(t, g.MonthTrigger), b = E(t, g.YearTrigger);
|
|
126
|
+
return /* @__PURE__ */ e.createElement(O, {
|
|
127
|
+
className: r,
|
|
128
|
+
containerPadding: 0
|
|
129
|
+
}, /* @__PURE__ */ e.createElement(we, {
|
|
130
|
+
isForcedOpen: n
|
|
131
|
+
}, /* @__PURE__ */ e.createElement(me, {
|
|
132
|
+
autoFocus: n ? !1 : void 0,
|
|
133
|
+
firstDayOfWeek: $e(o),
|
|
134
|
+
isDateUnavailable: m
|
|
135
|
+
}, /* @__PURE__ */ e.createElement("header", null, C, /* @__PURE__ */ e.createElement(de, null, (s) => h(N, {
|
|
136
|
+
ariaLabel: s["aria-label"],
|
|
137
|
+
selectedKey: s.value,
|
|
138
|
+
onSelectionChange: s.onChange,
|
|
139
|
+
items: s.items,
|
|
140
|
+
popoverClassName: r
|
|
141
|
+
})), /* @__PURE__ */ e.createElement(ue, {
|
|
142
|
+
visibleYears: 100
|
|
143
|
+
}, (s) => h(b, {
|
|
144
|
+
ariaLabel: s["aria-label"],
|
|
145
|
+
selectedKey: s.value,
|
|
146
|
+
onSelectionChange: s.onChange,
|
|
147
|
+
items: s.items,
|
|
148
|
+
popoverClassName: r
|
|
149
|
+
})), y), /* @__PURE__ */ e.createElement(ge, {
|
|
150
|
+
weekdayStyle: c ? "narrow" : "short"
|
|
151
|
+
}, (s) => h(d, {
|
|
152
|
+
date: s
|
|
153
|
+
})))));
|
|
154
|
+
}, we = ({ isForcedOpen: t, children: r }) => t ? /* @__PURE__ */ e.createElement("div", {
|
|
155
|
+
role: "dialog"
|
|
156
|
+
}, r) : /* @__PURE__ */ e.createElement(Ee, null, r), xe = ({ children: t, className: r, ...l }) => {
|
|
157
|
+
const { date: n } = l;
|
|
158
|
+
return /* @__PURE__ */ e.createElement(pe, {
|
|
159
|
+
className: r,
|
|
160
|
+
date: n
|
|
161
|
+
}, t);
|
|
162
|
+
}, Ye = ({ children: t, className: r }) => /* @__PURE__ */ e.createElement(x, {
|
|
163
|
+
slot: "previous",
|
|
164
|
+
className: r
|
|
165
|
+
}, t), Be = ({ children: t, className: r }) => /* @__PURE__ */ e.createElement(x, {
|
|
166
|
+
slot: "next",
|
|
167
|
+
className: r
|
|
168
|
+
}, t), Ue = ({ children: t, className: r, ...l }) => {
|
|
169
|
+
const { ariaLabel: n, selectedKey: i, onSelectionChange: c, items: u, popoverClassName: o } = l;
|
|
170
|
+
return /* @__PURE__ */ e.createElement(Y, {
|
|
171
|
+
"aria-label": n,
|
|
172
|
+
selectedKey: i,
|
|
173
|
+
onSelectionChange: c
|
|
174
|
+
}, /* @__PURE__ */ e.createElement(W, {
|
|
175
|
+
className: r
|
|
176
|
+
}, /* @__PURE__ */ e.createElement(B, null), t), /* @__PURE__ */ e.createElement(O, {
|
|
177
|
+
className: o,
|
|
178
|
+
containerPadding: 0
|
|
179
|
+
}, /* @__PURE__ */ e.createElement(U, {
|
|
180
|
+
items: u
|
|
181
|
+
}, (m) => /* @__PURE__ */ e.createElement(V, {
|
|
182
|
+
id: m.id
|
|
183
|
+
}, m.formatted))));
|
|
184
|
+
}, Ve = ({ children: t, className: r, ...l }) => {
|
|
185
|
+
const { ariaLabel: n, selectedKey: i, onSelectionChange: c, items: u, popoverClassName: o } = l;
|
|
186
|
+
return /* @__PURE__ */ e.createElement(Y, {
|
|
187
|
+
"aria-label": n,
|
|
188
|
+
selectedKey: i,
|
|
189
|
+
onSelectionChange: c
|
|
190
|
+
}, /* @__PURE__ */ e.createElement(W, {
|
|
191
|
+
className: r
|
|
192
|
+
}, /* @__PURE__ */ e.createElement(B, null), t), /* @__PURE__ */ e.createElement(O, {
|
|
193
|
+
className: o,
|
|
194
|
+
containerPadding: 0
|
|
195
|
+
}, /* @__PURE__ */ e.createElement(U, {
|
|
196
|
+
items: u
|
|
197
|
+
}, (m) => /* @__PURE__ */ e.createElement(V, {
|
|
198
|
+
id: m.id
|
|
199
|
+
}, m.formatted))));
|
|
200
|
+
};
|
|
201
|
+
g.Day = xe;
|
|
202
|
+
g.PreviousTrigger = Ye;
|
|
203
|
+
g.NextTrigger = Be;
|
|
204
|
+
g.MonthTrigger = Ue;
|
|
205
|
+
g.YearTrigger = Ve;
|
|
206
|
+
a.Label = ye;
|
|
207
|
+
a.Control = Re;
|
|
208
|
+
a.Input = Me;
|
|
209
|
+
a.Trigger = ke;
|
|
210
|
+
a.Calendar = g;
|
|
211
|
+
a.Description = fe;
|
|
212
|
+
a.Error = Ce;
|
|
213
|
+
function We(t) {
|
|
214
|
+
if (!t)
|
|
215
|
+
return null;
|
|
216
|
+
try {
|
|
217
|
+
return re(t);
|
|
218
|
+
} catch {
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
function Ke(t) {
|
|
223
|
+
if (!t)
|
|
224
|
+
return null;
|
|
225
|
+
const r = String(t.year).padStart(4, "0"), l = String(t.month).padStart(2, "0"), n = String(t.day).padStart(2, "0");
|
|
226
|
+
return `${r}-${l}-${n}`;
|
|
227
|
+
}
|
|
228
|
+
function ze(t) {
|
|
229
|
+
var r;
|
|
230
|
+
try {
|
|
231
|
+
return ((r = new Intl.DateTimeFormat(t, {
|
|
232
|
+
year: "numeric",
|
|
233
|
+
month: "2-digit",
|
|
234
|
+
day: "2-digit"
|
|
235
|
+
}).formatToParts(/* @__PURE__ */ new Date()).find((n) => n.type !== "literal")) == null ? void 0 : r.type) ?? "month";
|
|
236
|
+
} catch {
|
|
237
|
+
return "month";
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
function $e(t) {
|
|
241
|
+
return [
|
|
242
|
+
"sun",
|
|
243
|
+
"mon",
|
|
244
|
+
"tue",
|
|
245
|
+
"wed",
|
|
246
|
+
"thu",
|
|
247
|
+
"fri",
|
|
248
|
+
"sat"
|
|
249
|
+
][t] || "mon";
|
|
250
|
+
}
|
|
251
|
+
const He = (t) => /* @__PURE__ */ e.createElement("svg", {
|
|
252
|
+
viewBox: "0 0 24 24",
|
|
253
|
+
fill: "none",
|
|
254
|
+
width: 14,
|
|
255
|
+
height: 14,
|
|
256
|
+
"aria-hidden": "true",
|
|
257
|
+
...t
|
|
258
|
+
}, /* @__PURE__ */ e.createElement("path", {
|
|
259
|
+
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",
|
|
260
|
+
stroke: "currentColor",
|
|
261
|
+
strokeWidth: "1.5",
|
|
262
|
+
strokeLinecap: "round",
|
|
263
|
+
strokeLinejoin: "round"
|
|
264
|
+
})), qe = "_control_1ezgc_1", Ge = "_segments_1ezgc_14", je = "_trigger_1ezgc_65", Qe = "_calendarPopover_1ezgc_96", Ze = "_calendarDay_1ezgc_242", Je = "_mobile_1ezgc_253", S = {
|
|
265
|
+
control: qe,
|
|
266
|
+
segments: Ge,
|
|
267
|
+
trigger: je,
|
|
268
|
+
calendarPopover: Qe,
|
|
269
|
+
calendarDay: Ze,
|
|
270
|
+
mobile: Je
|
|
271
|
+
}, Xe = ({ content: t, locale: r }) => /* @__PURE__ */ e.createElement(X, {
|
|
272
|
+
content: t,
|
|
273
|
+
locale: r
|
|
274
|
+
}), et = {
|
|
275
|
+
left: 90,
|
|
276
|
+
right: -90
|
|
277
|
+
}, M = ({ direction: t }) => /* @__PURE__ */ e.createElement(L, {
|
|
278
|
+
style: {
|
|
279
|
+
transform: `rotate(${et[t]}deg)`
|
|
280
|
+
}
|
|
281
|
+
}), St = () => {
|
|
282
|
+
const { isMobile: t } = T();
|
|
283
|
+
return /* @__PURE__ */ e.createElement(a, null, /* @__PURE__ */ e.createElement(a.Label, {
|
|
284
|
+
className: D(be, p.label)
|
|
285
|
+
}, /* @__PURE__ */ e.createElement(a.Label.Required, {
|
|
286
|
+
className: D(ve, p.requiredMark)
|
|
287
|
+
})), /* @__PURE__ */ e.createElement(a.Control, {
|
|
288
|
+
className: D(Ie, p.input, S.control)
|
|
289
|
+
}, /* @__PURE__ */ e.createElement(a.Trigger, {
|
|
290
|
+
className: S.trigger
|
|
291
|
+
}, /* @__PURE__ */ e.createElement(He, null)), /* @__PURE__ */ e.createElement(a.Input, {
|
|
292
|
+
className: S.segments
|
|
293
|
+
})), /* @__PURE__ */ e.createElement(a.Calendar, {
|
|
294
|
+
className: D(Fe, p.selectPopover, S.calendarPopover, {
|
|
295
|
+
[S.mobile]: t
|
|
296
|
+
})
|
|
297
|
+
}, /* @__PURE__ */ e.createElement(a.Calendar.PreviousTrigger, null, /* @__PURE__ */ e.createElement(M, {
|
|
298
|
+
direction: "left"
|
|
299
|
+
})), /* @__PURE__ */ e.createElement(a.Calendar.MonthTrigger, null, /* @__PURE__ */ e.createElement(L, {
|
|
300
|
+
className: p.dropdownIcon
|
|
301
|
+
})), /* @__PURE__ */ e.createElement(a.Calendar.YearTrigger, null, /* @__PURE__ */ e.createElement(L, {
|
|
302
|
+
className: p.dropdownIcon
|
|
303
|
+
})), /* @__PURE__ */ e.createElement(a.Calendar.NextTrigger, null, /* @__PURE__ */ e.createElement(M, {
|
|
304
|
+
direction: "right"
|
|
305
|
+
})), /* @__PURE__ */ e.createElement(a.Calendar.Day, {
|
|
306
|
+
className: D(Ne, R.day, S.calendarDay)
|
|
307
|
+
}, ({ formattedDate: r }) => /* @__PURE__ */ e.createElement("span", {
|
|
308
|
+
className: R.dayNumber
|
|
309
|
+
}, r))), /* @__PURE__ */ e.createElement(a.Error, {
|
|
310
|
+
className: D(Le, p.error)
|
|
311
|
+
}, /* @__PURE__ */ e.createElement(Te, null), /* @__PURE__ */ e.createElement(a.Error.Text, null)), /* @__PURE__ */ e.createElement(a.Description, {
|
|
312
|
+
className: D(Oe, p.description)
|
|
313
|
+
}, Xe));
|
|
314
|
+
};
|
|
315
|
+
export {
|
|
316
|
+
St as D
|
|
317
|
+
};
|