@konstructio/ui 0.1.2-alpha.3 → 0.1.2-alpha.5
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/{Modal-V67Uz78z.js → Modal-D-NOEWMX.js} +3 -3
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/{chevron-down-BLZPftpV.js → chevron-down-MZvQoT2F.js} +2 -2
- package/dist/chevron-right-VYBOBhRt.js +19 -0
- package/dist/components/Alert/Alert.js +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Badge/Badge.js +2 -2
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/components/Item/Item.js +16 -15
- package/dist/components/Checkbox/Checkbox.js +5 -4
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +2 -2
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +2 -2
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Datepicker/DatePicker.js +545 -543
- package/dist/components/Dropdown/Dropdown.js +36 -24
- package/dist/components/Dropdown/Dropdown.variants.js +25 -7
- package/dist/components/Dropdown/components/List/List.js +59 -44
- package/dist/components/Dropdown/components/List/List.variants.js +9 -7
- package/dist/components/Dropdown/components/ListItem/ListItem.js +48 -24
- package/dist/components/Dropdown/components/ListItem/ListItem.variants.js +9 -7
- package/dist/components/Dropdown/components/Wrapper.js +141 -106
- package/dist/components/Dropdown/contexts/dropdown.context.js +9 -8
- package/dist/components/Dropdown/contexts/dropdown.provider.js +20 -19
- package/dist/components/Dropdown/hooks/useDropdown.js +26 -27
- package/dist/components/Dropdown/hooks/useNavigationList.js +32 -28
- package/dist/components/DropdownButton/DropdownButton.js +1 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +1 -1
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.js +1 -1
- package/dist/components/Input/Input.js +1 -1
- package/dist/components/Loading/Loading.js +2 -2
- package/dist/components/Modal/Modal.js +2 -2
- package/dist/components/Modal/components/Wrapper/Wrapper.js +3 -3
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/NumberInput/NumberInput.js +2 -2
- package/dist/components/PieChart/PieChart.js +217 -215
- package/dist/components/Range/Range.js +1 -1
- package/dist/components/Sidebar/components/Wrapper/Wrapper.js +29 -28
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Switch/Switch.js +6 -5
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.variants.js +45 -24
- package/dist/components/Tabs/components/Content.js +1 -1
- package/dist/components/Tabs/components/List.js +1 -1
- package/dist/components/Tabs/components/Trigger.js +9 -8
- package/dist/components/TagSelect/components/Wrapper/Wrapper.js +98 -49
- package/dist/components/TimePicker/components/Wrapper/Wrapper.js +1 -1
- package/dist/components/Toast/Toast.js +8 -7
- package/dist/components/VirtualizedTable/VirtualizedTable.js +99 -0
- package/dist/components/VirtualizedTable/VirtualizedTable.variants.js +5 -0
- package/dist/components/VirtualizedTable/assets/chevron-down.js +25 -0
- package/dist/components/VirtualizedTable/assets/chevron-up.js +25 -0
- package/dist/components/VirtualizedTable/assets/index.js +6 -0
- package/dist/components/VirtualizedTable/components/Actions/Actions.js +46 -0
- package/dist/components/VirtualizedTable/components/Body/Body.js +25 -0
- package/dist/components/VirtualizedTable/components/DotPaginate/DotPaginate.js +165 -0
- package/dist/components/VirtualizedTable/components/DropdownPaginate/DropdownPaginate.js +34 -0
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +73 -0
- package/dist/components/VirtualizedTable/components/FormPaginate/FormPaginate.js +48 -0
- package/dist/components/VirtualizedTable/components/Header/Header.js +82 -0
- package/dist/components/VirtualizedTable/components/Pagination/Pagination.js +45 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +1870 -0
- package/dist/components/VirtualizedTable/components/index.js +14 -0
- package/dist/components/VirtualizedTable/constants/index.js +5 -0
- package/dist/components/VirtualizedTable/constants/pagination.js +5 -0
- package/dist/components/VirtualizedTable/contexts/index.js +8 -0
- package/dist/components/VirtualizedTable/contexts/table.context.js +31 -0
- package/dist/components/VirtualizedTable/contexts/table.hook.js +11 -0
- package/dist/components/VirtualizedTable/contexts/table.provider.js +778 -0
- package/dist/components/index.js +44 -40
- package/dist/{createLucideIcon-DbC6TvM5.js → createLucideIcon-D2CN7Ma9.js} +4 -4
- package/dist/debounce-BFejQm9P.js +200 -0
- package/dist/{index-D3xzCzcO.js → index-B7t8D14s.js} +2 -2
- package/dist/index-BAEWsOG1.js +27 -0
- package/dist/{index-C9T9HQaa.js → index-BITvcJAz.js} +1 -1
- package/dist/index-BZPx6jYI.js +8 -0
- package/dist/{index-BAraV3ai.js → index-Bnb0ezr3.js} +1 -1
- package/dist/{index-DB2XhXHn.js → index-C84F4YyO.js} +11 -10
- package/dist/index-Cd2vhaop.js +137 -0
- package/dist/{index-iXyXtdgP.js → index-DBbEcSUG.js} +1 -1
- package/dist/index-Dx2grAuN.js +1742 -0
- package/dist/{index-BXuxPoz7.js → index-DzIBBMjs.js} +18 -17
- package/dist/{index-h-Ul0anl.js → index-N2OStZoU.js} +1 -1
- package/dist/{index-Oq5GlCHP.js → index-os7vysFS.js} +1 -1
- package/dist/index-ti1b9kqV.js +14 -0
- package/dist/index.d.ts +94 -5
- package/dist/index.js +41 -37
- package/dist/package.json +26 -22
- package/dist/styles.css +1 -1
- package/dist/{x-BPcqkRZd.js → x-4F_5p77m.js} +1 -1
- package/package.json +26 -22
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/chevron-up-RLP4nX7V.js +0 -54
- package/dist/index-CZnD2QxM.js +0 -32
- package/dist/index-CrBonFvu.js +0 -144
|
@@ -1,23 +1,9 @@
|
|
|
1
1
|
import { jsx as Ee } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import d, { createContext as sn, useContext as an, useCallback as j, useRef as ke, useLayoutEffect as cn, useState as De, useEffect as un, useMemo as Pe } from "react";
|
|
3
3
|
import { cn as ue } from "../../utils/index.js";
|
|
4
4
|
import { datePickerVariants as fn } from "./DatePicker.variants.js";
|
|
5
|
-
import {
|
|
6
|
-
import '../../DatePicker.css'
|
|
7
|
-
* @license lucide-react v0.544.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
12
|
-
const dn = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]], ln = st("chevron-left", dn);
|
|
13
|
-
/**
|
|
14
|
-
* @license lucide-react v0.544.0 - ISC
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the ISC license.
|
|
17
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/
|
|
19
|
-
const hn = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], mn = st("chevron-right", hn);
|
|
20
|
-
function yn(e, t, n = "long") {
|
|
5
|
+
import { C as ln, a as dn } from "../../chevron-right-VYBOBhRt.js";
|
|
6
|
+
import '../../DatePicker.css';function hn(e, t, n = "long") {
|
|
21
7
|
return new Intl.DateTimeFormat("en-US", {
|
|
22
8
|
// Enforces engine to render the time. Without the option JavaScriptCore omits it.
|
|
23
9
|
hour: "numeric",
|
|
@@ -25,29 +11,29 @@ function yn(e, t, n = "long") {
|
|
|
25
11
|
timeZoneName: n
|
|
26
12
|
}).format(t).split(/\s/g).slice(2).join(" ");
|
|
27
13
|
}
|
|
28
|
-
const
|
|
14
|
+
const mn = {}, de = {};
|
|
29
15
|
function ne(e, t) {
|
|
30
16
|
try {
|
|
31
|
-
const r = (
|
|
17
|
+
const r = (mn[e] ||= new Intl.DateTimeFormat("en-US", {
|
|
32
18
|
timeZone: e,
|
|
33
19
|
timeZoneName: "longOffset"
|
|
34
20
|
}).format)(t).split("GMT")[1];
|
|
35
|
-
return r in
|
|
21
|
+
return r in de ? de[r] : Le(r, r.split(":"));
|
|
36
22
|
} catch {
|
|
37
|
-
if (e in
|
|
38
|
-
const n = e?.match(
|
|
23
|
+
if (e in de) return de[e];
|
|
24
|
+
const n = e?.match(yn);
|
|
39
25
|
return n ? Le(e, n.slice(1)) : NaN;
|
|
40
26
|
}
|
|
41
27
|
}
|
|
42
|
-
const
|
|
28
|
+
const yn = /([+-]\d\d):?(\d\d)?/;
|
|
43
29
|
function Le(e, t) {
|
|
44
30
|
const n = +(t[0] || 0), r = +(t[1] || 0), o = +(t[2] || 0) / 60;
|
|
45
|
-
return
|
|
31
|
+
return de[e] = n * 60 + r > 0 ? n * 60 + r + o : n * 60 - r - o;
|
|
46
32
|
}
|
|
47
33
|
class X extends Date {
|
|
48
34
|
//#region static
|
|
49
35
|
constructor(...t) {
|
|
50
|
-
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(ne(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)),
|
|
36
|
+
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(ne(this.timeZone, this)) ? this.setTime(NaN) : t.length ? typeof t[0] == "number" && (t.length === 1 || t.length === 2 && typeof t[1] != "number") ? this.setTime(t[0]) : typeof t[0] == "string" ? this.setTime(+new Date(t[0])) : t[0] instanceof Date ? this.setTime(+t[0]) : (this.setTime(+new Date(...t)), st(this), He(this)) : this.setTime(Date.now());
|
|
51
37
|
}
|
|
52
38
|
static tz(t, ...n) {
|
|
53
39
|
return n.length ? new X(...n, t) : new X(Date.now(), t);
|
|
@@ -80,7 +66,7 @@ Object.getOwnPropertyNames(Date.prototype).forEach((e) => {
|
|
|
80
66
|
X.prototype[t] && (e.startsWith("get") ? X.prototype[e] = function() {
|
|
81
67
|
return this.internal[t]();
|
|
82
68
|
} : (X.prototype[e] = function() {
|
|
83
|
-
return Date.prototype[t].apply(this.internal, arguments),
|
|
69
|
+
return Date.prototype[t].apply(this.internal, arguments), gn(this), +this;
|
|
84
70
|
}, X.prototype[t] = function() {
|
|
85
71
|
return Date.prototype[t].apply(this, arguments), He(this), +this;
|
|
86
72
|
}));
|
|
@@ -88,10 +74,10 @@ Object.getOwnPropertyNames(Date.prototype).forEach((e) => {
|
|
|
88
74
|
function He(e) {
|
|
89
75
|
e.internal.setTime(+e), e.internal.setUTCSeconds(e.internal.getUTCSeconds() - Math.round(-ne(e.timeZone, e) * 60));
|
|
90
76
|
}
|
|
91
|
-
function
|
|
92
|
-
Date.prototype.setFullYear.call(e, e.internal.getUTCFullYear(), e.internal.getUTCMonth(), e.internal.getUTCDate()), Date.prototype.setHours.call(e, e.internal.getUTCHours(), e.internal.getUTCMinutes(), e.internal.getUTCSeconds(), e.internal.getUTCMilliseconds()),
|
|
77
|
+
function gn(e) {
|
|
78
|
+
Date.prototype.setFullYear.call(e, e.internal.getUTCFullYear(), e.internal.getUTCMonth(), e.internal.getUTCDate()), Date.prototype.setHours.call(e, e.internal.getUTCHours(), e.internal.getUTCMinutes(), e.internal.getUTCSeconds(), e.internal.getUTCMilliseconds()), st(e);
|
|
93
79
|
}
|
|
94
|
-
function
|
|
80
|
+
function st(e) {
|
|
95
81
|
const t = ne(e.timeZone, e), n = t > 0 ? Math.floor(t) : Math.ceil(t), r = /* @__PURE__ */ new Date(+e);
|
|
96
82
|
r.setUTCHours(r.getUTCHours() - 1);
|
|
97
83
|
const o = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), s = -(/* @__PURE__ */ new Date(+r)).getTimezoneOffset(), i = o - s, a = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
|
|
@@ -100,12 +86,12 @@ function at(e) {
|
|
|
100
86
|
c && Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + c);
|
|
101
87
|
const f = /* @__PURE__ */ new Date(+e);
|
|
102
88
|
f.setUTCSeconds(0);
|
|
103
|
-
const
|
|
104
|
-
(u ||
|
|
105
|
-
const h = ne(e.timeZone, e), g = h > 0 ? Math.floor(h) : Math.ceil(h),
|
|
106
|
-
if (
|
|
107
|
-
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) +
|
|
108
|
-
const
|
|
89
|
+
const l = o > 0 ? f.getSeconds() : (f.getSeconds() - 60) % 60, u = Math.round(-(ne(e.timeZone, e) * 60)) % 60;
|
|
90
|
+
(u || l) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + u), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + u + l));
|
|
91
|
+
const h = ne(e.timeZone, e), g = h > 0 ? Math.floor(h) : Math.ceil(h), W = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - g, M = g !== n, O = W - c;
|
|
92
|
+
if (M && O) {
|
|
93
|
+
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + O);
|
|
94
|
+
const C = ne(e.timeZone, e), p = C > 0 ? Math.floor(C) : Math.ceil(C), T = g - p;
|
|
109
95
|
T && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + T), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + T));
|
|
110
96
|
}
|
|
111
97
|
}
|
|
@@ -129,7 +115,7 @@ class I extends X {
|
|
|
129
115
|
}
|
|
130
116
|
toTimeString() {
|
|
131
117
|
const t = this.internal.toUTCString().split(" ")[4], [n, r, o] = this.tzComponents();
|
|
132
|
-
return `${t} GMT${n}${r}${o} (${
|
|
118
|
+
return `${t} GMT${n}${r}${o} (${hn(this.timeZone, this)})`;
|
|
133
119
|
}
|
|
134
120
|
toLocaleString(t, n) {
|
|
135
121
|
return Date.prototype.toLocaleString.call(this, t, {
|
|
@@ -165,18 +151,18 @@ class I extends X {
|
|
|
165
151
|
}
|
|
166
152
|
//#endregion
|
|
167
153
|
}
|
|
168
|
-
const
|
|
154
|
+
const at = 6048e5, pn = 864e5, Xe = Symbol.for("constructDateFrom");
|
|
169
155
|
function F(e, t) {
|
|
170
156
|
return typeof e == "function" ? e(t) : e && typeof e == "object" && Xe in e ? e[Xe](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
171
157
|
}
|
|
172
158
|
function Y(e, t) {
|
|
173
159
|
return F(t || e, e);
|
|
174
160
|
}
|
|
175
|
-
function
|
|
161
|
+
function it(e, t, n) {
|
|
176
162
|
const r = Y(e, n?.in);
|
|
177
163
|
return isNaN(t) ? F(e, NaN) : (t && r.setDate(r.getDate() + t), r);
|
|
178
164
|
}
|
|
179
|
-
function
|
|
165
|
+
function ct(e, t, n) {
|
|
180
166
|
const r = Y(e, n?.in);
|
|
181
167
|
if (isNaN(t)) return F(e, NaN);
|
|
182
168
|
if (!t)
|
|
@@ -190,9 +176,9 @@ function ut(e, t, n) {
|
|
|
190
176
|
o
|
|
191
177
|
), r);
|
|
192
178
|
}
|
|
193
|
-
let
|
|
179
|
+
let wn = {};
|
|
194
180
|
function ye() {
|
|
195
|
-
return
|
|
181
|
+
return wn;
|
|
196
182
|
}
|
|
197
183
|
function ie(e, t) {
|
|
198
184
|
const n = ye(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o = Y(e, t?.in), s = o.getDay(), i = (s < r ? 7 : 0) + s - r;
|
|
@@ -201,7 +187,7 @@ function ie(e, t) {
|
|
|
201
187
|
function he(e, t) {
|
|
202
188
|
return ie(e, { ...t, weekStartsOn: 1 });
|
|
203
189
|
}
|
|
204
|
-
function
|
|
190
|
+
function ut(e, t) {
|
|
205
191
|
const n = Y(e, t?.in), r = n.getFullYear(), o = F(n, 0);
|
|
206
192
|
o.setFullYear(r + 1, 0, 4), o.setHours(0, 0, 0, 0);
|
|
207
193
|
const s = he(o), i = F(n, 0);
|
|
@@ -234,25 +220,25 @@ function me(e, t) {
|
|
|
234
220
|
const n = Y(e, t?.in);
|
|
235
221
|
return n.setHours(0, 0, 0, 0), n;
|
|
236
222
|
}
|
|
237
|
-
function
|
|
223
|
+
function ft(e, t, n) {
|
|
238
224
|
const [r, o] = ce(
|
|
239
225
|
n?.in,
|
|
240
226
|
e,
|
|
241
227
|
t
|
|
242
228
|
), s = me(r), i = me(o), a = +s - Ue(s), c = +i - Ue(i);
|
|
243
|
-
return Math.round((a - c) /
|
|
229
|
+
return Math.round((a - c) / pn);
|
|
244
230
|
}
|
|
245
|
-
function
|
|
246
|
-
const n =
|
|
231
|
+
function bn(e, t) {
|
|
232
|
+
const n = ut(e, t), r = F(e, 0);
|
|
247
233
|
return r.setFullYear(n, 0, 4), r.setHours(0, 0, 0, 0), he(r);
|
|
248
234
|
}
|
|
249
|
-
function
|
|
250
|
-
return
|
|
235
|
+
function Mn(e, t, n) {
|
|
236
|
+
return it(e, t * 7, n);
|
|
251
237
|
}
|
|
252
|
-
function
|
|
253
|
-
return
|
|
238
|
+
function kn(e, t, n) {
|
|
239
|
+
return ct(e, t * 12, n);
|
|
254
240
|
}
|
|
255
|
-
function
|
|
241
|
+
function Dn(e, t) {
|
|
256
242
|
let n, r = t?.in;
|
|
257
243
|
return e.forEach((o) => {
|
|
258
244
|
!r && typeof o == "object" && (r = F.bind(null, o));
|
|
@@ -260,7 +246,7 @@ function On(e, t) {
|
|
|
260
246
|
(!n || n < s || isNaN(+s)) && (n = s);
|
|
261
247
|
}), F(r, n || NaN);
|
|
262
248
|
}
|
|
263
|
-
function
|
|
249
|
+
function vn(e, t) {
|
|
264
250
|
let n, r = t?.in;
|
|
265
251
|
return e.forEach((o) => {
|
|
266
252
|
!r && typeof o == "object" && (r = F.bind(null, o));
|
|
@@ -268,7 +254,7 @@ function Wn(e, t) {
|
|
|
268
254
|
(!n || n > s || isNaN(+s)) && (n = s);
|
|
269
255
|
}), F(r, n || NaN);
|
|
270
256
|
}
|
|
271
|
-
function
|
|
257
|
+
function On(e, t, n) {
|
|
272
258
|
const [r, o] = ce(
|
|
273
259
|
n?.in,
|
|
274
260
|
e,
|
|
@@ -279,10 +265,10 @@ function Sn(e, t, n) {
|
|
|
279
265
|
function lt(e) {
|
|
280
266
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
281
267
|
}
|
|
282
|
-
function
|
|
268
|
+
function Wn(e) {
|
|
283
269
|
return !(!lt(e) && typeof e != "number" || isNaN(+Y(e)));
|
|
284
270
|
}
|
|
285
|
-
function
|
|
271
|
+
function Sn(e, t, n) {
|
|
286
272
|
const [r, o] = ce(
|
|
287
273
|
n?.in,
|
|
288
274
|
e,
|
|
@@ -290,16 +276,16 @@ function Nn(e, t, n) {
|
|
|
290
276
|
), s = r.getFullYear() - o.getFullYear(), i = r.getMonth() - o.getMonth();
|
|
291
277
|
return s * 12 + i;
|
|
292
278
|
}
|
|
293
|
-
function
|
|
279
|
+
function Cn(e, t) {
|
|
294
280
|
const n = Y(e, t?.in), r = n.getMonth();
|
|
295
281
|
return n.setFullYear(n.getFullYear(), r + 1, 0), n.setHours(23, 59, 59, 999), n;
|
|
296
282
|
}
|
|
297
|
-
function
|
|
283
|
+
function dt(e, t) {
|
|
298
284
|
const [n, r] = ce(e, t.start, t.end);
|
|
299
285
|
return { start: n, end: r };
|
|
300
286
|
}
|
|
301
|
-
function
|
|
302
|
-
const { start: n, end: r } =
|
|
287
|
+
function Nn(e, t) {
|
|
288
|
+
const { start: n, end: r } = dt(t?.in, e);
|
|
303
289
|
let o = +n > +r;
|
|
304
290
|
const s = o ? +n : +r, i = o ? r : n;
|
|
305
291
|
i.setHours(0, 0, 0, 0), i.setDate(1);
|
|
@@ -309,11 +295,11 @@ function Tn(e, t) {
|
|
|
309
295
|
c.push(F(n, i)), i.setMonth(i.getMonth() + a);
|
|
310
296
|
return o ? c.reverse() : c;
|
|
311
297
|
}
|
|
312
|
-
function
|
|
298
|
+
function xn(e, t) {
|
|
313
299
|
const n = Y(e, t?.in);
|
|
314
300
|
return n.setDate(1), n.setHours(0, 0, 0, 0), n;
|
|
315
301
|
}
|
|
316
|
-
function
|
|
302
|
+
function Yn(e, t) {
|
|
317
303
|
const n = Y(e, t?.in), r = n.getFullYear();
|
|
318
304
|
return n.setFullYear(r + 1, 0, 0), n.setHours(23, 59, 59, 999), n;
|
|
319
305
|
}
|
|
@@ -321,14 +307,25 @@ function ht(e, t) {
|
|
|
321
307
|
const n = Y(e, t?.in);
|
|
322
308
|
return n.setFullYear(n.getFullYear(), 0, 1), n.setHours(0, 0, 0, 0), n;
|
|
323
309
|
}
|
|
310
|
+
function Tn(e, t) {
|
|
311
|
+
const { start: n, end: r } = dt(t?.in, e);
|
|
312
|
+
let o = +n > +r;
|
|
313
|
+
const s = o ? +n : +r, i = o ? r : n;
|
|
314
|
+
i.setHours(0, 0, 0, 0), i.setMonth(0, 1);
|
|
315
|
+
let a = 1;
|
|
316
|
+
const c = [];
|
|
317
|
+
for (; +i <= s; )
|
|
318
|
+
c.push(F(n, i)), i.setFullYear(i.getFullYear() + a);
|
|
319
|
+
return o ? c.reverse() : c;
|
|
320
|
+
}
|
|
324
321
|
function mt(e, t) {
|
|
325
322
|
const n = ye(), r = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, o = Y(e, t?.in), s = o.getDay(), i = (s < r ? -7 : 0) + 6 - (s - r);
|
|
326
323
|
return o.setDate(o.getDate() + i), o.setHours(23, 59, 59, 999), o;
|
|
327
324
|
}
|
|
328
|
-
function
|
|
325
|
+
function En(e, t) {
|
|
329
326
|
return mt(e, { ...t, weekStartsOn: 1 });
|
|
330
327
|
}
|
|
331
|
-
const
|
|
328
|
+
const Pn = {
|
|
332
329
|
lessThanXSeconds: {
|
|
333
330
|
one: "less than a second",
|
|
334
331
|
other: "less than {{count}} seconds"
|
|
@@ -390,9 +387,9 @@ const Fn = {
|
|
|
390
387
|
one: "almost 1 year",
|
|
391
388
|
other: "almost {{count}} years"
|
|
392
389
|
}
|
|
393
|
-
},
|
|
390
|
+
}, _n = (e, t, n) => {
|
|
394
391
|
let r;
|
|
395
|
-
const o =
|
|
392
|
+
const o = Pn[e];
|
|
396
393
|
return typeof o == "string" ? r = o : t === 1 ? r = o.one : r = o.other.replace("{{count}}", t.toString()), n?.addSuffix ? n.comparison && n.comparison > 0 ? "in " + r : r + " ago" : r;
|
|
397
394
|
};
|
|
398
395
|
function _e(e) {
|
|
@@ -401,42 +398,42 @@ function _e(e) {
|
|
|
401
398
|
return e.formats[n] || e.formats[e.defaultWidth];
|
|
402
399
|
};
|
|
403
400
|
}
|
|
404
|
-
const
|
|
401
|
+
const Fn = {
|
|
405
402
|
full: "EEEE, MMMM do, y",
|
|
406
403
|
long: "MMMM do, y",
|
|
407
404
|
medium: "MMM d, y",
|
|
408
405
|
short: "MM/dd/yyyy"
|
|
409
|
-
},
|
|
406
|
+
}, Bn = {
|
|
410
407
|
full: "h:mm:ss a zzzz",
|
|
411
408
|
long: "h:mm:ss a z",
|
|
412
409
|
medium: "h:mm:ss a",
|
|
413
410
|
short: "h:mm a"
|
|
414
|
-
},
|
|
411
|
+
}, In = {
|
|
415
412
|
full: "{{date}} 'at' {{time}}",
|
|
416
413
|
long: "{{date}} 'at' {{time}}",
|
|
417
414
|
medium: "{{date}}, {{time}}",
|
|
418
415
|
short: "{{date}}, {{time}}"
|
|
419
|
-
},
|
|
416
|
+
}, Hn = {
|
|
420
417
|
date: _e({
|
|
421
|
-
formats:
|
|
418
|
+
formats: Fn,
|
|
422
419
|
defaultWidth: "full"
|
|
423
420
|
}),
|
|
424
421
|
time: _e({
|
|
425
|
-
formats:
|
|
422
|
+
formats: Bn,
|
|
426
423
|
defaultWidth: "full"
|
|
427
424
|
}),
|
|
428
425
|
dateTime: _e({
|
|
429
|
-
formats:
|
|
426
|
+
formats: In,
|
|
430
427
|
defaultWidth: "full"
|
|
431
428
|
})
|
|
432
|
-
},
|
|
429
|
+
}, qn = {
|
|
433
430
|
lastWeek: "'last' eeee 'at' p",
|
|
434
431
|
yesterday: "'yesterday at' p",
|
|
435
432
|
today: "'today at' p",
|
|
436
433
|
tomorrow: "'tomorrow at' p",
|
|
437
434
|
nextWeek: "eeee 'at' p",
|
|
438
435
|
other: "P"
|
|
439
|
-
},
|
|
436
|
+
}, An = (e, t, n, r) => qn[e];
|
|
440
437
|
function fe(e) {
|
|
441
438
|
return (t, n) => {
|
|
442
439
|
const r = n?.context ? String(n.context) : "standalone";
|
|
@@ -452,15 +449,15 @@ function fe(e) {
|
|
|
452
449
|
return o[s];
|
|
453
450
|
};
|
|
454
451
|
}
|
|
455
|
-
const
|
|
452
|
+
const jn = {
|
|
456
453
|
narrow: ["B", "A"],
|
|
457
454
|
abbreviated: ["BC", "AD"],
|
|
458
455
|
wide: ["Before Christ", "Anno Domini"]
|
|
459
|
-
},
|
|
456
|
+
}, Rn = {
|
|
460
457
|
narrow: ["1", "2", "3", "4"],
|
|
461
458
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
462
459
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
463
|
-
},
|
|
460
|
+
}, Zn = {
|
|
464
461
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
465
462
|
abbreviated: [
|
|
466
463
|
"Jan",
|
|
@@ -490,7 +487,7 @@ const Rn = {
|
|
|
490
487
|
"November",
|
|
491
488
|
"December"
|
|
492
489
|
]
|
|
493
|
-
},
|
|
490
|
+
}, $n = {
|
|
494
491
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
495
492
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
496
493
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -503,7 +500,7 @@ const Rn = {
|
|
|
503
500
|
"Friday",
|
|
504
501
|
"Saturday"
|
|
505
502
|
]
|
|
506
|
-
},
|
|
503
|
+
}, Gn = {
|
|
507
504
|
narrow: {
|
|
508
505
|
am: "a",
|
|
509
506
|
pm: "p",
|
|
@@ -534,7 +531,7 @@ const Rn = {
|
|
|
534
531
|
evening: "evening",
|
|
535
532
|
night: "night"
|
|
536
533
|
}
|
|
537
|
-
},
|
|
534
|
+
}, zn = {
|
|
538
535
|
narrow: {
|
|
539
536
|
am: "a",
|
|
540
537
|
pm: "p",
|
|
@@ -565,7 +562,7 @@ const Rn = {
|
|
|
565
562
|
evening: "in the evening",
|
|
566
563
|
night: "at night"
|
|
567
564
|
}
|
|
568
|
-
},
|
|
565
|
+
}, Ln = (e, t) => {
|
|
569
566
|
const n = Number(e), r = n % 100;
|
|
570
567
|
if (r > 20 || r < 10)
|
|
571
568
|
switch (r % 10) {
|
|
@@ -577,61 +574,61 @@ const Rn = {
|
|
|
577
574
|
return n + "rd";
|
|
578
575
|
}
|
|
579
576
|
return n + "th";
|
|
580
|
-
},
|
|
581
|
-
ordinalNumber:
|
|
577
|
+
}, Qn = {
|
|
578
|
+
ordinalNumber: Ln,
|
|
582
579
|
era: fe({
|
|
583
|
-
values:
|
|
580
|
+
values: jn,
|
|
584
581
|
defaultWidth: "wide"
|
|
585
582
|
}),
|
|
586
583
|
quarter: fe({
|
|
587
|
-
values:
|
|
584
|
+
values: Rn,
|
|
588
585
|
defaultWidth: "wide",
|
|
589
586
|
argumentCallback: (e) => e - 1
|
|
590
587
|
}),
|
|
591
588
|
month: fe({
|
|
592
|
-
values:
|
|
589
|
+
values: Zn,
|
|
593
590
|
defaultWidth: "wide"
|
|
594
591
|
}),
|
|
595
592
|
day: fe({
|
|
596
|
-
values:
|
|
593
|
+
values: $n,
|
|
597
594
|
defaultWidth: "wide"
|
|
598
595
|
}),
|
|
599
596
|
dayPeriod: fe({
|
|
600
|
-
values:
|
|
597
|
+
values: Gn,
|
|
601
598
|
defaultWidth: "wide",
|
|
602
|
-
formattingValues:
|
|
599
|
+
formattingValues: zn,
|
|
603
600
|
defaultFormattingWidth: "wide"
|
|
604
601
|
})
|
|
605
602
|
};
|
|
606
|
-
function
|
|
603
|
+
function le(e) {
|
|
607
604
|
return (t, n = {}) => {
|
|
608
605
|
const r = n.width, o = r && e.matchPatterns[r] || e.matchPatterns[e.defaultMatchWidth], s = t.match(o);
|
|
609
606
|
if (!s)
|
|
610
607
|
return null;
|
|
611
|
-
const i = s[0], a = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(a) ?
|
|
608
|
+
const i = s[0], a = r && e.parsePatterns[r] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(a) ? Un(a, (u) => u.test(i)) : (
|
|
612
609
|
// [TODO] -- I challenge you to fix the type
|
|
613
|
-
|
|
610
|
+
Xn(a, (u) => u.test(i))
|
|
614
611
|
);
|
|
615
612
|
let f;
|
|
616
613
|
f = e.valueCallback ? e.valueCallback(c) : c, f = n.valueCallback ? (
|
|
617
614
|
// [TODO] -- I challenge you to fix the type
|
|
618
615
|
n.valueCallback(f)
|
|
619
616
|
) : f;
|
|
620
|
-
const
|
|
621
|
-
return { value: f, rest:
|
|
617
|
+
const l = t.slice(i.length);
|
|
618
|
+
return { value: f, rest: l };
|
|
622
619
|
};
|
|
623
620
|
}
|
|
624
|
-
function
|
|
621
|
+
function Xn(e, t) {
|
|
625
622
|
for (const n in e)
|
|
626
623
|
if (Object.prototype.hasOwnProperty.call(e, n) && t(e[n]))
|
|
627
624
|
return n;
|
|
628
625
|
}
|
|
629
|
-
function
|
|
626
|
+
function Un(e, t) {
|
|
630
627
|
for (let n = 0; n < e.length; n++)
|
|
631
628
|
if (t(e[n]))
|
|
632
629
|
return n;
|
|
633
630
|
}
|
|
634
|
-
function
|
|
631
|
+
function Vn(e) {
|
|
635
632
|
return (t, n = {}) => {
|
|
636
633
|
const r = t.match(e.matchPattern);
|
|
637
634
|
if (!r) return null;
|
|
@@ -643,23 +640,23 @@ function Jn(e) {
|
|
|
643
640
|
return { value: i, rest: a };
|
|
644
641
|
};
|
|
645
642
|
}
|
|
646
|
-
const
|
|
643
|
+
const Kn = /^(\d+)(th|st|nd|rd)?/i, Jn = /\d+/i, er = {
|
|
647
644
|
narrow: /^(b|a)/i,
|
|
648
645
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
649
646
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
650
|
-
},
|
|
647
|
+
}, tr = {
|
|
651
648
|
any: [/^b/i, /^(a|c)/i]
|
|
652
|
-
},
|
|
649
|
+
}, nr = {
|
|
653
650
|
narrow: /^[1234]/i,
|
|
654
651
|
abbreviated: /^q[1234]/i,
|
|
655
652
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
656
|
-
},
|
|
653
|
+
}, rr = {
|
|
657
654
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
658
|
-
},
|
|
655
|
+
}, or = {
|
|
659
656
|
narrow: /^[jfmasond]/i,
|
|
660
657
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
661
658
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
662
|
-
},
|
|
659
|
+
}, sr = {
|
|
663
660
|
narrow: [
|
|
664
661
|
/^j/i,
|
|
665
662
|
/^f/i,
|
|
@@ -688,18 +685,18 @@ const er = /^(\d+)(th|st|nd|rd)?/i, tr = /\d+/i, nr = {
|
|
|
688
685
|
/^n/i,
|
|
689
686
|
/^d/i
|
|
690
687
|
]
|
|
691
|
-
},
|
|
688
|
+
}, ar = {
|
|
692
689
|
narrow: /^[smtwf]/i,
|
|
693
690
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
694
691
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
695
692
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
696
|
-
},
|
|
693
|
+
}, ir = {
|
|
697
694
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
698
695
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
699
|
-
},
|
|
696
|
+
}, cr = {
|
|
700
697
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
701
698
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
702
|
-
},
|
|
699
|
+
}, ur = {
|
|
703
700
|
any: {
|
|
704
701
|
am: /^a/i,
|
|
705
702
|
pm: /^p/i,
|
|
@@ -710,62 +707,62 @@ const er = /^(\d+)(th|st|nd|rd)?/i, tr = /\d+/i, nr = {
|
|
|
710
707
|
evening: /evening/i,
|
|
711
708
|
night: /night/i
|
|
712
709
|
}
|
|
713
|
-
},
|
|
714
|
-
ordinalNumber:
|
|
715
|
-
matchPattern:
|
|
716
|
-
parsePattern:
|
|
710
|
+
}, fr = {
|
|
711
|
+
ordinalNumber: Vn({
|
|
712
|
+
matchPattern: Kn,
|
|
713
|
+
parsePattern: Jn,
|
|
717
714
|
valueCallback: (e) => parseInt(e, 10)
|
|
718
715
|
}),
|
|
719
|
-
era:
|
|
716
|
+
era: le({
|
|
717
|
+
matchPatterns: er,
|
|
718
|
+
defaultMatchWidth: "wide",
|
|
719
|
+
parsePatterns: tr,
|
|
720
|
+
defaultParseWidth: "any"
|
|
721
|
+
}),
|
|
722
|
+
quarter: le({
|
|
720
723
|
matchPatterns: nr,
|
|
721
724
|
defaultMatchWidth: "wide",
|
|
722
725
|
parsePatterns: rr,
|
|
723
|
-
defaultParseWidth: "any"
|
|
726
|
+
defaultParseWidth: "any",
|
|
727
|
+
valueCallback: (e) => e + 1
|
|
724
728
|
}),
|
|
725
|
-
|
|
729
|
+
month: le({
|
|
726
730
|
matchPatterns: or,
|
|
727
731
|
defaultMatchWidth: "wide",
|
|
728
732
|
parsePatterns: sr,
|
|
729
|
-
defaultParseWidth: "any"
|
|
730
|
-
valueCallback: (e) => e + 1
|
|
733
|
+
defaultParseWidth: "any"
|
|
731
734
|
}),
|
|
732
|
-
|
|
735
|
+
day: le({
|
|
733
736
|
matchPatterns: ar,
|
|
734
737
|
defaultMatchWidth: "wide",
|
|
735
738
|
parsePatterns: ir,
|
|
736
739
|
defaultParseWidth: "any"
|
|
737
740
|
}),
|
|
738
|
-
|
|
741
|
+
dayPeriod: le({
|
|
739
742
|
matchPatterns: cr,
|
|
740
|
-
defaultMatchWidth: "wide",
|
|
741
|
-
parsePatterns: ur,
|
|
742
|
-
defaultParseWidth: "any"
|
|
743
|
-
}),
|
|
744
|
-
dayPeriod: de({
|
|
745
|
-
matchPatterns: fr,
|
|
746
743
|
defaultMatchWidth: "any",
|
|
747
|
-
parsePatterns:
|
|
744
|
+
parsePatterns: ur,
|
|
748
745
|
defaultParseWidth: "any"
|
|
749
746
|
})
|
|
750
747
|
}, qe = {
|
|
751
748
|
code: "en-US",
|
|
752
|
-
formatDistance:
|
|
753
|
-
formatLong:
|
|
754
|
-
formatRelative:
|
|
755
|
-
localize:
|
|
756
|
-
match:
|
|
749
|
+
formatDistance: _n,
|
|
750
|
+
formatLong: Hn,
|
|
751
|
+
formatRelative: An,
|
|
752
|
+
localize: Qn,
|
|
753
|
+
match: fr,
|
|
757
754
|
options: {
|
|
758
755
|
weekStartsOn: 0,
|
|
759
756
|
firstWeekContainsDate: 1
|
|
760
757
|
}
|
|
761
758
|
};
|
|
762
|
-
function
|
|
759
|
+
function lr(e, t) {
|
|
763
760
|
const n = Y(e, t?.in);
|
|
764
|
-
return
|
|
761
|
+
return ft(n, ht(n)) + 1;
|
|
765
762
|
}
|
|
766
763
|
function yt(e, t) {
|
|
767
|
-
const n = Y(e, t?.in), r = +he(n) - +
|
|
768
|
-
return Math.round(r /
|
|
764
|
+
const n = Y(e, t?.in), r = +he(n) - +bn(n);
|
|
765
|
+
return Math.round(r / at) + 1;
|
|
769
766
|
}
|
|
770
767
|
function gt(e, t) {
|
|
771
768
|
const n = Y(e, t?.in), r = n.getFullYear(), o = ye(), s = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, i = F(t?.in || e, 0);
|
|
@@ -775,13 +772,13 @@ function gt(e, t) {
|
|
|
775
772
|
const f = ie(c, t);
|
|
776
773
|
return +n >= +a ? r + 1 : +n >= +f ? r : r - 1;
|
|
777
774
|
}
|
|
778
|
-
function
|
|
775
|
+
function dr(e, t) {
|
|
779
776
|
const n = ye(), r = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, o = gt(e, t), s = F(t?.in || e, 0);
|
|
780
777
|
return s.setFullYear(o, 0, r), s.setHours(0, 0, 0, 0), ie(s, t);
|
|
781
778
|
}
|
|
782
779
|
function pt(e, t) {
|
|
783
|
-
const n = Y(e, t?.in), r = +ie(n, t) - +
|
|
784
|
-
return Math.round(r /
|
|
780
|
+
const n = Y(e, t?.in), r = +ie(n, t) - +dr(n, t);
|
|
781
|
+
return Math.round(r / at) + 1;
|
|
785
782
|
}
|
|
786
783
|
function x(e, t) {
|
|
787
784
|
const n = e < 0 ? "-" : "", r = Math.abs(e).toString().padStart(t, "0");
|
|
@@ -886,7 +883,7 @@ const ee = {
|
|
|
886
883
|
},
|
|
887
884
|
// ISO week-numbering year
|
|
888
885
|
R: function(e, t) {
|
|
889
|
-
const n =
|
|
886
|
+
const n = ut(e);
|
|
890
887
|
return x(n, t.length);
|
|
891
888
|
},
|
|
892
889
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -1045,7 +1042,7 @@ const ee = {
|
|
|
1045
1042
|
},
|
|
1046
1043
|
// Day of year
|
|
1047
1044
|
D: function(e, t, n) {
|
|
1048
|
-
const r =
|
|
1045
|
+
const r = lr(e);
|
|
1049
1046
|
return t === "Do" ? n.ordinalNumber(r, { unit: "dayOfYear" }) : x(r, t.length);
|
|
1050
1047
|
},
|
|
1051
1048
|
// Day of week
|
|
@@ -1438,7 +1435,7 @@ const et = (e, t) => {
|
|
|
1438
1435
|
default:
|
|
1439
1436
|
return t.time({ width: "full" });
|
|
1440
1437
|
}
|
|
1441
|
-
},
|
|
1438
|
+
}, hr = (e, t) => {
|
|
1442
1439
|
const n = e.match(/(P+)(p+)?/) || [], r = n[1], o = n[2];
|
|
1443
1440
|
if (!o)
|
|
1444
1441
|
return et(e, t);
|
|
@@ -1459,49 +1456,49 @@ const et = (e, t) => {
|
|
|
1459
1456
|
break;
|
|
1460
1457
|
}
|
|
1461
1458
|
return s.replace("{{date}}", et(r, t)).replace("{{time}}", wt(o, t));
|
|
1462
|
-
},
|
|
1459
|
+
}, mr = {
|
|
1463
1460
|
p: wt,
|
|
1464
|
-
P:
|
|
1465
|
-
},
|
|
1466
|
-
function
|
|
1467
|
-
return
|
|
1461
|
+
P: hr
|
|
1462
|
+
}, yr = /^D+$/, gr = /^Y+$/, pr = ["D", "DD", "YY", "YYYY"];
|
|
1463
|
+
function wr(e) {
|
|
1464
|
+
return yr.test(e);
|
|
1468
1465
|
}
|
|
1469
|
-
function
|
|
1470
|
-
return
|
|
1466
|
+
function br(e) {
|
|
1467
|
+
return gr.test(e);
|
|
1471
1468
|
}
|
|
1472
|
-
function
|
|
1473
|
-
const r =
|
|
1474
|
-
if (console.warn(r),
|
|
1469
|
+
function Mr(e, t, n) {
|
|
1470
|
+
const r = kr(e, t, n);
|
|
1471
|
+
if (console.warn(r), pr.includes(e)) throw new RangeError(r);
|
|
1475
1472
|
}
|
|
1476
|
-
function
|
|
1473
|
+
function kr(e, t, n) {
|
|
1477
1474
|
const r = e[0] === "Y" ? "years" : "days of the month";
|
|
1478
1475
|
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1479
1476
|
}
|
|
1480
|
-
const
|
|
1481
|
-
function
|
|
1477
|
+
const Dr = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, vr = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, Or = /^'([^]*?)'?$/, Wr = /''/g, Sr = /[a-zA-Z]/;
|
|
1478
|
+
function Cr(e, t, n) {
|
|
1482
1479
|
const r = ye(), o = n?.locale ?? r.locale ?? qe, s = n?.firstWeekContainsDate ?? n?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, i = n?.weekStartsOn ?? n?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, a = Y(e, n?.in);
|
|
1483
|
-
if (!
|
|
1480
|
+
if (!Wn(a))
|
|
1484
1481
|
throw new RangeError("Invalid time value");
|
|
1485
|
-
let c = t.match(
|
|
1486
|
-
const u =
|
|
1482
|
+
let c = t.match(vr).map((l) => {
|
|
1483
|
+
const u = l[0];
|
|
1487
1484
|
if (u === "p" || u === "P") {
|
|
1488
|
-
const h =
|
|
1489
|
-
return h(
|
|
1485
|
+
const h = mr[u];
|
|
1486
|
+
return h(l, o.formatLong);
|
|
1490
1487
|
}
|
|
1491
|
-
return
|
|
1492
|
-
}).join("").match(
|
|
1493
|
-
if (
|
|
1488
|
+
return l;
|
|
1489
|
+
}).join("").match(Dr).map((l) => {
|
|
1490
|
+
if (l === "''")
|
|
1494
1491
|
return { isToken: !1, value: "'" };
|
|
1495
|
-
const u =
|
|
1492
|
+
const u = l[0];
|
|
1496
1493
|
if (u === "'")
|
|
1497
|
-
return { isToken: !1, value:
|
|
1494
|
+
return { isToken: !1, value: Nr(l) };
|
|
1498
1495
|
if (Ve[u])
|
|
1499
|
-
return { isToken: !0, value:
|
|
1500
|
-
if (u.match(
|
|
1496
|
+
return { isToken: !0, value: l };
|
|
1497
|
+
if (u.match(Sr))
|
|
1501
1498
|
throw new RangeError(
|
|
1502
1499
|
"Format string contains an unescaped latin alphabet character `" + u + "`"
|
|
1503
1500
|
);
|
|
1504
|
-
return { isToken: !1, value:
|
|
1501
|
+
return { isToken: !1, value: l };
|
|
1505
1502
|
});
|
|
1506
1503
|
o.localize.preprocessor && (c = o.localize.preprocessor(a, c));
|
|
1507
1504
|
const f = {
|
|
@@ -1509,35 +1506,35 @@ function xr(e, t, n) {
|
|
|
1509
1506
|
weekStartsOn: i,
|
|
1510
1507
|
locale: o
|
|
1511
1508
|
};
|
|
1512
|
-
return c.map((
|
|
1513
|
-
if (!
|
|
1514
|
-
const u =
|
|
1515
|
-
(!n?.useAdditionalWeekYearTokens &&
|
|
1509
|
+
return c.map((l) => {
|
|
1510
|
+
if (!l.isToken) return l.value;
|
|
1511
|
+
const u = l.value;
|
|
1512
|
+
(!n?.useAdditionalWeekYearTokens && br(u) || !n?.useAdditionalDayOfYearTokens && wr(u)) && Mr(u, t, String(e));
|
|
1516
1513
|
const h = Ve[u[0]];
|
|
1517
1514
|
return h(a, u, o.localize, f);
|
|
1518
1515
|
}).join("");
|
|
1519
1516
|
}
|
|
1520
|
-
function
|
|
1521
|
-
const t = e.match(
|
|
1522
|
-
return t ? t[1].replace(
|
|
1517
|
+
function Nr(e) {
|
|
1518
|
+
const t = e.match(Or);
|
|
1519
|
+
return t ? t[1].replace(Wr, "'") : e;
|
|
1523
1520
|
}
|
|
1524
|
-
function
|
|
1521
|
+
function xr(e, t) {
|
|
1525
1522
|
const n = Y(e, t?.in), r = n.getFullYear(), o = n.getMonth(), s = F(n, 0);
|
|
1526
1523
|
return s.setFullYear(r, o + 1, 0), s.setHours(0, 0, 0, 0), s.getDate();
|
|
1527
1524
|
}
|
|
1528
|
-
function
|
|
1525
|
+
function Yr(e, t) {
|
|
1529
1526
|
return Y(e, t?.in).getMonth();
|
|
1530
1527
|
}
|
|
1531
|
-
function
|
|
1528
|
+
function Tr(e, t) {
|
|
1532
1529
|
return Y(e, t?.in).getFullYear();
|
|
1533
1530
|
}
|
|
1534
|
-
function
|
|
1531
|
+
function Er(e, t) {
|
|
1535
1532
|
return +Y(e) > +Y(t);
|
|
1536
1533
|
}
|
|
1537
|
-
function
|
|
1534
|
+
function Pr(e, t) {
|
|
1538
1535
|
return +Y(e) < +Y(t);
|
|
1539
1536
|
}
|
|
1540
|
-
function
|
|
1537
|
+
function _r(e, t, n) {
|
|
1541
1538
|
const [r, o] = ce(
|
|
1542
1539
|
n?.in,
|
|
1543
1540
|
e,
|
|
@@ -1545,7 +1542,7 @@ function Br(e, t, n) {
|
|
|
1545
1542
|
);
|
|
1546
1543
|
return r.getFullYear() === o.getFullYear() && r.getMonth() === o.getMonth();
|
|
1547
1544
|
}
|
|
1548
|
-
function
|
|
1545
|
+
function Fr(e, t, n) {
|
|
1549
1546
|
const [r, o] = ce(
|
|
1550
1547
|
n?.in,
|
|
1551
1548
|
e,
|
|
@@ -1553,30 +1550,30 @@ function Ir(e, t, n) {
|
|
|
1553
1550
|
);
|
|
1554
1551
|
return r.getFullYear() === o.getFullYear();
|
|
1555
1552
|
}
|
|
1556
|
-
function
|
|
1553
|
+
function Br(e, t, n) {
|
|
1557
1554
|
const r = Y(e, n?.in), o = r.getFullYear(), s = r.getDate(), i = F(e, 0);
|
|
1558
1555
|
i.setFullYear(o, t, 15), i.setHours(0, 0, 0, 0);
|
|
1559
|
-
const a =
|
|
1556
|
+
const a = xr(i);
|
|
1560
1557
|
return r.setMonth(t, Math.min(s, a)), r;
|
|
1561
1558
|
}
|
|
1562
|
-
function
|
|
1559
|
+
function Ir(e, t, n) {
|
|
1563
1560
|
const r = Y(e, n?.in);
|
|
1564
1561
|
return isNaN(+r) ? F(e, NaN) : (r.setFullYear(t), r);
|
|
1565
1562
|
}
|
|
1566
|
-
const tt = 5,
|
|
1567
|
-
function
|
|
1563
|
+
const tt = 5, Hr = 4;
|
|
1564
|
+
function qr(e, t) {
|
|
1568
1565
|
const n = t.startOfMonth(e), r = n.getDay() > 0 ? n.getDay() : 7, o = t.addDays(e, -r + 1), s = t.addDays(o, tt * 7 - 1);
|
|
1569
|
-
return t.getMonth(e) === t.getMonth(s) ? tt :
|
|
1566
|
+
return t.getMonth(e) === t.getMonth(s) ? tt : Hr;
|
|
1570
1567
|
}
|
|
1571
1568
|
function bt(e, t) {
|
|
1572
1569
|
const n = t.startOfMonth(e), r = n.getDay();
|
|
1573
1570
|
return r === 1 ? n : r === 0 ? t.addDays(n, -1 * 6) : t.addDays(n, -1 * (r - 1));
|
|
1574
1571
|
}
|
|
1575
|
-
function
|
|
1576
|
-
const n = bt(e, t), r =
|
|
1572
|
+
function Ar(e, t) {
|
|
1573
|
+
const n = bt(e, t), r = qr(e, t);
|
|
1577
1574
|
return t.addDays(n, r * 7 - 1);
|
|
1578
1575
|
}
|
|
1579
|
-
class
|
|
1576
|
+
class Z {
|
|
1580
1577
|
/**
|
|
1581
1578
|
* Creates an instance of `DateLib`.
|
|
1582
1579
|
*
|
|
@@ -1584,10 +1581,18 @@ class R {
|
|
|
1584
1581
|
* @param overrides Custom overrides for the date library functions.
|
|
1585
1582
|
*/
|
|
1586
1583
|
constructor(t, n) {
|
|
1587
|
-
this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? I.tz(this.options.timeZone) : new this.Date(), this.newDate = (r, o, s) => this.overrides?.newDate ? this.overrides.newDate(r, o, s) : this.options.timeZone ? new I(r, o, s, this.options.timeZone) : new Date(r, o, s), this.addDays = (r, o) => this.overrides?.addDays ? this.overrides.addDays(r, o) :
|
|
1588
|
-
const
|
|
1584
|
+
this.Date = Date, this.today = () => this.overrides?.today ? this.overrides.today() : this.options.timeZone ? I.tz(this.options.timeZone) : new this.Date(), this.newDate = (r, o, s) => this.overrides?.newDate ? this.overrides.newDate(r, o, s) : this.options.timeZone ? new I(r, o, s, this.options.timeZone) : new Date(r, o, s), this.addDays = (r, o) => this.overrides?.addDays ? this.overrides.addDays(r, o) : it(r, o), this.addMonths = (r, o) => this.overrides?.addMonths ? this.overrides.addMonths(r, o) : ct(r, o), this.addWeeks = (r, o) => this.overrides?.addWeeks ? this.overrides.addWeeks(r, o) : Mn(r, o), this.addYears = (r, o) => this.overrides?.addYears ? this.overrides.addYears(r, o) : kn(r, o), this.differenceInCalendarDays = (r, o) => this.overrides?.differenceInCalendarDays ? this.overrides.differenceInCalendarDays(r, o) : ft(r, o), this.differenceInCalendarMonths = (r, o) => this.overrides?.differenceInCalendarMonths ? this.overrides.differenceInCalendarMonths(r, o) : Sn(r, o), this.eachMonthOfInterval = (r) => this.overrides?.eachMonthOfInterval ? this.overrides.eachMonthOfInterval(r) : Nn(r), this.eachYearOfInterval = (r) => {
|
|
1585
|
+
const o = this.overrides?.eachYearOfInterval ? this.overrides.eachYearOfInterval(r) : Tn(r), s = new Set(o.map((a) => this.getYear(a)));
|
|
1586
|
+
if (s.size === o.length)
|
|
1587
|
+
return o;
|
|
1588
|
+
const i = [];
|
|
1589
|
+
return s.forEach((a) => {
|
|
1590
|
+
i.push(new Date(a, 0, 1));
|
|
1591
|
+
}), i;
|
|
1592
|
+
}, this.endOfBroadcastWeek = (r) => this.overrides?.endOfBroadcastWeek ? this.overrides.endOfBroadcastWeek(r) : Ar(r, this), this.endOfISOWeek = (r) => this.overrides?.endOfISOWeek ? this.overrides.endOfISOWeek(r) : En(r), this.endOfMonth = (r) => this.overrides?.endOfMonth ? this.overrides.endOfMonth(r) : Cn(r), this.endOfWeek = (r, o) => this.overrides?.endOfWeek ? this.overrides.endOfWeek(r, o) : mt(r, this.options), this.endOfYear = (r) => this.overrides?.endOfYear ? this.overrides.endOfYear(r) : Yn(r), this.format = (r, o, s) => {
|
|
1593
|
+
const i = this.overrides?.format ? this.overrides.format(r, o, this.options) : Cr(r, o, this.options);
|
|
1589
1594
|
return this.options.numerals && this.options.numerals !== "latn" ? this.replaceDigits(i) : i;
|
|
1590
|
-
}, this.getISOWeek = (r) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(r) : yt(r), this.getMonth = (r, o) => this.overrides?.getMonth ? this.overrides.getMonth(r, this.options) :
|
|
1595
|
+
}, this.getISOWeek = (r) => this.overrides?.getISOWeek ? this.overrides.getISOWeek(r) : yt(r), this.getMonth = (r, o) => this.overrides?.getMonth ? this.overrides.getMonth(r, this.options) : Yr(r, this.options), this.getYear = (r, o) => this.overrides?.getYear ? this.overrides.getYear(r, this.options) : Tr(r, this.options), this.getWeek = (r, o) => this.overrides?.getWeek ? this.overrides.getWeek(r, this.options) : pt(r, this.options), this.isAfter = (r, o) => this.overrides?.isAfter ? this.overrides.isAfter(r, o) : Er(r, o), this.isBefore = (r, o) => this.overrides?.isBefore ? this.overrides.isBefore(r, o) : Pr(r, o), this.isDate = (r) => this.overrides?.isDate ? this.overrides.isDate(r) : lt(r), this.isSameDay = (r, o) => this.overrides?.isSameDay ? this.overrides.isSameDay(r, o) : On(r, o), this.isSameMonth = (r, o) => this.overrides?.isSameMonth ? this.overrides.isSameMonth(r, o) : _r(r, o), this.isSameYear = (r, o) => this.overrides?.isSameYear ? this.overrides.isSameYear(r, o) : Fr(r, o), this.max = (r) => this.overrides?.max ? this.overrides.max(r) : Dn(r), this.min = (r) => this.overrides?.min ? this.overrides.min(r) : vn(r), this.setMonth = (r, o) => this.overrides?.setMonth ? this.overrides.setMonth(r, o) : Br(r, o), this.setYear = (r, o) => this.overrides?.setYear ? this.overrides.setYear(r, o) : Ir(r, o), this.startOfBroadcastWeek = (r, o) => this.overrides?.startOfBroadcastWeek ? this.overrides.startOfBroadcastWeek(r, this) : bt(r, this), this.startOfDay = (r) => this.overrides?.startOfDay ? this.overrides.startOfDay(r) : me(r), this.startOfISOWeek = (r) => this.overrides?.startOfISOWeek ? this.overrides.startOfISOWeek(r) : he(r), this.startOfMonth = (r) => this.overrides?.startOfMonth ? this.overrides.startOfMonth(r) : xn(r), this.startOfWeek = (r, o) => this.overrides?.startOfWeek ? this.overrides.startOfWeek(r, this.options) : ie(r, this.options), this.startOfYear = (r) => this.overrides?.startOfYear ? this.overrides.startOfYear(r) : ht(r), this.options = { locale: qe, ...t }, this.overrides = n;
|
|
1591
1596
|
}
|
|
1592
1597
|
/**
|
|
1593
1598
|
* Generates a mapping of Arabic digits (0-9) to the target numbering system
|
|
@@ -1631,7 +1636,7 @@ class R {
|
|
|
1631
1636
|
*/
|
|
1632
1637
|
getMonthYearOrder() {
|
|
1633
1638
|
const t = this.options.locale?.code;
|
|
1634
|
-
return t &&
|
|
1639
|
+
return t && Z.yearFirstLocales.has(t) ? "year-first" : "month-first";
|
|
1635
1640
|
}
|
|
1636
1641
|
/**
|
|
1637
1642
|
* Formats the month/year pair respecting locale conventions.
|
|
@@ -1640,7 +1645,7 @@ class R {
|
|
|
1640
1645
|
*/
|
|
1641
1646
|
formatMonthYear(t) {
|
|
1642
1647
|
const { locale: n, timeZone: r, numerals: o } = this.options, s = n?.code;
|
|
1643
|
-
if (s &&
|
|
1648
|
+
if (s && Z.yearFirstLocales.has(s))
|
|
1644
1649
|
try {
|
|
1645
1650
|
return new Intl.DateTimeFormat(s, {
|
|
1646
1651
|
month: "long",
|
|
@@ -1654,7 +1659,7 @@ class R {
|
|
|
1654
1659
|
return this.format(t, i);
|
|
1655
1660
|
}
|
|
1656
1661
|
}
|
|
1657
|
-
|
|
1662
|
+
Z.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
1658
1663
|
"eu",
|
|
1659
1664
|
"hu",
|
|
1660
1665
|
"ja",
|
|
@@ -1673,7 +1678,7 @@ R.yearFirstLocales = /* @__PURE__ */ new Set([
|
|
|
1673
1678
|
"zh-HK",
|
|
1674
1679
|
"zh-TW"
|
|
1675
1680
|
]);
|
|
1676
|
-
const U = new
|
|
1681
|
+
const U = new Z();
|
|
1677
1682
|
class Mt {
|
|
1678
1683
|
constructor(t, n, r = U) {
|
|
1679
1684
|
this.date = t, this.displayMonth = n, this.outside = !!(n && !r.isSameMonth(t, n)), this.dateLib = r;
|
|
@@ -1689,45 +1694,45 @@ class Mt {
|
|
|
1689
1694
|
return this.dateLib.isSameDay(t.date, this.date) && this.dateLib.isSameMonth(t.displayMonth, this.displayMonth);
|
|
1690
1695
|
}
|
|
1691
1696
|
}
|
|
1692
|
-
class
|
|
1697
|
+
class jr {
|
|
1693
1698
|
constructor(t, n) {
|
|
1694
1699
|
this.date = t, this.weeks = n;
|
|
1695
1700
|
}
|
|
1696
1701
|
}
|
|
1697
|
-
class
|
|
1702
|
+
class Rr {
|
|
1698
1703
|
constructor(t, n) {
|
|
1699
1704
|
this.days = n, this.weekNumber = t;
|
|
1700
1705
|
}
|
|
1701
1706
|
}
|
|
1702
|
-
function
|
|
1703
|
-
return
|
|
1707
|
+
function Zr(e) {
|
|
1708
|
+
return d.createElement("button", { ...e });
|
|
1704
1709
|
}
|
|
1705
|
-
function
|
|
1706
|
-
return
|
|
1710
|
+
function $r(e) {
|
|
1711
|
+
return d.createElement("span", { ...e });
|
|
1707
1712
|
}
|
|
1708
|
-
function
|
|
1713
|
+
function Gr(e) {
|
|
1709
1714
|
const { size: t = 24, orientation: n = "left", className: r } = e;
|
|
1710
1715
|
return (
|
|
1711
1716
|
// biome-ignore lint/a11y/noSvgWithoutTitle: handled by the parent component
|
|
1712
|
-
|
|
1717
|
+
d.createElement(
|
|
1713
1718
|
"svg",
|
|
1714
1719
|
{ className: r, width: t, height: t, viewBox: "0 0 24 24" },
|
|
1715
|
-
n === "up" &&
|
|
1716
|
-
n === "down" &&
|
|
1717
|
-
n === "left" &&
|
|
1718
|
-
n === "right" &&
|
|
1720
|
+
n === "up" && d.createElement("polygon", { points: "6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28" }),
|
|
1721
|
+
n === "down" && d.createElement("polygon", { points: "6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72" }),
|
|
1722
|
+
n === "left" && d.createElement("polygon", { points: "16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20" }),
|
|
1723
|
+
n === "right" && d.createElement("polygon", { points: "8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20" })
|
|
1719
1724
|
)
|
|
1720
1725
|
);
|
|
1721
1726
|
}
|
|
1722
|
-
function
|
|
1727
|
+
function zr(e) {
|
|
1723
1728
|
const { day: t, modifiers: n, ...r } = e;
|
|
1724
|
-
return
|
|
1729
|
+
return d.createElement("td", { ...r });
|
|
1725
1730
|
}
|
|
1726
|
-
function
|
|
1727
|
-
const { day: t, modifiers: n, ...r } = e, o =
|
|
1728
|
-
return
|
|
1731
|
+
function Lr(e) {
|
|
1732
|
+
const { day: t, modifiers: n, ...r } = e, o = d.useRef(null);
|
|
1733
|
+
return d.useEffect(() => {
|
|
1729
1734
|
n.focused && o.current?.focus();
|
|
1730
|
-
}, [n.focused]),
|
|
1735
|
+
}, [n.focused]), d.createElement("button", { ref: o, ...r });
|
|
1731
1736
|
}
|
|
1732
1737
|
var m;
|
|
1733
1738
|
(function(e) {
|
|
@@ -1741,43 +1746,43 @@ var L;
|
|
|
1741
1746
|
(function(e) {
|
|
1742
1747
|
e.range_end = "range_end", e.range_middle = "range_middle", e.range_start = "range_start", e.selected = "selected";
|
|
1743
1748
|
})(L || (L = {}));
|
|
1744
|
-
var
|
|
1749
|
+
var R;
|
|
1745
1750
|
(function(e) {
|
|
1746
1751
|
e.weeks_before_enter = "weeks_before_enter", e.weeks_before_exit = "weeks_before_exit", e.weeks_after_enter = "weeks_after_enter", e.weeks_after_exit = "weeks_after_exit", e.caption_after_enter = "caption_after_enter", e.caption_after_exit = "caption_after_exit", e.caption_before_enter = "caption_before_enter", e.caption_before_exit = "caption_before_exit";
|
|
1747
|
-
})(
|
|
1748
|
-
function
|
|
1752
|
+
})(R || (R = {}));
|
|
1753
|
+
function Qr(e) {
|
|
1749
1754
|
const { options: t, className: n, components: r, classNames: o, ...s } = e, i = [o[m.Dropdown], n].join(" "), a = t?.find(({ value: c }) => c === s.value);
|
|
1750
|
-
return
|
|
1755
|
+
return d.createElement(
|
|
1751
1756
|
"span",
|
|
1752
1757
|
{ "data-disabled": s.disabled, className: o[m.DropdownRoot] },
|
|
1753
|
-
|
|
1754
|
-
|
|
1758
|
+
d.createElement(r.Select, { className: i, ...s }, t?.map(({ value: c, label: f, disabled: l }) => d.createElement(r.Option, { key: c, value: c, disabled: l }, f))),
|
|
1759
|
+
d.createElement(
|
|
1755
1760
|
"span",
|
|
1756
1761
|
{ className: o[m.CaptionLabel], "aria-hidden": !0 },
|
|
1757
1762
|
a?.label,
|
|
1758
|
-
|
|
1763
|
+
d.createElement(r.Chevron, { orientation: "down", size: 18, className: o[m.Chevron] })
|
|
1759
1764
|
)
|
|
1760
1765
|
);
|
|
1761
1766
|
}
|
|
1762
|
-
function
|
|
1763
|
-
return
|
|
1767
|
+
function Xr(e) {
|
|
1768
|
+
return d.createElement("div", { ...e });
|
|
1764
1769
|
}
|
|
1765
|
-
function
|
|
1766
|
-
return
|
|
1770
|
+
function Ur(e) {
|
|
1771
|
+
return d.createElement("div", { ...e });
|
|
1767
1772
|
}
|
|
1768
|
-
function
|
|
1773
|
+
function Vr(e) {
|
|
1769
1774
|
const { calendarMonth: t, displayIndex: n, ...r } = e;
|
|
1770
|
-
return
|
|
1775
|
+
return d.createElement("div", { ...r }, e.children);
|
|
1771
1776
|
}
|
|
1772
|
-
function
|
|
1777
|
+
function Kr(e) {
|
|
1773
1778
|
const { calendarMonth: t, displayIndex: n, ...r } = e;
|
|
1774
|
-
return
|
|
1779
|
+
return d.createElement("div", { ...r });
|
|
1775
1780
|
}
|
|
1776
|
-
function
|
|
1777
|
-
return
|
|
1781
|
+
function Jr(e) {
|
|
1782
|
+
return d.createElement("table", { ...e });
|
|
1778
1783
|
}
|
|
1779
|
-
function
|
|
1780
|
-
return
|
|
1784
|
+
function eo(e) {
|
|
1785
|
+
return d.createElement("div", { ...e });
|
|
1781
1786
|
}
|
|
1782
1787
|
const kt = sn(void 0);
|
|
1783
1788
|
function ge() {
|
|
@@ -1786,78 +1791,78 @@ function ge() {
|
|
|
1786
1791
|
throw new Error("useDayPicker() must be used within a custom component.");
|
|
1787
1792
|
return e;
|
|
1788
1793
|
}
|
|
1789
|
-
function
|
|
1794
|
+
function to(e) {
|
|
1790
1795
|
const { components: t } = ge();
|
|
1791
|
-
return
|
|
1796
|
+
return d.createElement(t.Dropdown, { ...e });
|
|
1792
1797
|
}
|
|
1793
|
-
function
|
|
1794
|
-
const { onPreviousClick: t, onNextClick: n, previousMonth: r, nextMonth: o, ...s } = e, { components: i, classNames: a, labels: { labelPrevious: c, labelNext: f } } = ge(),
|
|
1798
|
+
function no(e) {
|
|
1799
|
+
const { onPreviousClick: t, onNextClick: n, previousMonth: r, nextMonth: o, ...s } = e, { components: i, classNames: a, labels: { labelPrevious: c, labelNext: f } } = ge(), l = j((h) => {
|
|
1795
1800
|
o && n?.(h);
|
|
1796
1801
|
}, [o, n]), u = j((h) => {
|
|
1797
1802
|
r && t?.(h);
|
|
1798
1803
|
}, [r, t]);
|
|
1799
|
-
return
|
|
1804
|
+
return d.createElement(
|
|
1800
1805
|
"nav",
|
|
1801
1806
|
{ ...s },
|
|
1802
|
-
|
|
1807
|
+
d.createElement(
|
|
1803
1808
|
i.PreviousMonthButton,
|
|
1804
1809
|
{ type: "button", className: a[m.PreviousMonthButton], tabIndex: r ? void 0 : -1, "aria-disabled": r ? void 0 : !0, "aria-label": c(r), onClick: u },
|
|
1805
|
-
|
|
1810
|
+
d.createElement(i.Chevron, { disabled: r ? void 0 : !0, className: a[m.Chevron], orientation: "left" })
|
|
1806
1811
|
),
|
|
1807
|
-
|
|
1812
|
+
d.createElement(
|
|
1808
1813
|
i.NextMonthButton,
|
|
1809
|
-
{ type: "button", className: a[m.NextMonthButton], tabIndex: o ? void 0 : -1, "aria-disabled": o ? void 0 : !0, "aria-label": f(o), onClick:
|
|
1810
|
-
|
|
1814
|
+
{ type: "button", className: a[m.NextMonthButton], tabIndex: o ? void 0 : -1, "aria-disabled": o ? void 0 : !0, "aria-label": f(o), onClick: l },
|
|
1815
|
+
d.createElement(i.Chevron, { disabled: o ? void 0 : !0, orientation: "right", className: a[m.Chevron] })
|
|
1811
1816
|
)
|
|
1812
1817
|
);
|
|
1813
1818
|
}
|
|
1819
|
+
function ro(e) {
|
|
1820
|
+
const { components: t } = ge();
|
|
1821
|
+
return d.createElement(t.Button, { ...e });
|
|
1822
|
+
}
|
|
1823
|
+
function oo(e) {
|
|
1824
|
+
return d.createElement("option", { ...e });
|
|
1825
|
+
}
|
|
1814
1826
|
function so(e) {
|
|
1815
1827
|
const { components: t } = ge();
|
|
1816
|
-
return
|
|
1828
|
+
return d.createElement(t.Button, { ...e });
|
|
1817
1829
|
}
|
|
1818
1830
|
function ao(e) {
|
|
1819
|
-
|
|
1831
|
+
const { rootRef: t, ...n } = e;
|
|
1832
|
+
return d.createElement("div", { ...n, ref: t });
|
|
1820
1833
|
}
|
|
1821
1834
|
function io(e) {
|
|
1822
|
-
|
|
1823
|
-
return l.createElement(t.Button, { ...e });
|
|
1835
|
+
return d.createElement("select", { ...e });
|
|
1824
1836
|
}
|
|
1825
1837
|
function co(e) {
|
|
1826
|
-
const {
|
|
1827
|
-
return
|
|
1838
|
+
const { week: t, ...n } = e;
|
|
1839
|
+
return d.createElement("tr", { ...n });
|
|
1828
1840
|
}
|
|
1829
1841
|
function uo(e) {
|
|
1830
|
-
return
|
|
1842
|
+
return d.createElement("th", { ...e });
|
|
1831
1843
|
}
|
|
1832
1844
|
function fo(e) {
|
|
1833
|
-
|
|
1834
|
-
return l.createElement("tr", { ...n });
|
|
1835
|
-
}
|
|
1836
|
-
function lo(e) {
|
|
1837
|
-
return l.createElement("th", { ...e });
|
|
1838
|
-
}
|
|
1839
|
-
function ho(e) {
|
|
1840
|
-
return l.createElement(
|
|
1845
|
+
return d.createElement(
|
|
1841
1846
|
"thead",
|
|
1842
1847
|
{ "aria-hidden": !0 },
|
|
1843
|
-
|
|
1848
|
+
d.createElement("tr", { ...e })
|
|
1844
1849
|
);
|
|
1845
1850
|
}
|
|
1846
|
-
function
|
|
1851
|
+
function lo(e) {
|
|
1847
1852
|
const { week: t, ...n } = e;
|
|
1848
|
-
return
|
|
1853
|
+
return d.createElement("th", { ...n });
|
|
1849
1854
|
}
|
|
1850
|
-
function
|
|
1851
|
-
return
|
|
1855
|
+
function ho(e) {
|
|
1856
|
+
return d.createElement("th", { ...e });
|
|
1852
1857
|
}
|
|
1853
|
-
function
|
|
1854
|
-
return
|
|
1858
|
+
function mo(e) {
|
|
1859
|
+
return d.createElement("tbody", { ...e });
|
|
1855
1860
|
}
|
|
1856
|
-
function
|
|
1861
|
+
function yo(e) {
|
|
1857
1862
|
const { components: t } = ge();
|
|
1858
|
-
return
|
|
1863
|
+
return d.createElement(t.Dropdown, { ...e });
|
|
1859
1864
|
}
|
|
1860
|
-
const
|
|
1865
|
+
const go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, Button: Zr, CaptionLabel: $r, Chevron: Gr, Day: zr, DayButton: Lr, Dropdown: Qr, DropdownNav: Xr, Footer: Ur, Month: Vr, MonthCaption: Kr, MonthGrid: Jr, Months: eo, MonthsDropdown: to, Nav: no, NextMonthButton: ro, Option: oo, PreviousMonthButton: so, Root: ao, Select: io, Week: co, WeekNumber: lo, WeekNumberHeader: ho, Weekday: uo, Weekdays: fo, Weeks: mo, YearsDropdown: yo }, Symbol.toStringTag, { value: "Module" }));
|
|
1861
1866
|
function K(e, t, n = !1, r = U) {
|
|
1862
1867
|
let { from: o, to: s } = e;
|
|
1863
1868
|
const { differenceInCalendarDays: i, isSameDay: a } = r;
|
|
@@ -1895,14 +1900,14 @@ function J(e, t, n = U) {
|
|
|
1895
1900
|
if (Wt(a))
|
|
1896
1901
|
return Array.isArray(a.dayOfWeek) ? a.dayOfWeek.includes(e.getDay()) : a.dayOfWeek === e.getDay();
|
|
1897
1902
|
if (Dt(a)) {
|
|
1898
|
-
const c = s(a.before, e), f = s(a.after, e),
|
|
1899
|
-
return i(a.before, a.after) ? u &&
|
|
1903
|
+
const c = s(a.before, e), f = s(a.after, e), l = c > 0, u = f < 0;
|
|
1904
|
+
return i(a.before, a.after) ? u && l : l || u;
|
|
1900
1905
|
}
|
|
1901
1906
|
return vt(a) ? s(e, a.after) > 0 : Ot(a) ? s(a.before, e) > 0 : typeof a == "function" ? a(e) : !1;
|
|
1902
1907
|
});
|
|
1903
1908
|
}
|
|
1904
|
-
function
|
|
1905
|
-
const { disabled: s, hidden: i, modifiers: a, showOutsideDays: c, broadcastCalendar: f, today:
|
|
1909
|
+
function po(e, t, n, r, o) {
|
|
1910
|
+
const { disabled: s, hidden: i, modifiers: a, showOutsideDays: c, broadcastCalendar: f, today: l } = t, { isSameDay: u, isSameMonth: h, startOfMonth: g, isBefore: v, endOfMonth: W, isAfter: M } = o, O = n && g(n), C = r && W(r), p = {
|
|
1906
1911
|
[_.focused]: [],
|
|
1907
1912
|
[_.outside]: [],
|
|
1908
1913
|
[_.disabled]: [],
|
|
@@ -1910,44 +1915,44 @@ function bo(e, t, n, r, o) {
|
|
|
1910
1915
|
[_.today]: []
|
|
1911
1916
|
}, T = {};
|
|
1912
1917
|
for (const y of e) {
|
|
1913
|
-
const { date:
|
|
1914
|
-
!f && !c &&
|
|
1915
|
-
|
|
1918
|
+
const { date: k, displayMonth: b } = y, N = !!(b && !h(k, b)), B = !!(O && v(k, O)), H = !!(C && M(k, C)), q = !!(s && J(k, s, o)), $ = !!(i && J(k, i, o)) || B || H || // Broadcast calendar will show outside days as default
|
|
1919
|
+
!f && !c && N || f && c === !1 && N, re = u(k, l ?? o.today());
|
|
1920
|
+
N && p.outside.push(y), q && p.disabled.push(y), $ && p.hidden.push(y), re && p.today.push(y), a && Object.keys(a).forEach((oe) => {
|
|
1916
1921
|
const se = a?.[oe];
|
|
1917
|
-
se && J(
|
|
1922
|
+
se && J(k, se, o) && (T[oe] ? T[oe].push(y) : T[oe] = [y]);
|
|
1918
1923
|
});
|
|
1919
1924
|
}
|
|
1920
1925
|
return (y) => {
|
|
1921
|
-
const
|
|
1926
|
+
const k = {
|
|
1922
1927
|
[_.focused]: !1,
|
|
1923
1928
|
[_.disabled]: !1,
|
|
1924
1929
|
[_.hidden]: !1,
|
|
1925
1930
|
[_.outside]: !1,
|
|
1926
1931
|
[_.today]: !1
|
|
1927
|
-
},
|
|
1928
|
-
for (const
|
|
1929
|
-
const B =
|
|
1930
|
-
|
|
1932
|
+
}, b = {};
|
|
1933
|
+
for (const N in p) {
|
|
1934
|
+
const B = p[N];
|
|
1935
|
+
k[N] = B.some((H) => H === y);
|
|
1931
1936
|
}
|
|
1932
|
-
for (const
|
|
1933
|
-
|
|
1937
|
+
for (const N in T)
|
|
1938
|
+
b[N] = T[N].some((B) => B === y);
|
|
1934
1939
|
return {
|
|
1935
|
-
...
|
|
1940
|
+
...k,
|
|
1936
1941
|
// custom modifiers should override all the previous ones
|
|
1937
|
-
...
|
|
1942
|
+
...b
|
|
1938
1943
|
};
|
|
1939
1944
|
};
|
|
1940
1945
|
}
|
|
1941
|
-
function
|
|
1946
|
+
function wo(e, t, n = {}) {
|
|
1942
1947
|
return Object.entries(e).filter(([, o]) => o === !0).reduce((o, [s]) => (n[s] ? o.push(n[s]) : t[_[s]] ? o.push(t[_[s]]) : t[L[s]] && o.push(t[L[s]]), o), [t[m.Day]]);
|
|
1943
1948
|
}
|
|
1944
|
-
function
|
|
1949
|
+
function bo(e) {
|
|
1945
1950
|
return {
|
|
1946
|
-
...
|
|
1951
|
+
...go,
|
|
1947
1952
|
...e
|
|
1948
1953
|
};
|
|
1949
1954
|
}
|
|
1950
|
-
function
|
|
1955
|
+
function Mo(e) {
|
|
1951
1956
|
const t = {
|
|
1952
1957
|
"data-mode": e.mode ?? void 0,
|
|
1953
1958
|
"data-required": "required" in e ? e.required : void 0,
|
|
@@ -1960,7 +1965,7 @@ function Do(e) {
|
|
|
1960
1965
|
n.startsWith("data-") && (t[n] = r);
|
|
1961
1966
|
}), t;
|
|
1962
1967
|
}
|
|
1963
|
-
function
|
|
1968
|
+
function ko() {
|
|
1964
1969
|
const e = {};
|
|
1965
1970
|
for (const t in m)
|
|
1966
1971
|
e[m[t]] = `rdp-${m[t]}`;
|
|
@@ -1968,50 +1973,50 @@ function vo() {
|
|
|
1968
1973
|
e[_[t]] = `rdp-${_[t]}`;
|
|
1969
1974
|
for (const t in L)
|
|
1970
1975
|
e[L[t]] = `rdp-${L[t]}`;
|
|
1971
|
-
for (const t in
|
|
1972
|
-
e[
|
|
1976
|
+
for (const t in R)
|
|
1977
|
+
e[R[t]] = `rdp-${R[t]}`;
|
|
1973
1978
|
return e;
|
|
1974
1979
|
}
|
|
1975
1980
|
function Ct(e, t, n) {
|
|
1976
|
-
return (n ?? new
|
|
1981
|
+
return (n ?? new Z(t)).formatMonthYear(e);
|
|
1977
1982
|
}
|
|
1978
|
-
const
|
|
1979
|
-
function
|
|
1980
|
-
return (n ?? new
|
|
1983
|
+
const Do = Ct;
|
|
1984
|
+
function vo(e, t, n) {
|
|
1985
|
+
return (n ?? new Z(t)).format(e, "d");
|
|
1981
1986
|
}
|
|
1982
|
-
function
|
|
1987
|
+
function Oo(e, t = U) {
|
|
1983
1988
|
return t.format(e, "LLLL");
|
|
1984
1989
|
}
|
|
1985
|
-
function
|
|
1986
|
-
return (n ?? new
|
|
1990
|
+
function Wo(e, t, n) {
|
|
1991
|
+
return (n ?? new Z(t)).format(e, "cccccc");
|
|
1987
1992
|
}
|
|
1988
|
-
function
|
|
1993
|
+
function So(e, t = U) {
|
|
1989
1994
|
return e < 10 ? t.formatNumber(`0${e.toLocaleString()}`) : t.formatNumber(`${e.toLocaleString()}`);
|
|
1990
1995
|
}
|
|
1991
|
-
function
|
|
1996
|
+
function Co() {
|
|
1992
1997
|
return "";
|
|
1993
1998
|
}
|
|
1994
1999
|
function Nt(e, t = U) {
|
|
1995
2000
|
return t.format(e, "yyyy");
|
|
1996
2001
|
}
|
|
1997
|
-
const
|
|
1998
|
-
function
|
|
2002
|
+
const No = Nt, xo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, formatCaption: Ct, formatDay: vo, formatMonthCaption: Do, formatMonthDropdown: Oo, formatWeekNumber: So, formatWeekNumberHeader: Co, formatWeekdayName: Wo, formatYearCaption: No, formatYearDropdown: Nt }, Symbol.toStringTag, { value: "Module" }));
|
|
2003
|
+
function Yo(e) {
|
|
1999
2004
|
return e?.formatMonthCaption && !e.formatCaption && (e.formatCaption = e.formatMonthCaption), e?.formatYearCaption && !e.formatYearDropdown && (e.formatYearDropdown = e.formatYearCaption), {
|
|
2000
|
-
...
|
|
2005
|
+
...xo,
|
|
2001
2006
|
...e
|
|
2002
2007
|
};
|
|
2003
2008
|
}
|
|
2004
|
-
function
|
|
2009
|
+
function To(e, t, n, r, o) {
|
|
2005
2010
|
const { startOfMonth: s, startOfYear: i, endOfYear: a, eachMonthOfInterval: c, getMonth: f } = o;
|
|
2006
2011
|
return c({
|
|
2007
2012
|
start: i(e),
|
|
2008
2013
|
end: a(e)
|
|
2009
2014
|
}).map((h) => {
|
|
2010
|
-
const g = r.formatMonthDropdown(h, o),
|
|
2011
|
-
return { value:
|
|
2015
|
+
const g = r.formatMonthDropdown(h, o), v = f(h), W = t && h < s(t) || n && h > s(n) || !1;
|
|
2016
|
+
return { value: v, label: g, disabled: W };
|
|
2012
2017
|
});
|
|
2013
2018
|
}
|
|
2014
|
-
function
|
|
2019
|
+
function Eo(e, t = {}, n = {}) {
|
|
2015
2020
|
let r = { ...t?.[m.Day] };
|
|
2016
2021
|
return Object.entries(e).filter(([, o]) => o === !0).forEach(([o]) => {
|
|
2017
2022
|
r = {
|
|
@@ -2020,7 +2025,7 @@ function _o(e, t = {}, n = {}) {
|
|
|
2020
2025
|
};
|
|
2021
2026
|
}), r;
|
|
2022
2027
|
}
|
|
2023
|
-
function
|
|
2028
|
+
function Po(e, t, n) {
|
|
2024
2029
|
const r = e.today(), o = t ? e.startOfISOWeek(r) : e.startOfWeek(r), s = [];
|
|
2025
2030
|
for (let i = 0; i < 7; i++) {
|
|
2026
2031
|
const a = e.addDays(o, i);
|
|
@@ -2028,63 +2033,60 @@ function Fo(e, t, n) {
|
|
|
2028
2033
|
}
|
|
2029
2034
|
return s;
|
|
2030
2035
|
}
|
|
2031
|
-
function
|
|
2036
|
+
function _o(e, t, n, r, o = !1) {
|
|
2032
2037
|
if (!e || !t)
|
|
2033
2038
|
return;
|
|
2034
|
-
const { startOfYear: s, endOfYear: i,
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
g.push(p), p = a(p, 1);
|
|
2038
|
-
return o && g.reverse(), g.map((O) => {
|
|
2039
|
-
const w = n.formatYearDropdown(O, r);
|
|
2039
|
+
const { startOfYear: s, endOfYear: i, eachYearOfInterval: a, getYear: c } = r, f = s(e), l = i(t), u = a({ start: f, end: l });
|
|
2040
|
+
return o && u.reverse(), u.map((h) => {
|
|
2041
|
+
const g = n.formatYearDropdown(h, r);
|
|
2040
2042
|
return {
|
|
2041
|
-
value: c(
|
|
2042
|
-
label:
|
|
2043
|
+
value: c(h),
|
|
2044
|
+
label: g,
|
|
2043
2045
|
disabled: !1
|
|
2044
2046
|
};
|
|
2045
2047
|
});
|
|
2046
2048
|
}
|
|
2047
2049
|
function xt(e, t, n, r) {
|
|
2048
|
-
let o = (r ?? new
|
|
2050
|
+
let o = (r ?? new Z(n)).format(e, "PPPP");
|
|
2049
2051
|
return t.today && (o = `Today, ${o}`), t.selected && (o = `${o}, selected`), o;
|
|
2050
2052
|
}
|
|
2051
|
-
const
|
|
2053
|
+
const Fo = xt;
|
|
2052
2054
|
function Yt(e, t, n) {
|
|
2053
|
-
return (n ?? new
|
|
2055
|
+
return (n ?? new Z(t)).formatMonthYear(e);
|
|
2054
2056
|
}
|
|
2055
|
-
const
|
|
2056
|
-
function
|
|
2057
|
-
let o = (r ?? new
|
|
2057
|
+
const Bo = Yt;
|
|
2058
|
+
function Io(e, t, n, r) {
|
|
2059
|
+
let o = (r ?? new Z(n)).format(e, "PPPP");
|
|
2058
2060
|
return t?.today && (o = `Today, ${o}`), o;
|
|
2059
2061
|
}
|
|
2060
|
-
function
|
|
2062
|
+
function Ho(e) {
|
|
2061
2063
|
return "Choose the Month";
|
|
2062
2064
|
}
|
|
2063
|
-
function
|
|
2065
|
+
function qo() {
|
|
2064
2066
|
return "";
|
|
2065
2067
|
}
|
|
2066
|
-
function
|
|
2068
|
+
function Ao(e) {
|
|
2067
2069
|
return "Go to the Next Month";
|
|
2068
2070
|
}
|
|
2069
|
-
function
|
|
2071
|
+
function jo(e) {
|
|
2070
2072
|
return "Go to the Previous Month";
|
|
2071
2073
|
}
|
|
2072
|
-
function
|
|
2073
|
-
return (n ?? new
|
|
2074
|
+
function Ro(e, t, n) {
|
|
2075
|
+
return (n ?? new Z(t)).format(e, "cccc");
|
|
2074
2076
|
}
|
|
2075
|
-
function
|
|
2077
|
+
function Zo(e, t) {
|
|
2076
2078
|
return `Week ${e}`;
|
|
2077
2079
|
}
|
|
2078
|
-
function
|
|
2080
|
+
function $o(e) {
|
|
2079
2081
|
return "Week Number";
|
|
2080
2082
|
}
|
|
2081
|
-
function
|
|
2083
|
+
function Go(e) {
|
|
2082
2084
|
return "Choose the Year";
|
|
2083
2085
|
}
|
|
2084
|
-
const
|
|
2086
|
+
const zo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, labelCaption: Bo, labelDay: Fo, labelDayButton: xt, labelGrid: Yt, labelGridcell: Io, labelMonthDropdown: Ho, labelNav: qo, labelNext: Ao, labelPrevious: jo, labelWeekNumber: Zo, labelWeekNumberHeader: $o, labelWeekday: Ro, labelYearDropdown: Go }, Symbol.toStringTag, { value: "Module" })), pe = (e) => e instanceof HTMLElement ? e : null, Fe = (e) => [
|
|
2085
2087
|
...e.querySelectorAll("[data-animated-month]") ?? []
|
|
2086
|
-
],
|
|
2087
|
-
function
|
|
2088
|
+
], Lo = (e) => pe(e.querySelector("[data-animated-month]")), Be = (e) => pe(e.querySelector("[data-animated-caption]")), Ie = (e) => pe(e.querySelector("[data-animated-weeks]")), Qo = (e) => pe(e.querySelector("[data-animated-nav]")), Xo = (e) => pe(e.querySelector("[data-animated-weekdays]"));
|
|
2089
|
+
function Uo(e, t, { classNames: n, months: r, focused: o, dateLib: s }) {
|
|
2088
2090
|
const i = ke(null), a = ke(r), c = ke(!1);
|
|
2089
2091
|
cn(() => {
|
|
2090
2092
|
const f = a.current;
|
|
@@ -2092,72 +2094,72 @@ function Ko(e, t, { classNames: n, months: r, focused: o, dateLib: s }) {
|
|
|
2092
2094
|
!(e.current instanceof HTMLElement) || // validation required for the animation to work as expected
|
|
2093
2095
|
r.length === 0 || f.length === 0 || r.length !== f.length)
|
|
2094
2096
|
return;
|
|
2095
|
-
const
|
|
2096
|
-
if (
|
|
2097
|
-
if (!(
|
|
2097
|
+
const l = s.isSameMonth(r[0].date, f[0].date), u = s.isAfter(r[0].date, f[0].date), h = u ? n[R.caption_after_enter] : n[R.caption_before_enter], g = u ? n[R.weeks_after_enter] : n[R.weeks_before_enter], v = i.current, W = e.current.cloneNode(!0);
|
|
2098
|
+
if (W instanceof HTMLElement ? (Fe(W).forEach((p) => {
|
|
2099
|
+
if (!(p instanceof HTMLElement))
|
|
2098
2100
|
return;
|
|
2099
|
-
const T =
|
|
2100
|
-
T &&
|
|
2101
|
-
const y = Be(
|
|
2101
|
+
const T = Lo(p);
|
|
2102
|
+
T && p.contains(T) && p.removeChild(T);
|
|
2103
|
+
const y = Be(p);
|
|
2102
2104
|
y && y.classList.remove(h);
|
|
2103
|
-
const
|
|
2104
|
-
|
|
2105
|
-
}), i.current =
|
|
2105
|
+
const k = Ie(p);
|
|
2106
|
+
k && k.classList.remove(g);
|
|
2107
|
+
}), i.current = W) : i.current = null, c.current || l || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
|
|
2106
2108
|
o)
|
|
2107
2109
|
return;
|
|
2108
|
-
const
|
|
2109
|
-
if (
|
|
2110
|
+
const M = v instanceof HTMLElement ? Fe(v) : [], O = Fe(e.current);
|
|
2111
|
+
if (O?.every((C) => C instanceof HTMLElement) && M && M.every((C) => C instanceof HTMLElement)) {
|
|
2110
2112
|
c.current = !0, e.current.style.isolation = "isolate";
|
|
2111
|
-
const
|
|
2112
|
-
|
|
2113
|
-
const y =
|
|
2113
|
+
const C = Qo(e.current);
|
|
2114
|
+
C && (C.style.zIndex = "1"), O.forEach((p, T) => {
|
|
2115
|
+
const y = M[T];
|
|
2114
2116
|
if (!y)
|
|
2115
2117
|
return;
|
|
2116
|
-
|
|
2117
|
-
const
|
|
2118
|
-
|
|
2119
|
-
const
|
|
2120
|
-
|
|
2121
|
-
const
|
|
2122
|
-
c.current = !1, e.current && (e.current.style.isolation = ""),
|
|
2118
|
+
p.style.position = "relative", p.style.overflow = "hidden";
|
|
2119
|
+
const k = Be(p);
|
|
2120
|
+
k && k.classList.add(h);
|
|
2121
|
+
const b = Ie(p);
|
|
2122
|
+
b && b.classList.add(g);
|
|
2123
|
+
const N = () => {
|
|
2124
|
+
c.current = !1, e.current && (e.current.style.isolation = ""), C && (C.style.zIndex = ""), k && k.classList.remove(h), b && b.classList.remove(g), p.style.position = "", p.style.overflow = "", p.contains(y) && p.removeChild(y);
|
|
2123
2125
|
};
|
|
2124
2126
|
y.style.pointerEvents = "none", y.style.position = "absolute", y.style.overflow = "hidden", y.setAttribute("aria-hidden", "true");
|
|
2125
|
-
const B =
|
|
2127
|
+
const B = Xo(y);
|
|
2126
2128
|
B && (B.style.opacity = "0");
|
|
2127
2129
|
const H = Be(y);
|
|
2128
|
-
H && (H.classList.add(u ? n[
|
|
2130
|
+
H && (H.classList.add(u ? n[R.caption_before_exit] : n[R.caption_after_exit]), H.addEventListener("animationend", N));
|
|
2129
2131
|
const q = Ie(y);
|
|
2130
|
-
q && q.classList.add(u ? n[
|
|
2132
|
+
q && q.classList.add(u ? n[R.weeks_before_exit] : n[R.weeks_after_exit]), p.insertBefore(y, p.firstChild);
|
|
2131
2133
|
});
|
|
2132
2134
|
}
|
|
2133
2135
|
});
|
|
2134
2136
|
}
|
|
2135
|
-
function
|
|
2136
|
-
const o = e[0], s = e[e.length - 1], { ISOWeek: i, fixedWeeks: a, broadcastCalendar: c } = n ?? {}, { addDays: f, differenceInCalendarDays:
|
|
2137
|
-
for (let q = 0; q <=
|
|
2138
|
-
const
|
|
2139
|
-
if (t &&
|
|
2137
|
+
function Vo(e, t, n, r) {
|
|
2138
|
+
const o = e[0], s = e[e.length - 1], { ISOWeek: i, fixedWeeks: a, broadcastCalendar: c } = n ?? {}, { addDays: f, differenceInCalendarDays: l, differenceInCalendarMonths: u, endOfBroadcastWeek: h, endOfISOWeek: g, endOfMonth: v, endOfWeek: W, isAfter: M, startOfBroadcastWeek: O, startOfISOWeek: C, startOfWeek: p } = r, T = c ? O(o, r) : i ? C(o) : p(o), y = c ? h(s) : i ? g(v(s)) : W(v(s)), k = l(y, T), b = u(s, o) + 1, N = [];
|
|
2139
|
+
for (let q = 0; q <= k; q++) {
|
|
2140
|
+
const $ = f(T, q);
|
|
2141
|
+
if (t && M($, t))
|
|
2140
2142
|
break;
|
|
2141
|
-
|
|
2143
|
+
N.push($);
|
|
2142
2144
|
}
|
|
2143
|
-
const H = (c ? 35 : 42) *
|
|
2144
|
-
if (a &&
|
|
2145
|
-
const q = H -
|
|
2146
|
-
for (let
|
|
2147
|
-
const re = f(
|
|
2148
|
-
|
|
2145
|
+
const H = (c ? 35 : 42) * b;
|
|
2146
|
+
if (a && N.length < H) {
|
|
2147
|
+
const q = H - N.length;
|
|
2148
|
+
for (let $ = 0; $ < q; $++) {
|
|
2149
|
+
const re = f(N[N.length - 1], 1);
|
|
2150
|
+
N.push(re);
|
|
2149
2151
|
}
|
|
2150
2152
|
}
|
|
2151
|
-
return
|
|
2153
|
+
return N;
|
|
2152
2154
|
}
|
|
2153
|
-
function
|
|
2155
|
+
function Ko(e) {
|
|
2154
2156
|
const t = [];
|
|
2155
2157
|
return e.reduce((n, r) => {
|
|
2156
2158
|
const o = r.weeks.reduce((s, i) => s.concat(i.days.slice()), t.slice());
|
|
2157
2159
|
return n.concat(o.slice());
|
|
2158
2160
|
}, t.slice());
|
|
2159
2161
|
}
|
|
2160
|
-
function
|
|
2162
|
+
function Jo(e, t, n, r) {
|
|
2161
2163
|
const { numberOfMonths: o = 1 } = n, s = [];
|
|
2162
2164
|
for (let i = 0; i < o; i++) {
|
|
2163
2165
|
const a = r.addMonths(e, i);
|
|
@@ -2170,60 +2172,60 @@ function ts(e, t, n, r) {
|
|
|
2170
2172
|
function nt(e, t, n, r) {
|
|
2171
2173
|
const { month: o, defaultMonth: s, today: i = r.today(), numberOfMonths: a = 1 } = e;
|
|
2172
2174
|
let c = o || s || i;
|
|
2173
|
-
const { differenceInCalendarMonths: f, addMonths:
|
|
2175
|
+
const { differenceInCalendarMonths: f, addMonths: l, startOfMonth: u } = r;
|
|
2174
2176
|
if (n && f(n, c) < a - 1) {
|
|
2175
2177
|
const h = -1 * (a - 1);
|
|
2176
|
-
c =
|
|
2178
|
+
c = l(n, h);
|
|
2177
2179
|
}
|
|
2178
2180
|
return t && f(c, t) < 0 && (c = t), u(c);
|
|
2179
2181
|
}
|
|
2180
|
-
function
|
|
2181
|
-
const { addDays: o, endOfBroadcastWeek: s, endOfISOWeek: i, endOfMonth: a, endOfWeek: c, getISOWeek: f, getWeek:
|
|
2182
|
-
const
|
|
2183
|
-
if (n.fixedWeeks &&
|
|
2184
|
-
const
|
|
2185
|
-
const B = T -
|
|
2186
|
-
return
|
|
2182
|
+
function es(e, t, n, r) {
|
|
2183
|
+
const { addDays: o, endOfBroadcastWeek: s, endOfISOWeek: i, endOfMonth: a, endOfWeek: c, getISOWeek: f, getWeek: l, startOfBroadcastWeek: u, startOfISOWeek: h, startOfWeek: g } = r, v = e.reduce((W, M) => {
|
|
2184
|
+
const O = n.broadcastCalendar ? u(M, r) : n.ISOWeek ? h(M) : g(M), C = n.broadcastCalendar ? s(M) : n.ISOWeek ? i(a(M)) : c(a(M)), p = t.filter((b) => b >= O && b <= C), T = n.broadcastCalendar ? 35 : 42;
|
|
2185
|
+
if (n.fixedWeeks && p.length < T) {
|
|
2186
|
+
const b = t.filter((N) => {
|
|
2187
|
+
const B = T - p.length;
|
|
2188
|
+
return N > C && N <= o(C, B);
|
|
2187
2189
|
});
|
|
2188
|
-
|
|
2190
|
+
p.push(...b);
|
|
2189
2191
|
}
|
|
2190
|
-
const y =
|
|
2191
|
-
const B = n.ISOWeek ? f(
|
|
2192
|
-
return H ? H.days.push(q) :
|
|
2193
|
-
}, []),
|
|
2194
|
-
return
|
|
2192
|
+
const y = p.reduce((b, N) => {
|
|
2193
|
+
const B = n.ISOWeek ? f(N) : l(N), H = b.find(($) => $.weekNumber === B), q = new Mt(N, M, r);
|
|
2194
|
+
return H ? H.days.push(q) : b.push(new Rr(B, [q])), b;
|
|
2195
|
+
}, []), k = new jr(M, y);
|
|
2196
|
+
return W.push(k), W;
|
|
2195
2197
|
}, []);
|
|
2196
|
-
return n.reverseMonths ?
|
|
2198
|
+
return n.reverseMonths ? v.reverse() : v;
|
|
2197
2199
|
}
|
|
2198
|
-
function
|
|
2200
|
+
function ts(e, t) {
|
|
2199
2201
|
let { startMonth: n, endMonth: r } = e;
|
|
2200
|
-
const { startOfYear: o, startOfDay: s, startOfMonth: i, endOfMonth: a, addYears: c, endOfYear: f, newDate:
|
|
2201
|
-
!n &&
|
|
2202
|
-
const
|
|
2203
|
-
return n ? n = i(n) : h ? n =
|
|
2202
|
+
const { startOfYear: o, startOfDay: s, startOfMonth: i, endOfMonth: a, addYears: c, endOfYear: f, newDate: l, today: u } = t, { fromYear: h, toYear: g, fromMonth: v, toMonth: W } = e;
|
|
2203
|
+
!n && v && (n = v), !n && h && (n = t.newDate(h, 0, 1)), !r && W && (r = W), !r && g && (r = l(g, 11, 31));
|
|
2204
|
+
const M = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
|
|
2205
|
+
return n ? n = i(n) : h ? n = l(h, 0, 1) : !n && M && (n = o(c(e.today ?? u(), -100))), r ? r = a(r) : g ? r = l(g, 11, 31) : !r && M && (r = f(e.today ?? u())), [
|
|
2204
2206
|
n && s(n),
|
|
2205
2207
|
r && s(r)
|
|
2206
2208
|
];
|
|
2207
2209
|
}
|
|
2208
|
-
function
|
|
2210
|
+
function ns(e, t, n, r) {
|
|
2209
2211
|
if (n.disableNavigation)
|
|
2210
2212
|
return;
|
|
2211
|
-
const { pagedNavigation: o, numberOfMonths: s = 1 } = n, { startOfMonth: i, addMonths: a, differenceInCalendarMonths: c } = r, f = o ? s : 1,
|
|
2213
|
+
const { pagedNavigation: o, numberOfMonths: s = 1 } = n, { startOfMonth: i, addMonths: a, differenceInCalendarMonths: c } = r, f = o ? s : 1, l = i(e);
|
|
2212
2214
|
if (!t)
|
|
2213
|
-
return a(
|
|
2215
|
+
return a(l, f);
|
|
2214
2216
|
if (!(c(t, e) < s))
|
|
2215
|
-
return a(
|
|
2217
|
+
return a(l, f);
|
|
2216
2218
|
}
|
|
2217
|
-
function
|
|
2219
|
+
function rs(e, t, n, r) {
|
|
2218
2220
|
if (n.disableNavigation)
|
|
2219
2221
|
return;
|
|
2220
|
-
const { pagedNavigation: o, numberOfMonths: s } = n, { startOfMonth: i, addMonths: a, differenceInCalendarMonths: c } = r, f = o ? s ?? 1 : 1,
|
|
2222
|
+
const { pagedNavigation: o, numberOfMonths: s } = n, { startOfMonth: i, addMonths: a, differenceInCalendarMonths: c } = r, f = o ? s ?? 1 : 1, l = i(e);
|
|
2221
2223
|
if (!t)
|
|
2222
|
-
return a(
|
|
2223
|
-
if (!(c(
|
|
2224
|
-
return a(
|
|
2224
|
+
return a(l, -f);
|
|
2225
|
+
if (!(c(l, t) <= 0))
|
|
2226
|
+
return a(l, -f);
|
|
2225
2227
|
}
|
|
2226
|
-
function
|
|
2228
|
+
function os(e) {
|
|
2227
2229
|
const t = [];
|
|
2228
2230
|
return e.reduce((n, r) => n.concat(r.weeks.slice()), t.slice());
|
|
2229
2231
|
}
|
|
@@ -2231,21 +2233,21 @@ function ve(e, t) {
|
|
|
2231
2233
|
const [n, r] = De(e);
|
|
2232
2234
|
return [t === void 0 ? n : t, r];
|
|
2233
2235
|
}
|
|
2234
|
-
function
|
|
2235
|
-
const [n, r] =
|
|
2236
|
+
function ss(e, t) {
|
|
2237
|
+
const [n, r] = ts(e, t), { startOfMonth: o, endOfMonth: s } = t, i = nt(e, n, r, t), [a, c] = ve(
|
|
2236
2238
|
i,
|
|
2237
2239
|
// initialMonth is always computed from props.month if provided
|
|
2238
2240
|
e.month ? i : void 0
|
|
2239
2241
|
);
|
|
2240
2242
|
un(() => {
|
|
2241
|
-
const
|
|
2242
|
-
c(
|
|
2243
|
+
const k = nt(e, n, r, t);
|
|
2244
|
+
c(k);
|
|
2243
2245
|
}, [e.timeZone]);
|
|
2244
|
-
const f =
|
|
2245
|
-
if (
|
|
2246
|
+
const f = Jo(a, r, e, t), l = Vo(f, e.endMonth ? s(e.endMonth) : void 0, e, t), u = es(f, l, e, t), h = os(u), g = Ko(u), v = rs(a, n, e, t), W = ns(a, r, e, t), { disableNavigation: M, onMonthChange: O } = e, C = (k) => h.some((b) => b.days.some((N) => N.isEqualTo(k))), p = (k) => {
|
|
2247
|
+
if (M)
|
|
2246
2248
|
return;
|
|
2247
|
-
let
|
|
2248
|
-
n &&
|
|
2249
|
+
let b = o(k);
|
|
2250
|
+
n && b < o(n) && (b = o(n)), r && b > o(r) && (b = o(r)), c(b), O?.(b);
|
|
2249
2251
|
};
|
|
2250
2252
|
return {
|
|
2251
2253
|
months: u,
|
|
@@ -2253,11 +2255,11 @@ function is(e, t) {
|
|
|
2253
2255
|
days: g,
|
|
2254
2256
|
navStart: n,
|
|
2255
2257
|
navEnd: r,
|
|
2256
|
-
previousMonth:
|
|
2257
|
-
nextMonth:
|
|
2258
|
-
goToMonth:
|
|
2259
|
-
goToDay: (
|
|
2260
|
-
|
|
2258
|
+
previousMonth: v,
|
|
2259
|
+
nextMonth: W,
|
|
2260
|
+
goToMonth: p,
|
|
2261
|
+
goToDay: (k) => {
|
|
2262
|
+
C(k) || p(k.date);
|
|
2261
2263
|
}
|
|
2262
2264
|
};
|
|
2263
2265
|
}
|
|
@@ -2268,7 +2270,7 @@ var Q;
|
|
|
2268
2270
|
function rt(e) {
|
|
2269
2271
|
return !e[_.disabled] && !e[_.hidden] && !e[_.outside];
|
|
2270
2272
|
}
|
|
2271
|
-
function
|
|
2273
|
+
function as(e, t, n, r) {
|
|
2272
2274
|
let o, s = -1;
|
|
2273
2275
|
for (const i of e) {
|
|
2274
2276
|
const a = t(i);
|
|
@@ -2276,65 +2278,65 @@ function cs(e, t, n, r) {
|
|
|
2276
2278
|
}
|
|
2277
2279
|
return o || (o = e.find((i) => rt(t(i)))), o;
|
|
2278
2280
|
}
|
|
2279
|
-
function
|
|
2280
|
-
const { ISOWeek: a, broadcastCalendar: c } = s, { addDays: f, addMonths:
|
|
2281
|
-
let
|
|
2281
|
+
function is(e, t, n, r, o, s, i) {
|
|
2282
|
+
const { ISOWeek: a, broadcastCalendar: c } = s, { addDays: f, addMonths: l, addWeeks: u, addYears: h, endOfBroadcastWeek: g, endOfISOWeek: v, endOfWeek: W, max: M, min: O, startOfBroadcastWeek: C, startOfISOWeek: p, startOfWeek: T } = i;
|
|
2283
|
+
let k = {
|
|
2282
2284
|
day: f,
|
|
2283
2285
|
week: u,
|
|
2284
|
-
month:
|
|
2286
|
+
month: l,
|
|
2285
2287
|
year: h,
|
|
2286
|
-
startOfWeek: (
|
|
2287
|
-
endOfWeek: (
|
|
2288
|
+
startOfWeek: (b) => c ? C(b, i) : a ? p(b) : T(b),
|
|
2289
|
+
endOfWeek: (b) => c ? g(b) : a ? v(b) : W(b)
|
|
2288
2290
|
}[e](n, t === "after" ? 1 : -1);
|
|
2289
|
-
return t === "before" && r ?
|
|
2291
|
+
return t === "before" && r ? k = M([r, k]) : t === "after" && o && (k = O([o, k])), k;
|
|
2290
2292
|
}
|
|
2291
2293
|
function Tt(e, t, n, r, o, s, i, a = 0) {
|
|
2292
2294
|
if (a > 365)
|
|
2293
2295
|
return;
|
|
2294
|
-
const c =
|
|
2295
|
-
return !f && !
|
|
2296
|
+
const c = is(e, t, n.date, r, o, s, i), f = !!(s.disabled && J(c, s.disabled, i)), l = !!(s.hidden && J(c, s.hidden, i)), u = c, h = new Mt(c, u, i);
|
|
2297
|
+
return !f && !l ? h : Tt(e, t, h, r, o, s, i, a + 1);
|
|
2296
2298
|
}
|
|
2297
|
-
function
|
|
2298
|
-
const { autoFocus: s } = e, [i, a] = De(), c =
|
|
2299
|
+
function cs(e, t, n, r, o) {
|
|
2300
|
+
const { autoFocus: s } = e, [i, a] = De(), c = as(t.days, n, r || (() => !1), i), [f, l] = De(s ? c : void 0);
|
|
2299
2301
|
return {
|
|
2300
|
-
isFocusTarget: (
|
|
2301
|
-
setFocused:
|
|
2302
|
+
isFocusTarget: (W) => !!c?.isEqualTo(W),
|
|
2303
|
+
setFocused: l,
|
|
2302
2304
|
focused: f,
|
|
2303
2305
|
blur: () => {
|
|
2304
|
-
a(f),
|
|
2306
|
+
a(f), l(void 0);
|
|
2305
2307
|
},
|
|
2306
|
-
moveFocus: (
|
|
2308
|
+
moveFocus: (W, M) => {
|
|
2307
2309
|
if (!f)
|
|
2308
2310
|
return;
|
|
2309
|
-
const
|
|
2310
|
-
|
|
2311
|
+
const O = Tt(W, M, f, t.navStart, t.navEnd, e, o);
|
|
2312
|
+
O && (e.disableNavigation && !t.days.some((p) => p.isEqualTo(O)) || (t.goToDay(O), l(O)));
|
|
2311
2313
|
}
|
|
2312
2314
|
};
|
|
2313
2315
|
}
|
|
2314
|
-
function
|
|
2315
|
-
const { selected: n, required: r, onSelect: o } = e, [s, i] = ve(n, o ? n : void 0), a = o ? n : s, { isSameDay: c } = t, f = (g) => a?.some((
|
|
2316
|
+
function us(e, t) {
|
|
2317
|
+
const { selected: n, required: r, onSelect: o } = e, [s, i] = ve(n, o ? n : void 0), a = o ? n : s, { isSameDay: c } = t, f = (g) => a?.some((v) => c(v, g)) ?? !1, { min: l, max: u } = e;
|
|
2316
2318
|
return {
|
|
2317
2319
|
selected: a,
|
|
2318
|
-
select: (g,
|
|
2319
|
-
let
|
|
2320
|
+
select: (g, v, W) => {
|
|
2321
|
+
let M = [...a ?? []];
|
|
2320
2322
|
if (f(g)) {
|
|
2321
|
-
if (a?.length ===
|
|
2323
|
+
if (a?.length === l || r && a?.length === 1)
|
|
2322
2324
|
return;
|
|
2323
|
-
|
|
2325
|
+
M = a?.filter((O) => !c(O, g));
|
|
2324
2326
|
} else
|
|
2325
|
-
a?.length === u ?
|
|
2326
|
-
return o || i(
|
|
2327
|
+
a?.length === u ? M = [g] : M = [...M, g];
|
|
2328
|
+
return o || i(M), o?.(M, g, v, W), M;
|
|
2327
2329
|
},
|
|
2328
2330
|
isSelected: f
|
|
2329
2331
|
};
|
|
2330
2332
|
}
|
|
2331
|
-
function
|
|
2332
|
-
const { from: i, to: a } = t || {}, { isSameDay: c, isAfter: f, isBefore:
|
|
2333
|
+
function fs(e, t, n = 0, r = 0, o = !1, s = U) {
|
|
2334
|
+
const { from: i, to: a } = t || {}, { isSameDay: c, isAfter: f, isBefore: l } = s;
|
|
2333
2335
|
let u;
|
|
2334
2336
|
if (!i && !a)
|
|
2335
2337
|
u = { from: e, to: n > 0 ? void 0 : e };
|
|
2336
2338
|
else if (i && !a)
|
|
2337
|
-
c(i, e) ? n === 0 ? u = { from: i, to: e } : o ? u = { from: i, to: void 0 } : u = void 0 :
|
|
2339
|
+
c(i, e) ? n === 0 ? u = { from: i, to: e } : o ? u = { from: i, to: void 0 } : u = void 0 : l(e, i) ? u = { from: e, to: i } : u = { from: i, to: e };
|
|
2338
2340
|
else if (i && a)
|
|
2339
2341
|
if (c(i, e) && c(a, e))
|
|
2340
2342
|
o ? u = { from: i, to: a } : u = void 0;
|
|
@@ -2342,7 +2344,7 @@ function ls(e, t, n = 0, r = 0, o = !1, s = U) {
|
|
|
2342
2344
|
u = { from: i, to: n > 0 ? void 0 : e };
|
|
2343
2345
|
else if (c(a, e))
|
|
2344
2346
|
u = { from: e, to: n > 0 ? void 0 : e };
|
|
2345
|
-
else if (
|
|
2347
|
+
else if (l(e, i))
|
|
2346
2348
|
u = { from: e, to: a };
|
|
2347
2349
|
else if (f(e, i))
|
|
2348
2350
|
u = { from: i, to: e };
|
|
@@ -2356,7 +2358,7 @@ function ls(e, t, n = 0, r = 0, o = !1, s = U) {
|
|
|
2356
2358
|
}
|
|
2357
2359
|
return u;
|
|
2358
2360
|
}
|
|
2359
|
-
function
|
|
2361
|
+
function ls(e, t, n = U) {
|
|
2360
2362
|
const r = Array.isArray(t) ? t : [t];
|
|
2361
2363
|
let o = e.from;
|
|
2362
2364
|
const s = n.differenceInCalendarDays(e.to, e.from), i = Math.min(s, 6);
|
|
@@ -2370,9 +2372,9 @@ function hs(e, t, n = U) {
|
|
|
2370
2372
|
function ot(e, t, n = U) {
|
|
2371
2373
|
return K(e, t.from, !1, n) || K(e, t.to, !1, n) || K(t, e.from, !1, n) || K(t, e.to, !1, n);
|
|
2372
2374
|
}
|
|
2373
|
-
function
|
|
2375
|
+
function ds(e, t, n = U) {
|
|
2374
2376
|
const r = Array.isArray(t) ? t : [t];
|
|
2375
|
-
if (r.filter((a) => typeof a != "function").some((a) => typeof a == "boolean" ? a : n.isDate(a) ? K(e, a, !1, n) : St(a, n) ? a.some((c) => K(e, c, !1, n)) : Ae(a) ? a.from && a.to ? ot(e, { from: a.from, to: a.to }, n) : !1 : Wt(a) ?
|
|
2377
|
+
if (r.filter((a) => typeof a != "function").some((a) => typeof a == "boolean" ? a : n.isDate(a) ? K(e, a, !1, n) : St(a, n) ? a.some((c) => K(e, c, !1, n)) : Ae(a) ? a.from && a.to ? ot(e, { from: a.from, to: a.to }, n) : !1 : Wt(a) ? ls(e, a.dayOfWeek, n) : Dt(a) ? n.isAfter(a.before, a.after) ? ot(e, {
|
|
2376
2378
|
from: n.addDays(a.after, 1),
|
|
2377
2379
|
to: n.addDays(a.before, -1)
|
|
2378
2380
|
}, n) : J(e.from, a, n) || J(e.to, a, n) : vt(a) || Ot(a) ? J(e.from, a, n) || J(e.to, a, n) : !1))
|
|
@@ -2382,37 +2384,37 @@ function ms(e, t, n = U) {
|
|
|
2382
2384
|
let a = e.from;
|
|
2383
2385
|
const c = n.differenceInCalendarDays(e.to, e.from);
|
|
2384
2386
|
for (let f = 0; f <= c; f++) {
|
|
2385
|
-
if (i.some((
|
|
2387
|
+
if (i.some((l) => l(a)))
|
|
2386
2388
|
return !0;
|
|
2387
2389
|
a = n.addDays(a, 1);
|
|
2388
2390
|
}
|
|
2389
2391
|
}
|
|
2390
2392
|
return !1;
|
|
2391
2393
|
}
|
|
2392
|
-
function
|
|
2394
|
+
function hs(e, t) {
|
|
2393
2395
|
const { disabled: n, excludeDisabled: r, selected: o, required: s, onSelect: i } = e, [a, c] = ve(o, i ? o : void 0), f = i ? o : a;
|
|
2394
2396
|
return {
|
|
2395
2397
|
selected: f,
|
|
2396
|
-
select: (h, g,
|
|
2397
|
-
const { min:
|
|
2398
|
-
return r && n &&
|
|
2398
|
+
select: (h, g, v) => {
|
|
2399
|
+
const { min: W, max: M } = e, O = h ? fs(h, f, W, M, s, t) : void 0;
|
|
2400
|
+
return r && n && O?.from && O.to && ds({ from: O.from, to: O.to }, n, t) && (O.from = h, O.to = void 0), i || c(O), i?.(O, h, g, v), O;
|
|
2399
2401
|
},
|
|
2400
2402
|
isSelected: (h) => f && K(f, h, !1, t)
|
|
2401
2403
|
};
|
|
2402
2404
|
}
|
|
2403
|
-
function
|
|
2405
|
+
function ms(e, t) {
|
|
2404
2406
|
const { selected: n, required: r, onSelect: o } = e, [s, i] = ve(n, o ? n : void 0), a = o ? n : s, { isSameDay: c } = t;
|
|
2405
2407
|
return {
|
|
2406
2408
|
selected: a,
|
|
2407
2409
|
select: (u, h, g) => {
|
|
2408
|
-
let
|
|
2409
|
-
return !r && a && a && c(u, a) && (
|
|
2410
|
+
let v = u;
|
|
2411
|
+
return !r && a && a && c(u, a) && (v = void 0), o || i(v), o?.(v, u, h, g), v;
|
|
2410
2412
|
},
|
|
2411
2413
|
isSelected: (u) => a ? c(a, u) : !1
|
|
2412
2414
|
};
|
|
2413
2415
|
}
|
|
2414
|
-
function
|
|
2415
|
-
const n =
|
|
2416
|
+
function ys(e, t) {
|
|
2417
|
+
const n = ms(e, t), r = us(e, t), o = hs(e, t);
|
|
2416
2418
|
switch (e.mode) {
|
|
2417
2419
|
case "single":
|
|
2418
2420
|
return n;
|
|
@@ -2424,19 +2426,19 @@ function ps(e, t) {
|
|
|
2424
2426
|
return;
|
|
2425
2427
|
}
|
|
2426
2428
|
}
|
|
2427
|
-
function
|
|
2429
|
+
function gs(e) {
|
|
2428
2430
|
let t = e;
|
|
2429
2431
|
t.timeZone && (t = {
|
|
2430
2432
|
...e
|
|
2431
|
-
}, t.today && (t.today = new I(t.today, t.timeZone)), t.month && (t.month = new I(t.month, t.timeZone)), t.defaultMonth && (t.defaultMonth = new I(t.defaultMonth, t.timeZone)), t.startMonth && (t.startMonth = new I(t.startMonth, t.timeZone)), t.endMonth && (t.endMonth = new I(t.endMonth, t.timeZone)), t.mode === "single" && t.selected ? t.selected = new I(t.selected, t.timeZone) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((
|
|
2433
|
+
}, t.today && (t.today = new I(t.today, t.timeZone)), t.month && (t.month = new I(t.month, t.timeZone)), t.defaultMonth && (t.defaultMonth = new I(t.defaultMonth, t.timeZone)), t.startMonth && (t.startMonth = new I(t.startMonth, t.timeZone)), t.endMonth && (t.endMonth = new I(t.endMonth, t.timeZone)), t.mode === "single" && t.selected ? t.selected = new I(t.selected, t.timeZone) : t.mode === "multiple" && t.selected ? t.selected = t.selected?.map((D) => new I(D, t.timeZone)) : t.mode === "range" && t.selected && (t.selected = {
|
|
2432
2434
|
from: t.selected.from ? new I(t.selected.from, t.timeZone) : void 0,
|
|
2433
2435
|
to: t.selected.to ? new I(t.selected.to, t.timeZone) : void 0
|
|
2434
2436
|
}));
|
|
2435
2437
|
const { components: n, formatters: r, labels: o, dateLib: s, locale: i, classNames: a } = Pe(() => {
|
|
2436
|
-
const
|
|
2438
|
+
const D = { ...qe, ...t.locale };
|
|
2437
2439
|
return {
|
|
2438
|
-
dateLib: new
|
|
2439
|
-
locale:
|
|
2440
|
+
dateLib: new Z({
|
|
2441
|
+
locale: D,
|
|
2440
2442
|
weekStartsOn: t.broadcastCalendar ? 1 : t.weekStartsOn,
|
|
2441
2443
|
firstWeekContainsDate: t.firstWeekContainsDate,
|
|
2442
2444
|
useAdditionalWeekYearTokens: t.useAdditionalWeekYearTokens,
|
|
@@ -2444,11 +2446,11 @@ function ws(e) {
|
|
|
2444
2446
|
timeZone: t.timeZone,
|
|
2445
2447
|
numerals: t.numerals
|
|
2446
2448
|
}, t.dateLib),
|
|
2447
|
-
components:
|
|
2448
|
-
formatters:
|
|
2449
|
-
labels: { ...
|
|
2450
|
-
locale:
|
|
2451
|
-
classNames: { ...
|
|
2449
|
+
components: bo(t.components),
|
|
2450
|
+
formatters: Yo(t.formatters),
|
|
2451
|
+
labels: { ...zo, ...t.labels },
|
|
2452
|
+
locale: D,
|
|
2453
|
+
classNames: { ...ko(), ...t.classNames }
|
|
2452
2454
|
};
|
|
2453
2455
|
}, [
|
|
2454
2456
|
t.locale,
|
|
@@ -2464,57 +2466,57 @@ function ws(e) {
|
|
|
2464
2466
|
t.formatters,
|
|
2465
2467
|
t.labels,
|
|
2466
2468
|
t.classNames
|
|
2467
|
-
]), { captionLayout: c, mode: f, navLayout:
|
|
2468
|
-
G && (V(G),
|
|
2469
|
-
}, [G, V,
|
|
2470
|
-
z && (V(z),
|
|
2471
|
-
}, [V, z,
|
|
2472
|
-
|
|
2473
|
-
}, [Ce, g, Me]), Gt = j((
|
|
2474
|
-
Me(
|
|
2475
|
-
}, [
|
|
2476
|
-
je(), h?.(
|
|
2477
|
-
}, [je, h]), Lt = j((
|
|
2469
|
+
]), { captionLayout: c, mode: f, navLayout: l, numberOfMonths: u = 1, onDayBlur: h, onDayClick: g, onDayFocus: v, onDayKeyDown: W, onDayMouseEnter: M, onDayMouseLeave: O, onNextClick: C, onPrevClick: p, showWeekNumber: T, styles: y } = t, { formatCaption: k, formatDay: b, formatMonthDropdown: N, formatWeekNumber: B, formatWeekNumberHeader: H, formatWeekdayName: q, formatYearDropdown: $ } = r, re = ss(t, s), { days: oe, months: se, navStart: we, navEnd: Oe, previousMonth: G, nextMonth: z, goToMonth: V } = re, We = po(oe, t, we, Oe, s), { isSelected: Se, select: Ce, selected: be } = ys(t, s) ?? {}, { blur: je, focused: Re, isFocusTarget: Et, moveFocus: Ze, setFocused: Me } = cs(t, re, We, Se ?? (() => !1), s), { labelDayButton: Pt, labelGridcell: _t, labelGrid: Ft, labelMonthDropdown: Bt, labelNav: $e, labelPrevious: It, labelNext: Ht, labelWeekday: qt, labelWeekNumber: At, labelWeekNumberHeader: jt, labelYearDropdown: Rt } = o, Zt = Pe(() => Po(s, t.ISOWeek), [s, t.ISOWeek]), Ge = f !== void 0 || g !== void 0, Ne = j(() => {
|
|
2470
|
+
G && (V(G), p?.(G));
|
|
2471
|
+
}, [G, V, p]), xe = j(() => {
|
|
2472
|
+
z && (V(z), C?.(z));
|
|
2473
|
+
}, [V, z, C]), $t = j((D, P) => (w) => {
|
|
2474
|
+
w.preventDefault(), w.stopPropagation(), Me(D), Ce?.(D.date, P, w), g?.(D.date, P, w);
|
|
2475
|
+
}, [Ce, g, Me]), Gt = j((D, P) => (w) => {
|
|
2476
|
+
Me(D), v?.(D.date, P, w);
|
|
2477
|
+
}, [v, Me]), zt = j((D, P) => (w) => {
|
|
2478
|
+
je(), h?.(D.date, P, w);
|
|
2479
|
+
}, [je, h]), Lt = j((D, P) => (w) => {
|
|
2478
2480
|
const E = {
|
|
2479
2481
|
ArrowLeft: [
|
|
2480
|
-
|
|
2482
|
+
w.shiftKey ? "month" : "day",
|
|
2481
2483
|
t.dir === "rtl" ? "after" : "before"
|
|
2482
2484
|
],
|
|
2483
2485
|
ArrowRight: [
|
|
2484
|
-
|
|
2486
|
+
w.shiftKey ? "month" : "day",
|
|
2485
2487
|
t.dir === "rtl" ? "before" : "after"
|
|
2486
2488
|
],
|
|
2487
|
-
ArrowDown: [
|
|
2488
|
-
ArrowUp: [
|
|
2489
|
-
PageUp: [
|
|
2490
|
-
PageDown: [
|
|
2489
|
+
ArrowDown: [w.shiftKey ? "year" : "week", "after"],
|
|
2490
|
+
ArrowUp: [w.shiftKey ? "year" : "week", "before"],
|
|
2491
|
+
PageUp: [w.shiftKey ? "year" : "month", "before"],
|
|
2492
|
+
PageDown: [w.shiftKey ? "year" : "month", "after"],
|
|
2491
2493
|
Home: ["startOfWeek", "before"],
|
|
2492
2494
|
End: ["endOfWeek", "after"]
|
|
2493
2495
|
};
|
|
2494
|
-
if (E[
|
|
2495
|
-
|
|
2496
|
-
const [A, S] = E[
|
|
2497
|
-
|
|
2496
|
+
if (E[w.key]) {
|
|
2497
|
+
w.preventDefault(), w.stopPropagation();
|
|
2498
|
+
const [A, S] = E[w.key];
|
|
2499
|
+
Ze(A, S);
|
|
2498
2500
|
}
|
|
2499
|
-
|
|
2500
|
-
}, [
|
|
2501
|
-
|
|
2502
|
-
}, [
|
|
2503
|
-
|
|
2504
|
-
}, [
|
|
2505
|
-
const
|
|
2501
|
+
W?.(D.date, P, w);
|
|
2502
|
+
}, [Ze, W, t.dir]), Qt = j((D, P) => (w) => {
|
|
2503
|
+
M?.(D.date, P, w);
|
|
2504
|
+
}, [M]), Xt = j((D, P) => (w) => {
|
|
2505
|
+
O?.(D.date, P, w);
|
|
2506
|
+
}, [O]), Ut = j((D) => (P) => {
|
|
2507
|
+
const w = Number(P.target.value), E = s.setMonth(s.startOfMonth(D), w);
|
|
2506
2508
|
V(E);
|
|
2507
|
-
}, [s, V]), Vt = j((
|
|
2508
|
-
const
|
|
2509
|
+
}, [s, V]), Vt = j((D) => (P) => {
|
|
2510
|
+
const w = Number(P.target.value), E = s.setYear(s.startOfMonth(D), w);
|
|
2509
2511
|
V(E);
|
|
2510
2512
|
}, [s, V]), { className: Kt, style: Jt } = Pe(() => ({
|
|
2511
2513
|
className: [a[m.Root], t.className].filter(Boolean).join(" "),
|
|
2512
2514
|
style: { ...y?.[m.Root], ...t.style }
|
|
2513
|
-
}), [a, t.className, t.style, y]), en =
|
|
2514
|
-
|
|
2515
|
+
}), [a, t.className, t.style, y]), en = Mo(t), ze = ke(null);
|
|
2516
|
+
Uo(ze, !!t.animate, {
|
|
2515
2517
|
classNames: a,
|
|
2516
2518
|
months: se,
|
|
2517
|
-
focused:
|
|
2519
|
+
focused: Re,
|
|
2518
2520
|
dateLib: s
|
|
2519
2521
|
});
|
|
2520
2522
|
const tn = {
|
|
@@ -2533,17 +2535,17 @@ function ws(e) {
|
|
|
2533
2535
|
labels: o,
|
|
2534
2536
|
formatters: r
|
|
2535
2537
|
};
|
|
2536
|
-
return
|
|
2538
|
+
return d.createElement(
|
|
2537
2539
|
kt.Provider,
|
|
2538
2540
|
{ value: tn },
|
|
2539
|
-
|
|
2541
|
+
d.createElement(
|
|
2540
2542
|
n.Root,
|
|
2541
2543
|
{ rootRef: t.animate ? ze : void 0, className: Kt, style: Jt, dir: t.dir, id: t.id, lang: t.lang, nonce: t.nonce, title: t.title, role: t.role, "aria-label": t["aria-label"], "aria-labelledby": t["aria-labelledby"], ...en },
|
|
2542
|
-
|
|
2544
|
+
d.createElement(
|
|
2543
2545
|
n.Months,
|
|
2544
2546
|
{ className: a[m.Months], style: y?.[m.Months] },
|
|
2545
|
-
!t.hideNavigation && !
|
|
2546
|
-
se.map((
|
|
2547
|
+
!t.hideNavigation && !l && d.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: a[m.Nav], style: y?.[m.Nav], "aria-label": $e(), onPreviousClick: Ne, onNextClick: xe, previousMonth: G, nextMonth: z }),
|
|
2548
|
+
se.map((D, P) => d.createElement(
|
|
2547
2549
|
n.Month,
|
|
2548
2550
|
{
|
|
2549
2551
|
"data-animated-month": t.animate ? "true" : void 0,
|
|
@@ -2552,21 +2554,21 @@ function ws(e) {
|
|
|
2552
2554
|
// biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
|
|
2553
2555
|
key: P,
|
|
2554
2556
|
displayIndex: P,
|
|
2555
|
-
calendarMonth:
|
|
2557
|
+
calendarMonth: D
|
|
2556
2558
|
},
|
|
2557
|
-
|
|
2559
|
+
l === "around" && !t.hideNavigation && P === 0 && d.createElement(
|
|
2558
2560
|
n.PreviousMonthButton,
|
|
2559
2561
|
{ type: "button", className: a[m.PreviousMonthButton], tabIndex: G ? void 0 : -1, "aria-disabled": G ? void 0 : !0, "aria-label": It(G), onClick: Ne, "data-animated-button": t.animate ? "true" : void 0 },
|
|
2560
|
-
|
|
2562
|
+
d.createElement(n.Chevron, { disabled: G ? void 0 : !0, className: a[m.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
|
|
2561
2563
|
),
|
|
2562
|
-
|
|
2564
|
+
d.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: a[m.MonthCaption], style: y?.[m.MonthCaption], calendarMonth: D, displayIndex: P }, c?.startsWith("dropdown") ? d.createElement(
|
|
2563
2565
|
n.DropdownNav,
|
|
2564
2566
|
{ className: a[m.Dropdowns], style: y?.[m.Dropdowns] },
|
|
2565
2567
|
(() => {
|
|
2566
|
-
const
|
|
2567
|
-
return s.getMonthYearOrder() === "year-first" ? [E,
|
|
2568
|
+
const w = c === "dropdown" || c === "dropdown-months" ? d.createElement(n.MonthsDropdown, { key: "month", className: a[m.MonthsDropdown], "aria-label": Bt(), classNames: a, components: n, disabled: !!t.disableNavigation, onChange: Ut(D.date), options: To(D.date, we, Oe, r, s), style: y?.[m.Dropdown], value: s.getMonth(D.date) }) : d.createElement("span", { key: "month" }, N(D.date, s)), E = c === "dropdown" || c === "dropdown-years" ? d.createElement(n.YearsDropdown, { key: "year", className: a[m.YearsDropdown], "aria-label": Rt(s.options), classNames: a, components: n, disabled: !!t.disableNavigation, onChange: Vt(D.date), options: _o(we, Oe, r, s, !!t.reverseYears), style: y?.[m.Dropdown], value: s.getYear(D.date) }) : d.createElement("span", { key: "year" }, $(D.date, s));
|
|
2569
|
+
return s.getMonthYearOrder() === "year-first" ? [E, w] : [w, E];
|
|
2568
2570
|
})(),
|
|
2569
|
-
|
|
2571
|
+
d.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
2570
2572
|
border: 0,
|
|
2571
2573
|
clip: "rect(0 0 0 0)",
|
|
2572
2574
|
height: "1px",
|
|
@@ -2577,43 +2579,43 @@ function ws(e) {
|
|
|
2577
2579
|
width: "1px",
|
|
2578
2580
|
whiteSpace: "nowrap",
|
|
2579
2581
|
wordWrap: "normal"
|
|
2580
|
-
} }, D
|
|
2582
|
+
} }, k(D.date, s.options, s))
|
|
2581
2583
|
) : (
|
|
2582
2584
|
// biome-ignore lint/a11y/useSemanticElements: breaking change
|
|
2583
|
-
|
|
2585
|
+
d.createElement(n.CaptionLabel, { className: a[m.CaptionLabel], role: "status", "aria-live": "polite" }, k(D.date, s.options, s))
|
|
2584
2586
|
)),
|
|
2585
|
-
|
|
2587
|
+
l === "around" && !t.hideNavigation && P === u - 1 && d.createElement(
|
|
2586
2588
|
n.NextMonthButton,
|
|
2587
2589
|
{ type: "button", className: a[m.NextMonthButton], tabIndex: z ? void 0 : -1, "aria-disabled": z ? void 0 : !0, "aria-label": Ht(z), onClick: xe, "data-animated-button": t.animate ? "true" : void 0 },
|
|
2588
|
-
|
|
2590
|
+
d.createElement(n.Chevron, { disabled: z ? void 0 : !0, className: a[m.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
|
|
2589
2591
|
),
|
|
2590
|
-
P === u - 1 &&
|
|
2591
|
-
|
|
2592
|
+
P === u - 1 && l === "after" && !t.hideNavigation && d.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: a[m.Nav], style: y?.[m.Nav], "aria-label": $e(), onPreviousClick: Ne, onNextClick: xe, previousMonth: G, nextMonth: z }),
|
|
2593
|
+
d.createElement(
|
|
2592
2594
|
n.MonthGrid,
|
|
2593
|
-
{ role: "grid", "aria-multiselectable": f === "multiple" || f === "range", "aria-label": Ft(
|
|
2594
|
-
!t.hideWeekdays &&
|
|
2595
|
+
{ role: "grid", "aria-multiselectable": f === "multiple" || f === "range", "aria-label": Ft(D.date, s.options, s) || void 0, className: a[m.MonthGrid], style: y?.[m.MonthGrid] },
|
|
2596
|
+
!t.hideWeekdays && d.createElement(
|
|
2595
2597
|
n.Weekdays,
|
|
2596
2598
|
{ "data-animated-weekdays": t.animate ? "true" : void 0, className: a[m.Weekdays], style: y?.[m.Weekdays] },
|
|
2597
|
-
T &&
|
|
2598
|
-
|
|
2599
|
+
T && d.createElement(n.WeekNumberHeader, { "aria-label": jt(s.options), className: a[m.WeekNumberHeader], style: y?.[m.WeekNumberHeader], scope: "col" }, H()),
|
|
2600
|
+
Zt.map((w) => d.createElement(n.Weekday, { "aria-label": qt(w, s.options, s), className: a[m.Weekday], key: String(w), style: y?.[m.Weekday], scope: "col" }, q(w, s.options, s)))
|
|
2599
2601
|
),
|
|
2600
|
-
|
|
2602
|
+
d.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: a[m.Weeks], style: y?.[m.Weeks] }, D.weeks.map((w) => d.createElement(
|
|
2601
2603
|
n.Week,
|
|
2602
|
-
{ className: a[m.Week], key:
|
|
2604
|
+
{ className: a[m.Week], key: w.weekNumber, style: y?.[m.Week], week: w },
|
|
2603
2605
|
T && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
2604
|
-
|
|
2606
|
+
d.createElement(n.WeekNumber, { week: w, style: y?.[m.WeekNumber], "aria-label": At(w.weekNumber, {
|
|
2605
2607
|
locale: i
|
|
2606
|
-
}), className: a[m.WeekNumber], scope: "row", role: "rowheader" }, B(
|
|
2607
|
-
|
|
2608
|
+
}), className: a[m.WeekNumber], scope: "row", role: "rowheader" }, B(w.weekNumber, s)),
|
|
2609
|
+
w.days.map((E) => {
|
|
2608
2610
|
const { date: A } = E, S = We(E);
|
|
2609
|
-
if (S[_.focused] = !S.hidden &&
|
|
2611
|
+
if (S[_.focused] = !S.hidden && !!Re?.isEqualTo(E), S[L.selected] = Se?.(A) || S.selected, Ae(be)) {
|
|
2610
2612
|
const { from: Ye, to: Te } = be;
|
|
2611
2613
|
S[L.range_start] = !!(Ye && Te && s.isSameDay(A, Ye)), S[L.range_end] = !!(Ye && Te && s.isSameDay(A, Te)), S[L.range_middle] = K(be, A, !0, s);
|
|
2612
2614
|
}
|
|
2613
|
-
const nn =
|
|
2615
|
+
const nn = Eo(S, y, t.modifiersStyles), rn = wo(S, a, t.modifiersClassNames), on = !Ge && !S.hidden ? _t(A, S, s.options, s) : void 0;
|
|
2614
2616
|
return (
|
|
2615
2617
|
// biome-ignore lint/a11y/useSemanticElements: react component
|
|
2616
|
-
|
|
2618
|
+
d.createElement(n.Day, { key: `${s.format(A, "yyyy-MM-dd")}_${s.format(E.displayMonth, "yyyy-MM")}`, day: E, modifiers: S, className: rn.join(" "), style: nn, role: "gridcell", "aria-selected": S.selected || void 0, "aria-label": on, "data-day": s.format(A, "yyyy-MM-dd"), "data-month": E.outside ? s.format(A, "yyyy-MM") : void 0, "data-selected": S.selected || void 0, "data-disabled": S.disabled || void 0, "data-hidden": S.hidden || void 0, "data-outside": E.outside || void 0, "data-focused": S.focused || void 0, "data-today": S.today || void 0 }, !S.hidden && Ge ? d.createElement(n.DayButton, { className: a[m.DayButton], style: y?.[m.DayButton], type: "button", day: E, modifiers: S, disabled: S.disabled || void 0, tabIndex: Et(E) ? 0 : -1, "aria-label": Pt(A, S, s.options, s), onClick: $t(E, S), onBlur: zt(E, S), onFocus: Gt(E, S), onKeyDown: Lt(E, S), onMouseEnter: Qt(E, S), onMouseLeave: Xt(E, S) }, b(A, s.options, s)) : !S.hidden && b(E.date, s.options, s))
|
|
2617
2619
|
);
|
|
2618
2620
|
})
|
|
2619
2621
|
)))
|
|
@@ -2621,11 +2623,11 @@ function ws(e) {
|
|
|
2621
2623
|
))
|
|
2622
2624
|
),
|
|
2623
2625
|
t.footer && // biome-ignore lint/a11y/useSemanticElements: react component
|
|
2624
|
-
|
|
2626
|
+
d.createElement(n.Footer, { className: a[m.Footer], style: y?.[m.Footer], role: "status", "aria-live": "polite" }, t.footer)
|
|
2625
2627
|
)
|
|
2626
2628
|
);
|
|
2627
2629
|
}
|
|
2628
|
-
const
|
|
2630
|
+
const ps = ({
|
|
2629
2631
|
className: e,
|
|
2630
2632
|
showOutsideDays: t = !0,
|
|
2631
2633
|
animate: n = !0,
|
|
@@ -2637,20 +2639,20 @@ const bs = ({
|
|
|
2637
2639
|
}) => {
|
|
2638
2640
|
const [c, f] = De(
|
|
2639
2641
|
() => s
|
|
2640
|
-
),
|
|
2642
|
+
), l = j(
|
|
2641
2643
|
(u) => {
|
|
2642
2644
|
u && (f(u), i?.(u));
|
|
2643
2645
|
},
|
|
2644
2646
|
[i]
|
|
2645
2647
|
);
|
|
2646
2648
|
return /* @__PURE__ */ Ee(
|
|
2647
|
-
|
|
2649
|
+
gs,
|
|
2648
2650
|
{
|
|
2649
2651
|
className: ue(fn({ className: e })),
|
|
2650
2652
|
animate: n,
|
|
2651
2653
|
mode: "single",
|
|
2652
2654
|
selected: c,
|
|
2653
|
-
onSelect:
|
|
2655
|
+
onSelect: l,
|
|
2654
2656
|
showOutsideDays: t,
|
|
2655
2657
|
role: "dialog",
|
|
2656
2658
|
"aria-label": "Datepicker",
|
|
@@ -2678,13 +2680,13 @@ const bs = ({
|
|
|
2678
2680
|
month_grid: '[&>thead]:table-header-group [&>thead]:relative [&>thead]:after:block [&>thead]:after:content-[" "] [&>thead]:after:h-4'
|
|
2679
2681
|
},
|
|
2680
2682
|
components: {
|
|
2681
|
-
Chevron: ({ className: u, ...h }) => h.orientation === "left" ? /* @__PURE__ */ Ee(ln, { className: ue(u), ...h }) : /* @__PURE__ */ Ee(
|
|
2683
|
+
Chevron: ({ className: u, ...h }) => h.orientation === "left" ? /* @__PURE__ */ Ee(ln, { className: ue(u), ...h }) : /* @__PURE__ */ Ee(dn, { className: ue(u), ...h })
|
|
2682
2684
|
},
|
|
2683
2685
|
...a
|
|
2684
2686
|
}
|
|
2685
2687
|
);
|
|
2686
2688
|
};
|
|
2687
|
-
|
|
2689
|
+
ps.displayName = "DatePicker";
|
|
2688
2690
|
export {
|
|
2689
|
-
|
|
2691
|
+
ps as DatePicker
|
|
2690
2692
|
};
|