@alfadocs/ui-kit-debug 1.121.0 → 1.122.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/addDays-CuE8wLqb.js +9 -0
- package/dist/_chunks/addDays-CuE8wLqb.js.map +1 -0
- package/dist/_chunks/{anamnesis-summary-rows-BbAREK-3.js → anamnesis-summary-rows-CtcULkvc.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-BbAREK-3.js.map → anamnesis-summary-rows-CtcULkvc.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-86YVlMYJ.js → antenatal-schedule-timeline-XHbig8On.js} +3 -3
- package/dist/_chunks/{antenatal-schedule-timeline-86YVlMYJ.js.map → antenatal-schedule-timeline-XHbig8On.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-CC7nmBOH.js → appointment-timeline-Czd4PBkF.js} +2 -2
- package/dist/_chunks/{appointment-timeline-CC7nmBOH.js.map → appointment-timeline-Czd4PBkF.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-DPjab0eJ.js → balance-badge-cell-DtxbGJcA.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-DPjab0eJ.js.map → balance-badge-cell-DtxbGJcA.js.map} +1 -1
- package/dist/_chunks/{bill-line-table-DUMEHnQ4.js → bill-line-table-HrynB7ND.js} +2 -2
- package/dist/_chunks/{bill-line-table-DUMEHnQ4.js.map → bill-line-table-HrynB7ND.js.map} +1 -1
- package/dist/_chunks/{calendar-appointment-editor-dialog-rw02sXGw.js → calendar-appointment-editor-dialog-CiCmsBCH.js} +5 -5
- package/dist/_chunks/{calendar-appointment-editor-dialog-rw02sXGw.js.map → calendar-appointment-editor-dialog-CiCmsBCH.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-C8nWAeTk.js → cycle-calculator-WFhMfJHt.js} +4 -3
- package/dist/_chunks/{cycle-calculator-C8nWAeTk.js.map → cycle-calculator-WFhMfJHt.js.map} +1 -1
- package/dist/_chunks/{data-grid-Bbf8t4z3.js → data-grid-C71BhGDw.js} +2 -2
- package/dist/_chunks/{data-grid-Bbf8t4z3.js.map → data-grid-C71BhGDw.js.map} +1 -1
- package/dist/_chunks/{date-picker-DBVTj6lO.js → date-picker-BmVBVpVu.js} +3 -3
- package/dist/_chunks/{date-picker-DBVTj6lO.js.map → date-picker-BmVBVpVu.js.map} +1 -1
- package/dist/_chunks/{date-picker-variants-J1EeAhIH.js → date-picker-variants-DmfVRNDB.js} +184 -188
- package/dist/_chunks/date-picker-variants-DmfVRNDB.js.map +1 -0
- package/dist/_chunks/{date-range-panel-CT6nXjRM.js → date-range-panel-CT9Pk-HF.js} +2 -2
- package/dist/_chunks/{date-range-panel-CT6nXjRM.js.map → date-range-panel-CT9Pk-HF.js.map} +1 -1
- package/dist/_chunks/{date-range-picker-PTRpDkXT.js → date-range-picker-2Up_FRrM.js} +40 -39
- package/dist/_chunks/{date-range-picker-PTRpDkXT.js.map → date-range-picker-2Up_FRrM.js.map} +1 -1
- package/dist/_chunks/{date-time-picker-CJnqiQoT.js → date-time-picker-C6b_Vymc.js} +2 -2
- package/dist/_chunks/{date-time-picker-CJnqiQoT.js.map → date-time-picker-C6b_Vymc.js.map} +1 -1
- package/dist/_chunks/{default-tabs-Cxkw1Ws0.js → default-tabs-RvCI5uN0.js} +3 -3
- package/dist/_chunks/{default-tabs-Cxkw1Ws0.js.map → default-tabs-RvCI5uN0.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-c1NJPw9F.js → due-date-calculator-CALlODZe.js} +4 -4
- package/dist/_chunks/{due-date-calculator-c1NJPw9F.js.map → due-date-calculator-CALlODZe.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-Cg4Gq42R.js → gestational-age-calculator-mB6brTlp.js} +5 -5
- package/dist/_chunks/{gestational-age-calculator-Cg4Gq42R.js.map → gestational-age-calculator-mB6brTlp.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-BjTa_77t.js → hcg-doubling-Dhdt3Jyd.js} +3 -3
- package/dist/_chunks/{hcg-doubling-BjTa_77t.js.map → hcg-doubling-Dhdt3Jyd.js.map} +1 -1
- package/dist/_chunks/{invoice-upload-list-CsFsRgbt.js → invoice-upload-list-C95s5Q7m.js} +3 -3
- package/dist/_chunks/{invoice-upload-list-CsFsRgbt.js.map → invoice-upload-list-C95s5Q7m.js.map} +1 -1
- package/dist/_chunks/{kit-extensions-C3oL0WTp.js → kit-extensions-DUaIYyMD.js} +4 -4
- package/dist/_chunks/{kit-extensions-C3oL0WTp.js.map → kit-extensions-DUaIYyMD.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-NFNGdAGt.js → link-cell-renderer-BEaLczk2.js} +2 -2
- package/dist/_chunks/{link-cell-renderer-NFNGdAGt.js.map → link-cell-renderer-BEaLczk2.js.map} +1 -1
- package/dist/_chunks/{map-view-h6ngp2xi.js → map-view-QWdQLHi9.js} +543 -495
- package/dist/_chunks/map-view-QWdQLHi9.js.map +1 -0
- package/dist/_chunks/{parse-BLBWPIgE.js → parse-BFur8Byx.js} +2 -2
- package/dist/_chunks/{parse-BLBWPIgE.js.map → parse-BFur8Byx.js.map} +1 -1
- package/dist/_chunks/{patient-details-C4dHR4iu.js → patient-details-Cba9HQj_.js} +2 -2
- package/dist/_chunks/{patient-details-C4dHR4iu.js.map → patient-details-Cba9HQj_.js.map} +1 -1
- package/dist/_chunks/{patient-field-row-0QP8KCVp.js → patient-field-row-CtDihADs.js} +2 -2
- package/dist/_chunks/{patient-field-row-0QP8KCVp.js.map → patient-field-row-CtDihADs.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-x0-AhCyC.js → patient-summary-card-DnLdbtsw.js} +2 -2
- package/dist/_chunks/{patient-summary-card-x0-AhCyC.js.map → patient-summary-card-DnLdbtsw.js.map} +1 -1
- package/dist/_chunks/practice-results-BCLqPdgn.js +2683 -0
- package/dist/_chunks/practice-results-BCLqPdgn.js.map +1 -0
- package/dist/_chunks/{pregnancy-dating-BO6diQMZ.js → pregnancy-dating-BNI32qNw.js} +5 -5
- package/dist/_chunks/{pregnancy-dating-BO6diQMZ.js.map → pregnancy-dating-BNI32qNw.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-Dcv16n7u.js → radiograph-panel.agent-B-r3BoqU.js} +3 -3
- package/dist/_chunks/{radiograph-panel.agent-Dcv16n7u.js.map → radiograph-panel.agent-B-r3BoqU.js.map} +1 -1
- package/dist/_chunks/{reserved.agent-DRSZ8UcL.js → reserved.agent-CCwsOb3M.js} +8 -7
- package/dist/_chunks/{reserved.agent-DRSZ8UcL.js.map → reserved.agent-CCwsOb3M.js.map} +1 -1
- package/dist/_chunks/{send-registration-link-form-DuZQuKnI.js → send-registration-link-form-BjkXr0TD.js} +3 -3
- package/dist/_chunks/{send-registration-link-form-DuZQuKnI.js.map → send-registration-link-form-BjkXr0TD.js.map} +1 -1
- package/dist/_chunks/{slot-grid-b4eZXokb.js → slot-grid-DEZRB4Yb.js} +234 -207
- package/dist/_chunks/slot-grid-DEZRB4Yb.js.map +1 -0
- package/dist/_chunks/subDays-DC99JK7a.js +8 -0
- package/dist/_chunks/{subDays-Bsoy023P.js.map → subDays-DC99JK7a.js.map} +1 -1
- package/dist/_chunks/{task-editor-Czcx9B-3.js → task-editor-C05yx7JJ.js} +2 -2
- package/dist/_chunks/{task-editor-Czcx9B-3.js.map → task-editor-C05yx7JJ.js.map} +1 -1
- package/dist/_chunks/{toolbar-DoKcoE2q.js → toolbar-Dznu_Dou.js} +2 -2
- package/dist/_chunks/{toolbar-DoKcoE2q.js.map → toolbar-Dznu_Dou.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-B-SXnszJ.js → use-appointment-details-read-Bm408XzX.js} +2 -2
- package/dist/_chunks/{use-appointment-details-read-B-SXnszJ.js.map → use-appointment-details-read-Bm408XzX.js.map} +1 -1
- package/dist/agent-catalog.json +3 -3
- package/dist/agent-i18n/en.json +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/bill-line-table/index.js +1 -1
- package/dist/components/bill-table/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-grid/index.js +2 -2
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/invoice-upload-list/index.js +1 -1
- package/dist/components/map-view/index.d.ts +1 -1
- package/dist/components/map-view/index.d.ts.map +1 -1
- package/dist/components/map-view/index.js +1 -1
- package/dist/components/map-view/map-view.d.ts +18 -0
- package/dist/components/map-view/map-view.d.ts.map +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results-slot-card.d.ts +38 -0
- package/dist/components/practice-results/practice-results-slot-card.d.ts.map +1 -0
- package/dist/components/practice-results/practice-results.d.ts +32 -2
- package/dist/components/practice-results/practice-results.d.ts.map +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/slot-grid/slot-grid.d.ts +19 -0
- package/dist/components/slot-grid/slot-grid.d.ts.map +1 -1
- package/dist/components/task-editor/index.js +1 -1
- package/dist/core.css +1 -1
- package/dist/host-compat.css +9 -1
- package/dist/i18n/locales/ar.d.ts +5 -0
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +6 -1
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +5 -0
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +6 -1
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +5 -0
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +6 -1
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +5 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +5 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +5 -0
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +6 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +5 -0
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +6 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +5 -0
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +6 -1
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +5 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +6 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +5 -0
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +6 -1
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +5 -0
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +6 -1
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +5 -0
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +6 -1
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +5 -0
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +6 -1
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +5 -0
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +6 -1
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +5 -0
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +6 -1
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +5 -0
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +6 -1
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +5 -0
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +6 -1
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +5 -0
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +6 -1
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +5 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +6 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +30 -30
- package/dist/locales/ar.json +6 -1
- package/dist/locales/de.json +6 -1
- package/dist/locales/el.json +6 -1
- package/dist/locales/en.json +5 -0
- package/dist/locales/es.json +6 -1
- package/dist/locales/fr.json +6 -1
- package/dist/locales/hi.json +6 -1
- package/dist/locales/it.json +6 -1
- package/dist/locales/ja.json +6 -1
- package/dist/locales/nl.json +6 -1
- package/dist/locales/pl.json +6 -1
- package/dist/locales/pt.json +6 -1
- package/dist/locales/ro.json +6 -1
- package/dist/locales/ru.json +6 -1
- package/dist/locales/sq.json +6 -1
- package/dist/locales/sv.json +6 -1
- package/dist/locales/tr.json +6 -1
- package/dist/locales/zh.json +6 -1
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/send-registration-link-form/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/date-picker-variants-J1EeAhIH.js.map +0 -1
- package/dist/_chunks/map-view-h6ngp2xi.js.map +0 -1
- package/dist/_chunks/practice-results-yCresv86.js +0 -2326
- package/dist/_chunks/practice-results-yCresv86.js.map +0 -1
- package/dist/_chunks/slot-grid-b4eZXokb.js.map +0 -1
- package/dist/_chunks/subDays-Bsoy023P.js +0 -8
|
@@ -3,19 +3,20 @@ import { useTranslation as fn } from "react-i18next";
|
|
|
3
3
|
import { f as un } from "./intl-locale-FWh-Y5_3.js";
|
|
4
4
|
import { enUS as le } from "./en-US-C4QKhzhA.js";
|
|
5
5
|
import { f as fe, d as ot, h as at, e as it, n as cn, a as hn, s as mn, c as gn, o as yn } from "./format-ql5WTsYT.js";
|
|
6
|
-
import {
|
|
6
|
+
import { a as dt } from "./addDays-CuE8wLqb.js";
|
|
7
|
+
import { t as F, c as K, n as ke, g as bn, s as vn } from "./normalizeDates-BBNNIR-v.js";
|
|
7
8
|
import { jsx as Je } from "react/jsx-runtime";
|
|
8
9
|
import { C as pn } from "./chevron-left-B8cOyH-V.js";
|
|
9
10
|
import { C as kn } from "./chevron-right-I9AeSxH2.js";
|
|
10
11
|
import { c as ne } from "./index-D2ZczOXr.js";
|
|
11
|
-
function
|
|
12
|
+
function _s() {
|
|
12
13
|
const { t: e, i18n: t } = fn("ui");
|
|
13
14
|
return ce(
|
|
14
|
-
() =>
|
|
15
|
+
() => Mn(e, t.language),
|
|
15
16
|
[e, t.language]
|
|
16
17
|
);
|
|
17
18
|
}
|
|
18
|
-
function
|
|
19
|
+
function Mn(e, t) {
|
|
19
20
|
const r = un(t), n = new Intl.DateTimeFormat(r, {
|
|
20
21
|
calendar: "gregory",
|
|
21
22
|
dateStyle: "full"
|
|
@@ -44,7 +45,7 @@ function Dn(e, t) {
|
|
|
44
45
|
labelWeekNumberHeader: () => e("inputs.datePicker.weekNumberHeader")
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
+
function Dn(e, t, r = "long") {
|
|
48
49
|
return new Intl.DateTimeFormat("en-US", {
|
|
49
50
|
// Enforces engine to render the time. Without the option JavaScriptCore omits it.
|
|
50
51
|
hour: "numeric",
|
|
@@ -74,7 +75,7 @@ function Qe(e, t) {
|
|
|
74
75
|
class J extends Date {
|
|
75
76
|
//#region static
|
|
76
77
|
constructor(...t) {
|
|
77
|
-
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(se(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)),
|
|
78
|
+
super(), t.length > 1 && typeof t[t.length - 1] == "string" && (this.timeZone = t.pop()), this.internal = /* @__PURE__ */ new Date(), isNaN(se(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)), lt(this), ze(this)) : this.setTime(Date.now());
|
|
78
79
|
}
|
|
79
80
|
static tz(t, ...r) {
|
|
80
81
|
return r.length ? new J(...r, t) : new J(Date.now(), t);
|
|
@@ -116,9 +117,9 @@ function ze(e) {
|
|
|
116
117
|
e.internal.setTime(+e), e.internal.setUTCSeconds(e.internal.getUTCSeconds() - Math.round(-se(e.timeZone, e) * 60));
|
|
117
118
|
}
|
|
118
119
|
function wn(e) {
|
|
119
|
-
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()),
|
|
120
|
+
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()), lt(e);
|
|
120
121
|
}
|
|
121
|
-
function
|
|
122
|
+
function lt(e) {
|
|
122
123
|
const t = se(e.timeZone, e), r = t > 0 ? Math.floor(t) : Math.ceil(t), n = /* @__PURE__ */ new Date(+e);
|
|
123
124
|
n.setUTCHours(n.getUTCHours() - 1);
|
|
124
125
|
const s = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset(), o = -(/* @__PURE__ */ new Date(+n)).getTimezoneOffset(), a = s - o, i = Date.prototype.getHours.apply(e) !== e.internal.getUTCHours();
|
|
@@ -129,17 +130,17 @@ function dt(e) {
|
|
|
129
130
|
l.setUTCSeconds(0);
|
|
130
131
|
const f = s > 0 ? l.getSeconds() : (l.getSeconds() - 60) % 60, c = Math.round(-(se(e.timeZone, e) * 60)) % 60;
|
|
131
132
|
(c || f) && (e.internal.setUTCSeconds(e.internal.getUTCSeconds() + c), Date.prototype.setUTCSeconds.call(e, Date.prototype.getUTCSeconds.call(e) + c + f));
|
|
132
|
-
const g = se(e.timeZone, e), y = g > 0 ? Math.floor(g) : Math.ceil(g), W = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - y,
|
|
133
|
-
if (
|
|
133
|
+
const g = se(e.timeZone, e), y = g > 0 ? Math.floor(g) : Math.ceil(g), W = -(/* @__PURE__ */ new Date(+e)).getTimezoneOffset() - y, M = y !== r, S = W - d;
|
|
134
|
+
if (M && S) {
|
|
134
135
|
Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + S);
|
|
135
136
|
const k = se(e.timeZone, e), v = k > 0 ? Math.floor(k) : Math.ceil(k), N = y - v;
|
|
136
137
|
N && (e.internal.setUTCMinutes(e.internal.getUTCMinutes() + N), Date.prototype.setUTCMinutes.call(e, Date.prototype.getUTCMinutes.call(e) + N));
|
|
137
138
|
}
|
|
138
139
|
}
|
|
139
|
-
class
|
|
140
|
+
class B extends J {
|
|
140
141
|
//#region static
|
|
141
142
|
static tz(t, ...r) {
|
|
142
|
-
return r.length ? new
|
|
143
|
+
return r.length ? new B(...r, t) : new B(Date.now(), t);
|
|
143
144
|
}
|
|
144
145
|
//#endregion
|
|
145
146
|
//#region representation
|
|
@@ -156,7 +157,7 @@ class F extends J {
|
|
|
156
157
|
}
|
|
157
158
|
toTimeString() {
|
|
158
159
|
const t = this.internal.toUTCString().split(" ")[4], [r, n, s] = this.tzComponents();
|
|
159
|
-
return `${t} GMT${r}${n}${s} (${
|
|
160
|
+
return `${t} GMT${r}${n}${s} (${Dn(this.timeZone, this)})`;
|
|
160
161
|
}
|
|
161
162
|
toLocaleString(t, r) {
|
|
162
163
|
return Date.prototype.toLocaleString.call(this, t, {
|
|
@@ -184,24 +185,20 @@ class F extends J {
|
|
|
184
185
|
}
|
|
185
186
|
//#endregion
|
|
186
187
|
withTimeZone(t) {
|
|
187
|
-
return new
|
|
188
|
+
return new B(+this, t);
|
|
188
189
|
}
|
|
189
190
|
//#region date-fns integration
|
|
190
191
|
[Symbol.for("constructDateFrom")](t) {
|
|
191
|
-
return new
|
|
192
|
+
return new B(+new Date(t), this.timeZone);
|
|
192
193
|
}
|
|
193
194
|
//#endregion
|
|
194
195
|
}
|
|
195
|
-
function lt(e, t, r) {
|
|
196
|
-
const n = B(e, r == null ? void 0 : r.in);
|
|
197
|
-
return isNaN(t) ? V((r == null ? void 0 : r.in) || e, NaN) : (t && n.setDate(n.getDate() + t), n);
|
|
198
|
-
}
|
|
199
196
|
function ft(e, t, r) {
|
|
200
|
-
const n =
|
|
201
|
-
if (isNaN(t)) return
|
|
197
|
+
const n = F(e, r == null ? void 0 : r.in);
|
|
198
|
+
if (isNaN(t)) return K(e, NaN);
|
|
202
199
|
if (!t)
|
|
203
200
|
return n;
|
|
204
|
-
const s = n.getDate(), o =
|
|
201
|
+
const s = n.getDate(), o = K(e, n.getTime());
|
|
205
202
|
o.setMonth(n.getMonth() + t + 1, 0);
|
|
206
203
|
const a = o.getDate();
|
|
207
204
|
return s >= a ? o : (n.setFullYear(
|
|
@@ -211,7 +208,7 @@ function ft(e, t, r) {
|
|
|
211
208
|
), n);
|
|
212
209
|
}
|
|
213
210
|
function Wn(e, t, r) {
|
|
214
|
-
return
|
|
211
|
+
return dt(e, t * 7, r);
|
|
215
212
|
}
|
|
216
213
|
function Nn(e, t, r) {
|
|
217
214
|
return ft(e, t * 12, r);
|
|
@@ -219,18 +216,18 @@ function Nn(e, t, r) {
|
|
|
219
216
|
function Cn(e, t) {
|
|
220
217
|
let r, n = t == null ? void 0 : t.in;
|
|
221
218
|
return e.forEach((s) => {
|
|
222
|
-
!n && typeof s == "object" && (n =
|
|
223
|
-
const o =
|
|
219
|
+
!n && typeof s == "object" && (n = K.bind(null, s));
|
|
220
|
+
const o = F(s, n);
|
|
224
221
|
(!r || r < o || isNaN(+o)) && (r = o);
|
|
225
|
-
}),
|
|
222
|
+
}), K(n, r || NaN);
|
|
226
223
|
}
|
|
227
224
|
function Sn(e, t) {
|
|
228
225
|
let r, n = t == null ? void 0 : t.in;
|
|
229
226
|
return e.forEach((s) => {
|
|
230
|
-
!n && typeof s == "object" && (n =
|
|
231
|
-
const o =
|
|
227
|
+
!n && typeof s == "object" && (n = K.bind(null, s));
|
|
228
|
+
const o = F(s, n);
|
|
232
229
|
(!r || r > o || isNaN(+o)) && (r = o);
|
|
233
|
-
}),
|
|
230
|
+
}), K(n, r || NaN);
|
|
234
231
|
}
|
|
235
232
|
function ut(e, t, r) {
|
|
236
233
|
const [n, s] = ke(
|
|
@@ -241,7 +238,7 @@ function ut(e, t, r) {
|
|
|
241
238
|
return o * 12 + a;
|
|
242
239
|
}
|
|
243
240
|
function _n(e, t) {
|
|
244
|
-
const r =
|
|
241
|
+
const r = F(e, t == null ? void 0 : t.in), n = r.getMonth();
|
|
245
242
|
return r.setFullYear(r.getFullYear(), n + 1, 0), r.setHours(23, 59, 59, 999), r;
|
|
246
243
|
}
|
|
247
244
|
function ct(e, t) {
|
|
@@ -256,15 +253,15 @@ function xn(e, t) {
|
|
|
256
253
|
let i = 1;
|
|
257
254
|
const d = [];
|
|
258
255
|
for (; +a <= o; )
|
|
259
|
-
d.push(
|
|
256
|
+
d.push(K(r, a)), a.setMonth(a.getMonth() + i);
|
|
260
257
|
return s ? d.reverse() : d;
|
|
261
258
|
}
|
|
262
259
|
function Yn(e, t) {
|
|
263
|
-
const r =
|
|
260
|
+
const r = F(e, t == null ? void 0 : t.in);
|
|
264
261
|
return r.setDate(1), r.setHours(0, 0, 0, 0), r;
|
|
265
262
|
}
|
|
266
263
|
function Tn(e, t) {
|
|
267
|
-
const r =
|
|
264
|
+
const r = F(e, t == null ? void 0 : t.in), n = r.getFullYear();
|
|
268
265
|
return r.setFullYear(n + 1, 0, 0), r.setHours(23, 59, 59, 999), r;
|
|
269
266
|
}
|
|
270
267
|
function En(e, t) {
|
|
@@ -275,32 +272,32 @@ function En(e, t) {
|
|
|
275
272
|
let i = 1;
|
|
276
273
|
const d = [];
|
|
277
274
|
for (; +a <= o; )
|
|
278
|
-
d.push(
|
|
275
|
+
d.push(K(r, a)), a.setFullYear(a.getFullYear() + i);
|
|
279
276
|
return s ? d.reverse() : d;
|
|
280
277
|
}
|
|
281
278
|
function ht(e, t) {
|
|
282
279
|
var i, d, l, f;
|
|
283
|
-
const r = bn(), n = (t == null ? void 0 : t.weekStartsOn) ?? ((d = (i = t == null ? void 0 : t.locale) == null ? void 0 : i.options) == null ? void 0 : d.weekStartsOn) ?? r.weekStartsOn ?? ((f = (l = r.locale) == null ? void 0 : l.options) == null ? void 0 : f.weekStartsOn) ?? 0, s =
|
|
280
|
+
const r = bn(), n = (t == null ? void 0 : t.weekStartsOn) ?? ((d = (i = t == null ? void 0 : t.locale) == null ? void 0 : i.options) == null ? void 0 : d.weekStartsOn) ?? r.weekStartsOn ?? ((f = (l = r.locale) == null ? void 0 : l.options) == null ? void 0 : f.weekStartsOn) ?? 0, s = F(e, t == null ? void 0 : t.in), o = s.getDay(), a = (o < n ? -7 : 0) + 6 - (o - n);
|
|
284
281
|
return s.setDate(s.getDate() + a), s.setHours(23, 59, 59, 999), s;
|
|
285
282
|
}
|
|
286
283
|
function In(e, t) {
|
|
287
284
|
return ht(e, { ...t, weekStartsOn: 1 });
|
|
288
285
|
}
|
|
289
286
|
function Bn(e, t) {
|
|
290
|
-
const r =
|
|
287
|
+
const r = F(e, t == null ? void 0 : t.in), n = r.getFullYear(), s = r.getMonth(), o = K(r, 0);
|
|
291
288
|
return o.setFullYear(n, s + 1, 0), o.setHours(0, 0, 0, 0), o.getDate();
|
|
292
289
|
}
|
|
293
290
|
function Fn(e, t) {
|
|
294
|
-
return
|
|
291
|
+
return F(e, t == null ? void 0 : t.in).getMonth();
|
|
295
292
|
}
|
|
296
293
|
function Pn(e, t) {
|
|
297
|
-
return
|
|
294
|
+
return F(e, t == null ? void 0 : t.in).getFullYear();
|
|
298
295
|
}
|
|
299
296
|
function zn(e, t) {
|
|
300
|
-
return +
|
|
297
|
+
return +F(e) > +F(t);
|
|
301
298
|
}
|
|
302
299
|
function An(e, t) {
|
|
303
|
-
return +
|
|
300
|
+
return +F(e) < +F(t);
|
|
304
301
|
}
|
|
305
302
|
function Hn(e, t, r) {
|
|
306
303
|
const [n, s] = ke(
|
|
@@ -319,14 +316,14 @@ function jn(e, t, r) {
|
|
|
319
316
|
return n.getFullYear() === s.getFullYear();
|
|
320
317
|
}
|
|
321
318
|
function $n(e, t, r) {
|
|
322
|
-
const n =
|
|
319
|
+
const n = F(e, r == null ? void 0 : r.in), s = n.getFullYear(), o = n.getDate(), a = K(e, 0);
|
|
323
320
|
a.setFullYear(s, t, 15), a.setHours(0, 0, 0, 0);
|
|
324
321
|
const i = Bn(a);
|
|
325
322
|
return n.setMonth(t, Math.min(o, i)), n;
|
|
326
323
|
}
|
|
327
324
|
function Gn(e, t, r) {
|
|
328
|
-
const n =
|
|
329
|
-
return isNaN(+n) ?
|
|
325
|
+
const n = F(e, r == null ? void 0 : r.in);
|
|
326
|
+
return isNaN(+n) ? K(e, NaN) : (n.setFullYear(t), n);
|
|
330
327
|
}
|
|
331
328
|
const Le = 5, qn = 4;
|
|
332
329
|
function Vn(e, t) {
|
|
@@ -383,13 +380,13 @@ class H {
|
|
|
383
380
|
constructor(t, r) {
|
|
384
381
|
this.Date = Date, this.today = () => {
|
|
385
382
|
var n;
|
|
386
|
-
return (n = this.overrides) != null && n.today ? this.overrides.today() : this.options.timeZone ?
|
|
383
|
+
return (n = this.overrides) != null && n.today ? this.overrides.today() : this.options.timeZone ? B.tz(this.options.timeZone) : new this.Date();
|
|
387
384
|
}, this.newDate = (n, s, o) => {
|
|
388
385
|
var a;
|
|
389
|
-
return (a = this.overrides) != null && a.newDate ? this.overrides.newDate(n, s, o) : this.options.timeZone ? new
|
|
386
|
+
return (a = this.overrides) != null && a.newDate ? this.overrides.newDate(n, s, o) : this.options.timeZone ? new B(n, s, o, this.options.timeZone) : new Date(n, s, o);
|
|
390
387
|
}, this.addDays = (n, s) => {
|
|
391
388
|
var o;
|
|
392
|
-
return (o = this.overrides) != null && o.addDays ? this.overrides.addDays(n, s) :
|
|
389
|
+
return (o = this.overrides) != null && o.addDays ? this.overrides.addDays(n, s) : dt(n, s);
|
|
393
390
|
}, this.addMonths = (n, s) => {
|
|
394
391
|
var o;
|
|
395
392
|
return (o = this.overrides) != null && o.addMonths ? this.overrides.addMonths(n, s) : ft(n, s);
|
|
@@ -768,7 +765,7 @@ function kr(e) {
|
|
|
768
765
|
const { components: t } = he();
|
|
769
766
|
return m.createElement(t.Dropdown, { ...e });
|
|
770
767
|
}
|
|
771
|
-
const
|
|
768
|
+
const Mr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
772
769
|
__proto__: null,
|
|
773
770
|
Button: Zn,
|
|
774
771
|
CaptionLabel: Jn,
|
|
@@ -805,7 +802,7 @@ function ee(e, t, r = !1, n = Q) {
|
|
|
805
802
|
function Ae(e) {
|
|
806
803
|
return !!(e && typeof e == "object" && "before" in e && "after" in e);
|
|
807
804
|
}
|
|
808
|
-
function
|
|
805
|
+
function Me(e) {
|
|
809
806
|
return !!(e && typeof e == "object" && "from" in e);
|
|
810
807
|
}
|
|
811
808
|
function He(e) {
|
|
@@ -829,7 +826,7 @@ function te(e, t, r = Q) {
|
|
|
829
826
|
return s(e, i);
|
|
830
827
|
if (pt(i, r))
|
|
831
828
|
return i.some((d) => s(e, d));
|
|
832
|
-
if (
|
|
829
|
+
if (Me(i))
|
|
833
830
|
return ee(i, e, !1, r);
|
|
834
831
|
if (vt(i))
|
|
835
832
|
return Array.isArray(i.dayOfWeek) ? i.dayOfWeek.includes(e.getDay()) : i.dayOfWeek === e.getDay();
|
|
@@ -840,8 +837,8 @@ function te(e, t, r = Q) {
|
|
|
840
837
|
return He(i) ? o(e, i.after) > 0 : je(i) ? o(i.before, e) > 0 : typeof i == "function" ? i(e) : !1;
|
|
841
838
|
});
|
|
842
839
|
}
|
|
843
|
-
function
|
|
844
|
-
const { disabled: o, hidden: a, modifiers: i, showOutsideDays: d, broadcastCalendar: l, today: f = s.today() } = t, { isSameDay: c, isSameMonth: g, startOfMonth: y, isBefore: O, endOfMonth: W, isAfter:
|
|
840
|
+
function Dr(e, t, r, n, s) {
|
|
841
|
+
const { disabled: o, hidden: a, modifiers: i, showOutsideDays: d, broadcastCalendar: l, today: f = s.today() } = t, { isSameDay: c, isSameMonth: g, startOfMonth: y, isBefore: O, endOfMonth: W, isAfter: M } = s, S = r && y(r), k = n && W(n), v = {
|
|
845
842
|
[Y.focused]: [],
|
|
846
843
|
[Y.outside]: [],
|
|
847
844
|
[Y.disabled]: [],
|
|
@@ -849,7 +846,7 @@ function Mr(e, t, r, n, s) {
|
|
|
849
846
|
[Y.today]: []
|
|
850
847
|
}, N = {};
|
|
851
848
|
for (const p of e) {
|
|
852
|
-
const { date: u, displayMonth: w } = p, T = !!(w && !g(u, w)), I = !!(S && O(u, S)), E = !!(k &&
|
|
849
|
+
const { date: u, displayMonth: w } = p, T = !!(w && !g(u, w)), I = !!(S && O(u, S)), E = !!(k && M(u, k)), j = !!(o && te(u, o, s)), re = !!(a && te(u, a, s)) || I || E || // Broadcast calendar will show outside days as default
|
|
853
850
|
!l && !d && T || l && d === !1 && T, X = c(u, f);
|
|
854
851
|
T && v.outside.push(p), j && v.disabled.push(p), re && v.hidden.push(p), X && v.today.push(p), i && Object.keys(i).forEach(($) => {
|
|
855
852
|
const oe = i == null ? void 0 : i[$];
|
|
@@ -882,7 +879,7 @@ function Or(e, t, r = {}) {
|
|
|
882
879
|
}
|
|
883
880
|
function wr(e) {
|
|
884
881
|
return {
|
|
885
|
-
...
|
|
882
|
+
...Mr,
|
|
886
883
|
...e
|
|
887
884
|
};
|
|
888
885
|
}
|
|
@@ -930,10 +927,10 @@ function Yr(e, t = Q) {
|
|
|
930
927
|
function Tr() {
|
|
931
928
|
return "";
|
|
932
929
|
}
|
|
933
|
-
function
|
|
930
|
+
function Mt(e, t = Q) {
|
|
934
931
|
return t.format(e, "yyyy");
|
|
935
932
|
}
|
|
936
|
-
const Er =
|
|
933
|
+
const Er = Mt, Ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
937
934
|
__proto__: null,
|
|
938
935
|
formatCaption: kt,
|
|
939
936
|
formatDay: Sr,
|
|
@@ -943,7 +940,7 @@ const Er = Dt, Ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
943
940
|
formatWeekNumberHeader: Tr,
|
|
944
941
|
formatWeekdayName: xr,
|
|
945
942
|
formatYearCaption: Er,
|
|
946
|
-
formatYearDropdown:
|
|
943
|
+
formatYearDropdown: Mt
|
|
947
944
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
948
945
|
function Br(e) {
|
|
949
946
|
return e != null && e.formatMonthCaption && !e.formatCaption && (e.formatCaption = e.formatMonthCaption), e != null && e.formatYearCaption && !e.formatYearDropdown && (e.formatYearDropdown = e.formatYearCaption), {
|
|
@@ -960,7 +957,7 @@ function Ge(e, t, r) {
|
|
|
960
957
|
return (r ?? new H(t)).formatMonthYear(e);
|
|
961
958
|
}
|
|
962
959
|
const Pr = Ge;
|
|
963
|
-
function
|
|
960
|
+
function Dt(e, t, r, n) {
|
|
964
961
|
let s = (n ?? new H(r)).format(e, "PPPP");
|
|
965
962
|
return t != null && t.today && (s = `Today, ${s}`), s;
|
|
966
963
|
}
|
|
@@ -995,7 +992,7 @@ const Ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
995
992
|
labelDay: Fr,
|
|
996
993
|
labelDayButton: $e,
|
|
997
994
|
labelGrid: Ge,
|
|
998
|
-
labelGridcell:
|
|
995
|
+
labelGridcell: Dt,
|
|
999
996
|
labelMonthDropdown: Ot,
|
|
1000
997
|
labelNav: wt,
|
|
1001
998
|
labelNext: Wt,
|
|
@@ -1004,24 +1001,24 @@ const Ar = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1004
1001
|
labelWeekNumberHeader: _t,
|
|
1005
1002
|
labelWeekday: Ct,
|
|
1006
1003
|
labelYearDropdown: xt
|
|
1007
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1004
|
+
}, Symbol.toStringTag, { value: "Module" })), U = (e, t, r) => t || (r ? typeof r == "function" ? r : (...n) => r : e);
|
|
1008
1005
|
function Hr(e, t) {
|
|
1009
1006
|
var n;
|
|
1010
1007
|
const r = ((n = t.locale) == null ? void 0 : n.labels) ?? {};
|
|
1011
1008
|
return {
|
|
1012
1009
|
...Ar,
|
|
1013
1010
|
...e ?? {},
|
|
1014
|
-
labelDayButton:
|
|
1015
|
-
labelMonthDropdown:
|
|
1016
|
-
labelNext:
|
|
1017
|
-
labelPrevious:
|
|
1018
|
-
labelWeekNumber:
|
|
1019
|
-
labelYearDropdown:
|
|
1020
|
-
labelGrid:
|
|
1021
|
-
labelGridcell:
|
|
1022
|
-
labelNav:
|
|
1023
|
-
labelWeekNumberHeader:
|
|
1024
|
-
labelWeekday:
|
|
1011
|
+
labelDayButton: U($e, e == null ? void 0 : e.labelDayButton, r.labelDayButton),
|
|
1012
|
+
labelMonthDropdown: U(Ot, e == null ? void 0 : e.labelMonthDropdown, r.labelMonthDropdown),
|
|
1013
|
+
labelNext: U(Wt, e == null ? void 0 : e.labelNext, r.labelNext),
|
|
1014
|
+
labelPrevious: U(Nt, e == null ? void 0 : e.labelPrevious, r.labelPrevious),
|
|
1015
|
+
labelWeekNumber: U(St, e == null ? void 0 : e.labelWeekNumber, r.labelWeekNumber),
|
|
1016
|
+
labelYearDropdown: U(xt, e == null ? void 0 : e.labelYearDropdown, r.labelYearDropdown),
|
|
1017
|
+
labelGrid: U(Ge, e == null ? void 0 : e.labelGrid, r.labelGrid),
|
|
1018
|
+
labelGridcell: U(Dt, e == null ? void 0 : e.labelGridcell, r.labelGridcell),
|
|
1019
|
+
labelNav: U(wt, e == null ? void 0 : e.labelNav, r.labelNav),
|
|
1020
|
+
labelWeekNumberHeader: U(_t, e == null ? void 0 : e.labelWeekNumberHeader, r.labelWeekNumberHeader),
|
|
1021
|
+
labelWeekday: U(Ct, e == null ? void 0 : e.labelWeekday, r.labelWeekday)
|
|
1025
1022
|
};
|
|
1026
1023
|
}
|
|
1027
1024
|
function jr(e, t, r, n, s) {
|
|
@@ -1068,14 +1065,14 @@ function Vr(e, t = {}) {
|
|
|
1068
1065
|
var i;
|
|
1069
1066
|
const { weekStartsOn: r, locale: n } = t, s = r ?? ((i = n == null ? void 0 : n.options) == null ? void 0 : i.weekStartsOn) ?? 0, o = (d) => {
|
|
1070
1067
|
const l = typeof d == "number" || typeof d == "string" ? new Date(d) : d;
|
|
1071
|
-
return new
|
|
1068
|
+
return new B(l.getFullYear(), l.getMonth(), l.getDate(), 12, 0, 0, e);
|
|
1072
1069
|
}, a = (d) => {
|
|
1073
1070
|
const l = o(d);
|
|
1074
1071
|
return new Date(l.getFullYear(), l.getMonth(), l.getDate(), 0, 0, 0, 0);
|
|
1075
1072
|
};
|
|
1076
1073
|
return {
|
|
1077
|
-
today: () => o(
|
|
1078
|
-
newDate: (d, l, f) => new
|
|
1074
|
+
today: () => o(B.tz(e)),
|
|
1075
|
+
newDate: (d, l, f) => new B(d, l, f, 12, 0, 0, e),
|
|
1079
1076
|
startOfDay: (d) => o(d),
|
|
1080
1077
|
startOfWeek: (d, l) => {
|
|
1081
1078
|
const f = o(d), c = (l == null ? void 0 : l.weekStartsOn) ?? s, g = (f.getDay() - c + 7) % 7;
|
|
@@ -1110,9 +1107,9 @@ function Vr(e, t = {}) {
|
|
|
1110
1107
|
return l.setMonth(11, 31), l;
|
|
1111
1108
|
},
|
|
1112
1109
|
eachMonthOfInterval: (d) => {
|
|
1113
|
-
const l = o(d.start), f = o(d.end), c = [], g = new
|
|
1110
|
+
const l = o(d.start), f = o(d.end), c = [], g = new B(l.getFullYear(), l.getMonth(), 1, 12, 0, 0, e), y = f.getFullYear() * 12 + f.getMonth();
|
|
1114
1111
|
for (; g.getFullYear() * 12 + g.getMonth() <= y; )
|
|
1115
|
-
c.push(new
|
|
1112
|
+
c.push(new B(g, e)), g.setMonth(g.getMonth() + 1, 1);
|
|
1116
1113
|
return c;
|
|
1117
1114
|
},
|
|
1118
1115
|
// Normalize to noon once before arithmetic (avoid DST/midnight edge cases),
|
|
@@ -1134,9 +1131,9 @@ function Vr(e, t = {}) {
|
|
|
1134
1131
|
return f.setFullYear(f.getFullYear() + l), f;
|
|
1135
1132
|
},
|
|
1136
1133
|
eachYearOfInterval: (d) => {
|
|
1137
|
-
const l = o(d.start), f = o(d.end), c = [], g = new
|
|
1134
|
+
const l = o(d.start), f = o(d.end), c = [], g = new B(l.getFullYear(), 0, 1, 12, 0, 0, e);
|
|
1138
1135
|
for (; g.getFullYear() <= f.getFullYear(); )
|
|
1139
|
-
c.push(new
|
|
1136
|
+
c.push(new B(g, e)), g.setFullYear(g.getFullYear() + 1, 0, 1);
|
|
1140
1137
|
return c;
|
|
1141
1138
|
},
|
|
1142
1139
|
getWeek: (d, l) => {
|
|
@@ -1185,12 +1182,12 @@ function Zr(e, t, { classNames: r, months: n, focused: s, dateLib: o }) {
|
|
|
1185
1182
|
}), a.current = W) : a.current = null, d.current || f || // skip animation if a day is focused because it can cause issues to the animation and is better for a11y
|
|
1186
1183
|
s)
|
|
1187
1184
|
return;
|
|
1188
|
-
const
|
|
1189
|
-
if (S != null && S.every((k) => k instanceof HTMLElement) &&
|
|
1185
|
+
const M = O instanceof HTMLElement ? Ye(O) : [], S = Ye(e.current);
|
|
1186
|
+
if (S != null && S.every((k) => k instanceof HTMLElement) && M && M.every((k) => k instanceof HTMLElement)) {
|
|
1190
1187
|
d.current = !0, e.current.style.isolation = "isolate";
|
|
1191
1188
|
const k = Ur(e.current);
|
|
1192
1189
|
k && (k.style.zIndex = "1"), S.forEach((v, N) => {
|
|
1193
|
-
const p =
|
|
1190
|
+
const p = M[N];
|
|
1194
1191
|
if (!p)
|
|
1195
1192
|
return;
|
|
1196
1193
|
v.style.position = "relative", v.style.overflow = "hidden";
|
|
@@ -1213,7 +1210,7 @@ function Zr(e, t, { classNames: r, months: n, focused: s, dateLib: o }) {
|
|
|
1213
1210
|
});
|
|
1214
1211
|
}
|
|
1215
1212
|
function Jr(e, t, r, n) {
|
|
1216
|
-
const s = e[0], o = e[e.length - 1], { ISOWeek: a, fixedWeeks: i, broadcastCalendar: d } = r ?? {}, { addDays: l, differenceInCalendarDays: f, differenceInCalendarMonths: c, endOfBroadcastWeek: g, endOfISOWeek: y, endOfMonth: O, endOfWeek: W, isAfter:
|
|
1213
|
+
const s = e[0], o = e[e.length - 1], { ISOWeek: a, fixedWeeks: i, broadcastCalendar: d } = r ?? {}, { addDays: l, differenceInCalendarDays: f, differenceInCalendarMonths: c, endOfBroadcastWeek: g, endOfISOWeek: y, endOfMonth: O, endOfWeek: W, isAfter: M, startOfBroadcastWeek: S, startOfISOWeek: k, startOfWeek: v } = n, N = d ? S(s, n) : a ? k(s) : v(s), p = d ? g(o) : a ? y(O(o)) : W(O(o)), u = t && (d ? g(t) : a ? y(t) : W(t)), w = u && M(p, u) ? u : p, T = f(w, N), I = c(o, s) + 1, E = [];
|
|
1217
1214
|
for (let X = 0; X <= T; X++) {
|
|
1218
1215
|
const $ = l(N, X);
|
|
1219
1216
|
E.push($);
|
|
@@ -1256,8 +1253,8 @@ function et(e, t, r, n) {
|
|
|
1256
1253
|
return t && l(d, t) < 0 && (d = t), c(d);
|
|
1257
1254
|
}
|
|
1258
1255
|
function Lr(e, t, r, n) {
|
|
1259
|
-
const { addDays: s, endOfBroadcastWeek: o, endOfISOWeek: a, endOfMonth: i, endOfWeek: d, getISOWeek: l, getWeek: f, startOfBroadcastWeek: c, startOfISOWeek: g, startOfWeek: y } = n, O = e.reduce((W,
|
|
1260
|
-
const S = r.broadcastCalendar ? c(
|
|
1256
|
+
const { addDays: s, endOfBroadcastWeek: o, endOfISOWeek: a, endOfMonth: i, endOfWeek: d, getISOWeek: l, getWeek: f, startOfBroadcastWeek: c, startOfISOWeek: g, startOfWeek: y } = n, O = e.reduce((W, M) => {
|
|
1257
|
+
const S = r.broadcastCalendar ? c(M, n) : r.ISOWeek ? g(M) : y(M), k = r.broadcastCalendar ? o(M) : r.ISOWeek ? a(i(M)) : d(i(M)), v = t.filter((w) => w >= S && w <= k), N = r.broadcastCalendar ? 35 : 42;
|
|
1261
1258
|
if (r.fixedWeeks && v.length < N) {
|
|
1262
1259
|
const w = t.filter((T) => {
|
|
1263
1260
|
const I = N - v.length;
|
|
@@ -1266,9 +1263,9 @@ function Lr(e, t, r, n) {
|
|
|
1266
1263
|
v.push(...w);
|
|
1267
1264
|
}
|
|
1268
1265
|
const p = v.reduce((w, T) => {
|
|
1269
|
-
const I = r.ISOWeek ? l(T) : f(T), E = w.find((re) => re.weekNumber === I), j = new yt(T,
|
|
1266
|
+
const I = r.ISOWeek ? l(T) : f(T), E = w.find((re) => re.weekNumber === I), j = new yt(T, M, n);
|
|
1270
1267
|
return E ? E.days.push(j) : w.push(new Kn(I, [j])), w;
|
|
1271
|
-
}, []), u = new Un(
|
|
1268
|
+
}, []), u = new Un(M, p);
|
|
1272
1269
|
return W.push(u), W;
|
|
1273
1270
|
}, []);
|
|
1274
1271
|
return r.reverseMonths ? O.reverse() : O;
|
|
@@ -1277,8 +1274,8 @@ function es(e, t) {
|
|
|
1277
1274
|
let { startMonth: r, endMonth: n } = e;
|
|
1278
1275
|
const { startOfYear: s, startOfDay: o, startOfMonth: a, endOfMonth: i, addYears: d, endOfYear: l, newDate: f, today: c } = t, { fromYear: g, toYear: y, fromMonth: O, toMonth: W } = e;
|
|
1279
1276
|
!r && O && (r = O), !r && g && (r = t.newDate(g, 0, 1)), !n && W && (n = W), !n && y && (n = f(y, 11, 31));
|
|
1280
|
-
const
|
|
1281
|
-
return r ? r = a(r) : g ? r = f(g, 0, 1) : !r &&
|
|
1277
|
+
const M = e.captionLayout === "dropdown" || e.captionLayout === "dropdown-years";
|
|
1278
|
+
return r ? r = a(r) : g ? r = f(g, 0, 1) : !r && M && (r = s(d(e.today ?? c(), -100))), n ? n = i(n) : y ? n = f(y, 11, 31) : !n && M && (n = l(e.today ?? c())), [
|
|
1282
1279
|
r && o(r),
|
|
1283
1280
|
n && o(n)
|
|
1284
1281
|
];
|
|
@@ -1305,13 +1302,13 @@ function rs(e) {
|
|
|
1305
1302
|
const t = [];
|
|
1306
1303
|
return e.reduce((r, n) => r.concat(n.weeks.slice()), t.slice());
|
|
1307
1304
|
}
|
|
1308
|
-
function
|
|
1305
|
+
function De(e, t) {
|
|
1309
1306
|
const [r, n] = Pe(e);
|
|
1310
1307
|
return [t === void 0 ? r : t, n];
|
|
1311
1308
|
}
|
|
1312
1309
|
function ss(e, t) {
|
|
1313
1310
|
var N;
|
|
1314
|
-
const [r, n] = es(e, t), { startOfMonth: s, endOfMonth: o } = t, a = et(e, r, n, t), [i, d] =
|
|
1311
|
+
const [r, n] = es(e, t), { startOfMonth: s, endOfMonth: o } = t, a = et(e, r, n, t), [i, d] = De(
|
|
1315
1312
|
a,
|
|
1316
1313
|
// initialMonth is always computed from props.month if provided
|
|
1317
1314
|
e.month ? a : void 0
|
|
@@ -1351,7 +1348,7 @@ function ss(e, t) {
|
|
|
1351
1348
|
e.numberOfMonths,
|
|
1352
1349
|
e.pagedNavigation,
|
|
1353
1350
|
e.reverseMonths
|
|
1354
|
-
]), { disableNavigation: O, onMonthChange: W } = e,
|
|
1351
|
+
]), { disableNavigation: O, onMonthChange: W } = e, M = (p) => f.some((u) => u.days.some((w) => w.isEqualTo(p))), S = (p) => {
|
|
1355
1352
|
if (O)
|
|
1356
1353
|
return;
|
|
1357
1354
|
let u = s(p);
|
|
@@ -1367,7 +1364,7 @@ function ss(e, t) {
|
|
|
1367
1364
|
nextMonth: y,
|
|
1368
1365
|
goToMonth: S,
|
|
1369
1366
|
goToDay: (p) => {
|
|
1370
|
-
|
|
1367
|
+
M(p) || S(p.date);
|
|
1371
1368
|
}
|
|
1372
1369
|
};
|
|
1373
1370
|
}
|
|
@@ -1387,7 +1384,7 @@ function os(e, t, r, n) {
|
|
|
1387
1384
|
return s || (s = e.find((a) => tt(t(a)))), s;
|
|
1388
1385
|
}
|
|
1389
1386
|
function as(e, t, r, n, s, o, a) {
|
|
1390
|
-
const { ISOWeek: i, broadcastCalendar: d } = o, { addDays: l, addMonths: f, addWeeks: c, addYears: g, endOfBroadcastWeek: y, endOfISOWeek: O, endOfWeek: W, max:
|
|
1387
|
+
const { ISOWeek: i, broadcastCalendar: d } = o, { addDays: l, addMonths: f, addWeeks: c, addYears: g, endOfBroadcastWeek: y, endOfISOWeek: O, endOfWeek: W, max: M, min: S, startOfBroadcastWeek: k, startOfISOWeek: v, startOfWeek: N } = a;
|
|
1391
1388
|
let u = {
|
|
1392
1389
|
day: l,
|
|
1393
1390
|
week: c,
|
|
@@ -1396,7 +1393,7 @@ function as(e, t, r, n, s, o, a) {
|
|
|
1396
1393
|
startOfWeek: (w) => d ? k(w, a) : i ? v(w) : N(w),
|
|
1397
1394
|
endOfWeek: (w) => d ? y(w) : i ? O(w) : W(w)
|
|
1398
1395
|
}[e](r, t === "after" ? 1 : -1);
|
|
1399
|
-
return t === "before" && n ? u =
|
|
1396
|
+
return t === "before" && n ? u = M([n, u]) : t === "after" && s && (u = S([s, u])), u;
|
|
1400
1397
|
}
|
|
1401
1398
|
function Yt(e, t, r, n, s, o, a, i = 0) {
|
|
1402
1399
|
if (i > 365)
|
|
@@ -1413,27 +1410,27 @@ function is(e, t, r, n, s) {
|
|
|
1413
1410
|
blur: () => {
|
|
1414
1411
|
i(l), f(void 0);
|
|
1415
1412
|
},
|
|
1416
|
-
moveFocus: (W,
|
|
1413
|
+
moveFocus: (W, M) => {
|
|
1417
1414
|
if (!l)
|
|
1418
1415
|
return;
|
|
1419
|
-
const S = Yt(W,
|
|
1416
|
+
const S = Yt(W, M, l, t.navStart, t.navEnd, e, s);
|
|
1420
1417
|
S && (e.disableNavigation && !t.days.some((v) => v.isEqualTo(S)) || (t.goToDay(S), f(S)));
|
|
1421
1418
|
}
|
|
1422
1419
|
};
|
|
1423
1420
|
}
|
|
1424
1421
|
function ds(e, t) {
|
|
1425
|
-
const { selected: r, required: n, onSelect: s } = e, [o, a] =
|
|
1422
|
+
const { selected: r, required: n, onSelect: s } = e, [o, a] = De(r, s ? r : void 0), i = s ? r : o, { isSameDay: d } = t, l = (y) => (i == null ? void 0 : i.some((O) => d(O, y))) ?? !1, { min: f, max: c } = e;
|
|
1426
1423
|
return {
|
|
1427
1424
|
selected: i,
|
|
1428
1425
|
select: (y, O, W) => {
|
|
1429
|
-
let
|
|
1426
|
+
let M = [...i ?? []];
|
|
1430
1427
|
if (l(y)) {
|
|
1431
1428
|
if ((i == null ? void 0 : i.length) === f || n && (i == null ? void 0 : i.length) === 1)
|
|
1432
1429
|
return;
|
|
1433
|
-
|
|
1430
|
+
M = i == null ? void 0 : i.filter((S) => !d(S, y));
|
|
1434
1431
|
} else
|
|
1435
|
-
(i == null ? void 0 : i.length) === c ?
|
|
1436
|
-
return s || a(
|
|
1432
|
+
(i == null ? void 0 : i.length) === c ? M = [y] : M = [...M, y];
|
|
1433
|
+
return s || a(M), s == null || s(M, y, O, W), M;
|
|
1437
1434
|
},
|
|
1438
1435
|
isSelected: l
|
|
1439
1436
|
};
|
|
@@ -1482,7 +1479,7 @@ function nt(e, t, r = Q) {
|
|
|
1482
1479
|
}
|
|
1483
1480
|
function us(e, t, r = Q) {
|
|
1484
1481
|
const n = Array.isArray(t) ? t : [t];
|
|
1485
|
-
if (n.filter((i) => typeof i != "function").some((i) => typeof i == "boolean" ? i : r.isDate(i) ? ee(e, i, !1, r) : pt(i, r) ? i.some((d) => ee(e, d, !1, r)) :
|
|
1482
|
+
if (n.filter((i) => typeof i != "function").some((i) => typeof i == "boolean" ? i : r.isDate(i) ? ee(e, i, !1, r) : pt(i, r) ? i.some((d) => ee(e, d, !1, r)) : Me(i) ? i.from && i.to ? nt(e, { from: i.from, to: i.to }, r) : !1 : vt(i) ? fs(e, i.dayOfWeek, r) : Ae(i) ? r.isAfter(i.before, i.after) ? nt(e, {
|
|
1486
1483
|
from: r.addDays(i.after, 1),
|
|
1487
1484
|
to: r.addDays(i.before, -1)
|
|
1488
1485
|
}, r) : te(e.from, i, r) || te(e.to, i, r) : He(i) || je(i) ? te(e.from, i, r) || te(e.to, i, r) : !1))
|
|
@@ -1500,15 +1497,15 @@ function us(e, t, r = Q) {
|
|
|
1500
1497
|
return !1;
|
|
1501
1498
|
}
|
|
1502
1499
|
function cs(e, t) {
|
|
1503
|
-
const { disabled: r, excludeDisabled: n, resetOnSelect: s, selected: o, required: a, onSelect: i } = e, [d, l] =
|
|
1500
|
+
const { disabled: r, excludeDisabled: n, resetOnSelect: s, selected: o, required: a, onSelect: i } = e, [d, l] = De(o, i ? o : void 0), f = i ? o : d;
|
|
1504
1501
|
return {
|
|
1505
1502
|
selected: f,
|
|
1506
1503
|
select: (y, O, W) => {
|
|
1507
|
-
const { min:
|
|
1504
|
+
const { min: M, max: S } = e;
|
|
1508
1505
|
let k;
|
|
1509
1506
|
if (y) {
|
|
1510
1507
|
const v = f == null ? void 0 : f.from, N = f == null ? void 0 : f.to, p = !!v && !!N, u = !!v && !!N && t.isSameDay(v, N) && t.isSameDay(y, v);
|
|
1511
|
-
s && (p || !(f != null && f.from)) ? !a && u ? k = void 0 : k = { from: y, to: void 0 } : k = ls(y, f,
|
|
1508
|
+
s && (p || !(f != null && f.from)) ? !a && u ? k = void 0 : k = { from: y, to: void 0 } : k = ls(y, f, M, S, a, t);
|
|
1512
1509
|
}
|
|
1513
1510
|
return n && r && (k != null && k.from) && k.to && us({ from: k.from, to: k.to }, r, t) && (k.from = y, k.to = void 0), i || l(k), i == null || i(k, y, O, W), k;
|
|
1514
1511
|
},
|
|
@@ -1516,7 +1513,7 @@ function cs(e, t) {
|
|
|
1516
1513
|
};
|
|
1517
1514
|
}
|
|
1518
1515
|
function hs(e, t) {
|
|
1519
|
-
const { selected: r, required: n, onSelect: s } = e, [o, a] =
|
|
1516
|
+
const { selected: r, required: n, onSelect: s } = e, [o, a] = De(r, s ? r : void 0), i = s ? r : o, { isSameDay: d } = t;
|
|
1520
1517
|
return {
|
|
1521
1518
|
selected: i,
|
|
1522
1519
|
select: (c, g, y) => {
|
|
@@ -1540,13 +1537,13 @@ function ms(e, t) {
|
|
|
1540
1537
|
}
|
|
1541
1538
|
}
|
|
1542
1539
|
function q(e, t) {
|
|
1543
|
-
return e instanceof
|
|
1540
|
+
return e instanceof B && e.timeZone === t ? e : new B(e, t);
|
|
1544
1541
|
}
|
|
1545
1542
|
function ae(e, t, r) {
|
|
1546
1543
|
return q(e, t);
|
|
1547
1544
|
}
|
|
1548
1545
|
function rt(e, t, r) {
|
|
1549
|
-
return typeof e == "boolean" || typeof e == "function" ? e : e instanceof Date ? ae(e, t) : Array.isArray(e) ? e.map((n) => n instanceof Date ? ae(n, t) : n) :
|
|
1546
|
+
return typeof e == "boolean" || typeof e == "function" ? e : e instanceof Date ? ae(e, t) : Array.isArray(e) ? e.map((n) => n instanceof Date ? ae(n, t) : n) : Me(e) ? {
|
|
1550
1547
|
...e,
|
|
1551
1548
|
from: e.from ? q(e.from, t) : e.from,
|
|
1552
1549
|
to: e.to ? q(e.to, t) : e.to
|
|
@@ -1562,29 +1559,29 @@ function rt(e, t, r) {
|
|
|
1562
1559
|
function Ie(e, t, r) {
|
|
1563
1560
|
return e && (Array.isArray(e) ? e.map((n) => rt(n, t)) : rt(e, t));
|
|
1564
1561
|
}
|
|
1565
|
-
function
|
|
1562
|
+
function xs(e) {
|
|
1566
1563
|
var Ze;
|
|
1567
1564
|
let t = e;
|
|
1568
1565
|
const r = t.timeZone;
|
|
1569
1566
|
if (r && (t = {
|
|
1570
1567
|
...e,
|
|
1571
1568
|
timeZone: r
|
|
1572
|
-
}, t.today && (t.today = q(t.today, r)), t.month && (t.month = q(t.month, r)), t.defaultMonth && (t.defaultMonth = q(t.defaultMonth, r)), t.startMonth && (t.startMonth = q(t.startMonth, r)), t.endMonth && (t.endMonth = q(t.endMonth, r)), t.mode === "single" && t.selected ? t.selected = q(t.selected, r) : t.mode === "multiple" && t.selected ? t.selected = (Ze = t.selected) == null ? void 0 : Ze.map((
|
|
1569
|
+
}, t.today && (t.today = q(t.today, r)), t.month && (t.month = q(t.month, r)), t.defaultMonth && (t.defaultMonth = q(t.defaultMonth, r)), t.startMonth && (t.startMonth = q(t.startMonth, r)), t.endMonth && (t.endMonth = q(t.endMonth, r)), t.mode === "single" && t.selected ? t.selected = q(t.selected, r) : t.mode === "multiple" && t.selected ? t.selected = (Ze = t.selected) == null ? void 0 : Ze.map((D) => q(D, r)) : t.mode === "range" && t.selected && (t.selected = {
|
|
1573
1570
|
from: t.selected.from ? q(t.selected.from, r) : t.selected.from,
|
|
1574
1571
|
to: t.selected.to ? q(t.selected.to, r) : t.selected.to
|
|
1575
1572
|
}), t.disabled !== void 0 && (t.disabled = Ie(t.disabled, r)), t.hidden !== void 0 && (t.hidden = Ie(t.hidden, r)), t.modifiers)) {
|
|
1576
|
-
const
|
|
1573
|
+
const D = {};
|
|
1577
1574
|
Object.keys(t.modifiers).forEach((x) => {
|
|
1578
1575
|
var b;
|
|
1579
|
-
|
|
1580
|
-
}), t.modifiers =
|
|
1576
|
+
D[x] = Ie((b = t.modifiers) == null ? void 0 : b[x], r);
|
|
1577
|
+
}), t.modifiers = D;
|
|
1581
1578
|
}
|
|
1582
1579
|
const { components: n, formatters: s, labels: o, dateLib: a, locale: i, classNames: d } = ce(() => {
|
|
1583
|
-
const
|
|
1580
|
+
const D = { ...gt, ...t.locale }, x = t.broadcastCalendar ? 1 : t.weekStartsOn, b = t.noonSafe && t.timeZone ? Vr(t.timeZone, {
|
|
1584
1581
|
weekStartsOn: x,
|
|
1585
|
-
locale:
|
|
1582
|
+
locale: D
|
|
1586
1583
|
}) : void 0, _ = t.dateLib && b ? { ...b, ...t.dateLib } : t.dateLib ?? b, z = new H({
|
|
1587
|
-
locale:
|
|
1584
|
+
locale: D,
|
|
1588
1585
|
weekStartsOn: x,
|
|
1589
1586
|
firstWeekContainsDate: t.firstWeekContainsDate,
|
|
1590
1587
|
useAdditionalWeekYearTokens: t.useAdditionalWeekYearTokens,
|
|
@@ -1597,7 +1594,7 @@ function _s(e) {
|
|
|
1597
1594
|
components: wr(t.components),
|
|
1598
1595
|
formatters: Br(t.formatters),
|
|
1599
1596
|
labels: Hr(t.labels, z.options),
|
|
1600
|
-
locale:
|
|
1597
|
+
locale: D,
|
|
1601
1598
|
classNames: { ...Nr(), ...t.classNames }
|
|
1602
1599
|
};
|
|
1603
1600
|
}, [
|
|
@@ -1617,17 +1614,17 @@ function _s(e) {
|
|
|
1617
1614
|
t.classNames
|
|
1618
1615
|
]);
|
|
1619
1616
|
t.today || (t = { ...t, today: a.today() });
|
|
1620
|
-
const { captionLayout: l, mode: f, navLayout: c, numberOfMonths: g = 1, onDayBlur: y, onDayClick: O, onDayFocus: W, onDayKeyDown:
|
|
1621
|
-
|
|
1622
|
-
}, [
|
|
1623
|
-
|
|
1624
|
-
}, [L,
|
|
1625
|
-
b.preventDefault(), b.stopPropagation(), ve(
|
|
1626
|
-
}, [de, O, ve]), Vt = G((
|
|
1627
|
-
ve(
|
|
1628
|
-
}, [W, ve]), Rt = G((
|
|
1629
|
-
qe(), y == null || y(
|
|
1630
|
-
}, [qe, y]), Ut = G((
|
|
1617
|
+
const { captionLayout: l, mode: f, navLayout: c, numberOfMonths: g = 1, onDayBlur: y, onDayClick: O, onDayFocus: W, onDayKeyDown: M, onDayMouseEnter: S, onDayMouseLeave: k, onNextClick: v, onPrevClick: N, showWeekNumber: p, styles: u } = t, { formatCaption: w, formatDay: T, formatMonthDropdown: I, formatWeekNumber: E, formatWeekNumberHeader: j, formatWeekdayName: re, formatYearDropdown: X } = s, $ = ss(t, a), { days: oe, months: ge, navStart: Oe, navEnd: we, previousMonth: V, nextMonth: R, goToMonth: L } = $, We = Dr(oe, t, Oe, we, a), { isSelected: ie, select: de, selected: ye } = ms(t, a) ?? {}, { blur: qe, focused: be, isFocusTarget: Tt, moveFocus: Ve, setFocused: ve } = is(t, $, We, ie ?? (() => !1), a), { labelDayButton: Et, labelGridcell: It, labelGrid: Bt, labelMonthDropdown: Ft, labelNav: Re, labelPrevious: Pt, labelNext: zt, labelWeekday: At, labelWeekNumber: Ht, labelWeekNumberHeader: jt, labelYearDropdown: $t } = o, Gt = ce(() => Gr(a, t.ISOWeek, t.broadcastCalendar, t.today), [a, t.ISOWeek, t.broadcastCalendar, t.today]), Ue = f !== void 0 || O !== void 0, Ne = G(() => {
|
|
1618
|
+
V && (L(V), N == null || N(V));
|
|
1619
|
+
}, [V, L, N]), Ce = G(() => {
|
|
1620
|
+
R && (L(R), v == null || v(R));
|
|
1621
|
+
}, [L, R, v]), qt = G((D, x) => (b) => {
|
|
1622
|
+
b.preventDefault(), b.stopPropagation(), ve(D), !x.disabled && (de == null || de(D.date, x, b), O == null || O(D.date, x, b));
|
|
1623
|
+
}, [de, O, ve]), Vt = G((D, x) => (b) => {
|
|
1624
|
+
ve(D), W == null || W(D.date, x, b);
|
|
1625
|
+
}, [W, ve]), Rt = G((D, x) => (b) => {
|
|
1626
|
+
qe(), y == null || y(D.date, x, b);
|
|
1627
|
+
}, [qe, y]), Ut = G((D, x) => (b) => {
|
|
1631
1628
|
const _ = {
|
|
1632
1629
|
ArrowLeft: [
|
|
1633
1630
|
b.shiftKey ? "month" : "day",
|
|
@@ -1649,16 +1646,16 @@ function _s(e) {
|
|
|
1649
1646
|
const [z, C] = _[b.key];
|
|
1650
1647
|
Ve(z, C);
|
|
1651
1648
|
}
|
|
1652
|
-
|
|
1653
|
-
}, [Ve,
|
|
1654
|
-
S == null || S(
|
|
1655
|
-
}, [S]), Zt = G((
|
|
1656
|
-
k == null || k(
|
|
1657
|
-
}, [k]), Jt = G((
|
|
1658
|
-
const b = Number(x.target.value), _ = a.setMonth(a.startOfMonth(
|
|
1649
|
+
M == null || M(D.date, x, b);
|
|
1650
|
+
}, [Ve, M, t.dir]), Kt = G((D, x) => (b) => {
|
|
1651
|
+
S == null || S(D.date, x, b);
|
|
1652
|
+
}, [S]), Zt = G((D, x) => (b) => {
|
|
1653
|
+
k == null || k(D.date, x, b);
|
|
1654
|
+
}, [k]), Jt = G((D) => (x) => {
|
|
1655
|
+
const b = Number(x.target.value), _ = a.setMonth(a.startOfMonth(D), b);
|
|
1659
1656
|
L(_);
|
|
1660
|
-
}, [a, L]), Qt = G((
|
|
1661
|
-
const b = Number(x.target.value), _ = a.setYear(a.startOfMonth(
|
|
1657
|
+
}, [a, L]), Qt = G((D) => (x) => {
|
|
1658
|
+
const b = Number(x.target.value), _ = a.setYear(a.startOfMonth(D), b);
|
|
1662
1659
|
L(_);
|
|
1663
1660
|
}, [a, L]), { className: Xt, style: Lt } = ce(() => ({
|
|
1664
1661
|
className: [d[h.Root], t.className].filter(Boolean).join(" "),
|
|
@@ -1676,8 +1673,8 @@ function _s(e) {
|
|
|
1676
1673
|
select: de,
|
|
1677
1674
|
isSelected: ie,
|
|
1678
1675
|
months: ge,
|
|
1679
|
-
nextMonth:
|
|
1680
|
-
previousMonth:
|
|
1676
|
+
nextMonth: R,
|
|
1677
|
+
previousMonth: V,
|
|
1681
1678
|
goToMonth: L,
|
|
1682
1679
|
getModifiers: We,
|
|
1683
1680
|
components: n,
|
|
@@ -1695,8 +1692,8 @@ function _s(e) {
|
|
|
1695
1692
|
m.createElement(
|
|
1696
1693
|
n.Months,
|
|
1697
1694
|
{ className: d[h.Months], style: u == null ? void 0 : u[h.Months] },
|
|
1698
|
-
!t.hideNavigation && !c && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: d[h.Nav], style: u == null ? void 0 : u[h.Nav], "aria-label": Re(), onPreviousClick: Ne, onNextClick: Ce, previousMonth:
|
|
1699
|
-
ge.map((
|
|
1695
|
+
!t.hideNavigation && !c && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: d[h.Nav], style: u == null ? void 0 : u[h.Nav], "aria-label": Re(), onPreviousClick: Ne, onNextClick: Ce, previousMonth: V, nextMonth: R }),
|
|
1696
|
+
ge.map((D, x) => m.createElement(
|
|
1700
1697
|
n.Month,
|
|
1701
1698
|
{
|
|
1702
1699
|
"data-animated-month": t.animate ? "true" : void 0,
|
|
@@ -1705,18 +1702,18 @@ function _s(e) {
|
|
|
1705
1702
|
// biome-ignore lint/suspicious/noArrayIndexKey: breaks animation
|
|
1706
1703
|
key: x,
|
|
1707
1704
|
displayIndex: x,
|
|
1708
|
-
calendarMonth:
|
|
1705
|
+
calendarMonth: D
|
|
1709
1706
|
},
|
|
1710
1707
|
c === "around" && !t.hideNavigation && x === 0 && m.createElement(
|
|
1711
1708
|
n.PreviousMonthButton,
|
|
1712
|
-
{ type: "button", className: d[h.PreviousMonthButton], tabIndex:
|
|
1713
|
-
m.createElement(n.Chevron, { disabled:
|
|
1709
|
+
{ type: "button", className: d[h.PreviousMonthButton], tabIndex: V ? void 0 : -1, "aria-disabled": V ? void 0 : !0, "aria-label": Pt(V), onClick: Ne, "data-animated-button": t.animate ? "true" : void 0 },
|
|
1710
|
+
m.createElement(n.Chevron, { disabled: V ? void 0 : !0, className: d[h.Chevron], orientation: t.dir === "rtl" ? "right" : "left" })
|
|
1714
1711
|
),
|
|
1715
|
-
m.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: d[h.MonthCaption], style: u == null ? void 0 : u[h.MonthCaption], calendarMonth:
|
|
1712
|
+
m.createElement(n.MonthCaption, { "data-animated-caption": t.animate ? "true" : void 0, className: d[h.MonthCaption], style: u == null ? void 0 : u[h.MonthCaption], calendarMonth: D, displayIndex: x }, l != null && l.startsWith("dropdown") ? m.createElement(
|
|
1716
1713
|
n.DropdownNav,
|
|
1717
1714
|
{ className: d[h.Dropdowns], style: u == null ? void 0 : u[h.Dropdowns] },
|
|
1718
1715
|
(() => {
|
|
1719
|
-
const b = l === "dropdown" || l === "dropdown-months" ? m.createElement(n.MonthsDropdown, { key: "month", className: d[h.MonthsDropdown], "aria-label": Ft(), classNames: d, components: n, disabled: !!t.disableNavigation, onChange: Jt(
|
|
1716
|
+
const b = l === "dropdown" || l === "dropdown-months" ? m.createElement(n.MonthsDropdown, { key: "month", className: d[h.MonthsDropdown], "aria-label": Ft(), classNames: d, components: n, disabled: !!t.disableNavigation, onChange: Jt(D.date), options: jr(D.date, Oe, we, s, a), style: u == null ? void 0 : u[h.Dropdown], value: a.getMonth(D.date) }) : m.createElement("span", { key: "month" }, I(D.date, a)), _ = l === "dropdown" || l === "dropdown-years" ? m.createElement(n.YearsDropdown, { key: "year", className: d[h.YearsDropdown], "aria-label": $t(a.options), classNames: d, components: n, disabled: !!t.disableNavigation, onChange: Qt(D.date), options: qr(Oe, we, s, a, !!t.reverseYears), style: u == null ? void 0 : u[h.Dropdown], value: a.getYear(D.date) }) : m.createElement("span", { key: "year" }, X(D.date, a));
|
|
1720
1717
|
return a.getMonthYearOrder() === "year-first" ? [_, b] : [b, _];
|
|
1721
1718
|
})(),
|
|
1722
1719
|
m.createElement("span", { role: "status", "aria-live": "polite", style: {
|
|
@@ -1730,24 +1727,24 @@ function _s(e) {
|
|
|
1730
1727
|
width: "1px",
|
|
1731
1728
|
whiteSpace: "nowrap",
|
|
1732
1729
|
wordWrap: "normal"
|
|
1733
|
-
} }, w(
|
|
1734
|
-
) : m.createElement(n.CaptionLabel, { className: d[h.CaptionLabel], role: "status", "aria-live": "polite" }, w(
|
|
1730
|
+
} }, w(D.date, a.options, a))
|
|
1731
|
+
) : m.createElement(n.CaptionLabel, { className: d[h.CaptionLabel], role: "status", "aria-live": "polite" }, w(D.date, a.options, a))),
|
|
1735
1732
|
c === "around" && !t.hideNavigation && x === g - 1 && m.createElement(
|
|
1736
1733
|
n.NextMonthButton,
|
|
1737
|
-
{ type: "button", className: d[h.NextMonthButton], tabIndex:
|
|
1738
|
-
m.createElement(n.Chevron, { disabled:
|
|
1734
|
+
{ type: "button", className: d[h.NextMonthButton], tabIndex: R ? void 0 : -1, "aria-disabled": R ? void 0 : !0, "aria-label": zt(R), onClick: Ce, "data-animated-button": t.animate ? "true" : void 0 },
|
|
1735
|
+
m.createElement(n.Chevron, { disabled: R ? void 0 : !0, className: d[h.Chevron], orientation: t.dir === "rtl" ? "left" : "right" })
|
|
1739
1736
|
),
|
|
1740
|
-
x === g - 1 && c === "after" && !t.hideNavigation && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: d[h.Nav], style: u == null ? void 0 : u[h.Nav], "aria-label": Re(), onPreviousClick: Ne, onNextClick: Ce, previousMonth:
|
|
1737
|
+
x === g - 1 && c === "after" && !t.hideNavigation && m.createElement(n.Nav, { "data-animated-nav": t.animate ? "true" : void 0, className: d[h.Nav], style: u == null ? void 0 : u[h.Nav], "aria-label": Re(), onPreviousClick: Ne, onNextClick: Ce, previousMonth: V, nextMonth: R }),
|
|
1741
1738
|
m.createElement(
|
|
1742
1739
|
n.MonthGrid,
|
|
1743
|
-
{ role: "grid", "aria-multiselectable": f === "multiple" || f === "range", "aria-label": Bt(
|
|
1740
|
+
{ role: "grid", "aria-multiselectable": f === "multiple" || f === "range", "aria-label": Bt(D.date, a.options, a) || void 0, className: d[h.MonthGrid], style: u == null ? void 0 : u[h.MonthGrid] },
|
|
1744
1741
|
!t.hideWeekdays && m.createElement(
|
|
1745
1742
|
n.Weekdays,
|
|
1746
1743
|
{ "data-animated-weekdays": t.animate ? "true" : void 0, className: d[h.Weekdays], style: u == null ? void 0 : u[h.Weekdays] },
|
|
1747
1744
|
p && m.createElement(n.WeekNumberHeader, { "aria-label": jt(a.options), className: d[h.WeekNumberHeader], style: u == null ? void 0 : u[h.WeekNumberHeader], scope: "col" }, j()),
|
|
1748
1745
|
Gt.map((b) => m.createElement(n.Weekday, { "aria-label": At(b, a.options, a), className: d[h.Weekday], key: String(b), style: u == null ? void 0 : u[h.Weekday], scope: "col" }, re(b, a.options, a)))
|
|
1749
1746
|
),
|
|
1750
|
-
m.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: d[h.Weeks], style: u == null ? void 0 : u[h.Weeks] },
|
|
1747
|
+
m.createElement(n.Weeks, { "data-animated-weeks": t.animate ? "true" : void 0, className: d[h.Weeks], style: u == null ? void 0 : u[h.Weeks] }, D.weeks.map((b) => m.createElement(
|
|
1751
1748
|
n.Week,
|
|
1752
1749
|
{ className: d[h.Week], key: b.weekNumber, style: u == null ? void 0 : u[h.Week], week: b },
|
|
1753
1750
|
p && m.createElement(n.WeekNumber, { week: b, style: u == null ? void 0 : u[h.WeekNumber], "aria-label": Ht(b.weekNumber, {
|
|
@@ -1755,7 +1752,7 @@ function _s(e) {
|
|
|
1755
1752
|
}), className: d[h.WeekNumber], scope: "row", role: "rowheader" }, E(b.weekNumber, a)),
|
|
1756
1753
|
b.days.map((_) => {
|
|
1757
1754
|
const { date: z } = _, C = We(_);
|
|
1758
|
-
if (C[Y.focused] = !C.hidden && !!(be != null && be.isEqualTo(_)), C[P.selected] = (ie == null ? void 0 : ie(z)) || C.selected,
|
|
1755
|
+
if (C[Y.focused] = !C.hidden && !!(be != null && be.isEqualTo(_)), C[P.selected] = (ie == null ? void 0 : ie(z)) || C.selected, Me(ye)) {
|
|
1759
1756
|
const { from: Se, to: _e } = ye;
|
|
1760
1757
|
C[P.range_start] = !!(Se && _e && a.isSameDay(z, Se)), C[P.range_end] = !!(Se && _e && a.isSameDay(z, _e)), C[P.range_middle] = ee(ye, z, !0, a);
|
|
1761
1758
|
}
|
|
@@ -1770,11 +1767,11 @@ function _s(e) {
|
|
|
1770
1767
|
)
|
|
1771
1768
|
);
|
|
1772
1769
|
}
|
|
1773
|
-
function
|
|
1770
|
+
function Ys(e, t, r) {
|
|
1774
1771
|
const n = [];
|
|
1775
1772
|
return e && n.push({ before: e }), t && n.push({ after: t }), Array.isArray(r) ? n.push(...r) : typeof r == "function" && n.push(r), n.length === 1 ? n[0] : n;
|
|
1776
1773
|
}
|
|
1777
|
-
function
|
|
1774
|
+
function Ts({ orientation: e }) {
|
|
1778
1775
|
return e === "left" ? /* @__PURE__ */ Je(pn, { className: "ds:size-4 ds:rtl:-scale-x-100" }) : /* @__PURE__ */ Je(kn, { className: "ds:size-4 ds:rtl:-scale-x-100" });
|
|
1779
1776
|
}
|
|
1780
1777
|
const Be = "ds:bg-[var(--calendar-range-fill)]", gs = "ds:size-[var(--min-target-size)] ds:text-center ds:align-middle", ys = [
|
|
@@ -1830,7 +1827,7 @@ const Be = "ds:bg-[var(--calendar-range-fill)]", gs = "ds:size-[var(--min-target
|
|
|
1830
1827
|
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1831
1828
|
"ds:disabled:opacity-50 ds:disabled:cursor-default",
|
|
1832
1829
|
"ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-default"
|
|
1833
|
-
].join(" "),
|
|
1830
|
+
].join(" "), Es = {
|
|
1834
1831
|
/* ---- Layout shell ---- */
|
|
1835
1832
|
// `ds:font-sans` is Tailwind's DEFAULT stack (ui-sans-serif, system-ui …), not
|
|
1836
1833
|
// the kit's face, so it overrode the correct font the portal root had already
|
|
@@ -1883,11 +1880,11 @@ const Be = "ds:bg-[var(--calendar-range-fill)]", gs = "ds:size-[var(--min-target
|
|
|
1883
1880
|
// (Tailwind emits same-specificity utilities in an unstable order otherwise).
|
|
1884
1881
|
[P.range_middle]: `rdp-range_middle ${Be} ds:[&.rdp-selected_button]:bg-transparent ds:[&_button]:border-transparent ds:[&.rdp-selected_button]:text-foreground ds:[&_button]:rounded-none ds:forced-colors:bg-[Highlight] ds:forced-colors:[&_button]:text-[HighlightText]`,
|
|
1885
1882
|
[P.range_end]: `rdp-range_end ${Be} ds:rounded-e-[var(--radius-sm)] ds:[&_button]:bg-primary ds:[&_button]:text-primary-foreground ds:[&_button]:border-primary ds:forced-colors:bg-[Highlight] ds:forced-colors:[&_button]:bg-[Highlight] ds:forced-colors:[&_button]:text-[HighlightText]`
|
|
1886
|
-
}, Fe = "ds:bg-[var(--calendar-compare-fill)] ds:border-b-2 ds:border-dashed ds:border-b-[var(--calendar-compare-edge)]",
|
|
1883
|
+
}, Fe = "ds:bg-[var(--calendar-compare-fill)] ds:border-b-2 ds:border-dashed ds:border-b-[var(--calendar-compare-edge)]", Is = {
|
|
1887
1884
|
compareStart: `rdp-compare_start ${Fe} ds:rounded-s-[var(--radius-sm)]`,
|
|
1888
1885
|
compareMiddle: `rdp-compare_middle ${Fe}`,
|
|
1889
1886
|
compareEnd: `rdp-compare_end ${Fe} ds:rounded-e-[var(--radius-sm)]`
|
|
1890
|
-
},
|
|
1887
|
+
}, Bs = ne(
|
|
1891
1888
|
[
|
|
1892
1889
|
"ds:relative ds:flex ds:items-center ds:w-full",
|
|
1893
1890
|
"ds:border ds:text-foreground",
|
|
@@ -1944,7 +1941,7 @@ const Be = "ds:bg-[var(--calendar-range-fill)]", gs = "ds:size-[var(--min-target
|
|
|
1944
1941
|
chrome: "input"
|
|
1945
1942
|
}
|
|
1946
1943
|
}
|
|
1947
|
-
),
|
|
1944
|
+
), Fs = ne(
|
|
1948
1945
|
[
|
|
1949
1946
|
"ds:w-full ds:min-w-0 ds:rounded-[var(--radius-sm)] ds:border ds:bg-input",
|
|
1950
1947
|
"ds:ps-[var(--spacing-sm)] ds:pe-[var(--spacing-sm)] ds:py-[var(--spacing-xs)]",
|
|
@@ -1964,7 +1961,7 @@ const Be = "ds:bg-[var(--calendar-range-fill)]", gs = "ds:size-[var(--min-target
|
|
|
1964
1961
|
},
|
|
1965
1962
|
defaultVariants: { state: "default" }
|
|
1966
1963
|
}
|
|
1967
|
-
),
|
|
1964
|
+
), Ps = ne(
|
|
1968
1965
|
[
|
|
1969
1966
|
"ds:inline-flex ds:items-center ds:justify-center ds:min-h-[var(--min-target-size)]",
|
|
1970
1967
|
"ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:rounded-[var(--radius-sm)]",
|
|
@@ -1983,9 +1980,9 @@ const Be = "ds:bg-[var(--calendar-range-fill)]", gs = "ds:size-[var(--min-target
|
|
|
1983
1980
|
},
|
|
1984
1981
|
defaultVariants: { intent: "ghost" }
|
|
1985
1982
|
}
|
|
1986
|
-
), Ps = ne(
|
|
1987
|
-
"ds:inline-flex ds:items-center ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-input ds:p-[2px]"
|
|
1988
1983
|
), zs = ne(
|
|
1984
|
+
"ds:inline-flex ds:items-center ds:rounded-[var(--radius-sm)] ds:border ds:border-border ds:bg-input ds:p-[2px]"
|
|
1985
|
+
), As = ne(
|
|
1989
1986
|
[
|
|
1990
1987
|
"ds:inline-flex ds:items-center ds:justify-center ds:cursor-pointer",
|
|
1991
1988
|
// Meet the kit touch-target rule (44px base / 48px accessible), matching
|
|
@@ -1999,9 +1996,9 @@ const Be = "ds:bg-[var(--calendar-range-fill)]", gs = "ds:size-[var(--min-target
|
|
|
1999
1996
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
2000
1997
|
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
2001
1998
|
].join(" ")
|
|
2002
|
-
), As = ne(
|
|
2003
|
-
"ds:ps-[var(--spacing-sm)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-xs)] ds:text-[length:var(--font-size-xs)] ds:font-semibold ds:uppercase ds:tracking-wide ds:text-muted-foreground"
|
|
2004
1999
|
), Hs = ne(
|
|
2000
|
+
"ds:ps-[var(--spacing-sm)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-xs)] ds:text-[length:var(--font-size-xs)] ds:font-semibold ds:uppercase ds:tracking-wide ds:text-muted-foreground"
|
|
2001
|
+
), js = ne(
|
|
2005
2002
|
"ds:absolute ds:inset-y-0 ds:end-0 ds:flex ds:items-center ds:pointer-events-none ds:text-muted-foreground",
|
|
2006
2003
|
{
|
|
2007
2004
|
variants: {
|
|
@@ -2013,13 +2010,13 @@ const Be = "ds:bg-[var(--calendar-range-fill)]", gs = "ds:size-[var(--min-target
|
|
|
2013
2010
|
},
|
|
2014
2011
|
defaultVariants: { size: "md" }
|
|
2015
2012
|
}
|
|
2016
|
-
),
|
|
2013
|
+
), $s = ne(
|
|
2017
2014
|
[
|
|
2018
2015
|
"ds:z-[var(--z-popover)] ds:rounded-[var(--radius-md)]",
|
|
2019
2016
|
"ds:border ds:border-border ds:bg-background ds:shadow-[var(--shadow-lg)]",
|
|
2020
2017
|
"ds:p-[var(--spacing-md)]"
|
|
2021
2018
|
].join(" ")
|
|
2022
|
-
),
|
|
2019
|
+
), Gs = ne(
|
|
2023
2020
|
[
|
|
2024
2021
|
// A flex row so an `active` preset can carry a trailing check icon and the
|
|
2025
2022
|
// label still fills the width and truncates rather than wrapping.
|
|
@@ -2048,30 +2045,29 @@ const Be = "ds:bg-[var(--calendar-range-fill)]", gs = "ds:size-[var(--min-target
|
|
|
2048
2045
|
}
|
|
2049
2046
|
);
|
|
2050
2047
|
export {
|
|
2051
|
-
|
|
2052
|
-
|
|
2048
|
+
Ts as C,
|
|
2049
|
+
xs as D,
|
|
2053
2050
|
zn as a,
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2051
|
+
Ys as b,
|
|
2052
|
+
js as c,
|
|
2053
|
+
Es as d,
|
|
2054
|
+
$s as e,
|
|
2055
|
+
Wn as f,
|
|
2056
|
+
Nn as g,
|
|
2057
|
+
ht as h,
|
|
2061
2058
|
An as i,
|
|
2062
|
-
|
|
2063
|
-
|
|
2059
|
+
_n as j,
|
|
2060
|
+
As as k,
|
|
2064
2061
|
zs as l,
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2062
|
+
Hs as m,
|
|
2063
|
+
Is as n,
|
|
2064
|
+
Ps as o,
|
|
2065
|
+
Gs as p,
|
|
2066
|
+
ft as q,
|
|
2067
|
+
Fs as r,
|
|
2071
2068
|
Yn as s,
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
Hn as w
|
|
2069
|
+
Bs as t,
|
|
2070
|
+
_s as u,
|
|
2071
|
+
Hn as v
|
|
2076
2072
|
};
|
|
2077
|
-
//# sourceMappingURL=date-picker-variants-
|
|
2073
|
+
//# sourceMappingURL=date-picker-variants-DmfVRNDB.js.map
|