@stenajs-webui/calendar 20.13.0 → 20.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,19 +1,19 @@
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_1g60o_1{position:relative;width:48px;height:48px;border-radius:var(--swui-max-border-radius)}._travelDateCell_1g60o_1:focus{outline:none}._travelDateCell_1g60o_1:focus-visible ._outline_1g60o_13{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_1g60o_1:focus-visible ._contentWrapper_1g60o_26._contentWrapper_1g60o_26._contentWrapper_1g60o_26{border-color:transparent}._travelDateCell_1g60o_1 ._contentWrapper_1g60o_26{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_1g60o_1 ._contentWrapper_1g60o_26._disabled_1g60o_47{cursor:not-allowed}._travelDateCell_1g60o_1 ._contentWrapper_1g60o_26._isToday_1g60o_50{border-color:var(--lhds-color-ui-400)}._travelDateCell_1g60o_1 ._contentWrapper_1g60o_26._isSelectionStart_1g60o_54,._travelDateCell_1g60o_1 ._contentWrapper_1g60o_26._isSelectionEnd_1g60o_55{border-color:var(--modern-red)}._travelDateCell_1g60o_1 ._contentWrapper_1g60o_26._isSelectionStart_1g60o_54{background:var(--modern-red)}._travelDateCell_1g60o_1 ._contentWrapper_1g60o_26._isSelectionStart_1g60o_54 span{color:#fff}._travelDateCell_1g60o_1 ._contentWrapper_1g60o_26._isSelectionEnd_1g60o_55:not(._isSelectionStart_1g60o_54){background:#fff}._travelDateCell_1g60o_1 ._contentWrapper_1g60o_26._hover_1g60o_70{border-color:var(--modern-red)}._travelDateCell_1g60o_1 ._contentWrapper_1g60o_26._hover_1g60o_70._startSelected_1g60o_73:not(._endSelected_1g60o_73):not(._isSelectionStart_1g60o_54){background:#fff}._travelDateCell_1g60o_1 ._contentWrapper_1g60o_26._hover_1g60o_70._startSelected_1g60o_73:not(._endSelected_1g60o_73):not(._isSelectionStart_1g60o_54) span{color:var(--swui-text-primary-color)}._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 x, Fragment as Ht } from "react/jsx-runtime";
3
- import { Box as L, Text as pt, Clickable as ke, Row as B, Spacing as Xe, Column as C, Heading as Rt, Space as Dt, Indent as Mt, SeparatorLine as Ze, parseIntElseUndefined as ge, useBoolean as ne, useDelayedFalse as re, useOnClickOutside as Se } from "@stenajs-webui/core";
4
- import { FlatButton as q, stenaAngleDown as ae, PrimaryButton as bt, stenaAngleLeft as Ve, stenaAngleRight as tn, SecondaryButton as ct, stenaAngleLeftDouble as en, stenaArrowLeft as vt, stenaArrowRight as Et, stenaAngleRightDouble as nn, TextInputButton as rn, stenaCalendar as kt, Icon as Te, stenaArrowWideRight as sn, stenaClock as Ie, stenaAngleUp as on, CardBody as Re } from "@stenajs-webui/elements";
5
- import { isAfter as G, eachDayOfInterval as Ee, isSameDay as P, endOfMonth as xe, startOfMonth as Ae, min as cn, addDays as J, max as an, subDays as lt, format as W, getISOWeek as le, getDate as zt, startOfWeek as $t, addWeeks as ln, getMonth as dt, getWeek as Ne, getYear as St, getISODay as dn, addHours as Le, isBefore as nt, parse as ft, addMonths as xt, isSameMonth as rt, addYears as un, subMonths as de, subYears as fn, setWeek as hn, isValid as pn } from "date-fns";
6
- import { enGB as Ft, enUS as mn, deAT as gn, de as De, fr as Dn, es as bn, sv as wn, pl as yn, da as Mn, nl as kn, nb as Sn } from "date-fns/locale";
7
- import { last as Tn, startCase as Tt, chunk as _e, debounce as In, padStart as Rn, range as ue } from "lodash-es";
8
- import * as fe from "react";
9
- import { useMemo as R, useRef as $, useEffect as X, useCallback as D, useId as he, useState as T, useLayoutEffect as Pe } from "react";
10
- import jt from "classnames";
11
- import Xt from "@emotion/styled";
12
- import { TextInput as ht, TextInputBox as En, LabelledTextInput as xn } from "@stenajs-webui/forms";
13
- import { useTippyInstance as An, Popover as At } from "@stenajs-webui/tooltip";
14
- import { cssColor as Ct } from "@stenajs-webui/theme";
15
- import { useMaskedInput as Nn } from "@stenajs-webui/input-mask";
16
- const st = {
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_1njsn_1{position:relative}._travelDateCell_1njsn_1._small_1njsn_4{width:40px;height:40px}._travelDateCell_1njsn_1._medium_1njsn_9{width:48px;height:48px}._travelDateCell_1njsn_1._large_1njsn_14{width:64px;height:64px}._travelDateCell_1njsn_1{border-radius:var(--swui-max-border-radius)}._travelDateCell_1njsn_1:focus{outline:none}._travelDateCell_1njsn_1:focus-visible ._outline_1njsn_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_1njsn_1:focus-visible ._contentWrapper_1njsn_39._contentWrapper_1njsn_39._contentWrapper_1njsn_39{border-color:transparent}._travelDateCell_1njsn_1 ._contentWrapper_1njsn_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_1njsn_1 ._contentWrapper_1njsn_39._disabled_1njsn_60{cursor:not-allowed}._travelDateCell_1njsn_1 ._contentWrapper_1njsn_39._isToday_1njsn_63{border-color:var(--lhds-color-ui-400)}._travelDateCell_1njsn_1 ._contentWrapper_1njsn_39._isSelectionStart_1njsn_67,._travelDateCell_1njsn_1 ._contentWrapper_1njsn_39._isSelectionEnd_1njsn_68{border-color:var(--modern-red)}._travelDateCell_1njsn_1 ._contentWrapper_1njsn_39._isSelectionStart_1njsn_67{background:var(--modern-red)}._travelDateCell_1njsn_1 ._contentWrapper_1njsn_39._isSelectionStart_1njsn_67 span{color:#fff}._travelDateCell_1njsn_1 ._contentWrapper_1njsn_39._isSelectionEnd_1njsn_68:not(._isSelectionStart_1njsn_67){background:#fff}._travelDateCell_1njsn_1 ._contentWrapper_1njsn_39._hover_1njsn_83{border-color:var(--modern-red)}._travelDateCell_1njsn_1 ._contentWrapper_1njsn_39._hover_1njsn_83._startSelected_1njsn_86:not(._endSelected_1njsn_86):not(._isSelectionStart_1njsn_67){background:#fff}._travelDateCell_1njsn_1 ._contentWrapper_1njsn_39._hover_1njsn_83._startSelected_1njsn_86:not(._endSelected_1njsn_86):not(._isSelectionStart_1njsn_67) span{color:var(--swui-text-primary-color)}._travelDateCellBackground_1xm0q_1._small_1xm0q_2{width:20px;height:40px}._travelDateCellBackground_1xm0q_1._medium_1xm0q_7{width:24px;height:48px}._travelDateCellBackground_1xm0q_1._large_1xm0q_12{width:32px;height:64px}._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 E, Fragment as Wt } from "react/jsx-runtime";
3
+ import { Box as A, Text as Dt, Clickable as Te, Row as B, Spacing as Ve, Column as z, Heading as _t, exhaustSwitchCase as le, Space as yt, Indent as Tt, SeparatorLine as tn, parseIntElseUndefined as be, useBoolean as re, useDelayedFalse as se, useOnClickOutside as Ie } from "@stenajs-webui/core";
4
+ import { FlatButton as G, stenaAngleDown as de, PrimaryButton as Mt, stenaAngleLeft as en, stenaAngleRight as nn, SecondaryButton as at, stenaAngleLeftDouble as rn, stenaArrowLeft as Ft, stenaArrowRight as Nt, stenaAngleRightDouble as sn, TextInputButton as on, stenaCalendar as It, Icon as Re, stenaArrowWideRight as cn, stenaClock as xe, stenaAngleUp as an, CardBody as Ee } from "@stenajs-webui/elements";
5
+ import { isAfter as q, eachDayOfInterval as _e, isSameDay as P, endOfMonth as Ne, startOfMonth as Ae, min as ln, addDays as J, max as dn, subDays as ut, format as j, getISOWeek as ue, getDate as Ct, startOfWeek as jt, addWeeks as un, getMonth as ft, getWeek as Le, getYear as Rt, getISODay as fn, addHours as Pe, isBefore as rt, parse as mt, addMonths as At, isSameMonth as st, addYears as hn, subMonths as fe, subYears as mn, setWeek as gn, isValid as pn } from "date-fns";
6
+ import { enGB as zt, enUS as Dn, deAT as bn, de as we, fr as wn, es as yn, sv as Mn, pl as kn, da as Sn, nl as Tn, nb as In } from "date-fns/locale";
7
+ import { last as Rn, startCase as xt, chunk as Ye, debounce as xn, padStart as En, range as he } from "lodash-es";
8
+ import * as me from "react";
9
+ import { useMemo as x, useRef as W, useEffect as Z, useCallback as D, useId as ge, useState as I, useLayoutEffect as Be } from "react";
10
+ import gt from "classnames";
11
+ import Zt from "@emotion/styled";
12
+ import { TextInput as pt, TextInputBox as _n, LabelledTextInput as Nn } from "@stenajs-webui/forms";
13
+ import { useTippyInstance as An, Popover as Lt } from "@stenajs-webui/tooltip";
14
+ import { cssColor as Kt } from "@stenajs-webui/theme";
15
+ import { useMaskedInput as Ln } from "@stenajs-webui/input-mask";
16
+ const it = {
17
17
  yearAndMonth: "yyyy-MM",
18
18
  fullDate: "yyyy-MM-dd",
19
19
  fullMonthName: "LLLL",
@@ -27,29 +27,29 @@ const st = {
27
27
  // 2 Jan
28
28
  monthAndDate: "MMM do"
29
29
  // Jan 2nd
30
- }, It = (t = {}, e, n) => {
31
- if (e && n && G(n, e))
32
- return Ee({ start: e, end: n }).reduce(
30
+ }, Et = (t = {}, e, n) => {
31
+ if (e && n && q(n, e))
32
+ return _e({ start: e, end: n }).reduce(
33
33
  (s, i) => {
34
34
  const c = P(i, e), a = P(i, n);
35
- return at(s, i, c ? ["selected", "selectedStart", "range"] : a ? ["selected", "selectedEnd", "range"] : ["range"]);
35
+ return lt(s, i, c ? ["selected", "selectedStart", "range"] : a ? ["selected", "selectedEnd", "range"] : ["range"]);
36
36
  },
37
37
  t
38
38
  );
39
39
  let r = t;
40
- return e && (r = at(r, e, ["selected", "singleSelected"])), n && (r = at(r, n, ["selected", "singleSelected"])), r;
41
- }, Ln = (t = {}, e, n, r) => _n(
40
+ return e && (r = lt(r, e, ["selected", "singleSelected"])), n && (r = lt(r, n, ["selected", "singleSelected"])), r;
41
+ }, Pn = (t = {}, e, n, r) => Yn(
42
42
  t,
43
43
  e,
44
44
  n,
45
45
  Ae(r),
46
- xe(r)
47
- ), _n = (t = {}, e, n, r, s) => e && n ? It(
46
+ Ne(r)
47
+ ), Yn = (t = {}, e, n, r, s) => e && n ? Et(
48
48
  t,
49
- an([e, lt(r, 1)]),
50
- cn([n, J(s, 1)])
51
- ) : It(t, e, n), Es = (t, e, n) => {
52
- const r = W(e, st.yearAndMonth), s = le(e), i = zt(e);
49
+ dn([e, ut(r, 1)]),
50
+ ln([n, J(s, 1)])
51
+ ) : Et(t, e, n), js = (t, e, n) => {
52
+ const r = j(e, it.yearAndMonth), s = ue(e), i = Ct(e);
53
53
  return {
54
54
  ...t,
55
55
  [r]: {
@@ -63,8 +63,8 @@ const st = {
63
63
  }
64
64
  }
65
65
  };
66
- }, xs = (t, e, n) => {
67
- const r = W(e, st.yearAndMonth), s = le(e), i = zt(e);
66
+ }, Us = (t, e, n) => {
67
+ const r = j(e, it.yearAndMonth), s = ue(e), i = Ct(e);
68
68
  return {
69
69
  ...t,
70
70
  [r]: {
@@ -80,26 +80,26 @@ const st = {
80
80
  }
81
81
  }
82
82
  };
83
- }, at = (t, e, n) => {
84
- const r = e.getMonth() + 1, s = `${e.getFullYear()}-${r < 10 ? "0" : ""}${r}`, i = le(e), c = zt(e), a = t && t[s] && t[s][i] && t[s][i][c];
83
+ }, lt = (t, e, n) => {
84
+ const r = e.getMonth() + 1, s = `${e.getFullYear()}-${r < 10 ? "0" : ""}${r}`, i = ue(e), c = Ct(e), a = t && t[s] && t[s][i] && t[s][i][c];
85
85
  return {
86
86
  ...t,
87
87
  [s]: {
88
88
  ...t && t[s],
89
89
  [i]: {
90
90
  ...t && t[s] && t[s][i],
91
- [c]: Ye(a, n)
91
+ [c]: $e(a, n)
92
92
  }
93
93
  }
94
94
  };
95
- }, Ye = (t, e) => ({
95
+ }, $e = (t, e) => ({
96
96
  ...t,
97
97
  highlights: [...(t == null ? void 0 : t.highlights) ?? [], ...e]
98
- }), As = (t, e, n) => {
98
+ }), vs = (t, e, n) => {
99
99
  const r = e.days[0].date, s = r.getMonth() + 1, i = `${r.getFullYear()}-${s < 10 ? "0" : ""}${s}`, c = e.weekNumber;
100
100
  let a = t;
101
- e.days.forEach((p) => {
102
- a = at(a, p.date, n);
101
+ e.days.forEach((m) => {
102
+ a = lt(a, m.date, n);
103
103
  });
104
104
  const l = a && a[i] ? a[i][c] : void 0, d = l && l.highlights ? [...l.highlights, ...n] : n, u = {
105
105
  ...l,
@@ -112,78 +112,78 @@ const st = {
112
112
  [c]: u
113
113
  }
114
114
  };
115
- }, Pn = (t, e) => {
115
+ }, Bn = (t, e) => {
116
116
  var s;
117
117
  if (!e.days.length)
118
118
  return { ...t };
119
- const n = e.days[0].date, r = (s = Tn(e.days)) == null ? void 0 : s.date;
119
+ const n = e.days[0].date, r = (s = Rn(e.days)) == null ? void 0 : s.date;
120
120
  return {
121
- ...It(t, n, r)
121
+ ...Et(t, n, r)
122
122
  };
123
- }, Yn = (t, e) => R(() => t ? at(e, /* @__PURE__ */ new Date(), ["today"]) : e, [t, e]);
124
- var Bn = /* @__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))(Bn || {}), On = /* @__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))(On || {});
125
- const be = (t, e, n, r) => {
123
+ }, $n = (t, e) => x(() => t ? lt(e, /* @__PURE__ */ new Date(), ["today"]) : e, [t, e]);
124
+ var Hn = /* @__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))(Hn || {}), On = /* @__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))(On || {});
125
+ const ye = (t, e, n, r) => {
126
126
  const s = [];
127
127
  for (let i = 0; i < n; i++)
128
- s.push(Kt(t, e + i, r));
128
+ s.push(Jt(t, e + i, r));
129
129
  return s;
130
- }, Kt = (t, e, n) => {
130
+ }, Jt = (t, e, n) => {
131
131
  if (isNaN(t) || isNaN(e))
132
132
  throw new Error("getMonthInYear() received NaN.");
133
133
  const r = t + Math.floor(e / 12), s = e % 12, i = new Date(r, s, 1);
134
134
  return {
135
- monthString: W(i, st.yearAndMonth),
136
- name: Tt(
137
- W(i, st.fullMonthName, { locale: n })
135
+ monthString: j(i, it.yearAndMonth),
136
+ name: xt(
137
+ j(i, it.fullMonthName, { locale: n })
138
138
  ),
139
139
  year: r,
140
140
  monthInYear: s,
141
- weeks: Hn(r, s, n)
141
+ weeks: Wn(r, s, n)
142
142
  };
143
- }, Hn = (t, e, n, r = !0) => {
144
- const s = new Date(t, e, 1), i = $t(s, { locale: n }), c = [];
143
+ }, Wn = (t, e, n, r = !0) => {
144
+ const s = new Date(t, e, 1), i = jt(s, { locale: n }), c = [];
145
145
  for (let a = 0; a < 6; a++) {
146
- const l = pe(ln(i, a), n);
146
+ const l = pe(un(i, a), n);
147
147
  if (a > 0 && l.startMonth !== e && !r)
148
148
  return c;
149
149
  c.push(l);
150
150
  }
151
151
  return c;
152
152
  }, pe = (t, e) => {
153
- const n = dt(J(t, 7)) !== dt(t);
153
+ const n = ft(J(t, 7)) !== ft(t);
154
154
  return {
155
- weekNumber: Ne(t, { locale: e }),
156
- startMonth: dt(t),
157
- startYear: St(t),
158
- endMonth: dt(J(t, 6)),
159
- endYear: St(J(t, 6)),
155
+ weekNumber: Le(t, { locale: e }),
156
+ startMonth: ft(t),
157
+ startYear: Rt(t),
158
+ endMonth: ft(J(t, 6)),
159
+ endYear: Rt(J(t, 6)),
160
160
  days: Un(t, e),
161
161
  isLastWeekOfMonth: n
162
162
  };
163
- }, $n = (t, e) => {
164
- const n = dn(t);
163
+ }, jn = (t, e) => {
164
+ const n = fn(t);
165
165
  return {
166
166
  date: t,
167
- name: W(t, "EEE", e ? { locale: e } : void 0),
168
- fullName: W(t, "EEEE", e ? { locale: e } : void 0),
169
- dateString: W(Le(t, 12), st.fullDate),
170
- weekNumber: Ne(t, { locale: e }),
171
- year: St(t),
172
- month: dt(t),
173
- dayOfMonth: zt(t),
167
+ name: j(t, "EEE", e ? { locale: e } : void 0),
168
+ fullName: j(t, "EEEE", e ? { locale: e } : void 0),
169
+ dateString: j(Pe(t, 12), it.fullDate),
170
+ weekNumber: Le(t, { locale: e }),
171
+ year: Rt(t),
172
+ month: ft(t),
173
+ dayOfMonth: Ct(t),
174
174
  dayOfWeek: n,
175
175
  isFirstDayOfWeek: n === 1,
176
176
  isLastDayOfWeek: n === 7,
177
177
  isFirstDayOfMonth: P(Ae(t), t),
178
- isLastDayOfMonth: P(xe(t), t)
178
+ isLastDayOfMonth: P(Ne(t), t)
179
179
  };
180
- }, Un = (t, e) => Ee({
180
+ }, Un = (t, e) => _e({
181
181
  start: t,
182
182
  end: J(t, 6)
183
- }).map((n) => $n(n, e)), Wn = (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 }, vn = "_calendar_1b766_1", zn = "_weekNumberVisible_1b766_41", we = {
184
- calendar: vn,
185
- weekNumberVisible: zn
186
- }, Fn = (t, e, n) => !!(e && e.indexOf(n) >= 0 || t && t.highlights && t.highlights.indexOf(n) >= 0), ot = (t, e, n, r, s) => {
183
+ }).map((n) => jn(n, e)), vn = (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 }, Fn = "_calendar_1b766_1", Cn = "_weekNumberVisible_1b766_41", Me = {
184
+ calendar: Fn,
185
+ weekNumberVisible: Cn
186
+ }, zn = (t, e, n) => !!(e && e.indexOf(n) >= 0 || t && t.highlights && t.highlights.indexOf(n) >= 0), ct = (t, e, n, r, s) => {
187
187
  if (n.length !== r.length)
188
188
  throw new Error(
189
189
  "Select highlight failed, number of values do not equal number of highlights."
@@ -191,20 +191,20 @@ const be = (t, e, n, r) => {
191
191
  if (n.length === 0)
192
192
  return s;
193
193
  for (let i = 0; i < n.length; i++)
194
- if (typeof n[i] == "boolean" && n[i] || typeof n[i] == "string" && Fn(
194
+ if (typeof n[i] == "boolean" && n[i] || typeof n[i] == "string" && zn(
195
195
  t,
196
196
  e,
197
197
  n[i]
198
198
  ))
199
199
  return r[i];
200
200
  return s;
201
- }, jn = ({
201
+ }, Kn = ({
202
202
  selectedBackground: t,
203
203
  todayBackground: e,
204
204
  rangeBackground: n,
205
205
  borderColor: r = "transparent"
206
206
  }) => (s, i, c, a, l) => ({
207
- backgroundColor: ot(
207
+ backgroundColor: ct(
208
208
  i,
209
209
  s,
210
210
  ["selected", "range", "today", c.month === l.monthInYear],
@@ -213,7 +213,7 @@ const be = (t, e, n, r) => {
213
213
  ),
214
214
  borderWidth: "1px",
215
215
  borderStyle: "solid",
216
- borderColor: ot(
216
+ borderColor: ct(
217
217
  i,
218
218
  s,
219
219
  ["selectedStart", "selectedEnd", "singleSelected", "range", "today"],
@@ -226,7 +226,7 @@ const be = (t, e, n, r) => {
226
226
  ],
227
227
  r
228
228
  ),
229
- borderTopLeftRadius: ot(
229
+ borderTopLeftRadius: ct(
230
230
  i,
231
231
  s,
232
232
  ["selectedStart", "singleSelected", "today"],
@@ -237,7 +237,7 @@ const be = (t, e, n, r) => {
237
237
  ],
238
238
  "unset"
239
239
  ),
240
- borderBottomLeftRadius: ot(
240
+ borderBottomLeftRadius: ct(
241
241
  i,
242
242
  s,
243
243
  ["selectedStart", "singleSelected", "today"],
@@ -248,7 +248,7 @@ const be = (t, e, n, r) => {
248
248
  ],
249
249
  "unset"
250
250
  ),
251
- borderTopRightRadius: ot(
251
+ borderTopRightRadius: ct(
252
252
  i,
253
253
  s,
254
254
  ["selectedEnd", "singleSelected", "today"],
@@ -259,7 +259,7 @@ const be = (t, e, n, r) => {
259
259
  ],
260
260
  "unset"
261
261
  ),
262
- borderBottomRightRadius: ot(
262
+ borderBottomRightRadius: ct(
263
263
  i,
264
264
  s,
265
265
  ["selectedEnd", "singleSelected", "today"],
@@ -271,7 +271,7 @@ const be = (t, e, n, r) => {
271
271
  "unset"
272
272
  ),
273
273
  boxSizing: "border-box"
274
- }), Cn = ({
274
+ }), Jn = ({
275
275
  selectedColor: t,
276
276
  disabledColor: e,
277
277
  inOtherMonthColor: n,
@@ -279,7 +279,7 @@ const be = (t, e, n, r) => {
279
279
  }) => (s, i, c, a, l) => {
280
280
  const d = c.month !== l.monthInYear;
281
281
  return {
282
- color: ot(
282
+ color: ct(
283
283
  i,
284
284
  s,
285
285
  [d, "selected", "range", "enabled", "disabled"],
@@ -292,7 +292,7 @@ const be = (t, e, n, r) => {
292
292
  ]
293
293
  )
294
294
  };
295
- }, mt = {
295
+ }, bt = {
296
296
  width: "var(--swui-calendar-day-width)",
297
297
  height: "var(--swui-calendar-day-height)",
298
298
  WeekNumber: {
@@ -305,12 +305,12 @@ const be = (t, e, n, r) => {
305
305
  clickableTextColor: "var(--swui-calendar-week-day-clickable-text-color)"
306
306
  },
307
307
  CalendarDay: {
308
- tdStyle: jn({
308
+ tdStyle: Kn({
309
309
  selectedBackground: "var(--swui-calendar-wrapper-selected-background)",
310
310
  rangeBackground: "var(--swui-calendar-wrapper-range-background)",
311
311
  todayBackground: "var(--swui-calendar-wrapper-today-background)"
312
312
  }),
313
- textProps: Cn({
313
+ textProps: Jn({
314
314
  selectedColor: "var(--swui-calendar-text-selected-color)",
315
315
  disabledColor: "var(--swui-calendar-text-disabled-color)",
316
316
  inOtherMonthColor: "var(--swui-calendar-text-in-other-month-color)"
@@ -319,24 +319,24 @@ const be = (t, e, n, r) => {
319
319
  CalendarMonth: {
320
320
  headerTextColor: "var(--swui-calendar-week-day-text-color)"
321
321
  }
322
- }, Ns = {
323
- ...mt,
322
+ }, Fs = {
323
+ ...bt,
324
324
  width: "37px",
325
325
  height: "37px"
326
- }, Kn = ({
326
+ }, qn = ({
327
327
  onClickWeekDay: t,
328
328
  day: e,
329
329
  theme: n
330
330
  }) => {
331
331
  const r = /* @__PURE__ */ o(
332
- L,
332
+ A,
333
333
  {
334
334
  width: n.width,
335
335
  height: n.height,
336
336
  justifyContent: "center",
337
337
  alignItems: "center",
338
338
  children: /* @__PURE__ */ o(
339
- pt,
339
+ Dt,
340
340
  {
341
341
  size: "small",
342
342
  color: t ? n.WeekDay.clickableTextColor : n.WeekDay.textColor,
@@ -346,7 +346,7 @@ const be = (t, e, n, r) => {
346
346
  }
347
347
  );
348
348
  return t ? /* @__PURE__ */ o(
349
- ke,
349
+ Te,
350
350
  {
351
351
  borderRadius: "var(--swui-calendar-day-border-radius)",
352
352
  onClick: (s) => t(e.dayOfWeek, s),
@@ -354,7 +354,7 @@ const be = (t, e, n, r) => {
354
354
  children: r
355
355
  }
356
356
  ) : r;
357
- }, Be = function({
357
+ }, He = function({
358
358
  day: e,
359
359
  week: n,
360
360
  month: r,
@@ -366,14 +366,14 @@ const be = (t, e, n, r) => {
366
366
  defaultHighlights: d
367
367
  }) {
368
368
  const u = /* @__PURE__ */ o(
369
- L,
369
+ A,
370
370
  {
371
371
  width: "100%",
372
372
  height: "100%",
373
373
  justifyContent: "center",
374
374
  alignItems: "center",
375
375
  children: /* @__PURE__ */ o(
376
- pt,
376
+ Dt,
377
377
  {
378
378
  ...a.CalendarDay.textProps && a.CalendarDay.textProps(
379
379
  d,
@@ -387,7 +387,7 @@ const be = (t, e, n, r) => {
387
387
  }
388
388
  )
389
389
  }
390
- ), p = Xt.td({
390
+ ), m = Zt.td({
391
391
  ...a.CalendarDay.tdStyle && a.CalendarDay.tdStyle(
392
392
  d,
393
393
  s,
@@ -396,7 +396,7 @@ const be = (t, e, n, r) => {
396
396
  r,
397
397
  i
398
398
  )
399
- }), h = Xt.div({
399
+ }), f = Zt.div({
400
400
  ...a.CalendarDay.innerWrapperStyle && a.CalendarDay.innerWrapperStyle(
401
401
  d,
402
402
  s,
@@ -407,7 +407,7 @@ const be = (t, e, n, r) => {
407
407
  ),
408
408
  width: "100%",
409
409
  height: "100%"
410
- }), f = Xt.div({
410
+ }), h = Zt.div({
411
411
  ...a.CalendarDay.cellWrapperStyle && a.CalendarDay.cellWrapperStyle(
412
412
  d,
413
413
  s,
@@ -419,12 +419,12 @@ const be = (t, e, n, r) => {
419
419
  width: "100%",
420
420
  height: "100%",
421
421
  position: "relative"
422
- }), g = Jn(d, s);
422
+ }), g = Gn(d, s);
423
423
  return /* @__PURE__ */ o(
424
- p,
424
+ m,
425
425
  {
426
- onClick: g ? void 0 : (M) => c == null ? void 0 : c(e, i, M),
427
- children: /* @__PURE__ */ o(h, { children: /* @__PURE__ */ o(f, { children: e.month === r.monthInYear && /* @__PURE__ */ x(Ht, { children: [
426
+ onClick: g ? void 0 : (w) => c == null ? void 0 : c(e, i, w),
427
+ children: /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(h, { children: e.month === r.monthInYear && /* @__PURE__ */ E(Wt, { children: [
428
428
  l && /* @__PURE__ */ o(
429
429
  l,
430
430
  {
@@ -440,13 +440,13 @@ const be = (t, e, n, r) => {
440
440
  ] }) }) })
441
441
  }
442
442
  );
443
- }, Jn = (t, e) => !!ot(
443
+ }, Gn = (t, e) => !!ct(
444
444
  e,
445
445
  t,
446
446
  ["disabled"],
447
447
  [!0],
448
448
  !1
449
- ), Gn = ({
449
+ ), Qn = ({
450
450
  onClickWeek: t,
451
451
  theme: e,
452
452
  week: n,
@@ -454,17 +454,17 @@ const be = (t, e, n, r) => {
454
454
  backgroundColor: s,
455
455
  prefix: i
456
456
  }) => {
457
- const c = /* @__PURE__ */ x(
458
- L,
457
+ const c = /* @__PURE__ */ E(
458
+ A,
459
459
  {
460
460
  width: e.width,
461
461
  height: e.height,
462
462
  justifyContent: "center",
463
463
  alignItems: "center",
464
464
  children: [
465
- r && /* @__PURE__ */ o(L, { position: "absolute", children: r }),
466
- /* @__PURE__ */ o(L, { position: "absolute", children: /* @__PURE__ */ x(
467
- pt,
465
+ r && /* @__PURE__ */ o(A, { position: "absolute", children: r }),
466
+ /* @__PURE__ */ o(A, { position: "absolute", children: /* @__PURE__ */ E(
467
+ Dt,
468
468
  {
469
469
  color: t ? e.WeekNumber.clickableTextColor : e.WeekNumber.textColor,
470
470
  children: [
@@ -477,12 +477,12 @@ const be = (t, e, n, r) => {
477
477
  }
478
478
  );
479
479
  return /* @__PURE__ */ o(
480
- L,
480
+ A,
481
481
  {
482
482
  background: s || e.WeekNumber.backgroundColor,
483
483
  position: "relative",
484
484
  children: t ? /* @__PURE__ */ o(
485
- ke,
485
+ Te,
486
486
  {
487
487
  borderRadius: "var(--swui-calendar-day-border-radius)",
488
488
  onClick: (a) => t(n, a),
@@ -492,7 +492,7 @@ const be = (t, e, n, r) => {
492
492
  ) : c
493
493
  }
494
494
  );
495
- }, qn = (t, e, n) => e && nt(t, e) ? P(t, e) : n && G(t, n) ? P(t, n) : !0, Qn = function({
495
+ }, Xn = (t, e, n) => e && rt(t, e) ? P(t, e) : n && q(t, n) ? P(t, n) : !0, Zn = function({
496
496
  dayComponent: e,
497
497
  minDate: n,
498
498
  maxDate: r,
@@ -500,15 +500,15 @@ const be = (t, e, n, r) => {
500
500
  day: i,
501
501
  ...c
502
502
  }) {
503
- const a = R(
504
- () => qn(i.date, n, r) ? s : Ye(s, ["disabled"]),
503
+ const a = x(
504
+ () => Xn(i.date, n, r) ? s : $e(s, ["disabled"]),
505
505
  [i.date, s, r, n]
506
506
  );
507
507
  return /* @__PURE__ */ o(e, { day: i, ...c, dayState: a });
508
508
  };
509
- function Xn({
509
+ function Vn({
510
510
  month: t,
511
- dayComponent: e = Be,
511
+ dayComponent: e = He,
512
512
  statePerWeek: n,
513
513
  userDataPerWeek: r,
514
514
  minDate: s,
@@ -518,82 +518,82 @@ function Xn({
518
518
  onClickWeekDay: l,
519
519
  onClickMonth: d,
520
520
  renderWeekNumber: u,
521
- renderWeekDay: p,
522
- headerRightContent: h,
523
- theme: f = mt,
521
+ renderWeekDay: m,
522
+ headerRightContent: f,
523
+ theme: h = bt,
524
524
  extraDayContent: g,
525
- defaultHighlights: M,
525
+ defaultHighlights: w,
526
526
  showWeekNumber: y
527
527
  }) {
528
- return /* @__PURE__ */ o(Ht, { children: /* @__PURE__ */ x(L, { alignItems: "stretch", children: [
529
- /* @__PURE__ */ x(
528
+ return /* @__PURE__ */ o(Wt, { children: /* @__PURE__ */ E(A, { alignItems: "stretch", children: [
529
+ /* @__PURE__ */ E(
530
530
  B,
531
531
  {
532
- justifyContent: h ? "space-between" : "center",
532
+ justifyContent: f ? "space-between" : "center",
533
533
  alignItems: "center",
534
534
  children: [
535
535
  /* @__PURE__ */ o(B, { justifyContent: "center", alignItems: "center", children: d ? /* @__PURE__ */ o(
536
- q,
536
+ G,
537
537
  {
538
538
  onClick: () => d(t),
539
539
  label: t.name + " " + String(t.year),
540
- rightIcon: ae
540
+ rightIcon: de
541
541
  }
542
- ) : /* @__PURE__ */ x(pt, { whiteSpace: "nowrap", children: [
542
+ ) : /* @__PURE__ */ E(Dt, { whiteSpace: "nowrap", children: [
543
543
  t.name,
544
544
  " ",
545
545
  t.year
546
546
  ] }) }),
547
- h && /* @__PURE__ */ o(L, { alignItems: "center", children: h })
547
+ f && /* @__PURE__ */ o(A, { alignItems: "center", children: f })
548
548
  ]
549
549
  }
550
550
  ),
551
- /* @__PURE__ */ o("table", { children: /* @__PURE__ */ x("tbody", { children: [
552
- /* @__PURE__ */ x("tr", { children: [
553
- y && /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(L, { width: f.width, height: f.height }) }),
554
- t.weeks[0].days.map((b) => /* @__PURE__ */ o("td", { children: p ? p(b.name, f, l) : /* @__PURE__ */ o(
555
- Kn,
551
+ /* @__PURE__ */ o("table", { children: /* @__PURE__ */ E("tbody", { children: [
552
+ /* @__PURE__ */ E("tr", { children: [
553
+ y && /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(A, { width: h.width, height: h.height }) }),
554
+ t.weeks[0].days.map((b) => /* @__PURE__ */ o("td", { children: m ? m(b.name, h, l) : /* @__PURE__ */ o(
555
+ qn,
556
556
  {
557
557
  day: b,
558
558
  onClickWeekDay: l,
559
- theme: f
559
+ theme: h
560
560
  }
561
561
  ) }, b.name))
562
562
  ] }),
563
- t.weeks.map((b) => /* @__PURE__ */ o(Ht, { children: /* @__PURE__ */ x("tr", { children: [
564
- y && /* @__PURE__ */ o("td", { children: u ? u(b, f, a) : /* @__PURE__ */ o(
565
- Gn,
563
+ t.weeks.map((b) => /* @__PURE__ */ o(Wt, { children: /* @__PURE__ */ E("tr", { children: [
564
+ y && /* @__PURE__ */ o("td", { children: u ? u(b, h, a) : /* @__PURE__ */ o(
565
+ Qn,
566
566
  {
567
567
  week: b,
568
568
  onClickWeek: a,
569
- theme: f
569
+ theme: h
570
570
  }
571
571
  ) }),
572
- b.days.map((w) => /* @__PURE__ */ o(
573
- Qn,
572
+ b.days.map((M) => /* @__PURE__ */ o(
573
+ Zn,
574
574
  {
575
575
  dayComponent: e,
576
- day: w,
576
+ day: M,
577
577
  week: b,
578
578
  month: t,
579
- dayState: n && n[b.weekNumber] && n[b.weekNumber][w.dayOfMonth],
580
- userData: r && r[b.weekNumber] && r[b.weekNumber][w.dayOfMonth],
579
+ dayState: n && n[b.weekNumber] && n[b.weekNumber][M.dayOfMonth],
580
+ userData: r && r[b.weekNumber] && r[b.weekNumber][M.dayOfMonth],
581
581
  onClickDay: c,
582
- theme: f,
582
+ theme: h,
583
583
  extraDayContent: g,
584
- defaultHighlights: M,
584
+ defaultHighlights: w,
585
585
  minDate: s,
586
586
  maxDate: i
587
587
  },
588
- w.dateString
588
+ M.dateString
589
589
  ))
590
590
  ] }, b.weekNumber) }))
591
591
  ] }) })
592
592
  ] }) });
593
593
  }
594
- function Zn({
594
+ function tr({
595
595
  monthRows: t,
596
- dayComponent: e = Be,
596
+ dayComponent: e = He,
597
597
  userDataPerMonth: n,
598
598
  statePerMonth: r,
599
599
  minDate: s,
@@ -603,69 +603,69 @@ function Zn({
603
603
  onClickWeek: l,
604
604
  onClickMonth: d,
605
605
  renderWeekDay: u,
606
- renderWeekNumber: p,
607
- headerRightContent: h,
608
- extraDayContent: f,
606
+ renderWeekNumber: m,
607
+ headerRightContent: f,
608
+ extraDayContent: h,
609
609
  defaultHighlights: g,
610
- showWeekNumber: M,
611
- theme: y = mt
610
+ showWeekNumber: w,
611
+ theme: y = bt
612
612
  }) {
613
- const b = R(
614
- () => s ? ft(s, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
613
+ const b = x(
614
+ () => s ? mt(s, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
615
615
  [s]
616
- ), w = R(
617
- () => i ? ft(i, "yyyy-MM-dd", /* @__PURE__ */ new Date()) : void 0,
616
+ ), M = x(
617
+ () => i ? mt(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: jt(
624
- we.calendar,
625
- M && we.weekNumberVisible
623
+ className: gt(
624
+ Me.calendar,
625
+ w && Me.weekNumberVisible
626
626
  ),
627
- children: t.map((m, k) => /* @__PURE__ */ o(Xe, { children: /* @__PURE__ */ o(B, { gap: 2, children: m.map((E) => /* @__PURE__ */ o(
628
- Xn,
627
+ children: t.map((p, k) => /* @__PURE__ */ o(Ve, { children: /* @__PURE__ */ o(B, { gap: 2, children: p.map((T) => /* @__PURE__ */ o(
628
+ Vn,
629
629
  {
630
- month: E,
630
+ month: T,
631
631
  dayComponent: e,
632
- userDataPerWeek: n && n[E.monthString],
633
- statePerWeek: r && r[E.monthString],
632
+ userDataPerWeek: n && n[T.monthString],
633
+ statePerWeek: r && r[T.monthString],
634
634
  onClickDay: c,
635
635
  onClickWeekDay: a,
636
636
  onClickWeek: l,
637
637
  onClickMonth: d,
638
638
  theme: y,
639
- renderWeekNumber: p,
639
+ renderWeekNumber: m,
640
640
  renderWeekDay: u,
641
- headerRightContent: h,
642
- extraDayContent: f,
641
+ headerRightContent: f,
642
+ extraDayContent: h,
643
643
  defaultHighlights: g,
644
644
  minDate: b,
645
- maxDate: w,
646
- showWeekNumber: M ?? !1
645
+ maxDate: M,
646
+ showWeekNumber: w ?? !1
647
647
  },
648
- E.name
648
+ T.name
649
649
  )) }) }, k))
650
650
  }
651
651
  );
652
652
  }
653
- function se(t) {
654
- const e = Vn(t.year, t.month, t.date), { year: n, month: r } = Wn(
653
+ function ie(t) {
654
+ const e = er(t.year, t.month, t.date), { year: n, month: r } = vn(
655
655
  e.year,
656
656
  e.month
657
- ), s = tr(
657
+ ), s = nr(
658
658
  n,
659
659
  r,
660
- t.locale ?? Ft,
660
+ t.locale ?? zt,
661
661
  t.numMonths,
662
662
  t.monthsPerRow
663
- ), i = Yn(
663
+ ), i = $n(
664
664
  t.highlightToday,
665
665
  t.statePerMonth
666
666
  );
667
667
  return /* @__PURE__ */ o(
668
- Zn,
668
+ tr,
669
669
  {
670
670
  year: n,
671
671
  month: r,
@@ -675,7 +675,7 @@ function se(t) {
675
675
  }
676
676
  );
677
677
  }
678
- const Vn = (t, e, n) => {
678
+ const er = (t, e, n) => {
679
679
  if (e && t)
680
680
  return {
681
681
  month: e,
@@ -683,82 +683,87 @@ const Vn = (t, e, n) => {
683
683
  };
684
684
  if (n)
685
685
  return {
686
- month: dt(n),
687
- year: St(n)
686
+ month: ft(n),
687
+ year: Rt(n)
688
688
  };
689
689
  const r = /* @__PURE__ */ new Date();
690
690
  return {
691
- month: dt(r),
692
- year: St(r)
691
+ month: ft(r),
692
+ year: Rt(r)
693
693
  };
694
- }, tr = (t, e, n, r, s) => r == null ? [[Kt(t, e, n)]] : s == null ? [be(t, e, r, n)] : _e(be(t, e, r, n), s), Oe = (t, e) => `${t.row}-${t.column}-${e}`, er = (t, e, n, r) => {
694
+ }, nr = (t, e, n, r, s) => r == null ? [[Jt(t, e, n)]] : s == null ? [ye(t, e, r, n)] : Ye(ye(t, e, r, n), s), Oe = (t, e) => `${t.row}-${t.column}-${e}`, rr = (t, e, n, r) => {
695
695
  let s = e;
696
696
  for (let i = 0; i < r; i++) {
697
- s = nr(s, t, r);
697
+ s = sr(s, t, r);
698
698
  const c = Oe(s, n);
699
699
  if (document.getElementById(c))
700
700
  return c;
701
701
  }
702
- }, nr = (t, e, n) => {
702
+ }, sr = (t, e, n) => {
703
703
  let r = t.row, s = t.column;
704
704
  return e === "ArrowLeft" ? s-- : e === "ArrowUp" ? r-- : e === "ArrowRight" ? s++ : e === "ArrowDown" && r++, s < 0 && (s = n - 1, r--), s > n - 1 && (s = 0, r++), {
705
705
  column: s,
706
706
  row: r
707
707
  };
708
- }, rr = ({
708
+ }, ir = ({
709
709
  month: t,
710
710
  onClick: e,
711
711
  selected: n,
712
712
  locale: r,
713
713
  autoFocus: s,
714
714
  monthPickerId: i,
715
- position: c
715
+ position: c,
716
+ size: a
716
717
  }) => {
717
- const a = R(
718
- () => Tt(W(t, "MMM", { locale: r })),
718
+ const l = x(
719
+ () => xt(j(t, "MMM", { locale: r })),
719
720
  [r, t]
720
- ), l = R(
721
- () => Tt(W(t, "MMMM", { locale: r })),
721
+ ), d = x(
722
+ () => xt(j(t, "MMMM", { locale: r })),
722
723
  [r, t]
723
- ), d = $(null), u = Oe(c, i);
724
- X(() => {
725
- var h;
726
- (h = d.current) == null || h.focus();
724
+ ), u = W(null), m = Oe(c, i), f = n ? 0 : -1;
725
+ Z(() => {
726
+ var g;
727
+ (g = u.current) == null || g.focus();
727
728
  }, []);
728
- const p = D(
729
- (h) => {
730
- var g;
731
- const f = er(
732
- h.key,
729
+ const h = D(
730
+ (g) => {
731
+ var y;
732
+ const w = rr(
733
+ g.key,
733
734
  c,
734
735
  i,
735
736
  4
736
737
  );
737
- f && ((g = document.getElementById(f)) == null || g.focus());
738
+ w && ((y = document.getElementById(w)) == null || y.focus());
738
739
  },
739
740
  [i, c]
740
741
  );
741
- return /* @__PURE__ */ o(B, { justifyContent: "center", onKeyDown: p, children: n ? /* @__PURE__ */ o(
742
- bt,
742
+ return /* @__PURE__ */ o(B, { justifyContent: "center", onKeyDown: h, children: n ? /* @__PURE__ */ o(
743
+ Mt,
743
744
  {
744
- id: u,
745
- "aria-label": l,
746
- label: a,
745
+ id: m,
746
+ "aria-label": d,
747
+ label: l,
747
748
  onClick: e,
748
749
  "aria-selected": !0,
749
750
  autoFocus: s,
750
- ref: d
751
+ ref: u,
752
+ size: a === "large" ? "large" : "medium",
753
+ tabIndex: f
751
754
  }
752
755
  ) : /* @__PURE__ */ o(
753
- q,
756
+ G,
754
757
  {
755
- id: u,
756
- label: a,
757
- "aria-label": l,
758
- onClick: e
758
+ id: m,
759
+ label: l,
760
+ "aria-label": d,
761
+ onClick: e,
762
+ size: a === "large" ? "large" : "medium",
763
+ tabIndex: f
759
764
  }
760
765
  ) });
761
- }, sr = (t, e, n) => {
766
+ }, or = (t, e, n) => {
762
767
  let r = t.getFullYear(), s = 0, i = 0, c = t;
763
768
  const a = {
764
769
  yearOrder: [],
@@ -781,58 +786,82 @@ const Vn = (t, e, n) => {
781
786
  a.years[r].rows.push(s);
782
787
  break;
783
788
  }
784
- c = xt(c, 1), c.getFullYear() !== r ? (a.years[r].rows.push(s), r++, i = 0, s++) : (i++, i > n - 1 && (a.years[r].rows.push(s), i = 0, s++));
789
+ c = At(c, 1), c.getFullYear() !== r ? (a.years[r].rows.push(s), r++, i = 0, s++) : (i++, i > n - 1 && (a.years[r].rows.push(s), i = 0, s++));
785
790
  }
786
791
  return a.lastMonthColumn = i, a.lastMonthRow = s, a;
787
- }, me = () => R(() => /* @__PURE__ */ new Date(), []), Nt = ({
792
+ }, De = () => x(() => /* @__PURE__ */ new Date(), []), Pt = ({
788
793
  value: t,
789
794
  onValueChange: e,
790
- locale: n = Ft,
795
+ locale: n = zt,
791
796
  firstMonth: r,
792
797
  numMonths: s,
793
- onCancel: i
798
+ onCancel: i,
799
+ size: c = "medium"
794
800
  }) => {
795
- const c = he(), a = me(), l = s > 0 ? s : 12, [d, u] = T(!1), p = sr(r, l, 4), h = R(() => xt(r, l), [l, r]);
796
- X(() => {
797
- u(!0);
801
+ const a = ge(), l = De(), d = s > 0 ? s : 12, [u, m] = I(!1), f = or(r, d, ar(c)), h = x(() => At(r, d), [d, r]);
802
+ Z(() => {
803
+ m(!0);
798
804
  }, []);
799
- const f = D(
800
- (g) => {
801
- g.key === "Escape" && (i == null || i(), g.preventDefault(), g.stopPropagation());
805
+ const g = D(
806
+ (w) => {
807
+ w.key === "Escape" && (i == null || i(), w.preventDefault(), w.stopPropagation());
802
808
  },
803
809
  [i]
804
810
  );
805
- return /* @__PURE__ */ o(C, { gap: 1, maxWidth: "336px", onKeyDown: f, children: p.yearOrder.map((g, M) => {
806
- const { rows: y } = p.years[g];
807
- return /* @__PURE__ */ x(fe.Fragment, { children: [
808
- (M !== 0 || g !== a.getFullYear()) && /* @__PURE__ */ o(Rt, { variant: "h4", children: g }),
809
- y.map((b) => {
810
- const { columns: w } = p.rows[b];
811
- return /* @__PURE__ */ o(B, { gap: 1, children: w.map(({ month: m, position: k }) => /* @__PURE__ */ o(C, { width: "78px", children: /* @__PURE__ */ o(
812
- rr,
811
+ return /* @__PURE__ */ o(z, { gap: 1, maxWidth: cr(c), onKeyDown: g, children: f.yearOrder.map((w, y) => {
812
+ const { rows: b } = f.years[w];
813
+ return /* @__PURE__ */ E(me.Fragment, { children: [
814
+ (y !== 0 || w !== l.getFullYear()) && /* @__PURE__ */ o(_t, { variant: "h4", children: w }),
815
+ /* @__PURE__ */ o("table", { style: { borderSpacing: "0 8px" }, children: /* @__PURE__ */ o("tbody", { children: b.map((M) => {
816
+ const { columns: p } = f.rows[M];
817
+ return /* @__PURE__ */ o("tr", { children: p.map(({ month: k, position: T }) => /* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(
818
+ ir,
813
819
  {
814
- month: m,
820
+ month: k,
815
821
  firstAvailableMonth: r,
816
822
  lastAvailableMonth: h,
817
823
  locale: n,
818
- selected: t ? rt(t, m) : !1,
819
- autoFocus: d,
820
- onClick: () => e == null ? void 0 : e(m),
821
- monthPickerId: c,
822
- position: k
824
+ selected: t ? st(t, k) : !1,
825
+ autoFocus: u,
826
+ onClick: () => e == null ? void 0 : e(k),
827
+ monthPickerId: a,
828
+ position: T,
829
+ size: c
823
830
  }
824
- ) }, m.getMonth())) }, b);
825
- })
826
- ] }, g);
831
+ ) }, k.getMonth())) }, M);
832
+ }) }) })
833
+ ] }, w);
827
834
  }) });
828
- }, ir = (t) => [
835
+ }, cr = (t) => {
836
+ switch (t) {
837
+ case "small":
838
+ return "280px";
839
+ case "medium":
840
+ return "336px";
841
+ case "large":
842
+ return "448px";
843
+ default:
844
+ return le(t, "336px");
845
+ }
846
+ }, ar = (t) => {
847
+ switch (t) {
848
+ case "small":
849
+ return 3;
850
+ case "medium":
851
+ return 4;
852
+ case "large":
853
+ return 5;
854
+ default:
855
+ return le(t, 4);
856
+ }
857
+ }, lr = (t) => [
829
858
  {
830
859
  label: "Past",
831
860
  presets: [
832
- { label: "Last 3 days", startDate: t, endDate: lt(t, 2) },
833
- { label: "Last 7 days", startDate: t, endDate: lt(t, 6) },
834
- { label: "Last 30 days", startDate: t, endDate: lt(t, 29) },
835
- { label: "Last 45 days", startDate: t, endDate: lt(t, 44) }
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) }
836
865
  ]
837
866
  },
838
867
  {
@@ -844,12 +873,12 @@ const Vn = (t, e, n) => {
844
873
  { label: "Next 45 days", startDate: t, endDate: J(t, 44) }
845
874
  ]
846
875
  }
847
- ], or = ({
876
+ ], dr = ({
848
877
  onClickPreset: t
849
878
  }) => {
850
- const [e, n] = T(0), r = R(() => ir(/* @__PURE__ */ new Date()), []), s = r[e] ?? r[0];
851
- return /* @__PURE__ */ x(C, { children: [
852
- /* @__PURE__ */ x(
879
+ const [e, n] = I(0), r = x(() => lr(/* @__PURE__ */ new Date()), []), s = r[e] ?? r[0];
880
+ return /* @__PURE__ */ E(z, { children: [
881
+ /* @__PURE__ */ E(
853
882
  B,
854
883
  {
855
884
  justifyContent: "space-between",
@@ -857,20 +886,20 @@ const Vn = (t, e, n) => {
857
886
  width: "200px",
858
887
  children: [
859
888
  /* @__PURE__ */ o(
860
- q,
889
+ G,
861
890
  {
862
891
  size: "small",
863
- leftIcon: Ve,
892
+ leftIcon: en,
864
893
  disabled: e === 0,
865
894
  onClick: () => n(e - 1)
866
895
  }
867
896
  ),
868
- /* @__PURE__ */ o(pt, { children: s.label }),
897
+ /* @__PURE__ */ o(Dt, { children: s.label }),
869
898
  /* @__PURE__ */ o(
870
- q,
899
+ G,
871
900
  {
872
901
  size: "small",
873
- leftIcon: tn,
902
+ leftIcon: nn,
874
903
  disabled: e === r.length - 1,
875
904
  onClick: () => n(e + 1)
876
905
  }
@@ -878,19 +907,19 @@ const Vn = (t, e, n) => {
878
907
  ]
879
908
  }
880
909
  ),
881
- /* @__PURE__ */ o(Dt, {}),
882
- /* @__PURE__ */ o(C, { alignItems: "center", children: s.presets.map((i) => /* @__PURE__ */ x(fe.Fragment, { children: [
910
+ /* @__PURE__ */ o(yt, {}),
911
+ /* @__PURE__ */ o(z, { alignItems: "center", children: s.presets.map((i) => /* @__PURE__ */ E(me.Fragment, { children: [
883
912
  /* @__PURE__ */ o(
884
- bt,
913
+ Mt,
885
914
  {
886
915
  label: i.label,
887
916
  onClick: () => t(i)
888
917
  }
889
918
  ),
890
- /* @__PURE__ */ o(Dt, {})
919
+ /* @__PURE__ */ o(yt, {})
891
920
  ] }, i.label)) })
892
921
  ] });
893
- }, cr = function({
922
+ }, ur = function({
894
923
  locale: e,
895
924
  dateInFocus: n,
896
925
  setDateInFocus: r,
@@ -910,7 +939,7 @@ const Vn = (t, e, n) => {
910
939
  switch (s) {
911
940
  case "calendar":
912
941
  return /* @__PURE__ */ o(
913
- se,
942
+ ie,
914
943
  {
915
944
  ...a,
916
945
  date: n,
@@ -927,7 +956,7 @@ const Vn = (t, e, n) => {
927
956
  numMonths: 24,
928
957
  dateInFocus: n
929
958
  }) : /* @__PURE__ */ o(
930
- Nt,
959
+ Pt,
931
960
  {
932
961
  value: n,
933
962
  onValueChange: l,
@@ -937,29 +966,29 @@ const Vn = (t, e, n) => {
937
966
  }
938
967
  );
939
968
  case "presets":
940
- return /* @__PURE__ */ o(or, { onClickPreset: () => {
969
+ return /* @__PURE__ */ o(dr, { onClickPreset: () => {
941
970
  } });
942
971
  default:
943
- return /* @__PURE__ */ o(L, { children: /* @__PURE__ */ o(
944
- bt,
972
+ return /* @__PURE__ */ o(A, { children: /* @__PURE__ */ o(
973
+ Mt,
945
974
  {
946
975
  label: "Show calendar",
947
976
  onClick: () => i("calendar")
948
977
  }
949
978
  ) });
950
979
  }
951
- }, ar = (t, e, n, r) => {
980
+ }, fr = (t, e, n, r) => {
952
981
  const s = D(() => {
953
- const l = xt(t, n ?? r ?? 1);
982
+ const l = At(t, n ?? r ?? 1);
954
983
  e == null || e(l);
955
984
  }, [e, t, n, r]), i = D(() => {
956
- const l = un(t, 1);
985
+ const l = hn(t, 1);
957
986
  e == null || e(l);
958
987
  }, [e, t]), c = D(() => {
959
- const l = de(t, n ?? r ?? 1);
988
+ const l = fe(t, n ?? r ?? 1);
960
989
  e == null || e(l);
961
990
  }, [e, t, n, r]), a = D(() => {
962
- const l = fn(t, 1);
991
+ const l = mn(t, 1);
963
992
  e == null || e(l);
964
993
  }, [e, t]);
965
994
  return {
@@ -968,60 +997,60 @@ const Vn = (t, e, n) => {
968
997
  nextYear: i,
969
998
  prevYear: a
970
999
  };
971
- }, lr = ({
1000
+ }, hr = ({
972
1001
  children: t,
973
1002
  prevMonth: e,
974
1003
  nextMonth: n,
975
1004
  prevYear: r,
976
1005
  nextYear: s
977
- }) => /* @__PURE__ */ x("div", { children: [
1006
+ }) => /* @__PURE__ */ E("div", { children: [
978
1007
  t,
979
- /* @__PURE__ */ o(Mt, { children: /* @__PURE__ */ x(B, { gap: 1, children: [
980
- /* @__PURE__ */ o(ct, { onClick: r, leftIcon: en }),
981
- /* @__PURE__ */ o(ct, { onClick: e, leftIcon: vt }),
982
- /* @__PURE__ */ o(Mt, { num: 2 }),
983
- /* @__PURE__ */ o(ct, { onClick: n, leftIcon: Et }),
984
- /* @__PURE__ */ o(ct, { onClick: s, leftIcon: nn })
1008
+ /* @__PURE__ */ o(Tt, { children: /* @__PURE__ */ E(B, { gap: 1, children: [
1009
+ /* @__PURE__ */ o(at, { onClick: r, leftIcon: rn }),
1010
+ /* @__PURE__ */ o(at, { onClick: e, leftIcon: Ft }),
1011
+ /* @__PURE__ */ o(Tt, { num: 2 }),
1012
+ /* @__PURE__ */ o(at, { onClick: n, leftIcon: Nt }),
1013
+ /* @__PURE__ */ o(at, { onClick: s, leftIcon: sn })
985
1014
  ] }) }),
986
- /* @__PURE__ */ o(Dt, {})
987
- ] }), dr = () => {
1015
+ /* @__PURE__ */ o(yt, {})
1016
+ ] }), mr = () => {
988
1017
  };
989
- function gt({
1018
+ function wt({
990
1019
  monthSwitcherPlacement: t,
991
- theme: e = mt,
1020
+ theme: e = bt,
992
1021
  dateInFocus: n,
993
1022
  setDateInFocus: r,
994
1023
  currentPanel: s,
995
1024
  setCurrentPanel: i,
996
- onSelectPreset: c = dr,
1025
+ onSelectPreset: c = mr,
997
1026
  renderMonthPicker: a,
998
1027
  ...l
999
1028
  }) {
1000
- const { nextMonth: d, prevMonth: u, nextYear: p, prevYear: h } = ar(
1029
+ const { nextMonth: d, prevMonth: u, nextYear: m, prevYear: f } = fr(
1001
1030
  n,
1002
1031
  r,
1003
1032
  l.monthsPerRow,
1004
1033
  l.numMonths
1005
1034
  );
1006
- switch (ur(
1035
+ switch (gr(
1007
1036
  t,
1008
1037
  l.numMonths
1009
1038
  )) {
1010
1039
  case "below":
1011
1040
  return /* @__PURE__ */ o(
1012
- lr,
1041
+ hr,
1013
1042
  {
1014
1043
  theme: e,
1015
1044
  nextMonth: d,
1016
1045
  prevMonth: u,
1017
- nextYear: p,
1018
- prevYear: h,
1019
- children: /* @__PURE__ */ o(se, { ...l, theme: e, date: n })
1046
+ nextYear: m,
1047
+ prevYear: f,
1048
+ children: /* @__PURE__ */ o(ie, { ...l, theme: e, date: n })
1020
1049
  }
1021
1050
  );
1022
1051
  case "header":
1023
- return /* @__PURE__ */ o(C, { children: /* @__PURE__ */ o(
1024
- cr,
1052
+ return /* @__PURE__ */ o(z, { children: /* @__PURE__ */ o(
1053
+ ur,
1025
1054
  {
1026
1055
  ...l,
1027
1056
  theme: e,
@@ -1031,55 +1060,55 @@ function gt({
1031
1060
  currentPanel: s,
1032
1061
  setCurrentPanel: i,
1033
1062
  onSelectPreset: c,
1034
- headerRightContent: /* @__PURE__ */ x(B, { alignItems: "center", gap: 1, children: [
1063
+ headerRightContent: /* @__PURE__ */ E(B, { alignItems: "center", gap: 1, children: [
1035
1064
  /* @__PURE__ */ o(
1036
- ct,
1065
+ at,
1037
1066
  {
1038
1067
  onClick: u,
1039
- leftIcon: vt
1068
+ leftIcon: Ft
1040
1069
  }
1041
1070
  ),
1042
1071
  /* @__PURE__ */ o(
1043
- ct,
1072
+ at,
1044
1073
  {
1045
1074
  onClick: d,
1046
- leftIcon: Et
1075
+ leftIcon: Nt
1047
1076
  }
1048
1077
  )
1049
1078
  ] })
1050
1079
  }
1051
1080
  ) });
1052
1081
  default:
1053
- return /* @__PURE__ */ o(se, { ...l, theme: e, date: n });
1082
+ return /* @__PURE__ */ o(ie, { ...l, theme: e, date: n });
1054
1083
  }
1055
1084
  }
1056
- const ur = (t, e) => t || (e || 1) > 1 ? "below" : "header", fr = (t) => ({
1057
- startDate: t.startDate ? W(t.startDate, "yyyy-MM-dd") : void 0,
1058
- endDate: t.endDate ? W(t.endDate, "yyyy-MM-dd") : void 0
1059
- }), hr = ({
1085
+ const gr = (t, e) => t || (e || 1) > 1 ? "below" : "header", pr = (t) => ({
1086
+ startDate: t.startDate ? j(t.startDate, "yyyy-MM-dd") : void 0,
1087
+ endDate: t.endDate ? j(t.endDate, "yyyy-MM-dd") : void 0
1088
+ }), Dr = ({
1060
1089
  startDate: t,
1061
1090
  endDate: e
1062
1091
  }) => {
1063
1092
  const n = /* @__PURE__ */ new Date();
1064
1093
  return {
1065
- startDate: t ? ft(t, "yyyy-MM-dd", n) : void 0,
1066
- endDate: e ? ft(e, "yyyy-MM-dd", n) : void 0
1094
+ startDate: t ? mt(t, "yyyy-MM-dd", n) : void 0,
1095
+ endDate: e ? mt(e, "yyyy-MM-dd", n) : void 0
1067
1096
  };
1068
- }, He = ({
1097
+ }, We = ({
1069
1098
  startDate: t,
1070
1099
  endDate: e
1071
- }) => !!(t && e && !P(t, e) && G(t, e)), $e = (t) => He(t) ? {
1100
+ }) => !!(t && e && !P(t, e) && q(t, e)), je = (t) => We(t) ? {
1072
1101
  startDate: t.endDate,
1073
1102
  endDate: t.startDate
1074
- } : t, Ls = (t) => t.startDate && t.endDate ? fr(
1075
- $e(hr(t))
1076
- ) : t, pr = (t, e, n, r) => D(
1103
+ } : t, Cs = (t) => t.startDate && t.endDate ? pr(
1104
+ je(Dr(t))
1105
+ ) : t, br = (t, e, n, r) => D(
1077
1106
  (s) => {
1078
1107
  const i = {
1079
1108
  startDate: n === "startDate" ? s.date : t == null ? void 0 : t.startDate,
1080
1109
  endDate: n === "endDate" ? s.date : t == null ? void 0 : t.endDate
1081
1110
  };
1082
- He(i) || r(n === "startDate" ? "endDate" : "startDate"), e == null || e($e(i));
1111
+ We(i) || r(n === "startDate" ? "endDate" : "startDate"), e == null || e(je(i));
1083
1112
  },
1084
1113
  [
1085
1114
  n,
@@ -1088,8 +1117,8 @@ const ur = (t, e) => t || (e || 1) > 1 ? "below" : "header", fr = (t) => ({
1088
1117
  t == null ? void 0 : t.endDate,
1089
1118
  t == null ? void 0 : t.startDate
1090
1119
  ]
1091
- ), Jt = (t) => {
1092
- const [e, n] = T("calendar"), r = D(
1120
+ ), qt = (t) => {
1121
+ const [e, n] = I("calendar"), r = D(
1093
1122
  (s) => {
1094
1123
  n(s), t == null || t(s);
1095
1124
  },
@@ -1099,7 +1128,7 @@ const ur = (t, e) => t || (e || 1) > 1 ? "below" : "header", fr = (t) => ({
1099
1128
  currentPanel: e,
1100
1129
  setCurrentPanel: r
1101
1130
  };
1102
- }, mr = ({
1131
+ }, wr = ({
1103
1132
  focusedInput: t,
1104
1133
  value: e,
1105
1134
  onValueChange: n,
@@ -1108,15 +1137,15 @@ const ur = (t, e) => t || (e || 1) > 1 ? "below" : "header", fr = (t) => ({
1108
1137
  onChangePanel: i,
1109
1138
  initialDateInFocus: c
1110
1139
  }) => {
1111
- const { currentPanel: a, setCurrentPanel: l } = Jt(i), [d, u] = T(
1140
+ const { currentPanel: a, setCurrentPanel: l } = qt(i), [d, u] = I(
1112
1141
  () => c ?? /* @__PURE__ */ new Date()
1113
- ), p = pr(
1142
+ ), m = br(
1114
1143
  e,
1115
1144
  n,
1116
1145
  t,
1117
1146
  r
1118
- ), h = R(
1119
- () => It(
1147
+ ), f = x(
1148
+ () => Et(
1120
1149
  s,
1121
1150
  e == null ? void 0 : e.startDate,
1122
1151
  e == null ? void 0 : e.endDate
@@ -1124,20 +1153,20 @@ const ur = (t, e) => t || (e || 1) > 1 ? "below" : "header", fr = (t) => ({
1124
1153
  [s, e == null ? void 0 : e.endDate, e == null ? void 0 : e.startDate]
1125
1154
  );
1126
1155
  return {
1127
- onClickDay: p,
1128
- statePerMonth: h,
1156
+ onClickDay: m,
1157
+ statePerMonth: f,
1129
1158
  currentPanel: a,
1130
1159
  setCurrentPanel: l,
1131
1160
  setDateInFocus: u,
1132
1161
  dateInFocus: d
1133
1162
  };
1134
1163
  };
1135
- function _s(t) {
1136
- const e = mr(t);
1137
- return /* @__PURE__ */ o(gt, { ...t, ...e });
1164
+ function zs(t) {
1165
+ const e = wr(t);
1166
+ return /* @__PURE__ */ o(wt, { ...t, ...e });
1138
1167
  }
1139
- const Ps = () => {
1140
- const [t, e] = T(), [n, r] = T(), [s, i] = T("startDate");
1168
+ const Ks = () => {
1169
+ const [t, e] = I(), [n, r] = I(), [s, i] = I("startDate");
1141
1170
  return {
1142
1171
  startDate: t,
1143
1172
  setStartDate: e,
@@ -1146,19 +1175,19 @@ const Ps = () => {
1146
1175
  focusedInput: s,
1147
1176
  setFocusedInput: i
1148
1177
  };
1149
- }, gr = ({
1178
+ }, yr = ({
1150
1179
  onChange: t,
1151
1180
  value: e,
1152
1181
  statePerMonth: n,
1153
1182
  onChangePanel: r
1154
1183
  }) => {
1155
- const { currentPanel: s, setCurrentPanel: i } = Jt(r), [c, a] = T(() => e ?? /* @__PURE__ */ new Date()), l = D(
1184
+ const { currentPanel: s, setCurrentPanel: i } = qt(r), [c, a] = I(() => e ?? /* @__PURE__ */ new Date()), l = D(
1156
1185
  (u) => {
1157
1186
  t && t(u.date);
1158
1187
  },
1159
1188
  [t]
1160
- ), d = R(
1161
- () => e ? at(n, e, [
1189
+ ), d = x(
1190
+ () => e ? lt(n, e, [
1162
1191
  "selected",
1163
1192
  "singleSelected"
1164
1193
  ]) : n,
@@ -1175,25 +1204,25 @@ const Ps = () => {
1175
1204
  };
1176
1205
  };
1177
1206
  function Ue(t) {
1178
- const e = gr(t);
1179
- return /* @__PURE__ */ o(gt, { ...t, ...e });
1207
+ const e = yr(t);
1208
+ return /* @__PURE__ */ o(wt, { ...t, ...e });
1180
1209
  }
1181
- const Dr = ({
1210
+ const Mr = ({
1182
1211
  onChange: t,
1183
1212
  value: e,
1184
1213
  statePerMonth: n,
1185
1214
  onChangePanel: r
1186
1215
  }) => {
1187
- const { currentPanel: s, setCurrentPanel: i } = Jt(r), [c, a] = T(() => /* @__PURE__ */ new Date()), l = D(
1216
+ const { currentPanel: s, setCurrentPanel: i } = qt(r), [c, a] = I(() => /* @__PURE__ */ new Date()), l = D(
1188
1217
  (u) => {
1189
1218
  if (!t)
1190
1219
  return;
1191
- const p = e && e.find((h) => P(h, u.date));
1192
- t(e && p ? e.filter((h) => !P(h, u.date)) : [...e || [], u.date]);
1220
+ const m = e && e.find((f) => P(f, u.date));
1221
+ t(e && m ? e.filter((f) => !P(f, u.date)) : [...e || [], u.date]);
1193
1222
  },
1194
1223
  [t, e]
1195
- ), d = R(() => e ? e.reduce(
1196
- (u, p) => at(u, p, ["selected"]),
1224
+ ), d = x(() => e ? e.reduce(
1225
+ (u, m) => lt(u, m, ["selected"]),
1197
1226
  n
1198
1227
  ) : n, [n, e]);
1199
1228
  return {
@@ -1205,40 +1234,40 @@ const Dr = ({
1205
1234
  setDateInFocus: a
1206
1235
  };
1207
1236
  };
1208
- function Ys(t) {
1209
- const e = Dr(t);
1210
- return /* @__PURE__ */ o(gt, { ...t, ...e });
1237
+ function Js(t) {
1238
+ const e = Mr(t);
1239
+ return /* @__PURE__ */ o(wt, { ...t, ...e });
1211
1240
  }
1212
- const br = ({
1241
+ const kr = ({
1213
1242
  onChange: t,
1214
1243
  value: e,
1215
1244
  statePerMonth: n,
1216
1245
  onChangePanel: r,
1217
- locale: s = Ft
1246
+ locale: s = zt
1218
1247
  }) => {
1219
- const [i, c] = T(() => {
1220
- const f = Zt(e, s);
1221
- return f ? f.days[0].date : /* @__PURE__ */ new Date();
1222
- }), { currentPanel: a, setCurrentPanel: l } = Jt(r), d = D(
1223
- (f) => {
1224
- t && t(ye(pe(f.date, s)));
1248
+ const [i, c] = I(() => {
1249
+ const h = Vt(e, s);
1250
+ return h ? h.days[0].date : /* @__PURE__ */ new Date();
1251
+ }), { currentPanel: a, setCurrentPanel: l } = qt(r), d = D(
1252
+ (h) => {
1253
+ t && t(ke(pe(h.date, s)));
1225
1254
  },
1226
1255
  [s, t]
1227
1256
  ), u = D(
1228
- (f) => {
1229
- t && t(ye(f));
1257
+ (h) => {
1258
+ t && t(ke(h));
1230
1259
  },
1231
1260
  [t]
1232
- ), p = R(() => {
1233
- const f = Zt(e, s);
1234
- return f ? Pn(n, f) : n;
1235
- }, [e, s, n]), h = R(() => {
1236
- const f = Zt(e, s);
1237
- return f ? f.days[0].date : /* @__PURE__ */ new Date();
1261
+ ), m = x(() => {
1262
+ const h = Vt(e, s);
1263
+ return h ? Bn(n, h) : n;
1264
+ }, [e, s, n]), f = x(() => {
1265
+ const h = Vt(e, s);
1266
+ return h ? h.days[0].date : /* @__PURE__ */ new Date();
1238
1267
  }, [s, e]);
1239
1268
  return {
1240
- statePerMonth: p,
1241
- date: h,
1269
+ statePerMonth: m,
1270
+ date: f,
1242
1271
  dateInFocus: i,
1243
1272
  setDateInFocus: c,
1244
1273
  onClickDay: d,
@@ -1246,22 +1275,22 @@ const br = ({
1246
1275
  currentPanel: a,
1247
1276
  setCurrentPanel: l
1248
1277
  };
1249
- }, ye = (t) => {
1278
+ }, ke = (t) => {
1250
1279
  if (t)
1251
1280
  return `${t.endYear}-${t.weekNumber}`;
1252
- }, Zt = (t, e) => {
1281
+ }, Vt = (t, e) => {
1253
1282
  if (!t)
1254
1283
  return;
1255
1284
  const n = t.split("-"), r = parseInt(n[1], 10), s = parseInt(n[0], 10), i = /* @__PURE__ */ new Date();
1256
1285
  i.setFullYear(s);
1257
- const c = $t(hn(i, r), { locale: e });
1286
+ const c = jt(gn(i, r), { locale: e });
1258
1287
  return pe(c, e);
1259
1288
  };
1260
- function Bs(t) {
1261
- const e = br(t);
1262
- return /* @__PURE__ */ o(gt, { ...t, ...e });
1289
+ function qs(t) {
1290
+ const e = kr(t);
1291
+ return /* @__PURE__ */ o(wt, { ...t, ...e });
1263
1292
  }
1264
- const Lt = "bottom", We = () => {
1293
+ const Yt = "bottom", ve = () => {
1265
1294
  const [t, e] = An();
1266
1295
  return {
1267
1296
  onChangePanel: D(() => {
@@ -1270,8 +1299,8 @@ const Lt = "bottom", We = () => {
1270
1299
  }, [e]),
1271
1300
  tippyRef: t
1272
1301
  };
1273
- }, wr = (t, e, n) => {
1274
- const [r, s] = T(n || !1), i = D(() => (s(!0), !0), [s]), c = D(() => {
1302
+ }, Sr = (t, e, n) => {
1303
+ const [r, s] = I(n || !1), i = D(() => (s(!0), !0), [s]), c = D(() => {
1275
1304
  s(!1), e && e();
1276
1305
  }, [s, e]), a = D(
1277
1306
  (l) => {
@@ -1285,35 +1314,35 @@ const Lt = "bottom", We = () => {
1285
1314
  showingCalendar: r,
1286
1315
  onSelectDate: a
1287
1316
  };
1288
- }, _t = "2999-12-31", Os = ({
1289
- displayFormat: t = st.fullDate,
1317
+ }, Bt = "2999-12-31", Gs = ({
1318
+ displayFormat: t = it.fullDate,
1290
1319
  placeholder: e = "Enter date",
1291
1320
  value: n,
1292
1321
  zIndex: r = 100,
1293
- calendarTheme: s = mt,
1322
+ calendarTheme: s = bt,
1294
1323
  calendarProps: i,
1295
1324
  openOnMount: c,
1296
1325
  onClose: a,
1297
1326
  onChange: l,
1298
1327
  portalTarget: d,
1299
1328
  variant: u,
1300
- width: p,
1301
- minDate: h,
1302
- maxDate: f = _t,
1329
+ width: m,
1330
+ minDate: f,
1331
+ maxDate: h = Bt,
1303
1332
  disabled: g
1304
1333
  }) => {
1305
- const { hideCalendar: M, showingCalendar: y, onSelectDate: b, showCalendar: w } = wr(l, a, c), { tippyRef: m, onChangePanel: k } = We();
1306
- return /* @__PURE__ */ o(L, { width: p, children: /* @__PURE__ */ o(
1307
- At,
1334
+ const { hideCalendar: w, showingCalendar: y, onSelectDate: b, showCalendar: M } = Sr(l, a, c), { tippyRef: p, onChangePanel: k } = ve();
1335
+ return /* @__PURE__ */ o(A, { width: m, children: /* @__PURE__ */ o(
1336
+ Lt,
1308
1337
  {
1309
1338
  arrow: !1,
1310
1339
  lazy: !0,
1311
1340
  visible: y,
1312
- onClickOutside: M,
1313
- placement: Lt,
1341
+ onClickOutside: w,
1342
+ placement: Yt,
1314
1343
  zIndex: r,
1315
1344
  appendTo: d ?? "parent",
1316
- tippyRef: m,
1345
+ tippyRef: p,
1317
1346
  disabled: g,
1318
1347
  content: /* @__PURE__ */ o(
1319
1348
  Ue,
@@ -1323,44 +1352,44 @@ const Lt = "bottom", We = () => {
1323
1352
  value: n,
1324
1353
  theme: s,
1325
1354
  onChangePanel: k,
1326
- minDate: h,
1327
- maxDate: f
1355
+ minDate: f,
1356
+ maxDate: h
1328
1357
  }
1329
1358
  ),
1330
1359
  children: /* @__PURE__ */ o(
1331
- ht,
1360
+ pt,
1332
1361
  {
1333
1362
  type: "date",
1334
- onFocus: w,
1335
- buttonRight: /* @__PURE__ */ o(rn, { onClick: w, icon: kt }),
1336
- value: n ? W(n, t) : "",
1363
+ onFocus: M,
1364
+ buttonRight: /* @__PURE__ */ o(on, { onClick: M, icon: It }),
1365
+ value: n ? j(n, t) : "",
1337
1366
  placeholder: e,
1338
1367
  size: 9,
1339
1368
  disabled: g,
1340
1369
  autoFocus: c,
1341
1370
  variant: u,
1342
- min: h,
1343
- max: f
1371
+ min: f,
1372
+ max: h
1344
1373
  }
1345
1374
  )
1346
1375
  }
1347
1376
  ) });
1348
- }, yr = (t, e) => {
1349
- const n = $(null), r = $(null), [s, i] = T(!1), [c, a] = T(void 0), l = D(() => (a("startDate"), i(!0), !0), [a, i]), d = D(() => (a("endDate"), i(!0), !0), [a, i]), u = D(() => {
1377
+ }, Tr = (t, e) => {
1378
+ const n = W(null), r = W(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(() => {
1350
1379
  i(!1);
1351
- }, [i]), p = D(
1352
- (f) => {
1380
+ }, [i]), m = D(
1381
+ (h) => {
1353
1382
  c === "startDate" ? (e == null || e({
1354
- startDate: f.date,
1383
+ startDate: h.date,
1355
1384
  endDate: t == null ? void 0 : t.endDate
1356
1385
  }), t != null && t.endDate ? setTimeout(u, 150) : (a("endDate"), r.current && r.current.focus())) : c === "endDate" && (e == null || e({
1357
1386
  startDate: t == null ? void 0 : t.startDate,
1358
- endDate: f.date
1387
+ endDate: h.date
1359
1388
  }), t != null && t.startDate ? setTimeout(u, 150) : (a("startDate"), n.current && n.current.focus()));
1360
1389
  },
1361
1390
  [c, e, a, u, t]
1362
- ), h = R(
1363
- () => (t == null ? void 0 : t.startDate) && (t == null ? void 0 : t.endDate) && G(t.startDate, t.endDate),
1391
+ ), f = x(
1392
+ () => (t == null ? void 0 : t.startDate) && (t == null ? void 0 : t.endDate) && q(t.startDate, t.endDate),
1364
1393
  [t == null ? void 0 : t.startDate, t == null ? void 0 : t.endDate]
1365
1394
  );
1366
1395
  return {
@@ -1372,12 +1401,12 @@ const Lt = "bottom", We = () => {
1372
1401
  setFocusedInput: a,
1373
1402
  startDateInputRef: n,
1374
1403
  endDateInputRef: r,
1375
- onClickDay: p,
1376
- startDateIsAfterEnd: h
1404
+ onClickDay: m,
1405
+ startDateIsAfterEnd: f
1377
1406
  };
1378
1407
  };
1379
- function Hs({
1380
- displayFormat: t = st.fullDate,
1408
+ function Qs({
1409
+ displayFormat: t = it.fullDate,
1381
1410
  placeholderStartDate: e = "Start date",
1382
1411
  placeholderEndDate: n = "End date",
1383
1412
  portalTarget: r,
@@ -1385,89 +1414,89 @@ function Hs({
1385
1414
  onValueChange: i,
1386
1415
  zIndex: c = 100,
1387
1416
  width: a,
1388
- calendarTheme: l = mt,
1417
+ calendarTheme: l = bt,
1389
1418
  calendarProps: d,
1390
1419
  minDate: u,
1391
- maxDate: p = _t,
1392
- disabled: h
1420
+ maxDate: m = Bt,
1421
+ disabled: f
1393
1422
  }) {
1394
- const [f, g] = T("calendar"), {
1395
- hideCalendar: M,
1423
+ const [h, g] = I("calendar"), {
1424
+ hideCalendar: w,
1396
1425
  showCalendarEndDate: y,
1397
1426
  showCalendarStartDate: b,
1398
- showingCalendar: w,
1399
- focusedInput: m,
1427
+ showingCalendar: M,
1428
+ focusedInput: p,
1400
1429
  startDateInputRef: k,
1401
- endDateInputRef: E,
1402
- onClickDay: A,
1430
+ endDateInputRef: T,
1431
+ onClickDay: L,
1403
1432
  startDateIsAfterEnd: N
1404
- } = yr(s, i), [I, Y] = T(
1405
- () => (m && (s == null ? void 0 : s[m])) ?? /* @__PURE__ */ new Date()
1406
- ), S = R(
1407
- () => It(void 0, s == null ? void 0 : s.startDate, s == null ? void 0 : s.endDate),
1433
+ } = Tr(s, i), [R, Y] = I(
1434
+ () => (p && (s == null ? void 0 : s[p])) ?? /* @__PURE__ */ new Date()
1435
+ ), S = x(
1436
+ () => Et(void 0, s == null ? void 0 : s.startDate, s == null ? void 0 : s.endDate),
1408
1437
  [s]
1409
1438
  );
1410
1439
  return /* @__PURE__ */ o(
1411
- At,
1440
+ Lt,
1412
1441
  {
1413
1442
  arrow: !1,
1414
1443
  lazy: !0,
1415
- disabled: h,
1416
- visible: w,
1444
+ disabled: f,
1445
+ visible: M,
1417
1446
  zIndex: c,
1418
- placement: Lt,
1447
+ placement: Yt,
1419
1448
  appendTo: r ?? "parent",
1420
- onClickOutside: M,
1449
+ onClickOutside: w,
1421
1450
  content: /* @__PURE__ */ o(
1422
- gt,
1451
+ wt,
1423
1452
  {
1424
1453
  ...d,
1425
- dateInFocus: I,
1454
+ dateInFocus: R,
1426
1455
  setDateInFocus: Y,
1427
1456
  statePerMonth: S,
1428
1457
  theme: l,
1429
- onClickDay: A,
1430
- currentPanel: f,
1458
+ onClickDay: L,
1459
+ currentPanel: h,
1431
1460
  setCurrentPanel: g,
1432
1461
  minDate: u,
1433
- maxDate: p
1462
+ maxDate: m
1434
1463
  }
1435
1464
  ),
1436
- children: /* @__PURE__ */ x(B, { alignItems: "center", children: [
1465
+ children: /* @__PURE__ */ E(B, { alignItems: "center", children: [
1437
1466
  /* @__PURE__ */ o(
1438
- ht,
1467
+ pt,
1439
1468
  {
1440
- iconLeft: kt,
1469
+ iconLeft: It,
1441
1470
  onFocus: b,
1442
- value: s != null && s.startDate ? W(s.startDate, t) : "",
1471
+ value: s != null && s.startDate ? j(s.startDate, t) : "",
1443
1472
  placeholder: e,
1444
1473
  width: a,
1445
- disabled: h,
1474
+ disabled: f,
1446
1475
  inputRef: k,
1447
1476
  size: 9,
1448
1477
  variant: N ? "error" : void 0
1449
1478
  }
1450
1479
  ),
1451
- /* @__PURE__ */ o(Dt, {}),
1480
+ /* @__PURE__ */ o(yt, {}),
1452
1481
  /* @__PURE__ */ o(
1453
- Te,
1482
+ Re,
1454
1483
  {
1455
- icon: sn,
1456
- color: Ct("--lhds-color-ui-500"),
1484
+ icon: cn,
1485
+ color: Kt("--lhds-color-ui-500"),
1457
1486
  size: 14
1458
1487
  }
1459
1488
  ),
1460
- /* @__PURE__ */ o(Dt, {}),
1489
+ /* @__PURE__ */ o(yt, {}),
1461
1490
  /* @__PURE__ */ o(
1462
- ht,
1491
+ pt,
1463
1492
  {
1464
- iconLeft: kt,
1493
+ iconLeft: It,
1465
1494
  onFocus: y,
1466
- value: s != null && s.endDate ? W(s.endDate, t) : "",
1495
+ value: s != null && s.endDate ? j(s.endDate, t) : "",
1467
1496
  placeholder: n,
1468
1497
  width: a,
1469
- disabled: h,
1470
- inputRef: E,
1498
+ disabled: f,
1499
+ inputRef: T,
1471
1500
  size: 9,
1472
1501
  variant: N ? "error" : void 0
1473
1502
  }
@@ -1476,10 +1505,10 @@ function Hs({
1476
1505
  }
1477
1506
  );
1478
1507
  }
1479
- const $s = ({
1508
+ const Xs = ({
1480
1509
  calendarProps: t,
1481
1510
  closeOnCalendarSelectDate: e = !0,
1482
- dateFormat: n = st.fullDate,
1511
+ dateFormat: n = it.fullDate,
1483
1512
  disableCalender: r = !1,
1484
1513
  onValueChange: s,
1485
1514
  placeholder: i = "yyyy-mm-dd",
@@ -1487,71 +1516,71 @@ const $s = ({
1487
1516
  value: a,
1488
1517
  width: l = "130px",
1489
1518
  zIndex: d = 100,
1490
- calendarTheme: u = mt,
1491
- hideCalenderIcon: p = !1,
1492
- minDate: h,
1493
- maxDate: f = _t,
1519
+ calendarTheme: u = bt,
1520
+ hideCalenderIcon: m = !1,
1521
+ minDate: f,
1522
+ maxDate: h = Bt,
1494
1523
  variant: g,
1495
- ...M
1524
+ ...w
1496
1525
  }) => {
1497
- const [y, b] = T(!1), { tippyRef: w, onChangePanel: m } = We(), k = D(() => {
1526
+ const [y, b] = I(!1), { tippyRef: M, onChangePanel: p } = ve(), k = D(() => {
1498
1527
  b(!y);
1499
- }, [b, y]), E = D(() => {
1528
+ }, [b, y]), T = D(() => {
1500
1529
  b(!1);
1501
- }, [b]), A = D(
1502
- (U) => {
1503
- s && s(U);
1530
+ }, [b]), L = D(
1531
+ ($) => {
1532
+ s && s($);
1504
1533
  },
1505
1534
  [s]
1506
1535
  ), N = D(
1507
- (U) => {
1508
- U && (A(W(U, n)), e && setTimeout(() => b(!y), 200));
1536
+ ($) => {
1537
+ $ && (L(j($, n)), e && setTimeout(() => b(!y), 200));
1509
1538
  },
1510
- [A, n, e, b, y]
1511
- ), I = !!a && !/^[-/\\.0-9]+$/.test(a), Y = !!a && pn(ft(a, n, /* @__PURE__ */ new Date())), v = !!a && a.length >= n.length && !Y || I;
1512
- return /* @__PURE__ */ o(L, { width: l, children: /* @__PURE__ */ o(
1513
- At,
1539
+ [L, n, e, b, y]
1540
+ ), R = !!a && !/^[-/\\.0-9]+$/.test(a), Y = !!a && pn(mt(a, n, /* @__PURE__ */ new Date())), U = !!a && a.length >= n.length && !Y || R;
1541
+ return /* @__PURE__ */ o(A, { width: l, children: /* @__PURE__ */ o(
1542
+ Lt,
1514
1543
  {
1515
1544
  arrow: !1,
1516
1545
  lazy: !0,
1517
1546
  visible: y,
1518
1547
  zIndex: d,
1519
1548
  appendTo: c ?? "parent",
1520
- placement: Lt,
1521
- onClickOutside: E,
1522
- tippyRef: w,
1549
+ placement: Yt,
1550
+ onClickOutside: T,
1551
+ tippyRef: M,
1523
1552
  content: /* @__PURE__ */ o(
1524
1553
  Ue,
1525
1554
  {
1526
1555
  ...t,
1527
1556
  onChange: N,
1528
- onChangePanel: m,
1529
- value: a && Y ? ft(a, n, /* @__PURE__ */ new Date()) : void 0,
1530
- minDate: h,
1531
- maxDate: f,
1557
+ onChangePanel: p,
1558
+ value: a && Y ? mt(a, n, /* @__PURE__ */ new Date()) : void 0,
1559
+ minDate: f,
1560
+ maxDate: h,
1532
1561
  theme: u
1533
1562
  }
1534
1563
  ),
1535
1564
  children: /* @__PURE__ */ o(
1536
- ht,
1565
+ pt,
1537
1566
  {
1538
- ...M,
1539
- variant: v ? "error" : g,
1567
+ ...w,
1568
+ variant: U ? "error" : g,
1540
1569
  disableContentPaddingRight: !0,
1541
- contentRight: p ? void 0 : /* @__PURE__ */ o(B, { alignItems: "center", indent: 0.5, children: /* @__PURE__ */ o(
1542
- q,
1570
+ contentRight: m ? void 0 : /* @__PURE__ */ o(B, { alignItems: "center", indent: 0.5, children: /* @__PURE__ */ o(
1571
+ G,
1543
1572
  {
1544
1573
  size: "small",
1545
- disabled: M.disabled || r,
1546
- leftIcon: kt,
1574
+ disabled: w.disabled || r,
1575
+ leftIcon: It,
1547
1576
  onClick: k
1548
1577
  }
1549
1578
  ) }),
1550
- onValueChange: A,
1579
+ onValueChange: L,
1551
1580
  placeholder: i,
1552
1581
  value: a || "",
1553
- min: h,
1554
- max: f,
1582
+ min: f,
1583
+ max: h,
1555
1584
  size: 10
1556
1585
  }
1557
1586
  )
@@ -1573,7 +1602,7 @@ const $s = ({
1573
1602
  default:
1574
1603
  throw new Error("Invalid hour string");
1575
1604
  }
1576
- }, Wt = (t) => {
1605
+ }, vt = (t) => {
1577
1606
  if (t === "")
1578
1607
  return "00";
1579
1608
  const e = parseInt(t, 10);
@@ -1589,13 +1618,13 @@ const $s = ({
1589
1618
  default:
1590
1619
  throw new Error("Invalid minute string");
1591
1620
  }
1592
- }, Mr = (t) => {
1593
- if (!ie(t))
1621
+ }, Ir = (t) => {
1622
+ if (!oe(t))
1594
1623
  return { time: t, success: !1 };
1595
1624
  const e = t && t.split(/-|:|,|;|[/]|[.]| /);
1596
1625
  if (e && e.length === 2)
1597
1626
  try {
1598
- const n = Ut(e[0]), r = Wt(e[1]);
1627
+ const n = Ut(e[0]), r = vt(e[1]);
1599
1628
  return { time: `${n}:${r}`, success: !0 };
1600
1629
  } catch {
1601
1630
  return { time: t, success: !1 };
@@ -1624,7 +1653,7 @@ const $s = ({
1624
1653
  }
1625
1654
  }
1626
1655
  return { time: t, success: !1 };
1627
- }, ie = (t) => t ? /^[-:.,/; 0-9]+$/.test(t) : !0, Us = ({
1656
+ }, oe = (t) => t ? /^[-:.,/; 0-9]+$/.test(t) : !0, Zs = ({
1628
1657
  onValueChange: t,
1629
1658
  showPlaceholder: e = !0,
1630
1659
  useIcon: n = !0,
@@ -1633,33 +1662,33 @@ const $s = ({
1633
1662
  variant: i,
1634
1663
  ...c
1635
1664
  }) => {
1636
- const [a, l] = T(() => ie(r)), d = "hh:mm", u = D(() => {
1665
+ const [a, l] = I(() => oe(r)), d = "hh:mm", u = D(() => {
1637
1666
  if (r) {
1638
- const h = Mr(r);
1639
- l(h.success), h.success && t && t(h.time);
1667
+ const f = Ir(r);
1668
+ l(f.success), f.success && t && t(f.time);
1640
1669
  }
1641
- }, [r, t, l]), p = D(
1642
- (h) => {
1643
- const f = h.target.value, g = ie(f);
1644
- l(g && f.length <= d.length), t && t(f);
1670
+ }, [r, t, l]), m = D(
1671
+ (f) => {
1672
+ const h = f.target.value, g = oe(h);
1673
+ l(g && h.length <= d.length), t && t(h);
1645
1674
  },
1646
1675
  [t, l]
1647
1676
  );
1648
1677
  return /* @__PURE__ */ o(
1649
- ht,
1678
+ pt,
1650
1679
  {
1651
1680
  ...c,
1652
1681
  type: "time",
1653
1682
  variant: a ? i : "error",
1654
- iconLeft: n ? Ie : void 0,
1683
+ iconLeft: n ? xe : void 0,
1655
1684
  value: r,
1656
1685
  placeholder: e ? d : void 0,
1657
- onChange: p,
1686
+ onChange: m,
1658
1687
  onBlur: u,
1659
1688
  width: s
1660
1689
  }
1661
1690
  );
1662
- }, ve = ({
1691
+ }, Fe = ({
1663
1692
  autoFocusLeft: t,
1664
1693
  autoFocusRight: e,
1665
1694
  onEsc: n,
@@ -1671,82 +1700,82 @@ const $s = ({
1671
1700
  placeholderRight: l,
1672
1701
  typeLeft: d,
1673
1702
  typeRight: u,
1674
- onChangeLeft: p,
1675
- onChangeRight: h,
1676
- valueLeft: f,
1703
+ onChangeLeft: m,
1704
+ onChangeRight: f,
1705
+ valueLeft: h,
1677
1706
  valueRight: g,
1678
- minLeft: M,
1707
+ minLeft: w,
1679
1708
  maxLeft: y,
1680
1709
  minRight: b,
1681
- maxRight: w,
1682
- onClickLeft: m,
1710
+ maxRight: M,
1711
+ onClickLeft: p,
1683
1712
  onClickRight: k,
1684
- onClickCalendar: E,
1685
- onClickArrowDown: A,
1713
+ onClickCalendar: T,
1714
+ onClickArrowDown: L,
1686
1715
  onBlurLeft: N,
1687
- onBlurRight: I,
1716
+ onBlurRight: R,
1688
1717
  onFocusLeft: Y,
1689
1718
  onFocusRight: S,
1690
- inputRefLeft: v,
1691
- inputRefRight: U,
1692
- variant: K,
1693
- variantLeft: j,
1694
- variantRight: Z,
1695
- onBlur: F,
1696
- showPresets: Q,
1697
- widthLeft: tt,
1698
- widthRight: _,
1719
+ inputRefLeft: U,
1720
+ inputRefRight: $,
1721
+ variant: v,
1722
+ variantLeft: F,
1723
+ variantRight: K,
1724
+ onBlur: C,
1725
+ showPresets: V,
1726
+ widthLeft: Q,
1727
+ widthRight: tt,
1699
1728
  disabled: O
1700
1729
  }) => {
1701
- const H = $(0), z = R(
1702
- () => In((et) => {
1703
- et === 0 && (F == null || F());
1730
+ const _ = W(0), H = x(
1731
+ () => xn((nt) => {
1732
+ nt === 0 && (C == null || C());
1704
1733
  }, 10),
1705
- [F]
1706
- ), Pt = D(
1707
- (et) => {
1708
- H.current++, z(H.current), Y && Y(et);
1734
+ [C]
1735
+ ), et = D(
1736
+ (nt) => {
1737
+ _.current++, H(_.current), Y && Y(nt);
1709
1738
  },
1710
- [Y, H, z]
1711
- ), Yt = D(
1712
- (et) => {
1713
- H.current++, z(H.current), S && S(et);
1739
+ [Y, _, H]
1740
+ ), dt = D(
1741
+ (nt) => {
1742
+ _.current++, H(_.current), S && S(nt);
1714
1743
  },
1715
- [S, H, z]
1716
- ), Bt = D(
1717
- (et) => {
1718
- H.current--, z(H.current), N && N(et);
1744
+ [S, _, H]
1745
+ ), $t = D(
1746
+ (nt) => {
1747
+ _.current--, H(_.current), N && N(nt);
1719
1748
  },
1720
- [N, H, z]
1721
- ), Qe = D(
1722
- (et) => {
1723
- H.current--, z(H.current), I && I(et);
1749
+ [N, _, H]
1750
+ ), Ze = D(
1751
+ (nt) => {
1752
+ _.current--, H(_.current), R && R(nt);
1724
1753
  },
1725
- [I, H, z]
1754
+ [R, _, H]
1726
1755
  );
1727
- return /* @__PURE__ */ o(L, { children: /* @__PURE__ */ x(
1728
- En,
1756
+ return /* @__PURE__ */ o(A, { children: /* @__PURE__ */ E(
1757
+ _n,
1729
1758
  {
1730
1759
  disableContentPaddingRight: !0,
1731
1760
  disabled: O,
1732
- variant: K,
1733
- contentRight: /* @__PURE__ */ x(B, { alignItems: "center", children: [
1734
- /* @__PURE__ */ o(Mt, { num: 0.5, children: /* @__PURE__ */ o(
1735
- q,
1761
+ variant: v,
1762
+ contentRight: /* @__PURE__ */ E(B, { alignItems: "center", children: [
1763
+ /* @__PURE__ */ o(Tt, { num: 0.5, children: /* @__PURE__ */ o(
1764
+ G,
1736
1765
  {
1737
- leftIcon: kt,
1738
- onClick: E,
1766
+ leftIcon: It,
1767
+ onClick: T,
1739
1768
  disabled: O,
1740
1769
  size: "small"
1741
1770
  }
1742
1771
  ) }),
1743
- Q ? /* @__PURE__ */ x(Ht, { children: [
1744
- /* @__PURE__ */ o(B, { height: "22px", children: /* @__PURE__ */ o(Ze, { vertical: !0 }) }),
1745
- /* @__PURE__ */ o(Mt, { num: 0.5, children: /* @__PURE__ */ o(
1746
- q,
1772
+ V ? /* @__PURE__ */ E(Wt, { children: [
1773
+ /* @__PURE__ */ o(B, { height: "22px", children: /* @__PURE__ */ o(tn, { vertical: !0 }) }),
1774
+ /* @__PURE__ */ o(Tt, { num: 0.5, children: /* @__PURE__ */ o(
1775
+ G,
1747
1776
  {
1748
- leftIcon: ae,
1749
- onClick: A,
1777
+ leftIcon: de,
1778
+ onClick: L,
1750
1779
  disabled: O,
1751
1780
  size: "small"
1752
1781
  }
@@ -1754,38 +1783,38 @@ const $s = ({
1754
1783
  ] }) : null
1755
1784
  ] }),
1756
1785
  children: [
1757
- /* @__PURE__ */ o(L, { width: tt, children: /* @__PURE__ */ o(
1758
- ht,
1786
+ /* @__PURE__ */ o(A, { width: Q, children: /* @__PURE__ */ o(
1787
+ pt,
1759
1788
  {
1760
1789
  onEsc: n,
1761
1790
  onEnter: r,
1762
- onClick: m,
1791
+ onClick: p,
1763
1792
  disabled: O,
1764
1793
  hideBorder: !0,
1765
1794
  placeholder: a,
1766
- value: f,
1795
+ value: h,
1767
1796
  onValueChange: s,
1768
- onChange: p,
1769
- onBlur: Bt,
1770
- onFocus: Pt,
1771
- inputRef: v,
1772
- variant: j,
1797
+ onChange: m,
1798
+ onBlur: $t,
1799
+ onFocus: et,
1800
+ inputRef: U,
1801
+ variant: F,
1773
1802
  type: d,
1774
1803
  autoFocus: t,
1775
- min: M,
1804
+ min: w,
1776
1805
  max: y
1777
1806
  }
1778
1807
  ) }),
1779
1808
  /* @__PURE__ */ o(B, { indent: 0.5, alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ o(
1780
- Te,
1809
+ Re,
1781
1810
  {
1782
1811
  icon: c,
1783
1812
  size: 12,
1784
- color: Ct("--lhds-color-ui-500")
1813
+ color: Kt("--lhds-color-ui-500")
1785
1814
  }
1786
1815
  ) }),
1787
- /* @__PURE__ */ o(L, { width: _, children: /* @__PURE__ */ o(
1788
- ht,
1816
+ /* @__PURE__ */ o(A, { width: tt, children: /* @__PURE__ */ o(
1817
+ pt,
1789
1818
  {
1790
1819
  onEsc: n,
1791
1820
  onEnter: r,
@@ -1795,21 +1824,21 @@ const $s = ({
1795
1824
  placeholder: l,
1796
1825
  value: g,
1797
1826
  onValueChange: i,
1798
- onChange: h,
1799
- onBlur: Qe,
1800
- onFocus: Yt,
1801
- inputRef: U,
1802
- variant: Z,
1827
+ onChange: f,
1828
+ onBlur: Ze,
1829
+ onFocus: dt,
1830
+ inputRef: $,
1831
+ variant: K,
1803
1832
  type: u,
1804
1833
  autoFocus: e,
1805
1834
  min: b,
1806
- max: w
1835
+ max: M
1807
1836
  }
1808
1837
  ) })
1809
1838
  ]
1810
1839
  }
1811
1840
  ) });
1812
- }, kr = (t) => {
1841
+ }, Rr = (t) => {
1813
1842
  if (t == null)
1814
1843
  throw new Error("Time is not set.");
1815
1844
  if (t === "")
@@ -1831,38 +1860,38 @@ const $s = ({
1831
1860
  if (r < 0 || r > 59)
1832
1861
  throw new Error("Invalid time.");
1833
1862
  return n * 100 + r;
1834
- }, Sr = (t) => {
1863
+ }, xr = (t) => {
1835
1864
  try {
1836
- return kr(t), !0;
1865
+ return Rr(t), !0;
1837
1866
  } catch {
1838
1867
  return !1;
1839
1868
  }
1840
1869
  }, Ot = (t) => {
1841
- if (t && Sr(t)) {
1870
+ if (t && xr(t)) {
1842
1871
  const e = t.split(":");
1843
1872
  return {
1844
- hour: ge(e[0]),
1845
- minute: ge(e[1])
1873
+ hour: be(e[0]),
1874
+ minute: be(e[1])
1846
1875
  };
1847
1876
  }
1848
1877
  return {
1849
1878
  hour: void 0,
1850
1879
  minute: void 0
1851
1880
  };
1852
- }, Tr = (t) => `${Ut(String(t.getHours()))}:${Wt(
1881
+ }, Er = (t) => `${Ut(String(t.getHours()))}:${vt(
1853
1882
  String(t.getMinutes())
1854
- )}`, Ir = "_timePicker_1w05d_1", Rr = "_timePickerColumn_1w05d_6", ze = {
1855
- timePicker: Ir,
1856
- timePickerColumn: Rr
1857
- }, Er = ({
1883
+ )}`, _r = "_timePicker_1w05d_1", Nr = "_timePickerColumn_1w05d_6", Ce = {
1884
+ timePicker: _r,
1885
+ timePickerColumn: Nr
1886
+ }, Ar = ({
1858
1887
  onClick: t,
1859
1888
  item: e,
1860
1889
  selected: n,
1861
1890
  columnRef: r,
1862
1891
  canScrollRef: s
1863
1892
  }) => {
1864
- const i = $(null);
1865
- return X(
1893
+ const i = W(null);
1894
+ return Z(
1866
1895
  function() {
1867
1896
  if (n && r.current && i.current && s.current) {
1868
1897
  const a = i.current.scrollHeight * Math.max(e - 2, 0);
@@ -1879,13 +1908,13 @@ const $s = ({
1879
1908
  indent: 0.5,
1880
1909
  ref: i,
1881
1910
  children: n ? /* @__PURE__ */ o(
1882
- bt,
1911
+ Mt,
1883
1912
  {
1884
- label: Rn(String(e), 2, "0"),
1913
+ label: En(String(e), 2, "0"),
1885
1914
  onClick: () => t && t(e)
1886
1915
  }
1887
1916
  ) : /* @__PURE__ */ o(
1888
- q,
1917
+ G,
1889
1918
  {
1890
1919
  label: String(e).padStart(2, "0"),
1891
1920
  onClick: () => t && t(e)
@@ -1893,15 +1922,15 @@ const $s = ({
1893
1922
  )
1894
1923
  }
1895
1924
  );
1896
- }, Me = ({
1925
+ }, Se = ({
1897
1926
  onClick: t,
1898
1927
  items: e,
1899
1928
  selectedItem: n,
1900
1929
  canScrollRef: r
1901
1930
  }) => {
1902
- const s = $(null);
1903
- return /* @__PURE__ */ o(C, { className: ze.timePickerColumn, ref: s, children: e.map((i) => /* @__PURE__ */ o(
1904
- Er,
1931
+ const s = W(null);
1932
+ return /* @__PURE__ */ o(z, { className: Ce.timePickerColumn, ref: s, children: e.map((i) => /* @__PURE__ */ o(
1933
+ Ar,
1905
1934
  {
1906
1935
  item: i,
1907
1936
  onClick: t,
@@ -1911,12 +1940,12 @@ const $s = ({
1911
1940
  },
1912
1941
  i
1913
1942
  )) });
1914
- }, xr = ue(0, 24), Ar = ue(0, 60), Nr = ({
1943
+ }, Lr = he(0, 24), Pr = he(0, 60), Yr = ({
1915
1944
  value: t,
1916
1945
  onValueChange: e
1917
1946
  }) => {
1918
- const n = $(!0), [r, s] = T(void 0), [i, c] = T(void 0);
1919
- X(() => {
1947
+ const n = W(!0), [r, s] = I(void 0), [i, c] = I(void 0);
1948
+ Z(() => {
1920
1949
  if (t) {
1921
1950
  const { minute: d, hour: u } = Ot(t);
1922
1951
  s(u), c(d);
@@ -1925,46 +1954,46 @@ const $s = ({
1925
1954
  const a = D(
1926
1955
  (d) => {
1927
1956
  s(d), e == null || e(
1928
- `${Ut(String(d ?? 0))}:${Wt(String(i ?? 0))}`
1957
+ `${Ut(String(d ?? 0))}:${vt(String(i ?? 0))}`
1929
1958
  );
1930
1959
  },
1931
1960
  [i, e]
1932
1961
  ), l = D(
1933
1962
  (d) => {
1934
1963
  c(d), e == null || e(
1935
- `${Ut(String(r ?? 0))}:${Wt(String(d ?? 0))}`
1964
+ `${Ut(String(r ?? 0))}:${vt(String(d ?? 0))}`
1936
1965
  );
1937
1966
  },
1938
1967
  [r, e]
1939
1968
  );
1940
- return /* @__PURE__ */ x(B, { className: ze.timePicker, children: [
1969
+ return /* @__PURE__ */ E(B, { className: Ce.timePicker, children: [
1941
1970
  /* @__PURE__ */ o(
1942
- Me,
1971
+ Se,
1943
1972
  {
1944
- items: xr,
1973
+ items: Lr,
1945
1974
  onClick: a,
1946
1975
  selectedItem: r,
1947
1976
  canScrollRef: n
1948
1977
  }
1949
1978
  ),
1950
- /* @__PURE__ */ o(Mt, {}),
1979
+ /* @__PURE__ */ o(Tt, {}),
1951
1980
  /* @__PURE__ */ o(
1952
- Me,
1981
+ Se,
1953
1982
  {
1954
- items: Ar,
1983
+ items: Pr,
1955
1984
  onClick: l,
1956
1985
  selectedItem: i,
1957
1986
  canScrollRef: n
1958
1987
  }
1959
1988
  )
1960
1989
  ] });
1961
- }, Lr = (t, e, n) => {
1962
- X(
1990
+ }, Br = (t, e, n) => {
1991
+ Z(
1963
1992
  function() {
1964
1993
  t && e(t);
1965
1994
  },
1966
1995
  [t, e]
1967
- ), X(
1996
+ ), Z(
1968
1997
  function() {
1969
1998
  n.current && (t ? n.current.valueAsDate = new Date(
1970
1999
  Date.UTC(t.getFullYear(), t.getMonth(), t.getDate())
@@ -1972,7 +2001,7 @@ const $s = ({
1972
2001
  },
1973
2002
  [t, n]
1974
2003
  );
1975
- }, _r = (t, e, {
2004
+ }, $r = (t, e, {
1976
2005
  setDateInFocus: n,
1977
2006
  showCalendarInternal: r,
1978
2007
  hideCalendarInternal: s,
@@ -1982,45 +2011,45 @@ const $s = ({
1982
2011
  setLocalTime: l,
1983
2012
  localDate: d,
1984
2013
  setLocalDate: u
1985
- }, p) => {
1986
- const h = D(
1987
- (w) => {
1988
- if (!w)
2014
+ }, m) => {
2015
+ const f = D(
2016
+ (M) => {
2017
+ if (!M)
1989
2018
  return;
1990
- const m = new Date(w);
2019
+ const p = new Date(M);
1991
2020
  if (t)
1992
- m.setHours(t.getHours()), m.setMinutes(t.getMinutes()), e == null || e(m), u(void 0);
2021
+ p.setHours(t.getHours()), p.setMinutes(t.getMinutes()), e == null || e(p), u(void 0);
1993
2022
  else if (a) {
1994
- const { minute: k, hour: E } = Ot(a);
1995
- m.setHours(E ?? 0), m.setMinutes(k ?? 0), e == null || e(m), u(void 0);
2023
+ const { minute: k, hour: T } = Ot(a);
2024
+ p.setHours(T ?? 0), p.setMinutes(k ?? 0), e == null || e(p), u(void 0);
1996
2025
  } else
1997
- u(m);
1998
- n(m), p.current && (p.current.valueAsDate = new Date(
1999
- Date.UTC(m.getFullYear(), m.getMonth(), m.getDate())
2026
+ u(p);
2027
+ n(p), m.current && (m.current.valueAsDate = new Date(
2028
+ Date.UTC(p.getFullYear(), p.getMonth(), p.getDate())
2000
2029
  ));
2001
2030
  },
2002
- [t, p, a, e, n, u]
2003
- ), f = D(
2004
- (w) => {
2005
- if (w)
2031
+ [t, m, a, e, n, u]
2032
+ ), h = D(
2033
+ (M) => {
2034
+ if (M)
2006
2035
  if (t) {
2007
- const m = Ot(w), k = new Date(t);
2008
- k.setHours(m.hour || 0), k.setMinutes(m.minute || 0), e == null || e(k), l(void 0);
2036
+ const p = Ot(M), k = new Date(t);
2037
+ k.setHours(p.hour || 0), k.setMinutes(p.minute || 0), e == null || e(k), l(void 0);
2009
2038
  } else if (d) {
2010
- const m = Ot(w), k = new Date(d);
2011
- k.setHours(m.hour || 0), k.setMinutes(m.minute || 0), e == null || e(k), l(void 0);
2039
+ const p = Ot(M), k = new Date(d);
2040
+ k.setHours(p.hour || 0), k.setMinutes(p.minute || 0), e == null || e(k), l(void 0);
2012
2041
  } else
2013
- l(w);
2042
+ l(M);
2014
2043
  },
2015
2044
  [e, t, d, l]
2016
2045
  ), g = D(
2017
- (w) => {
2018
- w.target.value[0] !== "0" && h(w.target.valueAsDate);
2046
+ (M) => {
2047
+ M.target.value[0] !== "0" && f(M.target.valueAsDate);
2019
2048
  },
2020
- [h]
2021
- ), M = D(
2022
- (w) => f(w.target.value),
2023
2049
  [f]
2050
+ ), w = D(
2051
+ (M) => h(M.target.value),
2052
+ [h]
2024
2053
  ), y = D(() => {
2025
2054
  n(t || /* @__PURE__ */ new Date()), c("calendar"), r();
2026
2055
  }, [t, c, r, n]), b = D(() => {
@@ -2028,25 +2057,25 @@ const $s = ({
2028
2057
  }, [i, s]);
2029
2058
  return {
2030
2059
  inputLeftChangeHandler: g,
2031
- inputRightChangeHandler: M,
2060
+ inputRightChangeHandler: w,
2032
2061
  hideCalendar: b,
2033
2062
  showCalendar: y,
2034
- onChangeTime: f,
2035
- onChangeDate: h
2063
+ onChangeTime: h,
2064
+ onChangeDate: f
2036
2065
  };
2037
- }, Pr = (t) => {
2038
- const [e, n] = T(void 0), [r, s] = T(void 0), [i, c, a] = ne(!1), [l, d, u] = ne(!1), [p, h] = T(void 0), [f, g] = T(
2066
+ }, Hr = (t) => {
2067
+ const [e, n] = I(void 0), [r, s] = I(void 0), [i, c, a] = re(!1), [l, d, u] = re(!1), [m, f] = I(void 0), [h, g] = I(
2039
2068
  () => t ?? /* @__PURE__ */ new Date()
2040
- ), [M, y] = T("calendar");
2069
+ ), [w, y] = I("calendar");
2041
2070
  return {
2042
2071
  isCalendarVisible: i,
2043
2072
  showCalendarInternal: c,
2044
2073
  hideCalendarInternal: a,
2045
- firstFocusedInput: p,
2046
- setFirstFocusedInput: h,
2047
- dateInFocus: f,
2074
+ firstFocusedInput: m,
2075
+ setFirstFocusedInput: f,
2076
+ dateInFocus: h,
2048
2077
  setDateInFocus: g,
2049
- currentPanel: M,
2078
+ currentPanel: w,
2050
2079
  setCurrentPanel: y,
2051
2080
  isTimePickerVisible: l,
2052
2081
  showTimePicker: d,
@@ -2056,7 +2085,7 @@ const $s = ({
2056
2085
  localTime: r,
2057
2086
  setLocalTime: s
2058
2087
  };
2059
- }, Yr = (t, e, n, r, {
2088
+ }, Or = (t, e, n, r, {
2060
2089
  isCalendarVisible: s,
2061
2090
  setCurrentPanel: i,
2062
2091
  showTimePicker: c,
@@ -2071,9 +2100,9 @@ const $s = ({
2071
2100
  t(g.date), r(), c();
2072
2101
  },
2073
2102
  [t, r, c]
2074
- ), p = D(() => {
2103
+ ), m = D(() => {
2075
2104
  i("presets"), n();
2076
- }, [i, n]), h = D(() => {
2105
+ }, [i, n]), f = D(() => {
2077
2106
  var g;
2078
2107
  s ? r() : ((g = e.current) == null || g.focus(), i("calendar"), n());
2079
2108
  }, [
@@ -2082,7 +2111,7 @@ const $s = ({
2082
2111
  e,
2083
2112
  i,
2084
2113
  n
2085
- ]), f = D(
2114
+ ]), h = D(
2086
2115
  (g) => {
2087
2116
  g.key === "Escape" && r();
2088
2117
  },
@@ -2092,11 +2121,11 @@ const $s = ({
2092
2121
  onFocusLeft: l,
2093
2122
  onFocusRight: d,
2094
2123
  onClickDay: u,
2095
- onClickArrowButton: p,
2096
- onClickCalendarButton: h,
2097
- onKeyDownHandler: f
2124
+ onClickArrowButton: m,
2125
+ onClickCalendarButton: f,
2126
+ onKeyDownHandler: h
2098
2127
  };
2099
- }, Ws = ({
2128
+ }, Vs = ({
2100
2129
  value: t,
2101
2130
  onValueChange: e,
2102
2131
  onEnter: n,
@@ -2106,110 +2135,110 @@ const $s = ({
2106
2135
  minDate: c,
2107
2136
  widthLeft: a = 128,
2108
2137
  widthRight: l = 80,
2109
- maxDate: d = _t,
2138
+ maxDate: d = Bt,
2110
2139
  variant: u,
2111
- disabled: p
2140
+ disabled: m
2112
2141
  }) => {
2113
- const h = $(null), f = $(null), g = Pr(t), {
2114
- setCurrentPanel: M,
2142
+ const f = W(null), h = W(null), g = Hr(t), {
2143
+ setCurrentPanel: w,
2115
2144
  currentPanel: y,
2116
2145
  isCalendarVisible: b,
2117
- dateInFocus: w,
2118
- setDateInFocus: m,
2146
+ dateInFocus: M,
2147
+ setDateInFocus: p,
2119
2148
  isTimePickerVisible: k,
2120
- hideTimePicker: E,
2121
- localTime: A,
2149
+ hideTimePicker: T,
2150
+ localTime: L,
2122
2151
  localDate: N
2123
2152
  } = g, {
2124
- showCalendar: I,
2153
+ showCalendar: R,
2125
2154
  hideCalendar: Y,
2126
2155
  inputLeftChangeHandler: S,
2127
- inputRightChangeHandler: v,
2128
- onChangeTime: U,
2129
- onChangeDate: K
2130
- } = _r(t, e, g, h), {
2131
- onKeyDownHandler: j,
2132
- onFocusRight: Z,
2133
- onFocusLeft: F,
2134
- onClickDay: Q,
2135
- onClickCalendarButton: tt,
2136
- onClickArrowButton: _
2137
- } = Yr(
2138
- K,
2139
- h,
2140
- I,
2156
+ inputRightChangeHandler: U,
2157
+ onChangeTime: $,
2158
+ onChangeDate: v
2159
+ } = $r(t, e, g, f), {
2160
+ onKeyDownHandler: F,
2161
+ onFocusRight: K,
2162
+ onFocusLeft: C,
2163
+ onClickDay: V,
2164
+ onClickCalendarButton: Q,
2165
+ onClickArrowButton: tt
2166
+ } = Or(
2167
+ v,
2168
+ f,
2169
+ R,
2141
2170
  Y,
2142
2171
  g
2143
2172
  );
2144
- Lr(t, m, h);
2145
- const O = R(() => {
2146
- const Bt = t || N;
2147
- return Bt ? at(void 0, Bt, [
2173
+ Br(t, p, f);
2174
+ const O = x(() => {
2175
+ const $t = t || N;
2176
+ return $t ? lt(void 0, $t, [
2148
2177
  "singleSelected",
2149
2178
  "selected"
2150
2179
  ]) : {};
2151
- }, [N, t]), H = D(() => {
2152
- Y(), E();
2153
- }, [Y, E]), z = R(
2154
- () => t ? Tr(t) : A,
2155
- [t, A]
2156
- ), Pt = re(b, 300), Yt = re(k, 300);
2157
- return /* @__PURE__ */ o(L, { onKeyDown: j, children: /* @__PURE__ */ o(
2158
- At,
2180
+ }, [N, t]), _ = D(() => {
2181
+ Y(), T();
2182
+ }, [Y, T]), H = x(
2183
+ () => t ? Er(t) : L,
2184
+ [t, L]
2185
+ ), et = se(b, 300), dt = se(k, 300);
2186
+ return /* @__PURE__ */ o(A, { onKeyDown: F, children: /* @__PURE__ */ o(
2187
+ Lt,
2159
2188
  {
2160
2189
  arrow: !1,
2161
2190
  lazy: !0,
2162
- disabled: p,
2163
- placement: Lt,
2191
+ disabled: m,
2192
+ placement: Yt,
2164
2193
  visible: b || k,
2165
- onClickOutside: H,
2166
- content: (Pt || Yt) && /* @__PURE__ */ o(C, { children: Pt ? /* @__PURE__ */ o(
2167
- gt,
2194
+ onClickOutside: _,
2195
+ content: (et || dt) && /* @__PURE__ */ o(z, { children: et ? /* @__PURE__ */ o(
2196
+ wt,
2168
2197
  {
2169
2198
  statePerMonth: O,
2170
- onClickDay: Q,
2171
- dateInFocus: w,
2172
- setDateInFocus: m,
2199
+ onClickDay: V,
2200
+ dateInFocus: M,
2201
+ setDateInFocus: p,
2173
2202
  currentPanel: y,
2174
- setCurrentPanel: M,
2203
+ setCurrentPanel: w,
2175
2204
  minDate: c,
2176
2205
  maxDate: d
2177
2206
  }
2178
- ) : Yt ? /* @__PURE__ */ x(C, { children: [
2179
- /* @__PURE__ */ o(C, { overflow: "hidden", height: "250px", children: /* @__PURE__ */ o(
2180
- Nr,
2207
+ ) : dt ? /* @__PURE__ */ E(z, { children: [
2208
+ /* @__PURE__ */ o(z, { overflow: "hidden", height: "250px", children: /* @__PURE__ */ o(
2209
+ Yr,
2181
2210
  {
2182
- value: z ?? "",
2183
- onValueChange: U
2211
+ value: H ?? "",
2212
+ onValueChange: $
2184
2213
  }
2185
2214
  ) }),
2186
- /* @__PURE__ */ o(Dt, {}),
2187
- /* @__PURE__ */ o(B, { justifyContent: "flex-end", children: /* @__PURE__ */ o(bt, { label: "Done", onClick: E }) })
2215
+ /* @__PURE__ */ o(yt, {}),
2216
+ /* @__PURE__ */ o(B, { justifyContent: "flex-end", children: /* @__PURE__ */ o(Mt, { label: "Done", onClick: T }) })
2188
2217
  ] }) : null }),
2189
2218
  children: /* @__PURE__ */ o(
2190
- ve,
2219
+ Fe,
2191
2220
  {
2192
2221
  autoFocusLeft: i,
2193
2222
  onEsc: r,
2194
2223
  onEnter: n,
2195
2224
  onBlur: s,
2196
- disabled: p,
2197
- separatorIcon: Ie,
2225
+ disabled: m,
2226
+ separatorIcon: xe,
2198
2227
  typeLeft: "date",
2199
2228
  typeRight: "time",
2200
2229
  placeholderLeft: "yyyy-mm-dd",
2201
2230
  placeholderRight: "hh:mm",
2202
2231
  onChangeLeft: S,
2203
- onChangeRight: v,
2204
- onClickArrowDown: _,
2205
- onClickCalendar: tt,
2206
- onFocusLeft: F,
2207
- onFocusRight: Z,
2208
- onClickLeft: F,
2209
- onClickRight: Z,
2210
- inputRefLeft: h,
2211
- inputRefRight: f,
2212
- valueRight: z ?? "",
2232
+ onChangeRight: U,
2233
+ onClickArrowDown: tt,
2234
+ onClickCalendar: Q,
2235
+ onFocusLeft: C,
2236
+ onFocusRight: K,
2237
+ onClickLeft: C,
2238
+ onClickRight: K,
2239
+ inputRefLeft: f,
2240
+ inputRefRight: h,
2241
+ valueRight: H ?? "",
2213
2242
  widthLeft: a,
2214
2243
  widthRight: l,
2215
2244
  minLeft: c,
@@ -2219,34 +2248,34 @@ const $s = ({
2219
2248
  )
2220
2249
  }
2221
2250
  ) });
2222
- }, Br = ({
2251
+ }, Wr = ({
2223
2252
  value: t,
2224
2253
  onValueChange: e,
2225
2254
  year: n
2226
2255
  }) => {
2227
2256
  const r = String(n);
2228
- return /* @__PURE__ */ o(B, { justifyContent: "center", children: t === n ? /* @__PURE__ */ o(bt, { label: r, onClick: () => e == null ? void 0 : e(n) }) : /* @__PURE__ */ o(q, { label: r, onClick: () => e == null ? void 0 : e(n) }) });
2229
- }, vs = ({
2257
+ return /* @__PURE__ */ o(B, { justifyContent: "center", children: t === n ? /* @__PURE__ */ o(Mt, { label: r, onClick: () => e == null ? void 0 : e(n) }) : /* @__PURE__ */ o(G, { label: r, onClick: () => e == null ? void 0 : e(n) }) });
2258
+ }, ti = ({
2230
2259
  value: t,
2231
2260
  onValueChange: e,
2232
2261
  initialLastYear: n
2233
2262
  }) => {
2234
- const [r, s] = T(() => t ? t + 4 : n ?? (/* @__PURE__ */ new Date()).getFullYear() + 4), i = R(() => {
2263
+ const [r, s] = I(() => t ? t + 4 : n ?? (/* @__PURE__ */ new Date()).getFullYear() + 4), i = x(() => {
2235
2264
  const c = r - 11;
2236
- return _e(ue(c, r + 1), 3);
2265
+ return Ye(he(c, r + 1), 3);
2237
2266
  }, [r]);
2238
- return X(() => {
2239
- s((c) => Or(t, c));
2240
- }, [t]), /* @__PURE__ */ x(B, { children: [
2241
- /* @__PURE__ */ o(C, { justifyContent: "center", children: /* @__PURE__ */ o(
2242
- q,
2267
+ return Z(() => {
2268
+ s((c) => jr(t, c));
2269
+ }, [t]), /* @__PURE__ */ E(B, { children: [
2270
+ /* @__PURE__ */ o(z, { justifyContent: "center", children: /* @__PURE__ */ o(
2271
+ G,
2243
2272
  {
2244
- leftIcon: vt,
2273
+ leftIcon: Ft,
2245
2274
  onClick: () => s(r - 3)
2246
2275
  }
2247
2276
  ) }),
2248
- /* @__PURE__ */ o(C, { gap: 1, children: i.map((c) => /* @__PURE__ */ o(B, { gap: 1, children: c.map((a) => /* @__PURE__ */ o(
2249
- Br,
2277
+ /* @__PURE__ */ o(z, { gap: 1, children: i.map((c) => /* @__PURE__ */ o(B, { gap: 1, children: c.map((a) => /* @__PURE__ */ o(
2278
+ Wr,
2250
2279
  {
2251
2280
  year: a,
2252
2281
  onValueChange: e,
@@ -2254,15 +2283,15 @@ const $s = ({
2254
2283
  },
2255
2284
  a
2256
2285
  )) }, c[0])) }),
2257
- /* @__PURE__ */ o(C, { justifyContent: "center", children: /* @__PURE__ */ o(
2258
- q,
2286
+ /* @__PURE__ */ o(z, { justifyContent: "center", children: /* @__PURE__ */ o(
2287
+ G,
2259
2288
  {
2260
- leftIcon: Et,
2289
+ leftIcon: Nt,
2261
2290
  onClick: () => s(r + 3)
2262
2291
  }
2263
2292
  ) })
2264
2293
  ] });
2265
- }, Or = (t, e) => {
2294
+ }, jr = (t, e) => {
2266
2295
  if (t == null)
2267
2296
  return e;
2268
2297
  if (t > e) {
@@ -2275,18 +2304,18 @@ const $s = ({
2275
2304
  return e - i;
2276
2305
  }
2277
2306
  return e;
2278
- }, Hr = (t, e, n, r, s) => {
2279
- X(
2307
+ }, Ur = (t, e, n, r, s) => {
2308
+ Z(
2280
2309
  function() {
2281
2310
  t && n(t);
2282
2311
  },
2283
2312
  [t, n]
2284
- ), X(
2313
+ ), Z(
2285
2314
  function() {
2286
2315
  e && n(e);
2287
2316
  },
2288
2317
  [e, n]
2289
- ), X(
2318
+ ), Z(
2290
2319
  function() {
2291
2320
  r.current && (t ? r.current.valueAsDate = new Date(
2292
2321
  Date.UTC(
@@ -2297,7 +2326,7 @@ const $s = ({
2297
2326
  ) : r.current.valueAsDate = null);
2298
2327
  },
2299
2328
  [t, r]
2300
- ), X(
2329
+ ), Z(
2301
2330
  function() {
2302
2331
  s.current && (e ? s.current.valueAsDate = new Date(
2303
2332
  Date.UTC(
@@ -2309,7 +2338,7 @@ const $s = ({
2309
2338
  },
2310
2339
  [e, s]
2311
2340
  );
2312
- }, $r = (t, e, n, {
2341
+ }, vr = (t, e, n, {
2313
2342
  setDateInFocus: r,
2314
2343
  showCalendarInternal: s,
2315
2344
  hideCalendarInternal: i,
@@ -2317,18 +2346,18 @@ const $s = ({
2317
2346
  setCurrentPanel: a
2318
2347
  }) => {
2319
2348
  const l = D(
2320
- (h) => {
2321
- h.target.value[0] !== "0" && (n == null || n({
2322
- startDate: h.target.valueAsDate ?? void 0,
2349
+ (f) => {
2350
+ f.target.value[0] !== "0" && (n == null || n({
2351
+ startDate: f.target.valueAsDate ?? void 0,
2323
2352
  endDate: e
2324
2353
  }));
2325
2354
  },
2326
2355
  [n, e]
2327
2356
  ), d = D(
2328
- (h) => {
2329
- h.target.value[0] !== "0" && (n == null || n({
2357
+ (f) => {
2358
+ f.target.value[0] !== "0" && (n == null || n({
2330
2359
  startDate: t,
2331
- endDate: h.target.valueAsDate ?? void 0
2360
+ endDate: f.target.valueAsDate ?? void 0
2332
2361
  }));
2333
2362
  },
2334
2363
  [n, t]
@@ -2340,19 +2369,19 @@ const $s = ({
2340
2369
  a,
2341
2370
  s,
2342
2371
  r
2343
- ]), p = D(() => {
2372
+ ]), m = D(() => {
2344
2373
  c(void 0), i();
2345
2374
  }, [c, i]);
2346
2375
  return {
2347
2376
  inputLeftChangeHandler: l,
2348
2377
  inputRightChangeHandler: d,
2349
- hideCalendar: p,
2378
+ hideCalendar: m,
2350
2379
  setDateInFocus: r,
2351
2380
  setCurrentPanel: a,
2352
2381
  showCalendar: u
2353
2382
  };
2354
- }, Ur = (t, e) => {
2355
- const [n, r, s] = ne(!1), [i, c] = T(void 0), [a, l] = T("startDate"), [d, u] = T(() => (a === "startDate" ? t : a === "endDate" ? e : void 0) ?? /* @__PURE__ */ new Date()), [p, h] = T("calendar");
2383
+ }, Fr = (t, e) => {
2384
+ const [n, r, 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");
2356
2385
  return {
2357
2386
  isCalendarVisible: n,
2358
2387
  showCalendarInternal: r,
@@ -2363,18 +2392,18 @@ const $s = ({
2363
2392
  setFocusedInput: l,
2364
2393
  dateInFocus: d,
2365
2394
  setDateInFocus: u,
2366
- currentPanel: p,
2367
- setCurrentPanel: h
2395
+ currentPanel: m,
2396
+ setCurrentPanel: f
2368
2397
  };
2369
- }, Wr = (t, e, n, r, s, i, c, {
2398
+ }, Cr = (t, e, n, r, s, i, c, {
2370
2399
  firstFocusedInput: a,
2371
2400
  setFirstFocusedInput: l,
2372
2401
  isCalendarVisible: d,
2373
2402
  setFocusedInput: u,
2374
- focusedInput: p,
2375
- setCurrentPanel: h
2403
+ focusedInput: m,
2404
+ setCurrentPanel: f
2376
2405
  }) => {
2377
- const f = D(() => {
2406
+ const h = D(() => {
2378
2407
  a == null && l("startDate"), u("startDate"), d || i();
2379
2408
  }, [
2380
2409
  d,
@@ -2390,28 +2419,28 @@ const $s = ({
2390
2419
  i,
2391
2420
  l,
2392
2421
  a
2393
- ]), M = D(
2394
- (m) => {
2395
- var k, E, A, N;
2396
- p === "startDate" ? e != null && G(m.date, e) ? (n == null || n({
2397
- startDate: m.date,
2422
+ ]), w = D(
2423
+ (p) => {
2424
+ var k, T, L, N;
2425
+ m === "startDate" ? e != null && q(p.date, e) ? (n == null || n({
2426
+ startDate: p.date,
2398
2427
  endDate: void 0
2399
2428
  }), u("endDate"), (k = s.current) == null || k.focus()) : (n == null || n({
2400
- startDate: m.date,
2429
+ startDate: p.date,
2401
2430
  endDate: e
2402
- }), a === "startDate" ? (u("endDate"), (E = s.current) == null || E.focus()) : setTimeout(c, 50)) : p === "endDate" && (t ? G(t, m.date) ? (n == null || n({
2403
- startDate: m.date,
2431
+ }), a === "startDate" ? (u("endDate"), (T = s.current) == null || T.focus()) : setTimeout(c, 50)) : m === "endDate" && (t ? q(t, p.date) ? (n == null || n({
2432
+ startDate: p.date,
2404
2433
  endDate: void 0
2405
2434
  }), u("endDate"), (N = s.current) == null || N.focus()) : (n == null || n({
2406
2435
  startDate: t,
2407
- endDate: m.date
2436
+ endDate: p.date
2408
2437
  }), setTimeout(c, 50)) : (n == null || n({
2409
2438
  startDate: t,
2410
- endDate: m.date
2411
- }), u("startDate"), (A = r.current) == null || A.focus()));
2439
+ endDate: p.date
2440
+ }), u("startDate"), (L = r.current) == null || L.focus()));
2412
2441
  },
2413
2442
  [
2414
- p,
2443
+ m,
2415
2444
  n,
2416
2445
  e,
2417
2446
  a,
@@ -2422,34 +2451,34 @@ const $s = ({
2422
2451
  r
2423
2452
  ]
2424
2453
  ), y = D(() => {
2425
- h("presets"), i();
2426
- }, [h, i]), b = D(() => {
2427
- var m;
2428
- d ? c() : (u("startDate"), l("startDate"), (m = r.current) == null || m.focus(), h("calendar"), i());
2454
+ f("presets"), i();
2455
+ }, [f, i]), b = D(() => {
2456
+ var p;
2457
+ d ? c() : (u("startDate"), l("startDate"), (p = r.current) == null || p.focus(), f("calendar"), i());
2429
2458
  }, [
2430
2459
  d,
2431
2460
  c,
2432
2461
  u,
2433
2462
  l,
2434
2463
  r,
2435
- h,
2464
+ f,
2436
2465
  i
2437
- ]), w = D(
2438
- (m) => {
2439
- m.key === "Escape" && c();
2466
+ ]), M = D(
2467
+ (p) => {
2468
+ p.key === "Escape" && c();
2440
2469
  },
2441
2470
  [c]
2442
2471
  );
2443
2472
  return {
2444
- onFocusLeft: f,
2473
+ onFocusLeft: h,
2445
2474
  onFocusRight: g,
2446
- onClickDay: M,
2475
+ onClickDay: w,
2447
2476
  onClickArrowButton: y,
2448
2477
  onClickCalendarButton: b,
2449
- onKeyDownHandler: w
2478
+ onKeyDownHandler: M
2450
2479
  };
2451
2480
  };
2452
- function zs({
2481
+ function ei({
2453
2482
  value: t,
2454
2483
  onValueChange: e,
2455
2484
  autoFocus: n,
@@ -2457,107 +2486,107 @@ function zs({
2457
2486
  onEnter: s,
2458
2487
  onEsc: i,
2459
2488
  minDate: c,
2460
- maxDate: a = _t,
2489
+ maxDate: a = Bt,
2461
2490
  calendarProps: l,
2462
2491
  widthLeft: d = 128,
2463
2492
  widthRight: u = 128,
2464
- variant: p,
2465
- disabled: h
2493
+ variant: m,
2494
+ disabled: f
2466
2495
  }) {
2467
- const { startDate: f, endDate: g } = t || {}, M = $(null), y = $(null), b = Ur(f, g), {
2468
- dateInFocus: w,
2469
- setDateInFocus: m,
2496
+ const { startDate: h, endDate: g } = t || {}, w = W(null), y = W(null), b = Fr(h, g), {
2497
+ dateInFocus: M,
2498
+ setDateInFocus: p,
2470
2499
  isCalendarVisible: k,
2471
- currentPanel: E,
2472
- setCurrentPanel: A
2500
+ currentPanel: T,
2501
+ setCurrentPanel: L
2473
2502
  } = b, {
2474
2503
  showCalendar: N,
2475
- hideCalendar: I,
2504
+ hideCalendar: R,
2476
2505
  inputLeftChangeHandler: Y,
2477
2506
  inputRightChangeHandler: S
2478
- } = $r(f, g, e, b), {
2479
- onKeyDownHandler: v,
2480
- onFocusRight: U,
2481
- onFocusLeft: K,
2482
- onClickDay: j,
2483
- onClickCalendarButton: Z,
2484
- onClickArrowButton: F
2485
- } = Wr(
2486
- f,
2507
+ } = vr(h, g, e, b), {
2508
+ onKeyDownHandler: U,
2509
+ onFocusRight: $,
2510
+ onFocusLeft: v,
2511
+ onClickDay: F,
2512
+ onClickCalendarButton: K,
2513
+ onClickArrowButton: C
2514
+ } = Cr(
2515
+ h,
2487
2516
  g,
2488
2517
  e,
2489
- M,
2518
+ w,
2490
2519
  y,
2491
2520
  N,
2492
- I,
2521
+ R,
2493
2522
  b
2494
2523
  );
2495
- Hr(
2496
- f,
2524
+ Ur(
2525
+ h,
2497
2526
  g,
2498
- m,
2499
- M,
2527
+ p,
2528
+ w,
2500
2529
  y
2501
2530
  );
2502
- const Q = R(
2503
- () => f && g && G(f, g),
2504
- [f, g]
2505
- ), tt = R(
2506
- () => Ln(
2531
+ const V = x(
2532
+ () => h && g && q(h, g),
2533
+ [h, g]
2534
+ ), Q = x(
2535
+ () => Pn(
2507
2536
  l == null ? void 0 : l.statePerMonth,
2508
- f,
2537
+ h,
2509
2538
  g,
2510
- w
2539
+ M
2511
2540
  ),
2512
- [l == null ? void 0 : l.statePerMonth, f, g, w]
2513
- ), _ = re(k, 300);
2514
- return /* @__PURE__ */ o(L, { onKeyDown: v, children: /* @__PURE__ */ o(
2515
- At,
2541
+ [l == null ? void 0 : l.statePerMonth, h, g, M]
2542
+ ), tt = se(k, 300);
2543
+ return /* @__PURE__ */ o(A, { onKeyDown: U, children: /* @__PURE__ */ o(
2544
+ Lt,
2516
2545
  {
2517
2546
  arrow: !1,
2518
2547
  lazy: !0,
2519
- disabled: h,
2520
- placement: Lt,
2521
- onClickOutside: I,
2548
+ disabled: f,
2549
+ placement: Yt,
2550
+ onClickOutside: R,
2522
2551
  visible: k,
2523
- content: _ && /* @__PURE__ */ o(
2524
- gt,
2552
+ content: tt && /* @__PURE__ */ o(
2553
+ wt,
2525
2554
  {
2526
- onClickDay: j,
2527
- dateInFocus: w,
2528
- setDateInFocus: m,
2529
- currentPanel: E,
2530
- setCurrentPanel: A,
2555
+ onClickDay: F,
2556
+ dateInFocus: M,
2557
+ setDateInFocus: p,
2558
+ currentPanel: T,
2559
+ setCurrentPanel: L,
2531
2560
  minDate: c,
2532
2561
  maxDate: a,
2533
2562
  ...l,
2534
- statePerMonth: tt
2563
+ statePerMonth: Q
2535
2564
  }
2536
2565
  ),
2537
2566
  children: /* @__PURE__ */ o(
2538
- ve,
2567
+ Fe,
2539
2568
  {
2540
2569
  autoFocusLeft: n,
2541
2570
  onEsc: i,
2542
2571
  onEnter: s,
2543
2572
  onBlur: r,
2544
- disabled: h,
2545
- separatorIcon: Et,
2573
+ disabled: f,
2574
+ separatorIcon: Nt,
2546
2575
  typeLeft: "date",
2547
2576
  typeRight: "date",
2548
2577
  placeholderLeft: "Start date",
2549
2578
  placeholderRight: "End date",
2550
2579
  onChangeLeft: Y,
2551
2580
  onChangeRight: S,
2552
- onClickArrowDown: F,
2553
- onClickCalendar: Z,
2554
- onFocusLeft: K,
2555
- onFocusRight: U,
2556
- onClickLeft: K,
2557
- onClickRight: U,
2558
- inputRefLeft: M,
2581
+ onClickArrowDown: C,
2582
+ onClickCalendar: K,
2583
+ onFocusLeft: v,
2584
+ onFocusRight: $,
2585
+ onClickLeft: v,
2586
+ onClickRight: $,
2587
+ inputRefLeft: w,
2559
2588
  inputRefRight: y,
2560
- variant: Q ? "error" : p,
2589
+ variant: V ? "error" : m,
2561
2590
  widthLeft: d,
2562
2591
  widthRight: u,
2563
2592
  minLeft: c,
@@ -2569,7 +2598,7 @@ function zs({
2569
2598
  }
2570
2599
  ) });
2571
2600
  }
2572
- const oe = ({
2601
+ const ce = ({
2573
2602
  onChange: t,
2574
2603
  onValueChange: e,
2575
2604
  mask: n,
@@ -2579,10 +2608,11 @@ const oe = ({
2579
2608
  keepCharPositions: c,
2580
2609
  placeholderChar: a,
2581
2610
  showMask: l,
2582
- ...d
2611
+ calendarSize: d,
2612
+ ...u
2583
2613
  }) => {
2584
- const u = $(null), { onChange: p } = Nn(
2585
- u,
2614
+ const m = W(null), { onChange: f } = Ln(
2615
+ m,
2586
2616
  t,
2587
2617
  e,
2588
2618
  n,
@@ -2594,28 +2624,40 @@ const oe = ({
2594
2624
  l
2595
2625
  );
2596
2626
  return /* @__PURE__ */ o(
2597
- xn,
2627
+ Nn,
2598
2628
  {
2599
- ...d,
2600
- ref: u,
2601
- onChange: p,
2602
- width: "168px"
2629
+ ...u,
2630
+ ref: m,
2631
+ onChange: f,
2632
+ width: zr(d),
2633
+ size: d === "large" ? "large" : "medium"
2603
2634
  }
2604
2635
  );
2605
- }, vr = [/[1-2]/, /\d/, /\d/, /\d/], zr = [/[0-1]/, /\d/], Fr = [/[0-3]/, /\d/], Fe = (t) => Cr(t).flatMap(jr), jr = (t) => {
2636
+ }, zr = (t) => {
2637
+ switch (t) {
2638
+ case "small":
2639
+ return "140px";
2640
+ case "medium":
2641
+ return "168px";
2642
+ case "large":
2643
+ return "224px";
2644
+ default:
2645
+ return le(t, "168px");
2646
+ }
2647
+ }, Kr = [/[1-2]/, /\d/, /\d/, /\d/], Jr = [/[0-1]/, /\d/], qr = [/[0-3]/, /\d/], ze = (t) => Qr(t).flatMap(Gr), Gr = (t) => {
2606
2648
  switch (t) {
2607
2649
  case "yyyy":
2608
- return vr;
2650
+ return Kr;
2609
2651
  case "mm":
2610
2652
  case "MM":
2611
- return zr;
2653
+ return Jr;
2612
2654
  case "dd":
2613
2655
  case "DD":
2614
- return Fr;
2656
+ return qr;
2615
2657
  default:
2616
2658
  return [t];
2617
2659
  }
2618
- }, Cr = (t) => {
2660
+ }, Qr = (t) => {
2619
2661
  if (t.length === 0)
2620
2662
  return [];
2621
2663
  const e = [];
@@ -2623,33 +2665,33 @@ const oe = ({
2623
2665
  for (let r = 1; r < t.length; r++)
2624
2666
  t[r] !== t[r - 1] ? (e.push(n), n = t[r]) : n += t[r];
2625
2667
  return e.push(n), e;
2626
- }, wt = (t) => {
2668
+ }, kt = (t) => {
2627
2669
  const n = new Intl.DateTimeFormat(t, { dateStyle: "short" }).formatToParts(/* @__PURE__ */ new Date()), r = {
2628
2670
  year: "yyyy",
2629
2671
  month: "MM",
2630
2672
  day: "dd"
2631
2673
  };
2632
2674
  return n.map((s) => r[s.type] || s.value).join("");
2633
- }, je = {
2634
- "en-US": mn,
2635
- "en-GB": Ft,
2636
- "de-AT": gn,
2637
- "de-DE": De,
2638
- fr: Dn,
2639
- de: De,
2640
- es: bn,
2641
- sv: wn,
2642
- pl: yn,
2643
- da: Mn,
2644
- nl: kn,
2645
- nb: Sn
2646
- }, Gt = (t) => je[t], Ce = () => je.sv, ut = (t, e, n) => {
2675
+ }, Ke = {
2676
+ "en-US": Dn,
2677
+ "en-GB": zt,
2678
+ "de-AT": bn,
2679
+ "de-DE": we,
2680
+ fr: wn,
2681
+ de: we,
2682
+ es: yn,
2683
+ sv: Mn,
2684
+ pl: kn,
2685
+ da: Sn,
2686
+ nl: Tn,
2687
+ nb: In
2688
+ }, Gt = (t) => Ke[t], Je = () => Ke.sv, ht = (t, e, n) => {
2647
2689
  const r = Gt(e);
2648
2690
  if (r == null)
2649
2691
  return;
2650
- const s = ft(
2692
+ const s = mt(
2651
2693
  t,
2652
- wt(e),
2694
+ kt(e),
2653
2695
  n ?? /* @__PURE__ */ new Date(),
2654
2696
  {
2655
2697
  locale: r
@@ -2657,104 +2699,107 @@ const oe = ({
2657
2699
  );
2658
2700
  if (!isNaN(s.getTime()))
2659
2701
  return s;
2660
- }, yt = (t, e) => W(t, wt(e), {
2702
+ }, St = (t, e) => j(t, kt(e), {
2661
2703
  locale: Gt(e)
2662
- }), ce = (t, e) => {
2663
- const n = ut(t, e);
2704
+ }), ae = (t, e) => {
2705
+ const n = ht(t, e);
2664
2706
  if (n != null)
2665
- return yt(n, e);
2666
- }, Ke = ({
2707
+ return St(n, e);
2708
+ }, qe = ({
2667
2709
  value: t,
2668
2710
  onValueChange: e,
2669
2711
  localeCode: n,
2670
2712
  startDateLabel: r = "From",
2671
2713
  endDateLabel: s = "To",
2672
- onFocus: i
2714
+ onFocus: i,
2715
+ calendarSize: c
2673
2716
  }) => {
2674
- const { mask: c, placeholder: a } = R(() => {
2675
- const l = wt(n);
2717
+ const { mask: a, placeholder: l } = x(() => {
2718
+ const d = kt(n);
2676
2719
  return {
2677
- mask: Fe(l),
2678
- placeholder: l.toLowerCase()
2720
+ mask: ze(d),
2721
+ placeholder: d.toLowerCase()
2679
2722
  };
2680
2723
  }, [n]);
2681
- return /* @__PURE__ */ x(B, { children: [
2724
+ return /* @__PURE__ */ E(B, { children: [
2682
2725
  /* @__PURE__ */ o(
2683
- oe,
2726
+ ce,
2684
2727
  {
2685
- mask: c,
2728
+ mask: a,
2686
2729
  value: t == null ? void 0 : t.startDate,
2687
- onValueChange: (l) => {
2688
- e == null || e({ startDate: l });
2730
+ onValueChange: (d) => {
2731
+ e == null || e({ startDate: d });
2689
2732
  },
2690
- onBlur: (l) => {
2691
- const d = ce(
2692
- l.target.value,
2733
+ onBlur: (d) => {
2734
+ const u = ae(
2735
+ d.target.value,
2693
2736
  n
2694
2737
  );
2695
- d && d !== (t == null ? void 0 : t.startDate) && (e == null || e({ startDate: d }));
2738
+ u && u !== (t == null ? void 0 : t.startDate) && (e == null || e({ startDate: u }));
2696
2739
  },
2697
2740
  onFocus: i,
2698
2741
  label: r,
2699
2742
  borderRadiusVariant: "onlyLeft",
2700
- placeholder: a
2743
+ placeholder: l,
2744
+ calendarSize: c
2701
2745
  }
2702
2746
  ),
2703
2747
  /* @__PURE__ */ o(
2704
- oe,
2748
+ ce,
2705
2749
  {
2706
- mask: c,
2750
+ mask: a,
2707
2751
  value: t == null ? void 0 : t.endDate,
2708
- onValueChange: (l) => e == null ? void 0 : e({ endDate: l }),
2709
- onBlur: (l) => {
2710
- const d = ce(
2711
- l.target.value,
2752
+ onValueChange: (d) => e == null ? void 0 : e({ endDate: d }),
2753
+ onBlur: (d) => {
2754
+ const u = ae(
2755
+ d.target.value,
2712
2756
  n
2713
2757
  );
2714
- d && d !== (t == null ? void 0 : t.endDate) && (e == null || e({ endDate: d }));
2758
+ u && u !== (t == null ? void 0 : t.endDate) && (e == null || e({ endDate: u }));
2715
2759
  },
2716
2760
  onFocus: i,
2717
2761
  label: s,
2718
2762
  borderRadiusVariant: "onlyRight",
2719
- placeholder: a
2763
+ placeholder: l,
2764
+ calendarSize: c
2720
2765
  }
2721
2766
  )
2722
2767
  ] });
2723
- }, Je = (t, e, n, r) => {
2724
- const s = Gt(n) ?? Ce(), i = he(), c = me(), a = $(null), l = R(
2725
- () => wt(n),
2768
+ }, Ge = (t, e, n, r) => {
2769
+ const s = Gt(n) ?? Je(), i = ge(), c = De(), a = W(null), l = x(
2770
+ () => kt(n),
2726
2771
  [n]
2727
- ), d = R(
2772
+ ), d = x(
2728
2773
  () => {
2729
2774
  var S;
2730
- return ((S = t == null ? void 0 : t.startDate) == null ? void 0 : S.length) === l.length ? ut(t.startDate, n) : void 0;
2775
+ return ((S = t == null ? void 0 : t.startDate) == null ? void 0 : S.length) === l.length ? ht(t.startDate, n) : void 0;
2731
2776
  },
2732
2777
  [l.length, n, t == null ? void 0 : t.startDate]
2733
- ), u = R(
2778
+ ), u = x(
2734
2779
  () => {
2735
2780
  var S;
2736
- return ((S = t == null ? void 0 : t.endDate) == null ? void 0 : S.length) === l.length ? ut(t.endDate, n) : void 0;
2781
+ return ((S = t == null ? void 0 : t.endDate) == null ? void 0 : S.length) === l.length ? ht(t.endDate, n) : void 0;
2737
2782
  },
2738
2783
  [l.length, n, t == null ? void 0 : t.endDate]
2739
- ), [p, h] = T(
2784
+ ), [m, f] = I(
2740
2785
  r ?? d ?? /* @__PURE__ */ new Date()
2741
- ), f = D(
2786
+ ), h = D(
2742
2787
  (S) => {
2743
- rt(S, c) || G(S, c) ? h(S) : h(c);
2788
+ st(S, c) || q(S, c) ? f(S) : f(c);
2744
2789
  },
2745
2790
  [c]
2746
- ), g = R(
2747
- () => Kt(
2748
- p.getFullYear(),
2749
- p.getMonth(),
2791
+ ), g = x(
2792
+ () => Jt(
2793
+ m.getFullYear(),
2794
+ m.getMonth(),
2750
2795
  s
2751
2796
  ),
2752
- [s, p]
2753
- ), M = R(() => Tt(W(p, "MMMM yyyy", { locale: s })), [s, p]), y = R(() => rt(c, p), [c, p]), [b, w] = T(), [m, k] = T("calendar"), E = D(
2797
+ [s, m]
2798
+ ), w = x(() => xt(j(m, "MMMM yyyy", { locale: s })), [s, m]), y = x(() => st(c, m), [c, m]), [b, M] = I(), [p, k] = I("calendar"), T = D(
2754
2799
  (S) => {
2755
- var K, j;
2756
- const v = ((K = S == null ? void 0 : S.startDate) == null ? void 0 : K.length) === l.length ? ut(S.startDate, n) : void 0, U = ((j = S == null ? void 0 : S.endDate) == null ? void 0 : j.length) === l.length ? ut(S.endDate, n) : void 0;
2757
- v ? f(v) : U && f(U), e == null || e({
2800
+ var v, F;
2801
+ const U = ((v = S == null ? void 0 : S.startDate) == null ? void 0 : v.length) === l.length ? ht(S.startDate, n) : void 0, $ = ((F = S == null ? void 0 : S.endDate) == null ? void 0 : F.length) === l.length ? ht(S.endDate, n) : void 0;
2802
+ U ? h(U) : $ && h($), e == null || e({
2758
2803
  ...t,
2759
2804
  ...S
2760
2805
  });
@@ -2763,52 +2808,52 @@ const oe = ({
2763
2808
  l.length,
2764
2809
  n,
2765
2810
  e,
2766
- f,
2811
+ h,
2767
2812
  t
2768
2813
  ]
2769
- ), A = R(
2770
- () => rt(c, p) || nt(p, c),
2771
- [c, p]
2772
- ), N = R(
2773
- () => (d && u && (P(d, u) || nt(d, u))) ?? !1,
2814
+ ), L = x(
2815
+ () => st(c, m) || rt(m, c),
2816
+ [c, m]
2817
+ ), N = x(
2818
+ () => (d && u && (P(d, u) || rt(d, u))) ?? !1,
2774
2819
  [u, d]
2775
2820
  );
2776
2821
  return {
2777
2822
  isDateDisabled: D(
2778
- (S) => !P(S, c) && nt(S, c),
2823
+ (S) => !P(S, c) && rt(S, c),
2779
2824
  [c]
2780
2825
  ),
2781
2826
  onClickDate: (S) => {
2782
- S.getFullYear() === p.getFullYear() && S.getMonth() === p.getMonth() && (d && u == null ? nt(S, d) ? e == null || e({
2783
- startDate: yt(S, n),
2827
+ S.getFullYear() === m.getFullYear() && S.getMonth() === m.getMonth() && (d && u == null ? rt(S, d) ? e == null || e({
2828
+ startDate: St(S, n),
2784
2829
  endDate: void 0
2785
2830
  }) : e == null || e({
2786
2831
  startDate: t == null ? void 0 : t.startDate,
2787
- endDate: yt(S, n)
2832
+ endDate: St(S, n)
2788
2833
  }) : e == null || e({
2789
- startDate: yt(S, n),
2834
+ startDate: St(S, n),
2790
2835
  endDate: void 0
2791
2836
  }));
2792
2837
  },
2793
- onValueChangeByInputs: E,
2838
+ onValueChangeByInputs: T,
2794
2839
  isValidDateRange: N,
2795
- prevMonthDisabled: A,
2840
+ prevMonthDisabled: L,
2796
2841
  monthPickerButtonRef: a,
2797
2842
  calendarId: i,
2798
- monthPickerButtonLabel: M,
2799
- visiblePanel: m,
2843
+ monthPickerButtonLabel: w,
2844
+ visiblePanel: p,
2800
2845
  setVisiblePanel: k,
2801
- setVisibleMonth: h,
2846
+ setVisibleMonth: f,
2802
2847
  visibleMonthData: g,
2803
2848
  todayIsInVisibleMonth: y,
2804
2849
  hoverDate: b,
2805
- setHoverDate: w,
2850
+ setHoverDate: M,
2806
2851
  selectedStartDate: d,
2807
2852
  selectedEndDate: u,
2808
2853
  today: c,
2809
- visibleMonth: p
2854
+ visibleMonth: m
2810
2855
  };
2811
- }, qt = ({
2856
+ }, Qt = ({
2812
2857
  previousMonthButtonAriaLabel: t,
2813
2858
  nextMonthButtonAriaLabel: e,
2814
2859
  monthPickerButtonLabel: n,
@@ -2817,51 +2862,58 @@ const oe = ({
2817
2862
  monthPickerButtonRef: i,
2818
2863
  setVisibleMonth: c,
2819
2864
  visibleMonth: a,
2820
- prevMonthDisabled: l
2821
- }) => /* @__PURE__ */ x(B, { alignSelf: "center", justifyContent: "space-between", width: "100%", children: [
2865
+ prevMonthDisabled: l,
2866
+ calendarSize: d
2867
+ }) => /* @__PURE__ */ E(B, { alignSelf: "center", justifyContent: "space-between", width: "100%", children: [
2822
2868
  /* @__PURE__ */ o(
2823
- q,
2869
+ G,
2824
2870
  {
2825
2871
  "aria-live": "polite",
2826
2872
  label: n,
2827
- rightIcon: r === "calendar" ? ae : on,
2873
+ rightIcon: r === "calendar" ? de : an,
2828
2874
  onClick: () => s(
2829
2875
  r === "calendar" ? "month-picker" : "calendar"
2830
2876
  ),
2831
- ref: i
2877
+ ref: i,
2878
+ size: d === "large" ? "large" : "medium"
2832
2879
  }
2833
2880
  ),
2834
- /* @__PURE__ */ x(B, { alignItems: "center", gap: 2, children: [
2881
+ /* @__PURE__ */ E(B, { alignItems: "center", gap: 2, children: [
2835
2882
  /* @__PURE__ */ o(
2836
- ct,
2883
+ at,
2837
2884
  {
2838
- leftIcon: vt,
2839
- onClick: () => c(de(a, 1)),
2885
+ leftIcon: Ft,
2886
+ onClick: () => c(fe(a, 1)),
2840
2887
  disabled: l,
2841
- "aria-label": t
2888
+ "aria-label": t,
2889
+ size: d === "large" ? "large" : "medium"
2842
2890
  }
2843
2891
  ),
2844
2892
  /* @__PURE__ */ o(
2845
- ct,
2893
+ at,
2846
2894
  {
2847
- leftIcon: Et,
2848
- onClick: () => c(xt(a, 1)),
2849
- "aria-label": e
2895
+ leftIcon: Nt,
2896
+ onClick: () => c(At(a, 1)),
2897
+ "aria-label": e,
2898
+ size: d === "large" ? "large" : "medium"
2850
2899
  }
2851
2900
  )
2852
2901
  ] })
2853
- ] }), Kr = "_travelDateCell_1g60o_1", Jr = "_outline_1g60o_13", Gr = "_contentWrapper_1g60o_26", qr = "_disabled_1g60o_47", Qr = "_isToday_1g60o_50", Xr = "_isSelectionStart_1g60o_54", Zr = "_isSelectionEnd_1g60o_55", Vr = "_hover_1g60o_70", ts = "_startSelected_1g60o_73", es = "_endSelected_1g60o_73", V = {
2854
- travelDateCell: Kr,
2855
- outline: Jr,
2856
- contentWrapper: Gr,
2857
- disabled: qr,
2858
- isToday: Qr,
2859
- isSelectionStart: Xr,
2860
- isSelectionEnd: Zr,
2861
- hover: Vr,
2862
- startSelected: ts,
2863
- endSelected: es
2864
- }, it = Ct("--lhds-color-red-100"), ns = (t, e, n, r, s, i) => {
2902
+ ] }), Xr = "_travelDateCell_1njsn_1", Zr = "_small_1njsn_4", Vr = "_medium_1njsn_9", ts = "_large_1njsn_14", es = "_outline_1njsn_26", ns = "_contentWrapper_1njsn_39", rs = "_disabled_1njsn_60", ss = "_isToday_1njsn_63", is = "_isSelectionStart_1njsn_67", os = "_isSelectionEnd_1njsn_68", cs = "_hover_1njsn_83", as = "_startSelected_1njsn_86", ls = "_endSelected_1njsn_86", X = {
2903
+ travelDateCell: Xr,
2904
+ small: Zr,
2905
+ medium: Vr,
2906
+ large: ts,
2907
+ outline: es,
2908
+ contentWrapper: ns,
2909
+ disabled: rs,
2910
+ isToday: ss,
2911
+ isSelectionStart: is,
2912
+ isSelectionEnd: os,
2913
+ hover: cs,
2914
+ startSelected: as,
2915
+ endSelected: ls
2916
+ }, ot = Kt("--lhds-color-red-100"), ds = (t, e, n, r, s, i) => {
2865
2917
  if (!s)
2866
2918
  return {
2867
2919
  left: "transparent",
@@ -2877,56 +2929,56 @@ const oe = ({
2877
2929
  left: "transparent",
2878
2930
  right: "transparent"
2879
2931
  };
2880
- const c = e && n ? G(t, e) && nt(t, n) && !P(t, e) && !P(t, n) : !1, a = e && r ? G(t, e) && nt(t, r) && !P(t, e) && !P(t, r) : !1;
2932
+ const c = e && n ? q(t, e) && rt(t, n) && !P(t, e) && !P(t, n) : !1, a = e && r ? q(t, e) && rt(t, r) && !P(t, e) && !P(t, r) : !1;
2881
2933
  if (c)
2882
2934
  return {
2883
- left: it,
2884
- right: it
2935
+ left: ot,
2936
+ right: ot
2885
2937
  };
2886
2938
  if (e && n)
2887
2939
  return P(t, e) ? {
2888
2940
  left: "transparent",
2889
- right: it
2941
+ right: ot
2890
2942
  } : P(t, n) ? {
2891
- left: it,
2943
+ left: ot,
2892
2944
  right: "transparent"
2893
2945
  } : {
2894
2946
  left: "transparent",
2895
2947
  right: "transparent"
2896
2948
  };
2897
- if (e && r && G(r, e)) {
2949
+ if (e && r && q(r, e)) {
2898
2950
  if (P(t, e))
2899
2951
  return {
2900
2952
  left: "transparent",
2901
- right: it
2953
+ right: ot
2902
2954
  };
2903
2955
  if (P(t, r))
2904
2956
  return {
2905
- left: it,
2957
+ left: ot,
2906
2958
  right: "transparent"
2907
2959
  };
2908
2960
  }
2909
2961
  return a ? {
2910
- left: it,
2911
- right: it
2962
+ left: ot,
2963
+ right: ot
2912
2964
  } : {
2913
2965
  left: "transparent",
2914
2966
  right: "transparent"
2915
2967
  };
2916
- }, rs = (t, e) => {
2968
+ }, us = (t, e) => {
2917
2969
  switch (e) {
2918
2970
  case "PageUp":
2919
- return de(t, 1);
2971
+ return fe(t, 1);
2920
2972
  case "PageDown":
2921
- return xt(t, 1);
2973
+ return At(t, 1);
2922
2974
  case "Home":
2923
- return $t(t);
2975
+ return jt(t);
2924
2976
  case "End":
2925
- return J($t(t), 6);
2977
+ return J(jt(t), 6);
2926
2978
  case "ArrowLeft":
2927
- return lt(t, 1);
2979
+ return ut(t, 1);
2928
2980
  case "ArrowUp":
2929
- return lt(t, 7);
2981
+ return ut(t, 7);
2930
2982
  case "ArrowRight":
2931
2983
  return J(t, 1);
2932
2984
  case "ArrowDown":
@@ -2934,7 +2986,27 @@ const oe = ({
2934
2986
  default:
2935
2987
  return;
2936
2988
  }
2937
- }, Vt = (t, e) => W(Le(t, 12), st.fullDate) + e, ss = ({
2989
+ }, te = (t, e) => j(Pe(t, 12), it.fullDate) + e, fs = "_travelDateCellBackground_1xm0q_1", hs = "_small_1xm0q_2", ms = "_medium_1xm0q_7", gs = "_large_1xm0q_12", Ht = {
2990
+ travelDateCellBackground: fs,
2991
+ small: hs,
2992
+ medium: ms,
2993
+ large: gs
2994
+ }, ps = ({ calendarSize: t, bgColorLeft: e, bgColorRight: n }) => /* @__PURE__ */ E(B, { children: [
2995
+ /* @__PURE__ */ o(
2996
+ A,
2997
+ {
2998
+ className: gt(Ht.travelDateCellBackground, Ht[t]),
2999
+ background: e
3000
+ }
3001
+ ),
3002
+ /* @__PURE__ */ o(
3003
+ A,
3004
+ {
3005
+ className: gt(Ht.travelDateCellBackground, Ht[t]),
3006
+ background: n
3007
+ }
3008
+ )
3009
+ ] }), Ds = ({
2938
3010
  onClick: t,
2939
3011
  visibleMonth: e,
2940
3012
  onChangeVisibleMonth: n,
@@ -2946,76 +3018,81 @@ const oe = ({
2946
3018
  onEndHover: l,
2947
3019
  hoverDate: d,
2948
3020
  today: u,
2949
- todayIsInVisibleMonth: p,
2950
- calendarId: h,
2951
- isDateDisabled: f
3021
+ todayIsInVisibleMonth: m,
3022
+ calendarId: f,
3023
+ isDateDisabled: h,
3024
+ size: g
2952
3025
  }) => {
2953
- const g = D(
2954
- async (E) => {
2955
- var N;
2956
- const A = rs(r.date, E.key);
2957
- A && !f(A) && (a(A), rt(r.date, A) ? (N = document.getElementById(Vt(A, h))) == null || N.focus() : (n(A), setTimeout(() => {
2958
- var I;
2959
- (I = document.getElementById(Vt(A, h))) == null || I.focus();
2960
- }, 10))), (E.key === "Enter" || E.code === "Space") && t(r.date);
3026
+ const w = D(
3027
+ async (L) => {
3028
+ var R;
3029
+ const N = us(r.date, L.key);
3030
+ N && !h(N) && (a(N), st(r.date, N) ? (R = document.getElementById(te(N, f))) == null || R.focus() : (n(N), setTimeout(() => {
3031
+ var Y;
3032
+ (Y = document.getElementById(te(N, f))) == null || Y.focus();
3033
+ }, 10))), (L.key === "Enter" || L.code === "Space") && t(r.date);
2961
3034
  },
2962
3035
  [
2963
- h,
2964
- r.date,
2965
3036
  f,
3037
+ r.date,
3038
+ h,
2966
3039
  n,
2967
3040
  t,
2968
3041
  a
2969
3042
  ]
2970
- ), M = r.month === e.getMonth(), y = f(r.date), b = i ? P(i, r.date) : !1, w = c ? P(c, r.date) : !1, m = P(r.date, u), k = ns(
3043
+ ), y = r.month === e.getMonth(), b = h(r.date), M = i ? P(i, r.date) : !1, p = c ? P(c, r.date) : !1, k = P(r.date, u), T = ds(
2971
3044
  r.date,
2972
3045
  i,
2973
3046
  c,
2974
3047
  d,
2975
- M,
3048
+ y,
2976
3049
  s
2977
3050
  );
2978
- return /* @__PURE__ */ x(
3051
+ return /* @__PURE__ */ E(
2979
3052
  "td",
2980
3053
  {
2981
- className: V.travelDateCell,
2982
- onClick: y ? void 0 : () => t(r.date),
2983
- onMouseOver: y ? void 0 : () => M && a(r.date),
2984
- onMouseOut: y ? void 0 : () => M && l(r.date),
2985
- tabIndex: y ? void 0 : is(
3054
+ className: gt(X.travelDateCell, X[g]),
3055
+ onClick: b ? void 0 : () => t(r.date),
3056
+ onMouseOver: b ? void 0 : () => y && a(r.date),
3057
+ onMouseOut: b ? void 0 : () => y && l(r.date),
3058
+ tabIndex: b ? void 0 : bs(
2986
3059
  r,
2987
3060
  i,
2988
- m,
3061
+ k,
2989
3062
  e,
2990
- p
3063
+ m
2991
3064
  ),
2992
- id: y ? void 0 : Vt(r.date, h),
2993
- onKeyDown: y ? void 0 : g,
2994
- "aria-selected": b || w,
3065
+ id: b ? void 0 : te(r.date, f),
3066
+ onKeyDown: b ? void 0 : w,
3067
+ "aria-selected": M || p,
2995
3068
  children: [
2996
- /* @__PURE__ */ o("div", { className: V.outline }),
2997
- /* @__PURE__ */ x(B, { children: [
2998
- /* @__PURE__ */ o(L, { height: "48px", width: "24px", background: k.left }),
2999
- /* @__PURE__ */ o(L, { height: "48px", width: "24px", background: k.right })
3000
- ] }),
3001
- M && /* @__PURE__ */ o(
3069
+ /* @__PURE__ */ o("div", { className: X.outline }),
3070
+ /* @__PURE__ */ o(
3071
+ ps,
3072
+ {
3073
+ calendarSize: g,
3074
+ bgColorLeft: T.left,
3075
+ bgColorRight: T.right
3076
+ }
3077
+ ),
3078
+ y && /* @__PURE__ */ o(
3002
3079
  "div",
3003
3080
  {
3004
- className: jt(
3005
- V.contentWrapper,
3006
- m ? V.isToday : void 0,
3007
- i ? V.startSelected : void 0,
3008
- c ? V.endSelected : void 0,
3009
- d && P(d, r.date) ? V.hover : void 0,
3010
- b && V.isSelectionStart,
3011
- w && V.isSelectionEnd,
3012
- y && V.disabled
3081
+ className: gt(
3082
+ X.contentWrapper,
3083
+ k ? X.isToday : void 0,
3084
+ i ? X.startSelected : void 0,
3085
+ c ? X.endSelected : void 0,
3086
+ d && P(d, r.date) ? X.hover : void 0,
3087
+ M && X.isSelectionStart,
3088
+ p && X.isSelectionEnd,
3089
+ b && X.disabled
3013
3090
  ),
3014
3091
  children: /* @__PURE__ */ o(
3015
- pt,
3092
+ Dt,
3016
3093
  {
3017
3094
  variant: "bold",
3018
- color: y ? Ct("--lhds-color-ui-500") : void 0,
3095
+ color: b ? Kt("--lhds-color-ui-500") : void 0,
3019
3096
  children: r.dayOfMonth
3020
3097
  }
3021
3098
  )
@@ -3024,12 +3101,12 @@ const oe = ({
3024
3101
  ]
3025
3102
  }
3026
3103
  );
3027
- }, is = (t, e, n, r, s) => {
3028
- const i = e ? rt(e, r) : !1;
3104
+ }, bs = (t, e, n, r, s) => {
3105
+ const i = e ? st(e, r) : !1;
3029
3106
  return (e && i ? P(t.date, e) : n) || !i && !s && t.date.getDate() === 1 ? 0 : -1;
3030
- }, os = "_travelCalendar_18pjj_1", cs = {
3031
- travelCalendar: os
3032
- }, Qt = ({
3107
+ }, ws = "_travelCalendar_18pjj_1", ys = {
3108
+ travelCalendar: ws
3109
+ }, Xt = ({
3033
3110
  visibleMonthData: t,
3034
3111
  onClickDate: e,
3035
3112
  setHoverDate: n,
@@ -3041,35 +3118,37 @@ const oe = ({
3041
3118
  hoverDate: l,
3042
3119
  today: d,
3043
3120
  calendarId: u,
3044
- isDateDisabled: p,
3045
- todayIsInVisibleMonth: h
3046
- }) => /* @__PURE__ */ o("table", { className: cs.travelCalendar, children: /* @__PURE__ */ x("tbody", { children: [
3047
- /* @__PURE__ */ o("tr", { children: t.weeks[0].days.map((f) => /* @__PURE__ */ o("th", { abbr: f.fullName, children: /* @__PURE__ */ o(pt, { children: f.name }) }, f.name)) }),
3048
- t.weeks.map((f) => /* @__PURE__ */ o(fe.Fragment, { children: /* @__PURE__ */ o("tr", { children: f.days.map((g) => /* @__PURE__ */ o(
3049
- ss,
3121
+ isDateDisabled: m,
3122
+ todayIsInVisibleMonth: f,
3123
+ size: h = "medium"
3124
+ }) => /* @__PURE__ */ o("table", { className: ys.travelCalendar, children: /* @__PURE__ */ E("tbody", { children: [
3125
+ /* @__PURE__ */ o("tr", { children: t.weeks[0].days.map((g) => /* @__PURE__ */ o("th", { abbr: g.fullName, children: /* @__PURE__ */ o(Dt, { children: g.name }) }, g.name)) }),
3126
+ t.weeks.map((g) => /* @__PURE__ */ o(me.Fragment, { children: /* @__PURE__ */ o("tr", { children: g.days.map((w) => /* @__PURE__ */ o(
3127
+ Ds,
3050
3128
  {
3051
- onClick: (M) => e(M),
3129
+ size: h,
3130
+ onClick: (y) => e(y),
3052
3131
  visibleMonth: s,
3053
3132
  onChangeVisibleMonth: r,
3054
3133
  isValidDateRange: i,
3055
- day: g,
3056
- onStartHover: (M) => n(M),
3057
- onEndHover: (M) => n((y) => y && P(y, M) ? void 0 : y),
3134
+ day: w,
3135
+ onStartHover: (y) => n(y),
3136
+ onEndHover: (y) => n((b) => b && P(b, y) ? void 0 : b),
3058
3137
  selectedStartDate: c,
3059
3138
  selectedEndDate: a,
3060
3139
  hoverDate: l,
3061
3140
  today: d,
3062
- todayIsInVisibleMonth: h,
3141
+ todayIsInVisibleMonth: f,
3063
3142
  calendarId: u,
3064
- isDateDisabled: p
3143
+ isDateDisabled: m
3065
3144
  },
3066
- g.dateString
3067
- )) }, f.weekNumber) }, f.weekNumber))
3068
- ] }) }), as = "_travelDateRangeInput_1j7rp_1", ls = "_overlay_1j7rp_2", ds = "_calendarVisible_1j7rp_6", te = {
3069
- travelDateRangeInput: as,
3070
- overlay: ls,
3071
- calendarVisible: ds
3072
- }, Fs = ({
3145
+ w.dateString
3146
+ )) }, g.weekNumber) }, g.weekNumber))
3147
+ ] }) }), Ms = "_travelDateRangeInput_1j7rp_1", ks = "_overlay_1j7rp_2", Ss = "_calendarVisible_1j7rp_6", ee = {
3148
+ travelDateRangeInput: Ms,
3149
+ overlay: ks,
3150
+ calendarVisible: Ss
3151
+ }, ni = ({
3073
3152
  value: t,
3074
3153
  onValueChange: e,
3075
3154
  startDateLabel: n,
@@ -3081,120 +3160,124 @@ const oe = ({
3081
3160
  heading: l,
3082
3161
  headingLevel: d,
3083
3162
  numMonthsInMonthPicker: u = 12,
3084
- firstMonthInMonthPicker: p = /* @__PURE__ */ new Date(),
3085
- zIndex: h = 1e3,
3086
- zIndexWhenClosed: f,
3163
+ firstMonthInMonthPicker: m = /* @__PURE__ */ new Date(),
3164
+ zIndex: f = 1e3,
3165
+ zIndexWhenClosed: h,
3087
3166
  onHideCalendar: g,
3088
- renderBelowCalendar: M
3167
+ renderBelowCalendar: w,
3168
+ size: y = "medium"
3089
3169
  }) => {
3090
- const [y, b] = T(!1), [w, m] = T(!1), [k, E] = T({
3170
+ const [b, M] = I(!1), [p, k] = I(!1), [T, L] = I({
3091
3171
  // Sane defaults, this will be updated with actual data from DOM.
3092
3172
  width: 336,
3093
3173
  height: 66
3094
- }), A = $(!1), N = D(() => {
3095
- A.current = !0, m(!0), setTimeout(() => {
3096
- b(!0);
3174
+ }), N = y === "large" ? "8.8rem" : "6.6rem", R = W(!1), Y = D(() => {
3175
+ R.current = !0, k(!0), setTimeout(() => {
3176
+ M(!0);
3097
3177
  }, 10);
3098
- }, []), I = D(() => {
3099
- w && (b(!1), A.current = !1, g == null || g(), setTimeout(() => {
3100
- A.current || m(!1);
3178
+ }, []), S = D(() => {
3179
+ p && (M(!1), R.current = !1, g == null || g(), setTimeout(() => {
3180
+ R.current || k(!1);
3101
3181
  }, 120));
3102
- }, [w, g]), Y = $(null), S = $(null);
3103
- Se(Y, I), Pe(() => {
3104
- var H, z;
3105
- const _ = (H = S.current) == null ? void 0 : H.offsetWidth, O = (z = S.current) == null ? void 0 : z.offsetHeight;
3106
- _ != null && O != null && (k.height !== O || k.width !== _) && E({ width: _, height: O });
3107
- }, [k.height, k.width]);
3108
- const v = Je(
3182
+ }, [p, g]), U = W(null), $ = W(null);
3183
+ Ie(U, S), Be(() => {
3184
+ var et, dt;
3185
+ const _ = (et = $.current) == null ? void 0 : et.offsetWidth, H = (dt = $.current) == null ? void 0 : dt.offsetHeight;
3186
+ _ != null && H != null && (T.height !== H || T.width !== _) && L({ width: _, height: H });
3187
+ }, [T.height, T.width]);
3188
+ const v = Ge(
3109
3189
  t,
3110
3190
  e,
3111
3191
  s,
3112
3192
  i
3113
3193
  ), {
3114
- visiblePanel: U,
3194
+ visiblePanel: F,
3115
3195
  visibleMonth: K,
3116
- onValueChangeByInputs: j,
3117
- setVisibleMonth: Z,
3118
- setVisiblePanel: F,
3119
- monthPickerButtonRef: Q
3120
- } = v, tt = D(
3196
+ onValueChangeByInputs: C,
3197
+ setVisibleMonth: V,
3198
+ setVisiblePanel: Q,
3199
+ monthPickerButtonRef: tt
3200
+ } = v, O = D(
3121
3201
  (_) => {
3122
- _.key === "Escape" && I();
3202
+ _.key === "Escape" && S();
3123
3203
  },
3124
- [I]
3204
+ [S]
3125
3205
  );
3126
- return /* @__PURE__ */ x(
3127
- L,
3206
+ return /* @__PURE__ */ E(
3207
+ A,
3128
3208
  {
3129
3209
  position: "relative",
3130
- className: te.travelDateRangeInput,
3131
- ref: Y,
3132
- onKeyDown: tt,
3133
- height: k.height,
3134
- width: k.width,
3210
+ className: ee.travelDateRangeInput,
3211
+ ref: U,
3212
+ onKeyDown: O,
3213
+ height: T.height,
3214
+ width: T.width,
3135
3215
  children: [
3136
3216
  /* @__PURE__ */ o(
3137
- L,
3217
+ A,
3138
3218
  {
3139
3219
  position: "absolute",
3140
- ref: S,
3141
- zIndex: w ? h : f,
3220
+ ref: $,
3221
+ zIndex: p ? f : h,
3142
3222
  children: /* @__PURE__ */ o(
3143
- Ke,
3223
+ qe,
3144
3224
  {
3145
3225
  value: t,
3146
- onValueChange: j,
3226
+ onValueChange: C,
3147
3227
  localeCode: s,
3148
3228
  startDateLabel: n,
3149
3229
  endDateLabel: r,
3150
- onFocus: N
3230
+ onFocus: Y,
3231
+ calendarSize: y
3151
3232
  }
3152
3233
  )
3153
3234
  }
3154
3235
  ),
3155
- w && /* @__PURE__ */ o(
3156
- L,
3236
+ p && /* @__PURE__ */ o(
3237
+ A,
3157
3238
  {
3158
3239
  position: "absolute",
3159
- zIndex: h - 1,
3240
+ zIndex: f - 1,
3160
3241
  left: "-2.4rem",
3161
3242
  top: l ? "-8.0rem" : "-2.4rem",
3162
- className: jt(te.overlay, y && te.calendarVisible),
3243
+ className: gt(ee.overlay, b && ee.calendarVisible),
3163
3244
  children: /* @__PURE__ */ o(
3164
- L,
3245
+ A,
3165
3246
  {
3166
3247
  background: "white",
3167
3248
  shadow: "popover",
3168
3249
  borderRadius: "var(--swui-border-radius-large)",
3169
- children: /* @__PURE__ */ x(Re, { gap: 3, children: [
3170
- l && /* @__PURE__ */ o(Rt, { variant: "h2", as: d, children: l }),
3171
- /* @__PURE__ */ o(L, { height: "6.8rem" }),
3250
+ children: /* @__PURE__ */ E(Ee, { gap: 3, children: [
3251
+ l && /* @__PURE__ */ o(_t, { variant: "h2", as: d, children: l }),
3252
+ /* @__PURE__ */ o(A, { height: N }),
3172
3253
  /* @__PURE__ */ o(
3173
- qt,
3254
+ Qt,
3174
3255
  {
3175
3256
  ...v,
3176
3257
  previousMonthButtonAriaLabel: c,
3177
- nextMonthButtonAriaLabel: a
3258
+ nextMonthButtonAriaLabel: a,
3259
+ calendarSize: y
3178
3260
  }
3179
3261
  ),
3180
- U === "calendar" && /* @__PURE__ */ o(Qt, { ...v }),
3181
- U === "month-picker" && /* @__PURE__ */ o(
3182
- Nt,
3262
+ F === "calendar" && /* @__PURE__ */ o(Xt, { ...v, size: y }),
3263
+ F === "month-picker" && /* @__PURE__ */ o(
3264
+ Pt,
3183
3265
  {
3184
- firstMonth: p,
3266
+ firstMonth: m,
3185
3267
  numMonths: u,
3186
3268
  value: K,
3269
+ size: y,
3187
3270
  onValueChange: (_) => {
3188
- var O;
3189
- Z(_), F("calendar"), (O = Q.current) == null || O.focus();
3271
+ var H;
3272
+ V(_), Q("calendar"), (H = tt.current) == null || H.focus();
3190
3273
  },
3191
3274
  onCancel: () => {
3192
3275
  var _;
3193
- F("calendar"), (_ = Q.current) == null || _.focus();
3276
+ Q("calendar"), (_ = tt.current) == null || _.focus();
3194
3277
  }
3195
3278
  }
3196
3279
  ),
3197
- M == null ? void 0 : M({ hideCalendar: I })
3280
+ w == null ? void 0 : w({ hideCalendar: S })
3198
3281
  ] })
3199
3282
  }
3200
3283
  )
@@ -3203,89 +3286,97 @@ const oe = ({
3203
3286
  ]
3204
3287
  }
3205
3288
  );
3206
- }, us = "_travelDateInput_hmfbf_1", fs = "_overlay_hmfbf_2", hs = "_calendarVisible_hmfbf_6", ee = {
3207
- travelDateInput: us,
3208
- overlay: fs,
3209
- calendarVisible: hs
3210
- }, Ge = ({ value: t, onValueChange: e, label: n = "Date", localeCode: r, onFocus: s }) => {
3211
- const { mask: i, placeholder: c } = R(() => {
3212
- const a = wt(r);
3289
+ }, Ts = "_travelDateInput_hmfbf_1", Is = "_overlay_hmfbf_2", Rs = "_calendarVisible_hmfbf_6", ne = {
3290
+ travelDateInput: Ts,
3291
+ overlay: Is,
3292
+ calendarVisible: Rs
3293
+ }, Qe = ({
3294
+ value: t,
3295
+ onValueChange: e,
3296
+ label: n = "Date",
3297
+ localeCode: r,
3298
+ onFocus: s,
3299
+ calendarSize: i
3300
+ }) => {
3301
+ const { mask: c, placeholder: a } = x(() => {
3302
+ const l = kt(r);
3213
3303
  return {
3214
- mask: Fe(a),
3215
- placeholder: a.toLowerCase()
3304
+ mask: ze(l),
3305
+ placeholder: l.toLowerCase()
3216
3306
  };
3217
3307
  }, [r]);
3218
3308
  return /* @__PURE__ */ o(B, { children: /* @__PURE__ */ o(
3219
- oe,
3309
+ ce,
3220
3310
  {
3221
- mask: i,
3311
+ mask: c,
3222
3312
  value: t,
3223
3313
  onValueChange: e,
3224
- onBlur: (a) => {
3225
- const l = ce(a.target.value, r);
3226
- l && l !== t && (e == null || e(l));
3314
+ onBlur: (l) => {
3315
+ const d = ae(l.target.value, r);
3316
+ d && d !== t && (e == null || e(d));
3227
3317
  },
3228
3318
  onFocus: s,
3229
3319
  label: n,
3230
- placeholder: c
3320
+ placeholder: a,
3321
+ calendarSize: i
3231
3322
  }
3232
3323
  ) });
3233
- }, qe = (t, e, n, r) => {
3234
- const s = Gt(n) ?? Ce(), i = he(), c = me(), a = $(null), l = R(
3235
- () => wt(n),
3324
+ }, Xe = (t, e, n, r) => {
3325
+ const s = Gt(n) ?? Je(), i = ge(), c = De(), a = W(null), l = x(
3326
+ () => kt(n),
3236
3327
  [n]
3237
- ), d = R(
3238
- () => (t == null ? void 0 : t.length) === l.length ? ut(t, n) : void 0,
3328
+ ), d = x(
3329
+ () => (t == null ? void 0 : t.length) === l.length ? ht(t, n) : void 0,
3239
3330
  [l.length, n, t]
3240
- ), [u, p] = T(
3331
+ ), [u, m] = I(
3241
3332
  r ?? d ?? /* @__PURE__ */ new Date()
3242
- ), h = D(
3243
- (I) => {
3244
- rt(I, c) || G(I, c) ? p(I) : p(c);
3333
+ ), f = D(
3334
+ (R) => {
3335
+ st(R, c) || q(R, c) ? m(R) : m(c);
3245
3336
  },
3246
3337
  [c]
3247
- ), f = R(
3248
- () => Kt(
3338
+ ), h = x(
3339
+ () => Jt(
3249
3340
  u.getFullYear(),
3250
3341
  u.getMonth(),
3251
3342
  s
3252
3343
  ),
3253
3344
  [s, u]
3254
- ), g = R(() => Tt(W(u, "MMMM yyyy", { locale: s })), [s, u]), M = R(() => rt(c, u), [c, u]), [y, b] = T(), [w, m] = T("calendar"), k = D(
3255
- (I) => {
3256
- const Y = (I == null ? void 0 : I.length) === l.length ? ut(I, n) : void 0;
3257
- Y && h(Y), e == null || e(I);
3345
+ ), g = x(() => xt(j(u, "MMMM yyyy", { locale: s })), [s, u]), w = x(() => st(c, u), [c, u]), [y, b] = I(), [M, p] = I("calendar"), k = D(
3346
+ (R) => {
3347
+ const Y = (R == null ? void 0 : R.length) === l.length ? ht(R, n) : void 0;
3348
+ Y && f(Y), e == null || e(R);
3258
3349
  },
3259
- [l.length, n, e, h]
3260
- ), E = R(
3261
- () => rt(c, u) || nt(u, c),
3350
+ [l.length, n, e, f]
3351
+ ), T = x(
3352
+ () => st(c, u) || rt(u, c),
3262
3353
  [c, u]
3263
3354
  );
3264
3355
  return {
3265
3356
  isDateDisabled: D(
3266
- (I) => !P(I, c) && nt(I, c),
3357
+ (R) => !P(R, c) && rt(R, c),
3267
3358
  [c]
3268
3359
  ),
3269
- onClickDate: (I) => {
3270
- e == null || e(yt(I, n));
3360
+ onClickDate: (R) => {
3361
+ e == null || e(St(R, n));
3271
3362
  },
3272
3363
  onValueChangeByInputs: k,
3273
- prevMonthDisabled: E,
3364
+ prevMonthDisabled: T,
3274
3365
  monthPickerButtonRef: a,
3275
3366
  calendarId: i,
3276
3367
  monthPickerButtonLabel: g,
3277
- visiblePanel: w,
3278
- setVisiblePanel: m,
3279
- setVisibleMonth: p,
3280
- visibleMonthData: f,
3281
- todayIsInVisibleMonth: M,
3368
+ visiblePanel: M,
3369
+ setVisiblePanel: p,
3370
+ setVisibleMonth: m,
3371
+ visibleMonthData: h,
3372
+ todayIsInVisibleMonth: w,
3282
3373
  hoverDate: y,
3283
3374
  setHoverDate: b,
3284
3375
  selectedDate: d,
3285
3376
  today: c,
3286
3377
  visibleMonth: u
3287
3378
  };
3288
- }, js = ({
3379
+ }, ri = ({
3289
3380
  value: t,
3290
3381
  onValueChange: e,
3291
3382
  label: n,
@@ -3297,127 +3388,132 @@ const oe = ({
3297
3388
  headingLevel: l,
3298
3389
  numMonthsInMonthPicker: d = 12,
3299
3390
  firstMonthInMonthPicker: u = /* @__PURE__ */ new Date(),
3300
- zIndex: p = 1e3,
3301
- zIndexWhenClosed: h,
3302
- onHideCalendar: f,
3303
- renderBelowCalendar: g
3391
+ zIndex: m = 1e3,
3392
+ zIndexWhenClosed: f,
3393
+ onHideCalendar: h,
3394
+ renderBelowCalendar: g,
3395
+ size: w = "medium"
3304
3396
  }) => {
3305
- const [M, y] = T(!1), [b, w] = T(!1), [m, k] = T({
3397
+ const [y, b] = I(!1), [M, p] = I(!1), [k, T] = I({
3306
3398
  // Sane defaults, this will be updated with actual data from DOM.
3307
3399
  width: 336,
3308
3400
  height: 66
3309
- }), E = $(!1), A = D(() => {
3310
- E.current = !0, w(!0), setTimeout(() => {
3311
- y(!0);
3401
+ }), L = W(!1), N = D(() => {
3402
+ L.current = !0, p(!0), setTimeout(() => {
3403
+ b(!0);
3312
3404
  }, 10);
3313
- }, []), N = D(() => {
3314
- b && (y(!1), E.current = !1, f == null || f(), setTimeout(() => {
3315
- E.current || w(!1);
3405
+ }, []), R = D(() => {
3406
+ M && (b(!1), L.current = !1, h == null || h(), setTimeout(() => {
3407
+ L.current || p(!1);
3316
3408
  }, 120));
3317
- }, [b, f]), I = $(null), Y = $(null);
3318
- Se(I, N), Pe(() => {
3319
- var H, z;
3320
- const _ = (H = Y.current) == null ? void 0 : H.offsetWidth, O = (z = Y.current) == null ? void 0 : z.offsetHeight;
3321
- _ != null && O != null && (m.height !== O || m.width !== _) && k({ width: _, height: O });
3322
- }, [m.height, m.width]);
3323
- const S = qe(
3409
+ }, [M, h]), Y = W(null), S = W(null);
3410
+ Ie(Y, R), Be(() => {
3411
+ var H, et;
3412
+ const O = (H = S.current) == null ? void 0 : H.offsetWidth, _ = (et = S.current) == null ? void 0 : et.offsetHeight;
3413
+ O != null && _ != null && (k.height !== _ || k.width !== O) && T({ width: O, height: _ });
3414
+ }, [k.height, k.width]);
3415
+ const U = Xe(
3324
3416
  t,
3325
3417
  e,
3326
3418
  r,
3327
3419
  s
3328
3420
  ), {
3329
- visiblePanel: v,
3330
- visibleMonth: U,
3331
- onValueChangeByInputs: K,
3332
- selectedDate: j,
3333
- setVisibleMonth: Z,
3334
- setVisiblePanel: F,
3421
+ visiblePanel: $,
3422
+ visibleMonth: v,
3423
+ onValueChangeByInputs: F,
3424
+ selectedDate: K,
3425
+ setVisibleMonth: C,
3426
+ setVisiblePanel: V,
3335
3427
  monthPickerButtonRef: Q
3336
- } = S, tt = D(
3337
- (_) => {
3338
- _.key === "Escape" && N();
3428
+ } = U, tt = D(
3429
+ (O) => {
3430
+ O.key === "Escape" && R();
3339
3431
  },
3340
- [N]
3432
+ [R]
3341
3433
  );
3342
- return /* @__PURE__ */ x(
3343
- L,
3434
+ return /* @__PURE__ */ E(
3435
+ A,
3344
3436
  {
3345
3437
  position: "relative",
3346
- className: ee.travelDateInput,
3347
- ref: I,
3438
+ className: ne.travelDateInput,
3439
+ ref: Y,
3348
3440
  onKeyDown: tt,
3349
- height: m.height,
3350
- width: m.width,
3441
+ height: k.height,
3442
+ width: k.width,
3351
3443
  children: [
3352
3444
  /* @__PURE__ */ o(
3353
- L,
3445
+ A,
3354
3446
  {
3355
3447
  position: "absolute",
3356
- ref: Y,
3357
- zIndex: b ? p : h,
3448
+ ref: S,
3449
+ zIndex: M ? m : f,
3358
3450
  children: /* @__PURE__ */ o(
3359
- Ge,
3451
+ Qe,
3360
3452
  {
3361
3453
  value: t,
3362
- onValueChange: K,
3454
+ onValueChange: F,
3363
3455
  localeCode: r,
3364
3456
  label: n,
3365
- onFocus: A
3457
+ onFocus: N,
3458
+ calendarSize: w
3366
3459
  }
3367
3460
  )
3368
3461
  }
3369
3462
  ),
3370
- b && /* @__PURE__ */ o(
3371
- L,
3463
+ M && /* @__PURE__ */ o(
3464
+ A,
3372
3465
  {
3373
3466
  position: "absolute",
3374
- zIndex: p - 1,
3467
+ zIndex: m - 1,
3375
3468
  left: "-2.4rem",
3376
3469
  top: a ? "-8.0rem" : "-2.4rem",
3377
- className: jt(ee.overlay, M && ee.calendarVisible),
3470
+ className: gt(ne.overlay, y && ne.calendarVisible),
3378
3471
  children: /* @__PURE__ */ o(
3379
- L,
3472
+ A,
3380
3473
  {
3381
3474
  background: "white",
3382
3475
  shadow: "popover",
3383
3476
  borderRadius: "var(--swui-border-radius-large)",
3384
- children: /* @__PURE__ */ x(Re, { gap: 3, children: [
3385
- a && /* @__PURE__ */ o(Rt, { variant: "h2", as: l, children: a }),
3386
- /* @__PURE__ */ o(L, { height: "6.8rem" }),
3477
+ children: /* @__PURE__ */ E(Ee, { gap: 3, children: [
3478
+ a && /* @__PURE__ */ o(_t, { variant: "h2", as: l, children: a }),
3479
+ /* @__PURE__ */ o(A, { height: "6.8rem" }),
3387
3480
  /* @__PURE__ */ o(
3388
- qt,
3481
+ Qt,
3389
3482
  {
3390
- ...S,
3483
+ ...U,
3391
3484
  previousMonthButtonAriaLabel: i,
3392
- nextMonthButtonAriaLabel: c
3485
+ nextMonthButtonAriaLabel: c,
3486
+ calendarSize: w
3393
3487
  }
3394
3488
  ),
3395
- v === "calendar" && /* @__PURE__ */ o(
3396
- Qt,
3489
+ $ === "calendar" && /* @__PURE__ */ o(
3490
+ Xt,
3397
3491
  {
3398
- ...S,
3399
- isValidDateRange: !!j,
3400
- selectedStartDate: j,
3401
- selectedEndDate: j
3492
+ ...U,
3493
+ size: w,
3494
+ isValidDateRange: !!K,
3495
+ selectedStartDate: K,
3496
+ selectedEndDate: K
3402
3497
  }
3403
3498
  ),
3404
- v === "month-picker" && /* @__PURE__ */ o(
3405
- Nt,
3499
+ $ === "month-picker" && /* @__PURE__ */ o(
3500
+ Pt,
3406
3501
  {
3407
3502
  firstMonth: u,
3408
3503
  numMonths: d,
3409
- value: U,
3410
- onValueChange: (_) => {
3411
- var O;
3412
- Z(_), F("calendar"), (O = Q.current) == null || O.focus();
3504
+ value: v,
3505
+ size: w,
3506
+ onValueChange: (O) => {
3507
+ var _;
3508
+ C(O), V("calendar"), (_ = Q.current) == null || _.focus();
3413
3509
  },
3414
3510
  onCancel: () => {
3415
- var _;
3416
- F("calendar"), (_ = Q.current) == null || _.focus();
3511
+ var O;
3512
+ V("calendar"), (O = Q.current) == null || O.focus();
3417
3513
  }
3418
3514
  }
3419
3515
  ),
3420
- g == null ? void 0 : g({ hideCalendar: N })
3516
+ g == null ? void 0 : g({ hideCalendar: R })
3421
3517
  ] })
3422
3518
  }
3423
3519
  )
@@ -3426,7 +3522,7 @@ const oe = ({
3426
3522
  ]
3427
3523
  }
3428
3524
  );
3429
- }, Cs = ({
3525
+ }, si = ({
3430
3526
  value: t,
3431
3527
  onValueChange: e,
3432
3528
  label: n,
@@ -3437,68 +3533,73 @@ const oe = ({
3437
3533
  heading: a,
3438
3534
  headingLevel: l,
3439
3535
  numMonthsInMonthPicker: d = 12,
3440
- firstMonthInMonthPicker: u = /* @__PURE__ */ new Date()
3536
+ firstMonthInMonthPicker: u = /* @__PURE__ */ new Date(),
3537
+ size: m = "medium"
3441
3538
  }) => {
3442
- const p = qe(
3539
+ const f = Xe(
3443
3540
  t,
3444
3541
  e,
3445
3542
  r,
3446
3543
  s
3447
3544
  ), {
3448
3545
  visiblePanel: h,
3449
- visibleMonth: f,
3450
- onValueChangeByInputs: g,
3451
- setVisibleMonth: M,
3452
- setVisiblePanel: y,
3453
- monthPickerButtonRef: b,
3454
- selectedDate: w
3455
- } = p;
3456
- return /* @__PURE__ */ x(C, { gap: 3, children: [
3457
- a && /* @__PURE__ */ o(Rt, { variant: "h2", as: l, children: a }),
3546
+ visibleMonth: g,
3547
+ onValueChangeByInputs: w,
3548
+ setVisibleMonth: y,
3549
+ setVisiblePanel: b,
3550
+ monthPickerButtonRef: M,
3551
+ selectedDate: p
3552
+ } = f;
3553
+ return /* @__PURE__ */ E(z, { gap: 3, children: [
3554
+ a && /* @__PURE__ */ o(_t, { variant: "h2", as: l, children: a }),
3458
3555
  /* @__PURE__ */ o(
3459
- Ge,
3556
+ Qe,
3460
3557
  {
3461
3558
  value: t,
3462
- onValueChange: g,
3559
+ onValueChange: w,
3463
3560
  localeCode: r,
3464
- label: n
3561
+ label: n,
3562
+ calendarSize: m
3465
3563
  }
3466
3564
  ),
3467
3565
  /* @__PURE__ */ o(
3468
- qt,
3566
+ Qt,
3469
3567
  {
3470
- ...p,
3568
+ ...f,
3471
3569
  previousMonthButtonAriaLabel: i,
3472
- nextMonthButtonAriaLabel: c
3570
+ nextMonthButtonAriaLabel: c,
3571
+ calendarSize: m
3473
3572
  }
3474
3573
  ),
3475
3574
  h === "calendar" && /* @__PURE__ */ o(
3476
- Qt,
3575
+ Xt,
3477
3576
  {
3478
- ...p,
3479
- selectedStartDate: w,
3480
- selectedEndDate: w,
3481
- isValidDateRange: !!w
3577
+ ...f,
3578
+ size: m,
3579
+ selectedStartDate: p,
3580
+ selectedEndDate: p,
3581
+ isValidDateRange: !!p
3482
3582
  }
3483
3583
  ),
3484
3584
  h === "month-picker" && /* @__PURE__ */ o(
3485
- Nt,
3585
+ Pt,
3486
3586
  {
3487
3587
  firstMonth: u,
3488
3588
  numMonths: d,
3489
- value: f,
3490
- onValueChange: (m) => {
3491
- var k;
3492
- M(m), y("calendar"), (k = b.current) == null || k.focus();
3589
+ value: g,
3590
+ size: m,
3591
+ onValueChange: (k) => {
3592
+ var T;
3593
+ y(k), b("calendar"), (T = M.current) == null || T.focus();
3493
3594
  },
3494
3595
  onCancel: () => {
3495
- var m;
3496
- y("calendar"), (m = b.current) == null || m.focus();
3596
+ var k;
3597
+ b("calendar"), (k = M.current) == null || k.focus();
3497
3598
  }
3498
3599
  }
3499
3600
  )
3500
3601
  ] });
3501
- }, Ks = ({
3602
+ }, ii = ({
3502
3603
  value: t,
3503
3604
  onValueChange: e,
3504
3605
  startDateLabel: n,
@@ -3510,121 +3611,125 @@ const oe = ({
3510
3611
  heading: l,
3511
3612
  headingLevel: d,
3512
3613
  numMonthsInMonthPicker: u = 12,
3513
- firstMonthInMonthPicker: p = /* @__PURE__ */ new Date()
3614
+ firstMonthInMonthPicker: m = /* @__PURE__ */ new Date(),
3615
+ size: f = "medium"
3514
3616
  }) => {
3515
- const h = Je(
3617
+ const h = Ge(
3516
3618
  t,
3517
3619
  e,
3518
3620
  s,
3519
3621
  i
3520
3622
  ), {
3521
- visiblePanel: f,
3522
- visibleMonth: g,
3523
- onValueChangeByInputs: M,
3524
- setVisibleMonth: y,
3525
- setVisiblePanel: b,
3526
- monthPickerButtonRef: w
3623
+ visiblePanel: g,
3624
+ visibleMonth: w,
3625
+ onValueChangeByInputs: y,
3626
+ setVisibleMonth: b,
3627
+ setVisiblePanel: M,
3628
+ monthPickerButtonRef: p
3527
3629
  } = h;
3528
- return /* @__PURE__ */ x(C, { gap: 3, children: [
3529
- l && /* @__PURE__ */ o(Rt, { variant: "h2", as: d, children: l }),
3630
+ return /* @__PURE__ */ E(z, { gap: 3, children: [
3631
+ l && /* @__PURE__ */ o(_t, { variant: "h2", as: d, children: l }),
3530
3632
  /* @__PURE__ */ o(
3531
- Ke,
3633
+ qe,
3532
3634
  {
3533
3635
  value: t,
3534
- onValueChange: M,
3636
+ onValueChange: y,
3535
3637
  localeCode: s,
3536
3638
  startDateLabel: n,
3537
- endDateLabel: r
3639
+ endDateLabel: r,
3640
+ calendarSize: f
3538
3641
  }
3539
3642
  ),
3540
3643
  /* @__PURE__ */ o(
3541
- qt,
3644
+ Qt,
3542
3645
  {
3543
3646
  ...h,
3544
3647
  previousMonthButtonAriaLabel: c,
3545
- nextMonthButtonAriaLabel: a
3648
+ nextMonthButtonAriaLabel: a,
3649
+ calendarSize: f
3546
3650
  }
3547
3651
  ),
3548
- f === "calendar" && /* @__PURE__ */ o(Qt, { ...h }),
3549
- f === "month-picker" && /* @__PURE__ */ o(
3550
- Nt,
3652
+ g === "calendar" && /* @__PURE__ */ o(Xt, { ...h, size: f }),
3653
+ g === "month-picker" && /* @__PURE__ */ o(
3654
+ Pt,
3551
3655
  {
3552
- firstMonth: p,
3656
+ firstMonth: m,
3553
3657
  numMonths: u,
3554
- value: g,
3555
- onValueChange: (m) => {
3556
- var k;
3557
- y(m), b("calendar"), (k = w.current) == null || k.focus();
3658
+ value: w,
3659
+ size: f,
3660
+ onValueChange: (k) => {
3661
+ var T;
3662
+ b(k), M("calendar"), (T = p.current) == null || T.focus();
3558
3663
  },
3559
3664
  onCancel: () => {
3560
- var m;
3561
- b("calendar"), (m = w.current) == null || m.focus();
3665
+ var k;
3666
+ M("calendar"), (k = p.current) == null || k.focus();
3562
3667
  }
3563
3668
  }
3564
3669
  )
3565
3670
  ] });
3566
3671
  };
3567
3672
  export {
3568
- se as Calendar,
3569
- Be as CalendarDay,
3570
- Os as DateInput,
3571
- _s as DateRangeCalendar,
3572
- zs as DateRangeDualTextInput,
3573
- Hs as DateRangeInput,
3574
- $s as DateTextInput,
3575
- Ws as DateTimeInput,
3576
- Bn as Month,
3577
- Nt as MonthPicker,
3578
- Ys as MultiDateCalendar,
3579
- or as PresetPicker,
3673
+ ie as Calendar,
3674
+ He as CalendarDay,
3675
+ Gs as DateInput,
3676
+ zs as DateRangeCalendar,
3677
+ ei as DateRangeDualTextInput,
3678
+ Qs as DateRangeInput,
3679
+ Xs as DateTextInput,
3680
+ Vs as DateTimeInput,
3681
+ Hn as Month,
3682
+ Pt as MonthPicker,
3683
+ Js as MultiDateCalendar,
3684
+ dr as PresetPicker,
3580
3685
  Ue as SingleDateCalendar,
3581
- Bs as SingleWeekCalendar,
3582
- Us as TimeTextInput,
3583
- Cs as TravelDateCalendar,
3584
- js as TravelDateInput,
3585
- Ks as TravelDateRangeCalendar,
3586
- Fs as TravelDateRangeInput,
3686
+ qs as SingleWeekCalendar,
3687
+ Zs as TimeTextInput,
3688
+ si as TravelDateCalendar,
3689
+ ri as TravelDateInput,
3690
+ ii as TravelDateRangeCalendar,
3691
+ ni as TravelDateRangeInput,
3587
3692
  On as WeekDay,
3588
- Kn as WeekDayCell,
3589
- Gn as WeekNumberCell,
3590
- vs as YearPicker,
3591
- at as addDayStateHighlights,
3592
- Ye as addDayStateHighlightsOnSingleDay,
3593
- Pn as addWeekRangeHighlights,
3594
- As as addWeekStateHighlights,
3595
- It as buildDayStateForDateRange,
3596
- _n as buildDayStateForRange,
3597
- Ln as buildDayStateForSingleMonth,
3598
- Wn as calculateOverflowingMonth,
3599
- $n as createDay,
3600
- fr as dateRangeToStrings,
3601
- Fn as dayHasHighlight,
3602
- ot as dayHighlightSelect,
3603
- mt as defaultCalendarTheme,
3604
- Cn as defaultTextPropsProvider,
3605
- jn as defaultWrapperStyleProvider,
3606
- Ns as extranetCalendarTheme,
3607
- yt as formatLocalizedDate,
3608
- wt as getDateFormatForLocaleCode,
3693
+ qn as WeekDayCell,
3694
+ Qn as WeekNumberCell,
3695
+ ti as YearPicker,
3696
+ lt as addDayStateHighlights,
3697
+ $e as addDayStateHighlightsOnSingleDay,
3698
+ Bn as addWeekRangeHighlights,
3699
+ vs as addWeekStateHighlights,
3700
+ Et as buildDayStateForDateRange,
3701
+ Yn as buildDayStateForRange,
3702
+ Pn as buildDayStateForSingleMonth,
3703
+ vn as calculateOverflowingMonth,
3704
+ jn as createDay,
3705
+ pr as dateRangeToStrings,
3706
+ zn as dayHasHighlight,
3707
+ ct as dayHighlightSelect,
3708
+ bt as defaultCalendarTheme,
3709
+ Jn as defaultTextPropsProvider,
3710
+ Kn as defaultWrapperStyleProvider,
3711
+ Fs as extranetCalendarTheme,
3712
+ St as formatLocalizedDate,
3713
+ kt as getDateFormatForLocaleCode,
3609
3714
  Un as getDaysForWeekForDate,
3610
- Ce as getDefaultLocaleForFormatting,
3715
+ Je as getDefaultLocaleForFormatting,
3611
3716
  Gt as getLocaleForLocaleCode,
3612
- Kt as getMonthInYear,
3613
- be as getMonthsInYear,
3717
+ Jt as getMonthInYear,
3718
+ ye as getMonthsInYear,
3614
3719
  pe as getWeekForDate,
3615
- Hn as getWeeksForMonth,
3616
- He as isDateRangeInvalid,
3617
- ut as parseLocalizedDateString,
3618
- ce as reformatLocalizedDateString,
3619
- Es as setDayStateValue,
3620
- xs as setDayStateValueFunction,
3621
- hr as stringsToDateRange,
3622
- Ls as toggleDateStringsIfEndIsEarlierThanStart,
3623
- $e as toggleDatesIfEndIsEarlierThanStart,
3624
- Ps as useDateRangeCalendarState,
3625
- mr as useDateRangeSelection,
3626
- Dr as useMultiDateSelection,
3627
- gr as useSingleDateSelection,
3628
- br as useSingleWeekSelection
3720
+ Wn as getWeeksForMonth,
3721
+ We as isDateRangeInvalid,
3722
+ ht as parseLocalizedDateString,
3723
+ ae as reformatLocalizedDateString,
3724
+ js as setDayStateValue,
3725
+ Us as setDayStateValueFunction,
3726
+ Dr as stringsToDateRange,
3727
+ Cs as toggleDateStringsIfEndIsEarlierThanStart,
3728
+ je as toggleDatesIfEndIsEarlierThanStart,
3729
+ Ks as useDateRangeCalendarState,
3730
+ wr as useDateRangeSelection,
3731
+ Mr as useMultiDateSelection,
3732
+ yr as useSingleDateSelection,
3733
+ kr as useSingleWeekSelection
3629
3734
  };
3630
3735
  //# sourceMappingURL=index.es.js.map