@wix/form-elements 1.98.0 → 1.99.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-BKgRKq3j.js → appointment-rac-CP8gfFze.js} +382 -385
- package/dist/component/{bookings-address-rac-C87x19gw.js → bookings-address-rac-CWs0gEUJ.js} +1 -1
- package/dist/component/{bookings-email-rac-f4nuC_pb.js → bookings-email-rac-D-HYHHg-.js} +1 -1
- package/dist/component/{bookings-first-name-rac-BGmuAmbu.js → bookings-first-name-rac-Sk9e2_l9.js} +1 -1
- package/dist/component/{bookings-header-rac-CoyxHljp.js → bookings-header-rac-idz-09i9.js} +1 -1
- package/dist/component/{bookings-last-name-rac-D2mBYwcR.js → bookings-last-name-rac-C4cCmRVy.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-BH2Mi6TR.js → bookings-login-bar-rac-BdVG5M2b.js} +1 -1
- package/dist/component/{bookings-phone-rac-Dz78ybFV.js → bookings-phone-rac-D09RuttH.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-8_h0cOoy.js → bookings-rich-text-rac-Ci26IHTA.js} +1 -1
- package/dist/component/{checkbox-field-rac-CJnegjvL.js → checkbox-field-rac-Blko_wMR.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-CrA7Gx2Y.js → checkbox-group-field-headless-DhV4VwZq.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-DMg75l5Q.js → checkbox-group-field-rac-BtPnVYiW.js} +3 -3
- package/dist/component/{checkbox-group-rac-C9XWlO5D.js → checkbox-group-rac-eyClfhOO.js} +1 -1
- package/dist/component/{checkbox-rac-CrqhH4z9.js → checkbox-rac-I0i6q5tn.js} +1 -1
- package/dist/component/{contacts-address-rac-C2mqTiPg.js → contacts-address-rac-8UPBA_Nx.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-i7_RMona.js → contacts-birthdate-rac-BuMsx4tn.js} +1 -1
- package/dist/component/{contacts-company-rac-7sdIosaG.js → contacts-company-rac-C4GszTsX.js} +1 -1
- package/dist/component/{contacts-email-rac-CrsksJ9G.js → contacts-email-rac-BdNzRUNL.js} +1 -1
- package/dist/component/{contacts-first-name-rac-I5xIYxgD.js → contacts-first-name-rac-D7otJsfF.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DnzJYJh7.js → contacts-last-name-rac-DE2dfvRQ.js} +1 -1
- package/dist/component/{contacts-phone-rac-Cx1jpYmv.js → contacts-phone-rac-C-P4QUzI.js} +1 -1
- package/dist/component/{contacts-position-rac-CxddG_cE.js → contacts-position-rac-CD_mT8at.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-C1nTAhnd.js → contacts-subscribe-rac-CyBwegiP.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-B1lzfrj_.js → contacts-tax-id-rac-BVwa6_pq.js} +1 -1
- package/dist/component/{date-availability-LN33GU7O.js → date-availability-6u7UHGAa.js} +1 -1
- package/dist/component/{date-input-field-rac-zTcw6Mxx.js → date-input-field-rac-Dpb3imSq.js} +98 -101
- package/dist/component/{date-input-rac-NfVbrcoO.js → date-input-rac-CaRUO8qF.js} +1 -1
- package/dist/component/date-picker-field-rac-BuZ2Vdqw.js +311 -0
- package/dist/component/{date-picker-rac-C5iXyKdf.js → date-picker-rac-CQ0HLYC_.js} +1 -1
- package/dist/component/{date-time-input-field-rac-Cp34u7cC.js → date-time-input-field-rac-D-6fSa7K.js} +101 -104
- package/dist/component/{date-time-input-rac-CfFd56Xf.js → date-time-input-rac-DJvGnasb.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-BVx7XXwR.js → dext-checkbox-group-rac-4Xv2Yx1Q.js} +2 -2
- package/dist/component/{dext-checkbox-rac-CmUOLx_w.js → dext-checkbox-rac-MUiHjntT.js} +1 -1
- package/dist/component/{dext-date-picker-rac-XDrLGVTQ.js → dext-date-picker-rac-B7V77fPs.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-ZLCq_taK.js → dext-date-time-input-rac-LDrnt4fH.js} +1 -1
- package/dist/component/{dext-dropdown-rac-C74zBq3M.js → dext-dropdown-rac-BP83OElK.js} +1 -1
- package/dist/component/{dext-email-rac-CqS9HcdY.js → dext-email-rac-Bi9qANCo.js} +1 -1
- package/dist/component/{dext-number-input-rac-DszjJDT-.js → dext-number-input-rac-BU4SEily.js} +1 -1
- package/dist/component/{dext-phone-rac-wt7T8hpM.js → dext-phone-rac-D5s8DrCc.js} +1 -1
- package/dist/component/{dext-radio-group-rac-BvRnaWP0.js → dext-radio-group-rac-DaTuyxUL.js} +2 -2
- package/dist/component/{dext-rating-input-rac-D1Lt9M3c.js → dext-rating-input-rac-CfMKqHHZ.js} +1 -1
- package/dist/component/{dext-tags-rac-70YO5CJH.js → dext-tags-rac-CyFzVZFw.js} +2 -2
- package/dist/component/{dext-text-area-rac-CC5RCvWh.js → dext-text-area-rac-D-kfFMUj.js} +1 -1
- package/dist/component/{dext-text-input-rac-s487DzPW.js → dext-text-input-rac-BOFj2FyN.js} +1 -1
- package/dist/component/{dext-url-input-rac-DEKwUh2a.js → dext-url-input-rac-BGPDEwNb.js} +1 -1
- package/dist/component/{donation-rac-C2bCFVHP.js → donation-rac-BMX9KxJP.js} +5 -5
- package/dist/component/{dropdown-field-headless-BMWwkydq.js → dropdown-field-headless-CIXH608w.js} +4 -4
- package/dist/component/{dropdown-field-rac-Cw5Cbpg0.js → dropdown-field-rac-daLrun-E.js} +2 -2
- package/dist/component/{dropdown-rac-CEmlDY3w.js → dropdown-rac-BTYSH3Zy.js} +1 -1
- package/dist/component/{ecom-address-rac-Dv6asnf_.js → ecom-address-rac-BDhiTREn.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-DOwH-Ebd.js → ecom-subscription-checkbox-rac-Dbpa4fFi.js} +2 -2
- package/dist/component/{email-input-field-rac-CeFXPibq.js → email-input-field-rac-BJUszqvR.js} +3 -3
- package/dist/component/{events-repeater-rac-BUk5Qc8n.js → events-repeater-rac-DJrTlOGT.js} +4 -4
- package/dist/component/{events-rsvp-rac-CtFkVzUy.js → events-rsvp-rac-DDASk2XH.js} +2 -2
- package/dist/component/{field-error-headless-B6x_cVEi.js → field-error-headless-DJVkE5yv.js} +1 -1
- package/dist/component/{field-label-headless-BibCD8xx.js → field-label-headless-CyCHxPkd.js} +1 -1
- package/dist/component/{file-upload-rac-BUcktluW.js → file-upload-rac-BOpYihdw.js} +3 -3
- package/dist/component/{fixed-payment-rac-BMSBSo5c.js → fixed-payment-rac-DFi_YPyN.js} +3 -3
- package/dist/component/{form-9WmwgGNc.js → form-CVz1PefD.js} +69 -69
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-CxUuHOic.js → header-field-rac-C2PfSwil.js} +2 -2
- package/dist/component/{header-rac-DejI69X7.js → header-rac-D9YqB-O1.js} +1 -1
- package/dist/component/{image-choice-rac-BjI5a_co.js → image-choice-rac-t_I06vvU.js} +4 -4
- package/dist/component/{index-Dz2hV2_S.js → index-DLjekrTD.js} +4 -4
- package/dist/component/{index-Csso-2QH.js → index-yjAwk9mS.js} +2 -2
- package/dist/component/{isObjectLike-BN_BZMhy.js → isObjectLike-Cgzv4nCC.js} +1 -1
- package/dist/component/{multiline-address-field-rac-CYfphmfr.js → multiline-address-field-rac-Dnjmc0tO.js} +7 -7
- package/dist/component/{multiline-address-rac-Ccujt2bd.js → multiline-address-rac-ByL_NcH7.js} +1 -1
- package/dist/component/{number-input-field-rac-CfnRCRar.js → number-input-field-rac-BPTuhBlo.js} +4 -4
- package/dist/component/{number-input-rac-DnTO9d8P.js → number-input-rac-hLoHm0Ul.js} +1 -1
- package/dist/component/{password-rac-Be_YSb-Q.js → password-rac-DYqRtXl0.js} +4 -4
- package/dist/component/{payment-input-rac-DXUf5iYb.js → payment-input-rac-D9WtGI5n.js} +4 -4
- package/dist/component/{phone-input-field-rac-DYAwLuvJ.js → phone-input-field-rac-D2Emh-lo.js} +6 -6
- package/dist/component/{phone-rac-BlsvDmER.js → phone-rac-B8-6Mw36.js} +1 -1
- package/dist/component/{product-list-rac-DdXwRSc2.js → product-list-rac-B_wLuARQ.js} +4 -4
- package/dist/component/{quiz-radio-group-rac-B0yiKdbu.js → quiz-radio-group-rac-CcnfdObW.js} +1 -1
- package/dist/component/{radio-button-module-classes-t1jsWYpT.js → radio-button-module-classes-CyZYs0BH.js} +3 -3
- package/dist/component/{radio-group-field-rac-Cug1TtSq.js → radio-group-field-rac-BdNA6UOq.js} +3 -3
- package/dist/component/{radio-group-rac-_O5T0Pt8.js → radio-group-rac-CvhHM6v5.js} +1 -1
- package/dist/component/{rating-input-field-rac-BSKzQ3fq.js → rating-input-field-rac-wjWNPfRZ.js} +4 -4
- package/dist/component/{rating-input-rac-B71q44YO.js → rating-input-rac-qqUycDFh.js} +1 -1
- package/dist/component/{rich-content-rac.module-BJuoKIOt.js → rich-content-rac.module-BAMOVeFc.js} +1 -1
- package/dist/component/{rich-text-field-rac-CiSR82Fw.js → rich-text-field-rac-DRC3nap3.js} +2 -2
- package/dist/component/{rich-text-rac-Bo6UBwOg.js → rich-text-rac-DPgt6Zb4.js} +1 -1
- package/dist/component/{service-dropdown-rac-BJ7V-g8M.js → service-dropdown-rac-C79afx6z.js} +4 -4
- package/dist/component/{services-multi-choice-rac-CtBcc9WH.js → services-multi-choice-rac-Dv_3PkqW.js} +5 -5
- package/dist/component/{signature-rac-yvrHr1he.js → signature-rac-D2NLRFu0.js} +3 -3
- package/dist/component/{submit-button-rac-s-JdZgq7.js → submit-button-rac-CnmlHY57.js} +1 -1
- package/dist/component/{tags-field-rac-g_W0RMod.js → tags-field-rac-B5v917df.js} +5 -5
- package/dist/component/{tags-rac-DmvIH6HU.js → tags-rac-DCUcssn5.js} +1 -1
- package/dist/component/{text-area-field-rac-Duja5xOA.js → text-area-field-rac-7YmznS1S.js} +4 -4
- package/dist/component/{text-area-rac-DzRxgG6u.js → text-area-rac-C0Yuh6D2.js} +1 -1
- package/dist/component/{text-input-field-rac-C2eXeoBC.js → text-input-field-rac-Bpmukqyp.js} +2 -2
- package/dist/component/{text-input-headless-d1WK0nqR.js → text-input-headless-Cdpzu_eE.js} +3 -3
- package/dist/component/{text-input-rac-DM9MnoQs.js → text-input-rac-D7zsAary.js} +1 -1
- package/dist/component/{time-input-rac-CxVZ3USX.js → time-input-rac-CDiPbISF.js} +4 -4
- package/dist/component/{url-input-field-rac-4oVJMr1a.js → url-input-field-rac-oi5ViIKm.js} +4 -4
- package/dist/component/{url-input-rac--T-FnskQ.js → url-input-rac-Bs8MYm-g.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-BFHRYpVL.js → use-dropdown-option-class-name-BqtzLp8Y.js} +1 -1
- package/dist/component/{use-element-state-class-name-De5YnxMK.js → use-element-state-class-name-Cego6EXH.js} +1 -1
- package/dist/component/{use-is-forced-open-dropdown-CWvcd9Ex.js → use-is-forced-open-dropdown-Do-gps07.js} +1 -1
- package/dist/component/{use-service-options-base-CD1EVWRE.js → use-service-options-base-CoXyq3zH.js} +1 -1
- package/dist/component/{use-text-input-class-name-BYwXccvO.js → use-text-input-class-name-BUFPGIgC.js} +2 -2
- package/package.json +2 -2
- package/dist/component/date-picker-field-rac-Cc9hJloJ.js +0 -317
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import a from "classnames";
|
|
2
2
|
import { s as o } from "./field-rac.module-DobpyqOd.js";
|
|
3
3
|
import { m as r } from "./form-element-classes-BtKlobUX.js";
|
|
4
|
-
import { u as l } from "./use-element-state-class-name-
|
|
4
|
+
import { u as l } from "./use-element-state-class-name-Cego6EXH.js";
|
|
5
5
|
const m = {
|
|
6
6
|
base: o.selectOption,
|
|
7
7
|
selected: o.selectOptionSelected,
|
package/dist/component/{use-service-options-base-CD1EVWRE.js → use-service-options-base-CoXyq3zH.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState as o, useCallback as D, useEffect as m, useMemo as b } from "react";
|
|
2
|
-
import { aj as v } from "./form-
|
|
2
|
+
import { aj as v } from "./form-CVz1PefD.js";
|
|
3
3
|
const j = (I) => {
|
|
4
4
|
const { fieldType: L, isEditor: t = !1, postProcessOptions: i, customFetchLogic: a, onInitialDataLoaded: n } = I, [O, h] = o(!1), [g, p] = o([]), [E, u] = o(!1), [c, f] = o(!1), s = v(L), r = D((e) => {
|
|
5
5
|
let d = e.map((l) => ({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ak as l } from "./form-
|
|
1
|
+
import { ak as l } from "./form-CVz1PefD.js";
|
|
2
2
|
import { s } from "./field-rac.module-DobpyqOd.js";
|
|
3
3
|
import { a1 as m } from "./form-element-classes-BtKlobUX.js";
|
|
4
|
-
import { u as i } from "./use-element-state-class-name-
|
|
4
|
+
import { u as i } from "./use-element-state-class-name-Cego6EXH.js";
|
|
5
5
|
const c = (...e) => {
|
|
6
6
|
const { disabled: a, readOnly: t } = l(), o = i({
|
|
7
7
|
globalClasses: m,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/form-elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.99.0",
|
|
4
4
|
"description": "The Wix Forms rendering element for Builder apps, loaded at runtime as @wix/form-elements/Form",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -156,5 +156,5 @@
|
|
|
156
156
|
]
|
|
157
157
|
}
|
|
158
158
|
},
|
|
159
|
-
"falconPackageHash": "
|
|
159
|
+
"falconPackageHash": "fa3beffca7223e7b04d0a9343372a4ae4a25f6050df509caa8222ec7"
|
|
160
160
|
}
|
|
@@ -1,317 +0,0 @@
|
|
|
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-9WmwgGNc.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-B6x_cVEi.js";
|
|
11
|
-
import { L as ye } from "./field-label-headless-BibCD8xx.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-CWvcd9Ex.js";
|
|
14
|
-
import { i as _e } from "./date-availability-LN33GU7O.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
|
-
};
|