@tpc-mare/mare-ui-components-react 0.1.26 → 0.1.28
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/avatar/index.js +1 -1
- package/dist/badge/index.js +1 -1
- package/dist/banner/index.js +1 -1
- package/dist/button/index.js +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/combobox/index.js +1 -1
- package/dist/confirm-dialog/index.js +1 -1
- package/dist/counter/index.js +1 -1
- package/dist/date-picker/index.js +1 -1
- package/dist/dialog/index.js +2 -2
- package/dist/divider/index.js +1 -1
- package/dist/drawer/index.js +1 -1
- package/dist/expandable-counter/index.js +1 -1
- package/dist/filter-chip/index.js +1 -1
- package/dist/filter-chip-dropdown-multiple/index.js +1 -1
- package/dist/filter-chip-dropdown-single/index.js +1 -1
- package/dist/floating-action-button/index.js +1 -1
- package/dist/image-item/index.js +1 -1
- package/dist/index/index.js +41 -41
- package/dist/input-number/index.js +1 -1
- package/dist/input-otp/index.js +1 -1
- package/dist/input-text/IconField.d.ts +3 -1
- package/dist/input-text/index.js +2 -2
- package/dist/keyboard-commands/index.d.ts +5 -0
- package/dist/keyboard-commands/index.js +825 -0
- package/dist/keyboard-commands/useKeyboardCommands.d.ts +27 -0
- package/dist/keyboard-commands/useKeyboardNavGrid.d.ts +19 -0
- package/dist/keyboard-commands/useKeyboardNavList.d.ts +17 -0
- package/dist/keyboard-commands/useKeyboardScope.d.ts +20 -0
- package/dist/message/index.js +1 -1
- package/dist/multi-select/index.js +1 -1
- package/dist/overlay-badge/index.js +1 -1
- package/dist/paginator/index.js +1 -1
- package/dist/password/index.js +1 -1
- package/dist/radio-group/index.js +1 -1
- package/dist/search-field/index.js +1 -1
- package/dist/segmented-control/index.js +1 -1
- package/dist/select-field/index.js +1 -1
- package/dist/shared/{Avatar-D3QlO3Tz.js → Avatar-BpJDY1wm.js} +24 -22
- package/dist/shared/{Badge-WC6my4Aw.js → Badge-CGotZzok.js} +16 -9
- package/dist/shared/Banner-D4na_bM8.js +60 -0
- package/dist/shared/{Button-DwJ5RTfQ.js → Button-C2ULmKj3.js} +64 -57
- package/dist/shared/{Checkbox-BXnSN2vK.js → Checkbox-DCq3_MWz.js} +35 -33
- package/dist/shared/{Combobox-CcmWgRYZ.js → Combobox-DrkeDMW0.js} +48 -47
- package/dist/shared/{ConfirmDialog-DLHY-c70.js → ConfirmDialog-CjrWhDx8.js} +33 -27
- package/dist/shared/{Counter-DjIoe4h3.js → Counter-0siKQRKc.js} +42 -41
- package/dist/shared/{DatePicker-CwAISvNc.js → DatePicker-DhIWE0V_.js} +246 -240
- package/dist/shared/{DialogFooter-DyltZzK-.js → DialogFooter-CDlh11Gy.js} +34 -32
- package/dist/shared/{DialogHeader-M5Bfyxos.js → DialogHeader-PMBgMjsb.js} +2 -2
- package/dist/shared/{Divider-UgKI7dtK.js → Divider-CSQOHeMo.js} +16 -14
- package/dist/shared/{DrawerFooter-B9-Vrgd3.js → DrawerFooter-Bb-X7keE.js} +62 -54
- package/dist/shared/{ExpandableCounter-DZxbdqRa.js → ExpandableCounter-pPJIrd6L.js} +2 -2
- package/dist/shared/{FilterChip-eECL3oO7.js → FilterChip-TpKF-4vP.js} +21 -20
- package/dist/shared/{FilterChipDropdownMultiple-D2eMYXyS.js → FilterChipDropdownMultiple-2mr_Z57i.js} +43 -42
- package/dist/shared/{FilterChipDropdownSingle-C7ahD-_3.js → FilterChipDropdownSingle-CLmWzX9q.js} +39 -38
- package/dist/shared/FloatingActionButton-BWB5Taeg.js +28 -0
- package/dist/shared/{HelperText-CVWWvLCI.js → HelperText-zmUym82m.js} +1 -1
- package/dist/shared/IconField-CqKydKep.js +81 -0
- package/dist/shared/ImageItem-CL2VGEha.js +19 -0
- package/dist/shared/InputNumber-nxus9h5s.js +64 -0
- package/dist/shared/{InputOtp-CUXXVP2E.js → InputOtp-BxBc6Vhs.js} +16 -15
- package/dist/shared/InputText.types-KhlkzHMw-BtRY371_.js +4 -0
- package/dist/shared/Message-CQUdM9rR.js +81 -0
- package/dist/shared/{MultiSelect-Dowp0_FX.js → MultiSelect-DlaYWcPo.js} +60 -59
- package/dist/shared/{OverlayBadge-DLskqll7.js → OverlayBadge-Dkosm3Il.js} +1 -1
- package/dist/shared/{Paginator-DxZdCXSC.js → Paginator-QTDpAJ-N.js} +2 -2
- package/dist/shared/Password-D4PRaleH.js +97 -0
- package/dist/shared/{RadioGroup-lw27DCoV.js → RadioGroup-B8CXU8-l.js} +44 -38
- package/dist/shared/{SearchField-DjJHDaR4.js → SearchField-DIsFhJ22.js} +1 -1
- package/dist/shared/{SegmentedControl-Ct5ZLXpN.js → SegmentedControl-BfE3jNM6.js} +35 -33
- package/dist/shared/{SelectField-B-g52vHx.js → SelectField-CcnbnPEi.js} +30 -29
- package/dist/shared/Skeleton-DpWtYSz4.js +30 -0
- package/dist/shared/{Slider-CXFkperZ.js → Slider-Cl9PyH2q.js} +28 -22
- package/dist/shared/Snackbar-3BxmqK8x.js +105 -0
- package/dist/shared/{Stepper-By8M5bs0.js → Stepper-DrKKSn_j.js} +42 -37
- package/dist/shared/{Switch-DNCn0xjb.js → Switch-B5DSQLFL.js} +31 -29
- package/dist/shared/{Tabs-BqIorZYD.js → Tabs-DuufYBV2.js} +19 -17
- package/dist/shared/{Tag-BtbmgIwL.js → Tag-uIK_GPrs.js} +24 -15
- package/dist/shared/{TagChip-Bs7srjIL.js → TagChip-CP3aX2_G.js} +28 -26
- package/dist/shared/Textarea-DHJIWBRM.js +42 -0
- package/dist/shared/{field-layout-D34MpDMB.js → field-layout-o6bDLvVU.js} +6 -6
- package/dist/shared/index-ByQ37VXf.js +6 -0
- package/dist/skeleton/index.js +1 -1
- package/dist/slider/index.js +1 -1
- package/dist/snackbar/index.js +1 -1
- package/dist/stepper/index.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/tabs/index.js +1 -1
- package/dist/tag/index.js +1 -1
- package/dist/tag-chip/index.js +1 -1
- package/dist/textarea/index.js +1 -1
- package/dist/utilities-standalone.css +1 -1
- package/package.json +1 -1
- package/dist/shared/Banner-C4wLe6N0.js +0 -52
- package/dist/shared/FloatingActionButton-D4FK6uSs.js +0 -19
- package/dist/shared/IconField-Dh6j6SL1.js +0 -78
- package/dist/shared/ImageItem-BBy5fOl3.js +0 -17
- package/dist/shared/InputNumber-D48wsE-o.js +0 -62
- package/dist/shared/Message-BNsFuQU1.js +0 -70
- package/dist/shared/Password-BMKy8dAy.js +0 -95
- package/dist/shared/Skeleton-CAjoF-T2.js +0 -29
- package/dist/shared/Snackbar-CjTqCOaV.js +0 -100
- package/dist/shared/Textarea-iJhYTZos.js +0 -40
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import { jsxs as u, jsx as l, Fragment as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { DatePickerRoot as
|
|
4
|
-
import { Portal as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { I as
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { jsxs as u, jsx as l, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
+
import { useState as tr, useEffect as nr, useMemo as le } from "react";
|
|
3
|
+
import { DatePickerRoot as or, DatePickerLabel as lr, DatePickerControl as ir, DatePickerTrigger as sr, DatePickerContext as ie, DatePickerClearTrigger as cr, DatePickerPositioner as mr, DatePickerContent as dr, DatePickerView as O, DatePickerViewControl as ur, DatePickerPrevTrigger as hr, DatePickerViewTrigger as fr, DatePickerRangeText as se, DatePickerNextTrigger as pr, DatePickerTable as be, DatePickerTableHead as yr, DatePickerTableRow as W, DatePickerTableHeader as gr, DatePickerTableBody as xe, DatePickerTableCell as Me, DatePickerTableCellTrigger as we } from "@ark-ui/react/date-picker";
|
|
4
|
+
import { Portal as $r } from "@ark-ui/react/portal";
|
|
5
|
+
import { o as ce } from "./index-ByQ37VXf.js";
|
|
6
|
+
import { c as br } from "./createReactComponent-Cb6Pzf10.js";
|
|
7
|
+
import { I as xr } from "./IconX-CpPADKjZ.js";
|
|
8
|
+
import { I as Mr, a as wr } from "./IconChevronRight-DEIDRsvg.js";
|
|
9
|
+
import { m as kr } from "./InputText.types-KhlkzHMw-BtRY371_.js";
|
|
10
|
+
const Dr = [["path", { d: "M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12", key: "svg-0" }], ["path", { d: "M16 3v4", key: "svg-1" }], ["path", { d: "M8 3v4", key: "svg-2" }], ["path", { d: "M4 11h16", key: "svg-3" }], ["path", { d: "M11 15h1", key: "svg-4" }], ["path", { d: "M12 15v3", key: "svg-5" }]], vr = br("outline", "calendar", "Calendar", Dr);
|
|
11
|
+
function z(e, r) {
|
|
10
12
|
return e - r * Math.floor(e / r);
|
|
11
13
|
}
|
|
12
|
-
const
|
|
14
|
+
const ke = 1721426;
|
|
13
15
|
function N(e, r, a, t) {
|
|
14
|
-
r =
|
|
16
|
+
r = X(e, r);
|
|
15
17
|
let n = r - 1, o = -2;
|
|
16
|
-
return a <= 2 ? o = 0 : Y(r) && (o = -1),
|
|
18
|
+
return a <= 2 ? o = 0 : Y(r) && (o = -1), ke - 1 + 365 * n + Math.floor(n / 4) - Math.floor(n / 100) + Math.floor(n / 400) + Math.floor((367 * a - 362) / 12 + o + t);
|
|
17
19
|
}
|
|
18
20
|
function Y(e) {
|
|
19
21
|
return e % 4 === 0 && (e % 100 !== 0 || e % 400 === 0);
|
|
20
22
|
}
|
|
21
|
-
function
|
|
23
|
+
function X(e, r) {
|
|
22
24
|
return e === "BC" ? 1 - r : r;
|
|
23
25
|
}
|
|
24
|
-
function
|
|
26
|
+
function Tr(e) {
|
|
25
27
|
let r = "AD";
|
|
26
28
|
return e <= 0 && (r = "BC", e = 1 - e), [
|
|
27
29
|
r,
|
|
28
30
|
e
|
|
29
31
|
];
|
|
30
32
|
}
|
|
31
|
-
const
|
|
33
|
+
const Ir = {
|
|
32
34
|
standard: [
|
|
33
35
|
31,
|
|
34
36
|
28,
|
|
@@ -60,16 +62,16 @@ const kr = {
|
|
|
60
62
|
};
|
|
61
63
|
class P {
|
|
62
64
|
fromJulianDay(r) {
|
|
63
|
-
let a = r, t = a -
|
|
64
|
-
a < N(
|
|
65
|
-
let I = Math.floor(((w + b) * 12 + 373) / 367), A = a - N(
|
|
66
|
-
return new v(
|
|
65
|
+
let a = r, t = a - ke, n = Math.floor(t / 146097), o = z(t, 146097), i = Math.floor(o / 36524), m = z(o, 36524), d = Math.floor(m / 1461), h = z(m, 1461), $ = Math.floor(h / 365), R = n * 400 + i * 100 + d * 4 + $ + (i !== 4 && $ !== 4 ? 1 : 0), [p, y] = Tr(R), w = a - N(p, y, 1, 1), b = 2;
|
|
66
|
+
a < N(p, y, 3, 1) ? b = 0 : Y(y) && (b = 1);
|
|
67
|
+
let I = Math.floor(((w + b) * 12 + 373) / 367), A = a - N(p, y, I, 1) + 1;
|
|
68
|
+
return new v(p, y, I, A);
|
|
67
69
|
}
|
|
68
70
|
toJulianDay(r) {
|
|
69
71
|
return N(r.era, r.year, r.month, r.day);
|
|
70
72
|
}
|
|
71
73
|
getDaysInMonth(r) {
|
|
72
|
-
return
|
|
74
|
+
return Ir[Y(r.year) ? "leapyear" : "standard"][r.month - 1];
|
|
73
75
|
}
|
|
74
76
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
75
77
|
getMonthsInYear(r) {
|
|
@@ -104,43 +106,43 @@ class P {
|
|
|
104
106
|
this.identifier = "gregory";
|
|
105
107
|
}
|
|
106
108
|
}
|
|
107
|
-
function
|
|
109
|
+
function Nr(e, r) {
|
|
108
110
|
return e.isEqual?.(r) ?? r.isEqual?.(e) ?? e.identifier === r.identifier;
|
|
109
111
|
}
|
|
110
|
-
function
|
|
112
|
+
function De(e, r) {
|
|
111
113
|
return e.calendar.toJulianDay(e) - r.calendar.toJulianDay(r);
|
|
112
114
|
}
|
|
113
|
-
function
|
|
114
|
-
return
|
|
115
|
+
function Cr(e, r) {
|
|
116
|
+
return me(e) - me(r);
|
|
115
117
|
}
|
|
116
|
-
function
|
|
118
|
+
function me(e) {
|
|
117
119
|
return e.hour * 36e5 + e.minute * 6e4 + e.second * 1e3 + e.millisecond;
|
|
118
120
|
}
|
|
119
|
-
let L = null,
|
|
120
|
-
function
|
|
121
|
+
let L = null, Sr = !1;
|
|
122
|
+
function Z() {
|
|
121
123
|
return L == null && (L = new Intl.DateTimeFormat().resolvedOptions().timeZone), L;
|
|
122
124
|
}
|
|
123
|
-
function
|
|
124
|
-
return
|
|
125
|
+
function ve() {
|
|
126
|
+
return Sr;
|
|
125
127
|
}
|
|
126
|
-
function
|
|
127
|
-
e =
|
|
128
|
-
let r =
|
|
129
|
-
return
|
|
128
|
+
function de(e) {
|
|
129
|
+
e = ee(e, new P());
|
|
130
|
+
let r = X(e.era, e.year);
|
|
131
|
+
return Te(r, e.month, e.day, e.hour, e.minute, e.second, e.millisecond);
|
|
130
132
|
}
|
|
131
|
-
function
|
|
133
|
+
function Te(e, r, a, t, n, o, i) {
|
|
132
134
|
let m = /* @__PURE__ */ new Date();
|
|
133
135
|
return m.setUTCHours(t, n, o, i), m.setUTCFullYear(e, r - 1, a), m.getTime();
|
|
134
136
|
}
|
|
135
|
-
function
|
|
137
|
+
function ue(e, r) {
|
|
136
138
|
if (r === "UTC") return 0;
|
|
137
|
-
if (e > 0 && r ===
|
|
138
|
-
let { year: a, month: t, day: n, hour: o, minute: i, second: m } =
|
|
139
|
-
return
|
|
139
|
+
if (e > 0 && r === Z() && !ve()) return new Date(e).getTimezoneOffset() * -6e4;
|
|
140
|
+
let { year: a, month: t, day: n, hour: o, minute: i, second: m } = Ie(e, r);
|
|
141
|
+
return Te(a, t, n, o, i, m, 0) - Math.floor(e / 1e3) * 1e3;
|
|
140
142
|
}
|
|
141
|
-
const
|
|
142
|
-
function
|
|
143
|
-
let a =
|
|
143
|
+
const he = /* @__PURE__ */ new Map();
|
|
144
|
+
function Ie(e, r) {
|
|
145
|
+
let a = he.get(r);
|
|
144
146
|
a || (a = new Intl.DateTimeFormat("en-US", {
|
|
145
147
|
timeZone: r,
|
|
146
148
|
hour12: !1,
|
|
@@ -151,7 +153,7 @@ function ve(e, r) {
|
|
|
151
153
|
hour: "numeric",
|
|
152
154
|
minute: "numeric",
|
|
153
155
|
second: "numeric"
|
|
154
|
-
}),
|
|
156
|
+
}), he.set(r, a));
|
|
155
157
|
let t = a.formatToParts(new Date(e)), n = {};
|
|
156
158
|
for (let o of t) o.type !== "literal" && (n[o.type] = o.value);
|
|
157
159
|
return {
|
|
@@ -164,28 +166,28 @@ function ve(e, r) {
|
|
|
164
166
|
second: +n.second
|
|
165
167
|
};
|
|
166
168
|
}
|
|
167
|
-
const
|
|
168
|
-
function
|
|
169
|
+
const fe = 864e5;
|
|
170
|
+
function Yr(e, r, a, t) {
|
|
169
171
|
return (a === t ? [
|
|
170
172
|
a
|
|
171
173
|
] : [
|
|
172
174
|
a,
|
|
173
175
|
t
|
|
174
|
-
]).filter((o) =>
|
|
176
|
+
]).filter((o) => Er(e, r, o));
|
|
175
177
|
}
|
|
176
|
-
function
|
|
177
|
-
let t =
|
|
178
|
+
function Er(e, r, a) {
|
|
179
|
+
let t = Ie(a, r);
|
|
178
180
|
return e.year === t.year && e.month === t.month && e.day === t.day && e.hour === t.hour && e.minute === t.minute && e.second === t.second;
|
|
179
181
|
}
|
|
180
|
-
function
|
|
181
|
-
let t =
|
|
182
|
-
if (r === "UTC") return
|
|
183
|
-
if (r ===
|
|
184
|
-
t =
|
|
185
|
-
let d = /* @__PURE__ */ new Date(), h =
|
|
182
|
+
function Pr(e, r, a = "compatible") {
|
|
183
|
+
let t = Ce(e);
|
|
184
|
+
if (r === "UTC") return de(t);
|
|
185
|
+
if (r === Z() && a === "compatible" && !ve()) {
|
|
186
|
+
t = ee(t, new P());
|
|
187
|
+
let d = /* @__PURE__ */ new Date(), h = X(t.era, t.year);
|
|
186
188
|
return d.setFullYear(h, t.month - 1, t.day), d.setHours(t.hour, t.minute, t.second, t.millisecond), d.getTime();
|
|
187
189
|
}
|
|
188
|
-
let n =
|
|
190
|
+
let n = de(t), o = ue(n - fe, r), i = ue(n + fe, r), m = Yr(t, r, n - o, n - i);
|
|
189
191
|
if (m.length === 1) return m[0];
|
|
190
192
|
if (m.length > 1) switch (a) {
|
|
191
193
|
// 'compatible' means 'earlier' for "fall back" transitions
|
|
@@ -208,23 +210,23 @@ function Cr(e, r, a = "compatible") {
|
|
|
208
210
|
throw new RangeError("No such absolute time found");
|
|
209
211
|
}
|
|
210
212
|
}
|
|
211
|
-
function
|
|
212
|
-
return new Date(
|
|
213
|
+
function Ne(e, r, a = "compatible") {
|
|
214
|
+
return new Date(Pr(e, r, a));
|
|
213
215
|
}
|
|
214
|
-
function
|
|
216
|
+
function Ce(e, r) {
|
|
215
217
|
let a = 0, t = 0, n = 0, o = 0;
|
|
216
218
|
if ("timeZone" in e) ({ hour: a, minute: t, second: n, millisecond: o } = e);
|
|
217
219
|
else if ("hour" in e && !r) return e;
|
|
218
220
|
return r && ({ hour: a, minute: t, second: n, millisecond: o } = r), new T(e.calendar, e.era, e.year, e.month, e.day, a, t, n, o);
|
|
219
221
|
}
|
|
220
|
-
function
|
|
221
|
-
if (
|
|
222
|
+
function ee(e, r) {
|
|
223
|
+
if (Nr(e.calendar, r)) return e;
|
|
222
224
|
let a = r.fromJulianDay(e.calendar.toJulianDay(e)), t = e.copy();
|
|
223
225
|
return t.calendar = r, t.era = a.era, t.year = a.year, t.month = a.month, t.day = a.day, x(t), t;
|
|
224
226
|
}
|
|
225
|
-
function
|
|
226
|
-
let a = e.copy(), t = "hour" in a ?
|
|
227
|
-
|
|
227
|
+
function re(e, r) {
|
|
228
|
+
let a = e.copy(), t = "hour" in a ? Fr(a, r) : 0;
|
|
229
|
+
Q(a, r.years || 0), a.calendar.balanceYearMonth && a.calendar.balanceYearMonth(a, e), a.month += r.months || 0, K(a), Se(a), a.day += (r.weeks || 0) * 7, a.day += r.days || 0, a.day += t, Vr(a), a.calendar.balanceDate && a.calendar.balanceDate(a), a.year < 1 && (a.year = 1, a.month = 1, a.day = 1);
|
|
228
230
|
let n = a.calendar.getYearsInEra(a);
|
|
229
231
|
if (a.year > n) {
|
|
230
232
|
let i = a.calendar.isInverseEra?.(a);
|
|
@@ -234,60 +236,60 @@ function ee(e, r) {
|
|
|
234
236
|
let o = a.calendar.getMonthsInYear(a);
|
|
235
237
|
return a.month > o && (a.month = o, a.day = a.calendar.getDaysInMonth(a)), a.day = Math.max(1, Math.min(a.calendar.getDaysInMonth(a), a.day)), a;
|
|
236
238
|
}
|
|
237
|
-
function
|
|
239
|
+
function Q(e, r) {
|
|
238
240
|
e.calendar.isInverseEra?.(e) && (r = -r), e.year += r;
|
|
239
241
|
}
|
|
240
|
-
function
|
|
242
|
+
function K(e) {
|
|
241
243
|
for (; e.month < 1; )
|
|
242
|
-
|
|
244
|
+
Q(e, -1), e.month += e.calendar.getMonthsInYear(e);
|
|
243
245
|
let r = 0;
|
|
244
246
|
for (; e.month > (r = e.calendar.getMonthsInYear(e)); )
|
|
245
|
-
e.month -= r,
|
|
247
|
+
e.month -= r, Q(e, 1);
|
|
246
248
|
}
|
|
247
|
-
function
|
|
249
|
+
function Vr(e) {
|
|
248
250
|
for (; e.day < 1; )
|
|
249
|
-
e.month--,
|
|
251
|
+
e.month--, K(e), e.day += e.calendar.getDaysInMonth(e);
|
|
250
252
|
for (; e.day > e.calendar.getDaysInMonth(e); )
|
|
251
|
-
e.day -= e.calendar.getDaysInMonth(e), e.month++,
|
|
253
|
+
e.day -= e.calendar.getDaysInMonth(e), e.month++, K(e);
|
|
252
254
|
}
|
|
253
|
-
function
|
|
255
|
+
function Se(e) {
|
|
254
256
|
e.month = Math.max(1, Math.min(e.calendar.getMonthsInYear(e), e.month)), e.day = Math.max(1, Math.min(e.calendar.getDaysInMonth(e), e.day));
|
|
255
257
|
}
|
|
256
258
|
function x(e) {
|
|
257
|
-
e.calendar.constrainDate && e.calendar.constrainDate(e), e.year = Math.max(1, Math.min(e.calendar.getYearsInEra(e), e.year)),
|
|
259
|
+
e.calendar.constrainDate && e.calendar.constrainDate(e), e.year = Math.max(1, Math.min(e.calendar.getYearsInEra(e), e.year)), Se(e);
|
|
258
260
|
}
|
|
259
|
-
function
|
|
261
|
+
function Rr(e) {
|
|
260
262
|
let r = {};
|
|
261
263
|
for (let a in e) typeof e[a] == "number" && (r[a] = -e[a]);
|
|
262
264
|
return r;
|
|
263
265
|
}
|
|
264
|
-
function
|
|
265
|
-
return
|
|
266
|
+
function Ye(e, r) {
|
|
267
|
+
return re(e, Rr(r));
|
|
266
268
|
}
|
|
267
|
-
function
|
|
269
|
+
function Ee(e, r) {
|
|
268
270
|
let a = e.copy();
|
|
269
271
|
return r.era != null && (a.era = r.era), r.year != null && (a.year = r.year), r.month != null && (a.month = r.month), r.day != null && (a.day = r.day), x(a), a;
|
|
270
272
|
}
|
|
271
|
-
function
|
|
273
|
+
function Ar(e, r) {
|
|
272
274
|
let a = e.copy();
|
|
273
|
-
return r.hour != null && (a.hour = r.hour), r.minute != null && (a.minute = r.minute), r.second != null && (a.second = r.second), r.millisecond != null && (a.millisecond = r.millisecond),
|
|
275
|
+
return r.hour != null && (a.hour = r.hour), r.minute != null && (a.minute = r.minute), r.second != null && (a.second = r.second), r.millisecond != null && (a.millisecond = r.millisecond), _r(a), a;
|
|
274
276
|
}
|
|
275
|
-
function
|
|
277
|
+
function Br(e) {
|
|
276
278
|
e.second += Math.floor(e.millisecond / 1e3), e.millisecond = C(e.millisecond, 1e3), e.minute += Math.floor(e.second / 60), e.second = C(e.second, 60), e.hour += Math.floor(e.minute / 60), e.minute = C(e.minute, 60);
|
|
277
279
|
let r = Math.floor(e.hour / 24);
|
|
278
280
|
return e.hour = C(e.hour, 24), r;
|
|
279
281
|
}
|
|
280
|
-
function
|
|
282
|
+
function _r(e) {
|
|
281
283
|
e.millisecond = Math.max(0, Math.min(e.millisecond, 1e3)), e.second = Math.max(0, Math.min(e.second, 59)), e.minute = Math.max(0, Math.min(e.minute, 59)), e.hour = Math.max(0, Math.min(e.hour, 23));
|
|
282
284
|
}
|
|
283
285
|
function C(e, r) {
|
|
284
286
|
let a = e % r;
|
|
285
287
|
return a < 0 && (a += r), a;
|
|
286
288
|
}
|
|
287
|
-
function
|
|
288
|
-
return e.hour += r.hours || 0, e.minute += r.minutes || 0, e.second += r.seconds || 0, e.millisecond += r.milliseconds || 0,
|
|
289
|
+
function Fr(e, r) {
|
|
290
|
+
return e.hour += r.hours || 0, e.minute += r.minutes || 0, e.second += r.seconds || 0, e.millisecond += r.milliseconds || 0, Br(e);
|
|
289
291
|
}
|
|
290
|
-
function
|
|
292
|
+
function Pe(e, r, a, t) {
|
|
291
293
|
let n = e.copy();
|
|
292
294
|
switch (r) {
|
|
293
295
|
case "era": {
|
|
@@ -310,7 +312,7 @@ function Ye(e, r, a, t) {
|
|
|
310
312
|
}
|
|
311
313
|
return e.calendar.balanceDate && e.calendar.balanceDate(n), x(n), n;
|
|
312
314
|
}
|
|
313
|
-
function
|
|
315
|
+
function jr(e, r, a, t) {
|
|
314
316
|
let n = e.copy();
|
|
315
317
|
switch (r) {
|
|
316
318
|
case "hour": {
|
|
@@ -345,17 +347,17 @@ function f(e, r, a, t, n = !1) {
|
|
|
345
347
|
e += r, e < a ? e = t - (a - e - 1) : e > t && (e = a + (e - t - 1));
|
|
346
348
|
return e;
|
|
347
349
|
}
|
|
348
|
-
function
|
|
350
|
+
function Hr(e) {
|
|
349
351
|
return `${String(e.hour).padStart(2, "0")}:${String(e.minute).padStart(2, "0")}:${String(e.second).padStart(2, "0")}${e.millisecond ? String(e.millisecond / 1e3).slice(1) : ""}`;
|
|
350
352
|
}
|
|
351
|
-
function
|
|
352
|
-
let r =
|
|
353
|
+
function Ve(e) {
|
|
354
|
+
let r = ee(e, new P()), a;
|
|
353
355
|
return r.era === "BC" ? a = r.year === 1 ? "0000" : "-" + String(Math.abs(1 - r.year)).padStart(6, "00") : a = String(r.year).padStart(4, "0"), `${a}-${String(r.month).padStart(2, "0")}-${String(r.day).padStart(2, "0")}`;
|
|
354
356
|
}
|
|
355
|
-
function
|
|
356
|
-
return `${
|
|
357
|
+
function Or(e) {
|
|
358
|
+
return `${Ve(e)}T${Hr(e)}`;
|
|
357
359
|
}
|
|
358
|
-
function
|
|
360
|
+
function Re(e) {
|
|
359
361
|
let r = typeof e[0] == "object" ? e.shift() : new P(), a;
|
|
360
362
|
if (typeof e[0] == "string") a = e.shift();
|
|
361
363
|
else {
|
|
@@ -378,7 +380,7 @@ class v {
|
|
|
378
380
|
// @ts-ignore
|
|
379
381
|
#e;
|
|
380
382
|
constructor(...r) {
|
|
381
|
-
let [a, t, n, o, i] =
|
|
383
|
+
let [a, t, n, o, i] = Re(r);
|
|
382
384
|
this.calendar = a, this.era = t, this.year = n, this.month = o, this.day = i, x(this);
|
|
383
385
|
}
|
|
384
386
|
/** Returns a copy of this date. */
|
|
@@ -387,43 +389,43 @@ class v {
|
|
|
387
389
|
}
|
|
388
390
|
/** Returns a new `CalendarDate` with the given duration added to it. */
|
|
389
391
|
add(r) {
|
|
390
|
-
return
|
|
392
|
+
return re(this, r);
|
|
391
393
|
}
|
|
392
394
|
/** Returns a new `CalendarDate` with the given duration subtracted from it. */
|
|
393
395
|
subtract(r) {
|
|
394
|
-
return
|
|
396
|
+
return Ye(this, r);
|
|
395
397
|
}
|
|
396
398
|
/**
|
|
397
399
|
* Returns a new `CalendarDate` with the given fields set to the provided values. Other fields
|
|
398
400
|
* will be constrained accordingly.
|
|
399
401
|
*/
|
|
400
402
|
set(r) {
|
|
401
|
-
return
|
|
403
|
+
return Ee(this, r);
|
|
402
404
|
}
|
|
403
405
|
/**
|
|
404
406
|
* Returns a new `CalendarDate` with the given field adjusted by a specified amount.
|
|
405
407
|
* When the resulting value reaches the limits of the field, it wraps around.
|
|
406
408
|
*/
|
|
407
409
|
cycle(r, a, t) {
|
|
408
|
-
return
|
|
410
|
+
return Pe(this, r, a, t);
|
|
409
411
|
}
|
|
410
412
|
/**
|
|
411
413
|
* Converts the date to a native JavaScript Date object, with the time set to midnight in the
|
|
412
414
|
* given time zone.
|
|
413
415
|
*/
|
|
414
416
|
toDate(r) {
|
|
415
|
-
return
|
|
417
|
+
return Ne(this, r);
|
|
416
418
|
}
|
|
417
419
|
/** Converts the date to an ISO 8601 formatted string. */
|
|
418
420
|
toString() {
|
|
419
|
-
return
|
|
421
|
+
return Ve(this);
|
|
420
422
|
}
|
|
421
423
|
/**
|
|
422
424
|
* Compares this date with another. A negative result indicates that this date is before the given
|
|
423
425
|
* one, and a positive date indicates that it is after.
|
|
424
426
|
*/
|
|
425
427
|
compare(r) {
|
|
426
|
-
return
|
|
428
|
+
return De(this, r);
|
|
427
429
|
}
|
|
428
430
|
}
|
|
429
431
|
class T {
|
|
@@ -431,7 +433,7 @@ class T {
|
|
|
431
433
|
// @ts-ignore
|
|
432
434
|
#e;
|
|
433
435
|
constructor(...r) {
|
|
434
|
-
let [a, t, n, o, i] =
|
|
436
|
+
let [a, t, n, o, i] = Re(r);
|
|
435
437
|
this.calendar = a, this.era = t, this.year = n, this.month = o, this.day = i, this.hour = r.shift() || 0, this.minute = r.shift() || 0, this.second = r.shift() || 0, this.millisecond = r.shift() || 0, x(this);
|
|
436
438
|
}
|
|
437
439
|
/** Returns a copy of this date. */
|
|
@@ -440,18 +442,18 @@ class T {
|
|
|
440
442
|
}
|
|
441
443
|
/** Returns a new `CalendarDateTime` with the given duration added to it. */
|
|
442
444
|
add(r) {
|
|
443
|
-
return
|
|
445
|
+
return re(this, r);
|
|
444
446
|
}
|
|
445
447
|
/** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
|
|
446
448
|
subtract(r) {
|
|
447
|
-
return
|
|
449
|
+
return Ye(this, r);
|
|
448
450
|
}
|
|
449
451
|
/**
|
|
450
452
|
* Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields
|
|
451
453
|
* will be constrained accordingly.
|
|
452
454
|
*/
|
|
453
455
|
set(r) {
|
|
454
|
-
return
|
|
456
|
+
return Ee(Ar(this, r), r);
|
|
455
457
|
}
|
|
456
458
|
/**
|
|
457
459
|
* Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
|
|
@@ -463,33 +465,33 @@ class T {
|
|
|
463
465
|
case "year":
|
|
464
466
|
case "month":
|
|
465
467
|
case "day":
|
|
466
|
-
return
|
|
468
|
+
return Pe(this, r, a, t);
|
|
467
469
|
default:
|
|
468
|
-
return
|
|
470
|
+
return jr(this, r, a, t);
|
|
469
471
|
}
|
|
470
472
|
}
|
|
471
473
|
/** Converts the date to a native JavaScript Date object in the given time zone. */
|
|
472
474
|
toDate(r, a) {
|
|
473
|
-
return
|
|
475
|
+
return Ne(this, r, a);
|
|
474
476
|
}
|
|
475
477
|
/** Converts the date to an ISO 8601 formatted string. */
|
|
476
478
|
toString() {
|
|
477
|
-
return
|
|
479
|
+
return Or(this);
|
|
478
480
|
}
|
|
479
481
|
/**
|
|
480
482
|
* Compares this date with another. A negative result indicates that this date is before the given
|
|
481
483
|
* one, and a positive date indicates that it is after.
|
|
482
484
|
*/
|
|
483
485
|
compare(r) {
|
|
484
|
-
let a =
|
|
485
|
-
return a === 0 ?
|
|
486
|
+
let a = De(this, r);
|
|
487
|
+
return a === 0 ? Cr(this, Ce(r)) : a;
|
|
486
488
|
}
|
|
487
489
|
}
|
|
488
|
-
function
|
|
489
|
-
const [r, a] =
|
|
490
|
+
function zr(e) {
|
|
491
|
+
const [r, a] = tr(
|
|
490
492
|
() => typeof window < "u" && window.matchMedia(e).matches
|
|
491
493
|
);
|
|
492
|
-
return
|
|
494
|
+
return nr(() => {
|
|
493
495
|
const t = window.matchMedia(e), n = () => {
|
|
494
496
|
a(t.matches);
|
|
495
497
|
};
|
|
@@ -498,10 +500,10 @@ function Fr(e) {
|
|
|
498
500
|
};
|
|
499
501
|
}, [e]), r;
|
|
500
502
|
}
|
|
501
|
-
const
|
|
503
|
+
const Lr = "(min-width: 640px)", Ur = ["single", "range"], Jr = "mare:relative mare:flex mare:flex-col mare:gap-1.5 mare:w-full", qr = "mare:tpc-typography-label-s mare:text-weak mare:mb-0.5 mare:block", Gr = "mare:relative mare:flex mare:items-center mare:w-full", Wr = "mare:absolute mare:left-3 mare:top-1/2 mare:-translate-y-1/2 mare:flex mare:items-center mare:pointer-events-none mare:text-weak mare:[&>svg]:size-5", Qr = "mare:absolute mare:right-3 mare:top-1/2 mare:-translate-y-1/2 mare:flex mare:items-center mare:text-weak mare:hover:text-default mare:cursor-pointer mare:[&>svg]:size-4", Kr = {
|
|
502
504
|
medium: "mare:h-12",
|
|
503
505
|
small: "mare:h-10"
|
|
504
|
-
},
|
|
506
|
+
}, Xr = (e) => `
|
|
505
507
|
mare:w-full mare:pl-10 mare:pr-9 mare:flex mare:items-center mare:text-left mare:truncate
|
|
506
508
|
mare:tpc-typography-body-m mare:text-default
|
|
507
509
|
mare:border mare:border-strong mare:rounded-input
|
|
@@ -510,8 +512,8 @@ const Hr = "(min-width: 640px)", jr = "mare:relative mare:flex mare:flex-col mar
|
|
|
510
512
|
mare:focus-visible:outline-solid mare:focus-visible:outline-2 mare:focus-visible:outline-accent mare:focus-visible:-outline-offset-2
|
|
511
513
|
mare:data-[invalid]:outline-solid mare:data-[invalid]:outline-2 mare:data-[invalid]:outline-danger mare:data-[invalid]:-outline-offset-2
|
|
512
514
|
mare:ark-disabled:text-disabled mare:ark-disabled:border-disabled-default mare:ark-disabled:cursor-not-allowed
|
|
513
|
-
${
|
|
514
|
-
`,
|
|
515
|
+
${Kr[e]}
|
|
516
|
+
`, Zr = "mare:text-weak", pe = () => `
|
|
515
517
|
mare:z-1103 mare:flex mare:flex-col mare:gap-4 mare:p-4
|
|
516
518
|
mare:bg-raised mare:rounded-tpc-dialog mare:border mare:border-default
|
|
517
519
|
mare:shadow-[0_10px_15px_-3px_rgba(0,0,0,0.10),0_4px_6px_-2px_rgba(0,0,0,0.05)]
|
|
@@ -519,17 +521,17 @@ const Hr = "(min-width: 640px)", jr = "mare:relative mare:flex mare:flex-col mar
|
|
|
519
521
|
mare:not-ark-inline:ark-closed:[animation:mare-menu-exit_100ms_ease-in]
|
|
520
522
|
mare:ark-inline:shadow-none mare:ark-inline:border-none mare:ark-inline:p-0
|
|
521
523
|
mare:min-w-90
|
|
522
|
-
`,
|
|
524
|
+
`, ea = "mare:flex mare:flex-col mare:sm:flex-row mare:gap-6 mare:sm:gap-10", U = "mare:flex mare:flex-col mare:gap-3 mare:[&[hidden]]:hidden", ra = "mare:flex mare:items-center mare:justify-between mare:gap-2", aa = `
|
|
523
525
|
mare:inline-flex mare:items-center mare:justify-center mare:size-8 mare:rounded-full
|
|
524
526
|
mare:text-default mare:cursor-pointer mare:[&>svg]:size-5
|
|
525
527
|
mare:hover:bg-neutral-weak
|
|
526
528
|
mare:focus-visible:outline-solid mare:focus-visible:outline-1 mare:focus-visible:outline-offset-2 mare:focus-visible:outline-accent
|
|
527
529
|
mare:ark-disabled:opacity-40 mare:ark-disabled:cursor-not-allowed mare:ark-disabled:hover:bg-transparent
|
|
528
|
-
`,
|
|
530
|
+
`, ye = aa, ta = `
|
|
529
531
|
mare:inline-flex mare:items-center mare:gap-1 mare:px-2 mare:py-1 mare:rounded-md
|
|
530
532
|
mare:tpc-typography-label-m mare:text-default mare:cursor-pointer
|
|
531
533
|
mare:hover:bg-neutral-weak
|
|
532
|
-
`,
|
|
534
|
+
`, na = "mare:inline-flex mare:items-center mare:gap-1 mare:px-2 mare:py-1 mare:tpc-typography-label-m mare:text-default", Ae = "mare:w-full mare:border-collapse", oa = "mare:tpc-typography-body-s mare:text-default mare:pb-1 mare:font-normal", Be = "mare:p-0.5 mare:text-center", _e = `
|
|
533
535
|
mare:inline-flex mare:items-center mare:justify-center mare:cursor-pointer mare:rounded-full
|
|
534
536
|
mare:tpc-typography-label-s mare:text-default
|
|
535
537
|
mare:hover:bg-neutral-weak
|
|
@@ -543,24 +545,24 @@ const Hr = "(min-width: 640px)", jr = "mare:relative mare:flex mare:flex-col mar
|
|
|
543
545
|
mare:ark-range-start:rounded-l-full mare:ark-range-start:rounded-r-none mare:ark-range-start:bg-accent mare:ark-range-start:text-on-accent
|
|
544
546
|
mare:ark-range-end:rounded-r-full mare:ark-range-end:rounded-l-none mare:ark-range-end:bg-accent mare:ark-range-end:text-on-accent
|
|
545
547
|
mare:ark-range-single:rounded-full
|
|
546
|
-
`,
|
|
547
|
-
${
|
|
548
|
+
`, la = (e) => `
|
|
549
|
+
${_e} mare:w-10 mare:flex-col mare:gap-0.5
|
|
548
550
|
${e ? "mare:h-14 mare:rounded-2xl mare:pt-1" : "mare:h-10"}
|
|
549
|
-
`,
|
|
551
|
+
`, ia = `${_e} mare:w-full mare:h-10`, sa = {
|
|
550
552
|
positive: "mare:text-positive",
|
|
551
553
|
negative: "mare:text-weak"
|
|
552
|
-
},
|
|
554
|
+
}, ca = "mare:tpc-typography-body-xxs mare:w-full mare:text-center mare:min-h-3.5", ma = "mare:flex mare:items-center mare:justify-between mare:pt-3 mare:border-t mare:border-default", da = "mare:flex mare:items-center mare:gap-2 mare:pt-3 mare:border-t mare:border-default", ua = "mare:tpc-typography-label-s mare:text-weak", ha = `
|
|
553
555
|
mare:tpc-typography-body-m mare:text-default mare:bg-transparent
|
|
554
556
|
mare:border mare:border-strong mare:rounded-input mare:px-3 mare:h-10
|
|
555
557
|
mare:outline-none
|
|
556
558
|
mare:focus-visible:outline-solid mare:focus-visible:outline-2 mare:focus-visible:outline-accent mare:focus-visible:-outline-offset-2
|
|
557
|
-
`, M = (e) => String(e).padStart(2, "0"), V = (e) => `${e.getFullYear()}-${M(e.getMonth())}-${M(e.getDate())}`,
|
|
559
|
+
`, M = (e) => String(e).padStart(2, "0"), V = (e) => `${e.getFullYear()}-${M(e.getMonth())}-${M(e.getDate())}`, fa = (e) => new Map(e.map((r) => [V(r.date), r])), pa = (e, r) => e.size === 0 ? null : e.get(V(r))?.price ?? 0, ya = (e, r) => e.get(V(r))?.positive ?? !1, ga = (e, r) => e.get(V(r))?.disabled ?? !1, $a = (e, r) => {
|
|
558
560
|
const a = new Date(e);
|
|
559
561
|
return a.setHours(r.hour, r.minute, r.second, 0), a;
|
|
560
|
-
},
|
|
562
|
+
}, ba = (e, r, a) => {
|
|
561
563
|
let t = e.getTime();
|
|
562
564
|
return r && (t = Math.max(t, r.getTime())), a && (t = Math.min(t, a.getTime())), t === e.getTime() ? e : new Date(t);
|
|
563
|
-
},
|
|
565
|
+
}, xa = (e, r) => e && r ? 2 : 1, J = (e) => `${M(e.getDate())}/${M(e.getMonth() + 1)}/${e.getFullYear()}`, Ma = (e) => `${M(e.getHours())}:${M(e.getMinutes())}`, E = Z();
|
|
564
566
|
function S(e, r) {
|
|
565
567
|
return r ? new T(
|
|
566
568
|
e.getFullYear(),
|
|
@@ -575,19 +577,19 @@ function S(e, r) {
|
|
|
575
577
|
e.getDate()
|
|
576
578
|
);
|
|
577
579
|
}
|
|
578
|
-
const
|
|
579
|
-
function
|
|
580
|
-
const n = e.toDate(E), o = r ?
|
|
580
|
+
const q = (e) => e.toDate(E);
|
|
581
|
+
function wa({ day: e, hasPrices: r, priceMap: a, currency: t }) {
|
|
582
|
+
const n = e.toDate(E), o = r ? pa(a, n) : null;
|
|
581
583
|
return /* @__PURE__ */ u(
|
|
582
|
-
|
|
584
|
+
we,
|
|
583
585
|
{
|
|
584
|
-
className:
|
|
586
|
+
className: la(r),
|
|
585
587
|
children: [
|
|
586
588
|
/* @__PURE__ */ l("span", { children: e.day }),
|
|
587
589
|
o !== null && /* @__PURE__ */ u(
|
|
588
590
|
"span",
|
|
589
591
|
{
|
|
590
|
-
className: `${
|
|
592
|
+
className: `${ca} ${sa[ya(a, n) ? "positive" : "negative"]}`,
|
|
591
593
|
children: [
|
|
592
594
|
t,
|
|
593
595
|
o
|
|
@@ -598,14 +600,14 @@ function ga({ day: e, hasPrices: r, priceMap: a, currency: t }) {
|
|
|
598
600
|
}
|
|
599
601
|
);
|
|
600
602
|
}
|
|
601
|
-
function
|
|
602
|
-
return /* @__PURE__ */ u(
|
|
603
|
-
e && /* @__PURE__ */ l(
|
|
604
|
-
e ? /* @__PURE__ */ l(
|
|
605
|
-
e && /* @__PURE__ */ l(
|
|
603
|
+
function G({ navigation: e }) {
|
|
604
|
+
return /* @__PURE__ */ u(ur, { className: ra, children: [
|
|
605
|
+
e && /* @__PURE__ */ l(hr, { className: ye, children: /* @__PURE__ */ l(Mr, {}) }),
|
|
606
|
+
e ? /* @__PURE__ */ l(fr, { className: ta, children: /* @__PURE__ */ l(se, {}) }) : /* @__PURE__ */ l("span", { className: na, children: /* @__PURE__ */ l(se, {}) }),
|
|
607
|
+
e && /* @__PURE__ */ l(pr, { className: ye, children: /* @__PURE__ */ l(wr, {}) })
|
|
606
608
|
] });
|
|
607
609
|
}
|
|
608
|
-
function
|
|
610
|
+
function ge({
|
|
609
611
|
weeks: e,
|
|
610
612
|
weekDays: r,
|
|
611
613
|
visibleRange: a,
|
|
@@ -613,23 +615,23 @@ function ye({
|
|
|
613
615
|
priceMap: n,
|
|
614
616
|
currency: o
|
|
615
617
|
}) {
|
|
616
|
-
return /* @__PURE__ */ u(
|
|
617
|
-
/* @__PURE__ */ l(
|
|
618
|
-
|
|
618
|
+
return /* @__PURE__ */ u(be, { className: Ae, children: [
|
|
619
|
+
/* @__PURE__ */ l(yr, { children: /* @__PURE__ */ l(W, { children: r.map((i, m) => /* @__PURE__ */ l(
|
|
620
|
+
gr,
|
|
619
621
|
{
|
|
620
|
-
className:
|
|
622
|
+
className: oa,
|
|
621
623
|
children: i.short
|
|
622
624
|
},
|
|
623
625
|
m
|
|
624
626
|
)) }) }),
|
|
625
|
-
/* @__PURE__ */ l(
|
|
626
|
-
|
|
627
|
+
/* @__PURE__ */ l(xe, { children: e.map((i, m) => /* @__PURE__ */ l(W, { children: i.map((d, h) => /* @__PURE__ */ l(
|
|
628
|
+
Me,
|
|
627
629
|
{
|
|
628
630
|
value: d,
|
|
629
631
|
visibleRange: a,
|
|
630
|
-
className:
|
|
632
|
+
className: Be,
|
|
631
633
|
children: /* @__PURE__ */ l(
|
|
632
|
-
|
|
634
|
+
wa,
|
|
633
635
|
{
|
|
634
636
|
day: d,
|
|
635
637
|
hasPrices: t,
|
|
@@ -642,18 +644,18 @@ function ye({
|
|
|
642
644
|
)) }, m)) })
|
|
643
645
|
] });
|
|
644
646
|
}
|
|
645
|
-
function
|
|
647
|
+
function $e({
|
|
646
648
|
cells: e
|
|
647
649
|
}) {
|
|
648
|
-
return /* @__PURE__ */ l(
|
|
649
|
-
|
|
650
|
+
return /* @__PURE__ */ l(be, { className: Ae, children: /* @__PURE__ */ l(xe, { children: e.map((r, a) => /* @__PURE__ */ l(W, { children: r.map((t) => /* @__PURE__ */ l(
|
|
651
|
+
Me,
|
|
650
652
|
{
|
|
651
653
|
value: t.value,
|
|
652
|
-
className:
|
|
654
|
+
className: Be,
|
|
653
655
|
children: /* @__PURE__ */ l(
|
|
654
|
-
|
|
656
|
+
we,
|
|
655
657
|
{
|
|
656
|
-
className:
|
|
658
|
+
className: ia,
|
|
657
659
|
children: t.label
|
|
658
660
|
}
|
|
659
661
|
)
|
|
@@ -661,7 +663,7 @@ function pe({
|
|
|
661
663
|
t.value
|
|
662
664
|
)) }, a)) }) });
|
|
663
665
|
}
|
|
664
|
-
function
|
|
666
|
+
function Ea({
|
|
665
667
|
value: e = null,
|
|
666
668
|
onValueChange: r,
|
|
667
669
|
selectionMode: a = "single",
|
|
@@ -674,62 +676,66 @@ function va({
|
|
|
674
676
|
maxDate: h,
|
|
675
677
|
navigation: $ = !0,
|
|
676
678
|
doubleMonth: R = !1,
|
|
677
|
-
inline:
|
|
678
|
-
clearable:
|
|
679
|
+
inline: p = !1,
|
|
680
|
+
clearable: y = !0,
|
|
679
681
|
prices: w = [],
|
|
680
682
|
currency: b = "$",
|
|
681
683
|
locale: I,
|
|
682
684
|
showTime: A = !1,
|
|
683
685
|
timeOnly: k = !1,
|
|
684
|
-
showSeconds:
|
|
686
|
+
showSeconds: ae = !1,
|
|
685
687
|
footer: B,
|
|
686
|
-
leadingIcon:
|
|
687
|
-
portalContainer:
|
|
688
|
-
onOpenChange:
|
|
689
|
-
onVisibleMonthsChange:
|
|
688
|
+
leadingIcon: Fe,
|
|
689
|
+
portalContainer: je,
|
|
690
|
+
onOpenChange: He,
|
|
691
|
+
onVisibleMonthsChange: Oe
|
|
690
692
|
}) {
|
|
691
|
-
const
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
693
|
+
const _ = ce(
|
|
694
|
+
a,
|
|
695
|
+
Ur,
|
|
696
|
+
"single"
|
|
697
|
+
), ze = ce(t, kr, "medium"), Le = zr(Lr), g = A || k, te = xa(Le, R), Ue = !k && te === 2, F = le(() => fa(w), [w]), j = w.length > 0, Je = le(() => e == null ? [] : (Array.isArray(e) ? e : [e]).filter(
|
|
698
|
+
(c) => c != null
|
|
699
|
+
).map((c) => S(c, g)), [e, g]), qe = (s) => {
|
|
700
|
+
const c = s.value.map((D) => q(D));
|
|
701
|
+
if (_ === "range") {
|
|
696
702
|
r?.(
|
|
697
|
-
|
|
703
|
+
c.length === 0 ? null : [c[0] ?? null, c[1] ?? null]
|
|
698
704
|
);
|
|
699
705
|
return;
|
|
700
706
|
}
|
|
701
|
-
r?.(
|
|
702
|
-
},
|
|
703
|
-
const [D, H,
|
|
704
|
-
|
|
705
|
-
},
|
|
706
|
-
|
|
707
|
+
r?.(c[0] ?? null);
|
|
708
|
+
}, Ge = (s, c) => {
|
|
709
|
+
const [D, H, Ze = 0] = c.split(":").map(Number), er = s.valueAsDate[0] ?? /* @__PURE__ */ new Date(), rr = $a(er, { hour: D, minute: H, second: Ze }), ar = ba(rr, d, h);
|
|
710
|
+
s.setValue([S(ar, !0)]);
|
|
711
|
+
}, We = (s) => /* @__PURE__ */ u(
|
|
712
|
+
O,
|
|
707
713
|
{
|
|
708
714
|
view: "day",
|
|
709
715
|
className: U,
|
|
710
716
|
children: [
|
|
711
|
-
/* @__PURE__ */ l(
|
|
712
|
-
/* @__PURE__ */ u("div", { className:
|
|
717
|
+
/* @__PURE__ */ l(G, { navigation: $ }),
|
|
718
|
+
/* @__PURE__ */ u("div", { className: ea, children: [
|
|
713
719
|
/* @__PURE__ */ l(
|
|
714
|
-
|
|
720
|
+
ge,
|
|
715
721
|
{
|
|
716
|
-
weeks:
|
|
717
|
-
weekDays:
|
|
718
|
-
hasPrices:
|
|
719
|
-
priceMap:
|
|
722
|
+
weeks: s.weeks,
|
|
723
|
+
weekDays: s.weekDays,
|
|
724
|
+
hasPrices: j,
|
|
725
|
+
priceMap: F,
|
|
720
726
|
currency: b
|
|
721
727
|
}
|
|
722
728
|
),
|
|
723
|
-
|
|
724
|
-
const
|
|
729
|
+
Ue && (() => {
|
|
730
|
+
const c = s.getOffset({ months: 1 });
|
|
725
731
|
return /* @__PURE__ */ l(
|
|
726
|
-
|
|
732
|
+
ge,
|
|
727
733
|
{
|
|
728
|
-
weeks:
|
|
729
|
-
weekDays:
|
|
730
|
-
visibleRange:
|
|
731
|
-
hasPrices:
|
|
732
|
-
priceMap:
|
|
734
|
+
weeks: c.weeks,
|
|
735
|
+
weekDays: s.weekDays,
|
|
736
|
+
visibleRange: c.visibleRange,
|
|
737
|
+
hasPrices: j,
|
|
738
|
+
priceMap: F,
|
|
733
739
|
currency: b
|
|
734
740
|
}
|
|
735
741
|
);
|
|
@@ -737,17 +743,17 @@ function va({
|
|
|
737
743
|
] })
|
|
738
744
|
]
|
|
739
745
|
}
|
|
740
|
-
),
|
|
741
|
-
|
|
746
|
+
), Qe = (s) => /* @__PURE__ */ u(
|
|
747
|
+
O,
|
|
742
748
|
{
|
|
743
749
|
view: "month",
|
|
744
750
|
className: U,
|
|
745
751
|
children: [
|
|
746
|
-
/* @__PURE__ */ l(
|
|
752
|
+
/* @__PURE__ */ l(G, { navigation: $ }),
|
|
747
753
|
/* @__PURE__ */ l(
|
|
748
|
-
|
|
754
|
+
$e,
|
|
749
755
|
{
|
|
750
|
-
cells:
|
|
756
|
+
cells: s.getMonthsGrid({
|
|
751
757
|
columns: 4,
|
|
752
758
|
format: "short"
|
|
753
759
|
})
|
|
@@ -755,105 +761,105 @@ function va({
|
|
|
755
761
|
)
|
|
756
762
|
]
|
|
757
763
|
}
|
|
758
|
-
),
|
|
759
|
-
|
|
764
|
+
), Ke = (s) => /* @__PURE__ */ u(
|
|
765
|
+
O,
|
|
760
766
|
{
|
|
761
767
|
view: "year",
|
|
762
768
|
className: U,
|
|
763
769
|
children: [
|
|
764
|
-
/* @__PURE__ */ l(
|
|
765
|
-
/* @__PURE__ */ l(
|
|
770
|
+
/* @__PURE__ */ l(G, { navigation: $ }),
|
|
771
|
+
/* @__PURE__ */ l($e, { cells: s.getYearsGrid({ columns: 4 }) })
|
|
766
772
|
]
|
|
767
773
|
}
|
|
768
|
-
),
|
|
769
|
-
const
|
|
770
|
-
return /* @__PURE__ */ u("div", { className:
|
|
771
|
-
/* @__PURE__ */ l("span", { className:
|
|
774
|
+
), Xe = (s) => {
|
|
775
|
+
const c = s.valueAsDate.at(0), D = c ? `${String(c.getHours()).padStart(2, "0")}:${String(c.getMinutes()).padStart(2, "0")}${ae ? `:${String(c.getSeconds()).padStart(2, "0")}` : ""}` : "";
|
|
776
|
+
return /* @__PURE__ */ u("div", { className: da, children: [
|
|
777
|
+
/* @__PURE__ */ l("span", { className: ua, children: "Hora" }),
|
|
772
778
|
/* @__PURE__ */ l(
|
|
773
779
|
"input",
|
|
774
780
|
{
|
|
775
781
|
type: "time",
|
|
776
|
-
step:
|
|
782
|
+
step: ae ? 1 : void 0,
|
|
777
783
|
value: D,
|
|
778
784
|
disabled: i,
|
|
779
|
-
className:
|
|
785
|
+
className: ha,
|
|
780
786
|
onChange: (H) => {
|
|
781
|
-
|
|
787
|
+
Ge(s, H.target.value);
|
|
782
788
|
}
|
|
783
789
|
}
|
|
784
790
|
)
|
|
785
791
|
] });
|
|
786
|
-
},
|
|
787
|
-
!k &&
|
|
788
|
-
!k &&
|
|
789
|
-
!k &&
|
|
790
|
-
g &&
|
|
791
|
-
B && /* @__PURE__ */ l("div", { className:
|
|
792
|
+
}, ne = /* @__PURE__ */ l(ie, { children: (s) => /* @__PURE__ */ u(oe, { children: [
|
|
793
|
+
!k && We(s),
|
|
794
|
+
!k && Qe(s),
|
|
795
|
+
!k && Ke(s),
|
|
796
|
+
g && Xe(s),
|
|
797
|
+
B && /* @__PURE__ */ l("div", { className: ma, children: B({
|
|
792
798
|
close: () => {
|
|
793
|
-
|
|
799
|
+
s.setOpen(!1);
|
|
794
800
|
},
|
|
795
801
|
clear: () => {
|
|
796
|
-
|
|
802
|
+
s.clearValue();
|
|
797
803
|
}
|
|
798
804
|
}) })
|
|
799
805
|
] }) });
|
|
800
806
|
return /* @__PURE__ */ u(
|
|
801
|
-
|
|
807
|
+
or,
|
|
802
808
|
{
|
|
803
|
-
className:
|
|
804
|
-
selectionMode:
|
|
805
|
-
value:
|
|
806
|
-
onValueChange:
|
|
809
|
+
className: Jr,
|
|
810
|
+
selectionMode: _,
|
|
811
|
+
value: Je,
|
|
812
|
+
onValueChange: qe,
|
|
807
813
|
disabled: i,
|
|
808
814
|
invalid: m,
|
|
809
|
-
inline:
|
|
815
|
+
inline: p,
|
|
810
816
|
timeZone: E,
|
|
811
|
-
numOfMonths:
|
|
817
|
+
numOfMonths: te,
|
|
812
818
|
min: d ? S(d, g) : void 0,
|
|
813
819
|
max: h ? S(h, g) : void 0,
|
|
814
820
|
locale: I,
|
|
815
821
|
closeOnSelect: !B && !g,
|
|
816
|
-
isDateUnavailable:
|
|
817
|
-
onOpenChange: (
|
|
818
|
-
onVisibleRangeChange: (
|
|
819
|
-
|
|
820
|
-
|
|
822
|
+
isDateUnavailable: j ? (s) => ga(F, s.toDate(E)) : void 0,
|
|
823
|
+
onOpenChange: (s) => He?.(s.open),
|
|
824
|
+
onVisibleRangeChange: (s) => Oe?.([
|
|
825
|
+
q(s.visibleRange.start),
|
|
826
|
+
q(s.visibleRange.end)
|
|
821
827
|
]),
|
|
822
828
|
children: [
|
|
823
|
-
n && /* @__PURE__ */ l(
|
|
824
|
-
|
|
825
|
-
/* @__PURE__ */ u(
|
|
826
|
-
/* @__PURE__ */ l("span", { className:
|
|
829
|
+
n && /* @__PURE__ */ l(lr, { className: qr, children: n }),
|
|
830
|
+
p ? /* @__PURE__ */ l("div", { className: pe(), children: ne }) : /* @__PURE__ */ u(oe, { children: [
|
|
831
|
+
/* @__PURE__ */ u(ir, { className: Gr, children: [
|
|
832
|
+
/* @__PURE__ */ l("span", { className: Wr, children: Fe ?? /* @__PURE__ */ l(vr, {}) }),
|
|
827
833
|
/* @__PURE__ */ l(
|
|
828
|
-
|
|
834
|
+
sr,
|
|
829
835
|
{
|
|
830
|
-
className:
|
|
831
|
-
children: /* @__PURE__ */ l(
|
|
832
|
-
const
|
|
833
|
-
return
|
|
834
|
-
|
|
835
|
-
|
|
836
|
+
className: Xr(ze),
|
|
837
|
+
children: /* @__PURE__ */ l(ie, { children: (s) => {
|
|
838
|
+
const c = s.valueAsDate;
|
|
839
|
+
return c.length === 0 ? /* @__PURE__ */ l("span", { className: Zr, children: o }) : _ === "range" ? /* @__PURE__ */ u("span", { children: [
|
|
840
|
+
J(c[0]),
|
|
841
|
+
c[1] ? ` - ${J(c[1])}` : ""
|
|
836
842
|
] }) : /* @__PURE__ */ u("span", { children: [
|
|
837
|
-
|
|
838
|
-
g ? ` ${
|
|
843
|
+
J(c[0]),
|
|
844
|
+
g ? ` ${Ma(c[0])}` : ""
|
|
839
845
|
] });
|
|
840
846
|
} })
|
|
841
847
|
}
|
|
842
848
|
),
|
|
843
|
-
|
|
844
|
-
|
|
849
|
+
y && /* @__PURE__ */ l(
|
|
850
|
+
cr,
|
|
845
851
|
{
|
|
846
|
-
className:
|
|
847
|
-
children: /* @__PURE__ */ l(
|
|
852
|
+
className: Qr,
|
|
853
|
+
children: /* @__PURE__ */ l(xr, {})
|
|
848
854
|
}
|
|
849
855
|
)
|
|
850
856
|
] }),
|
|
851
|
-
/* @__PURE__ */ l(
|
|
857
|
+
/* @__PURE__ */ l($r, { container: je, children: /* @__PURE__ */ l(mr, { children: /* @__PURE__ */ l(dr, { className: pe(), children: ne }) }) })
|
|
852
858
|
] })
|
|
853
859
|
]
|
|
854
860
|
}
|
|
855
861
|
);
|
|
856
862
|
}
|
|
857
863
|
export {
|
|
858
|
-
|
|
864
|
+
Ea as D
|
|
859
865
|
};
|