@stenajs-webui/calendar 21.0.0 → 21.0.1

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.es.js CHANGED
@@ -1,19 +1,19 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("._calendar_1b766_1{--swui-calendar-day-width: 48px;--swui-calendar-day-height: 48px;--swui-calendar-day-border-radius: var(--swui-max-border-radius);--swui-calendar-week-number-bg-color: transparent;--swui-calendar-week-number-text-color: var(--lhds-color-ui-500);--swui-calendar-week-number-clickable-text-color: var(--lhds-color-ui-500);--swui-calendar-week-day-text-color: var(--lhds-color-ui-500);--swui-calendar-week-day-clickable-text-color: var(--lhds-color-ui-500);--swui-calendar-wrapper-selected-border: var(--modern-red);--swui-calendar-wrapper-selected-background: var(--modern-red);--swui-calendar-wrapper-range-border: var(--lhds-color-red-100);--swui-calendar-wrapper-range-background: var(--lhds-color-red-100);--swui-calendar-wrapper-today-border: var(--lhds-color-ui-200);--swui-calendar-wrapper-today-background: var(--lhds-color-ui-50);--swui-calendar-text-selected-color: #fff;--swui-calendar-text-disabled-color: var(--swui-text-disabled-color);--swui-calendar-text-in-other-month-color: var(--swui-text-disabled-color)}._calendar_1b766_1 table{border-spacing:0 4px}._calendar_1b766_1 tr td:last-child{border-top-right-radius:var(--swui-calendar-day-border-radius);border-bottom-right-radius:var(--swui-calendar-day-border-radius)}._calendar_1b766_1._weekNumberVisible_1b766_41 tr td:nth-child(2),._calendar_1b766_1:not(._weekNumberVisible_1b766_41) tr td:first-child{border-top-left-radius:var(--swui-calendar-day-border-radius);border-bottom-left-radius:var(--swui-calendar-day-border-radius)}._calendar_1b766_1 td{padding:0;width:var(--swui-calendar-day-width);height:var(--swui-calendar-day-height)}._timePicker_1w05d_1{overflow:hidden;width:180px}._timePickerColumn_1w05d_6{overflow-y:hidden;flex:1}._timePickerColumn_1w05d_6:hover{overflow-y:scroll}._travelDateCell_h6vcn_1{position:relative}._travelDateCell_h6vcn_1._small_h6vcn_4{width:40px;height:40px}._travelDateCell_h6vcn_1._medium_h6vcn_9{width:48px;height:48px}._travelDateCell_h6vcn_1._large_h6vcn_14{width:56px;height:28px}._travelDateCell_h6vcn_1{border-radius:var(--swui-max-border-radius)}._travelDateCell_h6vcn_1:focus{outline:none}._travelDateCell_h6vcn_1:focus-visible ._outline_h6vcn_26{outline:var(--swui-focus-outline);outline-width:var(--swui-focus-outline-width);background:transparent;position:absolute;border-radius:var(--swui-max-border-radius);top:0;bottom:0;left:0;right:0;z-index:10}._travelDateCell_h6vcn_1:focus-visible ._contentWrapper_h6vcn_39._contentWrapper_h6vcn_39._contentWrapper_h6vcn_39{border-color:transparent}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39{cursor:pointer;border-radius:var(--swui-max-border-radius);border-width:2px;border-style:solid;border-color:transparent;background:transparent;position:absolute;display:flex;align-items:center;justify-content:center;left:0;right:0;top:0;bottom:0}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._disabled_h6vcn_60{cursor:not-allowed}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._isToday_h6vcn_63{border-color:var(--lhds-color-ui-400)}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._isSelectionStart_h6vcn_67,._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._isSelectionEnd_h6vcn_68{border-color:var(--modern-red)}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._isSelectionStart_h6vcn_67{background:var(--modern-red)}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._isSelectionStart_h6vcn_67 span{color:#fff}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._isSelectionEnd_h6vcn_68:not(._isSelectionStart_h6vcn_67){background:#fff}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._hover_h6vcn_83{border-color:var(--modern-red)}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._hover_h6vcn_83._startSelected_h6vcn_86:not(._endSelected_h6vcn_86):not(._isSelectionStart_h6vcn_67){background:#fff}._travelDateCell_h6vcn_1 ._contentWrapper_h6vcn_39._hover_h6vcn_83._startSelected_h6vcn_86:not(._endSelected_h6vcn_86):not(._isSelectionStart_h6vcn_67) span{color:var(--swui-text-primary-color)}._travelDateCellBackground_1k07m_1._small_1k07m_2{width:20px;height:40px}._travelDateCellBackground_1k07m_1._medium_1k07m_7{width:24px;height:48px}._travelDateCellBackground_1k07m_1._large_1k07m_12{width:28px;height:56px}._travelCalendar_18pjj_1{border-spacing:0 4px;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}._travelCalendar_18pjj_1 td{padding:0}._travelDateRangeInput_1j7rp_1 ._overlay_1j7rp_2{transition:opacity var(--swui-animation-time-fast) ease-in-out;opacity:1}._travelDateRangeInput_1j7rp_1 ._overlay_1j7rp_2:not(._travelDateRangeInput_1j7rp_1 ._overlay_1j7rp_2._calendarVisible_1j7rp_6){opacity:0}._travelDateInput_hmfbf_1 ._overlay_hmfbf_2{transition:opacity var(--swui-animation-time-fast) ease-in-out;opacity:1}._travelDateInput_hmfbf_1 ._overlay_hmfbf_2:not(._travelDateInput_hmfbf_1 ._overlay_hmfbf_2._calendarVisible_hmfbf_6){opacity:0}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
2
- import { jsx as o, jsxs as A, Fragment as ce } from "react/jsx-runtime";
3
- import { Box as N, Text as Dt, Clickable as Te, Row as H, Spacing as Ze, Column as C, Heading as _t, exhaustSwitchCase as ae, Space as Mt, Indent as It, SeparatorLine as Ve, parseIntElseUndefined as De, useBoolean as re, useDelayedFalse as be, useOnClickOutside as Ie } from "@stenajs-webui/core";
4
- import { FlatButton as q, stenaAngleDown as le, PrimaryButton as kt, stenaAngleLeft as tr, stenaAngleRight as er, SecondaryButton as lt, stenaAngleLeftDouble as rr, stenaArrowLeft as Ft, stenaArrowRight as Nt, stenaAngleRightDouble as nr, TextInputButton as sr, stenaCalendar as Rt, Icon as Re, stenaArrowWideRight as ir, stenaClock as xe, stenaAngleUp as or, CardBody as Ee } from "@stenajs-webui/elements";
5
- import { isAfter as z, eachDayOfInterval as Ae, isSameDay as L, endOfMonth as _e, startOfMonth as Ne, min as cr, addDays as K, max as ar, subDays as ut, format as v, getISOWeek as de, getDate as jt, startOfWeek as Ot, addWeeks as lr, getMonth as ft, getWeek as Le, getYear as xt, getISODay as dr, addHours as Ye, isBefore as st, parse as mt, addMonths as Lt, isSameMonth as it, addYears as ur, subMonths as ue, subYears as fr, setWeek as hr, isValid as mr } from "date-fns";
2
+ import { jsx as o, jsxs as E, Fragment as ce } from "react/jsx-runtime";
3
+ import { Box as N, Text as bt, Clickable as Te, Row as B, Spacing as Ze, Column as z, Heading as _t, exhaustSwitchCase as ae, Space as Mt, Indent as Rt, SeparatorLine as Ve, parseIntElseUndefined as De, useBoolean as re, useDelayedFalse as be, useOnClickOutside as Re } from "@stenajs-webui/core";
4
+ import { FlatButton as Q, stenaAngleDown as le, PrimaryButton as kt, stenaAngleLeft as tr, stenaAngleRight as er, SecondaryButton as dt, stenaAngleLeftDouble as rr, stenaArrowLeft as Ft, stenaArrowRight as Nt, stenaAngleRightDouble as nr, TextInputButton as sr, stenaCalendar as It, Icon as Ie, stenaArrowWideRight as ir, stenaClock as xe, stenaAngleUp as or, CardBody as Ee } from "@stenajs-webui/elements";
5
+ import { isAfter as G, eachDayOfInterval as Ae, isSameDay as L, endOfMonth as _e, startOfMonth as Ne, min as cr, addDays as J, max as ar, subDays as ft, format as $, getISOWeek as de, getDate as jt, startOfWeek as Ot, addWeeks as lr, getMonth as ht, getWeek as Le, getYear as xt, getISODay as dr, addHours as Ye, isBefore as it, parse as gt, addMonths as Lt, isSameMonth as ot, addYears as ur, subMonths as ue, subYears as fr, setWeek as hr, isValid as mr } from "date-fns";
6
6
  import { enGB as Ct, enUS as gr, deAT as pr, de as we, fr as Dr, es as br, sv as wr, pl as yr, da as Mr, nl as kr, nb as Sr } from "date-fns/locale";
7
- import { last as Tr, startCase as Et, chunk as Pe, debounce as Ir, padStart as Rr, range as fe } from "lodash-es";
7
+ import { last as Tr, startCase as Et, chunk as Pe, debounce as Rr, padStart as Ir, range as fe } from "lodash-es";
8
8
  import * as he from "react";
9
- import { useMemo as x, useRef as $, useEffect as Z, useCallback as D, useId as me, useState as R, useLayoutEffect as Be } from "react";
10
- import gt from "classnames";
9
+ import { useMemo as x, useRef as H, useEffect as et, useCallback as D, useId as me, useState as I, useLayoutEffect as Be } from "react";
10
+ import pt from "classnames";
11
11
  import Xt from "@emotion/styled";
12
- import { TextInput as pt, TextInputBox as xr, LabelledTextInput as Er } from "@stenajs-webui/forms";
12
+ import { TextInput as Dt, TextInputBox as xr, LabelledTextInput as Er } from "@stenajs-webui/forms";
13
13
  import { ControlledPopover as Yt } from "@stenajs-webui/tooltip";
14
14
  import { cssColor as Kt } from "@stenajs-webui/theme";
15
15
  import { useMaskedInput as Ar } from "@stenajs-webui/input-mask";
16
- const ot = {
16
+ const ct = {
17
17
  yearAndMonth: "yyyy-MM",
18
18
  fullDate: "yyyy-MM-dd",
19
19
  fullMonthName: "LLLL",
@@ -28,16 +28,16 @@ const ot = {
28
28
  monthAndDate: "MMM do"
29
29
  // Jan 2nd
30
30
  }, At = (t = {}, e, r) => {
31
- if (e && r && z(r, e))
31
+ if (e && r && G(r, e))
32
32
  return Ae({ start: e, end: r }).reduce(
33
33
  (s, i) => {
34
34
  const c = L(i, e), a = L(i, r);
35
- return dt(s, i, c ? ["selected", "selectedStart", "range"] : a ? ["selected", "selectedEnd", "range"] : ["range"]);
35
+ return ut(s, i, c ? ["selected", "selectedStart", "range"] : a ? ["selected", "selectedEnd", "range"] : ["range"]);
36
36
  },
37
37
  t
38
38
  );
39
39
  let n = t;
40
- return e && (n = dt(n, e, ["selected", "singleSelected"])), r && (n = dt(n, r, ["selected", "singleSelected"])), n;
40
+ return e && (n = ut(n, e, ["selected", "singleSelected"])), r && (n = ut(n, r, ["selected", "singleSelected"])), n;
41
41
  }, _r = (t = {}, e, r, n) => Nr(
42
42
  t,
43
43
  e,
@@ -46,10 +46,10 @@ const ot = {
46
46
  _e(n)
47
47
  ), Nr = (t = {}, e, r, n, s) => e && r ? At(
48
48
  t,
49
- ar([e, ut(n, 1)]),
50
- cr([r, K(s, 1)])
49
+ ar([e, ft(n, 1)]),
50
+ cr([r, J(s, 1)])
51
51
  ) : At(t, e, r), vs = (t, e, r) => {
52
- const n = v(e, ot.yearAndMonth), s = de(e), i = jt(e);
52
+ const n = $(e, ct.yearAndMonth), s = de(e), i = jt(e);
53
53
  return {
54
54
  ...t,
55
55
  [n]: {
@@ -64,7 +64,7 @@ const ot = {
64
64
  }
65
65
  };
66
66
  }, Os = (t, e, r) => {
67
- const n = v(e, ot.yearAndMonth), s = de(e), i = jt(e);
67
+ const n = $(e, ct.yearAndMonth), s = de(e), i = jt(e);
68
68
  return {
69
69
  ...t,
70
70
  [n]: {
@@ -80,7 +80,7 @@ const ot = {
80
80
  }
81
81
  }
82
82
  };
83
- }, dt = (t, e, r) => {
83
+ }, ut = (t, e, r) => {
84
84
  const n = e.getMonth() + 1, s = `${e.getFullYear()}-${n < 10 ? "0" : ""}${n}`, i = de(e), c = jt(e), a = t && t[s] && t[s][i] && t[s][i][c];
85
85
  return {
86
86
  ...t,
@@ -98,8 +98,8 @@ const ot = {
98
98
  }), Ws = (t, e, r) => {
99
99
  const n = e.days[0].date, s = n.getMonth() + 1, i = `${n.getFullYear()}-${s < 10 ? "0" : ""}${s}`, c = e.weekNumber;
100
100
  let a = t;
101
- e.days.forEach((h) => {
102
- a = dt(a, h.date, r);
101
+ e.days.forEach((m) => {
102
+ a = ut(a, m.date, r);
103
103
  });
104
104
  const l = a && a[i] ? a[i][c] : void 0, d = l && l.highlights ? [...l.highlights, ...r] : r, u = {
105
105
  ...l,
@@ -120,7 +120,7 @@ const ot = {
120
120
  return {
121
121
  ...At(t, r, n)
122
122
  };
123
- }, Yr = (t, e) => x(() => t ? dt(e, /* @__PURE__ */ new Date(), ["today"]) : e, [t, e]);
123
+ }, Yr = (t, e) => x(() => t ? ut(e, /* @__PURE__ */ new Date(), ["today"]) : e, [t, e]);
124
124
  var Pr = /* @__PURE__ */ ((t) => (t[t.JANUARY = 0] = "JANUARY", t[t.FEBRUARY = 1] = "FEBRUARY", t[t.MARCH = 2] = "MARCH", t[t.APRIL = 3] = "APRIL", t[t.MAY = 4] = "MAY", t[t.JUNE = 5] = "JUNE", t[t.JULY = 6] = "JULY", t[t.AUGUST = 7] = "AUGUST", t[t.SEPTEMBER = 8] = "SEPTEMBER", t[t.OCTOBER = 9] = "OCTOBER", t[t.NOVEMBER = 10] = "NOVEMBER", t[t.DECEMBER = 11] = "DECEMBER", t))(Pr || {}), Br = /* @__PURE__ */ ((t) => (t[t.SUNDAY = 0] = "SUNDAY", t[t.MONDAY = 1] = "MONDAY", t[t.TUESDAY = 2] = "TUESDAY", t[t.WEDNESDAY = 3] = "WEDNESDAY", t[t.THURSDAY = 4] = "THURSDAY", t[t.FRIDAY = 5] = "FRIDAY", t[t.SATURDAY = 6] = "SATURDAY", t))(Br || {});
125
125
  const ye = (t, e, r, n) => {
126
126
  const s = [];
@@ -132,9 +132,9 @@ const ye = (t, e, r, n) => {
132
132
  throw new Error("getMonthInYear() received NaN.");
133
133
  const n = t + Math.floor(e / 12), s = e % 12, i = new Date(n, s, 1);
134
134
  return {
135
- monthString: v(i, ot.yearAndMonth),
135
+ monthString: $(i, ct.yearAndMonth),
136
136
  name: Et(
137
- v(i, ot.fullMonthName, { locale: r })
137
+ $(i, ct.fullMonthName, { locale: r })
138
138
  ),
139
139
  year: n,
140
140
  monthInYear: s,
@@ -150,13 +150,13 @@ const ye = (t, e, r, n) => {
150
150
  }
151
151
  return c;
152
152
  }, ge = (t, e) => {
153
- const r = ft(K(t, 7)) !== ft(t);
153
+ const r = ht(J(t, 7)) !== ht(t);
154
154
  return {
155
155
  weekNumber: Le(t, { locale: e }),
156
- startMonth: ft(t),
156
+ startMonth: ht(t),
157
157
  startYear: xt(t),
158
- endMonth: ft(K(t, 6)),
159
- endYear: xt(K(t, 6)),
158
+ endMonth: ht(J(t, 6)),
159
+ endYear: xt(J(t, 6)),
160
160
  days: vr(t, e),
161
161
  isLastWeekOfMonth: r
162
162
  };
@@ -164,12 +164,12 @@ const ye = (t, e, r, n) => {
164
164
  const r = dr(t);
165
165
  return {
166
166
  date: t,
167
- name: v(t, "EEE", e ? { locale: e } : void 0),
168
- fullName: v(t, "EEEE", e ? { locale: e } : void 0),
169
- dateString: v(Ye(t, 12), ot.fullDate),
167
+ name: $(t, "EEE", e ? { locale: e } : void 0),
168
+ fullName: $(t, "EEEE", e ? { locale: e } : void 0),
169
+ dateString: $(Ye(t, 12), ct.fullDate),
170
170
  weekNumber: Le(t, { locale: e }),
171
171
  year: xt(t),
172
- month: ft(t),
172
+ month: ht(t),
173
173
  dayOfMonth: jt(t),
174
174
  dayOfWeek: r,
175
175
  isFirstDayOfWeek: r === 1,
@@ -179,11 +179,11 @@ const ye = (t, e, r, n) => {
179
179
  };
180
180
  }, vr = (t, e) => Ae({
181
181
  start: t,
182
- end: K(t, 6)
182
+ end: J(t, 6)
183
183
  }).map((r) => $r(r, e)), Or = (t, e) => e > 11 ? { year: t + Math.floor(e / 12), month: e % 12 } : e < 0 ? { year: t + Math.floor(e / 12), month: 12 + e % 12 } : { year: t, month: e }, Wr = "_calendar_1b766_1", Ur = "_weekNumberVisible_1b766_41", Me = {
184
184
  calendar: Wr,
185
185
  weekNumberVisible: Ur
186
- }, Fr = (t, e, r) => !!(e && e.indexOf(r) >= 0 || t && t.highlights && t.highlights.indexOf(r) >= 0), at = (t, e, r, n, s) => {
186
+ }, Fr = (t, e, r) => !!(e && e.indexOf(r) >= 0 || t && t.highlights && t.highlights.indexOf(r) >= 0), lt = (t, e, r, n, s) => {
187
187
  if (r.length !== n.length)
188
188
  throw new Error(
189
189
  "Select highlight failed, number of values do not equal number of highlights."
@@ -204,7 +204,7 @@ const ye = (t, e, r, n) => {
204
204
  rangeBackground: r,
205
205
  borderColor: n = "transparent"
206
206
  }) => (s, i, c, a, l) => ({
207
- backgroundColor: at(
207
+ backgroundColor: lt(
208
208
  i,
209
209
  s,
210
210
  ["selected", "range", "today", c.month === l.monthInYear],
@@ -213,7 +213,7 @@ const ye = (t, e, r, n) => {
213
213
  ),
214
214
  borderWidth: "1px",
215
215
  borderStyle: "solid",
216
- borderColor: at(
216
+ borderColor: lt(
217
217
  i,
218
218
  s,
219
219
  ["selectedStart", "selectedEnd", "singleSelected", "range", "today"],
@@ -226,7 +226,7 @@ const ye = (t, e, r, n) => {
226
226
  ],
227
227
  n
228
228
  ),
229
- borderTopLeftRadius: at(
229
+ borderTopLeftRadius: lt(
230
230
  i,
231
231
  s,
232
232
  ["selectedStart", "singleSelected", "today"],
@@ -237,7 +237,7 @@ const ye = (t, e, r, n) => {
237
237
  ],
238
238
  "unset"
239
239
  ),
240
- borderBottomLeftRadius: at(
240
+ borderBottomLeftRadius: lt(
241
241
  i,
242
242
  s,
243
243
  ["selectedStart", "singleSelected", "today"],
@@ -248,7 +248,7 @@ const ye = (t, e, r, n) => {
248
248
  ],
249
249
  "unset"
250
250
  ),
251
- borderTopRightRadius: at(
251
+ borderTopRightRadius: lt(
252
252
  i,
253
253
  s,
254
254
  ["selectedEnd", "singleSelected", "today"],
@@ -259,7 +259,7 @@ const ye = (t, e, r, n) => {
259
259
  ],
260
260
  "unset"
261
261
  ),
262
- borderBottomRightRadius: at(
262
+ borderBottomRightRadius: lt(
263
263
  i,
264
264
  s,
265
265
  ["selectedEnd", "singleSelected", "today"],
@@ -279,7 +279,7 @@ const ye = (t, e, r, n) => {
279
279
  }) => (s, i, c, a, l) => {
280
280
  const d = c.month !== l.monthInYear;
281
281
  return {
282
- color: at(
282
+ color: lt(
283
283
  i,
284
284
  s,
285
285
  [d, "selected", "range", "enabled", "disabled"],
@@ -292,7 +292,7 @@ const ye = (t, e, r, n) => {
292
292
  ]
293
293
  )
294
294
  };
295
- }, bt = {
295
+ }, wt = {
296
296
  width: "var(--swui-calendar-day-width)",
297
297
  height: "var(--swui-calendar-day-height)",
298
298
  WeekNumber: {
@@ -320,7 +320,7 @@ const ye = (t, e, r, n) => {
320
320
  headerTextColor: "var(--swui-calendar-week-day-text-color)"
321
321
  }
322
322
  }, Us = {
323
- ...bt,
323
+ ...wt,
324
324
  width: "37px",
325
325
  height: "37px"
326
326
  }, Kr = ({
@@ -336,7 +336,7 @@ const ye = (t, e, r, n) => {
336
336
  justifyContent: "center",
337
337
  alignItems: "center",
338
338
  children: /* @__PURE__ */ o(
339
- Dt,
339
+ bt,
340
340
  {
341
341
  size: "small",
342
342
  color: t ? r.WeekDay.clickableTextColor : r.WeekDay.textColor,
@@ -373,7 +373,7 @@ const ye = (t, e, r, n) => {
373
373
  justifyContent: "center",
374
374
  alignItems: "center",
375
375
  children: /* @__PURE__ */ o(
376
- Dt,
376
+ bt,
377
377
  {
378
378
  ...a.CalendarDay.textProps && a.CalendarDay.textProps(
379
379
  d,
@@ -387,7 +387,7 @@ const ye = (t, e, r, n) => {
387
387
  }
388
388
  )
389
389
  }
390
- ), h = Xt.td({
390
+ ), m = Xt.td({
391
391
  ...a.CalendarDay.tdStyle && a.CalendarDay.tdStyle(
392
392
  d,
393
393
  s,
@@ -407,7 +407,7 @@ const ye = (t, e, r, n) => {
407
407
  ),
408
408
  width: "100%",
409
409
  height: "100%"
410
- }), m = Xt.div({
410
+ }), h = Xt.div({
411
411
  ...a.CalendarDay.cellWrapperStyle && a.CalendarDay.cellWrapperStyle(
412
412
  d,
413
413
  s,
@@ -421,10 +421,10 @@ const ye = (t, e, r, n) => {
421
421
  position: "relative"
422
422
  }), g = zr(d, s);
423
423
  return /* @__PURE__ */ o(
424
- h,
424
+ m,
425
425
  {
426
- onClick: g ? void 0 : (p) => c == null ? void 0 : c(e, i, p),
427
- children: /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(m, { children: e.month === n.monthInYear && /* @__PURE__ */ A(ce, { children: [
426
+ onClick: g ? void 0 : (b) => c == null ? void 0 : c(e, i, b),
427
+ children: /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(h, { children: e.month === n.monthInYear && /* @__PURE__ */ E(ce, { children: [
428
428
  l && /* @__PURE__ */ o(
429
429
  l,
430
430
  {
@@ -440,7 +440,7 @@ const ye = (t, e, r, n) => {
440
440
  ] }) }) })
441
441
  }
442
442
  );
443
- }, zr = (t, e) => !!at(
443
+ }, zr = (t, e) => !!lt(
444
444
  e,
445
445
  t,
446
446
  ["disabled"],
@@ -454,7 +454,7 @@ const ye = (t, e, r, n) => {
454
454
  backgroundColor: s,
455
455
  prefix: i
456
456
  }) => {
457
- const c = /* @__PURE__ */ A(
457
+ const c = /* @__PURE__ */ E(
458
458
  N,
459
459
  {
460
460
  width: e.width,
@@ -463,8 +463,8 @@ const ye = (t, e, r, n) => {
463
463
  alignItems: "center",
464
464
  children: [
465
465
  n && /* @__PURE__ */ o(N, { position: "absolute", children: n }),
466
- /* @__PURE__ */ o(N, { position: "absolute", children: /* @__PURE__ */ A(
467
- Dt,
466
+ /* @__PURE__ */ o(N, { position: "absolute", children: /* @__PURE__ */ E(
467
+ bt,
468
468
  {
469
469
  color: t ? e.WeekNumber.clickableTextColor : e.WeekNumber.textColor,
470
470
  children: [
@@ -492,7 +492,7 @@ const ye = (t, e, r, n) => {
492
492
  ) : c
493
493
  }
494
494
  );
495
- }, Jr = (t, e, r) => e && st(t, e) ? L(t, e) : r && z(t, r) ? L(t, r) : !0, Gr = function({
495
+ }, Jr = (t, e, r) => e && it(t, e) ? L(t, e) : r && G(t, r) ? L(t, r) : !0, Gr = function({
496
496
  dayComponent: e,
497
497
  minDate: r,
498
498
  maxDate: n,
@@ -518,28 +518,28 @@ function Qr({
518
518
  onClickWeekDay: l,
519
519
  onClickMonth: d,
520
520
  renderWeekNumber: u,
521
- renderWeekDay: h,
521
+ renderWeekDay: m,
522
522
  headerRightContent: f,
523
- theme: m = bt,
523
+ theme: h = wt,
524
524
  extraDayContent: g,
525
- defaultHighlights: p,
526
- showWeekNumber: k
525
+ defaultHighlights: b,
526
+ showWeekNumber: M
527
527
  }) {
528
- return /* @__PURE__ */ o(ce, { children: /* @__PURE__ */ A(N, { alignItems: "stretch", children: [
529
- /* @__PURE__ */ A(
530
- H,
528
+ return /* @__PURE__ */ o(ce, { children: /* @__PURE__ */ E(N, { alignItems: "stretch", children: [
529
+ /* @__PURE__ */ E(
530
+ B,
531
531
  {
532
532
  justifyContent: f ? "space-between" : "center",
533
533
  alignItems: "center",
534
534
  children: [
535
- /* @__PURE__ */ o(H, { justifyContent: "center", alignItems: "center", children: d ? /* @__PURE__ */ o(
536
- q,
535
+ /* @__PURE__ */ o(B, { justifyContent: "center", alignItems: "center", children: d ? /* @__PURE__ */ o(
536
+ Q,
537
537
  {
538
538
  onClick: () => d(t),
539
539
  label: t.name + " " + String(t.year),
540
540
  rightIcon: le
541
541
  }
542
- ) : /* @__PURE__ */ A(Dt, { whiteSpace: "nowrap", children: [
542
+ ) : /* @__PURE__ */ E(bt, { whiteSpace: "nowrap", children: [
543
543
  t.name,
544
544
  " ",
545
545
  t.year
@@ -548,46 +548,46 @@ function Qr({
548
548
  ]
549
549
  }
550
550
  ),
551
- /* @__PURE__ */ o("table", { children: /* @__PURE__ */ A("tbody", { children: [
552
- /* @__PURE__ */ A("tr", { children: [
553
- k && /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(N, { width: m.width, height: m.height }) }),
554
- t.weeks[0].days.map((w) => /* @__PURE__ */ o("td", { children: h ? h(w.name, m, l) : /* @__PURE__ */ o(
551
+ /* @__PURE__ */ o("table", { children: /* @__PURE__ */ E("tbody", { children: [
552
+ /* @__PURE__ */ E("tr", { children: [
553
+ M && /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(N, { width: h.width, height: h.height }) }),
554
+ t.weeks[0].days.map((y) => /* @__PURE__ */ o("td", { children: m ? m(y.name, h, l) : /* @__PURE__ */ o(
555
555
  Kr,
556
556
  {
557
- day: w,
557
+ day: y,
558
558
  onClickWeekDay: l,
559
- theme: m
559
+ theme: h
560
560
  }
561
- ) }, w.name))
561
+ ) }, y.name))
562
562
  ] }),
563
- t.weeks.map((w) => /* @__PURE__ */ A("tr", { children: [
564
- k && /* @__PURE__ */ o("td", { children: u ? u(w, m, a) : /* @__PURE__ */ o(
563
+ t.weeks.map((y) => /* @__PURE__ */ E("tr", { children: [
564
+ M && /* @__PURE__ */ o("td", { children: u ? u(y, h, a) : /* @__PURE__ */ o(
565
565
  qr,
566
566
  {
567
- week: w,
567
+ week: y,
568
568
  onClickWeek: a,
569
- theme: m
569
+ theme: h
570
570
  }
571
571
  ) }),
572
- w.days.map((y) => /* @__PURE__ */ o(
572
+ y.days.map((w) => /* @__PURE__ */ o(
573
573
  Gr,
574
574
  {
575
575
  dayComponent: e,
576
- day: y,
577
- week: w,
576
+ day: w,
577
+ week: y,
578
578
  month: t,
579
- dayState: r && r[w.weekNumber] && r[w.weekNumber][y.dayOfMonth],
580
- userData: n && n[w.weekNumber] && n[w.weekNumber][y.dayOfMonth],
579
+ dayState: r && r[y.weekNumber] && r[y.weekNumber][w.dayOfMonth],
580
+ userData: n && n[y.weekNumber] && n[y.weekNumber][w.dayOfMonth],
581
581
  onClickDay: c,
582
- theme: m,
582
+ theme: h,
583
583
  extraDayContent: g,
584
- defaultHighlights: p,
584
+ defaultHighlights: b,
585
585
  minDate: s,
586
586
  maxDate: i
587
587
  },
588
- y.dateString
588
+ w.dateString
589
589
  ))
590
- ] }, w.weekNumber))
590
+ ] }, y.weekNumber))
591
591
  ] }) })
592
592
  ] }) });
593
593
  }
@@ -603,28 +603,28 @@ function Xr({
603
603
  onClickWeek: l,
604
604
  onClickMonth: d,
605
605
  renderWeekDay: u,
606
- renderWeekNumber: h,
606
+ renderWeekNumber: m,
607
607
  headerRightContent: f,
608
- extraDayContent: m,
608
+ extraDayContent: h,
609
609
  defaultHighlights: g,
610
- showWeekNumber: p,
611
- theme: k = bt
610
+ showWeekNumber: b,
611
+ theme: M = wt
612
612
  }) {
613
- const w = x(
614
- () => s ? mt(s, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
613
+ const y = x(
614
+ () => s ? gt(s, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
615
615
  [s]
616
- ), y = x(
617
- () => i ? mt(i, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
616
+ ), w = x(
617
+ () => i ? gt(i, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
618
618
  [i]
619
619
  );
620
620
  return /* @__PURE__ */ o(
621
621
  "div",
622
622
  {
623
- className: gt(
623
+ className: pt(
624
624
  Me.calendar,
625
- p && Me.weekNumberVisible
625
+ b && Me.weekNumberVisible
626
626
  ),
627
- children: t.map((b, M) => /* @__PURE__ */ o(Ze, { children: /* @__PURE__ */ o(H, { gap: 2, children: b.map((S) => /* @__PURE__ */ o(
627
+ children: t.map((p, k) => /* @__PURE__ */ o(Ze, { children: /* @__PURE__ */ o(B, { gap: 2, children: p.map((S) => /* @__PURE__ */ o(
628
628
  Qr,
629
629
  {
630
630
  month: S,
@@ -635,18 +635,18 @@ function Xr({
635
635
  onClickWeekDay: a,
636
636
  onClickWeek: l,
637
637
  onClickMonth: d,
638
- theme: k,
639
- renderWeekNumber: h,
638
+ theme: M,
639
+ renderWeekNumber: m,
640
640
  renderWeekDay: u,
641
641
  headerRightContent: f,
642
- extraDayContent: m,
642
+ extraDayContent: h,
643
643
  defaultHighlights: g,
644
- minDate: w,
645
- maxDate: y,
646
- showWeekNumber: p ?? !1
644
+ minDate: y,
645
+ maxDate: w,
646
+ showWeekNumber: b ?? !1
647
647
  },
648
648
  S.name
649
- )) }) }, M))
649
+ )) }) }, k))
650
650
  }
651
651
  );
652
652
  }
@@ -683,12 +683,12 @@ const Zr = (t, e, r) => {
683
683
  };
684
684
  if (r)
685
685
  return {
686
- month: ft(r),
686
+ month: ht(r),
687
687
  year: xt(r)
688
688
  };
689
689
  const n = /* @__PURE__ */ new Date();
690
690
  return {
691
- month: ft(n),
691
+ month: ht(n),
692
692
  year: xt(n)
693
693
  };
694
694
  }, Vr = (t, e, r, n, s) => n == null ? [[zt(t, e, r)]] : s == null ? [ye(t, e, n, r)] : Pe(ye(t, e, n, r), s), ve = (t, e) => `${t.row}-${t.column}-${e}`, tn = (t, e, r, n) => {
@@ -716,33 +716,33 @@ const Zr = (t, e, r) => {
716
716
  size: a
717
717
  }) => {
718
718
  const l = x(
719
- () => Et(v(t, "MMM", { locale: n })),
719
+ () => Et($(t, "MMM", { locale: n })),
720
720
  [n, t]
721
721
  ), d = x(
722
- () => Et(v(t, "MMMM", { locale: n })),
722
+ () => Et($(t, "MMMM", { locale: n })),
723
723
  [n, t]
724
- ), u = $(null), h = ve(c, i), f = r ? 0 : -1;
725
- Z(() => {
724
+ ), u = H(null), m = ve(c, i), f = r ? 0 : -1;
725
+ et(() => {
726
726
  var g;
727
727
  (g = u.current) == null || g.focus();
728
728
  }, []);
729
- const m = D(
729
+ const h = D(
730
730
  (g) => {
731
- var k;
732
- const p = tn(
731
+ var M;
732
+ const b = tn(
733
733
  g.key,
734
734
  c,
735
735
  i,
736
736
  4
737
737
  );
738
- p && ((k = document.getElementById(p)) == null || k.focus());
738
+ b && ((M = document.getElementById(b)) == null || M.focus());
739
739
  },
740
740
  [i, c]
741
741
  );
742
- return /* @__PURE__ */ o(H, { justifyContent: "center", onKeyDown: m, children: r ? /* @__PURE__ */ o(
742
+ return /* @__PURE__ */ o(B, { justifyContent: "center", onKeyDown: h, children: r ? /* @__PURE__ */ o(
743
743
  kt,
744
744
  {
745
- id: h,
745
+ id: m,
746
746
  "aria-label": d,
747
747
  label: l,
748
748
  onClick: e,
@@ -753,9 +753,9 @@ const Zr = (t, e, r) => {
753
753
  tabIndex: f
754
754
  }
755
755
  ) : /* @__PURE__ */ o(
756
- q,
756
+ Q,
757
757
  {
758
- id: h,
758
+ id: m,
759
759
  label: l,
760
760
  "aria-label": d,
761
761
  onClick: e,
@@ -798,39 +798,39 @@ const Zr = (t, e, r) => {
798
798
  onCancel: i,
799
799
  size: c = "medium"
800
800
  }) => {
801
- const a = me(), l = pe(), d = s > 0 ? s : 12, [u, h] = R(!1), f = nn(n, d, on(c)), m = x(() => Lt(n, d), [d, n]);
802
- Z(() => {
803
- h(!0);
801
+ const a = me(), l = pe(), d = s > 0 ? s : 12, [u, m] = I(!1), f = nn(n, d, on(c)), h = x(() => Lt(n, d), [d, n]);
802
+ et(() => {
803
+ m(!0);
804
804
  }, []);
805
805
  const g = D(
806
- (p) => {
807
- p.key === "Escape" && (i == null || i(), p.preventDefault(), p.stopPropagation());
806
+ (b) => {
807
+ b.key === "Escape" && (i == null || i(), b.preventDefault(), b.stopPropagation());
808
808
  },
809
809
  [i]
810
810
  );
811
- return /* @__PURE__ */ o(C, { gap: 1, maxWidth: sn(c), onKeyDown: g, children: f.yearOrder.map((p, k) => {
812
- const { rows: w } = f.years[p];
813
- return /* @__PURE__ */ A(he.Fragment, { children: [
814
- (k !== 0 || p !== l.getFullYear()) && /* @__PURE__ */ o(_t, { variant: "h4", children: p }),
815
- /* @__PURE__ */ o("table", { style: { borderSpacing: "0 8px" }, children: /* @__PURE__ */ o("tbody", { children: w.map((y) => {
816
- const { columns: b } = f.rows[y];
817
- return /* @__PURE__ */ o("tr", { children: b.map(({ month: M, position: S }) => /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(
811
+ return /* @__PURE__ */ o(z, { gap: 1, maxWidth: sn(c), onKeyDown: g, children: f.yearOrder.map((b, M) => {
812
+ const { rows: y } = f.years[b];
813
+ return /* @__PURE__ */ E(he.Fragment, { children: [
814
+ (M !== 0 || b !== l.getFullYear()) && /* @__PURE__ */ o(_t, { variant: "h4", children: b }),
815
+ /* @__PURE__ */ o("table", { style: { borderSpacing: "0 8px" }, children: /* @__PURE__ */ o("tbody", { children: y.map((w) => {
816
+ const { columns: p } = f.rows[w];
817
+ return /* @__PURE__ */ o("tr", { children: p.map(({ month: k, position: S }) => /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(
818
818
  rn,
819
819
  {
820
- month: M,
820
+ month: k,
821
821
  firstAvailableMonth: n,
822
- lastAvailableMonth: m,
822
+ lastAvailableMonth: h,
823
823
  locale: r,
824
- selected: t ? it(t, M) : !1,
824
+ selected: t ? ot(t, k) : !1,
825
825
  autoFocus: u,
826
- onClick: () => e == null ? void 0 : e(M),
826
+ onClick: () => e == null ? void 0 : e(k),
827
827
  monthPickerId: a,
828
828
  position: S,
829
829
  size: c
830
830
  }
831
- ) }, M.getMonth())) }, y);
831
+ ) }, k.getMonth())) }, w);
832
832
  }) }) })
833
- ] }, p);
833
+ ] }, b);
834
834
  }) });
835
835
  }, sn = (t) => {
836
836
  switch (t) {
@@ -858,35 +858,35 @@ const Zr = (t, e, r) => {
858
858
  {
859
859
  label: "Past",
860
860
  presets: [
861
- { label: "Last 3 days", startDate: t, endDate: ut(t, 2) },
862
- { label: "Last 7 days", startDate: t, endDate: ut(t, 6) },
863
- { label: "Last 30 days", startDate: t, endDate: ut(t, 29) },
864
- { label: "Last 45 days", startDate: t, endDate: ut(t, 44) }
861
+ { label: "Last 3 days", startDate: t, endDate: ft(t, 2) },
862
+ { label: "Last 7 days", startDate: t, endDate: ft(t, 6) },
863
+ { label: "Last 30 days", startDate: t, endDate: ft(t, 29) },
864
+ { label: "Last 45 days", startDate: t, endDate: ft(t, 44) }
865
865
  ]
866
866
  },
867
867
  {
868
868
  label: "Future",
869
869
  presets: [
870
- { label: "Next 3 days", startDate: t, endDate: K(t, 2) },
871
- { label: "Next 7 days", startDate: t, endDate: K(t, 6) },
872
- { label: "Next 30 days", startDate: t, endDate: K(t, 29) },
873
- { label: "Next 45 days", startDate: t, endDate: K(t, 44) }
870
+ { label: "Next 3 days", startDate: t, endDate: J(t, 2) },
871
+ { label: "Next 7 days", startDate: t, endDate: J(t, 6) },
872
+ { label: "Next 30 days", startDate: t, endDate: J(t, 29) },
873
+ { label: "Next 45 days", startDate: t, endDate: J(t, 44) }
874
874
  ]
875
875
  }
876
876
  ], an = ({
877
877
  onClickPreset: t
878
878
  }) => {
879
- const [e, r] = R(0), n = x(() => cn(/* @__PURE__ */ new Date()), []), s = n[e] ?? n[0];
880
- return /* @__PURE__ */ A(C, { children: [
881
- /* @__PURE__ */ A(
882
- H,
879
+ const [e, r] = I(0), n = x(() => cn(/* @__PURE__ */ new Date()), []), s = n[e] ?? n[0];
880
+ return /* @__PURE__ */ E(z, { children: [
881
+ /* @__PURE__ */ E(
882
+ B,
883
883
  {
884
884
  justifyContent: "space-between",
885
885
  alignItems: "center",
886
886
  width: "200px",
887
887
  children: [
888
888
  /* @__PURE__ */ o(
889
- q,
889
+ Q,
890
890
  {
891
891
  size: "small",
892
892
  leftIcon: tr,
@@ -894,9 +894,9 @@ const Zr = (t, e, r) => {
894
894
  onClick: () => r(e - 1)
895
895
  }
896
896
  ),
897
- /* @__PURE__ */ o(Dt, { children: s.label }),
897
+ /* @__PURE__ */ o(bt, { children: s.label }),
898
898
  /* @__PURE__ */ o(
899
- q,
899
+ Q,
900
900
  {
901
901
  size: "small",
902
902
  leftIcon: er,
@@ -908,7 +908,7 @@ const Zr = (t, e, r) => {
908
908
  }
909
909
  ),
910
910
  /* @__PURE__ */ o(Mt, {}),
911
- /* @__PURE__ */ o(C, { alignItems: "center", children: s.presets.map((i) => /* @__PURE__ */ A(he.Fragment, { children: [
911
+ /* @__PURE__ */ o(z, { alignItems: "center", children: s.presets.map((i) => /* @__PURE__ */ E(he.Fragment, { children: [
912
912
  /* @__PURE__ */ o(
913
913
  kt,
914
914
  {
@@ -1003,21 +1003,21 @@ const Zr = (t, e, r) => {
1003
1003
  nextMonth: r,
1004
1004
  prevYear: n,
1005
1005
  nextYear: s
1006
- }) => /* @__PURE__ */ A("div", { children: [
1006
+ }) => /* @__PURE__ */ E("div", { children: [
1007
1007
  t,
1008
- /* @__PURE__ */ o(It, { children: /* @__PURE__ */ A(H, { gap: 1, children: [
1009
- /* @__PURE__ */ o(lt, { onClick: n, leftIcon: rr }),
1010
- /* @__PURE__ */ o(lt, { onClick: e, leftIcon: Ft }),
1011
- /* @__PURE__ */ o(It, { num: 2 }),
1012
- /* @__PURE__ */ o(lt, { onClick: r, leftIcon: Nt }),
1013
- /* @__PURE__ */ o(lt, { onClick: s, leftIcon: nr })
1008
+ /* @__PURE__ */ o(Rt, { children: /* @__PURE__ */ E(B, { gap: 1, children: [
1009
+ /* @__PURE__ */ o(dt, { onClick: n, leftIcon: rr }),
1010
+ /* @__PURE__ */ o(dt, { onClick: e, leftIcon: Ft }),
1011
+ /* @__PURE__ */ o(Rt, { num: 2 }),
1012
+ /* @__PURE__ */ o(dt, { onClick: r, leftIcon: Nt }),
1013
+ /* @__PURE__ */ o(dt, { onClick: s, leftIcon: nr })
1014
1014
  ] }) }),
1015
1015
  /* @__PURE__ */ o(Mt, {})
1016
1016
  ] }), fn = () => {
1017
1017
  };
1018
- function wt({
1018
+ function yt({
1019
1019
  monthSwitcherPlacement: t,
1020
- theme: e = bt,
1020
+ theme: e = wt,
1021
1021
  dateInFocus: r,
1022
1022
  setDateInFocus: n,
1023
1023
  currentPanel: s,
@@ -1026,7 +1026,7 @@ function wt({
1026
1026
  renderMonthPicker: a,
1027
1027
  ...l
1028
1028
  }) {
1029
- const { nextMonth: d, prevMonth: u, nextYear: h, prevYear: f } = dn(
1029
+ const { nextMonth: d, prevMonth: u, nextYear: m, prevYear: f } = dn(
1030
1030
  r,
1031
1031
  n,
1032
1032
  l.monthsPerRow,
@@ -1043,13 +1043,13 @@ function wt({
1043
1043
  theme: e,
1044
1044
  nextMonth: d,
1045
1045
  prevMonth: u,
1046
- nextYear: h,
1046
+ nextYear: m,
1047
1047
  prevYear: f,
1048
1048
  children: /* @__PURE__ */ o(ne, { ...l, theme: e, date: r })
1049
1049
  }
1050
1050
  );
1051
1051
  case "header":
1052
- return /* @__PURE__ */ o(C, { children: /* @__PURE__ */ o(
1052
+ return /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o(
1053
1053
  ln,
1054
1054
  {
1055
1055
  ...l,
@@ -1060,16 +1060,16 @@ function wt({
1060
1060
  currentPanel: s,
1061
1061
  setCurrentPanel: i,
1062
1062
  onSelectPreset: c,
1063
- headerRightContent: /* @__PURE__ */ A(H, { alignItems: "center", gap: 1, children: [
1063
+ headerRightContent: /* @__PURE__ */ E(B, { alignItems: "center", gap: 1, children: [
1064
1064
  /* @__PURE__ */ o(
1065
- lt,
1065
+ dt,
1066
1066
  {
1067
1067
  onClick: u,
1068
1068
  leftIcon: Ft
1069
1069
  }
1070
1070
  ),
1071
1071
  /* @__PURE__ */ o(
1072
- lt,
1072
+ dt,
1073
1073
  {
1074
1074
  onClick: d,
1075
1075
  leftIcon: Nt
@@ -1083,21 +1083,21 @@ function wt({
1083
1083
  }
1084
1084
  }
1085
1085
  const hn = (t, e) => t || (e || 1) > 1 ? "below" : "header", mn = (t) => ({
1086
- startDate: t.startDate ? v(t.startDate, "yyyy-MM-dd") : void 0,
1087
- endDate: t.endDate ? v(t.endDate, "yyyy-MM-dd") : void 0
1086
+ startDate: t.startDate ? $(t.startDate, "yyyy-MM-dd") : void 0,
1087
+ endDate: t.endDate ? $(t.endDate, "yyyy-MM-dd") : void 0
1088
1088
  }), gn = ({
1089
1089
  startDate: t,
1090
1090
  endDate: e
1091
1091
  }) => {
1092
1092
  const r = /* @__PURE__ */ new Date();
1093
1093
  return {
1094
- startDate: t ? mt(t, "yyyy-MM-dd", r) : void 0,
1095
- endDate: e ? mt(e, "yyyy-MM-dd", r) : void 0
1094
+ startDate: t ? gt(t, "yyyy-MM-dd", r) : void 0,
1095
+ endDate: e ? gt(e, "yyyy-MM-dd", r) : void 0
1096
1096
  };
1097
1097
  }, Oe = ({
1098
1098
  startDate: t,
1099
1099
  endDate: e
1100
- }) => !!(t && e && !L(t, e) && z(t, e)), We = (t) => Oe(t) ? {
1100
+ }) => !!(t && e && !L(t, e) && G(t, e)), We = (t) => Oe(t) ? {
1101
1101
  startDate: t.endDate,
1102
1102
  endDate: t.startDate
1103
1103
  } : t, Fs = (t) => t.startDate && t.endDate ? mn(
@@ -1118,7 +1118,7 @@ const hn = (t, e) => t || (e || 1) > 1 ? "below" : "header", mn = (t) => ({
1118
1118
  t == null ? void 0 : t.startDate
1119
1119
  ]
1120
1120
  ), qt = (t) => {
1121
- const [e, r] = R("calendar"), n = D(
1121
+ const [e, r] = I("calendar"), n = D(
1122
1122
  (s) => {
1123
1123
  r(s), t == null || t(s);
1124
1124
  },
@@ -1137,9 +1137,9 @@ const hn = (t, e) => t || (e || 1) > 1 ? "below" : "header", mn = (t) => ({
1137
1137
  onChangePanel: i,
1138
1138
  initialDateInFocus: c
1139
1139
  }) => {
1140
- const { currentPanel: a, setCurrentPanel: l } = qt(i), [d, u] = R(
1140
+ const { currentPanel: a, setCurrentPanel: l } = qt(i), [d, u] = I(
1141
1141
  () => c ?? /* @__PURE__ */ new Date()
1142
- ), h = pn(
1142
+ ), m = pn(
1143
1143
  e,
1144
1144
  r,
1145
1145
  t,
@@ -1153,7 +1153,7 @@ const hn = (t, e) => t || (e || 1) > 1 ? "below" : "header", mn = (t) => ({
1153
1153
  [s, e == null ? void 0 : e.endDate, e == null ? void 0 : e.startDate]
1154
1154
  );
1155
1155
  return {
1156
- onClickDay: h,
1156
+ onClickDay: m,
1157
1157
  statePerMonth: f,
1158
1158
  currentPanel: a,
1159
1159
  setCurrentPanel: l,
@@ -1163,10 +1163,10 @@ const hn = (t, e) => t || (e || 1) > 1 ? "below" : "header", mn = (t) => ({
1163
1163
  };
1164
1164
  function js(t) {
1165
1165
  const e = Dn(t);
1166
- return /* @__PURE__ */ o(wt, { ...t, ...e });
1166
+ return /* @__PURE__ */ o(yt, { ...t, ...e });
1167
1167
  }
1168
1168
  const Cs = () => {
1169
- const [t, e] = R(), [r, n] = R(), [s, i] = R("startDate");
1169
+ const [t, e] = I(), [r, n] = I(), [s, i] = I("startDate");
1170
1170
  return {
1171
1171
  startDate: t,
1172
1172
  setStartDate: e,
@@ -1181,13 +1181,13 @@ const Cs = () => {
1181
1181
  statePerMonth: r,
1182
1182
  onChangePanel: n
1183
1183
  }) => {
1184
- const { currentPanel: s, setCurrentPanel: i } = qt(n), [c, a] = R(() => e ?? /* @__PURE__ */ new Date()), l = D(
1184
+ const { currentPanel: s, setCurrentPanel: i } = qt(n), [c, a] = I(() => e ?? /* @__PURE__ */ new Date()), l = D(
1185
1185
  (u) => {
1186
1186
  t && t(u.date);
1187
1187
  },
1188
1188
  [t]
1189
1189
  ), d = x(
1190
- () => e ? dt(r, e, [
1190
+ () => e ? ut(r, e, [
1191
1191
  "selected",
1192
1192
  "singleSelected"
1193
1193
  ]) : r,
@@ -1205,7 +1205,7 @@ const Cs = () => {
1205
1205
  };
1206
1206
  function Ue(t) {
1207
1207
  const e = bn(t);
1208
- return /* @__PURE__ */ o(wt, { ...t, ...e });
1208
+ return /* @__PURE__ */ o(yt, { ...t, ...e });
1209
1209
  }
1210
1210
  const wn = ({
1211
1211
  onChange: t,
@@ -1213,16 +1213,16 @@ const wn = ({
1213
1213
  statePerMonth: r,
1214
1214
  onChangePanel: n
1215
1215
  }) => {
1216
- const { currentPanel: s, setCurrentPanel: i } = qt(n), [c, a] = R(() => /* @__PURE__ */ new Date()), l = D(
1216
+ const { currentPanel: s, setCurrentPanel: i } = qt(n), [c, a] = I(() => /* @__PURE__ */ new Date()), l = D(
1217
1217
  (u) => {
1218
1218
  if (!t)
1219
1219
  return;
1220
- const h = e && e.find((f) => L(f, u.date));
1221
- t(e && h ? e.filter((f) => !L(f, u.date)) : [...e || [], u.date]);
1220
+ const m = e && e.find((f) => L(f, u.date));
1221
+ t(e && m ? e.filter((f) => !L(f, u.date)) : [...e || [], u.date]);
1222
1222
  },
1223
1223
  [t, e]
1224
1224
  ), d = x(() => e ? e.reduce(
1225
- (u, h) => dt(u, h, ["selected"]),
1225
+ (u, m) => ut(u, m, ["selected"]),
1226
1226
  r
1227
1227
  ) : r, [r, e]);
1228
1228
  return {
@@ -1236,7 +1236,7 @@ const wn = ({
1236
1236
  };
1237
1237
  function Ks(t) {
1238
1238
  const e = wn(t);
1239
- return /* @__PURE__ */ o(wt, { ...t, ...e });
1239
+ return /* @__PURE__ */ o(yt, { ...t, ...e });
1240
1240
  }
1241
1241
  const yn = ({
1242
1242
  onChange: t,
@@ -1245,28 +1245,28 @@ const yn = ({
1245
1245
  onChangePanel: n,
1246
1246
  locale: s = Ct
1247
1247
  }) => {
1248
- const [i, c] = R(() => {
1249
- const m = Zt(e, s);
1250
- return m ? m.days[0].date : /* @__PURE__ */ new Date();
1248
+ const [i, c] = I(() => {
1249
+ const h = Zt(e, s);
1250
+ return h ? h.days[0].date : /* @__PURE__ */ new Date();
1251
1251
  }), { currentPanel: a, setCurrentPanel: l } = qt(n), d = D(
1252
- (m) => {
1253
- t && t(ke(ge(m.date, s)));
1252
+ (h) => {
1253
+ t && t(ke(ge(h.date, s)));
1254
1254
  },
1255
1255
  [s, t]
1256
1256
  ), u = D(
1257
- (m) => {
1258
- t && t(ke(m));
1257
+ (h) => {
1258
+ t && t(ke(h));
1259
1259
  },
1260
1260
  [t]
1261
- ), h = x(() => {
1262
- const m = Zt(e, s);
1263
- return m ? Lr(r, m) : r;
1261
+ ), m = x(() => {
1262
+ const h = Zt(e, s);
1263
+ return h ? Lr(r, h) : r;
1264
1264
  }, [e, s, r]), f = x(() => {
1265
- const m = Zt(e, s);
1266
- return m ? m.days[0].date : /* @__PURE__ */ new Date();
1265
+ const h = Zt(e, s);
1266
+ return h ? h.days[0].date : /* @__PURE__ */ new Date();
1267
1267
  }, [s, e]);
1268
1268
  return {
1269
- statePerMonth: h,
1269
+ statePerMonth: m,
1270
1270
  date: f,
1271
1271
  dateInFocus: i,
1272
1272
  setDateInFocus: c,
@@ -1288,10 +1288,10 @@ const yn = ({
1288
1288
  };
1289
1289
  function zs(t) {
1290
1290
  const e = yn(t);
1291
- return /* @__PURE__ */ o(wt, { ...t, ...e });
1291
+ return /* @__PURE__ */ o(yt, { ...t, ...e });
1292
1292
  }
1293
1293
  const Bt = "bottom", Mn = (t, e, r) => {
1294
- const [n, s] = R(r || !1), i = D(() => (s(!0), !0), [s]), c = D(() => {
1294
+ const [n, s] = I(r || !1), i = D(() => (s(!0), !0), [s]), c = D(() => {
1295
1295
  s(!1), e && e();
1296
1296
  }, [s, e]), a = D(
1297
1297
  (l) => {
@@ -1306,10 +1306,10 @@ const Bt = "bottom", Mn = (t, e, r) => {
1306
1306
  onSelectDate: a
1307
1307
  };
1308
1308
  }, Ht = "2999-12-31", qs = ({
1309
- displayFormat: t = ot.fullDate,
1309
+ displayFormat: t = ct.fullDate,
1310
1310
  placeholder: e = "Enter date",
1311
1311
  value: r,
1312
- calendarTheme: n = bt,
1312
+ calendarTheme: n = wt,
1313
1313
  calendarProps: s,
1314
1314
  openOnMount: i,
1315
1315
  onClose: c,
@@ -1317,30 +1317,30 @@ const Bt = "bottom", Mn = (t, e, r) => {
1317
1317
  variant: l,
1318
1318
  width: d,
1319
1319
  minDate: u,
1320
- maxDate: h = Ht,
1320
+ maxDate: m = Ht,
1321
1321
  disabled: f
1322
1322
  }) => {
1323
- const { hideCalendar: m, showingCalendar: g, onSelectDate: p, showCalendar: k } = Mn(a, c, i);
1323
+ const { hideCalendar: h, showingCalendar: g, onSelectDate: b, showCalendar: M } = Mn(a, c, i);
1324
1324
  return /* @__PURE__ */ o(N, { width: d, children: /* @__PURE__ */ o(
1325
1325
  Yt,
1326
1326
  {
1327
1327
  hideArrow: !0,
1328
1328
  open: g,
1329
- onRequestClose: m,
1330
- renderTrigger: (w) => /* @__PURE__ */ o(N, { ...w, children: /* @__PURE__ */ o(
1331
- pt,
1329
+ onRequestClose: h,
1330
+ renderTrigger: (y) => /* @__PURE__ */ o(N, { ...y, children: /* @__PURE__ */ o(
1331
+ Dt,
1332
1332
  {
1333
1333
  type: "date",
1334
- onFocus: k,
1335
- buttonRight: /* @__PURE__ */ o(sr, { onClick: k, icon: Rt }),
1336
- value: r ? v(r, t) : "",
1334
+ onFocus: M,
1335
+ buttonRight: /* @__PURE__ */ o(sr, { onClick: M, icon: It }),
1336
+ value: r ? $(r, t) : "",
1337
1337
  placeholder: e,
1338
1338
  size: 9,
1339
1339
  disabled: f,
1340
1340
  autoFocus: i,
1341
1341
  variant: l,
1342
1342
  min: u,
1343
- max: h
1343
+ max: m
1344
1344
  }
1345
1345
  ) }),
1346
1346
  placement: Bt,
@@ -1348,31 +1348,31 @@ const Bt = "bottom", Mn = (t, e, r) => {
1348
1348
  Ue,
1349
1349
  {
1350
1350
  ...s,
1351
- onChange: p,
1351
+ onChange: b,
1352
1352
  value: r,
1353
1353
  theme: n,
1354
1354
  minDate: u,
1355
- maxDate: h
1355
+ maxDate: m
1356
1356
  }
1357
1357
  )
1358
1358
  }
1359
1359
  ) });
1360
1360
  }, kn = (t, e) => {
1361
- const r = $(null), n = $(null), [s, i] = R(!1), [c, a] = R(void 0), l = D(() => (a("startDate"), i(!0), !0), [a, i]), d = D(() => (a("endDate"), i(!0), !0), [a, i]), u = D(() => {
1361
+ const r = H(null), n = H(null), [s, i] = I(!1), [c, a] = I(void 0), l = D(() => (a("startDate"), i(!0), !0), [a, i]), d = D(() => (a("endDate"), i(!0), !0), [a, i]), u = D(() => {
1362
1362
  i(!1);
1363
- }, [i]), h = D(
1364
- (m) => {
1363
+ }, [i]), m = D(
1364
+ (h) => {
1365
1365
  c === "startDate" ? (e == null || e({
1366
- startDate: m.date,
1366
+ startDate: h.date,
1367
1367
  endDate: t == null ? void 0 : t.endDate
1368
1368
  }), t != null && t.endDate ? setTimeout(u, 150) : (a("endDate"), n.current && n.current.focus())) : c === "endDate" && (e == null || e({
1369
1369
  startDate: t == null ? void 0 : t.startDate,
1370
- endDate: m.date
1370
+ endDate: h.date
1371
1371
  }), t != null && t.startDate ? setTimeout(u, 150) : (a("startDate"), r.current && r.current.focus()));
1372
1372
  },
1373
1373
  [c, e, a, u, t]
1374
1374
  ), f = x(
1375
- () => (t == null ? void 0 : t.startDate) && (t == null ? void 0 : t.endDate) && z(t.startDate, t.endDate),
1375
+ () => (t == null ? void 0 : t.startDate) && (t == null ? void 0 : t.endDate) && G(t.startDate, t.endDate),
1376
1376
  [t == null ? void 0 : t.startDate, t == null ? void 0 : t.endDate]
1377
1377
  );
1378
1378
  return {
@@ -1384,36 +1384,36 @@ const Bt = "bottom", Mn = (t, e, r) => {
1384
1384
  setFocusedInput: a,
1385
1385
  startDateInputRef: r,
1386
1386
  endDateInputRef: n,
1387
- onClickDay: h,
1387
+ onClickDay: m,
1388
1388
  startDateIsAfterEnd: f
1389
1389
  };
1390
1390
  };
1391
1391
  function Js({
1392
- displayFormat: t = ot.fullDate,
1392
+ displayFormat: t = ct.fullDate,
1393
1393
  placeholderStartDate: e = "Start date",
1394
1394
  placeholderEndDate: r = "End date",
1395
1395
  value: n,
1396
1396
  onValueChange: s,
1397
1397
  width: i,
1398
- calendarTheme: c = bt,
1398
+ calendarTheme: c = wt,
1399
1399
  calendarProps: a,
1400
1400
  minDate: l,
1401
1401
  maxDate: d = Ht,
1402
1402
  disabled: u
1403
1403
  }) {
1404
- const [h, f] = R("calendar"), {
1405
- hideCalendar: m,
1404
+ const [m, f] = I("calendar"), {
1405
+ hideCalendar: h,
1406
1406
  showCalendarEndDate: g,
1407
- showCalendarStartDate: p,
1408
- showingCalendar: k,
1409
- focusedInput: w,
1410
- startDateInputRef: y,
1411
- endDateInputRef: b,
1412
- onClickDay: M,
1407
+ showCalendarStartDate: b,
1408
+ showingCalendar: M,
1409
+ focusedInput: y,
1410
+ startDateInputRef: w,
1411
+ endDateInputRef: p,
1412
+ onClickDay: k,
1413
1413
  startDateIsAfterEnd: S
1414
- } = kn(n, s), [B, _] = R(
1415
- () => (w && (n == null ? void 0 : n[w])) ?? /* @__PURE__ */ new Date()
1416
- ), I = x(
1414
+ } = kn(n, s), [A, Y] = I(
1415
+ () => (y && (n == null ? void 0 : n[y])) ?? /* @__PURE__ */ new Date()
1416
+ ), T = x(
1417
1417
  () => At(void 0, n == null ? void 0 : n.startDate, n == null ? void 0 : n.endDate),
1418
1418
  [n]
1419
1419
  );
@@ -1421,24 +1421,24 @@ function Js({
1421
1421
  Yt,
1422
1422
  {
1423
1423
  hideArrow: !0,
1424
- renderTrigger: (Y) => /* @__PURE__ */ A(H, { alignItems: "center", ...Y, children: [
1424
+ renderTrigger: (P) => /* @__PURE__ */ E(B, { alignItems: "center", ...P, children: [
1425
1425
  /* @__PURE__ */ o(
1426
- pt,
1426
+ Dt,
1427
1427
  {
1428
- iconLeft: Rt,
1429
- onFocus: p,
1430
- value: n != null && n.startDate ? v(n.startDate, t) : "",
1428
+ iconLeft: It,
1429
+ onFocus: b,
1430
+ value: n != null && n.startDate ? $(n.startDate, t) : "",
1431
1431
  placeholder: e,
1432
1432
  width: i,
1433
1433
  disabled: u,
1434
- inputRef: y,
1434
+ inputRef: w,
1435
1435
  size: 9,
1436
1436
  variant: S ? "error" : void 0
1437
1437
  }
1438
1438
  ),
1439
1439
  /* @__PURE__ */ o(Mt, {}),
1440
1440
  /* @__PURE__ */ o(
1441
- Re,
1441
+ Ie,
1442
1442
  {
1443
1443
  icon: ir,
1444
1444
  color: Kt("--lhds-color-ui-500"),
@@ -1447,33 +1447,33 @@ function Js({
1447
1447
  ),
1448
1448
  /* @__PURE__ */ o(Mt, {}),
1449
1449
  /* @__PURE__ */ o(
1450
- pt,
1450
+ Dt,
1451
1451
  {
1452
- iconLeft: Rt,
1452
+ iconLeft: It,
1453
1453
  onFocus: g,
1454
- value: n != null && n.endDate ? v(n.endDate, t) : "",
1454
+ value: n != null && n.endDate ? $(n.endDate, t) : "",
1455
1455
  placeholder: r,
1456
1456
  width: i,
1457
1457
  disabled: u,
1458
- inputRef: b,
1458
+ inputRef: p,
1459
1459
  size: 9,
1460
1460
  variant: S ? "error" : void 0
1461
1461
  }
1462
1462
  )
1463
1463
  ] }),
1464
- open: k,
1464
+ open: M,
1465
1465
  placement: Bt,
1466
- onRequestClose: m,
1466
+ onRequestClose: h,
1467
1467
  children: /* @__PURE__ */ o(
1468
- wt,
1468
+ yt,
1469
1469
  {
1470
1470
  ...a,
1471
- dateInFocus: B,
1472
- setDateInFocus: _,
1473
- statePerMonth: I,
1471
+ dateInFocus: A,
1472
+ setDateInFocus: Y,
1473
+ statePerMonth: T,
1474
1474
  theme: c,
1475
- onClickDay: M,
1476
- currentPanel: h,
1475
+ onClickDay: k,
1476
+ currentPanel: m,
1477
1477
  setCurrentPanel: f,
1478
1478
  minDate: l,
1479
1479
  maxDate: d
@@ -1485,73 +1485,73 @@ function Js({
1485
1485
  const Gs = ({
1486
1486
  calendarProps: t,
1487
1487
  closeOnCalendarSelectDate: e = !0,
1488
- dateFormat: r = ot.fullDate,
1488
+ dateFormat: r = ct.fullDate,
1489
1489
  disableCalender: n = !1,
1490
1490
  onValueChange: s,
1491
1491
  placeholder: i = "yyyy-mm-dd",
1492
1492
  value: c,
1493
1493
  width: a = "130px",
1494
- calendarTheme: l = bt,
1494
+ calendarTheme: l = wt,
1495
1495
  hideCalenderIcon: d = !1,
1496
1496
  minDate: u,
1497
- maxDate: h = Ht,
1497
+ maxDate: m = Ht,
1498
1498
  variant: f,
1499
- ...m
1499
+ ...h
1500
1500
  }) => {
1501
- const [g, p] = R(!1), k = D(() => {
1502
- p(!g);
1503
- }, [p, g]), w = D(() => {
1504
- p(!1);
1505
- }, [p]), y = D(
1506
- (I) => {
1507
- s && s(I);
1501
+ const [g, b] = I(!1), M = D(() => {
1502
+ b(!g);
1503
+ }, [b, g]), y = D(() => {
1504
+ b(!1);
1505
+ }, [b]), w = D(
1506
+ (T) => {
1507
+ s && s(T);
1508
1508
  },
1509
1509
  [s]
1510
- ), b = D(
1511
- (I) => {
1512
- I && (y(v(I, r)), e && setTimeout(() => p(!g), 200));
1510
+ ), p = D(
1511
+ (T) => {
1512
+ T && (w($(T, r)), e && setTimeout(() => b(!g), 200));
1513
1513
  },
1514
- [y, r, e, p, g]
1515
- ), M = !!c && !/^[-/\\.0-9]+$/.test(c), S = !!c && mr(mt(c, r, /* @__PURE__ */ new Date())), _ = !!c && c.length >= r.length && !S || M;
1514
+ [w, r, e, b, g]
1515
+ ), k = !!c && !/^[-/\\.0-9]+$/.test(c), S = !!c && mr(gt(c, r, /* @__PURE__ */ new Date())), Y = !!c && c.length >= r.length && !S || k;
1516
1516
  return /* @__PURE__ */ o(N, { width: a, children: /* @__PURE__ */ o(
1517
1517
  Yt,
1518
1518
  {
1519
- renderTrigger: (I) => /* @__PURE__ */ o(
1520
- pt,
1519
+ renderTrigger: (T) => /* @__PURE__ */ o(
1520
+ Dt,
1521
1521
  {
1522
- ...m,
1523
- variant: _ ? "error" : f,
1522
+ ...h,
1523
+ variant: Y ? "error" : f,
1524
1524
  disableContentPaddingRight: !0,
1525
- contentRight: d ? void 0 : /* @__PURE__ */ o(H, { alignItems: "center", indent: 0.5, children: /* @__PURE__ */ o(
1526
- q,
1525
+ contentRight: d ? void 0 : /* @__PURE__ */ o(B, { alignItems: "center", indent: 0.5, children: /* @__PURE__ */ o(
1526
+ Q,
1527
1527
  {
1528
1528
  size: "small",
1529
- disabled: m.disabled || n,
1530
- leftIcon: Rt,
1531
- onClick: k
1529
+ disabled: h.disabled || n,
1530
+ leftIcon: It,
1531
+ onClick: M
1532
1532
  }
1533
1533
  ) }),
1534
- onValueChange: y,
1534
+ onValueChange: w,
1535
1535
  placeholder: i,
1536
1536
  value: c || "",
1537
1537
  min: u,
1538
- max: h,
1538
+ max: m,
1539
1539
  size: 10,
1540
- ...I
1540
+ ...T
1541
1541
  }
1542
1542
  ),
1543
1543
  hideArrow: !0,
1544
1544
  open: g,
1545
1545
  placement: Bt,
1546
- onRequestClose: w,
1546
+ onRequestClose: y,
1547
1547
  children: /* @__PURE__ */ o(
1548
1548
  Ue,
1549
1549
  {
1550
1550
  ...t,
1551
- onChange: b,
1552
- value: c && S ? mt(c, r, /* @__PURE__ */ new Date()) : void 0,
1551
+ onChange: p,
1552
+ value: c && S ? gt(c, r, /* @__PURE__ */ new Date()) : void 0,
1553
1553
  minDate: u,
1554
- maxDate: h,
1554
+ maxDate: m,
1555
1555
  theme: l
1556
1556
  }
1557
1557
  )
@@ -1633,20 +1633,20 @@ const Gs = ({
1633
1633
  variant: i,
1634
1634
  ...c
1635
1635
  }) => {
1636
- const [a, l] = R(() => se(n)), d = "hh:mm", u = D(() => {
1636
+ const [a, l] = I(() => se(n)), d = "hh:mm", u = D(() => {
1637
1637
  if (n) {
1638
1638
  const f = Sn(n);
1639
1639
  l(f.success), f.success && t && t(f.time);
1640
1640
  }
1641
- }, [n, t, l]), h = D(
1641
+ }, [n, t, l]), m = D(
1642
1642
  (f) => {
1643
- const m = f.target.value, g = se(m);
1644
- l(g && m.length <= d.length), t && t(m);
1643
+ const h = f.target.value, g = se(h);
1644
+ l(g && h.length <= d.length), t && t(h);
1645
1645
  },
1646
1646
  [t, l]
1647
1647
  );
1648
1648
  return /* @__PURE__ */ o(
1649
- pt,
1649
+ Dt,
1650
1650
  {
1651
1651
  ...c,
1652
1652
  type: "time",
@@ -1654,7 +1654,7 @@ const Gs = ({
1654
1654
  iconLeft: r ? xe : void 0,
1655
1655
  value: n,
1656
1656
  placeholder: e ? d : void 0,
1657
- onChange: h,
1657
+ onChange: m,
1658
1658
  onBlur: u,
1659
1659
  width: s
1660
1660
  }
@@ -1671,139 +1671,139 @@ const Gs = ({
1671
1671
  placeholderRight: l,
1672
1672
  typeLeft: d,
1673
1673
  typeRight: u,
1674
- onChangeLeft: h,
1674
+ onChangeLeft: m,
1675
1675
  onChangeRight: f,
1676
- valueLeft: m,
1676
+ valueLeft: h,
1677
1677
  valueRight: g,
1678
- minLeft: p,
1679
- maxLeft: k,
1680
- minRight: w,
1681
- maxRight: y,
1682
- onClickLeft: b,
1683
- onClickRight: M,
1678
+ minLeft: b,
1679
+ maxLeft: M,
1680
+ minRight: y,
1681
+ maxRight: w,
1682
+ onClickLeft: p,
1683
+ onClickRight: k,
1684
1684
  onClickCalendar: S,
1685
- onClickArrowDown: B,
1686
- onBlurLeft: _,
1687
- onBlurRight: I,
1688
- onFocusLeft: Y,
1689
- onFocusRight: T,
1685
+ onClickArrowDown: A,
1686
+ onBlurLeft: Y,
1687
+ onBlurRight: T,
1688
+ onFocusLeft: P,
1689
+ onFocusRight: R,
1690
1690
  inputRefLeft: W,
1691
- inputRefRight: O,
1691
+ inputRefRight: F,
1692
1692
  variant: U,
1693
1693
  variantLeft: j,
1694
- variantRight: V,
1695
- onBlur: F,
1696
- showPresets: rt,
1697
- widthLeft: J,
1698
- widthRight: G,
1699
- disabled: Q
1694
+ variantRight: X,
1695
+ onBlur: C,
1696
+ showPresets: Z,
1697
+ widthLeft: nt,
1698
+ widthRight: V,
1699
+ disabled: K
1700
1700
  }) => {
1701
- const E = $(0), P = x(
1702
- () => Ir((nt) => {
1703
- nt === 0 && (F == null || F());
1701
+ const v = H(0), _ = x(
1702
+ () => Rr((st) => {
1703
+ st === 0 && (C == null || C());
1704
1704
  }, 10),
1705
- [F]
1706
- ), tt = D(
1707
- (nt) => {
1708
- E.current++, P(E.current), Y && Y(nt);
1705
+ [C]
1706
+ ), O = D(
1707
+ (st) => {
1708
+ v.current++, _(v.current), P && P(st);
1709
1709
  },
1710
- [Y, E, P]
1711
- ), et = D(
1712
- (nt) => {
1713
- E.current++, P(E.current), T && T(nt);
1710
+ [P, v, _]
1711
+ ), rt = D(
1712
+ (st) => {
1713
+ v.current++, _(v.current), R && R(st);
1714
1714
  },
1715
- [T, E, P]
1716
- ), yt = D(
1717
- (nt) => {
1718
- E.current--, P(E.current), _ && _(nt);
1715
+ [R, v, _]
1716
+ ), q = D(
1717
+ (st) => {
1718
+ v.current--, _(v.current), Y && Y(st);
1719
1719
  },
1720
- [_, E, P]
1720
+ [Y, v, _]
1721
1721
  ), Xe = D(
1722
- (nt) => {
1723
- E.current--, P(E.current), I && I(nt);
1722
+ (st) => {
1723
+ v.current--, _(v.current), T && T(st);
1724
1724
  },
1725
- [I, E, P]
1725
+ [T, v, _]
1726
1726
  );
1727
- return /* @__PURE__ */ o(N, { children: /* @__PURE__ */ A(
1727
+ return /* @__PURE__ */ o(N, { children: /* @__PURE__ */ E(
1728
1728
  xr,
1729
1729
  {
1730
1730
  disableContentPaddingRight: !0,
1731
- disabled: Q,
1731
+ disabled: K,
1732
1732
  variant: U,
1733
- contentRight: /* @__PURE__ */ A(H, { alignItems: "center", children: [
1734
- /* @__PURE__ */ o(It, { num: 0.5, children: /* @__PURE__ */ o(
1735
- q,
1733
+ contentRight: /* @__PURE__ */ E(B, { alignItems: "center", children: [
1734
+ /* @__PURE__ */ o(Rt, { num: 0.5, children: /* @__PURE__ */ o(
1735
+ Q,
1736
1736
  {
1737
- leftIcon: Rt,
1737
+ leftIcon: It,
1738
1738
  onClick: S,
1739
- disabled: Q,
1739
+ disabled: K,
1740
1740
  size: "small"
1741
1741
  }
1742
1742
  ) }),
1743
- rt ? /* @__PURE__ */ A(ce, { children: [
1744
- /* @__PURE__ */ o(H, { height: "22px", children: /* @__PURE__ */ o(Ve, { vertical: !0 }) }),
1745
- /* @__PURE__ */ o(It, { num: 0.5, children: /* @__PURE__ */ o(
1746
- q,
1743
+ Z ? /* @__PURE__ */ E(ce, { children: [
1744
+ /* @__PURE__ */ o(B, { height: "22px", children: /* @__PURE__ */ o(Ve, { vertical: !0 }) }),
1745
+ /* @__PURE__ */ o(Rt, { num: 0.5, children: /* @__PURE__ */ o(
1746
+ Q,
1747
1747
  {
1748
1748
  leftIcon: le,
1749
- onClick: B,
1750
- disabled: Q,
1749
+ onClick: A,
1750
+ disabled: K,
1751
1751
  size: "small"
1752
1752
  }
1753
1753
  ) })
1754
1754
  ] }) : null
1755
1755
  ] }),
1756
1756
  children: [
1757
- /* @__PURE__ */ o(N, { width: J, children: /* @__PURE__ */ o(
1758
- pt,
1757
+ /* @__PURE__ */ o(N, { width: nt, children: /* @__PURE__ */ o(
1758
+ Dt,
1759
1759
  {
1760
1760
  onEsc: r,
1761
1761
  onEnter: n,
1762
- onClick: b,
1763
- disabled: Q,
1762
+ onClick: p,
1763
+ disabled: K,
1764
1764
  hideBorder: !0,
1765
1765
  placeholder: a,
1766
- value: m,
1766
+ value: h,
1767
1767
  onValueChange: s,
1768
- onChange: h,
1769
- onBlur: yt,
1770
- onFocus: tt,
1768
+ onChange: m,
1769
+ onBlur: q,
1770
+ onFocus: O,
1771
1771
  inputRef: W,
1772
1772
  variant: j,
1773
1773
  type: d,
1774
1774
  autoFocus: t,
1775
- min: p,
1776
- max: k
1775
+ min: b,
1776
+ max: M
1777
1777
  }
1778
1778
  ) }),
1779
- /* @__PURE__ */ o(H, { indent: 0.5, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ o(
1780
- Re,
1779
+ /* @__PURE__ */ o(B, { indent: 0.5, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ o(
1780
+ Ie,
1781
1781
  {
1782
1782
  icon: c,
1783
1783
  size: 12,
1784
1784
  color: Kt("--lhds-color-ui-500")
1785
1785
  }
1786
1786
  ) }),
1787
- /* @__PURE__ */ o(N, { width: G, children: /* @__PURE__ */ o(
1788
- pt,
1787
+ /* @__PURE__ */ o(N, { width: V, children: /* @__PURE__ */ o(
1788
+ Dt,
1789
1789
  {
1790
1790
  onEsc: r,
1791
1791
  onEnter: n,
1792
- onClick: M,
1793
- disabled: Q,
1792
+ onClick: k,
1793
+ disabled: K,
1794
1794
  hideBorder: !0,
1795
1795
  placeholder: l,
1796
1796
  value: g,
1797
1797
  onValueChange: i,
1798
1798
  onChange: f,
1799
1799
  onBlur: Xe,
1800
- onFocus: et,
1801
- inputRef: O,
1802
- variant: V,
1800
+ onFocus: rt,
1801
+ inputRef: F,
1802
+ variant: X,
1803
1803
  type: u,
1804
1804
  autoFocus: e,
1805
- min: w,
1806
- max: y
1805
+ min: y,
1806
+ max: w
1807
1807
  }
1808
1808
  ) })
1809
1809
  ]
@@ -1831,14 +1831,14 @@ const Gs = ({
1831
1831
  if (n < 0 || n > 59)
1832
1832
  throw new Error("Invalid time.");
1833
1833
  return r * 100 + n;
1834
- }, In = (t) => {
1834
+ }, Rn = (t) => {
1835
1835
  try {
1836
1836
  return Tn(t), !0;
1837
1837
  } catch {
1838
1838
  return !1;
1839
1839
  }
1840
1840
  }, vt = (t) => {
1841
- if (t && In(t)) {
1841
+ if (t && Rn(t)) {
1842
1842
  const e = t.split(":");
1843
1843
  return {
1844
1844
  hour: De(e[0]),
@@ -1849,7 +1849,7 @@ const Gs = ({
1849
1849
  hour: void 0,
1850
1850
  minute: void 0
1851
1851
  };
1852
- }, Rn = (t) => `${Wt(String(t.getHours()))}:${Ut(
1852
+ }, In = (t) => `${Wt(String(t.getHours()))}:${Ut(
1853
1853
  String(t.getMinutes())
1854
1854
  )}`, xn = "_timePicker_1w05d_1", En = "_timePickerColumn_1w05d_6", je = {
1855
1855
  timePicker: xn,
@@ -1861,8 +1861,8 @@ const Gs = ({
1861
1861
  columnRef: n,
1862
1862
  canScrollRef: s
1863
1863
  }) => {
1864
- const i = $(null);
1865
- return Z(
1864
+ const i = H(null);
1865
+ return et(
1866
1866
  function() {
1867
1867
  if (r && n.current && i.current && s.current) {
1868
1868
  const a = i.current.scrollHeight * Math.max(e - 2, 0);
@@ -1871,7 +1871,7 @@ const Gs = ({
1871
1871
  },
1872
1872
  [n, e, r, s]
1873
1873
  ), /* @__PURE__ */ o(
1874
- H,
1874
+ B,
1875
1875
  {
1876
1876
  width: "64px",
1877
1877
  justifyContent: "center",
@@ -1881,11 +1881,11 @@ const Gs = ({
1881
1881
  children: r ? /* @__PURE__ */ o(
1882
1882
  kt,
1883
1883
  {
1884
- label: Rr(String(e), 2, "0"),
1884
+ label: Ir(String(e), 2, "0"),
1885
1885
  onClick: () => t && t(e)
1886
1886
  }
1887
1887
  ) : /* @__PURE__ */ o(
1888
- q,
1888
+ Q,
1889
1889
  {
1890
1890
  label: String(e).padStart(2, "0"),
1891
1891
  onClick: () => t && t(e)
@@ -1899,8 +1899,8 @@ const Gs = ({
1899
1899
  selectedItem: r,
1900
1900
  canScrollRef: n
1901
1901
  }) => {
1902
- const s = $(null);
1903
- return /* @__PURE__ */ o(C, { className: je.timePickerColumn, ref: s, children: e.map((i) => /* @__PURE__ */ o(
1902
+ const s = H(null);
1903
+ return /* @__PURE__ */ o(z, { className: je.timePickerColumn, ref: s, children: e.map((i) => /* @__PURE__ */ o(
1904
1904
  An,
1905
1905
  {
1906
1906
  item: i,
@@ -1915,8 +1915,8 @@ const Gs = ({
1915
1915
  value: t,
1916
1916
  onValueChange: e
1917
1917
  }) => {
1918
- const r = $(!0), [n, s] = R(void 0), [i, c] = R(void 0);
1919
- Z(() => {
1918
+ const r = H(!0), [n, s] = I(void 0), [i, c] = I(void 0);
1919
+ et(() => {
1920
1920
  if (t) {
1921
1921
  const { minute: d, hour: u } = vt(t);
1922
1922
  s(u), c(d);
@@ -1937,7 +1937,7 @@ const Gs = ({
1937
1937
  },
1938
1938
  [n, e]
1939
1939
  );
1940
- return /* @__PURE__ */ A(H, { className: je.timePicker, children: [
1940
+ return /* @__PURE__ */ E(B, { className: je.timePicker, children: [
1941
1941
  /* @__PURE__ */ o(
1942
1942
  Se,
1943
1943
  {
@@ -1947,7 +1947,7 @@ const Gs = ({
1947
1947
  canScrollRef: r
1948
1948
  }
1949
1949
  ),
1950
- /* @__PURE__ */ o(It, {}),
1950
+ /* @__PURE__ */ o(Rt, {}),
1951
1951
  /* @__PURE__ */ o(
1952
1952
  Se,
1953
1953
  {
@@ -1959,12 +1959,12 @@ const Gs = ({
1959
1959
  )
1960
1960
  ] });
1961
1961
  }, Yn = (t, e, r) => {
1962
- Z(
1962
+ et(
1963
1963
  function() {
1964
1964
  t && e(t);
1965
1965
  },
1966
1966
  [t, e]
1967
- ), Z(
1967
+ ), et(
1968
1968
  function() {
1969
1969
  r.current && (t ? r.current.valueAsDate = new Date(
1970
1970
  Date.UTC(t.getFullYear(), t.getMonth(), t.getDate())
@@ -1982,72 +1982,72 @@ const Gs = ({
1982
1982
  setLocalTime: l,
1983
1983
  localDate: d,
1984
1984
  setLocalDate: u
1985
- }, h) => {
1985
+ }, m) => {
1986
1986
  const f = D(
1987
- (y) => {
1988
- if (!y)
1987
+ (w) => {
1988
+ if (!w)
1989
1989
  return;
1990
- const b = new Date(y);
1990
+ const p = new Date(w);
1991
1991
  if (t)
1992
- b.setHours(t.getHours()), b.setMinutes(t.getMinutes()), e == null || e(b), u(void 0);
1992
+ p.setHours(t.getHours()), p.setMinutes(t.getMinutes()), e == null || e(p), u(void 0);
1993
1993
  else if (a) {
1994
- const { minute: M, hour: S } = vt(a);
1995
- b.setHours(S ?? 0), b.setMinutes(M ?? 0), e == null || e(b), u(void 0);
1994
+ const { minute: k, hour: S } = vt(a);
1995
+ p.setHours(S ?? 0), p.setMinutes(k ?? 0), e == null || e(p), u(void 0);
1996
1996
  } else
1997
- u(b);
1998
- r(b), h.current && (h.current.valueAsDate = new Date(
1999
- Date.UTC(b.getFullYear(), b.getMonth(), b.getDate())
1997
+ u(p);
1998
+ r(p), m.current && (m.current.valueAsDate = new Date(
1999
+ Date.UTC(p.getFullYear(), p.getMonth(), p.getDate())
2000
2000
  ));
2001
2001
  },
2002
- [t, h, a, e, r, u]
2003
- ), m = D(
2004
- (y) => {
2005
- if (y)
2002
+ [t, m, a, e, r, u]
2003
+ ), h = D(
2004
+ (w) => {
2005
+ if (w)
2006
2006
  if (t) {
2007
- const b = vt(y), M = new Date(t);
2008
- M.setHours(b.hour || 0), M.setMinutes(b.minute || 0), e == null || e(M), l(void 0);
2007
+ const p = vt(w), k = new Date(t);
2008
+ k.setHours(p.hour || 0), k.setMinutes(p.minute || 0), e == null || e(k), l(void 0);
2009
2009
  } else if (d) {
2010
- const b = vt(y), M = new Date(d);
2011
- M.setHours(b.hour || 0), M.setMinutes(b.minute || 0), e == null || e(M), l(void 0);
2010
+ const p = vt(w), k = new Date(d);
2011
+ k.setHours(p.hour || 0), k.setMinutes(p.minute || 0), e == null || e(k), l(void 0);
2012
2012
  } else
2013
- l(y);
2013
+ l(w);
2014
2014
  },
2015
2015
  [e, t, d, l]
2016
2016
  ), g = D(
2017
- (y) => {
2018
- y.target.value[0] !== "0" && f(y.target.valueAsDate);
2017
+ (w) => {
2018
+ w.target.value[0] !== "0" && f(w.target.valueAsDate);
2019
2019
  },
2020
2020
  [f]
2021
- ), p = D(
2022
- (y) => m(y.target.value),
2023
- [m]
2024
- ), k = D(() => {
2021
+ ), b = D(
2022
+ (w) => h(w.target.value),
2023
+ [h]
2024
+ ), M = D(() => {
2025
2025
  r(t || /* @__PURE__ */ new Date()), c("calendar"), n();
2026
- }, [t, c, n, r]), w = D(() => {
2026
+ }, [t, c, n, r]), y = D(() => {
2027
2027
  i(void 0), s();
2028
2028
  }, [i, s]);
2029
2029
  return {
2030
2030
  inputLeftChangeHandler: g,
2031
- inputRightChangeHandler: p,
2032
- hideCalendar: w,
2033
- showCalendar: k,
2034
- onChangeTime: m,
2031
+ inputRightChangeHandler: b,
2032
+ hideCalendar: y,
2033
+ showCalendar: M,
2034
+ onChangeTime: h,
2035
2035
  onChangeDate: f
2036
2036
  };
2037
2037
  }, Bn = (t) => {
2038
- const [e, r] = R(void 0), [n, s] = R(void 0), [i, c, a] = re(!1), [l, d, u] = re(!1), [h, f] = R(void 0), [m, g] = R(
2038
+ const [e, r] = I(void 0), [n, s] = I(void 0), [i, c, a] = re(!1), [l, d, u] = re(!1), [m, f] = I(void 0), [h, g] = I(
2039
2039
  () => t ?? /* @__PURE__ */ new Date()
2040
- ), [p, k] = R("calendar");
2040
+ ), [b, M] = I("calendar");
2041
2041
  return {
2042
2042
  isCalendarVisible: i,
2043
2043
  showCalendarInternal: c,
2044
2044
  hideCalendarInternal: a,
2045
- firstFocusedInput: h,
2045
+ firstFocusedInput: m,
2046
2046
  setFirstFocusedInput: f,
2047
- dateInFocus: m,
2047
+ dateInFocus: h,
2048
2048
  setDateInFocus: g,
2049
- currentPanel: p,
2050
- setCurrentPanel: k,
2049
+ currentPanel: b,
2050
+ setCurrentPanel: M,
2051
2051
  isTimePickerVisible: l,
2052
2052
  showTimePicker: d,
2053
2053
  hideTimePicker: u,
@@ -2071,7 +2071,7 @@ const Gs = ({
2071
2071
  t(g.date), n(), c();
2072
2072
  },
2073
2073
  [t, n, c]
2074
- ), h = D(() => {
2074
+ ), m = D(() => {
2075
2075
  i("presets"), r();
2076
2076
  }, [i, r]), f = D(() => {
2077
2077
  var g;
@@ -2082,7 +2082,7 @@ const Gs = ({
2082
2082
  e,
2083
2083
  i,
2084
2084
  r
2085
- ]), m = D(
2085
+ ]), h = D(
2086
2086
  (g) => {
2087
2087
  g.key === "Escape" && n();
2088
2088
  },
@@ -2092,9 +2092,9 @@ const Gs = ({
2092
2092
  onFocusLeft: l,
2093
2093
  onFocusRight: d,
2094
2094
  onClickDay: u,
2095
- onClickArrowButton: h,
2095
+ onClickArrowButton: m,
2096
2096
  onClickCalendarButton: f,
2097
- onKeyDownHandler: m
2097
+ onKeyDownHandler: h
2098
2098
  };
2099
2099
  }, Xs = ({
2100
2100
  value: t,
@@ -2108,80 +2108,80 @@ const Gs = ({
2108
2108
  widthRight: l = 80,
2109
2109
  maxDate: d = Ht,
2110
2110
  variant: u,
2111
- disabled: h
2111
+ disabled: m
2112
2112
  }) => {
2113
- const f = $(null), m = $(null), g = Bn(t), {
2114
- setCurrentPanel: p,
2115
- currentPanel: k,
2116
- isCalendarVisible: w,
2117
- dateInFocus: y,
2118
- setDateInFocus: b,
2119
- isTimePickerVisible: M,
2113
+ const f = H(null), h = H(null), g = Bn(t), {
2114
+ setCurrentPanel: b,
2115
+ currentPanel: M,
2116
+ isCalendarVisible: y,
2117
+ dateInFocus: w,
2118
+ setDateInFocus: p,
2119
+ isTimePickerVisible: k,
2120
2120
  hideTimePicker: S,
2121
- localTime: B,
2122
- localDate: _
2121
+ localTime: A,
2122
+ localDate: Y
2123
2123
  } = g, {
2124
- showCalendar: I,
2125
- hideCalendar: Y,
2126
- inputLeftChangeHandler: T,
2124
+ showCalendar: T,
2125
+ hideCalendar: P,
2126
+ inputLeftChangeHandler: R,
2127
2127
  inputRightChangeHandler: W,
2128
- onChangeTime: O,
2128
+ onChangeTime: F,
2129
2129
  onChangeDate: U
2130
2130
  } = Pn(t, e, g, f), {
2131
2131
  onKeyDownHandler: j,
2132
- onFocusRight: V,
2133
- onFocusLeft: F,
2134
- onClickDay: rt,
2135
- onClickCalendarButton: J,
2136
- onClickArrowButton: G
2132
+ onFocusRight: X,
2133
+ onFocusLeft: C,
2134
+ onClickDay: Z,
2135
+ onClickCalendarButton: nt,
2136
+ onClickArrowButton: V
2137
2137
  } = Hn(
2138
2138
  U,
2139
2139
  f,
2140
- I,
2141
- Y,
2140
+ T,
2141
+ P,
2142
2142
  g
2143
2143
  );
2144
- Yn(t, b, f);
2145
- const Q = x(() => {
2146
- const yt = t || _;
2147
- return yt ? dt(void 0, yt, [
2144
+ Yn(t, p, f);
2145
+ const K = x(() => {
2146
+ const q = t || Y;
2147
+ return q ? ut(void 0, q, [
2148
2148
  "singleSelected",
2149
2149
  "selected"
2150
2150
  ]) : {};
2151
- }, [_, t]), E = D(() => {
2152
- Y(), S();
2153
- }, [Y, S]), P = x(
2154
- () => t ? Rn(t) : B,
2155
- [t, B]
2156
- ), tt = be(w, 300), et = be(M, 300);
2151
+ }, [Y, t]), v = D(() => {
2152
+ P(), S();
2153
+ }, [P, S]), _ = x(
2154
+ () => t ? In(t) : A,
2155
+ [t, A]
2156
+ ), O = be(y, 300), rt = be(k, 300);
2157
2157
  return /* @__PURE__ */ o(N, { onKeyDown: j, children: /* @__PURE__ */ o(
2158
2158
  Yt,
2159
2159
  {
2160
2160
  hideArrow: !0,
2161
- renderTrigger: (yt) => /* @__PURE__ */ o(N, { ...yt, children: /* @__PURE__ */ o(
2161
+ renderTrigger: (q) => /* @__PURE__ */ o(N, { ...q, children: /* @__PURE__ */ o(
2162
2162
  Fe,
2163
2163
  {
2164
2164
  autoFocusLeft: i,
2165
2165
  onEsc: n,
2166
2166
  onEnter: r,
2167
2167
  onBlur: s,
2168
- disabled: h,
2168
+ disabled: m,
2169
2169
  separatorIcon: xe,
2170
2170
  typeLeft: "date",
2171
2171
  typeRight: "time",
2172
2172
  placeholderLeft: "yyyy-mm-dd",
2173
2173
  placeholderRight: "hh:mm",
2174
- onChangeLeft: T,
2174
+ onChangeLeft: R,
2175
2175
  onChangeRight: W,
2176
- onClickArrowDown: G,
2177
- onClickCalendar: J,
2178
- onFocusLeft: F,
2179
- onFocusRight: V,
2180
- onClickLeft: F,
2181
- onClickRight: V,
2176
+ onClickArrowDown: V,
2177
+ onClickCalendar: nt,
2178
+ onFocusLeft: C,
2179
+ onFocusRight: X,
2180
+ onClickLeft: C,
2181
+ onClickRight: X,
2182
2182
  inputRefLeft: f,
2183
- inputRefRight: m,
2184
- valueRight: P ?? "",
2183
+ inputRefRight: h,
2184
+ valueRight: _ ?? "",
2185
2185
  widthLeft: a,
2186
2186
  widthRight: l,
2187
2187
  minLeft: c,
@@ -2190,30 +2190,30 @@ const Gs = ({
2190
2190
  }
2191
2191
  ) }),
2192
2192
  placement: Bt,
2193
- open: w || M,
2194
- onRequestClose: E,
2195
- children: (tt || et) && /* @__PURE__ */ o(C, { children: tt ? /* @__PURE__ */ o(
2196
- wt,
2193
+ open: y || k,
2194
+ onRequestClose: v,
2195
+ children: (O || rt) && /* @__PURE__ */ o(z, { children: O ? /* @__PURE__ */ o(
2196
+ yt,
2197
2197
  {
2198
- statePerMonth: Q,
2199
- onClickDay: rt,
2200
- dateInFocus: y,
2201
- setDateInFocus: b,
2202
- currentPanel: k,
2203
- setCurrentPanel: p,
2198
+ statePerMonth: K,
2199
+ onClickDay: Z,
2200
+ dateInFocus: w,
2201
+ setDateInFocus: p,
2202
+ currentPanel: M,
2203
+ setCurrentPanel: b,
2204
2204
  minDate: c,
2205
2205
  maxDate: d
2206
2206
  }
2207
- ) : et ? /* @__PURE__ */ A(C, { children: [
2208
- /* @__PURE__ */ o(C, { overflow: "hidden", height: "250px", children: /* @__PURE__ */ o(
2207
+ ) : rt ? /* @__PURE__ */ E(z, { children: [
2208
+ /* @__PURE__ */ o(z, { overflow: "hidden", height: "250px", children: /* @__PURE__ */ o(
2209
2209
  Ln,
2210
2210
  {
2211
- value: P ?? "",
2212
- onValueChange: O
2211
+ value: _ ?? "",
2212
+ onValueChange: F
2213
2213
  }
2214
2214
  ) }),
2215
2215
  /* @__PURE__ */ o(Mt, {}),
2216
- /* @__PURE__ */ o(H, { justifyContent: "flex-end", children: /* @__PURE__ */ o(kt, { label: "Done", onClick: S }) })
2216
+ /* @__PURE__ */ o(B, { justifyContent: "flex-end", children: /* @__PURE__ */ o(kt, { label: "Done", onClick: S }) })
2217
2217
  ] }) : null })
2218
2218
  }
2219
2219
  ) });
@@ -2223,27 +2223,27 @@ const Gs = ({
2223
2223
  year: r
2224
2224
  }) => {
2225
2225
  const n = String(r);
2226
- return /* @__PURE__ */ o(H, { justifyContent: "center", children: t === r ? /* @__PURE__ */ o(kt, { label: n, onClick: () => e == null ? void 0 : e(r) }) : /* @__PURE__ */ o(q, { label: n, onClick: () => e == null ? void 0 : e(r) }) });
2226
+ return /* @__PURE__ */ o(B, { justifyContent: "center", children: t === r ? /* @__PURE__ */ o(kt, { label: n, onClick: () => e == null ? void 0 : e(r) }) : /* @__PURE__ */ o(Q, { label: n, onClick: () => e == null ? void 0 : e(r) }) });
2227
2227
  }, Zs = ({
2228
2228
  value: t,
2229
2229
  onValueChange: e,
2230
2230
  initialLastYear: r
2231
2231
  }) => {
2232
- const [n, s] = R(() => t ? t + 4 : r ?? (/* @__PURE__ */ new Date()).getFullYear() + 4), i = x(() => {
2232
+ const [n, s] = I(() => t ? t + 4 : r ?? (/* @__PURE__ */ new Date()).getFullYear() + 4), i = x(() => {
2233
2233
  const c = n - 11;
2234
2234
  return Pe(fe(c, n + 1), 3);
2235
2235
  }, [n]);
2236
- return Z(() => {
2236
+ return et(() => {
2237
2237
  s((c) => vn(t, c));
2238
- }, [t]), /* @__PURE__ */ A(H, { children: [
2239
- /* @__PURE__ */ o(C, { justifyContent: "center", children: /* @__PURE__ */ o(
2240
- q,
2238
+ }, [t]), /* @__PURE__ */ E(B, { children: [
2239
+ /* @__PURE__ */ o(z, { justifyContent: "center", children: /* @__PURE__ */ o(
2240
+ Q,
2241
2241
  {
2242
2242
  leftIcon: Ft,
2243
2243
  onClick: () => s(n - 3)
2244
2244
  }
2245
2245
  ) }),
2246
- /* @__PURE__ */ o(C, { gap: 1, children: i.map((c) => /* @__PURE__ */ o(H, { gap: 1, children: c.map((a) => /* @__PURE__ */ o(
2246
+ /* @__PURE__ */ o(z, { gap: 1, children: i.map((c) => /* @__PURE__ */ o(B, { gap: 1, children: c.map((a) => /* @__PURE__ */ o(
2247
2247
  $n,
2248
2248
  {
2249
2249
  year: a,
@@ -2252,8 +2252,8 @@ const Gs = ({
2252
2252
  },
2253
2253
  a
2254
2254
  )) }, c[0])) }),
2255
- /* @__PURE__ */ o(C, { justifyContent: "center", children: /* @__PURE__ */ o(
2256
- q,
2255
+ /* @__PURE__ */ o(z, { justifyContent: "center", children: /* @__PURE__ */ o(
2256
+ Q,
2257
2257
  {
2258
2258
  leftIcon: Nt,
2259
2259
  onClick: () => s(n + 3)
@@ -2274,17 +2274,17 @@ const Gs = ({
2274
2274
  }
2275
2275
  return e;
2276
2276
  }, On = (t, e, r, n, s) => {
2277
- Z(
2277
+ et(
2278
2278
  function() {
2279
2279
  t && r(t);
2280
2280
  },
2281
2281
  [t, r]
2282
- ), Z(
2282
+ ), et(
2283
2283
  function() {
2284
2284
  e && r(e);
2285
2285
  },
2286
2286
  [e, r]
2287
- ), Z(
2287
+ ), et(
2288
2288
  function() {
2289
2289
  n.current && (t ? n.current.valueAsDate = new Date(
2290
2290
  Date.UTC(
@@ -2295,7 +2295,7 @@ const Gs = ({
2295
2295
  ) : n.current.valueAsDate = null);
2296
2296
  },
2297
2297
  [t, n]
2298
- ), Z(
2298
+ ), et(
2299
2299
  function() {
2300
2300
  s.current && (e ? s.current.valueAsDate = new Date(
2301
2301
  Date.UTC(
@@ -2338,19 +2338,19 @@ const Gs = ({
2338
2338
  a,
2339
2339
  s,
2340
2340
  n
2341
- ]), h = D(() => {
2341
+ ]), m = D(() => {
2342
2342
  c(void 0), i();
2343
2343
  }, [c, i]);
2344
2344
  return {
2345
2345
  inputLeftChangeHandler: l,
2346
2346
  inputRightChangeHandler: d,
2347
- hideCalendar: h,
2347
+ hideCalendar: m,
2348
2348
  setDateInFocus: n,
2349
2349
  setCurrentPanel: a,
2350
2350
  showCalendar: u
2351
2351
  };
2352
2352
  }, Un = (t, e) => {
2353
- const [r, n, s] = re(!1), [i, c] = R(void 0), [a, l] = R("startDate"), [d, u] = R(() => (a === "startDate" ? t : a === "endDate" ? e : void 0) ?? /* @__PURE__ */ new Date()), [h, f] = R("calendar");
2353
+ const [r, n, s] = re(!1), [i, c] = I(void 0), [a, l] = I("startDate"), [d, u] = I(() => (a === "startDate" ? t : a === "endDate" ? e : void 0) ?? /* @__PURE__ */ new Date()), [m, f] = I("calendar");
2354
2354
  return {
2355
2355
  isCalendarVisible: r,
2356
2356
  showCalendarInternal: n,
@@ -2361,7 +2361,7 @@ const Gs = ({
2361
2361
  setFocusedInput: l,
2362
2362
  dateInFocus: d,
2363
2363
  setDateInFocus: u,
2364
- currentPanel: h,
2364
+ currentPanel: m,
2365
2365
  setCurrentPanel: f
2366
2366
  };
2367
2367
  }, Fn = (t, e, r, n, s, i, c, {
@@ -2369,10 +2369,10 @@ const Gs = ({
2369
2369
  setFirstFocusedInput: l,
2370
2370
  isCalendarVisible: d,
2371
2371
  setFocusedInput: u,
2372
- focusedInput: h,
2372
+ focusedInput: m,
2373
2373
  setCurrentPanel: f
2374
2374
  }) => {
2375
- const m = D(() => {
2375
+ const h = D(() => {
2376
2376
  a == null && l("startDate"), u("startDate"), d || i();
2377
2377
  }, [
2378
2378
  d,
@@ -2388,28 +2388,28 @@ const Gs = ({
2388
2388
  i,
2389
2389
  l,
2390
2390
  a
2391
- ]), p = D(
2392
- (b) => {
2393
- var M, S, B, _;
2394
- h === "startDate" ? e != null && z(b.date, e) ? (r == null || r({
2395
- startDate: b.date,
2391
+ ]), b = D(
2392
+ (p) => {
2393
+ var k, S, A, Y;
2394
+ m === "startDate" ? e != null && G(p.date, e) ? (r == null || r({
2395
+ startDate: p.date,
2396
2396
  endDate: void 0
2397
- }), u("endDate"), (M = s.current) == null || M.focus()) : (r == null || r({
2398
- startDate: b.date,
2397
+ }), u("endDate"), (k = s.current) == null || k.focus()) : (r == null || r({
2398
+ startDate: p.date,
2399
2399
  endDate: e
2400
- }), a === "startDate" ? (u("endDate"), (S = s.current) == null || S.focus()) : setTimeout(c, 50)) : h === "endDate" && (t ? z(t, b.date) ? (r == null || r({
2401
- startDate: b.date,
2400
+ }), a === "startDate" ? (u("endDate"), (S = s.current) == null || S.focus()) : setTimeout(c, 50)) : m === "endDate" && (t ? G(t, p.date) ? (r == null || r({
2401
+ startDate: p.date,
2402
2402
  endDate: void 0
2403
- }), u("endDate"), (_ = s.current) == null || _.focus()) : (r == null || r({
2403
+ }), u("endDate"), (Y = s.current) == null || Y.focus()) : (r == null || r({
2404
2404
  startDate: t,
2405
- endDate: b.date
2405
+ endDate: p.date
2406
2406
  }), setTimeout(c, 50)) : (r == null || r({
2407
2407
  startDate: t,
2408
- endDate: b.date
2409
- }), u("startDate"), (B = n.current) == null || B.focus()));
2408
+ endDate: p.date
2409
+ }), u("startDate"), (A = n.current) == null || A.focus()));
2410
2410
  },
2411
2411
  [
2412
- h,
2412
+ m,
2413
2413
  r,
2414
2414
  e,
2415
2415
  a,
@@ -2419,11 +2419,11 @@ const Gs = ({
2419
2419
  t,
2420
2420
  n
2421
2421
  ]
2422
- ), k = D(() => {
2422
+ ), M = D(() => {
2423
2423
  f("presets"), i();
2424
- }, [f, i]), w = D(() => {
2425
- var b;
2426
- d ? c() : (u("startDate"), l("startDate"), (b = n.current) == null || b.focus(), f("calendar"), i());
2424
+ }, [f, i]), y = D(() => {
2425
+ var p;
2426
+ d ? c() : (u("startDate"), l("startDate"), (p = n.current) == null || p.focus(), f("calendar"), i());
2427
2427
  }, [
2428
2428
  d,
2429
2429
  c,
@@ -2432,19 +2432,19 @@ const Gs = ({
2432
2432
  n,
2433
2433
  f,
2434
2434
  i
2435
- ]), y = D(
2436
- (b) => {
2437
- b.key === "Escape" && c();
2435
+ ]), w = D(
2436
+ (p) => {
2437
+ p.key === "Escape" && c();
2438
2438
  },
2439
2439
  [c]
2440
2440
  );
2441
2441
  return {
2442
- onFocusLeft: m,
2442
+ onFocusLeft: h,
2443
2443
  onFocusRight: g,
2444
- onClickDay: p,
2445
- onClickArrowButton: k,
2446
- onClickCalendarButton: w,
2447
- onKeyDownHandler: y
2444
+ onClickDay: b,
2445
+ onClickArrowButton: M,
2446
+ onClickCalendarButton: y,
2447
+ onKeyDownHandler: w
2448
2448
  };
2449
2449
  };
2450
2450
  function Vs({
@@ -2459,55 +2459,55 @@ function Vs({
2459
2459
  calendarProps: l,
2460
2460
  widthLeft: d = 128,
2461
2461
  widthRight: u = 128,
2462
- variant: h,
2462
+ variant: m,
2463
2463
  disabled: f
2464
2464
  }) {
2465
- const { startDate: m, endDate: g } = t || {}, p = $(null), k = $(null), w = Un(m, g), {
2466
- dateInFocus: y,
2467
- setDateInFocus: b,
2468
- isCalendarVisible: M,
2465
+ const { startDate: h, endDate: g } = t || {}, b = H(null), M = H(null), y = Un(h, g), {
2466
+ dateInFocus: w,
2467
+ setDateInFocus: p,
2468
+ isCalendarVisible: k,
2469
2469
  currentPanel: S,
2470
- setCurrentPanel: B
2471
- } = w, {
2472
- showCalendar: _,
2473
- hideCalendar: I,
2474
- inputLeftChangeHandler: Y,
2475
- inputRightChangeHandler: T
2476
- } = Wn(m, g, e, w), {
2470
+ setCurrentPanel: A
2471
+ } = y, {
2472
+ showCalendar: Y,
2473
+ hideCalendar: T,
2474
+ inputLeftChangeHandler: P,
2475
+ inputRightChangeHandler: R
2476
+ } = Wn(h, g, e, y), {
2477
2477
  onKeyDownHandler: W,
2478
- onFocusRight: O,
2478
+ onFocusRight: F,
2479
2479
  onFocusLeft: U,
2480
2480
  onClickDay: j,
2481
- onClickCalendarButton: V,
2482
- onClickArrowButton: F
2481
+ onClickCalendarButton: X,
2482
+ onClickArrowButton: C
2483
2483
  } = Fn(
2484
- m,
2484
+ h,
2485
2485
  g,
2486
2486
  e,
2487
- p,
2488
- k,
2489
- _,
2490
- I,
2491
- w
2487
+ b,
2488
+ M,
2489
+ Y,
2490
+ T,
2491
+ y
2492
2492
  );
2493
2493
  On(
2494
- m,
2494
+ h,
2495
2495
  g,
2496
- b,
2497
2496
  p,
2498
- k
2497
+ b,
2498
+ M
2499
2499
  );
2500
- const rt = x(
2501
- () => m && g && z(m, g),
2502
- [m, g]
2503
- ), J = x(
2500
+ const Z = x(
2501
+ () => h && g && G(h, g),
2502
+ [h, g]
2503
+ ), nt = x(
2504
2504
  () => _r(
2505
2505
  l == null ? void 0 : l.statePerMonth,
2506
- m,
2506
+ h,
2507
2507
  g,
2508
- y
2508
+ w
2509
2509
  ),
2510
- [l == null ? void 0 : l.statePerMonth, m, g, y]
2510
+ [l == null ? void 0 : l.statePerMonth, h, g, w]
2511
2511
  );
2512
2512
  return /* @__PURE__ */ o(N, { onKeyDown: W, children: /* @__PURE__ */ o(
2513
2513
  Yt,
@@ -2515,7 +2515,7 @@ function Vs({
2515
2515
  hideArrow: !0,
2516
2516
  restoreFocus: !1,
2517
2517
  returnFocus: !1,
2518
- renderTrigger: (G) => /* @__PURE__ */ o(N, { ...G, children: /* @__PURE__ */ o(
2518
+ renderTrigger: (V) => /* @__PURE__ */ o(N, { ...V, children: /* @__PURE__ */ o(
2519
2519
  Fe,
2520
2520
  {
2521
2521
  autoFocusLeft: r,
@@ -2528,17 +2528,17 @@ function Vs({
2528
2528
  typeRight: "date",
2529
2529
  placeholderLeft: "Start date",
2530
2530
  placeholderRight: "End date",
2531
- onChangeLeft: Y,
2532
- onChangeRight: T,
2533
- onClickArrowDown: F,
2534
- onClickCalendar: V,
2531
+ onChangeLeft: P,
2532
+ onChangeRight: R,
2533
+ onClickArrowDown: C,
2534
+ onClickCalendar: X,
2535
2535
  onFocusLeft: U,
2536
- onFocusRight: O,
2536
+ onFocusRight: F,
2537
2537
  onClickLeft: U,
2538
- onClickRight: O,
2539
- inputRefLeft: p,
2540
- inputRefRight: k,
2541
- variant: rt ? "error" : h,
2538
+ onClickRight: F,
2539
+ inputRefLeft: b,
2540
+ inputRefRight: M,
2541
+ variant: Z ? "error" : m,
2542
2542
  widthLeft: d,
2543
2543
  widthRight: u,
2544
2544
  minLeft: c,
@@ -2548,20 +2548,20 @@ function Vs({
2548
2548
  }
2549
2549
  ) }),
2550
2550
  placement: Bt,
2551
- onRequestClose: I,
2552
- open: M,
2551
+ onRequestClose: T,
2552
+ open: k,
2553
2553
  children: /* @__PURE__ */ o(
2554
- wt,
2554
+ yt,
2555
2555
  {
2556
2556
  onClickDay: j,
2557
- dateInFocus: y,
2558
- setDateInFocus: b,
2557
+ dateInFocus: w,
2558
+ setDateInFocus: p,
2559
2559
  currentPanel: S,
2560
- setCurrentPanel: B,
2560
+ setCurrentPanel: A,
2561
2561
  minDate: c,
2562
2562
  maxDate: a,
2563
2563
  ...l,
2564
- statePerMonth: J
2564
+ statePerMonth: nt
2565
2565
  }
2566
2566
  )
2567
2567
  }
@@ -2580,8 +2580,8 @@ const ie = ({
2580
2580
  calendarSize: d,
2581
2581
  ...u
2582
2582
  }) => {
2583
- const h = $(null), { onChange: f } = Ar(
2584
- h,
2583
+ const m = H(null), { onChange: f } = Ar(
2584
+ m,
2585
2585
  t,
2586
2586
  e,
2587
2587
  r,
@@ -2596,7 +2596,7 @@ const ie = ({
2596
2596
  Er,
2597
2597
  {
2598
2598
  ...u,
2599
- ref: h,
2599
+ ref: m,
2600
2600
  onChange: f,
2601
2601
  width: jn(d),
2602
2602
  size: d === "large" ? "large" : "medium"
@@ -2654,11 +2654,11 @@ const ie = ({
2654
2654
  da: Mr,
2655
2655
  nl: kr,
2656
2656
  nb: Sr
2657
- }, Jt = (t) => Ke[t], ze = () => Ke.sv, ht = (t, e, r) => {
2657
+ }, Jt = (t) => Ke[t], ze = () => Ke.sv, mt = (t, e, r) => {
2658
2658
  const n = Jt(e);
2659
2659
  if (n == null)
2660
2660
  return;
2661
- const s = mt(
2661
+ const s = gt(
2662
2662
  t,
2663
2663
  St(e),
2664
2664
  r ?? /* @__PURE__ */ new Date(),
@@ -2668,10 +2668,10 @@ const ie = ({
2668
2668
  );
2669
2669
  if (!isNaN(s.getTime()))
2670
2670
  return s;
2671
- }, Tt = (t, e) => v(t, St(e), {
2671
+ }, Tt = (t, e) => $(t, St(e), {
2672
2672
  locale: Jt(e)
2673
2673
  }), oe = (t, e) => {
2674
- const r = ht(t, e);
2674
+ const r = mt(t, e);
2675
2675
  if (r != null)
2676
2676
  return Tt(r, e);
2677
2677
  }, qe = ({
@@ -2690,7 +2690,7 @@ const ie = ({
2690
2690
  placeholder: d.toLowerCase()
2691
2691
  };
2692
2692
  }, [r]);
2693
- return /* @__PURE__ */ A(H, { children: [
2693
+ return /* @__PURE__ */ E(B, { children: [
2694
2694
  /* @__PURE__ */ o(
2695
2695
  ie,
2696
2696
  {
@@ -2735,92 +2735,92 @@ const ie = ({
2735
2735
  )
2736
2736
  ] });
2737
2737
  }, Je = (t, e, r, n) => {
2738
- const s = Jt(r) ?? ze(), i = me(), c = pe(), a = $(null), l = x(
2738
+ const s = Jt(r) ?? ze(), i = me(), c = pe(), a = H(null), l = x(
2739
2739
  () => St(r),
2740
2740
  [r]
2741
2741
  ), d = x(
2742
2742
  () => {
2743
- var T;
2744
- return ((T = t == null ? void 0 : t.startDate) == null ? void 0 : T.length) === l.length ? ht(t.startDate, r) : void 0;
2743
+ var R;
2744
+ return ((R = t == null ? void 0 : t.startDate) == null ? void 0 : R.length) === l.length ? mt(t.startDate, r) : void 0;
2745
2745
  },
2746
2746
  [l.length, r, t == null ? void 0 : t.startDate]
2747
2747
  ), u = x(
2748
2748
  () => {
2749
- var T;
2750
- return ((T = t == null ? void 0 : t.endDate) == null ? void 0 : T.length) === l.length ? ht(t.endDate, r) : void 0;
2749
+ var R;
2750
+ return ((R = t == null ? void 0 : t.endDate) == null ? void 0 : R.length) === l.length ? mt(t.endDate, r) : void 0;
2751
2751
  },
2752
2752
  [l.length, r, t == null ? void 0 : t.endDate]
2753
- ), [h, f] = R(
2753
+ ), [m, f] = I(
2754
2754
  n ?? d ?? /* @__PURE__ */ new Date()
2755
- ), m = D(
2756
- (T) => {
2757
- it(T, c) || z(T, c) ? f(T) : f(c);
2755
+ ), h = D(
2756
+ (R) => {
2757
+ ot(R, c) || G(R, c) ? f(R) : f(c);
2758
2758
  },
2759
2759
  [c]
2760
2760
  ), g = x(
2761
2761
  () => zt(
2762
- h.getFullYear(),
2763
- h.getMonth(),
2762
+ m.getFullYear(),
2763
+ m.getMonth(),
2764
2764
  s
2765
2765
  ),
2766
- [s, h]
2767
- ), p = x(() => Et(v(h, "MMMM yyyy", { locale: s })), [s, h]), k = x(() => it(c, h), [c, h]), [w, y] = R(), [b, M] = R("calendar"), S = D(
2768
- (T) => {
2766
+ [s, m]
2767
+ ), b = x(() => Et($(m, "MMMM yyyy", { locale: s })), [s, m]), M = x(() => ot(c, m), [c, m]), [y, w] = I(), [p, k] = I("calendar"), S = D(
2768
+ (R) => {
2769
2769
  var U, j;
2770
- const W = ((U = T == null ? void 0 : T.startDate) == null ? void 0 : U.length) === l.length ? ht(T.startDate, r) : void 0, O = ((j = T == null ? void 0 : T.endDate) == null ? void 0 : j.length) === l.length ? ht(T.endDate, r) : void 0;
2771
- W ? m(W) : O && m(O), e == null || e({
2770
+ const W = ((U = R == null ? void 0 : R.startDate) == null ? void 0 : U.length) === l.length ? mt(R.startDate, r) : void 0, F = ((j = R == null ? void 0 : R.endDate) == null ? void 0 : j.length) === l.length ? mt(R.endDate, r) : void 0;
2771
+ W ? h(W) : F && h(F), e == null || e({
2772
2772
  ...t,
2773
- ...T
2773
+ ...R
2774
2774
  });
2775
2775
  },
2776
2776
  [
2777
2777
  l.length,
2778
2778
  r,
2779
2779
  e,
2780
- m,
2780
+ h,
2781
2781
  t
2782
2782
  ]
2783
- ), B = x(
2784
- () => it(c, h) || st(h, c),
2785
- [c, h]
2786
- ), _ = x(
2787
- () => (d && u && (L(d, u) || st(d, u))) ?? !1,
2783
+ ), A = x(
2784
+ () => ot(c, m) || it(m, c),
2785
+ [c, m]
2786
+ ), Y = x(
2787
+ () => (d && u && (L(d, u) || it(d, u))) ?? !1,
2788
2788
  [u, d]
2789
2789
  );
2790
2790
  return {
2791
2791
  isDateDisabled: D(
2792
- (T) => !L(T, c) && st(T, c),
2792
+ (R) => !L(R, c) && it(R, c),
2793
2793
  [c]
2794
2794
  ),
2795
- onClickDate: (T) => {
2796
- T.getFullYear() === h.getFullYear() && T.getMonth() === h.getMonth() && (d && u == null ? st(T, d) ? e == null || e({
2797
- startDate: Tt(T, r),
2795
+ onClickDate: (R) => {
2796
+ R.getFullYear() === m.getFullYear() && R.getMonth() === m.getMonth() && (d && u == null ? it(R, d) ? e == null || e({
2797
+ startDate: Tt(R, r),
2798
2798
  endDate: void 0
2799
2799
  }) : e == null || e({
2800
2800
  startDate: t == null ? void 0 : t.startDate,
2801
- endDate: Tt(T, r)
2801
+ endDate: Tt(R, r)
2802
2802
  }) : e == null || e({
2803
- startDate: Tt(T, r),
2803
+ startDate: Tt(R, r),
2804
2804
  endDate: void 0
2805
2805
  }));
2806
2806
  },
2807
2807
  onValueChangeByInputs: S,
2808
- isValidDateRange: _,
2809
- prevMonthDisabled: B,
2808
+ isValidDateRange: Y,
2809
+ prevMonthDisabled: A,
2810
2810
  monthPickerButtonRef: a,
2811
2811
  calendarId: i,
2812
- monthPickerButtonLabel: p,
2813
- visiblePanel: b,
2814
- setVisiblePanel: M,
2812
+ monthPickerButtonLabel: b,
2813
+ visiblePanel: p,
2814
+ setVisiblePanel: k,
2815
2815
  setVisibleMonth: f,
2816
2816
  visibleMonthData: g,
2817
- todayIsInVisibleMonth: k,
2818
- hoverDate: w,
2819
- setHoverDate: y,
2817
+ todayIsInVisibleMonth: M,
2818
+ hoverDate: y,
2819
+ setHoverDate: w,
2820
2820
  selectedStartDate: d,
2821
2821
  selectedEndDate: u,
2822
2822
  today: c,
2823
- visibleMonth: h
2823
+ visibleMonth: m
2824
2824
  };
2825
2825
  }, Gt = ({
2826
2826
  previousMonthButtonAriaLabel: t,
@@ -2833,9 +2833,9 @@ const ie = ({
2833
2833
  visibleMonth: a,
2834
2834
  prevMonthDisabled: l,
2835
2835
  calendarSize: d
2836
- }) => /* @__PURE__ */ A(H, { alignSelf: "center", justifyContent: "space-between", width: "100%", children: [
2836
+ }) => /* @__PURE__ */ E(B, { alignSelf: "center", justifyContent: "space-between", width: "100%", children: [
2837
2837
  /* @__PURE__ */ o(
2838
- q,
2838
+ Q,
2839
2839
  {
2840
2840
  "aria-live": "polite",
2841
2841
  label: r,
@@ -2847,9 +2847,9 @@ const ie = ({
2847
2847
  size: d === "small" ? "medium" : "large"
2848
2848
  }
2849
2849
  ),
2850
- /* @__PURE__ */ A(H, { alignItems: "center", gap: 2, children: [
2850
+ /* @__PURE__ */ E(B, { alignItems: "center", gap: 2, children: [
2851
2851
  /* @__PURE__ */ o(
2852
- lt,
2852
+ dt,
2853
2853
  {
2854
2854
  leftIcon: Ft,
2855
2855
  onClick: () => c(ue(a, 1)),
@@ -2859,7 +2859,7 @@ const ie = ({
2859
2859
  }
2860
2860
  ),
2861
2861
  /* @__PURE__ */ o(
2862
- lt,
2862
+ dt,
2863
2863
  {
2864
2864
  leftIcon: Nt,
2865
2865
  onClick: () => c(Lt(a, 1)),
@@ -2868,7 +2868,7 @@ const ie = ({
2868
2868
  }
2869
2869
  )
2870
2870
  ] })
2871
- ] }), Gn = "_travelDateCell_h6vcn_1", Qn = "_small_h6vcn_4", Xn = "_medium_h6vcn_9", Zn = "_large_h6vcn_14", Vn = "_outline_h6vcn_26", ts = "_contentWrapper_h6vcn_39", es = "_disabled_h6vcn_60", rs = "_isToday_h6vcn_63", ns = "_isSelectionStart_h6vcn_67", ss = "_isSelectionEnd_h6vcn_68", is = "_hover_h6vcn_83", os = "_startSelected_h6vcn_86", cs = "_endSelected_h6vcn_86", X = {
2871
+ ] }), Gn = "_travelDateCell_h6vcn_1", Qn = "_small_h6vcn_4", Xn = "_medium_h6vcn_9", Zn = "_large_h6vcn_14", Vn = "_outline_h6vcn_26", ts = "_contentWrapper_h6vcn_39", es = "_disabled_h6vcn_60", rs = "_isToday_h6vcn_63", ns = "_isSelectionStart_h6vcn_67", ss = "_isSelectionEnd_h6vcn_68", is = "_hover_h6vcn_83", os = "_startSelected_h6vcn_86", cs = "_endSelected_h6vcn_86", tt = {
2872
2872
  travelDateCell: Gn,
2873
2873
  small: Qn,
2874
2874
  medium: Xn,
@@ -2882,7 +2882,7 @@ const ie = ({
2882
2882
  hover: is,
2883
2883
  startSelected: os,
2884
2884
  endSelected: cs
2885
- }, ct = Kt("--lhds-color-red-100"), as = (t, e, r, n, s, i) => {
2885
+ }, at = Kt("--lhds-color-red-100"), as = (t, e, r, n, s, i) => {
2886
2886
  if (!s)
2887
2887
  return {
2888
2888
  left: "transparent",
@@ -2898,38 +2898,38 @@ const ie = ({
2898
2898
  left: "transparent",
2899
2899
  right: "transparent"
2900
2900
  };
2901
- const c = e && r ? z(t, e) && st(t, r) && !L(t, e) && !L(t, r) : !1, a = e && n ? z(t, e) && st(t, n) && !L(t, e) && !L(t, n) : !1;
2901
+ const c = e && r ? G(t, e) && it(t, r) && !L(t, e) && !L(t, r) : !1, a = e && n ? G(t, e) && it(t, n) && !L(t, e) && !L(t, n) : !1;
2902
2902
  if (c)
2903
2903
  return {
2904
- left: ct,
2905
- right: ct
2904
+ left: at,
2905
+ right: at
2906
2906
  };
2907
2907
  if (e && r)
2908
2908
  return L(t, e) ? {
2909
2909
  left: "transparent",
2910
- right: ct
2910
+ right: at
2911
2911
  } : L(t, r) ? {
2912
- left: ct,
2912
+ left: at,
2913
2913
  right: "transparent"
2914
2914
  } : {
2915
2915
  left: "transparent",
2916
2916
  right: "transparent"
2917
2917
  };
2918
- if (e && n && z(n, e)) {
2918
+ if (e && n && G(n, e)) {
2919
2919
  if (L(t, e))
2920
2920
  return {
2921
2921
  left: "transparent",
2922
- right: ct
2922
+ right: at
2923
2923
  };
2924
2924
  if (L(t, n))
2925
2925
  return {
2926
- left: ct,
2926
+ left: at,
2927
2927
  right: "transparent"
2928
2928
  };
2929
2929
  }
2930
2930
  return a ? {
2931
- left: ct,
2932
- right: ct
2931
+ left: at,
2932
+ right: at
2933
2933
  } : {
2934
2934
  left: "transparent",
2935
2935
  right: "transparent"
@@ -2943,35 +2943,35 @@ const ie = ({
2943
2943
  case "Home":
2944
2944
  return Ot(t);
2945
2945
  case "End":
2946
- return K(Ot(t), 6);
2946
+ return J(Ot(t), 6);
2947
2947
  case "ArrowLeft":
2948
- return ut(t, 1);
2948
+ return ft(t, 1);
2949
2949
  case "ArrowUp":
2950
- return ut(t, 7);
2950
+ return ft(t, 7);
2951
2951
  case "ArrowRight":
2952
- return K(t, 1);
2952
+ return J(t, 1);
2953
2953
  case "ArrowDown":
2954
- return K(t, 7);
2954
+ return J(t, 7);
2955
2955
  default:
2956
2956
  return;
2957
2957
  }
2958
- }, Vt = (t, e) => v(Ye(t, 12), ot.fullDate) + e, ds = "_travelDateCellBackground_1k07m_1", us = "_small_1k07m_2", fs = "_medium_1k07m_7", hs = "_large_1k07m_12", $t = {
2958
+ }, Vt = (t, e) => $(Ye(t, 12), ct.fullDate) + e, ds = "_travelDateCellBackground_1k07m_1", us = "_small_1k07m_2", fs = "_medium_1k07m_7", hs = "_large_1k07m_12", $t = {
2959
2959
  travelDateCellBackground: ds,
2960
2960
  small: us,
2961
2961
  medium: fs,
2962
2962
  large: hs
2963
- }, ms = ({ calendarSize: t, bgColorLeft: e, bgColorRight: r }) => /* @__PURE__ */ A(H, { children: [
2963
+ }, ms = ({ calendarSize: t, bgColorLeft: e, bgColorRight: r }) => /* @__PURE__ */ E(B, { children: [
2964
2964
  /* @__PURE__ */ o(
2965
2965
  N,
2966
2966
  {
2967
- className: gt($t.travelDateCellBackground, $t[t]),
2967
+ className: pt($t.travelDateCellBackground, $t[t]),
2968
2968
  background: e
2969
2969
  }
2970
2970
  ),
2971
2971
  /* @__PURE__ */ o(
2972
2972
  N,
2973
2973
  {
2974
- className: gt($t.travelDateCellBackground, $t[t]),
2974
+ className: pt($t.travelDateCellBackground, $t[t]),
2975
2975
  background: r
2976
2976
  }
2977
2977
  )
@@ -2987,78 +2987,80 @@ const ie = ({
2987
2987
  onEndHover: l,
2988
2988
  hoverDate: d,
2989
2989
  today: u,
2990
- todayIsInVisibleMonth: h,
2990
+ todayIsInVisibleMonth: m,
2991
2991
  calendarId: f,
2992
- isDateDisabled: m,
2993
- size: g
2992
+ isDateDisabled: h,
2993
+ size: g,
2994
+ dateTestId: b
2994
2995
  }) => {
2995
- const p = D(
2996
- async (B) => {
2997
- var I;
2998
- const _ = ls(n.date, B.key);
2999
- _ && !m(_) && (a(_), it(n.date, _) ? (I = document.getElementById(Vt(_, f))) == null || I.focus() : (r(_), setTimeout(() => {
3000
- var Y;
3001
- (Y = document.getElementById(Vt(_, f))) == null || Y.focus();
3002
- }, 10))), (B.key === "Enter" || B.code === "Space") && t(n.date);
2996
+ const M = D(
2997
+ async (Y) => {
2998
+ var P;
2999
+ const T = ls(n.date, Y.key);
3000
+ T && !h(T) && (a(T), ot(n.date, T) ? (P = document.getElementById(Vt(T, f))) == null || P.focus() : (r(T), setTimeout(() => {
3001
+ var R;
3002
+ (R = document.getElementById(Vt(T, f))) == null || R.focus();
3003
+ }, 10))), (Y.key === "Enter" || Y.code === "Space") && t(n.date);
3003
3004
  },
3004
3005
  [
3005
3006
  f,
3006
3007
  n.date,
3007
- m,
3008
+ h,
3008
3009
  r,
3009
3010
  t,
3010
3011
  a
3011
3012
  ]
3012
- ), k = n.month === e.getMonth(), w = m(n.date), y = i ? L(i, n.date) : !1, b = c ? L(c, n.date) : !1, M = L(n.date, u), S = as(
3013
+ ), y = n.month === e.getMonth(), w = h(n.date), p = i ? L(i, n.date) : !1, k = c ? L(c, n.date) : !1, S = L(n.date, u), A = as(
3013
3014
  n.date,
3014
3015
  i,
3015
3016
  c,
3016
3017
  d,
3017
- k,
3018
+ y,
3018
3019
  s
3019
3020
  );
3020
- return /* @__PURE__ */ A(
3021
+ return /* @__PURE__ */ E(
3021
3022
  "td",
3022
3023
  {
3023
- className: gt(X.travelDateCell, X[g]),
3024
+ className: pt(tt.travelDateCell, tt[g]),
3024
3025
  onClick: w ? void 0 : () => t(n.date),
3025
- onMouseOver: w ? void 0 : () => k && a(n.date),
3026
- onMouseOut: w ? void 0 : () => k && l(n.date),
3026
+ onMouseOver: w ? void 0 : () => y && a(n.date),
3027
+ onMouseOut: w ? void 0 : () => y && l(n.date),
3027
3028
  tabIndex: w ? void 0 : ps(
3028
3029
  n,
3029
3030
  i,
3030
- M,
3031
+ S,
3031
3032
  e,
3032
- h
3033
+ m
3033
3034
  ),
3034
3035
  id: w ? void 0 : Vt(n.date, f),
3035
- onKeyDown: w ? void 0 : p,
3036
- ...w ? void 0 : { "aria-selected": y || b },
3036
+ onKeyDown: w ? void 0 : M,
3037
+ ...w ? void 0 : { "aria-selected": p || k },
3038
+ "data-testid": b == null ? void 0 : b(n.date),
3037
3039
  children: [
3038
- /* @__PURE__ */ o("div", { className: X.outline }),
3040
+ /* @__PURE__ */ o("div", { className: tt.outline }),
3039
3041
  /* @__PURE__ */ o(
3040
3042
  ms,
3041
3043
  {
3042
3044
  calendarSize: g,
3043
- bgColorLeft: S.left,
3044
- bgColorRight: S.right
3045
+ bgColorLeft: A.left,
3046
+ bgColorRight: A.right
3045
3047
  }
3046
3048
  ),
3047
- k && /* @__PURE__ */ o(
3049
+ y && /* @__PURE__ */ o(
3048
3050
  "div",
3049
3051
  {
3050
- className: gt(
3051
- X.contentWrapper,
3052
- M ? X.isToday : void 0,
3053
- i ? X.startSelected : void 0,
3054
- c ? X.endSelected : void 0,
3055
- d && L(d, n.date) ? X.hover : void 0,
3056
- y && X.isSelectionStart,
3057
- b && X.isSelectionEnd,
3058
- w && X.disabled
3052
+ className: pt(
3053
+ tt.contentWrapper,
3054
+ S ? tt.isToday : void 0,
3055
+ i ? tt.startSelected : void 0,
3056
+ c ? tt.endSelected : void 0,
3057
+ d && L(d, n.date) ? tt.hover : void 0,
3058
+ p && tt.isSelectionStart,
3059
+ k && tt.isSelectionEnd,
3060
+ w && tt.disabled
3059
3061
  ),
3060
3062
  children: /* @__PURE__ */ o(
3061
- Dt,
3063
+ bt,
3062
3064
  {
3063
3065
  variant: "bold",
3064
3066
  color: w ? Kt("--lhds-color-ui-500") : void 0,
@@ -3071,7 +3073,7 @@ const ie = ({
3071
3073
  }
3072
3074
  );
3073
3075
  }, ps = (t, e, r, n, s) => {
3074
- const i = e ? it(e, n) : !1;
3076
+ const i = e ? ot(e, n) : !1;
3075
3077
  return (e && i ? L(t.date, e) : r) || !i && !s && t.date.getDate() === 1 ? 0 : -1;
3076
3078
  }, Ds = "_travelCalendar_18pjj_1", bs = {
3077
3079
  travelCalendar: Ds
@@ -3087,39 +3089,41 @@ const ie = ({
3087
3089
  hoverDate: l,
3088
3090
  today: d,
3089
3091
  calendarId: u,
3090
- isDateDisabled: h,
3092
+ isDateDisabled: m,
3091
3093
  todayIsInVisibleMonth: f,
3092
- size: m = "medium",
3093
- multiSelectable: g
3094
+ size: h = "medium",
3095
+ multiSelectable: g,
3096
+ dateTestId: b
3094
3097
  }) => /* @__PURE__ */ o(
3095
3098
  "table",
3096
3099
  {
3097
3100
  className: bs.travelCalendar,
3098
3101
  role: "grid",
3099
3102
  ...g ? { "aria-multiselectable": !0 } : void 0,
3100
- children: /* @__PURE__ */ A("tbody", { children: [
3101
- /* @__PURE__ */ o("tr", { children: t.weeks[0].days.map((p) => /* @__PURE__ */ o("th", { abbr: p.fullName, children: /* @__PURE__ */ o(Dt, { children: p.name }) }, p.name)) }),
3102
- t.weeks.map((p) => /* @__PURE__ */ o(he.Fragment, { children: /* @__PURE__ */ o("tr", { children: p.days.map((k) => /* @__PURE__ */ o(
3103
+ children: /* @__PURE__ */ E("tbody", { children: [
3104
+ /* @__PURE__ */ o("tr", { children: t.weeks[0].days.map((M) => /* @__PURE__ */ o("th", { abbr: M.fullName, children: /* @__PURE__ */ o(bt, { children: M.name }) }, M.name)) }),
3105
+ t.weeks.map((M) => /* @__PURE__ */ o(he.Fragment, { children: /* @__PURE__ */ o("tr", { children: M.days.map((y) => /* @__PURE__ */ o(
3103
3106
  gs,
3104
3107
  {
3105
- size: m,
3108
+ size: h,
3106
3109
  onClick: (w) => e(w),
3107
3110
  visibleMonth: s,
3108
3111
  onChangeVisibleMonth: n,
3109
3112
  isValidDateRange: i,
3110
- day: k,
3113
+ day: y,
3111
3114
  onStartHover: (w) => r(w),
3112
- onEndHover: (w) => r((y) => y && L(y, w) ? void 0 : y),
3115
+ onEndHover: (w) => r((p) => p && L(p, w) ? void 0 : p),
3113
3116
  selectedStartDate: c,
3114
3117
  selectedEndDate: a,
3115
3118
  hoverDate: l,
3116
3119
  today: d,
3117
3120
  todayIsInVisibleMonth: f,
3118
3121
  calendarId: u,
3119
- isDateDisabled: h
3122
+ isDateDisabled: m,
3123
+ dateTestId: b
3120
3124
  },
3121
- k.dateString
3122
- )) }, p.weekNumber) }, p.weekNumber))
3125
+ y.dateString
3126
+ )) }, M.weekNumber) }, M.weekNumber))
3123
3127
  ] })
3124
3128
  }
3125
3129
  ), ws = "_travelDateRangeInput_1j7rp_1", ys = "_overlay_1j7rp_2", Ms = "_calendarVisible_1j7rp_6", te = {
@@ -3138,131 +3142,133 @@ const ie = ({
3138
3142
  heading: l,
3139
3143
  headingLevel: d,
3140
3144
  numMonthsInMonthPicker: u = 12,
3141
- firstMonthInMonthPicker: h = /* @__PURE__ */ new Date(),
3145
+ firstMonthInMonthPicker: m = /* @__PURE__ */ new Date(),
3142
3146
  zIndex: f = 1e3,
3143
- zIndexWhenClosed: m,
3147
+ zIndexWhenClosed: h,
3144
3148
  onHideCalendar: g,
3145
- renderBelowCalendar: p,
3146
- size: k = "medium"
3149
+ renderBelowCalendar: b,
3150
+ size: M = "medium",
3151
+ dateTestId: y
3147
3152
  }) => {
3148
- const [w, y] = R(!1), [b, M] = R(!1), [S, B] = R({
3153
+ const [w, p] = I(!1), [k, S] = I(!1), [A, Y] = I({
3149
3154
  // Sane defaults, this will be updated with actual data from DOM.
3150
3155
  width: 336,
3151
3156
  height: 66
3152
- }), _ = k === "large" ? "8.8rem" : "6.6rem", I = $(!1), Y = D(() => {
3153
- I.current = !0, M(!0), setTimeout(() => {
3154
- y(!0);
3157
+ }), T = M === "large" ? "8.8rem" : "6.6rem", P = H(!1), R = D(() => {
3158
+ P.current = !0, S(!0), setTimeout(() => {
3159
+ p(!0);
3155
3160
  }, 10);
3156
- }, []), T = D(() => {
3157
- b && (y(!1), I.current = !1, g == null || g(), setTimeout(() => {
3158
- I.current || M(!1);
3161
+ }, []), W = D(() => {
3162
+ k && (p(!1), P.current = !1, g == null || g(), setTimeout(() => {
3163
+ P.current || S(!1);
3159
3164
  }, 120));
3160
- }, [b, g]), W = $(null), O = $(null);
3161
- Ie(W, T), Be(() => {
3162
- var tt, et;
3163
- const E = (tt = O.current) == null ? void 0 : tt.offsetWidth, P = (et = O.current) == null ? void 0 : et.offsetHeight;
3164
- E != null && P != null && (S.height !== P || S.width !== E) && B({ width: E, height: P });
3165
- }, [S.height, S.width]);
3166
- const U = Je(
3165
+ }, [k, g]), F = H(null), U = H(null);
3166
+ Re(F, W), Be(() => {
3167
+ var rt, q;
3168
+ const _ = (rt = U.current) == null ? void 0 : rt.offsetWidth, O = (q = U.current) == null ? void 0 : q.offsetHeight;
3169
+ _ != null && O != null && (A.height !== O || A.width !== _) && Y({ width: _, height: O });
3170
+ }, [A.height, A.width]);
3171
+ const j = Je(
3167
3172
  t,
3168
3173
  e,
3169
3174
  s,
3170
3175
  i
3171
3176
  ), {
3172
- visiblePanel: j,
3173
- visibleMonth: V,
3174
- onValueChangeByInputs: F,
3175
- setVisibleMonth: rt,
3176
- setVisiblePanel: J,
3177
- monthPickerButtonRef: G
3178
- } = U, Q = D(
3179
- (E) => {
3180
- E.key === "Escape" && T();
3177
+ visiblePanel: X,
3178
+ visibleMonth: C,
3179
+ onValueChangeByInputs: Z,
3180
+ setVisibleMonth: nt,
3181
+ setVisiblePanel: V,
3182
+ monthPickerButtonRef: K
3183
+ } = j, v = D(
3184
+ (_) => {
3185
+ _.key === "Escape" && W();
3181
3186
  },
3182
- [T]
3187
+ [W]
3183
3188
  );
3184
- return /* @__PURE__ */ A(
3189
+ return /* @__PURE__ */ E(
3185
3190
  N,
3186
3191
  {
3187
3192
  position: "relative",
3188
3193
  className: te.travelDateRangeInput,
3189
- ref: W,
3190
- onKeyDown: Q,
3191
- height: S.height,
3192
- width: S.width,
3194
+ ref: F,
3195
+ onKeyDown: v,
3196
+ height: A.height,
3197
+ width: A.width,
3193
3198
  children: [
3194
3199
  /* @__PURE__ */ o(
3195
3200
  N,
3196
3201
  {
3197
3202
  position: "absolute",
3198
- ref: O,
3199
- zIndex: b ? f : m,
3203
+ ref: U,
3204
+ zIndex: k ? f : h,
3200
3205
  children: /* @__PURE__ */ o(
3201
3206
  qe,
3202
3207
  {
3203
3208
  value: t,
3204
- onValueChange: F,
3209
+ onValueChange: Z,
3205
3210
  localeCode: s,
3206
3211
  startDateLabel: r,
3207
3212
  endDateLabel: n,
3208
- onFocus: Y,
3209
- calendarSize: k
3213
+ onFocus: R,
3214
+ calendarSize: M
3210
3215
  }
3211
3216
  )
3212
3217
  }
3213
3218
  ),
3214
- b && /* @__PURE__ */ o(
3219
+ k && /* @__PURE__ */ o(
3215
3220
  N,
3216
3221
  {
3217
3222
  position: "absolute",
3218
3223
  zIndex: f - 1,
3219
3224
  left: "-2.4rem",
3220
3225
  top: l ? "-8.0rem" : "-2.4rem",
3221
- className: gt(te.overlay, w && te.calendarVisible),
3226
+ className: pt(te.overlay, w && te.calendarVisible),
3222
3227
  children: /* @__PURE__ */ o(
3223
3228
  N,
3224
3229
  {
3225
3230
  background: "white",
3226
3231
  shadow: "popover",
3227
3232
  borderRadius: "var(--swui-border-radius-large)",
3228
- children: /* @__PURE__ */ A(Ee, { gap: 3, children: [
3233
+ children: /* @__PURE__ */ E(Ee, { gap: 3, children: [
3229
3234
  l && /* @__PURE__ */ o(_t, { variant: "h2", as: d, children: l }),
3230
- /* @__PURE__ */ o(N, { height: _ }),
3235
+ /* @__PURE__ */ o(N, { height: T }),
3231
3236
  /* @__PURE__ */ o(
3232
3237
  Gt,
3233
3238
  {
3234
- ...U,
3239
+ ...j,
3235
3240
  previousMonthButtonAriaLabel: c,
3236
3241
  nextMonthButtonAriaLabel: a,
3237
- calendarSize: k
3242
+ calendarSize: M
3238
3243
  }
3239
3244
  ),
3240
- j === "calendar" && /* @__PURE__ */ o(
3245
+ X === "calendar" && /* @__PURE__ */ o(
3241
3246
  Qt,
3242
3247
  {
3243
- ...U,
3244
- size: k,
3245
- multiSelectable: !0
3248
+ ...j,
3249
+ size: M,
3250
+ multiSelectable: !0,
3251
+ dateTestId: y
3246
3252
  }
3247
3253
  ),
3248
- j === "month-picker" && /* @__PURE__ */ o(
3254
+ X === "month-picker" && /* @__PURE__ */ o(
3249
3255
  Pt,
3250
3256
  {
3251
- firstMonth: h,
3257
+ firstMonth: m,
3252
3258
  numMonths: u,
3253
- value: V,
3254
- size: k,
3255
- onValueChange: (E) => {
3256
- var P;
3257
- rt(E), J("calendar"), (P = G.current) == null || P.focus();
3259
+ value: C,
3260
+ size: M,
3261
+ onValueChange: (_) => {
3262
+ var O;
3263
+ nt(_), V("calendar"), (O = K.current) == null || O.focus();
3258
3264
  },
3259
3265
  onCancel: () => {
3260
- var E;
3261
- J("calendar"), (E = G.current) == null || E.focus();
3266
+ var _;
3267
+ V("calendar"), (_ = K.current) == null || _.focus();
3262
3268
  }
3263
3269
  }
3264
3270
  ),
3265
- p == null ? void 0 : p({ hideCalendar: T })
3271
+ b == null ? void 0 : b({ hideCalendar: W })
3266
3272
  ] })
3267
3273
  }
3268
3274
  )
@@ -3290,7 +3296,7 @@ const ie = ({
3290
3296
  placeholder: l.toLowerCase()
3291
3297
  };
3292
3298
  }, [n]);
3293
- return /* @__PURE__ */ o(H, { children: /* @__PURE__ */ o(
3299
+ return /* @__PURE__ */ o(B, { children: /* @__PURE__ */ o(
3294
3300
  ie,
3295
3301
  {
3296
3302
  mask: c,
@@ -3307,56 +3313,56 @@ const ie = ({
3307
3313
  }
3308
3314
  ) });
3309
3315
  }, Qe = (t, e, r, n) => {
3310
- const s = Jt(r) ?? ze(), i = me(), c = pe(), a = $(null), l = x(
3316
+ const s = Jt(r) ?? ze(), i = me(), c = pe(), a = H(null), l = x(
3311
3317
  () => St(r),
3312
3318
  [r]
3313
3319
  ), d = x(
3314
- () => (t == null ? void 0 : t.length) === l.length ? ht(t, r) : void 0,
3320
+ () => (t == null ? void 0 : t.length) === l.length ? mt(t, r) : void 0,
3315
3321
  [l.length, r, t]
3316
- ), [u, h] = R(
3322
+ ), [u, m] = I(
3317
3323
  n ?? d ?? /* @__PURE__ */ new Date()
3318
3324
  ), f = D(
3319
- (I) => {
3320
- it(I, c) || z(I, c) ? h(I) : h(c);
3325
+ (T) => {
3326
+ ot(T, c) || G(T, c) ? m(T) : m(c);
3321
3327
  },
3322
3328
  [c]
3323
- ), m = x(
3329
+ ), h = x(
3324
3330
  () => zt(
3325
3331
  u.getFullYear(),
3326
3332
  u.getMonth(),
3327
3333
  s
3328
3334
  ),
3329
3335
  [s, u]
3330
- ), g = x(() => Et(v(u, "MMMM yyyy", { locale: s })), [s, u]), p = x(() => it(c, u), [c, u]), [k, w] = R(), [y, b] = R("calendar"), M = D(
3331
- (I) => {
3332
- const Y = (I == null ? void 0 : I.length) === l.length ? ht(I, r) : void 0;
3333
- Y && f(Y), e == null || e(I);
3336
+ ), g = x(() => Et($(u, "MMMM yyyy", { locale: s })), [s, u]), b = x(() => ot(c, u), [c, u]), [M, y] = I(), [w, p] = I("calendar"), k = D(
3337
+ (T) => {
3338
+ const P = (T == null ? void 0 : T.length) === l.length ? mt(T, r) : void 0;
3339
+ P && f(P), e == null || e(T);
3334
3340
  },
3335
3341
  [l.length, r, e, f]
3336
3342
  ), S = x(
3337
- () => it(c, u) || st(u, c),
3343
+ () => ot(c, u) || it(u, c),
3338
3344
  [c, u]
3339
3345
  );
3340
3346
  return {
3341
3347
  isDateDisabled: D(
3342
- (I) => !L(I, c) && st(I, c),
3348
+ (T) => !L(T, c) && it(T, c),
3343
3349
  [c]
3344
3350
  ),
3345
- onClickDate: (I) => {
3346
- e == null || e(Tt(I, r));
3351
+ onClickDate: (T) => {
3352
+ e == null || e(Tt(T, r));
3347
3353
  },
3348
- onValueChangeByInputs: M,
3354
+ onValueChangeByInputs: k,
3349
3355
  prevMonthDisabled: S,
3350
3356
  monthPickerButtonRef: a,
3351
3357
  calendarId: i,
3352
3358
  monthPickerButtonLabel: g,
3353
- visiblePanel: y,
3354
- setVisiblePanel: b,
3355
- setVisibleMonth: h,
3356
- visibleMonthData: m,
3357
- todayIsInVisibleMonth: p,
3358
- hoverDate: k,
3359
- setHoverDate: w,
3359
+ visiblePanel: w,
3360
+ setVisiblePanel: p,
3361
+ setVisibleMonth: m,
3362
+ visibleMonthData: h,
3363
+ todayIsInVisibleMonth: b,
3364
+ hoverDate: M,
3365
+ setHoverDate: y,
3360
3366
  selectedDate: d,
3361
3367
  today: c,
3362
3368
  visibleMonth: u
@@ -3373,133 +3379,135 @@ const ie = ({
3373
3379
  headingLevel: l,
3374
3380
  numMonthsInMonthPicker: d = 12,
3375
3381
  firstMonthInMonthPicker: u = /* @__PURE__ */ new Date(),
3376
- zIndex: h = 1e3,
3382
+ zIndex: m = 1e3,
3377
3383
  zIndexWhenClosed: f,
3378
- onHideCalendar: m,
3384
+ onHideCalendar: h,
3379
3385
  renderBelowCalendar: g,
3380
- size: p = "medium"
3386
+ size: b = "medium",
3387
+ dateTestId: M
3381
3388
  }) => {
3382
- const [k, w] = R(!1), [y, b] = R(!1), [M, S] = R({
3389
+ const [y, w] = I(!1), [p, k] = I(!1), [S, A] = I({
3383
3390
  // Sane defaults, this will be updated with actual data from DOM.
3384
3391
  width: 336,
3385
3392
  height: 66
3386
- }), B = p === "large" ? "8.8rem" : "6.6rem", _ = $(!1), I = D(() => {
3387
- _.current = !0, b(!0), setTimeout(() => {
3393
+ }), Y = b === "large" ? "8.8rem" : "6.6rem", T = H(!1), P = D(() => {
3394
+ T.current = !0, k(!0), setTimeout(() => {
3388
3395
  w(!0);
3389
3396
  }, 10);
3390
- }, []), Y = D(() => {
3391
- y && (w(!1), _.current = !1, m == null || m(), setTimeout(() => {
3392
- _.current || b(!1);
3397
+ }, []), R = D(() => {
3398
+ p && (w(!1), T.current = !1, h == null || h(), setTimeout(() => {
3399
+ T.current || k(!1);
3393
3400
  }, 120));
3394
- }, [y, m]), T = $(null), W = $(null);
3395
- Ie(T, Y), Be(() => {
3396
- var tt, et;
3397
- const E = (tt = W.current) == null ? void 0 : tt.offsetWidth, P = (et = W.current) == null ? void 0 : et.offsetHeight;
3398
- E != null && P != null && (M.height !== P || M.width !== E) && S({ width: E, height: P });
3399
- }, [M.height, M.width]);
3400
- const O = Qe(
3401
+ }, [p, h]), W = H(null), F = H(null);
3402
+ Re(W, R), Be(() => {
3403
+ var rt, q;
3404
+ const _ = (rt = F.current) == null ? void 0 : rt.offsetWidth, O = (q = F.current) == null ? void 0 : q.offsetHeight;
3405
+ _ != null && O != null && (S.height !== O || S.width !== _) && A({ width: _, height: O });
3406
+ }, [S.height, S.width]);
3407
+ const U = Qe(
3401
3408
  t,
3402
3409
  e,
3403
3410
  n,
3404
3411
  s
3405
3412
  ), {
3406
- visiblePanel: U,
3407
- visibleMonth: j,
3408
- onValueChangeByInputs: V,
3409
- selectedDate: F,
3410
- setVisibleMonth: rt,
3411
- setVisiblePanel: J,
3412
- monthPickerButtonRef: G
3413
- } = O, Q = D(
3414
- (E) => {
3415
- E.key === "Escape" && Y();
3413
+ visiblePanel: j,
3414
+ visibleMonth: X,
3415
+ onValueChangeByInputs: C,
3416
+ selectedDate: Z,
3417
+ setVisibleMonth: nt,
3418
+ setVisiblePanel: V,
3419
+ monthPickerButtonRef: K
3420
+ } = U, v = D(
3421
+ (_) => {
3422
+ _.key === "Escape" && R();
3416
3423
  },
3417
- [Y]
3424
+ [R]
3418
3425
  );
3419
- return /* @__PURE__ */ A(
3426
+ return /* @__PURE__ */ E(
3420
3427
  N,
3421
3428
  {
3422
3429
  position: "relative",
3423
3430
  className: ee.travelDateInput,
3424
- ref: T,
3425
- onKeyDown: Q,
3426
- height: M.height,
3427
- width: M.width,
3431
+ ref: W,
3432
+ onKeyDown: v,
3433
+ height: S.height,
3434
+ width: S.width,
3428
3435
  children: [
3429
3436
  /* @__PURE__ */ o(
3430
3437
  N,
3431
3438
  {
3432
3439
  position: "absolute",
3433
- ref: W,
3434
- zIndex: y ? h : f,
3440
+ ref: F,
3441
+ zIndex: p ? m : f,
3435
3442
  children: /* @__PURE__ */ o(
3436
3443
  Ge,
3437
3444
  {
3438
3445
  value: t,
3439
- onValueChange: V,
3446
+ onValueChange: C,
3440
3447
  localeCode: n,
3441
3448
  label: r,
3442
- onFocus: I,
3443
- calendarSize: p
3449
+ onFocus: P,
3450
+ calendarSize: b
3444
3451
  }
3445
3452
  )
3446
3453
  }
3447
3454
  ),
3448
- y && /* @__PURE__ */ o(
3455
+ p && /* @__PURE__ */ o(
3449
3456
  N,
3450
3457
  {
3451
3458
  position: "absolute",
3452
- zIndex: h - 1,
3459
+ zIndex: m - 1,
3453
3460
  left: "-2.4rem",
3454
3461
  top: a ? "-8.0rem" : "-2.4rem",
3455
- className: gt(ee.overlay, k && ee.calendarVisible),
3462
+ className: pt(ee.overlay, y && ee.calendarVisible),
3456
3463
  children: /* @__PURE__ */ o(
3457
3464
  N,
3458
3465
  {
3459
3466
  background: "white",
3460
3467
  shadow: "popover",
3461
3468
  borderRadius: "var(--swui-border-radius-large)",
3462
- children: /* @__PURE__ */ A(Ee, { gap: 3, children: [
3469
+ children: /* @__PURE__ */ E(Ee, { gap: 3, children: [
3463
3470
  a && /* @__PURE__ */ o(_t, { variant: "h2", as: l, children: a }),
3464
- /* @__PURE__ */ o(N, { height: B }),
3471
+ /* @__PURE__ */ o(N, { height: Y }),
3465
3472
  /* @__PURE__ */ o(
3466
3473
  Gt,
3467
3474
  {
3468
- ...O,
3475
+ ...U,
3469
3476
  previousMonthButtonAriaLabel: i,
3470
3477
  nextMonthButtonAriaLabel: c,
3471
- calendarSize: p
3478
+ calendarSize: b
3472
3479
  }
3473
3480
  ),
3474
- U === "calendar" && /* @__PURE__ */ o(
3481
+ j === "calendar" && /* @__PURE__ */ o(
3475
3482
  Qt,
3476
3483
  {
3477
- ...O,
3478
- size: p,
3479
- isValidDateRange: !!F,
3480
- selectedStartDate: F,
3481
- selectedEndDate: F,
3482
- multiSelectable: !1
3484
+ ...U,
3485
+ size: b,
3486
+ isValidDateRange: !!Z,
3487
+ selectedStartDate: Z,
3488
+ selectedEndDate: Z,
3489
+ multiSelectable: !1,
3490
+ dateTestId: M
3483
3491
  }
3484
3492
  ),
3485
- U === "month-picker" && /* @__PURE__ */ o(
3493
+ j === "month-picker" && /* @__PURE__ */ o(
3486
3494
  Pt,
3487
3495
  {
3488
3496
  firstMonth: u,
3489
3497
  numMonths: d,
3490
- value: j,
3491
- size: p,
3492
- onValueChange: (E) => {
3493
- var P;
3494
- rt(E), J("calendar"), (P = G.current) == null || P.focus();
3498
+ value: X,
3499
+ size: b,
3500
+ onValueChange: (_) => {
3501
+ var O;
3502
+ nt(_), V("calendar"), (O = K.current) == null || O.focus();
3495
3503
  },
3496
3504
  onCancel: () => {
3497
- var E;
3498
- J("calendar"), (E = G.current) == null || E.focus();
3505
+ var _;
3506
+ V("calendar"), (_ = K.current) == null || _.focus();
3499
3507
  }
3500
3508
  }
3501
3509
  ),
3502
- g == null ? void 0 : g({ hideCalendar: Y })
3510
+ g == null ? void 0 : g({ hideCalendar: R })
3503
3511
  ] })
3504
3512
  }
3505
3513
  )
@@ -3520,68 +3528,70 @@ const ie = ({
3520
3528
  headingLevel: l,
3521
3529
  numMonthsInMonthPicker: d = 12,
3522
3530
  firstMonthInMonthPicker: u = /* @__PURE__ */ new Date(),
3523
- size: h = "medium"
3531
+ dateTestId: m,
3532
+ size: f = "medium"
3524
3533
  }) => {
3525
- const f = Qe(
3534
+ const h = Qe(
3526
3535
  t,
3527
3536
  e,
3528
3537
  n,
3529
3538
  s
3530
3539
  ), {
3531
- visiblePanel: m,
3532
- visibleMonth: g,
3533
- onValueChangeByInputs: p,
3534
- setVisibleMonth: k,
3540
+ visiblePanel: g,
3541
+ visibleMonth: b,
3542
+ onValueChangeByInputs: M,
3543
+ setVisibleMonth: y,
3535
3544
  setVisiblePanel: w,
3536
- monthPickerButtonRef: y,
3537
- selectedDate: b
3538
- } = f;
3539
- return /* @__PURE__ */ A(C, { gap: 3, children: [
3545
+ monthPickerButtonRef: p,
3546
+ selectedDate: k
3547
+ } = h;
3548
+ return /* @__PURE__ */ E(z, { gap: 3, children: [
3540
3549
  a && /* @__PURE__ */ o(_t, { variant: "h2", as: l, children: a }),
3541
3550
  /* @__PURE__ */ o(
3542
3551
  Ge,
3543
3552
  {
3544
3553
  value: t,
3545
- onValueChange: p,
3554
+ onValueChange: M,
3546
3555
  localeCode: n,
3547
3556
  label: r,
3548
- calendarSize: h
3557
+ calendarSize: f
3549
3558
  }
3550
3559
  ),
3551
3560
  /* @__PURE__ */ o(
3552
3561
  Gt,
3553
3562
  {
3554
- ...f,
3563
+ ...h,
3555
3564
  previousMonthButtonAriaLabel: i,
3556
3565
  nextMonthButtonAriaLabel: c,
3557
- calendarSize: h
3566
+ calendarSize: f
3558
3567
  }
3559
3568
  ),
3560
- m === "calendar" && /* @__PURE__ */ o(
3569
+ g === "calendar" && /* @__PURE__ */ o(
3561
3570
  Qt,
3562
3571
  {
3563
- ...f,
3564
- size: h,
3565
- selectedStartDate: b,
3566
- selectedEndDate: b,
3567
- isValidDateRange: !!b,
3568
- multiSelectable: !1
3572
+ ...h,
3573
+ size: f,
3574
+ selectedStartDate: k,
3575
+ selectedEndDate: k,
3576
+ isValidDateRange: !!k,
3577
+ multiSelectable: !1,
3578
+ dateTestId: m
3569
3579
  }
3570
3580
  ),
3571
- m === "month-picker" && /* @__PURE__ */ o(
3581
+ g === "month-picker" && /* @__PURE__ */ o(
3572
3582
  Pt,
3573
3583
  {
3574
3584
  firstMonth: u,
3575
3585
  numMonths: d,
3576
- value: g,
3577
- size: h,
3578
- onValueChange: (M) => {
3579
- var S;
3580
- k(M), w("calendar"), (S = y.current) == null || S.focus();
3586
+ value: b,
3587
+ size: f,
3588
+ onValueChange: (S) => {
3589
+ var A;
3590
+ y(S), w("calendar"), (A = p.current) == null || A.focus();
3581
3591
  },
3582
3592
  onCancel: () => {
3583
- var M;
3584
- w("calendar"), (M = y.current) == null || M.focus();
3593
+ var S;
3594
+ w("calendar"), (S = p.current) == null || S.focus();
3585
3595
  }
3586
3596
  }
3587
3597
  )
@@ -3598,29 +3608,30 @@ const ie = ({
3598
3608
  heading: l,
3599
3609
  headingLevel: d,
3600
3610
  numMonthsInMonthPicker: u = 12,
3601
- firstMonthInMonthPicker: h = /* @__PURE__ */ new Date(),
3602
- size: f = "medium"
3611
+ firstMonthInMonthPicker: m = /* @__PURE__ */ new Date(),
3612
+ size: f = "medium",
3613
+ dateTestId: h
3603
3614
  }) => {
3604
- const m = Je(
3615
+ const g = Je(
3605
3616
  t,
3606
3617
  e,
3607
3618
  s,
3608
3619
  i
3609
3620
  ), {
3610
- visiblePanel: g,
3611
- visibleMonth: p,
3612
- onValueChangeByInputs: k,
3621
+ visiblePanel: b,
3622
+ visibleMonth: M,
3623
+ onValueChangeByInputs: y,
3613
3624
  setVisibleMonth: w,
3614
- setVisiblePanel: y,
3615
- monthPickerButtonRef: b
3616
- } = m;
3617
- return /* @__PURE__ */ A(C, { gap: 3, children: [
3625
+ setVisiblePanel: p,
3626
+ monthPickerButtonRef: k
3627
+ } = g;
3628
+ return /* @__PURE__ */ E(z, { gap: 3, children: [
3618
3629
  l && /* @__PURE__ */ o(_t, { variant: "h2", as: d, children: l }),
3619
3630
  /* @__PURE__ */ o(
3620
3631
  qe,
3621
3632
  {
3622
3633
  value: t,
3623
- onValueChange: k,
3634
+ onValueChange: y,
3624
3635
  localeCode: s,
3625
3636
  startDateLabel: r,
3626
3637
  endDateLabel: n,
@@ -3630,27 +3641,35 @@ const ie = ({
3630
3641
  /* @__PURE__ */ o(
3631
3642
  Gt,
3632
3643
  {
3633
- ...m,
3644
+ ...g,
3634
3645
  previousMonthButtonAriaLabel: c,
3635
3646
  nextMonthButtonAriaLabel: a,
3636
3647
  calendarSize: f
3637
3648
  }
3638
3649
  ),
3639
- g === "calendar" && /* @__PURE__ */ o(Qt, { ...m, size: f, multiSelectable: !0 }),
3640
- g === "month-picker" && /* @__PURE__ */ o(
3650
+ b === "calendar" && /* @__PURE__ */ o(
3651
+ Qt,
3652
+ {
3653
+ ...g,
3654
+ size: f,
3655
+ multiSelectable: !0,
3656
+ dateTestId: h
3657
+ }
3658
+ ),
3659
+ b === "month-picker" && /* @__PURE__ */ o(
3641
3660
  Pt,
3642
3661
  {
3643
- firstMonth: h,
3662
+ firstMonth: m,
3644
3663
  numMonths: u,
3645
- value: p,
3664
+ value: M,
3646
3665
  size: f,
3647
- onValueChange: (M) => {
3648
- var S;
3649
- w(M), y("calendar"), (S = b.current) == null || S.focus();
3666
+ onValueChange: (S) => {
3667
+ var A;
3668
+ w(S), p("calendar"), (A = k.current) == null || A.focus();
3650
3669
  },
3651
3670
  onCancel: () => {
3652
- var M;
3653
- y("calendar"), (M = b.current) == null || M.focus();
3671
+ var S;
3672
+ p("calendar"), (S = k.current) == null || S.focus();
3654
3673
  }
3655
3674
  }
3656
3675
  )
@@ -3680,7 +3699,7 @@ export {
3680
3699
  Kr as WeekDayCell,
3681
3700
  qr as WeekNumberCell,
3682
3701
  Zs as YearPicker,
3683
- dt as addDayStateHighlights,
3702
+ ut as addDayStateHighlights,
3684
3703
  He as addDayStateHighlightsOnSingleDay,
3685
3704
  Lr as addWeekRangeHighlights,
3686
3705
  Ws as addWeekStateHighlights,
@@ -3691,8 +3710,8 @@ export {
3691
3710
  $r as createDay,
3692
3711
  mn as dateRangeToStrings,
3693
3712
  Fr as dayHasHighlight,
3694
- at as dayHighlightSelect,
3695
- bt as defaultCalendarTheme,
3713
+ lt as dayHighlightSelect,
3714
+ wt as defaultCalendarTheme,
3696
3715
  Cr as defaultTextPropsProvider,
3697
3716
  jr as defaultWrapperStyleProvider,
3698
3717
  Us as extranetCalendarTheme,
@@ -3706,7 +3725,7 @@ export {
3706
3725
  ge as getWeekForDate,
3707
3726
  Hr as getWeeksForMonth,
3708
3727
  Oe as isDateRangeInvalid,
3709
- ht as parseLocalizedDateString,
3728
+ mt as parseLocalizedDateString,
3710
3729
  oe as reformatLocalizedDateString,
3711
3730
  vs as setDayStateValue,
3712
3731
  Os as setDayStateValueFunction,