@theengineerguy/chronos-picker 1.0.6 → 1.0.8
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/index.esm.js +371 -339
- package/dist/index.js +1 -1
- package/dist/src/components/Calendar.d.ts.map +1 -1
- package/dist/src/components/DateTimePicker.d.ts.map +1 -1
- package/dist/src/constants/holidays.d.ts +8 -0
- package/dist/src/constants/holidays.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/types.d.ts +14 -1
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/utils/calendar.d.ts +13 -0
- package/dist/src/utils/calendar.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,43 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useMemo as Y, useState as
|
|
3
|
-
import { DateTime as
|
|
4
|
-
const
|
|
1
|
+
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as Y, useState as E, useEffect as J, useRef as Q, useCallback as j } from "react";
|
|
3
|
+
import { DateTime as k } from "luxon";
|
|
4
|
+
const ye = "Asia/Kolkata", pe = [
|
|
5
|
+
// --- 2026 National Holidays (India) ---
|
|
6
|
+
{ date: "2026-01-26", name: "Republic Day", type: "national" },
|
|
7
|
+
{ date: "2026-03-19", name: "Holi", type: "national" },
|
|
8
|
+
// Tentative
|
|
9
|
+
{ date: "2026-04-14", name: "Dr. Ambedkar Jayanti", type: "national" },
|
|
10
|
+
{ date: "2026-08-15", name: "Independence Day", type: "national" },
|
|
11
|
+
{ date: "2026-10-02", name: "Gandhi Jayanti", type: "national" },
|
|
12
|
+
{ date: "2026-10-20", name: "Dussehra", type: "national" },
|
|
13
|
+
// Tentative
|
|
14
|
+
{ date: "2026-11-08", name: "Diwali", type: "national" },
|
|
15
|
+
// Tentative
|
|
16
|
+
{ date: "2026-12-25", name: "Christmas", type: "national" }
|
|
17
|
+
], Me = [
|
|
18
|
+
// Republic Day Weekend (Jan 24-26)
|
|
19
|
+
{ date: "2026-01-24", name: "Long Weekend: Trip to Jaipur?", type: "long-weekend" },
|
|
20
|
+
{ date: "2026-01-25", name: "Long Weekend: Fort Visit", type: "long-weekend" },
|
|
21
|
+
{ date: "2026-01-26", name: "Republic Day", type: "long-weekend" },
|
|
22
|
+
// Holi Weekend (Mar 19-22 - Take Friday off)
|
|
23
|
+
{ date: "2026-03-19", name: "Holi Celebration", type: "long-weekend" },
|
|
24
|
+
{ date: "2026-03-20", name: "Take a leave! Beach time?", type: "long-weekend" },
|
|
25
|
+
{ date: "2026-03-21", name: "Relaxing Saturday", type: "long-weekend" },
|
|
26
|
+
{ date: "2026-03-22", name: "Lazy Sunday", type: "long-weekend" },
|
|
27
|
+
// Independence Day Weekend (Aug 15-17)
|
|
28
|
+
{ date: "2026-08-15", name: "Independence Day", type: "long-weekend" },
|
|
29
|
+
{ date: "2026-08-16", name: "Sunday Brunch", type: "long-weekend" },
|
|
30
|
+
{ date: "2026-08-17", name: "Take a leave? Hills calling!", type: "long-weekend" },
|
|
31
|
+
// Monday leave suggestion
|
|
32
|
+
// Diwali Weekend (Nov 7-9)
|
|
33
|
+
{ date: "2026-11-07", name: "Choti Diwali", type: "long-weekend" },
|
|
34
|
+
{ date: "2026-11-08", name: "Diwali", type: "long-weekend" },
|
|
35
|
+
{ date: "2026-11-09", name: "Govardhan Puja (Take leave)", type: "long-weekend" }
|
|
36
|
+
];
|
|
37
|
+
function ve(e) {
|
|
38
|
+
return e === ye ? [...pe, ...Me] : [];
|
|
39
|
+
}
|
|
40
|
+
const be = "Asia/Kolkata", X = [
|
|
5
41
|
{ value: "Asia/Kolkata", label: "India (IST)" },
|
|
6
42
|
{ value: "America/New_York", label: "Eastern Time (ET)" },
|
|
7
43
|
{ value: "America/Chicago", label: "Central Time (CT)" },
|
|
@@ -15,207 +51,231 @@ const me = "Asia/Kolkata", X = [
|
|
|
15
51
|
{ value: "Australia/Sydney", label: "Sydney (AEDT)" },
|
|
16
52
|
{ value: "UTC", label: "UTC" }
|
|
17
53
|
];
|
|
18
|
-
function
|
|
19
|
-
return
|
|
54
|
+
function Z(e, o) {
|
|
55
|
+
return k.isDateTime(e) ? e.setZone(o) : typeof e == "string" ? k.fromISO(e, { zone: o }) : k.fromJSDate(e, { zone: o });
|
|
20
56
|
}
|
|
21
|
-
function
|
|
22
|
-
return
|
|
57
|
+
function U(e) {
|
|
58
|
+
return k.now().setZone(e);
|
|
23
59
|
}
|
|
24
|
-
function
|
|
25
|
-
const s =
|
|
26
|
-
return `UTC${s >= 0 ? "+" : "-"}${
|
|
60
|
+
function V(e) {
|
|
61
|
+
const s = k.now().setZone(e).offset, i = Math.floor(Math.abs(s) / 60), c = Math.abs(s) % 60;
|
|
62
|
+
return `UTC${s >= 0 ? "+" : "-"}${i}${c > 0 ? `:${c.toString().padStart(2, "0")}` : ""}`;
|
|
27
63
|
}
|
|
28
|
-
function
|
|
29
|
-
const
|
|
30
|
-
{ year: e, month:
|
|
64
|
+
function ge(e, o, s, i, c, v, d, h, N) {
|
|
65
|
+
const f = k.fromObject(
|
|
66
|
+
{ year: e, month: o, day: 1 },
|
|
31
67
|
{ zone: s }
|
|
32
|
-
),
|
|
33
|
-
|
|
34
|
-
let
|
|
35
|
-
|
|
68
|
+
), T = f.startOf("week"), I = f.endOf("month").endOf("week"), x = k.now().setZone(s).startOf("day"), P = d != null && h != null, L = d == null ? void 0 : d.startOf("day"), R = h == null ? void 0 : h.endOf("day"), t = /* @__PURE__ */ new Map();
|
|
69
|
+
N && N.forEach((D) => {
|
|
70
|
+
let u;
|
|
71
|
+
k.isDateTime(D.date) ? u = D.date.setZone(s) : typeof D.date == "string" ? u = k.fromISO(D.date, { zone: s }) : u = k.fromJSDate(D.date, { zone: s }), t.set(u.toISODate() || "", { name: D.name, type: D.type || "national" });
|
|
36
72
|
});
|
|
37
|
-
const
|
|
38
|
-
let
|
|
39
|
-
for (;
|
|
40
|
-
const
|
|
41
|
-
let
|
|
42
|
-
P &&
|
|
43
|
-
let
|
|
44
|
-
c &&
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
date:
|
|
48
|
-
isCurrentMonth:
|
|
49
|
-
isToday:
|
|
50
|
-
isSelected:
|
|
51
|
-
isDisabled:
|
|
52
|
-
isInRange:
|
|
53
|
-
isRangeStart:
|
|
54
|
-
isRangeEnd:
|
|
55
|
-
holiday:
|
|
56
|
-
}),
|
|
73
|
+
const p = [];
|
|
74
|
+
let _ = [], S = T;
|
|
75
|
+
for (; S <= I; ) {
|
|
76
|
+
const D = S.month === o, u = S.hasSame(x, "day"), O = S.startOf("day"), a = S.toISODate() || "";
|
|
77
|
+
let l = !1, r = !1, g = !1, $ = !1;
|
|
78
|
+
P && L && R ? (g = O.hasSame(L, "day"), $ = O.hasSame(R, "day"), r = O >= L && O <= R || g || $, l = g || $) : i && (l = S.hasSame(i, "day"));
|
|
79
|
+
let A = !1;
|
|
80
|
+
c && S < c.startOf("day") && (A = !0), v && S > v.endOf("day") && (A = !0);
|
|
81
|
+
const B = t.get(a);
|
|
82
|
+
_.push({
|
|
83
|
+
date: S,
|
|
84
|
+
isCurrentMonth: D,
|
|
85
|
+
isToday: u,
|
|
86
|
+
isSelected: l,
|
|
87
|
+
isDisabled: A,
|
|
88
|
+
isInRange: r,
|
|
89
|
+
isRangeStart: g,
|
|
90
|
+
isRangeEnd: $,
|
|
91
|
+
holiday: B ? { date: S, ...B } : void 0
|
|
92
|
+
}), _.length === 7 && (p.push(_), _ = []), S = S.plus({ days: 1 });
|
|
57
93
|
}
|
|
58
|
-
return
|
|
94
|
+
return p;
|
|
59
95
|
}
|
|
60
|
-
function
|
|
61
|
-
const e =
|
|
96
|
+
function ke() {
|
|
97
|
+
const e = k.now().startOf("week"), o = [];
|
|
62
98
|
for (let s = 0; s < 7; s++) {
|
|
63
|
-
const
|
|
64
|
-
|
|
99
|
+
const i = e.plus({ days: s });
|
|
100
|
+
o.push(i.toFormat("ccc"));
|
|
65
101
|
}
|
|
66
|
-
return
|
|
102
|
+
return o;
|
|
67
103
|
}
|
|
68
|
-
function
|
|
104
|
+
function Ne() {
|
|
69
105
|
const e = [];
|
|
70
|
-
for (let
|
|
71
|
-
const s =
|
|
106
|
+
for (let o = 1; o <= 12; o++) {
|
|
107
|
+
const s = k.fromObject({ month: o });
|
|
72
108
|
e.push(s.toFormat("MMMM"));
|
|
73
109
|
}
|
|
74
110
|
return e;
|
|
75
111
|
}
|
|
76
|
-
|
|
112
|
+
function Se(e, o, s, i) {
|
|
113
|
+
if (!e || e.length === 0) return [];
|
|
114
|
+
const c = (b) => k.isDateTime(b.date) ? b.date.setZone(o).startOf("day") : typeof b.date == "string" ? k.fromISO(b.date, { zone: o }).startOf("day") : k.fromJSDate(b.date, { zone: o }).startOf("day"), v = k.fromObject({ year: s, month: i, day: 1 }, { zone: o }), d = v.endOf("month"), h = Array.from(
|
|
115
|
+
new Set(e.map((b) => c(b).toISODate()).filter(Boolean))
|
|
116
|
+
).sort();
|
|
117
|
+
if (h.length === 0) return [];
|
|
118
|
+
const N = [];
|
|
119
|
+
let f = k.fromISO(h[0], { zone: o }), T = f;
|
|
120
|
+
for (let b = 1; b < h.length; b++) {
|
|
121
|
+
const I = k.fromISO(h[b], { zone: o }), x = k.fromISO(h[b - 1], { zone: o });
|
|
122
|
+
I.diff(x, "days").days <= 1 || (T >= v && f <= d && N.push({ start: f, end: T }), f = I), T = I;
|
|
123
|
+
}
|
|
124
|
+
return T >= v && f <= d && N.push({ start: f, end: T }), N;
|
|
125
|
+
}
|
|
126
|
+
const Te = ({
|
|
77
127
|
viewDate: e,
|
|
78
|
-
selectedDate:
|
|
128
|
+
selectedDate: o,
|
|
79
129
|
onDateSelect: s,
|
|
80
|
-
onViewDateChange:
|
|
130
|
+
onViewDateChange: i,
|
|
81
131
|
timezone: c,
|
|
82
132
|
minDate: v,
|
|
83
133
|
maxDate: d,
|
|
84
|
-
selectedStart:
|
|
85
|
-
selectedEnd:
|
|
86
|
-
onRangeSelect:
|
|
87
|
-
holidays:
|
|
134
|
+
selectedStart: h,
|
|
135
|
+
selectedEnd: N,
|
|
136
|
+
onRangeSelect: f,
|
|
137
|
+
holidays: T
|
|
88
138
|
}) => {
|
|
89
|
-
const
|
|
139
|
+
const b = f != null, I = Y(() => ge(
|
|
90
140
|
e.year,
|
|
91
141
|
e.month,
|
|
92
142
|
c,
|
|
93
|
-
|
|
143
|
+
o ?? void 0,
|
|
94
144
|
v,
|
|
95
145
|
d,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
), [e,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
},
|
|
107
|
-
const
|
|
108
|
-
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
a
|
|
146
|
+
h ?? void 0,
|
|
147
|
+
N ?? void 0,
|
|
148
|
+
T
|
|
149
|
+
), [e, o, c, v, d, h, N, T]), x = Y(
|
|
150
|
+
() => Se(T, c, e.year, e.month),
|
|
151
|
+
[T, c, e.year, e.month]
|
|
152
|
+
), P = Y(() => ke(), []), L = Y(() => Ne(), []), R = () => {
|
|
153
|
+
i(e.minus({ months: 1 }));
|
|
154
|
+
}, t = () => {
|
|
155
|
+
i(e.plus({ months: 1 }));
|
|
156
|
+
}, p = (a) => {
|
|
157
|
+
const l = parseInt(a.target.value, 10);
|
|
158
|
+
i(e.set({ month: l }));
|
|
159
|
+
}, _ = (a) => {
|
|
160
|
+
const l = parseInt(a.target.value, 10);
|
|
161
|
+
i(e.set({ year: l }));
|
|
162
|
+
}, S = (a, l) => {
|
|
163
|
+
if (!l)
|
|
164
|
+
if (b && f) {
|
|
165
|
+
const r = a.startOf("day");
|
|
166
|
+
if (h == null)
|
|
167
|
+
f(a, a);
|
|
168
|
+
else if (N != null && h.hasSame(N, "day")) {
|
|
169
|
+
const g = h.startOf("day");
|
|
170
|
+
r < g ? f(a, h) : f(h, a);
|
|
118
171
|
} else
|
|
119
|
-
|
|
172
|
+
f(a, a);
|
|
120
173
|
} else
|
|
121
|
-
s(
|
|
122
|
-
},
|
|
123
|
-
(
|
|
124
|
-
},
|
|
125
|
-
return /* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
127
|
-
/* @__PURE__ */
|
|
174
|
+
s(a);
|
|
175
|
+
}, D = (a, l, r) => {
|
|
176
|
+
(a.key === "Enter" || a.key === " ") && (a.preventDefault(), S(l, r));
|
|
177
|
+
}, u = e.year, O = Array.from({ length: 21 }, (a, l) => u - 10 + l);
|
|
178
|
+
return /* @__PURE__ */ m("div", { className: "chronos-calendar", role: "region", "aria-label": "Calendar", children: [
|
|
179
|
+
/* @__PURE__ */ m("div", { className: "chronos-calendar-header", children: [
|
|
180
|
+
/* @__PURE__ */ n(
|
|
128
181
|
"button",
|
|
129
182
|
{
|
|
130
183
|
type: "button",
|
|
131
184
|
className: "chronos-nav-button",
|
|
132
|
-
onClick:
|
|
185
|
+
onClick: R,
|
|
133
186
|
"aria-label": "Previous month",
|
|
134
187
|
children: "‹"
|
|
135
188
|
}
|
|
136
189
|
),
|
|
137
|
-
/* @__PURE__ */
|
|
138
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ m("div", { className: "chronos-month-year-selectors", children: [
|
|
191
|
+
/* @__PURE__ */ n(
|
|
139
192
|
"select",
|
|
140
193
|
{
|
|
141
194
|
className: "chronos-month-select",
|
|
142
195
|
value: e.month,
|
|
143
|
-
onChange:
|
|
196
|
+
onChange: p,
|
|
144
197
|
"aria-label": "Select month",
|
|
145
|
-
children:
|
|
198
|
+
children: L.map((a, l) => /* @__PURE__ */ n("option", { value: l + 1, children: a }, l))
|
|
146
199
|
}
|
|
147
200
|
),
|
|
148
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ n(
|
|
149
202
|
"select",
|
|
150
203
|
{
|
|
151
204
|
className: "chronos-year-select",
|
|
152
205
|
value: e.year,
|
|
153
|
-
onChange:
|
|
206
|
+
onChange: _,
|
|
154
207
|
"aria-label": "Select year",
|
|
155
|
-
children:
|
|
208
|
+
children: O.map((a) => /* @__PURE__ */ n("option", { value: a, children: a }, a))
|
|
156
209
|
}
|
|
157
210
|
)
|
|
158
211
|
] }),
|
|
159
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ n(
|
|
160
213
|
"button",
|
|
161
214
|
{
|
|
162
215
|
type: "button",
|
|
163
216
|
className: "chronos-nav-button",
|
|
164
|
-
onClick:
|
|
217
|
+
onClick: t,
|
|
165
218
|
"aria-label": "Next month",
|
|
166
219
|
children: "›"
|
|
167
220
|
}
|
|
168
221
|
)
|
|
169
222
|
] }),
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
-
|
|
223
|
+
/* @__PURE__ */ m("div", { className: "chronos-calendar-grid", children: [
|
|
224
|
+
/* @__PURE__ */ n("div", { className: "chronos-weekday-row", children: P.map((a) => /* @__PURE__ */ n("div", { className: "chronos-weekday", children: a }, a)) }),
|
|
225
|
+
I.map((a, l) => /* @__PURE__ */ n("div", { className: "chronos-week-row", children: a.map((r, g) => /* @__PURE__ */ m(
|
|
173
226
|
"button",
|
|
174
227
|
{
|
|
175
228
|
type: "button",
|
|
176
|
-
className: `chronos-day ${
|
|
177
|
-
onClick: () =>
|
|
178
|
-
onKeyDown: (
|
|
179
|
-
disabled:
|
|
180
|
-
"aria-label": `${
|
|
181
|
-
"aria-selected":
|
|
182
|
-
"aria-current":
|
|
183
|
-
title:
|
|
229
|
+
className: `chronos-day ${r.isSelected ? "selected" : ""} ${r.isToday ? "today" : ""} ${r.isCurrentMonth ? "" : "other-month"} ${r.isDisabled ? "disabled" : ""} ${r.isInRange ? "in-range" : ""} ${r.isRangeStart ? "range-start" : ""} ${r.isRangeEnd ? "range-end" : ""} ${r.holiday ? `holiday ${r.holiday.type}` : ""}`,
|
|
230
|
+
onClick: () => S(r.date, r.isDisabled),
|
|
231
|
+
onKeyDown: ($) => D($, r.date, r.isDisabled),
|
|
232
|
+
disabled: r.isDisabled,
|
|
233
|
+
"aria-label": `${r.date.toFormat("MMMM d, yyyy")}${r.holiday ? `, ${r.holiday.name}` : ""}`,
|
|
234
|
+
"aria-selected": r.isSelected,
|
|
235
|
+
"aria-current": r.isToday ? "date" : void 0,
|
|
236
|
+
title: r.holiday ? r.holiday.name : void 0,
|
|
184
237
|
children: [
|
|
185
|
-
|
|
186
|
-
|
|
238
|
+
r.date.day,
|
|
239
|
+
r.holiday && /* @__PURE__ */ n("span", { className: "chronos-holiday-dot" })
|
|
187
240
|
]
|
|
188
241
|
},
|
|
189
|
-
|
|
190
|
-
)) },
|
|
191
|
-
] })
|
|
242
|
+
g
|
|
243
|
+
)) }, l))
|
|
244
|
+
] }),
|
|
245
|
+
x.length > 0 && /* @__PURE__ */ n("div", { className: "chronos-vacation-notes", role: "region", "aria-label": "Vacation suggestions", children: x.map((a, l) => {
|
|
246
|
+
const r = a.start.hasSame(a.end, "day"), g = a.start.toFormat("d MMM yyyy"), $ = a.end.toFormat("d MMM yyyy");
|
|
247
|
+
return /* @__PURE__ */ m("div", { className: "chronos-vacation-note", children: [
|
|
248
|
+
/* @__PURE__ */ n("div", { className: "chronos-vacation-note-title", children: r ? "Vacation day" : "You can take your vacation" }),
|
|
249
|
+
/* @__PURE__ */ n("div", { className: "chronos-vacation-note-dates", children: r ? g : `from ${g} to ${$}` })
|
|
250
|
+
] }, l);
|
|
251
|
+
}) })
|
|
192
252
|
] });
|
|
193
|
-
},
|
|
253
|
+
}, Oe = ({
|
|
194
254
|
value: e,
|
|
195
|
-
onChange:
|
|
255
|
+
onChange: o,
|
|
196
256
|
use24Hour: s
|
|
197
257
|
}) => {
|
|
198
|
-
const [
|
|
258
|
+
const [i, c] = E((e == null ? void 0 : e.hour) ?? 12), [v, d] = E((e == null ? void 0 : e.minute) ?? 0), [h, N] = E(
|
|
199
259
|
e && e.hour >= 12 ? "PM" : "AM"
|
|
200
260
|
);
|
|
201
|
-
|
|
202
|
-
e && (c(e.hour), d(e.minute),
|
|
261
|
+
J(() => {
|
|
262
|
+
e && (c(e.hour), d(e.minute), N(e.hour >= 12 ? "PM" : "AM"));
|
|
203
263
|
}, [e]);
|
|
204
|
-
const
|
|
205
|
-
c(
|
|
206
|
-
let
|
|
207
|
-
s || (
|
|
208
|
-
},
|
|
209
|
-
d(
|
|
210
|
-
},
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
let
|
|
214
|
-
|
|
215
|
-
},
|
|
216
|
-
return /* @__PURE__ */
|
|
217
|
-
/* @__PURE__ */
|
|
218
|
-
/* @__PURE__ */
|
|
264
|
+
const f = (t) => {
|
|
265
|
+
c(t);
|
|
266
|
+
let p = t;
|
|
267
|
+
s || (h === "PM" && t !== 12 ? p = t + 12 : h === "AM" && t === 12 && (p = 0)), o(p, v);
|
|
268
|
+
}, T = (t) => {
|
|
269
|
+
d(t), o(i, t);
|
|
270
|
+
}, b = () => {
|
|
271
|
+
const t = h === "AM" ? "PM" : "AM";
|
|
272
|
+
N(t);
|
|
273
|
+
let p = i;
|
|
274
|
+
t === "PM" && i !== 12 ? p = i + 12 : t === "AM" && i === 12 ? p = 0 : t === "AM" && i > 12 && (p = i - 12), o(p, v);
|
|
275
|
+
}, I = s ? i : i % 12 || 12, x = s ? 23 : 12, P = s ? 0 : 1, L = Array.from({ length: x - P + 1 }, (t, p) => P + p), R = Array.from({ length: 60 }, (t, p) => p);
|
|
276
|
+
return /* @__PURE__ */ m("div", { className: "chronos-time-picker", role: "group", "aria-label": "Time picker", children: [
|
|
277
|
+
/* @__PURE__ */ m("div", { className: "chronos-time-header", children: [
|
|
278
|
+
/* @__PURE__ */ m(
|
|
219
279
|
"svg",
|
|
220
280
|
{
|
|
221
281
|
className: "chronos-clock-icon",
|
|
@@ -225,67 +285,67 @@ const fe = ({
|
|
|
225
285
|
stroke: "currentColor",
|
|
226
286
|
strokeWidth: "2",
|
|
227
287
|
children: [
|
|
228
|
-
/* @__PURE__ */
|
|
229
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
289
|
+
/* @__PURE__ */ n("polyline", { points: "12 6 12 12 16 14" })
|
|
230
290
|
]
|
|
231
291
|
}
|
|
232
292
|
),
|
|
233
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ n("span", { children: "Time" })
|
|
234
294
|
] }),
|
|
235
|
-
/* @__PURE__ */
|
|
236
|
-
/* @__PURE__ */
|
|
237
|
-
/* @__PURE__ */
|
|
238
|
-
/* @__PURE__ */
|
|
295
|
+
/* @__PURE__ */ m("div", { className: "chronos-time-controls", children: [
|
|
296
|
+
/* @__PURE__ */ m("div", { className: "chronos-time-input-group", children: [
|
|
297
|
+
/* @__PURE__ */ n("label", { htmlFor: "chronos-hour-select", className: "chronos-time-label", children: "Hour" }),
|
|
298
|
+
/* @__PURE__ */ n(
|
|
239
299
|
"select",
|
|
240
300
|
{
|
|
241
301
|
id: "chronos-hour-select",
|
|
242
302
|
className: "chronos-time-select",
|
|
243
|
-
value:
|
|
244
|
-
onChange: (
|
|
303
|
+
value: I,
|
|
304
|
+
onChange: (t) => f(parseInt(t.target.value, 10)),
|
|
245
305
|
"aria-label": "Select hour",
|
|
246
|
-
children:
|
|
306
|
+
children: L.map((t) => /* @__PURE__ */ n("option", { value: t, children: t.toString().padStart(2, "0") }, t))
|
|
247
307
|
}
|
|
248
308
|
)
|
|
249
309
|
] }),
|
|
250
|
-
/* @__PURE__ */
|
|
251
|
-
/* @__PURE__ */
|
|
252
|
-
/* @__PURE__ */
|
|
253
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ n("span", { className: "chronos-time-separator", children: ":" }),
|
|
311
|
+
/* @__PURE__ */ m("div", { className: "chronos-time-input-group", children: [
|
|
312
|
+
/* @__PURE__ */ n("label", { htmlFor: "chronos-minute-select", className: "chronos-time-label", children: "Minute" }),
|
|
313
|
+
/* @__PURE__ */ n(
|
|
254
314
|
"select",
|
|
255
315
|
{
|
|
256
316
|
id: "chronos-minute-select",
|
|
257
317
|
className: "chronos-time-select",
|
|
258
318
|
value: v,
|
|
259
|
-
onChange: (
|
|
319
|
+
onChange: (t) => T(parseInt(t.target.value, 10)),
|
|
260
320
|
"aria-label": "Select minute",
|
|
261
|
-
children:
|
|
321
|
+
children: R.map((t) => /* @__PURE__ */ n("option", { value: t, children: t.toString().padStart(2, "0") }, t))
|
|
262
322
|
}
|
|
263
323
|
)
|
|
264
324
|
] }),
|
|
265
|
-
!s && /* @__PURE__ */
|
|
325
|
+
!s && /* @__PURE__ */ n(
|
|
266
326
|
"button",
|
|
267
327
|
{
|
|
268
328
|
type: "button",
|
|
269
329
|
className: "chronos-period-toggle",
|
|
270
|
-
onClick:
|
|
271
|
-
"aria-label": `Switch to ${
|
|
272
|
-
children:
|
|
330
|
+
onClick: b,
|
|
331
|
+
"aria-label": `Switch to ${h === "AM" ? "PM" : "AM"}`,
|
|
332
|
+
children: h
|
|
273
333
|
}
|
|
274
334
|
)
|
|
275
335
|
] })
|
|
276
336
|
] });
|
|
277
|
-
},
|
|
337
|
+
}, De = ({
|
|
278
338
|
value: e,
|
|
279
|
-
onChange:
|
|
339
|
+
onChange: o
|
|
280
340
|
}) => {
|
|
281
|
-
const [s,
|
|
341
|
+
const [s, i] = E(!1), c = X.find((d) => d.value === e) || {
|
|
282
342
|
label: e
|
|
283
343
|
}, v = (d) => {
|
|
284
|
-
|
|
344
|
+
o(d), i(!1);
|
|
285
345
|
};
|
|
286
|
-
return /* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
/* @__PURE__ */
|
|
346
|
+
return /* @__PURE__ */ m("div", { className: "chronos-timezone-selector", children: [
|
|
347
|
+
/* @__PURE__ */ m("div", { className: "chronos-timezone-header", children: [
|
|
348
|
+
/* @__PURE__ */ m(
|
|
289
349
|
"svg",
|
|
290
350
|
{
|
|
291
351
|
className: "chronos-globe-icon",
|
|
@@ -295,26 +355,26 @@ const fe = ({
|
|
|
295
355
|
stroke: "currentColor",
|
|
296
356
|
strokeWidth: "2",
|
|
297
357
|
children: [
|
|
298
|
-
/* @__PURE__ */
|
|
299
|
-
/* @__PURE__ */
|
|
300
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
|
|
359
|
+
/* @__PURE__ */ n("line", { x1: "2", y1: "12", x2: "22", y2: "12" }),
|
|
360
|
+
/* @__PURE__ */ n("path", { d: "M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" })
|
|
301
361
|
]
|
|
302
362
|
}
|
|
303
363
|
),
|
|
304
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ n("span", { children: "Timezone" })
|
|
305
365
|
] }),
|
|
306
|
-
/* @__PURE__ */
|
|
366
|
+
/* @__PURE__ */ m(
|
|
307
367
|
"button",
|
|
308
368
|
{
|
|
309
369
|
type: "button",
|
|
310
370
|
className: "chronos-timezone-button",
|
|
311
|
-
onClick: () =>
|
|
371
|
+
onClick: () => i(!s),
|
|
312
372
|
"aria-expanded": s,
|
|
313
373
|
"aria-label": "Select timezone",
|
|
314
374
|
children: [
|
|
315
|
-
/* @__PURE__ */
|
|
316
|
-
/* @__PURE__ */
|
|
317
|
-
/* @__PURE__ */
|
|
375
|
+
/* @__PURE__ */ n("span", { className: "chronos-timezone-label", children: c.label }),
|
|
376
|
+
/* @__PURE__ */ n("span", { className: "chronos-timezone-offset", children: V(e) }),
|
|
377
|
+
/* @__PURE__ */ n(
|
|
318
378
|
"svg",
|
|
319
379
|
{
|
|
320
380
|
className: `chronos-chevron ${s ? "expanded" : ""}`,
|
|
@@ -323,13 +383,13 @@ const fe = ({
|
|
|
323
383
|
fill: "none",
|
|
324
384
|
stroke: "currentColor",
|
|
325
385
|
strokeWidth: "2",
|
|
326
|
-
children: /* @__PURE__ */
|
|
386
|
+
children: /* @__PURE__ */ n("polyline", { points: "6 9 12 15 18 9" })
|
|
327
387
|
}
|
|
328
388
|
)
|
|
329
389
|
]
|
|
330
390
|
}
|
|
331
391
|
),
|
|
332
|
-
s && /* @__PURE__ */
|
|
392
|
+
s && /* @__PURE__ */ n("div", { className: "chronos-timezone-list", role: "listbox", children: X.map((d) => /* @__PURE__ */ m(
|
|
333
393
|
"button",
|
|
334
394
|
{
|
|
335
395
|
type: "button",
|
|
@@ -338,145 +398,147 @@ const fe = ({
|
|
|
338
398
|
role: "option",
|
|
339
399
|
"aria-selected": d.value === e,
|
|
340
400
|
children: [
|
|
341
|
-
/* @__PURE__ */
|
|
342
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ n("span", { className: "chronos-timezone-option-label", children: d.label }),
|
|
402
|
+
/* @__PURE__ */ n("span", { className: "chronos-timezone-option-offset", children: V(d.value) })
|
|
343
403
|
]
|
|
344
404
|
},
|
|
345
405
|
d.value
|
|
346
406
|
)) })
|
|
347
407
|
] });
|
|
348
408
|
};
|
|
349
|
-
function
|
|
409
|
+
function ee(e, o, s) {
|
|
350
410
|
return {
|
|
351
411
|
iso: e.toISO() || "",
|
|
352
|
-
formatted: e.toFormat(`${
|
|
412
|
+
formatted: e.toFormat(`${o} ${s}`),
|
|
353
413
|
timestamp: e.toMillis(),
|
|
354
414
|
dateTime: e
|
|
355
415
|
};
|
|
356
416
|
}
|
|
357
|
-
const
|
|
417
|
+
const $e = ({
|
|
358
418
|
value: e,
|
|
359
|
-
onChange:
|
|
360
|
-
timezone: s =
|
|
361
|
-
dateFormat:
|
|
419
|
+
onChange: o,
|
|
420
|
+
timezone: s = be,
|
|
421
|
+
dateFormat: i = "DD",
|
|
362
422
|
timeFormat: c = "HH:mm",
|
|
363
423
|
minDate: v,
|
|
364
424
|
maxDate: d,
|
|
365
|
-
placeholder:
|
|
366
|
-
disabled:
|
|
367
|
-
showTime:
|
|
368
|
-
use24Hour:
|
|
369
|
-
className:
|
|
370
|
-
ariaLabel:
|
|
371
|
-
showTimezoneSelector:
|
|
425
|
+
placeholder: h = "Select date and time",
|
|
426
|
+
disabled: N = !1,
|
|
427
|
+
showTime: f = !0,
|
|
428
|
+
use24Hour: T = !0,
|
|
429
|
+
className: b = "",
|
|
430
|
+
ariaLabel: I = "Date and time picker",
|
|
431
|
+
showTimezoneSelector: x = !1,
|
|
372
432
|
theme: P = "light",
|
|
373
|
-
orientation:
|
|
374
|
-
selectionMode:
|
|
375
|
-
rangeValue:
|
|
376
|
-
onRangeChange:
|
|
377
|
-
holidays:
|
|
433
|
+
orientation: L = "portrait",
|
|
434
|
+
selectionMode: R = "single",
|
|
435
|
+
rangeValue: t,
|
|
436
|
+
onRangeChange: p,
|
|
437
|
+
holidays: _,
|
|
438
|
+
customHolidays: S,
|
|
439
|
+
showHolidays: D = !0
|
|
378
440
|
}) => {
|
|
379
|
-
const
|
|
380
|
-
|
|
381
|
-
!
|
|
382
|
-
}, [e,
|
|
383
|
-
|
|
384
|
-
}, [
|
|
385
|
-
const
|
|
386
|
-
|
|
441
|
+
const u = R === "range", [O, a] = E(!1), [l, r] = E(() => !u && e ? Z(e, s) : null), [g, $] = E(() => u && (t != null && t.start) ? Z(t.start, s) : null), [A, B] = E(() => u && (t != null && t.end) ? Z(t.end, s) : null), [w, te] = E(s), [ne, K] = E(() => l || g || A || U(s)), G = Q(null), F = Q(null);
|
|
442
|
+
J(() => {
|
|
443
|
+
!u && e && r(Z(e, w));
|
|
444
|
+
}, [e, w, u]), J(() => {
|
|
445
|
+
u && (t == null ? void 0 : t.start) != null && (t == null ? void 0 : t.end) != null && ($(Z(t.start, w)), B(Z(t.end, w)));
|
|
446
|
+
}, [u, t, w]), J(() => {
|
|
447
|
+
const M = (y) => {
|
|
448
|
+
G.current && !G.current.contains(y.target) && a(!1);
|
|
387
449
|
};
|
|
388
|
-
if (
|
|
389
|
-
return document.addEventListener("mousedown",
|
|
390
|
-
}, [
|
|
391
|
-
const
|
|
392
|
-
var
|
|
393
|
-
|
|
450
|
+
if (O)
|
|
451
|
+
return document.addEventListener("mousedown", M), () => document.removeEventListener("mousedown", M);
|
|
452
|
+
}, [O]), J(() => {
|
|
453
|
+
const M = (y) => {
|
|
454
|
+
var C;
|
|
455
|
+
y.key === "Escape" && O && (a(!1), (C = F.current) == null || C.focus());
|
|
394
456
|
};
|
|
395
|
-
return document.addEventListener("keydown",
|
|
396
|
-
}, [
|
|
397
|
-
const
|
|
398
|
-
let
|
|
399
|
-
if (
|
|
400
|
-
hour:
|
|
401
|
-
minute:
|
|
402
|
-
second:
|
|
403
|
-
})),
|
|
404
|
-
const
|
|
405
|
-
iso:
|
|
406
|
-
formatted:
|
|
407
|
-
timestamp:
|
|
408
|
-
dateTime:
|
|
457
|
+
return document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
|
|
458
|
+
}, [O]);
|
|
459
|
+
const oe = j((M) => {
|
|
460
|
+
let y = M;
|
|
461
|
+
if (l && (y = M.set({
|
|
462
|
+
hour: l.hour,
|
|
463
|
+
minute: l.minute,
|
|
464
|
+
second: l.second
|
|
465
|
+
})), r(y), K(y), f || a(!1), o) {
|
|
466
|
+
const C = {
|
|
467
|
+
iso: y.toISO() || "",
|
|
468
|
+
formatted: y.toFormat(`${i} ${c}`),
|
|
469
|
+
timestamp: y.toMillis(),
|
|
470
|
+
dateTime: y
|
|
409
471
|
};
|
|
410
|
-
|
|
472
|
+
o(C);
|
|
411
473
|
}
|
|
412
|
-
}, [
|
|
413
|
-
const
|
|
414
|
-
if (
|
|
474
|
+
}, [l, f, o, i, c]), ae = j((M, y) => {
|
|
475
|
+
const W = (l || U(w)).set({ hour: M, minute: y, second: 0 });
|
|
476
|
+
if (r(W), o) {
|
|
415
477
|
const z = {
|
|
416
|
-
iso:
|
|
417
|
-
formatted:
|
|
418
|
-
timestamp:
|
|
419
|
-
dateTime:
|
|
478
|
+
iso: W.toISO() || "",
|
|
479
|
+
formatted: W.toFormat(`${i} ${c}`),
|
|
480
|
+
timestamp: W.toMillis(),
|
|
481
|
+
dateTime: W
|
|
420
482
|
};
|
|
421
|
-
|
|
483
|
+
o(z);
|
|
422
484
|
}
|
|
423
|
-
}, [
|
|
424
|
-
const
|
|
425
|
-
if (
|
|
426
|
-
const
|
|
427
|
-
|
|
485
|
+
}, [l, w, o, i, c]), se = j((M, y) => {
|
|
486
|
+
const C = M.startOf("day"), W = y.startOf("day"), [z, H] = C <= W ? [C, W] : [W, C];
|
|
487
|
+
if ($(z), B(H), K(z), p) {
|
|
488
|
+
const me = ee(z, i, c), fe = ee(H, i, c), ue = Math.max(0, Math.ceil(H.diff(z, "days").days));
|
|
489
|
+
p({ start: me, end: fe, nights: ue });
|
|
428
490
|
}
|
|
429
|
-
}, [
|
|
430
|
-
if (
|
|
431
|
-
const
|
|
432
|
-
if (
|
|
433
|
-
const
|
|
434
|
-
iso:
|
|
435
|
-
formatted:
|
|
436
|
-
timestamp:
|
|
437
|
-
dateTime:
|
|
491
|
+
}, [p, i, c]), re = j((M) => {
|
|
492
|
+
if (te(M), l) {
|
|
493
|
+
const y = l.setZone(M);
|
|
494
|
+
if (r(y), K(y), o) {
|
|
495
|
+
const C = {
|
|
496
|
+
iso: y.toISO() || "",
|
|
497
|
+
formatted: y.toFormat(`${i} ${c}`),
|
|
498
|
+
timestamp: y.toMillis(),
|
|
499
|
+
dateTime: y
|
|
438
500
|
};
|
|
439
|
-
|
|
501
|
+
o(C);
|
|
440
502
|
}
|
|
441
503
|
} else
|
|
442
|
-
|
|
443
|
-
}, [
|
|
444
|
-
|
|
445
|
-
},
|
|
446
|
-
(
|
|
447
|
-
},
|
|
448
|
-
return /* @__PURE__ */
|
|
504
|
+
K(U(M));
|
|
505
|
+
}, [l, o, i, c]), q = () => {
|
|
506
|
+
N || a(!O);
|
|
507
|
+
}, ie = (M) => {
|
|
508
|
+
(M.key === "Enter" || M.key === " ") && (M.preventDefault(), q());
|
|
509
|
+
}, le = u ? g && A ? `${g.toFormat("d MMM yyyy")} – ${A.toFormat("d MMM yyyy")}` : "" : l ? l.toFormat(`${i} ${f ? c : ""}`) : "", ce = v ? Z(v, w) : void 0, de = d ? Z(d, w) : void 0, he = _ !== void 0 ? _ : D ? [...ve(w), ...S ?? []] : S ?? [];
|
|
510
|
+
return /* @__PURE__ */ m(
|
|
449
511
|
"div",
|
|
450
512
|
{
|
|
451
|
-
ref:
|
|
452
|
-
className: `chronos-picker ${
|
|
453
|
-
"data-disabled":
|
|
513
|
+
ref: G,
|
|
514
|
+
className: `chronos-picker ${b}`,
|
|
515
|
+
"data-disabled": N,
|
|
454
516
|
"data-theme": P,
|
|
455
517
|
children: [
|
|
456
|
-
/* @__PURE__ */
|
|
518
|
+
/* @__PURE__ */ m(
|
|
457
519
|
"div",
|
|
458
520
|
{
|
|
459
521
|
className: "chronos-input-wrapper",
|
|
460
522
|
onClick: q,
|
|
461
523
|
children: [
|
|
462
|
-
/* @__PURE__ */
|
|
524
|
+
/* @__PURE__ */ n(
|
|
463
525
|
"input",
|
|
464
526
|
{
|
|
465
|
-
ref:
|
|
527
|
+
ref: F,
|
|
466
528
|
type: "text",
|
|
467
529
|
className: "chronos-input",
|
|
468
|
-
value:
|
|
469
|
-
placeholder:
|
|
530
|
+
value: le,
|
|
531
|
+
placeholder: h,
|
|
470
532
|
readOnly: !0,
|
|
471
|
-
disabled:
|
|
472
|
-
onKeyDown:
|
|
473
|
-
"aria-label":
|
|
474
|
-
"aria-expanded":
|
|
533
|
+
disabled: N,
|
|
534
|
+
onKeyDown: ie,
|
|
535
|
+
"aria-label": I,
|
|
536
|
+
"aria-expanded": O,
|
|
475
537
|
"aria-haspopup": "dialog",
|
|
476
538
|
role: "combobox"
|
|
477
539
|
}
|
|
478
540
|
),
|
|
479
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ m(
|
|
480
542
|
"svg",
|
|
481
543
|
{
|
|
482
544
|
className: "chronos-calendar-icon",
|
|
@@ -486,67 +548,67 @@ const Ne = ({
|
|
|
486
548
|
stroke: "currentColor",
|
|
487
549
|
strokeWidth: "2",
|
|
488
550
|
children: [
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
-
/* @__PURE__ */
|
|
491
|
-
/* @__PURE__ */
|
|
492
|
-
/* @__PURE__ */
|
|
551
|
+
/* @__PURE__ */ n("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }),
|
|
552
|
+
/* @__PURE__ */ n("line", { x1: "16", y1: "2", x2: "16", y2: "6" }),
|
|
553
|
+
/* @__PURE__ */ n("line", { x1: "8", y1: "2", x2: "8", y2: "6" }),
|
|
554
|
+
/* @__PURE__ */ n("line", { x1: "3", y1: "10", x2: "21", y2: "10" })
|
|
493
555
|
]
|
|
494
556
|
}
|
|
495
557
|
)
|
|
496
558
|
]
|
|
497
559
|
}
|
|
498
560
|
),
|
|
499
|
-
|
|
561
|
+
O && /* @__PURE__ */ n(
|
|
500
562
|
"div",
|
|
501
563
|
{
|
|
502
564
|
className: "chronos-dropdown",
|
|
503
|
-
"data-orientation":
|
|
504
|
-
"data-range-mode":
|
|
565
|
+
"data-orientation": L,
|
|
566
|
+
"data-range-mode": u,
|
|
505
567
|
role: "dialog",
|
|
506
568
|
"aria-label": "Date and time picker dialog",
|
|
507
|
-
children: /* @__PURE__ */
|
|
508
|
-
|
|
509
|
-
/* @__PURE__ */
|
|
510
|
-
Math.max(0, Math.ceil(
|
|
569
|
+
children: /* @__PURE__ */ m("div", { className: "chronos-dropdown-content", children: [
|
|
570
|
+
u && g && A && /* @__PURE__ */ m("div", { className: "chronos-range-summary", children: [
|
|
571
|
+
/* @__PURE__ */ m("div", { className: "chronos-range-nights", children: [
|
|
572
|
+
Math.max(0, Math.ceil(A.diff(g, "days").days)),
|
|
511
573
|
" nights"
|
|
512
574
|
] }),
|
|
513
|
-
/* @__PURE__ */
|
|
514
|
-
|
|
575
|
+
/* @__PURE__ */ m("div", { className: "chronos-range-dates", children: [
|
|
576
|
+
g.toFormat("d MMM yyyy"),
|
|
515
577
|
" – ",
|
|
516
|
-
|
|
578
|
+
A.toFormat("d MMM yyyy")
|
|
517
579
|
] })
|
|
518
580
|
] }),
|
|
519
|
-
/* @__PURE__ */
|
|
520
|
-
|
|
581
|
+
/* @__PURE__ */ n(
|
|
582
|
+
Te,
|
|
521
583
|
{
|
|
522
|
-
viewDate:
|
|
523
|
-
selectedDate:
|
|
524
|
-
onDateSelect:
|
|
525
|
-
onViewDateChange:
|
|
526
|
-
timezone:
|
|
527
|
-
minDate:
|
|
528
|
-
maxDate:
|
|
529
|
-
selectedStart:
|
|
530
|
-
selectedEnd:
|
|
531
|
-
onRangeSelect:
|
|
532
|
-
holidays:
|
|
584
|
+
viewDate: ne,
|
|
585
|
+
selectedDate: u ? null : l,
|
|
586
|
+
onDateSelect: oe,
|
|
587
|
+
onViewDateChange: K,
|
|
588
|
+
timezone: w,
|
|
589
|
+
minDate: ce,
|
|
590
|
+
maxDate: de,
|
|
591
|
+
selectedStart: u ? g : void 0,
|
|
592
|
+
selectedEnd: u ? A : void 0,
|
|
593
|
+
onRangeSelect: u ? se : void 0,
|
|
594
|
+
holidays: he
|
|
533
595
|
}
|
|
534
596
|
),
|
|
535
|
-
!
|
|
536
|
-
|
|
537
|
-
|
|
597
|
+
!u && (f || x) && /* @__PURE__ */ m("div", { className: "chronos-sidebar", children: [
|
|
598
|
+
f && /* @__PURE__ */ n(
|
|
599
|
+
Oe,
|
|
538
600
|
{
|
|
539
|
-
value:
|
|
540
|
-
onChange:
|
|
541
|
-
use24Hour:
|
|
542
|
-
timezone:
|
|
601
|
+
value: l,
|
|
602
|
+
onChange: ae,
|
|
603
|
+
use24Hour: T,
|
|
604
|
+
timezone: w
|
|
543
605
|
}
|
|
544
606
|
),
|
|
545
|
-
|
|
546
|
-
|
|
607
|
+
x && /* @__PURE__ */ n(
|
|
608
|
+
De,
|
|
547
609
|
{
|
|
548
|
-
value:
|
|
549
|
-
onChange:
|
|
610
|
+
value: w,
|
|
611
|
+
onChange: re
|
|
550
612
|
}
|
|
551
613
|
)
|
|
552
614
|
] })
|
|
@@ -556,45 +618,15 @@ const Ne = ({
|
|
|
556
618
|
]
|
|
557
619
|
}
|
|
558
620
|
);
|
|
559
|
-
}
|
|
560
|
-
// --- 2026 National Holidays (India) ---
|
|
561
|
-
{ date: "2026-01-26", name: "Republic Day", type: "national" },
|
|
562
|
-
{ date: "2026-03-19", name: "Holi", type: "national" },
|
|
563
|
-
// Tentative
|
|
564
|
-
{ date: "2026-04-14", name: "Dr. Ambedkar Jayanti", type: "national" },
|
|
565
|
-
{ date: "2026-08-15", name: "Independence Day", type: "national" },
|
|
566
|
-
{ date: "2026-10-02", name: "Gandhi Jayanti", type: "national" },
|
|
567
|
-
{ date: "2026-10-20", name: "Dussehra", type: "national" },
|
|
568
|
-
// Tentative
|
|
569
|
-
{ date: "2026-11-08", name: "Diwali", type: "national" },
|
|
570
|
-
// Tentative
|
|
571
|
-
{ date: "2026-12-25", name: "Christmas", type: "national" }
|
|
572
|
-
], we = [
|
|
573
|
-
// Republic Day Weekend (Jan 24-26)
|
|
574
|
-
{ date: "2026-01-24", name: "Long Weekend: Trip to Jaipur?", type: "long-weekend" },
|
|
575
|
-
{ date: "2026-01-25", name: "Long Weekend: Fort Visit", type: "long-weekend" },
|
|
576
|
-
{ date: "2026-01-26", name: "Republic Day", type: "long-weekend" },
|
|
577
|
-
// Holi Weekend (Mar 19-22 - Take Friday off)
|
|
578
|
-
{ date: "2026-03-19", name: "Holi Celebration", type: "long-weekend" },
|
|
579
|
-
{ date: "2026-03-20", name: "Take a leave! Beach time?", type: "long-weekend" },
|
|
580
|
-
{ date: "2026-03-21", name: "Relaxing Saturday", type: "long-weekend" },
|
|
581
|
-
{ date: "2026-03-22", name: "Lazy Sunday", type: "long-weekend" },
|
|
582
|
-
// Independence Day Weekend (Aug 15-17)
|
|
583
|
-
{ date: "2026-08-15", name: "Independence Day", type: "long-weekend" },
|
|
584
|
-
{ date: "2026-08-16", name: "Sunday Brunch", type: "long-weekend" },
|
|
585
|
-
{ date: "2026-08-17", name: "Take a leave? Hills calling!", type: "long-weekend" },
|
|
586
|
-
// Monday leave suggestion
|
|
587
|
-
// Diwali Weekend (Nov 7-9)
|
|
588
|
-
{ date: "2026-11-07", name: "Choti Diwali", type: "long-weekend" },
|
|
589
|
-
{ date: "2026-11-08", name: "Diwali", type: "long-weekend" },
|
|
590
|
-
{ date: "2026-11-09", name: "Govardhan Puja (Take leave)", type: "long-weekend" }
|
|
591
|
-
];
|
|
621
|
+
};
|
|
592
622
|
export {
|
|
593
623
|
X as COMMON_TIMEZONES,
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
624
|
+
ye as DEFAULT_HOLIDAYS_TIMEZONE,
|
|
625
|
+
be as DEFAULT_TIMEZONE,
|
|
626
|
+
$e as DateTimePicker,
|
|
627
|
+
pe as INDIAN_HOLIDAYS_2026,
|
|
628
|
+
Me as LONG_WEEKENDS_2026,
|
|
629
|
+
Z as convertToTimezone,
|
|
630
|
+
ve as getDefaultHolidaysForTimezone,
|
|
631
|
+
U as nowInTimezone
|
|
600
632
|
};
|