@theengineerguy/chronos-picker 1.0.7 → 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 CHANGED
@@ -1,7 +1,7 @@
1
- import { jsxs as h, jsx as a } from "react/jsx-runtime";
2
- import { useMemo as j, useState as $, useEffect as G, useRef as Q, useCallback as H } from "react";
3
- import { DateTime as w } from "luxon";
4
- const pe = "Asia/Kolkata", ye = [
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
5
  // --- 2026 National Holidays (India) ---
6
6
  { date: "2026-01-26", name: "Republic Day", type: "national" },
7
7
  { date: "2026-03-19", name: "Holi", type: "national" },
@@ -34,10 +34,10 @@ const pe = "Asia/Kolkata", ye = [
34
34
  { date: "2026-11-08", name: "Diwali", type: "long-weekend" },
35
35
  { date: "2026-11-09", name: "Govardhan Puja (Take leave)", type: "long-weekend" }
36
36
  ];
37
- function be(e) {
38
- return e === pe ? [...ye, ...Me] : [];
37
+ function ve(e) {
38
+ return e === ye ? [...pe, ...Me] : [];
39
39
  }
40
- const ke = "Asia/Kolkata", X = [
40
+ const be = "Asia/Kolkata", X = [
41
41
  { value: "Asia/Kolkata", label: "India (IST)" },
42
42
  { value: "America/New_York", label: "Eastern Time (ET)" },
43
43
  { value: "America/Chicago", label: "Central Time (CT)" },
@@ -51,207 +51,231 @@ const ke = "Asia/Kolkata", X = [
51
51
  { value: "Australia/Sydney", label: "Sydney (AEDT)" },
52
52
  { value: "UTC", label: "UTC" }
53
53
  ];
54
- function _(e, i) {
55
- return w.isDateTime(e) ? e.setZone(i) : typeof e == "string" ? w.fromISO(e, { zone: i }) : w.fromJSDate(e, { zone: i });
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 });
56
56
  }
57
57
  function U(e) {
58
- return w.now().setZone(e);
58
+ return k.now().setZone(e);
59
59
  }
60
60
  function V(e) {
61
- const s = w.now().setZone(e).offset, r = Math.floor(Math.abs(s) / 60), l = Math.abs(s) % 60;
62
- return `UTC${s >= 0 ? "+" : "-"}${r}${l > 0 ? `:${l.toString().padStart(2, "0")}` : ""}`;
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")}` : ""}`;
63
63
  }
64
- function ve(e, i, s, r, l, k, c, y, v) {
65
- const M = w.fromObject(
66
- { year: e, month: i, day: 1 },
64
+ function ge(e, o, s, i, c, v, d, h, N) {
65
+ const f = k.fromObject(
66
+ { year: e, month: o, day: 1 },
67
67
  { zone: s }
68
- ), E = M.startOf("week"), R = M.endOf("month").endOf("week"), P = w.now().setZone(s).startOf("day"), L = c != null && y != null, A = c == null ? void 0 : c.startOf("day"), C = y == null ? void 0 : y.endOf("day"), n = /* @__PURE__ */ new Map();
69
- v && v.forEach((N) => {
70
- let d;
71
- w.isDateTime(N.date) ? d = N.date.setZone(s) : typeof N.date == "string" ? d = w.fromISO(N.date, { zone: s }) : d = w.fromJSDate(N.date, { zone: s }), n.set(d.toISODate() || "", { name: N.name, type: N.type || "national" });
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" });
72
72
  });
73
- const u = [];
74
- let x = [], b = E;
75
- for (; b <= R; ) {
76
- const N = b.month === i, d = b.hasSame(P, "day"), o = b.startOf("day"), f = b.toISODate() || "";
77
- let t = !1, D = !1, g = !1, W = !1;
78
- L && A && C ? (g = o.hasSame(A, "day"), W = o.hasSame(C, "day"), D = o >= A && o <= C || g || W, t = g || W) : r && (t = b.hasSame(r, "day"));
79
- let S = !1;
80
- l && b < l.startOf("day") && (S = !0), k && b > k.endOf("day") && (S = !0);
81
- const K = n.get(f);
82
- x.push({
83
- date: b,
84
- isCurrentMonth: N,
85
- isToday: d,
86
- isSelected: t,
87
- isDisabled: S,
88
- isInRange: D,
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
89
  isRangeStart: g,
90
- isRangeEnd: W,
91
- holiday: K ? { date: b, ...K } : void 0
92
- }), x.length === 7 && (u.push(x), x = []), b = b.plus({ days: 1 });
90
+ isRangeEnd: $,
91
+ holiday: B ? { date: S, ...B } : void 0
92
+ }), _.length === 7 && (p.push(_), _ = []), S = S.plus({ days: 1 });
93
93
  }
94
- return u;
94
+ return p;
95
95
  }
96
- function ge() {
97
- const e = w.now().startOf("week"), i = [];
96
+ function ke() {
97
+ const e = k.now().startOf("week"), o = [];
98
98
  for (let s = 0; s < 7; s++) {
99
- const r = e.plus({ days: s });
100
- i.push(r.toFormat("ccc"));
99
+ const i = e.plus({ days: s });
100
+ o.push(i.toFormat("ccc"));
101
101
  }
102
- return i;
102
+ return o;
103
103
  }
104
104
  function Ne() {
105
105
  const e = [];
106
- for (let i = 1; i <= 12; i++) {
107
- const s = w.fromObject({ month: i });
106
+ for (let o = 1; o <= 12; o++) {
107
+ const s = k.fromObject({ month: o });
108
108
  e.push(s.toFormat("MMMM"));
109
109
  }
110
110
  return e;
111
111
  }
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
+ }
112
126
  const Te = ({
113
127
  viewDate: e,
114
- selectedDate: i,
128
+ selectedDate: o,
115
129
  onDateSelect: s,
116
- onViewDateChange: r,
117
- timezone: l,
118
- minDate: k,
119
- maxDate: c,
120
- selectedStart: y,
121
- selectedEnd: v,
122
- onRangeSelect: M,
123
- holidays: E
130
+ onViewDateChange: i,
131
+ timezone: c,
132
+ minDate: v,
133
+ maxDate: d,
134
+ selectedStart: h,
135
+ selectedEnd: N,
136
+ onRangeSelect: f,
137
+ holidays: T
124
138
  }) => {
125
- const z = M != null, R = j(() => ve(
139
+ const b = f != null, I = Y(() => ge(
126
140
  e.year,
127
141
  e.month,
128
- l,
129
- i ?? void 0,
130
- k,
131
142
  c,
132
- y ?? void 0,
133
- v ?? void 0,
134
- E
135
- ), [e, i, l, k, c, y, v, E]), P = j(() => ge(), []), L = j(() => Ne(), []), A = () => {
136
- r(e.minus({ months: 1 }));
137
- }, C = () => {
138
- r(e.plus({ months: 1 }));
139
- }, n = (o) => {
140
- const f = parseInt(o.target.value, 10);
141
- r(e.set({ month: f }));
142
- }, u = (o) => {
143
- const f = parseInt(o.target.value, 10);
144
- r(e.set({ year: f }));
145
- }, x = (o, f) => {
146
- if (!f)
147
- if (z && M) {
148
- const t = o.startOf("day");
149
- if (y == null)
150
- M(o, o);
151
- else if (v != null && y.hasSame(v, "day")) {
152
- const D = y.startOf("day");
153
- t < D ? M(o, y) : M(y, o);
143
+ o ?? void 0,
144
+ v,
145
+ d,
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);
154
171
  } else
155
- M(o, o);
172
+ f(a, a);
156
173
  } else
157
- s(o);
158
- }, b = (o, f, t) => {
159
- (o.key === "Enter" || o.key === " ") && (o.preventDefault(), x(f, t));
160
- }, N = e.year, d = Array.from({ length: 21 }, (o, f) => N - 10 + f);
161
- return /* @__PURE__ */ h("div", { className: "chronos-calendar", role: "region", "aria-label": "Calendar", children: [
162
- /* @__PURE__ */ h("div", { className: "chronos-calendar-header", children: [
163
- /* @__PURE__ */ a(
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(
164
181
  "button",
165
182
  {
166
183
  type: "button",
167
184
  className: "chronos-nav-button",
168
- onClick: A,
185
+ onClick: R,
169
186
  "aria-label": "Previous month",
170
187
  children: "‹"
171
188
  }
172
189
  ),
173
- /* @__PURE__ */ h("div", { className: "chronos-month-year-selectors", children: [
174
- /* @__PURE__ */ a(
190
+ /* @__PURE__ */ m("div", { className: "chronos-month-year-selectors", children: [
191
+ /* @__PURE__ */ n(
175
192
  "select",
176
193
  {
177
194
  className: "chronos-month-select",
178
195
  value: e.month,
179
- onChange: n,
196
+ onChange: p,
180
197
  "aria-label": "Select month",
181
- children: L.map((o, f) => /* @__PURE__ */ a("option", { value: f + 1, children: o }, f))
198
+ children: L.map((a, l) => /* @__PURE__ */ n("option", { value: l + 1, children: a }, l))
182
199
  }
183
200
  ),
184
- /* @__PURE__ */ a(
201
+ /* @__PURE__ */ n(
185
202
  "select",
186
203
  {
187
204
  className: "chronos-year-select",
188
205
  value: e.year,
189
- onChange: u,
206
+ onChange: _,
190
207
  "aria-label": "Select year",
191
- children: d.map((o) => /* @__PURE__ */ a("option", { value: o, children: o }, o))
208
+ children: O.map((a) => /* @__PURE__ */ n("option", { value: a, children: a }, a))
192
209
  }
193
210
  )
194
211
  ] }),
195
- /* @__PURE__ */ a(
212
+ /* @__PURE__ */ n(
196
213
  "button",
197
214
  {
198
215
  type: "button",
199
216
  className: "chronos-nav-button",
200
- onClick: C,
217
+ onClick: t,
201
218
  "aria-label": "Next month",
202
219
  children: "›"
203
220
  }
204
221
  )
205
222
  ] }),
206
- /* @__PURE__ */ h("div", { className: "chronos-calendar-grid", children: [
207
- /* @__PURE__ */ a("div", { className: "chronos-weekday-row", children: P.map((o) => /* @__PURE__ */ a("div", { className: "chronos-weekday", children: o }, o)) }),
208
- R.map((o, f) => /* @__PURE__ */ a("div", { className: "chronos-week-row", children: o.map((t, D) => /* @__PURE__ */ h(
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(
209
226
  "button",
210
227
  {
211
228
  type: "button",
212
- className: `chronos-day ${t.isSelected ? "selected" : ""} ${t.isToday ? "today" : ""} ${t.isCurrentMonth ? "" : "other-month"} ${t.isDisabled ? "disabled" : ""} ${t.isInRange ? "in-range" : ""} ${t.isRangeStart ? "range-start" : ""} ${t.isRangeEnd ? "range-end" : ""} ${t.holiday ? `holiday ${t.holiday.type}` : ""}`,
213
- onClick: () => x(t.date, t.isDisabled),
214
- onKeyDown: (g) => b(g, t.date, t.isDisabled),
215
- disabled: t.isDisabled,
216
- "aria-label": `${t.date.toFormat("MMMM d, yyyy")}${t.holiday ? `, ${t.holiday.name}` : ""}`,
217
- "aria-selected": t.isSelected,
218
- "aria-current": t.isToday ? "date" : void 0,
219
- title: t.holiday ? t.holiday.name : void 0,
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,
220
237
  children: [
221
- t.date.day,
222
- t.holiday && /* @__PURE__ */ a("span", { className: "chronos-holiday-dot" })
238
+ r.date.day,
239
+ r.holiday && /* @__PURE__ */ n("span", { className: "chronos-holiday-dot" })
223
240
  ]
224
241
  },
225
- D
226
- )) }, f))
227
- ] })
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
+ }) })
228
252
  ] });
229
- }, we = ({
253
+ }, Oe = ({
230
254
  value: e,
231
- onChange: i,
255
+ onChange: o,
232
256
  use24Hour: s
233
257
  }) => {
234
- const [r, l] = $((e == null ? void 0 : e.hour) ?? 12), [k, c] = $((e == null ? void 0 : e.minute) ?? 0), [y, v] = $(
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(
235
259
  e && e.hour >= 12 ? "PM" : "AM"
236
260
  );
237
- G(() => {
238
- e && (l(e.hour), c(e.minute), v(e.hour >= 12 ? "PM" : "AM"));
261
+ J(() => {
262
+ e && (c(e.hour), d(e.minute), N(e.hour >= 12 ? "PM" : "AM"));
239
263
  }, [e]);
240
- const M = (n) => {
241
- l(n);
242
- let u = n;
243
- s || (y === "PM" && n !== 12 ? u = n + 12 : y === "AM" && n === 12 && (u = 0)), i(u, k);
244
- }, E = (n) => {
245
- c(n), i(r, n);
246
- }, z = () => {
247
- const n = y === "AM" ? "PM" : "AM";
248
- v(n);
249
- let u = r;
250
- n === "PM" && r !== 12 ? u = r + 12 : n === "AM" && r === 12 ? u = 0 : n === "AM" && r > 12 && (u = r - 12), i(u, k);
251
- }, R = s ? r : r % 12 || 12, P = s ? 23 : 12, L = s ? 0 : 1, A = Array.from({ length: P - L + 1 }, (n, u) => L + u), C = Array.from({ length: 60 }, (n, u) => u);
252
- return /* @__PURE__ */ h("div", { className: "chronos-time-picker", role: "group", "aria-label": "Time picker", children: [
253
- /* @__PURE__ */ h("div", { className: "chronos-time-header", children: [
254
- /* @__PURE__ */ h(
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(
255
279
  "svg",
256
280
  {
257
281
  className: "chronos-clock-icon",
@@ -261,67 +285,67 @@ const Te = ({
261
285
  stroke: "currentColor",
262
286
  strokeWidth: "2",
263
287
  children: [
264
- /* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
265
- /* @__PURE__ */ a("polyline", { points: "12 6 12 12 16 14" })
288
+ /* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "10" }),
289
+ /* @__PURE__ */ n("polyline", { points: "12 6 12 12 16 14" })
266
290
  ]
267
291
  }
268
292
  ),
269
- /* @__PURE__ */ a("span", { children: "Time" })
293
+ /* @__PURE__ */ n("span", { children: "Time" })
270
294
  ] }),
271
- /* @__PURE__ */ h("div", { className: "chronos-time-controls", children: [
272
- /* @__PURE__ */ h("div", { className: "chronos-time-input-group", children: [
273
- /* @__PURE__ */ a("label", { htmlFor: "chronos-hour-select", className: "chronos-time-label", children: "Hour" }),
274
- /* @__PURE__ */ a(
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(
275
299
  "select",
276
300
  {
277
301
  id: "chronos-hour-select",
278
302
  className: "chronos-time-select",
279
- value: R,
280
- onChange: (n) => M(parseInt(n.target.value, 10)),
303
+ value: I,
304
+ onChange: (t) => f(parseInt(t.target.value, 10)),
281
305
  "aria-label": "Select hour",
282
- children: A.map((n) => /* @__PURE__ */ a("option", { value: n, children: n.toString().padStart(2, "0") }, n))
306
+ children: L.map((t) => /* @__PURE__ */ n("option", { value: t, children: t.toString().padStart(2, "0") }, t))
283
307
  }
284
308
  )
285
309
  ] }),
286
- /* @__PURE__ */ a("span", { className: "chronos-time-separator", children: ":" }),
287
- /* @__PURE__ */ h("div", { className: "chronos-time-input-group", children: [
288
- /* @__PURE__ */ a("label", { htmlFor: "chronos-minute-select", className: "chronos-time-label", children: "Minute" }),
289
- /* @__PURE__ */ a(
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(
290
314
  "select",
291
315
  {
292
316
  id: "chronos-minute-select",
293
317
  className: "chronos-time-select",
294
- value: k,
295
- onChange: (n) => E(parseInt(n.target.value, 10)),
318
+ value: v,
319
+ onChange: (t) => T(parseInt(t.target.value, 10)),
296
320
  "aria-label": "Select minute",
297
- children: C.map((n) => /* @__PURE__ */ a("option", { value: n, children: n.toString().padStart(2, "0") }, n))
321
+ children: R.map((t) => /* @__PURE__ */ n("option", { value: t, children: t.toString().padStart(2, "0") }, t))
298
322
  }
299
323
  )
300
324
  ] }),
301
- !s && /* @__PURE__ */ a(
325
+ !s && /* @__PURE__ */ n(
302
326
  "button",
303
327
  {
304
328
  type: "button",
305
329
  className: "chronos-period-toggle",
306
- onClick: z,
307
- "aria-label": `Switch to ${y === "AM" ? "PM" : "AM"}`,
308
- children: y
330
+ onClick: b,
331
+ "aria-label": `Switch to ${h === "AM" ? "PM" : "AM"}`,
332
+ children: h
309
333
  }
310
334
  )
311
335
  ] })
312
336
  ] });
313
337
  }, De = ({
314
338
  value: e,
315
- onChange: i
339
+ onChange: o
316
340
  }) => {
317
- const [s, r] = $(!1), l = X.find((c) => c.value === e) || {
341
+ const [s, i] = E(!1), c = X.find((d) => d.value === e) || {
318
342
  label: e
319
- }, k = (c) => {
320
- i(c), r(!1);
343
+ }, v = (d) => {
344
+ o(d), i(!1);
321
345
  };
322
- return /* @__PURE__ */ h("div", { className: "chronos-timezone-selector", children: [
323
- /* @__PURE__ */ h("div", { className: "chronos-timezone-header", children: [
324
- /* @__PURE__ */ h(
346
+ return /* @__PURE__ */ m("div", { className: "chronos-timezone-selector", children: [
347
+ /* @__PURE__ */ m("div", { className: "chronos-timezone-header", children: [
348
+ /* @__PURE__ */ m(
325
349
  "svg",
326
350
  {
327
351
  className: "chronos-globe-icon",
@@ -331,26 +355,26 @@ const Te = ({
331
355
  stroke: "currentColor",
332
356
  strokeWidth: "2",
333
357
  children: [
334
- /* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
335
- /* @__PURE__ */ a("line", { x1: "2", y1: "12", x2: "22", y2: "12" }),
336
- /* @__PURE__ */ a("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" })
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" })
337
361
  ]
338
362
  }
339
363
  ),
340
- /* @__PURE__ */ a("span", { children: "Timezone" })
364
+ /* @__PURE__ */ n("span", { children: "Timezone" })
341
365
  ] }),
342
- /* @__PURE__ */ h(
366
+ /* @__PURE__ */ m(
343
367
  "button",
344
368
  {
345
369
  type: "button",
346
370
  className: "chronos-timezone-button",
347
- onClick: () => r(!s),
371
+ onClick: () => i(!s),
348
372
  "aria-expanded": s,
349
373
  "aria-label": "Select timezone",
350
374
  children: [
351
- /* @__PURE__ */ a("span", { className: "chronos-timezone-label", children: l.label }),
352
- /* @__PURE__ */ a("span", { className: "chronos-timezone-offset", children: V(e) }),
353
- /* @__PURE__ */ a(
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(
354
378
  "svg",
355
379
  {
356
380
  className: `chronos-chevron ${s ? "expanded" : ""}`,
@@ -359,162 +383,162 @@ const Te = ({
359
383
  fill: "none",
360
384
  stroke: "currentColor",
361
385
  strokeWidth: "2",
362
- children: /* @__PURE__ */ a("polyline", { points: "6 9 12 15 18 9" })
386
+ children: /* @__PURE__ */ n("polyline", { points: "6 9 12 15 18 9" })
363
387
  }
364
388
  )
365
389
  ]
366
390
  }
367
391
  ),
368
- s && /* @__PURE__ */ a("div", { className: "chronos-timezone-list", role: "listbox", children: X.map((c) => /* @__PURE__ */ h(
392
+ s && /* @__PURE__ */ n("div", { className: "chronos-timezone-list", role: "listbox", children: X.map((d) => /* @__PURE__ */ m(
369
393
  "button",
370
394
  {
371
395
  type: "button",
372
- className: `chronos-timezone-option ${c.value === e ? "selected" : ""}`,
373
- onClick: () => k(c.value),
396
+ className: `chronos-timezone-option ${d.value === e ? "selected" : ""}`,
397
+ onClick: () => v(d.value),
374
398
  role: "option",
375
- "aria-selected": c.value === e,
399
+ "aria-selected": d.value === e,
376
400
  children: [
377
- /* @__PURE__ */ a("span", { className: "chronos-timezone-option-label", children: c.label }),
378
- /* @__PURE__ */ a("span", { className: "chronos-timezone-option-offset", children: V(c.value) })
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) })
379
403
  ]
380
404
  },
381
- c.value
405
+ d.value
382
406
  )) })
383
407
  ] });
384
408
  };
385
- function ee(e, i, s) {
409
+ function ee(e, o, s) {
386
410
  return {
387
411
  iso: e.toISO() || "",
388
- formatted: e.toFormat(`${i} ${s}`),
412
+ formatted: e.toFormat(`${o} ${s}`),
389
413
  timestamp: e.toMillis(),
390
414
  dateTime: e
391
415
  };
392
416
  }
393
417
  const $e = ({
394
418
  value: e,
395
- onChange: i,
396
- timezone: s = ke,
397
- dateFormat: r = "DD",
398
- timeFormat: l = "HH:mm",
399
- minDate: k,
400
- maxDate: c,
401
- placeholder: y = "Select date and time",
402
- disabled: v = !1,
403
- showTime: M = !0,
404
- use24Hour: E = !0,
405
- className: z = "",
406
- ariaLabel: R = "Date and time picker",
407
- showTimezoneSelector: P = !1,
408
- theme: L = "light",
409
- orientation: A = "portrait",
410
- selectionMode: C = "single",
411
- rangeValue: n,
412
- onRangeChange: u,
413
- holidays: x,
414
- customHolidays: b,
415
- showHolidays: N = !0
419
+ onChange: o,
420
+ timezone: s = be,
421
+ dateFormat: i = "DD",
422
+ timeFormat: c = "HH:mm",
423
+ minDate: v,
424
+ maxDate: d,
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,
432
+ theme: P = "light",
433
+ orientation: L = "portrait",
434
+ selectionMode: R = "single",
435
+ rangeValue: t,
436
+ onRangeChange: p,
437
+ holidays: _,
438
+ customHolidays: S,
439
+ showHolidays: D = !0
416
440
  }) => {
417
- const d = C === "range", [o, f] = $(!1), [t, D] = $(() => !d && e ? _(e, s) : null), [g, W] = $(() => d && (n != null && n.start) ? _(n.start, s) : null), [S, K] = $(() => d && (n != null && n.end) ? _(n.end, s) : null), [T, ne] = $(s), [te, B] = $(() => t || g || S || U(s)), J = Q(null), q = Q(null);
418
- G(() => {
419
- !d && e && D(_(e, T));
420
- }, [e, T, d]), G(() => {
421
- d && (n == null ? void 0 : n.start) != null && (n == null ? void 0 : n.end) != null && (W(_(n.start, T)), K(_(n.end, T)));
422
- }, [d, n, T]), G(() => {
423
- const p = (m) => {
424
- J.current && !J.current.contains(m.target) && f(!1);
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);
425
449
  };
426
- if (o)
427
- return document.addEventListener("mousedown", p), () => document.removeEventListener("mousedown", p);
428
- }, [o]), G(() => {
429
- const p = (m) => {
430
- var O;
431
- m.key === "Escape" && o && (f(!1), (O = q.current) == null || O.focus());
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());
432
456
  };
433
- return document.addEventListener("keydown", p), () => document.removeEventListener("keydown", p);
434
- }, [o]);
435
- const oe = H((p) => {
436
- let m = p;
437
- if (t && (m = p.set({
438
- hour: t.hour,
439
- minute: t.minute,
440
- second: t.second
441
- })), D(m), B(m), M || f(!1), i) {
442
- const O = {
443
- iso: m.toISO() || "",
444
- formatted: m.toFormat(`${r} ${l}`),
445
- timestamp: m.toMillis(),
446
- dateTime: m
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
447
471
  };
448
- i(O);
472
+ o(C);
449
473
  }
450
- }, [t, M, i, r, l]), ae = H((p, m) => {
451
- const I = (t || U(T)).set({ hour: p, minute: m, second: 0 });
452
- if (D(I), i) {
453
- const Z = {
454
- iso: I.toISO() || "",
455
- formatted: I.toFormat(`${r} ${l}`),
456
- timestamp: I.toMillis(),
457
- dateTime: I
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) {
477
+ const z = {
478
+ iso: W.toISO() || "",
479
+ formatted: W.toFormat(`${i} ${c}`),
480
+ timestamp: W.toMillis(),
481
+ dateTime: W
458
482
  };
459
- i(Z);
483
+ o(z);
460
484
  }
461
- }, [t, T, i, r, l]), se = H((p, m) => {
462
- const O = p.startOf("day"), I = m.startOf("day"), [Z, Y] = O <= I ? [O, I] : [I, O];
463
- if (W(Z), K(Y), B(Z), u) {
464
- const me = ee(Z, r, l), ue = ee(Y, r, l), fe = Math.max(0, Math.ceil(Y.diff(Z, "days").days));
465
- u({ start: me, end: ue, nights: fe });
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 });
466
490
  }
467
- }, [u, r, l]), ie = H((p) => {
468
- if (ne(p), t) {
469
- const m = t.setZone(p);
470
- if (D(m), B(m), i) {
471
- const O = {
472
- iso: m.toISO() || "",
473
- formatted: m.toFormat(`${r} ${l}`),
474
- timestamp: m.toMillis(),
475
- dateTime: m
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
476
500
  };
477
- i(O);
501
+ o(C);
478
502
  }
479
503
  } else
480
- B(U(p));
481
- }, [t, i, r, l]), F = () => {
482
- v || f(!o);
483
- }, re = (p) => {
484
- (p.key === "Enter" || p.key === " ") && (p.preventDefault(), F());
485
- }, le = d ? g && S ? `${g.toFormat("d MMM yyyy")} – ${S.toFormat("d MMM yyyy")}` : "" : t ? t.toFormat(`${r} ${M ? l : ""}`) : "", ce = k ? _(k, T) : void 0, de = c ? _(c, T) : void 0, he = x !== void 0 ? x : N ? [...be(T), ...b ?? []] : b ?? [];
486
- return /* @__PURE__ */ h(
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(
487
511
  "div",
488
512
  {
489
- ref: J,
490
- className: `chronos-picker ${z}`,
491
- "data-disabled": v,
492
- "data-theme": L,
513
+ ref: G,
514
+ className: `chronos-picker ${b}`,
515
+ "data-disabled": N,
516
+ "data-theme": P,
493
517
  children: [
494
- /* @__PURE__ */ h(
518
+ /* @__PURE__ */ m(
495
519
  "div",
496
520
  {
497
521
  className: "chronos-input-wrapper",
498
- onClick: F,
522
+ onClick: q,
499
523
  children: [
500
- /* @__PURE__ */ a(
524
+ /* @__PURE__ */ n(
501
525
  "input",
502
526
  {
503
- ref: q,
527
+ ref: F,
504
528
  type: "text",
505
529
  className: "chronos-input",
506
530
  value: le,
507
- placeholder: y,
531
+ placeholder: h,
508
532
  readOnly: !0,
509
- disabled: v,
510
- onKeyDown: re,
511
- "aria-label": R,
512
- "aria-expanded": o,
533
+ disabled: N,
534
+ onKeyDown: ie,
535
+ "aria-label": I,
536
+ "aria-expanded": O,
513
537
  "aria-haspopup": "dialog",
514
538
  role: "combobox"
515
539
  }
516
540
  ),
517
- /* @__PURE__ */ h(
541
+ /* @__PURE__ */ m(
518
542
  "svg",
519
543
  {
520
544
  className: "chronos-calendar-icon",
@@ -524,67 +548,67 @@ const $e = ({
524
548
  stroke: "currentColor",
525
549
  strokeWidth: "2",
526
550
  children: [
527
- /* @__PURE__ */ a("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }),
528
- /* @__PURE__ */ a("line", { x1: "16", y1: "2", x2: "16", y2: "6" }),
529
- /* @__PURE__ */ a("line", { x1: "8", y1: "2", x2: "8", y2: "6" }),
530
- /* @__PURE__ */ a("line", { x1: "3", y1: "10", x2: "21", y2: "10" })
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" })
531
555
  ]
532
556
  }
533
557
  )
534
558
  ]
535
559
  }
536
560
  ),
537
- o && /* @__PURE__ */ a(
561
+ O && /* @__PURE__ */ n(
538
562
  "div",
539
563
  {
540
564
  className: "chronos-dropdown",
541
- "data-orientation": A,
542
- "data-range-mode": d,
565
+ "data-orientation": L,
566
+ "data-range-mode": u,
543
567
  role: "dialog",
544
568
  "aria-label": "Date and time picker dialog",
545
- children: /* @__PURE__ */ h("div", { className: "chronos-dropdown-content", children: [
546
- d && g && S && /* @__PURE__ */ h("div", { className: "chronos-range-summary", children: [
547
- /* @__PURE__ */ h("div", { className: "chronos-range-nights", children: [
548
- Math.max(0, Math.ceil(S.diff(g, "days").days)),
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)),
549
573
  " nights"
550
574
  ] }),
551
- /* @__PURE__ */ h("div", { className: "chronos-range-dates", children: [
575
+ /* @__PURE__ */ m("div", { className: "chronos-range-dates", children: [
552
576
  g.toFormat("d MMM yyyy"),
553
577
  " – ",
554
- S.toFormat("d MMM yyyy")
578
+ A.toFormat("d MMM yyyy")
555
579
  ] })
556
580
  ] }),
557
- /* @__PURE__ */ a(
581
+ /* @__PURE__ */ n(
558
582
  Te,
559
583
  {
560
- viewDate: te,
561
- selectedDate: d ? null : t,
584
+ viewDate: ne,
585
+ selectedDate: u ? null : l,
562
586
  onDateSelect: oe,
563
- onViewDateChange: B,
564
- timezone: T,
587
+ onViewDateChange: K,
588
+ timezone: w,
565
589
  minDate: ce,
566
590
  maxDate: de,
567
- selectedStart: d ? g : void 0,
568
- selectedEnd: d ? S : void 0,
569
- onRangeSelect: d ? se : void 0,
591
+ selectedStart: u ? g : void 0,
592
+ selectedEnd: u ? A : void 0,
593
+ onRangeSelect: u ? se : void 0,
570
594
  holidays: he
571
595
  }
572
596
  ),
573
- !d && (M || P) && /* @__PURE__ */ h("div", { className: "chronos-sidebar", children: [
574
- M && /* @__PURE__ */ a(
575
- we,
597
+ !u && (f || x) && /* @__PURE__ */ m("div", { className: "chronos-sidebar", children: [
598
+ f && /* @__PURE__ */ n(
599
+ Oe,
576
600
  {
577
- value: t,
601
+ value: l,
578
602
  onChange: ae,
579
- use24Hour: E,
580
- timezone: T
603
+ use24Hour: T,
604
+ timezone: w
581
605
  }
582
606
  ),
583
- P && /* @__PURE__ */ a(
607
+ x && /* @__PURE__ */ n(
584
608
  De,
585
609
  {
586
- value: T,
587
- onChange: ie
610
+ value: w,
611
+ onChange: re
588
612
  }
589
613
  )
590
614
  ] })
@@ -597,12 +621,12 @@ const $e = ({
597
621
  };
598
622
  export {
599
623
  X as COMMON_TIMEZONES,
600
- pe as DEFAULT_HOLIDAYS_TIMEZONE,
601
- ke as DEFAULT_TIMEZONE,
624
+ ye as DEFAULT_HOLIDAYS_TIMEZONE,
625
+ be as DEFAULT_TIMEZONE,
602
626
  $e as DateTimePicker,
603
- ye as INDIAN_HOLIDAYS_2026,
627
+ pe as INDIAN_HOLIDAYS_2026,
604
628
  Me as LONG_WEEKENDS_2026,
605
- _ as convertToTimezone,
606
- be as getDefaultHolidaysForTimezone,
629
+ Z as convertToTimezone,
630
+ ve as getDefaultHolidaysForTimezone,
607
631
  U as nowInTimezone
608
632
  };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- (function(M,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react"),require("luxon")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","luxon"],e):(M=typeof globalThis<"u"?globalThis:M||self,e(M.ChronosPicker={},M.jsxRuntime,M.React,M.luxon))})(this,function(M,e,i,S){"use strict";const J="Asia/Kolkata",q=[{date:"2026-01-26",name:"Republic Day",type:"national"},{date:"2026-03-19",name:"Holi",type:"national"},{date:"2026-04-14",name:"Dr. Ambedkar Jayanti",type:"national"},{date:"2026-08-15",name:"Independence Day",type:"national"},{date:"2026-10-02",name:"Gandhi Jayanti",type:"national"},{date:"2026-10-20",name:"Dussehra",type:"national"},{date:"2026-11-08",name:"Diwali",type:"national"},{date:"2026-12-25",name:"Christmas",type:"national"}],F=[{date:"2026-01-24",name:"Long Weekend: Trip to Jaipur?",type:"long-weekend"},{date:"2026-01-25",name:"Long Weekend: Fort Visit",type:"long-weekend"},{date:"2026-01-26",name:"Republic Day",type:"long-weekend"},{date:"2026-03-19",name:"Holi Celebration",type:"long-weekend"},{date:"2026-03-20",name:"Take a leave! Beach time?",type:"long-weekend"},{date:"2026-03-21",name:"Relaxing Saturday",type:"long-weekend"},{date:"2026-03-22",name:"Lazy Sunday",type:"long-weekend"},{date:"2026-08-15",name:"Independence Day",type:"long-weekend"},{date:"2026-08-16",name:"Sunday Brunch",type:"long-weekend"},{date:"2026-08-17",name:"Take a leave? Hills calling!",type:"long-weekend"},{date:"2026-11-07",name:"Choti Diwali",type:"long-weekend"},{date:"2026-11-08",name:"Diwali",type:"long-weekend"},{date:"2026-11-09",name:"Govardhan Puja (Take leave)",type:"long-weekend"}];function Q(n){return n===J?[...q,...F]:[]}const X="Asia/Kolkata",B=[{value:"Asia/Kolkata",label:"India (IST)"},{value:"America/New_York",label:"Eastern Time (ET)"},{value:"America/Chicago",label:"Central Time (CT)"},{value:"America/Denver",label:"Mountain Time (MT)"},{value:"America/Los_Angeles",label:"Pacific Time (PT)"},{value:"Europe/London",label:"London (GMT/BST)"},{value:"Europe/Paris",label:"Central Europe (CET)"},{value:"Asia/Dubai",label:"Dubai (GST)"},{value:"Asia/Singapore",label:"Singapore (SGT)"},{value:"Asia/Tokyo",label:"Tokyo (JST)"},{value:"Australia/Sydney",label:"Sydney (AEDT)"},{value:"UTC",label:"UTC"}];function A(n,l){return S.DateTime.isDateTime(n)?n.setZone(l):typeof n=="string"?S.DateTime.fromISO(n,{zone:l}):S.DateTime.fromJSDate(n,{zone:l})}function Y(n){return S.DateTime.now().setZone(n)}function V(n){const a=S.DateTime.now().setZone(n).offset,r=Math.floor(Math.abs(a)/60),c=Math.abs(a)%60;return`UTC${a>=0?"+":"-"}${r}${c>0?`:${c.toString().padStart(2,"0")}`:""}`}function te(n,l,a,r,c,b,d,u,v){const T=S.DateTime.fromObject({year:n,month:l,day:1},{zone:a}),P=T.startOf("week"),z=T.endOf("month").endOf("week"),_=S.DateTime.now().setZone(a).startOf("day"),L=d!=null&&u!=null,C=d==null?void 0:d.startOf("day"),$=u==null?void 0:u.endOf("day"),t=new Map;v&&v.forEach(D=>{let h;S.DateTime.isDateTime(D.date)?h=D.date.setZone(a):typeof D.date=="string"?h=S.DateTime.fromISO(D.date,{zone:a}):h=S.DateTime.fromJSDate(D.date,{zone:a}),t.set(h.toISODate()||"",{name:D.name,type:D.type||"national"})});const m=[];let I=[],k=P;for(;k<=z;){const D=k.month===l,h=k.hasSame(_,"day"),s=k.startOf("day"),y=k.toISODate()||"";let o=!1,w=!1,N=!1,W=!1;L&&C&&$?(N=s.hasSame(C,"day"),W=s.hasSame($,"day"),w=s>=C&&s<=$||N||W,o=N||W):r&&(o=k.hasSame(r,"day"));let O=!1;c&&k<c.startOf("day")&&(O=!0),b&&k>b.endOf("day")&&(O=!0);const H=t.get(y);I.push({date:k,isCurrentMonth:D,isToday:h,isSelected:o,isDisabled:O,isInRange:w,isRangeStart:N,isRangeEnd:W,holiday:H?{date:k,...H}:void 0}),I.length===7&&(m.push(I),I=[]),k=k.plus({days:1})}return m}function oe(){const n=S.DateTime.now().startOf("week"),l=[];for(let a=0;a<7;a++){const r=n.plus({days:a});l.push(r.toFormat("ccc"))}return l}function se(){const n=[];for(let l=1;l<=12;l++){const a=S.DateTime.fromObject({month:l});n.push(a.toFormat("MMMM"))}return n}const ae=({viewDate:n,selectedDate:l,onDateSelect:a,onViewDateChange:r,timezone:c,minDate:b,maxDate:d,selectedStart:u,selectedEnd:v,onRangeSelect:T,holidays:P})=>{const Z=T!=null,z=i.useMemo(()=>te(n.year,n.month,c,l??void 0,b,d,u??void 0,v??void 0,P),[n,l,c,b,d,u,v,P]),_=i.useMemo(()=>oe(),[]),L=i.useMemo(()=>se(),[]),C=()=>{r(n.minus({months:1}))},$=()=>{r(n.plus({months:1}))},t=s=>{const y=parseInt(s.target.value,10);r(n.set({month:y}))},m=s=>{const y=parseInt(s.target.value,10);r(n.set({year:y}))},I=(s,y)=>{if(!y)if(Z&&T){const o=s.startOf("day");if(u==null)T(s,s);else if(v!=null&&u.hasSame(v,"day")){const w=u.startOf("day");o<w?T(s,u):T(u,s)}else T(s,s)}else a(s)},k=(s,y,o)=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),I(y,o))},D=n.year,h=Array.from({length:21},(s,y)=>D-10+y);return e.jsxs("div",{className:"chronos-calendar",role:"region","aria-label":"Calendar",children:[e.jsxs("div",{className:"chronos-calendar-header",children:[e.jsx("button",{type:"button",className:"chronos-nav-button",onClick:C,"aria-label":"Previous month",children:"‹"}),e.jsxs("div",{className:"chronos-month-year-selectors",children:[e.jsx("select",{className:"chronos-month-select",value:n.month,onChange:t,"aria-label":"Select month",children:L.map((s,y)=>e.jsx("option",{value:y+1,children:s},y))}),e.jsx("select",{className:"chronos-year-select",value:n.year,onChange:m,"aria-label":"Select year",children:h.map(s=>e.jsx("option",{value:s,children:s},s))})]}),e.jsx("button",{type:"button",className:"chronos-nav-button",onClick:$,"aria-label":"Next month",children:"›"})]}),e.jsxs("div",{className:"chronos-calendar-grid",children:[e.jsx("div",{className:"chronos-weekday-row",children:_.map(s=>e.jsx("div",{className:"chronos-weekday",children:s},s))}),z.map((s,y)=>e.jsx("div",{className:"chronos-week-row",children:s.map((o,w)=>e.jsxs("button",{type:"button",className:`chronos-day ${o.isSelected?"selected":""} ${o.isToday?"today":""} ${o.isCurrentMonth?"":"other-month"} ${o.isDisabled?"disabled":""} ${o.isInRange?"in-range":""} ${o.isRangeStart?"range-start":""} ${o.isRangeEnd?"range-end":""} ${o.holiday?`holiday ${o.holiday.type}`:""}`,onClick:()=>I(o.date,o.isDisabled),onKeyDown:N=>k(N,o.date,o.isDisabled),disabled:o.isDisabled,"aria-label":`${o.date.toFormat("MMMM d, yyyy")}${o.holiday?`, ${o.holiday.name}`:""}`,"aria-selected":o.isSelected,"aria-current":o.isToday?"date":void 0,title:o.holiday?o.holiday.name:void 0,children:[o.date.day,o.holiday&&e.jsx("span",{className:"chronos-holiday-dot"})]},w))},y))]})]})},le=({value:n,onChange:l,use24Hour:a})=>{const[r,c]=i.useState((n==null?void 0:n.hour)??12),[b,d]=i.useState((n==null?void 0:n.minute)??0),[u,v]=i.useState(n&&n.hour>=12?"PM":"AM");i.useEffect(()=>{n&&(c(n.hour),d(n.minute),v(n.hour>=12?"PM":"AM"))},[n]);const T=t=>{c(t);let m=t;a||(u==="PM"&&t!==12?m=t+12:u==="AM"&&t===12&&(m=0)),l(m,b)},P=t=>{d(t),l(r,t)},Z=()=>{const t=u==="AM"?"PM":"AM";v(t);let m=r;t==="PM"&&r!==12?m=r+12:t==="AM"&&r===12?m=0:t==="AM"&&r>12&&(m=r-12),l(m,b)},z=a?r:r%12||12,_=a?23:12,L=a?0:1,C=Array.from({length:_-L+1},(t,m)=>L+m),$=Array.from({length:60},(t,m)=>m);return e.jsxs("div",{className:"chronos-time-picker",role:"group","aria-label":"Time picker",children:[e.jsxs("div",{className:"chronos-time-header",children:[e.jsxs("svg",{className:"chronos-clock-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("polyline",{points:"12 6 12 12 16 14"})]}),e.jsx("span",{children:"Time"})]}),e.jsxs("div",{className:"chronos-time-controls",children:[e.jsxs("div",{className:"chronos-time-input-group",children:[e.jsx("label",{htmlFor:"chronos-hour-select",className:"chronos-time-label",children:"Hour"}),e.jsx("select",{id:"chronos-hour-select",className:"chronos-time-select",value:z,onChange:t=>T(parseInt(t.target.value,10)),"aria-label":"Select hour",children:C.map(t=>e.jsx("option",{value:t,children:t.toString().padStart(2,"0")},t))})]}),e.jsx("span",{className:"chronos-time-separator",children:":"}),e.jsxs("div",{className:"chronos-time-input-group",children:[e.jsx("label",{htmlFor:"chronos-minute-select",className:"chronos-time-label",children:"Minute"}),e.jsx("select",{id:"chronos-minute-select",className:"chronos-time-select",value:b,onChange:t=>P(parseInt(t.target.value,10)),"aria-label":"Select minute",children:$.map(t=>e.jsx("option",{value:t,children:t.toString().padStart(2,"0")},t))})]}),!a&&e.jsx("button",{type:"button",className:"chronos-period-toggle",onClick:Z,"aria-label":`Switch to ${u==="AM"?"PM":"AM"}`,children:u})]})]})},re=({value:n,onChange:l})=>{const[a,r]=i.useState(!1),c=B.find(d=>d.value===n)||{label:n},b=d=>{l(d),r(!1)};return e.jsxs("div",{className:"chronos-timezone-selector",children:[e.jsxs("div",{className:"chronos-timezone-header",children:[e.jsxs("svg",{className:"chronos-globe-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),e.jsx("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"})]}),e.jsx("span",{children:"Timezone"})]}),e.jsxs("button",{type:"button",className:"chronos-timezone-button",onClick:()=>r(!a),"aria-expanded":a,"aria-label":"Select timezone",children:[e.jsx("span",{className:"chronos-timezone-label",children:c.label}),e.jsx("span",{className:"chronos-timezone-offset",children:V(n)}),e.jsx("svg",{className:`chronos-chevron ${a?"expanded":""}`,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),a&&e.jsx("div",{className:"chronos-timezone-list",role:"listbox",children:B.map(d=>e.jsxs("button",{type:"button",className:`chronos-timezone-option ${d.value===n?"selected":""}`,onClick:()=>b(d.value),role:"option","aria-selected":d.value===n,children:[e.jsx("span",{className:"chronos-timezone-option-label",children:d.label}),e.jsx("span",{className:"chronos-timezone-option-offset",children:V(d.value)})]},d.value))})]})};function R(n,l,a){return{iso:n.toISO()||"",formatted:n.toFormat(`${l} ${a}`),timestamp:n.toMillis(),dateTime:n}}const ie=({value:n,onChange:l,timezone:a=X,dateFormat:r="DD",timeFormat:c="HH:mm",minDate:b,maxDate:d,placeholder:u="Select date and time",disabled:v=!1,showTime:T=!0,use24Hour:P=!0,className:Z="",ariaLabel:z="Date and time picker",showTimezoneSelector:_=!1,theme:L="light",orientation:C="portrait",selectionMode:$="single",rangeValue:t,onRangeChange:m,holidays:I,customHolidays:k,showHolidays:D=!0})=>{const h=$==="range",[s,y]=i.useState(!1),[o,w]=i.useState(()=>!h&&n?A(n,a):null),[N,W]=i.useState(()=>h&&(t!=null&&t.start)?A(t.start,a):null),[O,H]=i.useState(()=>h&&(t!=null&&t.end)?A(t.end,a):null),[g,ce]=i.useState(a),[de,K]=i.useState(()=>o||N||O||Y(a)),G=i.useRef(null),ee=i.useRef(null);i.useEffect(()=>{!h&&n&&w(A(n,g))},[n,g,h]),i.useEffect(()=>{h&&(t==null?void 0:t.start)!=null&&(t==null?void 0:t.end)!=null&&(W(A(t.start,g)),H(A(t.end,g)))},[h,t,g]),i.useEffect(()=>{const p=f=>{G.current&&!G.current.contains(f.target)&&y(!1)};if(s)return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[s]),i.useEffect(()=>{const p=f=>{var E;f.key==="Escape"&&s&&(y(!1),(E=ee.current)==null||E.focus())};return document.addEventListener("keydown",p),()=>document.removeEventListener("keydown",p)},[s]);const he=i.useCallback(p=>{let f=p;if(o&&(f=p.set({hour:o.hour,minute:o.minute,second:o.second})),w(f),K(f),T||y(!1),l){const E={iso:f.toISO()||"",formatted:f.toFormat(`${r} ${c}`),timestamp:f.toMillis(),dateTime:f};l(E)}},[o,T,l,r,c]),fe=i.useCallback((p,f)=>{const x=(o||Y(g)).set({hour:p,minute:f,second:0});if(w(x),l){const j={iso:x.toISO()||"",formatted:x.toFormat(`${r} ${c}`),timestamp:x.toMillis(),dateTime:x};l(j)}},[o,g,l,r,c]),me=i.useCallback((p,f)=>{const E=p.startOf("day"),x=f.startOf("day"),[j,U]=E<=x?[E,x]:[x,E];if(W(j),H(U),K(j),m){const be=R(j,r,c),ve=R(U,r,c),Ne=Math.max(0,Math.ceil(U.diff(j,"days").days));m({start:be,end:ve,nights:Ne})}},[m,r,c]),ye=i.useCallback(p=>{if(ce(p),o){const f=o.setZone(p);if(w(f),K(f),l){const E={iso:f.toISO()||"",formatted:f.toFormat(`${r} ${c}`),timestamp:f.toMillis(),dateTime:f};l(E)}}else K(Y(p))},[o,l,r,c]),ne=()=>{v||y(!s)},pe=p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),ne())},ue=h?N&&O?`${N.toFormat("d MMM yyyy")} – ${O.toFormat("d MMM yyyy")}`:"":o?o.toFormat(`${r} ${T?c:""}`):"",Me=b?A(b,g):void 0,Te=d?A(d,g):void 0,ke=I!==void 0?I:D?[...Q(g),...k??[]]:k??[];return e.jsxs("div",{ref:G,className:`chronos-picker ${Z}`,"data-disabled":v,"data-theme":L,children:[e.jsxs("div",{className:"chronos-input-wrapper",onClick:ne,children:[e.jsx("input",{ref:ee,type:"text",className:"chronos-input",value:ue,placeholder:u,readOnly:!0,disabled:v,onKeyDown:pe,"aria-label":z,"aria-expanded":s,"aria-haspopup":"dialog",role:"combobox"}),e.jsxs("svg",{className:"chronos-calendar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),e.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),e.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})]}),s&&e.jsx("div",{className:"chronos-dropdown","data-orientation":C,"data-range-mode":h,role:"dialog","aria-label":"Date and time picker dialog",children:e.jsxs("div",{className:"chronos-dropdown-content",children:[h&&N&&O&&e.jsxs("div",{className:"chronos-range-summary",children:[e.jsxs("div",{className:"chronos-range-nights",children:[Math.max(0,Math.ceil(O.diff(N,"days").days))," nights"]}),e.jsxs("div",{className:"chronos-range-dates",children:[N.toFormat("d MMM yyyy")," – ",O.toFormat("d MMM yyyy")]})]}),e.jsx(ae,{viewDate:de,selectedDate:h?null:o,onDateSelect:he,onViewDateChange:K,timezone:g,minDate:Me,maxDate:Te,selectedStart:h?N:void 0,selectedEnd:h?O:void 0,onRangeSelect:h?me:void 0,holidays:ke}),!h&&(T||_)&&e.jsxs("div",{className:"chronos-sidebar",children:[T&&e.jsx(le,{value:o,onChange:fe,use24Hour:P,timezone:g}),_&&e.jsx(re,{value:g,onChange:ye})]})]})})]})};M.COMMON_TIMEZONES=B,M.DEFAULT_HOLIDAYS_TIMEZONE=J,M.DEFAULT_TIMEZONE=X,M.DateTimePicker=ie,M.INDIAN_HOLIDAYS_2026=q,M.LONG_WEEKENDS_2026=F,M.convertToTimezone=A,M.getDefaultHolidaysForTimezone=Q,M.nowInTimezone=Y,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})});
1
+ (function(N,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react"),require("luxon")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","luxon"],e):(N=typeof globalThis<"u"?globalThis:N||self,e(N.ChronosPicker={},N.jsxRuntime,N.React,N.luxon))})(this,function(N,e,f,T){"use strict";const U="Asia/Kolkata",F=[{date:"2026-01-26",name:"Republic Day",type:"national"},{date:"2026-03-19",name:"Holi",type:"national"},{date:"2026-04-14",name:"Dr. Ambedkar Jayanti",type:"national"},{date:"2026-08-15",name:"Independence Day",type:"national"},{date:"2026-10-02",name:"Gandhi Jayanti",type:"national"},{date:"2026-10-20",name:"Dussehra",type:"national"},{date:"2026-11-08",name:"Diwali",type:"national"},{date:"2026-12-25",name:"Christmas",type:"national"}],q=[{date:"2026-01-24",name:"Long Weekend: Trip to Jaipur?",type:"long-weekend"},{date:"2026-01-25",name:"Long Weekend: Fort Visit",type:"long-weekend"},{date:"2026-01-26",name:"Republic Day",type:"long-weekend"},{date:"2026-03-19",name:"Holi Celebration",type:"long-weekend"},{date:"2026-03-20",name:"Take a leave! Beach time?",type:"long-weekend"},{date:"2026-03-21",name:"Relaxing Saturday",type:"long-weekend"},{date:"2026-03-22",name:"Lazy Sunday",type:"long-weekend"},{date:"2026-08-15",name:"Independence Day",type:"long-weekend"},{date:"2026-08-16",name:"Sunday Brunch",type:"long-weekend"},{date:"2026-08-17",name:"Take a leave? Hills calling!",type:"long-weekend"},{date:"2026-11-07",name:"Choti Diwali",type:"long-weekend"},{date:"2026-11-08",name:"Diwali",type:"long-weekend"},{date:"2026-11-09",name:"Govardhan Puja (Take leave)",type:"long-weekend"}];function Q(t){return t===U?[...F,...q]:[]}const X="Asia/Kolkata",B=[{value:"Asia/Kolkata",label:"India (IST)"},{value:"America/New_York",label:"Eastern Time (ET)"},{value:"America/Chicago",label:"Central Time (CT)"},{value:"America/Denver",label:"Mountain Time (MT)"},{value:"America/Los_Angeles",label:"Pacific Time (PT)"},{value:"Europe/London",label:"London (GMT/BST)"},{value:"Europe/Paris",label:"Central Europe (CET)"},{value:"Asia/Dubai",label:"Dubai (GST)"},{value:"Asia/Singapore",label:"Singapore (SGT)"},{value:"Asia/Tokyo",label:"Tokyo (JST)"},{value:"Australia/Sydney",label:"Sydney (AEDT)"},{value:"UTC",label:"UTC"}];function _(t,o){return T.DateTime.isDateTime(t)?t.setZone(o):typeof t=="string"?T.DateTime.fromISO(t,{zone:o}):T.DateTime.fromJSDate(t,{zone:o})}function Y(t){return T.DateTime.now().setZone(t)}function V(t){const s=T.DateTime.now().setZone(t).offset,l=Math.floor(Math.abs(s)/60),c=Math.abs(s)%60;return`UTC${s>=0?"+":"-"}${l}${c>0?`:${c.toString().padStart(2,"0")}`:""}`}function ne(t,o,s,l,c,v,d,h,D){const m=T.DateTime.fromObject({year:t,month:o,day:1},{zone:s}),S=m.startOf("week"),I=m.endOf("month").endOf("week"),A=T.DateTime.now().setZone(s).startOf("day"),L=d!=null&&h!=null,x=d==null?void 0:d.startOf("day"),Z=h==null?void 0:h.endOf("day"),n=new Map;D&&D.forEach(w=>{let y;T.DateTime.isDateTime(w.date)?y=w.date.setZone(s):typeof w.date=="string"?y=T.DateTime.fromISO(w.date,{zone:s}):y=T.DateTime.fromJSDate(w.date,{zone:s}),n.set(y.toISODate()||"",{name:w.name,type:w.type||"national"})});const u=[];let W=[],g=S;for(;g<=I;){const w=g.month===o,y=g.hasSame(A,"day"),O=g.startOf("day"),a=g.toISODate()||"";let i=!1,r=!1,k=!1,C=!1;L&&x&&Z?(k=O.hasSame(x,"day"),C=O.hasSame(Z,"day"),r=O>=x&&O<=Z||k||C,i=k||C):l&&(i=g.hasSame(l,"day"));let $=!1;c&&g<c.startOf("day")&&($=!0),v&&g>v.endOf("day")&&($=!0);const H=n.get(a);W.push({date:g,isCurrentMonth:w,isToday:y,isSelected:i,isDisabled:$,isInRange:r,isRangeStart:k,isRangeEnd:C,holiday:H?{date:g,...H}:void 0}),W.length===7&&(u.push(W),W=[]),g=g.plus({days:1})}return u}function oe(){const t=T.DateTime.now().startOf("week"),o=[];for(let s=0;s<7;s++){const l=t.plus({days:s});o.push(l.toFormat("ccc"))}return o}function ae(){const t=[];for(let o=1;o<=12;o++){const s=T.DateTime.fromObject({month:o});t.push(s.toFormat("MMMM"))}return t}function se(t,o,s,l){if(!t||t.length===0)return[];const c=b=>T.DateTime.isDateTime(b.date)?b.date.setZone(o).startOf("day"):typeof b.date=="string"?T.DateTime.fromISO(b.date,{zone:o}).startOf("day"):T.DateTime.fromJSDate(b.date,{zone:o}).startOf("day"),v=T.DateTime.fromObject({year:s,month:l,day:1},{zone:o}),d=v.endOf("month"),h=Array.from(new Set(t.map(b=>c(b).toISODate()).filter(Boolean))).sort();if(h.length===0)return[];const D=[];let m=T.DateTime.fromISO(h[0],{zone:o}),S=m;for(let b=1;b<h.length;b++){const I=T.DateTime.fromISO(h[b],{zone:o}),A=T.DateTime.fromISO(h[b-1],{zone:o});I.diff(A,"days").days<=1||(S>=v&&m<=d&&D.push({start:m,end:S}),m=I),S=I}return S>=v&&m<=d&&D.push({start:m,end:S}),D}const re=({viewDate:t,selectedDate:o,onDateSelect:s,onViewDateChange:l,timezone:c,minDate:v,maxDate:d,selectedStart:h,selectedEnd:D,onRangeSelect:m,holidays:S})=>{const b=m!=null,I=f.useMemo(()=>ne(t.year,t.month,c,o??void 0,v,d,h??void 0,D??void 0,S),[t,o,c,v,d,h,D,S]),A=f.useMemo(()=>se(S,c,t.year,t.month),[S,c,t.year,t.month]),L=f.useMemo(()=>oe(),[]),x=f.useMemo(()=>ae(),[]),Z=()=>{l(t.minus({months:1}))},n=()=>{l(t.plus({months:1}))},u=a=>{const i=parseInt(a.target.value,10);l(t.set({month:i}))},W=a=>{const i=parseInt(a.target.value,10);l(t.set({year:i}))},g=(a,i)=>{if(!i)if(b&&m){const r=a.startOf("day");if(h==null)m(a,a);else if(D!=null&&h.hasSame(D,"day")){const k=h.startOf("day");r<k?m(a,h):m(h,a)}else m(a,a)}else s(a)},w=(a,i,r)=>{(a.key==="Enter"||a.key===" ")&&(a.preventDefault(),g(i,r))},y=t.year,O=Array.from({length:21},(a,i)=>y-10+i);return e.jsxs("div",{className:"chronos-calendar",role:"region","aria-label":"Calendar",children:[e.jsxs("div",{className:"chronos-calendar-header",children:[e.jsx("button",{type:"button",className:"chronos-nav-button",onClick:Z,"aria-label":"Previous month",children:"‹"}),e.jsxs("div",{className:"chronos-month-year-selectors",children:[e.jsx("select",{className:"chronos-month-select",value:t.month,onChange:u,"aria-label":"Select month",children:x.map((a,i)=>e.jsx("option",{value:i+1,children:a},i))}),e.jsx("select",{className:"chronos-year-select",value:t.year,onChange:W,"aria-label":"Select year",children:O.map(a=>e.jsx("option",{value:a,children:a},a))})]}),e.jsx("button",{type:"button",className:"chronos-nav-button",onClick:n,"aria-label":"Next month",children:"›"})]}),e.jsxs("div",{className:"chronos-calendar-grid",children:[e.jsx("div",{className:"chronos-weekday-row",children:L.map(a=>e.jsx("div",{className:"chronos-weekday",children:a},a))}),I.map((a,i)=>e.jsx("div",{className:"chronos-week-row",children:a.map((r,k)=>e.jsxs("button",{type:"button",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}`:""}`,onClick:()=>g(r.date,r.isDisabled),onKeyDown:C=>w(C,r.date,r.isDisabled),disabled:r.isDisabled,"aria-label":`${r.date.toFormat("MMMM d, yyyy")}${r.holiday?`, ${r.holiday.name}`:""}`,"aria-selected":r.isSelected,"aria-current":r.isToday?"date":void 0,title:r.holiday?r.holiday.name:void 0,children:[r.date.day,r.holiday&&e.jsx("span",{className:"chronos-holiday-dot"})]},k))},i))]}),A.length>0&&e.jsx("div",{className:"chronos-vacation-notes",role:"region","aria-label":"Vacation suggestions",children:A.map((a,i)=>{const r=a.start.hasSame(a.end,"day"),k=a.start.toFormat("d MMM yyyy"),C=a.end.toFormat("d MMM yyyy");return e.jsxs("div",{className:"chronos-vacation-note",children:[e.jsx("div",{className:"chronos-vacation-note-title",children:r?"Vacation day":"You can take your vacation"}),e.jsx("div",{className:"chronos-vacation-note-dates",children:r?k:`from ${k} to ${C}`})]},i)})})]})},le=({value:t,onChange:o,use24Hour:s})=>{const[l,c]=f.useState((t==null?void 0:t.hour)??12),[v,d]=f.useState((t==null?void 0:t.minute)??0),[h,D]=f.useState(t&&t.hour>=12?"PM":"AM");f.useEffect(()=>{t&&(c(t.hour),d(t.minute),D(t.hour>=12?"PM":"AM"))},[t]);const m=n=>{c(n);let u=n;s||(h==="PM"&&n!==12?u=n+12:h==="AM"&&n===12&&(u=0)),o(u,v)},S=n=>{d(n),o(l,n)},b=()=>{const n=h==="AM"?"PM":"AM";D(n);let u=l;n==="PM"&&l!==12?u=l+12:n==="AM"&&l===12?u=0:n==="AM"&&l>12&&(u=l-12),o(u,v)},I=s?l:l%12||12,A=s?23:12,L=s?0:1,x=Array.from({length:A-L+1},(n,u)=>L+u),Z=Array.from({length:60},(n,u)=>u);return e.jsxs("div",{className:"chronos-time-picker",role:"group","aria-label":"Time picker",children:[e.jsxs("div",{className:"chronos-time-header",children:[e.jsxs("svg",{className:"chronos-clock-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("polyline",{points:"12 6 12 12 16 14"})]}),e.jsx("span",{children:"Time"})]}),e.jsxs("div",{className:"chronos-time-controls",children:[e.jsxs("div",{className:"chronos-time-input-group",children:[e.jsx("label",{htmlFor:"chronos-hour-select",className:"chronos-time-label",children:"Hour"}),e.jsx("select",{id:"chronos-hour-select",className:"chronos-time-select",value:I,onChange:n=>m(parseInt(n.target.value,10)),"aria-label":"Select hour",children:x.map(n=>e.jsx("option",{value:n,children:n.toString().padStart(2,"0")},n))})]}),e.jsx("span",{className:"chronos-time-separator",children:":"}),e.jsxs("div",{className:"chronos-time-input-group",children:[e.jsx("label",{htmlFor:"chronos-minute-select",className:"chronos-time-label",children:"Minute"}),e.jsx("select",{id:"chronos-minute-select",className:"chronos-time-select",value:v,onChange:n=>S(parseInt(n.target.value,10)),"aria-label":"Select minute",children:Z.map(n=>e.jsx("option",{value:n,children:n.toString().padStart(2,"0")},n))})]}),!s&&e.jsx("button",{type:"button",className:"chronos-period-toggle",onClick:b,"aria-label":`Switch to ${h==="AM"?"PM":"AM"}`,children:h})]})]})},ie=({value:t,onChange:o})=>{const[s,l]=f.useState(!1),c=B.find(d=>d.value===t)||{label:t},v=d=>{o(d),l(!1)};return e.jsxs("div",{className:"chronos-timezone-selector",children:[e.jsxs("div",{className:"chronos-timezone-header",children:[e.jsxs("svg",{className:"chronos-globe-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),e.jsx("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"})]}),e.jsx("span",{children:"Timezone"})]}),e.jsxs("button",{type:"button",className:"chronos-timezone-button",onClick:()=>l(!s),"aria-expanded":s,"aria-label":"Select timezone",children:[e.jsx("span",{className:"chronos-timezone-label",children:c.label}),e.jsx("span",{className:"chronos-timezone-offset",children:V(t)}),e.jsx("svg",{className:`chronos-chevron ${s?"expanded":""}`,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("polyline",{points:"6 9 12 15 18 9"})})]}),s&&e.jsx("div",{className:"chronos-timezone-list",role:"listbox",children:B.map(d=>e.jsxs("button",{type:"button",className:`chronos-timezone-option ${d.value===t?"selected":""}`,onClick:()=>v(d.value),role:"option","aria-selected":d.value===t,children:[e.jsx("span",{className:"chronos-timezone-option-label",children:d.label}),e.jsx("span",{className:"chronos-timezone-option-offset",children:V(d.value)})]},d.value))})]})};function R(t,o,s){return{iso:t.toISO()||"",formatted:t.toFormat(`${o} ${s}`),timestamp:t.toMillis(),dateTime:t}}const ce=({value:t,onChange:o,timezone:s=X,dateFormat:l="DD",timeFormat:c="HH:mm",minDate:v,maxDate:d,placeholder:h="Select date and time",disabled:D=!1,showTime:m=!0,use24Hour:S=!0,className:b="",ariaLabel:I="Date and time picker",showTimezoneSelector:A=!1,theme:L="light",orientation:x="portrait",selectionMode:Z="single",rangeValue:n,onRangeChange:u,holidays:W,customHolidays:g,showHolidays:w=!0})=>{const y=Z==="range",[O,a]=f.useState(!1),[i,r]=f.useState(()=>!y&&t?_(t,s):null),[k,C]=f.useState(()=>y&&(n!=null&&n.start)?_(n.start,s):null),[$,H]=f.useState(()=>y&&(n!=null&&n.end)?_(n.end,s):null),[E,de]=f.useState(s),[he,K]=f.useState(()=>i||k||$||Y(s)),G=f.useRef(null),ee=f.useRef(null);f.useEffect(()=>{!y&&t&&r(_(t,E))},[t,E,y]),f.useEffect(()=>{y&&(n==null?void 0:n.start)!=null&&(n==null?void 0:n.end)!=null&&(C(_(n.start,E)),H(_(n.end,E)))},[y,n,E]),f.useEffect(()=>{const M=p=>{G.current&&!G.current.contains(p.target)&&a(!1)};if(O)return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[O]),f.useEffect(()=>{const M=p=>{var P;p.key==="Escape"&&O&&(a(!1),(P=ee.current)==null||P.focus())};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[O]);const fe=f.useCallback(M=>{let p=M;if(i&&(p=M.set({hour:i.hour,minute:i.minute,second:i.second})),r(p),K(p),m||a(!1),o){const P={iso:p.toISO()||"",formatted:p.toFormat(`${l} ${c}`),timestamp:p.toMillis(),dateTime:p};o(P)}},[i,m,o,l,c]),me=f.useCallback((M,p)=>{const z=(i||Y(E)).set({hour:M,minute:p,second:0});if(r(z),o){const j={iso:z.toISO()||"",formatted:z.toFormat(`${l} ${c}`),timestamp:z.toMillis(),dateTime:z};o(j)}},[i,E,o,l,c]),ye=f.useCallback((M,p)=>{const P=M.startOf("day"),z=p.startOf("day"),[j,J]=P<=z?[P,z]:[z,P];if(C(j),H(J),K(j),u){const ke=R(j,l,c),De=R(J,l,c),ge=Math.max(0,Math.ceil(J.diff(j,"days").days));u({start:ke,end:De,nights:ge})}},[u,l,c]),pe=f.useCallback(M=>{if(de(M),i){const p=i.setZone(M);if(r(p),K(p),o){const P={iso:p.toISO()||"",formatted:p.toFormat(`${l} ${c}`),timestamp:p.toMillis(),dateTime:p};o(P)}}else K(Y(M))},[i,o,l,c]),te=()=>{D||a(!O)},ue=M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),te())},Me=y?k&&$?`${k.toFormat("d MMM yyyy")} – ${$.toFormat("d MMM yyyy")}`:"":i?i.toFormat(`${l} ${m?c:""}`):"",Te=v?_(v,E):void 0,ve=d?_(d,E):void 0,be=W!==void 0?W:w?[...Q(E),...g??[]]:g??[];return e.jsxs("div",{ref:G,className:`chronos-picker ${b}`,"data-disabled":D,"data-theme":L,children:[e.jsxs("div",{className:"chronos-input-wrapper",onClick:te,children:[e.jsx("input",{ref:ee,type:"text",className:"chronos-input",value:Me,placeholder:h,readOnly:!0,disabled:D,onKeyDown:ue,"aria-label":I,"aria-expanded":O,"aria-haspopup":"dialog",role:"combobox"}),e.jsxs("svg",{className:"chronos-calendar-icon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),e.jsx("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),e.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),e.jsx("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]})]}),O&&e.jsx("div",{className:"chronos-dropdown","data-orientation":x,"data-range-mode":y,role:"dialog","aria-label":"Date and time picker dialog",children:e.jsxs("div",{className:"chronos-dropdown-content",children:[y&&k&&$&&e.jsxs("div",{className:"chronos-range-summary",children:[e.jsxs("div",{className:"chronos-range-nights",children:[Math.max(0,Math.ceil($.diff(k,"days").days))," nights"]}),e.jsxs("div",{className:"chronos-range-dates",children:[k.toFormat("d MMM yyyy")," – ",$.toFormat("d MMM yyyy")]})]}),e.jsx(re,{viewDate:he,selectedDate:y?null:i,onDateSelect:fe,onViewDateChange:K,timezone:E,minDate:Te,maxDate:ve,selectedStart:y?k:void 0,selectedEnd:y?$:void 0,onRangeSelect:y?ye:void 0,holidays:be}),!y&&(m||A)&&e.jsxs("div",{className:"chronos-sidebar",children:[m&&e.jsx(le,{value:i,onChange:me,use24Hour:S,timezone:E}),A&&e.jsx(ie,{value:E,onChange:pe})]})]})})]})};N.COMMON_TIMEZONES=B,N.DEFAULT_HOLIDAYS_TIMEZONE=U,N.DEFAULT_TIMEZONE=X,N.DateTimePicker=ce,N.INDIAN_HOLIDAYS_2026=F,N.LONG_WEEKENDS_2026=q,N.convertToTimezone=_,N.getDefaultHolidaysForTimezone=Q,N.nowInTimezone=Y,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"})});
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,UAAU,aAAa;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvC,gBAAgB,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,oDAAoD;IACpD,aAAa,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC9B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,KAAK,IAAI,CAAC;IACzD,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwK5C,CAAC"}
1
+ {"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,UAAU,aAAa;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvC,gBAAgB,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,oDAAoD;IACpD,aAAa,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC9B,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,QAAQ,KAAK,IAAI,CAAC;IACzD,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB;AAED,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAiM5C,CAAC"}
@@ -17,4 +17,17 @@ export declare function getWeekdayNames(): string[];
17
17
  * Get month names
18
18
  */
19
19
  export declare function getMonthNames(): string[];
20
+ export interface VacationRange {
21
+ start: DateTime;
22
+ end: DateTime;
23
+ }
24
+ /**
25
+ * Get consecutive holiday/long-weekend date ranges that overlap the given month.
26
+ * Used to show "You can take your vacation from X to Y" notes.
27
+ */
28
+ export declare function getVacationRangesInMonth(holidays: {
29
+ date: DateTime | string | Date;
30
+ name: string;
31
+ type?: 'national' | 'long-weekend';
32
+ }[] | undefined, timezone: string, year: number, month: number): VacationRange[];
20
33
  //# sourceMappingURL=calendar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/utils/calendar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,QAAQ,EACvB,OAAO,CAAC,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE,QAAQ,EAClB,aAAa,CAAC,EAAE,QAAQ,EACxB,WAAW,CAAC,EAAE,QAAQ,EACtB,QAAQ,CAAC,EAAE;IAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,UAAU,GAAG,cAAc,CAAA;CAAE,EAAE,GAChG,YAAY,EAAE,EAAE,CAuFlB;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAU1C;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,EAAE,CASxC"}
1
+ {"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/utils/calendar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,QAAQ,EACvB,OAAO,CAAC,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE,QAAQ,EAClB,aAAa,CAAC,EAAE,QAAQ,EACxB,WAAW,CAAC,EAAE,QAAQ,EACtB,QAAQ,CAAC,EAAE;IAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,UAAU,GAAG,cAAc,CAAA;CAAE,EAAE,GAChG,YAAY,EAAE,EAAE,CAuFlB;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAU1C;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,EAAE,CASxC;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,QAAQ,CAAC;IAChB,GAAG,EAAE,QAAQ,CAAC;CACf;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE;IAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,UAAU,GAAG,cAAc,CAAA;CAAE,EAAE,GAAG,SAAS,EAC5G,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,aAAa,EAAE,CA0CjB"}
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .chronos-picker{position:relative;display:inline-block;width:100%;max-width:320px;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:14px;color:#1a1a1a}.chronos-picker[data-disabled=true]{opacity:.6;cursor:not-allowed}.chronos-input-wrapper{position:relative;display:flex;align-items:center;cursor:pointer}.chronos-input{width:100%;padding:10px 40px 10px 14px;border:1.5px solid #d1d5db;border-radius:8px;font-size:14px;color:#1a1a1a;background-color:#fff;transition:all .2s ease;cursor:pointer;outline:none}.chronos-input:hover:not(:disabled){border-color:#9ca3af}.chronos-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.chronos-input:disabled{background-color:#f3f4f6;cursor:not-allowed}.chronos-input::placeholder{color:#9ca3af}.chronos-calendar-icon{position:absolute;right:12px;width:20px;height:20px;color:#6b7280;pointer-events:none;transition:color .2s ease}.chronos-input:hover:not(:disabled)~.chronos-calendar-icon,.chronos-input:focus~.chronos-calendar-icon{color:#3b82f6}.chronos-dropdown{position:absolute;top:calc(100% + 8px);left:0;z-index:99999;min-width:320px;background:#fff;border:1px solid #e5e7eb;border-radius:14px;box-shadow:0 4px 6px -1px #00000014,0 10px 30px -4px #0000001f;overflow:hidden;animation:chronos-dropdown-appear .2s ease}.chronos-dropdown-content{display:flex;flex-direction:column}.chronos-dropdown[data-orientation=portrait] .chronos-dropdown-content{flex-direction:column}.chronos-dropdown[data-orientation=landscape]{min-width:auto}.chronos-dropdown[data-orientation=landscape] .chronos-dropdown-content{flex-direction:row}.chronos-dropdown[data-orientation=landscape] .chronos-calendar{border-right:1px solid #e5e7eb;border-bottom:none}.chronos-dropdown[data-orientation=landscape] .chronos-sidebar{display:flex;flex-direction:column;min-width:240px}.chronos-dropdown[data-orientation=landscape] .chronos-time-picker{border-top:none;border-bottom:1px solid #e5e7eb}.chronos-dropdown[data-orientation=landscape] .chronos-time-picker:last-child{border-bottom:none}.chronos-dropdown[data-orientation=landscape] .chronos-timezone-selector{border-top:none}@keyframes chronos-dropdown-appear{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.chronos-range-summary{padding:16px 16px 0;margin-bottom:8px}.chronos-range-nights{font-size:1.5rem;font-weight:700;color:#1a1a1a;letter-spacing:-.025em;line-height:1.2}.chronos-range-dates{font-size:.875rem;color:#6b7280;margin-top:4px}.chronos-calendar{padding:16px}.chronos-calendar-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;gap:8px}.chronos-nav-button{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;border-radius:6px;background:transparent;color:#4b5563;font-size:20px;font-weight:600;cursor:pointer;transition:all .15s ease}.chronos-nav-button:hover{background:#f3f4f6;color:#1a1a1a}.chronos-nav-button:active{transform:scale(.95)}.chronos-month-year-selectors{display:flex;gap:8px;flex:1;justify-content:center}.chronos-month-select,.chronos-year-select{padding:6px 10px;border:1px solid #d1d5db;border-radius:6px;font-size:14px;font-weight:500;color:#1a1a1a;background-color:#fff;cursor:pointer;transition:all .15s ease;outline:none}.chronos-month-select:hover,.chronos-year-select:hover{border-color:#9ca3af}.chronos-month-select:focus,.chronos-year-select:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.chronos-calendar-grid{display:flex;flex-direction:column;gap:4px}.chronos-weekday-row,.chronos-week-row{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.chronos-weekday{display:flex;align-items:center;justify-content:center;height:32px;font-size:11px;font-weight:600;color:#6b7280;text-transform:uppercase;letter-spacing:.05em}.chronos-day{display:flex;align-items:center;justify-content:center;width:36px;height:36px;margin:0 auto;border:none;border-radius:50%;font-size:14px;font-weight:500;color:#1a1a1a;background:transparent;cursor:pointer;transition:all .2s ease;position:relative}.chronos-day:hover:not(.disabled){background:#f3f4f6;transform:scale(1.08)}.chronos-day.other-month{color:#9ca3af}.chronos-day.today{color:#3b82f6;font-weight:600}.chronos-day.today:after{content:"";position:absolute;bottom:5px;left:50%;transform:translate(-50%);width:4px;height:4px;border-radius:50%;background:#3b82f6}.chronos-day.selected{background:#3b82f6;color:#fff;font-weight:600;box-shadow:0 2px 8px #3b82f659}.chronos-day.selected:hover{background:#2563eb;box-shadow:0 2px 12px #2563eb66}.chronos-day.disabled{color:#d1d5db;cursor:not-allowed;opacity:.5}.chronos-day.disabled:hover{background:transparent;transform:none}.chronos-day.in-range{background:#e5e7eb;border-radius:0}.chronos-day.in-range:hover{background:#d1d5db}.chronos-day.range-start{border-radius:50% 0 0 50%}.chronos-day.range-start.in-range{background:#e5e7eb}.chronos-day.range-end{border-radius:0 50% 50% 0}.chronos-day.range-end.in-range{background:#e5e7eb}.chronos-day.range-start.selected,.chronos-day.range-end.selected{background:#1a1a1a;color:#fff;font-weight:600;box-shadow:0 0 0 2px #fff}.chronos-day.range-start.selected:hover,.chronos-day.range-end.selected:hover{background:#374151}.chronos-day.range-start.range-end{border-radius:50%}.chronos-day:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.chronos-day.holiday{position:relative}.chronos-holiday-dot{position:absolute;top:4px;right:4px;width:6px;height:6px;border-radius:50%;background-color:#ef4444}.chronos-day.holiday.long-weekend{background-color:#ecfdf5;color:#047857;font-weight:600}.chronos-day.holiday.long-weekend:hover:not(.disabled){background-color:#d1fae5}.chronos-day.holiday.long-weekend .chronos-holiday-dot{background-color:#10b981}.chronos-picker[data-theme=dark] .chronos-day.holiday.long-weekend{background-color:#064e3b;color:#d1fae5}.chronos-picker[data-theme=dark] .chronos-day.holiday.long-weekend:hover:not(.disabled){background-color:#065f46}.chronos-picker[data-theme=dark] .chronos-day.holiday.long-weekend .chronos-holiday-dot{background-color:#34d399}.chronos-time-picker{padding:16px}.chronos-dropdown[data-orientation=portrait] .chronos-time-picker{border-top:1px solid #e5e7eb}.chronos-time-header{display:flex;align-items:center;gap:8px;margin-bottom:12px;font-weight:600;color:#4b5563}.chronos-clock-icon{width:18px;height:18px;color:#6b7280}.chronos-time-controls{display:flex;align-items:flex-end;justify-content:center;gap:8px}.chronos-time-input-group{display:flex;flex-direction:column;gap:4px}.chronos-time-label{font-size:11px;font-weight:500;color:#6b7280;text-transform:uppercase;letter-spacing:.5px}.chronos-time-select{width:70px;padding:8px 10px;border:1.5px solid #d1d5db;border-radius:6px;font-size:16px;font-weight:600;color:#1a1a1a;background-color:#fff;cursor:pointer;transition:all .15s ease;outline:none;text-align:center}.chronos-time-select:hover{border-color:#9ca3af}.chronos-time-select:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.chronos-time-separator{font-size:24px;font-weight:700;color:#1a1a1a;line-height:1;margin-bottom:8px}.chronos-period-toggle{padding:8px 16px;border:1.5px solid #d1d5db;border-radius:6px;font-size:14px;font-weight:600;color:#1a1a1a;background-color:#fff;cursor:pointer;transition:all .15s ease;outline:none}.chronos-period-toggle:hover{border-color:#3b82f6;background-color:#eff6ff;color:#3b82f6}.chronos-period-toggle:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.chronos-period-toggle:active{transform:scale(.95)}.chronos-timezone-selector{padding:16px}.chronos-dropdown[data-orientation=portrait] .chronos-timezone-selector{border-top:1px solid #e5e7eb}.chronos-timezone-header{display:flex;align-items:center;gap:8px;margin-bottom:12px;font-weight:600;color:#4b5563}.chronos-globe-icon{width:18px;height:18px;color:#6b7280}.chronos-timezone-button{display:flex;align-items:center;justify-content:space-between;width:100%;padding:10px 12px;border:1.5px solid #d1d5db;border-radius:8px;background-color:#fff;cursor:pointer;transition:all .15s ease;outline:none}.chronos-timezone-button:hover{border-color:#9ca3af}.chronos-timezone-button:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.chronos-timezone-label{font-weight:500;color:#1a1a1a;flex:1;text-align:left}.chronos-timezone-offset{font-size:12px;color:#6b7280;margin-right:8px}.chronos-chevron{width:16px;height:16px;color:#6b7280;transition:transform .2s ease}.chronos-chevron.expanded{transform:rotate(180deg)}.chronos-timezone-list{margin-top:8px;max-height:240px;overflow-y:auto;border:1px solid #e5e7eb;border-radius:8px;background:#fff;animation:chronos-timezone-list-appear .2s ease}@keyframes chronos-timezone-list-appear{0%{opacity:0;max-height:0}to{opacity:1;max-height:240px}}.chronos-timezone-option{display:flex;align-items:center;justify-content:space-between;width:100%;padding:10px 12px;border:none;border-bottom:1px solid #f3f4f6;background:transparent;text-align:left;cursor:pointer;transition:background .15s ease;outline:none}.chronos-timezone-option:last-child{border-bottom:none}.chronos-timezone-option:hover{background:#f9fafb}.chronos-timezone-option.selected{background:#eff6ff}.chronos-timezone-option:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.chronos-timezone-option-label{font-weight:500;color:#1a1a1a}.chronos-timezone-option.selected .chronos-timezone-option-label{color:#3b82f6;font-weight:600}.chronos-timezone-option-offset{font-size:12px;color:#6b7280}@media (max-width: 480px){.chronos-dropdown{min-width:calc(100vw - 32px);max-width:calc(100vw - 32px)}.chronos-picker{max-width:100%}}.chronos-timezone-list::-webkit-scrollbar{width:6px}.chronos-timezone-list::-webkit-scrollbar-track{background:#f3f4f6}.chronos-timezone-list::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:3px}.chronos-timezone-list::-webkit-scrollbar-thumb:hover{background:#9ca3af}.chronos-picker[data-theme=dark]{color:#f3f4f6}.chronos-picker[data-theme=dark] .chronos-dropdown[data-orientation=landscape] .chronos-calendar{border-right-color:#374151}.chronos-picker[data-theme=dark] .chronos-dropdown[data-orientation=landscape] .chronos-time-picker{border-bottom-color:#374151}.chronos-picker[data-theme=dark] .chronos-dropdown[data-orientation=portrait] .chronos-time-picker,.chronos-picker[data-theme=dark] .chronos-dropdown[data-orientation=portrait] .chronos-timezone-selector{border-top-color:#374151}.chronos-picker[data-theme=dark] .chronos-input{background-color:#1f2937;border-color:#374151;color:#f3f4f6}.chronos-picker[data-theme=dark] .chronos-input:hover:not(:disabled){border-color:#4b5563}.chronos-picker[data-theme=dark] .chronos-input:disabled{background-color:#111827}.chronos-picker[data-theme=dark] .chronos-input::placeholder{color:#6b7280}.chronos-picker[data-theme=dark] .chronos-calendar-icon{color:#9ca3af}.chronos-picker[data-theme=dark] .chronos-dropdown{background:#1f2937;border-color:#374151;box-shadow:0 10px 40px #0006}.chronos-picker[data-theme=dark] .chronos-nav-button{color:#9ca3af}.chronos-picker[data-theme=dark] .chronos-nav-button:hover{background:#374151;color:#f3f4f6}.chronos-picker[data-theme=dark] .chronos-month-select,.chronos-picker[data-theme=dark] .chronos-year-select{background-color:#1f2937;border-color:#374151;color:#f3f4f6}.chronos-picker[data-theme=dark] .chronos-weekday{color:#9ca3af}.chronos-picker[data-theme=dark] .chronos-day{color:#f3f4f6}.chronos-picker[data-theme=dark] .chronos-day:hover:not(.disabled){background:#374151}.chronos-picker[data-theme=dark] .chronos-day.other-month{color:#6b7280}.chronos-picker[data-theme=dark] .chronos-day.today{color:#60a5fa}.chronos-picker[data-theme=dark] .chronos-day.today:after{background:#60a5fa}.chronos-picker[data-theme=dark] .chronos-day.selected{background:#3b82f6;color:#fff}.chronos-picker[data-theme=dark] .chronos-range-nights{color:#f3f4f6}.chronos-picker[data-theme=dark] .chronos-range-dates{color:#9ca3af}.chronos-picker[data-theme=dark] .chronos-day.in-range{background:#374151}.chronos-picker[data-theme=dark] .chronos-day.in-range:hover{background:#4b5563}.chronos-picker[data-theme=dark] .chronos-day.range-start.selected,.chronos-picker[data-theme=dark] .chronos-day.range-end.selected{background:#3b82f6;color:#fff;box-shadow:0 0 0 2px #1f2937}.chronos-picker[data-theme=dark] .chronos-time-header,.chronos-picker[data-theme=dark] .chronos-timezone-header{color:#9ca3af}.chronos-picker[data-theme=dark] .chronos-time-select,.chronos-picker[data-theme=dark] .chronos-period-toggle,.chronos-picker[data-theme=dark] .chronos-timezone-button{background-color:#1f2937;border-color:#374151;color:#f3f4f6}.chronos-picker[data-theme=dark] .chronos-timezone-list{background:#1f2937;border-color:#374151}.chronos-picker[data-theme=dark] .chronos-timezone-option:hover{background:#374151}.chronos-picker[data-theme=dark] .chronos-timezone-option.selected{background:#1e3a5f}.chronos-picker[data-theme=dark] .chronos-timezone-option.selected .chronos-timezone-option-label{color:#60a5fa}
1
+ .chronos-picker{position:relative;display:inline-block;width:100%;max-width:320px;font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif;font-size:14px;color:#1a1a1a}.chronos-picker[data-disabled=true]{opacity:.6;cursor:not-allowed}.chronos-input-wrapper{position:relative;display:flex;align-items:center;cursor:pointer}.chronos-input{width:100%;padding:10px 40px 10px 14px;border:1.5px solid #d1d5db;border-radius:8px;font-size:14px;color:#1a1a1a;background-color:#fff;transition:all .2s ease;cursor:pointer;outline:none}.chronos-input:hover:not(:disabled){border-color:#9ca3af}.chronos-input:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.chronos-input:disabled{background-color:#f3f4f6;cursor:not-allowed}.chronos-input::placeholder{color:#9ca3af}.chronos-calendar-icon{position:absolute;right:12px;width:20px;height:20px;color:#6b7280;pointer-events:none;transition:color .2s ease}.chronos-input:hover:not(:disabled)~.chronos-calendar-icon,.chronos-input:focus~.chronos-calendar-icon{color:#3b82f6}.chronos-dropdown{position:absolute;top:calc(100% + 8px);left:0;z-index:99999;min-width:320px;background:#fff;border:1px solid #e5e7eb;border-radius:14px;box-shadow:0 4px 6px -1px #00000014,0 10px 30px -4px #0000001f;overflow:hidden;animation:chronos-dropdown-appear .2s ease}.chronos-dropdown-content{display:flex;flex-direction:column}.chronos-dropdown[data-orientation=portrait] .chronos-dropdown-content{flex-direction:column}.chronos-dropdown[data-orientation=landscape]{min-width:auto}.chronos-dropdown[data-orientation=landscape] .chronos-dropdown-content{flex-direction:row}.chronos-dropdown[data-orientation=landscape] .chronos-calendar{border-right:1px solid #e5e7eb;border-bottom:none}.chronos-dropdown[data-orientation=landscape] .chronos-sidebar{display:flex;flex-direction:column;min-width:240px}.chronos-dropdown[data-orientation=landscape] .chronos-time-picker{border-top:none;border-bottom:1px solid #e5e7eb}.chronos-dropdown[data-orientation=landscape] .chronos-time-picker:last-child{border-bottom:none}.chronos-dropdown[data-orientation=landscape] .chronos-timezone-selector{border-top:none}@keyframes chronos-dropdown-appear{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.chronos-range-summary{padding:16px 16px 0;margin-bottom:8px}.chronos-range-nights{font-size:1.5rem;font-weight:700;color:#1a1a1a;letter-spacing:-.025em;line-height:1.2}.chronos-range-dates{font-size:.875rem;color:#6b7280;margin-top:4px}.chronos-calendar{padding:16px}.chronos-calendar-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;gap:8px}.chronos-nav-button{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border:none;border-radius:6px;background:transparent;color:#4b5563;font-size:20px;font-weight:600;cursor:pointer;transition:all .15s ease}.chronos-nav-button:hover{background:#f3f4f6;color:#1a1a1a}.chronos-nav-button:active{transform:scale(.95)}.chronos-month-year-selectors{display:flex;gap:8px;flex:1;justify-content:center}.chronos-month-select,.chronos-year-select{padding:6px 10px;border:1px solid #d1d5db;border-radius:6px;font-size:14px;font-weight:500;color:#1a1a1a;background-color:#fff;cursor:pointer;transition:all .15s ease;outline:none}.chronos-month-select:hover,.chronos-year-select:hover{border-color:#9ca3af}.chronos-month-select:focus,.chronos-year-select:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.chronos-calendar-grid{display:flex;flex-direction:column;gap:4px}.chronos-weekday-row,.chronos-week-row{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.chronos-weekday{display:flex;align-items:center;justify-content:center;height:32px;font-size:11px;font-weight:600;color:#6b7280;text-transform:uppercase;letter-spacing:.05em}.chronos-day{display:flex;align-items:center;justify-content:center;width:36px;height:36px;margin:0 auto;border:none;border-radius:50%;font-size:14px;font-weight:500;color:#1a1a1a;background:transparent;cursor:pointer;transition:all .2s ease;position:relative}.chronos-day:hover:not(.disabled){background:#f3f4f6;transform:scale(1.08)}.chronos-day.other-month{color:#9ca3af}.chronos-day.today{color:#3b82f6;font-weight:600}.chronos-day.today:after{content:"";position:absolute;bottom:5px;left:50%;transform:translate(-50%);width:4px;height:4px;border-radius:50%;background:#3b82f6}.chronos-day.selected{background:#3b82f6;color:#fff;font-weight:600;box-shadow:0 2px 8px #3b82f659}.chronos-day.selected:hover{background:#2563eb;box-shadow:0 2px 12px #2563eb66}.chronos-day.disabled{color:#d1d5db;cursor:not-allowed;opacity:.5}.chronos-day.disabled:hover{background:transparent;transform:none}.chronos-day.in-range{background:#e5e7eb;border-radius:0}.chronos-day.in-range:hover{background:#d1d5db}.chronos-day.range-start{border-radius:50% 0 0 50%}.chronos-day.range-start.in-range{background:#e5e7eb}.chronos-day.range-end{border-radius:0 50% 50% 0}.chronos-day.range-end.in-range{background:#e5e7eb}.chronos-day.range-start.selected,.chronos-day.range-end.selected{background:#1a1a1a;color:#fff;font-weight:600;box-shadow:0 0 0 2px #fff}.chronos-day.range-start.selected:hover,.chronos-day.range-end.selected:hover{background:#374151}.chronos-day.range-start.range-end{border-radius:50%}.chronos-day:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}.chronos-day.holiday{position:relative}.chronos-holiday-dot{position:absolute;top:4px;right:4px;width:6px;height:6px;border-radius:50%;background-color:#d97706}.chronos-day.holiday.national{background:linear-gradient(135deg,#fffbeb,#fef3c7);color:#92400e;font-weight:600}.chronos-day.holiday.national:hover:not(.disabled){background:linear-gradient(135deg,#fef3c7,#fde68a)}.chronos-day.holiday.national .chronos-holiday-dot{background-color:#d97706}.chronos-day.holiday.long-weekend{background:linear-gradient(135deg,#fefce8,#fef9c3);color:#a16207;font-weight:600}.chronos-day.holiday.long-weekend:hover:not(.disabled){background:linear-gradient(135deg,#fef9c3,#fde047);box-shadow:0 0 0 1px #eab30840}.chronos-day.holiday.long-weekend .chronos-holiday-dot{background-color:#ca8a04}.chronos-picker[data-theme=dark] .chronos-day.holiday.national{background:linear-gradient(135deg,#422006,#78350f);color:#fde68a}.chronos-picker[data-theme=dark] .chronos-day.holiday.national:hover:not(.disabled){background:linear-gradient(135deg,#78350f,#a16207)}.chronos-picker[data-theme=dark] .chronos-day.holiday.long-weekend{background:linear-gradient(135deg,#422006,#713f12);color:#fef08a}.chronos-picker[data-theme=dark] .chronos-day.holiday.long-weekend:hover:not(.disabled){background:linear-gradient(135deg,#713f12,#a16207)}.chronos-picker[data-theme=dark] .chronos-day.holiday.long-weekend .chronos-holiday-dot{background-color:#facc15}.chronos-vacation-notes{margin-top:14px;padding-top:12px;border-top:1px dashed #e5e7eb;display:flex;flex-direction:column;gap:10px}.chronos-picker[data-theme=dark] .chronos-vacation-notes{border-top-color:#374151}.chronos-vacation-note{position:relative;padding:10px 14px 12px;background:linear-gradient(145deg,#fffbeb,#fef9c3);border:1px solid #fde68a;border-radius:10px;border-left:4px solid #eab308;box-shadow:0 1px 3px #eab30814;font-size:12px;line-height:1.45;color:#713f12}.chronos-vacation-note:before{content:"✨";position:absolute;top:8px;right:10px;font-size:14px;opacity:.9}.chronos-vacation-note-title{font-weight:700;color:#92400e;margin-bottom:4px;font-size:11px;text-transform:uppercase;letter-spacing:.04em}.chronos-vacation-note-dates{font-weight:600;color:#a16207}.chronos-picker[data-theme=dark] .chronos-vacation-note{background:linear-gradient(145deg,#422006,#713f12);border-color:#a16207;border-left-color:#facc15;color:#fef08a}.chronos-picker[data-theme=dark] .chronos-vacation-note-title{color:#fde68a}.chronos-picker[data-theme=dark] .chronos-vacation-note-dates{color:#fef08a}.chronos-time-picker{padding:16px}.chronos-dropdown[data-orientation=portrait] .chronos-time-picker{border-top:1px solid #e5e7eb}.chronos-time-header{display:flex;align-items:center;gap:8px;margin-bottom:12px;font-weight:600;color:#4b5563}.chronos-clock-icon{width:18px;height:18px;color:#6b7280}.chronos-time-controls{display:flex;align-items:flex-end;justify-content:center;gap:8px}.chronos-time-input-group{display:flex;flex-direction:column;gap:4px}.chronos-time-label{font-size:11px;font-weight:500;color:#6b7280;text-transform:uppercase;letter-spacing:.5px}.chronos-time-select{width:70px;padding:8px 10px;border:1.5px solid #d1d5db;border-radius:6px;font-size:16px;font-weight:600;color:#1a1a1a;background-color:#fff;cursor:pointer;transition:all .15s ease;outline:none;text-align:center}.chronos-time-select:hover{border-color:#9ca3af}.chronos-time-select:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.chronos-time-separator{font-size:24px;font-weight:700;color:#1a1a1a;line-height:1;margin-bottom:8px}.chronos-period-toggle{padding:8px 16px;border:1.5px solid #d1d5db;border-radius:6px;font-size:14px;font-weight:600;color:#1a1a1a;background-color:#fff;cursor:pointer;transition:all .15s ease;outline:none}.chronos-period-toggle:hover{border-color:#3b82f6;background-color:#eff6ff;color:#3b82f6}.chronos-period-toggle:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.chronos-period-toggle:active{transform:scale(.95)}.chronos-timezone-selector{padding:16px}.chronos-dropdown[data-orientation=portrait] .chronos-timezone-selector{border-top:1px solid #e5e7eb}.chronos-timezone-header{display:flex;align-items:center;gap:8px;margin-bottom:12px;font-weight:600;color:#4b5563}.chronos-globe-icon{width:18px;height:18px;color:#6b7280}.chronos-timezone-button{display:flex;align-items:center;justify-content:space-between;width:100%;padding:10px 12px;border:1.5px solid #d1d5db;border-radius:8px;background-color:#fff;cursor:pointer;transition:all .15s ease;outline:none}.chronos-timezone-button:hover{border-color:#9ca3af}.chronos-timezone-button:focus{border-color:#3b82f6;box-shadow:0 0 0 3px #3b82f61a}.chronos-timezone-label{font-weight:500;color:#1a1a1a;flex:1;text-align:left}.chronos-timezone-offset{font-size:12px;color:#6b7280;margin-right:8px}.chronos-chevron{width:16px;height:16px;color:#6b7280;transition:transform .2s ease}.chronos-chevron.expanded{transform:rotate(180deg)}.chronos-timezone-list{margin-top:8px;max-height:240px;overflow-y:auto;border:1px solid #e5e7eb;border-radius:8px;background:#fff;animation:chronos-timezone-list-appear .2s ease}@keyframes chronos-timezone-list-appear{0%{opacity:0;max-height:0}to{opacity:1;max-height:240px}}.chronos-timezone-option{display:flex;align-items:center;justify-content:space-between;width:100%;padding:10px 12px;border:none;border-bottom:1px solid #f3f4f6;background:transparent;text-align:left;cursor:pointer;transition:background .15s ease;outline:none}.chronos-timezone-option:last-child{border-bottom:none}.chronos-timezone-option:hover{background:#f9fafb}.chronos-timezone-option.selected{background:#eff6ff}.chronos-timezone-option:focus-visible{outline:2px solid #3b82f6;outline-offset:-2px}.chronos-timezone-option-label{font-weight:500;color:#1a1a1a}.chronos-timezone-option.selected .chronos-timezone-option-label{color:#3b82f6;font-weight:600}.chronos-timezone-option-offset{font-size:12px;color:#6b7280}@media (max-width: 480px){.chronos-dropdown{min-width:calc(100vw - 32px);max-width:calc(100vw - 32px)}.chronos-picker{max-width:100%}}.chronos-timezone-list::-webkit-scrollbar{width:6px}.chronos-timezone-list::-webkit-scrollbar-track{background:#f3f4f6}.chronos-timezone-list::-webkit-scrollbar-thumb{background:#d1d5db;border-radius:3px}.chronos-timezone-list::-webkit-scrollbar-thumb:hover{background:#9ca3af}.chronos-picker[data-theme=dark]{color:#f3f4f6}.chronos-picker[data-theme=dark] .chronos-dropdown[data-orientation=landscape] .chronos-calendar{border-right-color:#374151}.chronos-picker[data-theme=dark] .chronos-dropdown[data-orientation=landscape] .chronos-time-picker{border-bottom-color:#374151}.chronos-picker[data-theme=dark] .chronos-dropdown[data-orientation=portrait] .chronos-time-picker,.chronos-picker[data-theme=dark] .chronos-dropdown[data-orientation=portrait] .chronos-timezone-selector{border-top-color:#374151}.chronos-picker[data-theme=dark] .chronos-input{background-color:#1f2937;border-color:#374151;color:#f3f4f6}.chronos-picker[data-theme=dark] .chronos-input:hover:not(:disabled){border-color:#4b5563}.chronos-picker[data-theme=dark] .chronos-input:disabled{background-color:#111827}.chronos-picker[data-theme=dark] .chronos-input::placeholder{color:#6b7280}.chronos-picker[data-theme=dark] .chronos-calendar-icon{color:#9ca3af}.chronos-picker[data-theme=dark] .chronos-dropdown{background:#1f2937;border-color:#374151;box-shadow:0 10px 40px #0006}.chronos-picker[data-theme=dark] .chronos-nav-button{color:#9ca3af}.chronos-picker[data-theme=dark] .chronos-nav-button:hover{background:#374151;color:#f3f4f6}.chronos-picker[data-theme=dark] .chronos-month-select,.chronos-picker[data-theme=dark] .chronos-year-select{background-color:#1f2937;border-color:#374151;color:#f3f4f6}.chronos-picker[data-theme=dark] .chronos-weekday{color:#9ca3af}.chronos-picker[data-theme=dark] .chronos-day{color:#f3f4f6}.chronos-picker[data-theme=dark] .chronos-day:hover:not(.disabled){background:#374151}.chronos-picker[data-theme=dark] .chronos-day.other-month{color:#6b7280}.chronos-picker[data-theme=dark] .chronos-day.today{color:#60a5fa}.chronos-picker[data-theme=dark] .chronos-day.today:after{background:#60a5fa}.chronos-picker[data-theme=dark] .chronos-day.selected{background:#3b82f6;color:#fff}.chronos-picker[data-theme=dark] .chronos-range-nights{color:#f3f4f6}.chronos-picker[data-theme=dark] .chronos-range-dates{color:#9ca3af}.chronos-picker[data-theme=dark] .chronos-day.in-range{background:#374151}.chronos-picker[data-theme=dark] .chronos-day.in-range:hover{background:#4b5563}.chronos-picker[data-theme=dark] .chronos-day.range-start.selected,.chronos-picker[data-theme=dark] .chronos-day.range-end.selected{background:#3b82f6;color:#fff;box-shadow:0 0 0 2px #1f2937}.chronos-picker[data-theme=dark] .chronos-time-header,.chronos-picker[data-theme=dark] .chronos-timezone-header{color:#9ca3af}.chronos-picker[data-theme=dark] .chronos-time-select,.chronos-picker[data-theme=dark] .chronos-period-toggle,.chronos-picker[data-theme=dark] .chronos-timezone-button{background-color:#1f2937;border-color:#374151;color:#f3f4f6}.chronos-picker[data-theme=dark] .chronos-timezone-list{background:#1f2937;border-color:#374151}.chronos-picker[data-theme=dark] .chronos-timezone-option:hover{background:#374151}.chronos-picker[data-theme=dark] .chronos-timezone-option.selected{background:#1e3a5f}.chronos-picker[data-theme=dark] .chronos-timezone-option.selected .chronos-timezone-option-label{color:#60a5fa}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theengineerguy/chronos-picker",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "A modern, accessible date & time picker with comprehensive timezone support",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",